diff mbox

[1/4] Input: zforce - don't invert the interrupt GPIO

Message ID 1437396997-3182-2-git-send-email-dirk.behme@de.bosch.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dirk Behme July 20, 2015, 12:56 p.m. UTC
Commit 2d53809594af ("Input: zforce_ts - convert to use the gpiod
interface") converted this driver to use the gpiod functions. These
functions take the active low property into account, so we don't have
to invert the result of gpiod_get_value_cansleep(). This has been
missed in that commit. Fix it.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
 drivers/input/touchscreen/zforce_ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dmitry Torokhov July 20, 2015, 4:55 p.m. UTC | #1
On Mon, Jul 20, 2015 at 02:56:34PM +0200, Dirk Behme wrote:
> Commit 2d53809594af ("Input: zforce_ts - convert to use the gpiod
> interface") converted this driver to use the gpiod functions. These
> functions take the active low property into account, so we don't have
> to invert the result of gpiod_get_value_cansleep(). This has been
> missed in that commit. Fix it.
> 
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/zforce_ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
> index 32749db..edf01c3 100644
> --- a/drivers/input/touchscreen/zforce_ts.c
> +++ b/drivers/input/touchscreen/zforce_ts.c
> @@ -510,7 +510,7 @@ static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
>  	if (!ts->suspending && device_may_wakeup(&client->dev))
>  		pm_stay_awake(&client->dev);
>  
> -	while (!gpiod_get_value_cansleep(ts->gpio_int)) {
> +	while (gpiod_get_value_cansleep(ts->gpio_int)) {
>  		ret = zforce_read_packet(ts, payload_buffer);
>  		if (ret < 0) {
>  			dev_err(&client->dev,
> -- 
> 2.3.4
>
diff mbox

Patch

diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 32749db..edf01c3 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -510,7 +510,7 @@  static irqreturn_t zforce_irq_thread(int irq, void *dev_id)
 	if (!ts->suspending && device_may_wakeup(&client->dev))
 		pm_stay_awake(&client->dev);
 
-	while (!gpiod_get_value_cansleep(ts->gpio_int)) {
+	while (gpiod_get_value_cansleep(ts->gpio_int)) {
 		ret = zforce_read_packet(ts, payload_buffer);
 		if (ret < 0) {
 			dev_err(&client->dev,