From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Rutland Subject: Re: [PATCH v7 3/6] input: misc: Add driver for AXP20x Power Enable Key Date: Mon, 30 Jun 2014 10:47:12 +0100 Message-ID: <20140630094712.GX7262@leverpostej> References: <1404066237-20234-1-git-send-email-carlo@caione.org> <1404066237-20234-4-git-send-email-carlo@caione.org> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <1404066237-20234-4-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org> List-Post: , List-Help: , List-Archive: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline Content-Language: en-US To: Carlo Caione Cc: "lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org" , "hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , "dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org" List-Id: linux-input@vger.kernel.org On Sun, Jun 29, 2014 at 07:23:54PM +0100, Carlo Caione wrote: > This patch add support for the Power Enable Key found on MFD AXP202 and > AXP209. Besides the basic support for the button, the driver adds two > entries in sysfs to configure the time delay for power on/off. > > Signed-off-by: Carlo Caione > Acked-by: Dmitry Torokhov > --- > drivers/input/misc/Kconfig | 11 ++ > drivers/input/misc/Makefile | 1 + > drivers/input/misc/axp20x-pek.c | 281 ++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 293 insertions(+) > create mode 100644 drivers/input/misc/axp20x-pek.c [...] > +static int axp20x_pek_probe(struct platform_device *pdev) > +{ > + struct axp20x_pek *axp20x_pek; > + struct axp20x_dev *axp20x; > + struct input_dev *idev; > + int error; > + > + axp20x_pek = devm_kzalloc(&pdev->dev, sizeof(struct axp20x_pek), > + GFP_KERNEL); You can use sizeof(*axp20x_pek) here. [...] > +static struct platform_driver axp20x_pek_driver = { > + .probe = axp20x_pek_probe, > + .remove = axp20x_pek_remove, > + .driver = { > + .name = "axp20x-pek", > + .owner = THIS_MODULE, > + }, > +}; > +module_platform_driver(axp20x_pek_driver); So this requires platform data rather than a DTB? Or have I missed something? Thanks, Mark.