Hi,
The following patch series add the pinctrl support to the follwing
keybords:
- gpio_keys
- qt1070
The pinctrl is optionnal as not everyone need it
If no objection I'll apply them via at91 as I have a long patch series
of pinctrl for at91
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (2):
input: qt1070: add pinctrl consumer
input: gpio_keys: add pinctrl consumer
drivers/input/keyboard/gpio_keys.c | 11 +++++++++++
drivers/input/keyboard/qt1070.c | 11 +++++++++++
2 files changed, 22 insertions(+)
Best Regards,
J.
If no pinctrl available just report a warning as some architecture may not
need to do anything.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Linus Walleij <redacted>
Cc: linux-input@vger.kernel.org
---
drivers/input/keyboard/qt1070.c | 11 +++++++++++
1 file changed, 11 insertions(+)
@@ -33,6 +33,7 @@#include<linux/interrupt.h>#include<linux/jiffies.h>#include<linux/delay.h>+#include<linux/pinctrl/consumer.h>/* Address for each register */#define CHIP_ID 0x00
@@ -147,6 +148,7 @@ static int __devinit qt1070_probe(struct i2c_client *client,structinput_dev*input;inti;interr;+structpinctrl*pinctrl;err=i2c_check_functionality(client->adapter,I2C_FUNC_SMBUS_BYTE);if(!err){
@@ -155,6 +157,15 @@ static int __devinit qt1070_probe(struct i2c_client *client,return-ENODEV;}+pinctrl=devm_pinctrl_get_select_default(&client->dev);+if(IS_ERR(pinctrl)){+err=PTR_ERR(pinctrl);+if(err==-EPROBE_DEFER)+returnerr;++dev_warn(&client->dev,"No pinctrl provided\n");+}+if(!client->irq){dev_err(&client->dev,"please assign the irq to this device\n");return-EINVAL;
If no pinctrl available just report a warning as some architecture may not
need to do anything.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Linus Walleij <redacted>
Cc: linux-input@vger.kernel.org
---
drivers/input/keyboard/gpio_keys.c | 11 +++++++++++
1 file changed, 11 insertions(+)
On 10/23/2012 21:29, Jean-Christophe PLAGNIOL-VILLARD wrote:
If no pinctrl available just report a warning as some architecture may not
need to do anything.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Linus Walleij <redacted>
Cc: linux-input@vger.kernel.org
---
drivers/input/keyboard/qt1070.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Test it on sam9x5ek board with qt1070. It works well.
Tested-by: Bo Shen <redacted>
@@ -33,6 +33,7 @@#include<linux/interrupt.h>#include<linux/jiffies.h>#include<linux/delay.h>+#include<linux/pinctrl/consumer.h>/* Address for each register */#define CHIP_ID 0x00
@@ -147,6 +148,7 @@ static int __devinit qt1070_probe(struct i2c_client *client,structinput_dev*input;inti;interr;+structpinctrl*pinctrl;err=i2c_check_functionality(client->adapter,I2C_FUNC_SMBUS_BYTE);if(!err){
@@ -155,6 +157,15 @@ static int __devinit qt1070_probe(struct i2c_client *client,return-ENODEV;}+pinctrl=devm_pinctrl_get_select_default(&client->dev);+if(IS_ERR(pinctrl)){+err=PTR_ERR(pinctrl);+if(err==-EPROBE_DEFER)+returnerr;++dev_warn(&client->dev,"No pinctrl provided\n");+}+if(!client->irq){dev_err(&client->dev,"please assign the irq to this device\n");return-EINVAL;
On Tue, Oct 23, 2012 at 3:29 PM, Jean-Christophe PLAGNIOL-VILLARD
[off-list ref] wrote:
If no pinctrl available just report a warning as some architecture may not
need to do anything.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Linus Walleij <redacted>
Cc: linux-input@vger.kernel.org
We're having a discussion on the level of where to impose pinctrl.
Jean-Christophe, could you please check the thread
"Input: omap4-keypad: Add pinctrl support"
and tell us what you think is the best approach?
Yours,
Linus Walleij
On Tue, Oct 23, 2012 at 3:29 PM, Jean-Christophe PLAGNIOL-VILLARD
[off-list ref] wrote:
quoted
If no pinctrl available just report a warning as some architecture may not
need to do anything.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: Linus Walleij <redacted>
Cc: linux-input@vger.kernel.org
We're having a discussion on the level of where to impose pinctrl.
Jean-Christophe, could you please check the thread
"Input: omap4-keypad: Add pinctrl support"
and tell us what you think is the best approach?