* [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request
@ 2017-04-28 12:28 Sebastian Reichel
2017-04-28 12:28 ` [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Sebastian Reichel
2017-04-28 17:27 ` [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Sebastian Reichel @ 2017-04-28 12:28 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Torokhov
Cc: linux-input, linux-kernel, Sebastian Reichel
The interrupt should be requested for the platform device
and not for the input device.
Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/input/misc/twl4030-pwrbutton.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 54162d2cbcfc..7c4504c31b07 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -70,7 +70,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
pwr->phys = "twl4030_pwrbutton/input0";
pwr->dev.parent = &pdev->dev;
- err = devm_request_threaded_irq(&pwr->dev, irq, NULL, powerbutton_irq,
+ err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
"twl4030_pwrbutton", pwr);
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper
2017-04-28 12:28 [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Sebastian Reichel
@ 2017-04-28 12:28 ` Sebastian Reichel
2017-04-28 17:28 ` Dmitry Torokhov
2017-04-28 17:27 ` [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2017-04-28 12:28 UTC (permalink / raw)
To: Sebastian Reichel, Dmitry Torokhov
Cc: linux-input, linux-kernel, Sebastian Reichel
Cleanup driver slightly by using input_set_capability() instead
of manually setting the required bits.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/input/misc/twl4030-pwrbutton.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 7c4504c31b07..1c13005b228f 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
return -ENOMEM;
}
- pwr->evbit[0] = BIT_MASK(EV_KEY);
- pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
+ input_set_capability(pwr, EV_KEY, KEY_POWER);
pwr->name = "twl4030_pwrbutton";
pwr->phys = "twl4030_pwrbutton/input0";
pwr->dev.parent = &pdev->dev;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request
2017-04-28 12:28 [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Sebastian Reichel
2017-04-28 12:28 ` [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Sebastian Reichel
@ 2017-04-28 17:27 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-04-28 17:27 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: Sebastian Reichel, linux-input, linux-kernel
On Fri, Apr 28, 2017 at 02:28:54PM +0200, Sebastian Reichel wrote:
> The interrupt should be requested for the platform device
> and not for the input device.
>
> Fixes: 7f9ce649d267 ("Input: twl4030-pwrbutton - simplify driver using devm_*")
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Applied, thank you.
> ---
> drivers/input/misc/twl4030-pwrbutton.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
> index 54162d2cbcfc..7c4504c31b07 100644
> --- a/drivers/input/misc/twl4030-pwrbutton.c
> +++ b/drivers/input/misc/twl4030-pwrbutton.c
> @@ -70,7 +70,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
> pwr->phys = "twl4030_pwrbutton/input0";
> pwr->dev.parent = &pdev->dev;
>
> - err = devm_request_threaded_irq(&pwr->dev, irq, NULL, powerbutton_irq,
> + err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
> IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
> IRQF_ONESHOT,
> "twl4030_pwrbutton", pwr);
> --
> 2.11.0
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper
2017-04-28 12:28 ` [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Sebastian Reichel
@ 2017-04-28 17:28 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2017-04-28 17:28 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: Sebastian Reichel, linux-input, linux-kernel
On Fri, Apr 28, 2017 at 02:28:55PM +0200, Sebastian Reichel wrote:
> Cleanup driver slightly by using input_set_capability() instead
> of manually setting the required bits.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Applied, thank you.
> ---
> drivers/input/misc/twl4030-pwrbutton.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
> index 7c4504c31b07..1c13005b228f 100644
> --- a/drivers/input/misc/twl4030-pwrbutton.c
> +++ b/drivers/input/misc/twl4030-pwrbutton.c
> @@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
> return -ENOMEM;
> }
>
> - pwr->evbit[0] = BIT_MASK(EV_KEY);
> - pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
> + input_set_capability(pwr, EV_KEY, KEY_POWER);
> pwr->name = "twl4030_pwrbutton";
> pwr->phys = "twl4030_pwrbutton/input0";
> pwr->dev.parent = &pdev->dev;
> --
> 2.11.0
>
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-28 17:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 12:28 [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Sebastian Reichel
2017-04-28 12:28 ` [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability() helper Sebastian Reichel
2017-04-28 17:28 ` Dmitry Torokhov
2017-04-28 17:27 ` [PATCH 1/2] Input: twl4030-pwrbutton: use correct device for irq request Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).