* [PATCH] Input: da9063_onkey - avoid using OF-specific APIs
@ 2023-12-21 3:09 Dmitry Torokhov
2024-01-04 19:08 ` Biju Das
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2023-12-21 3:09 UTC (permalink / raw)
To: Support Opensource, Biju Das; +Cc: linux-input, linux-kernel
There is nothing OF-specific in the driver, so switch from OF properties
helpers to generic device helpers.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/misc/da9063_onkey.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index a8b7f1cd0ec2..ce499c28a7b2 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -9,11 +9,12 @@
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
+#include <linux/property.h>
#include <linux/workqueue.h>
#include <linux/regmap.h>
-#include <linux/of.h>
#include <linux/mfd/da9063/core.h>
#include <linux/mfd/da9063/registers.h>
#include <linux/mfd/da9062/core.h>
@@ -199,8 +200,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, -ENXIO,
"Parent regmap unavailable.\n");
- onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
- "dlg,disable-key-power");
+ onkey->key_power = !device_property_read_bool(&pdev->dev,
+ "dlg,disable-key-power");
onkey->input = devm_input_allocate_device(&pdev->dev);
if (!onkey->input)
--
2.43.0.195.gebba966016-goog
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] Input: da9063_onkey - avoid using OF-specific APIs
2023-12-21 3:09 [PATCH] Input: da9063_onkey - avoid using OF-specific APIs Dmitry Torokhov
@ 2024-01-04 19:08 ` Biju Das
0 siblings, 0 replies; 2+ messages in thread
From: Biju Das @ 2024-01-04 19:08 UTC (permalink / raw)
To: Dmitry Torokhov, Support Opensource; +Cc: linux-input, linux-kernel
Hi Dmitry Torokhov,
Thanks for the patch.
> -----Original Message-----
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Sent: Thursday, December 21, 2023 3:09 AM
> To: Support Opensource <support.opensource@diasemi.com>; Biju Das
> <biju.das.jz@bp.renesas.com>
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] Input: da9063_onkey - avoid using OF-specific APIs
>
> There is nothing OF-specific in the driver, so switch from OF properties
> helpers to generic device helpers.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> drivers/input/misc/da9063_onkey.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/misc/da9063_onkey.c
> b/drivers/input/misc/da9063_onkey.c
> index a8b7f1cd0ec2..ce499c28a7b2 100644
> --- a/drivers/input/misc/da9063_onkey.c
> +++ b/drivers/input/misc/da9063_onkey.c
> @@ -9,11 +9,12 @@
> #include <linux/errno.h>
> #include <linux/input.h>
> #include <linux/interrupt.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/platform_device.h>
> #include <linux/pm_wakeirq.h>
> +#include <linux/property.h>
> #include <linux/workqueue.h>
> #include <linux/regmap.h>
> -#include <linux/of.h>
> #include <linux/mfd/da9063/core.h>
> #include <linux/mfd/da9063/registers.h> #include
> <linux/mfd/da9062/core.h> @@ -199,8 +200,8 @@ static int
> da9063_onkey_probe(struct platform_device *pdev)
> return dev_err_probe(&pdev->dev, -ENXIO,
> "Parent regmap unavailable.\n");
>
> - onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
> - "dlg,disable-key-power");
> + onkey->key_power = !device_property_read_bool(&pdev->dev,
> + "dlg,disable-key-power");
>
> onkey->input = devm_input_allocate_device(&pdev->dev);
> if (!onkey->input)
> --
> 2.43.0.195.gebba966016-goog
>
>
> --
> Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-04 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 3:09 [PATCH] Input: da9063_onkey - avoid using OF-specific APIs Dmitry Torokhov
2024-01-04 19:08 ` Biju Das
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.