[linux-sunxi] Re: [PATCH v7 3/6] input: misc: Add driver for AXP20x Power Enable Key

2014-06-30 Thread Carlo Caione
On Mon, Jun 30, 2014 at 11:47 AM, Mark Rutland  wrote:
>> +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?

It is not loaded by DTB but by the MFD core driver (axp20x). So I
assume this is still a platform device.

Regards,

-- 
Carlo Caione

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH v7 3/6] input: misc: Add driver for AXP20x Power Enable Key

2014-06-30 Thread Mark Rutland
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.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.