Messages in this thread | | | Date | Tue, 08 Aug 2023 10:02:28 +0200 | From | "Arnd Bergmann" <> | Subject | Re: [PATCH] input: keyboard: Add sprd-keypad driver |
| |
On Tue, Aug 8, 2023, at 09:25, Wenhua Lin wrote: > Add matrix keypad driver, support matrix keypad function. > > Signed-off-by: Wenhua Lin <Wenhua.Lin@unisoc.com>
Looks fine to me, just one minor thing to remember:
> +static int __maybe_unused sprd_keypad_resume(struct device *dev) > +{ > + struct sprd_keypad_data *data = dev_get_drvdata(dev); > + int ret = 0; > + > + if (!device_may_wakeup(dev)) { > + ret = sprd_keypad_enable(data); > + if (ret) > + return ret; > + ret = sprd_keypad_hw_init(data); > + } > + > + return ret; > +} > + > +static SIMPLE_DEV_PM_OPS(sprd_keypad_pm_ops, > + sprd_keypad_suspend, sprd_keypad_resume); > +
SIMPLE_DEV_PM_OPS() is deprecated, please use the new DEFINE_SIMPLE_DEV_PM_OPS() for all new drivers, and remove the __maybe_unused annotation that is no longer needed with that.
With that addressed (for the driver in general, I know nothing about the drivers/input specifics)
Acked-by: Arnd Bergmann <arnd@arndb.de>
Arnd
| |