Thread (14 messages) 14 messages, 5 authors, 2014-12-03
STALE4196d
Revisions (10)
  1. v3 [diff vs current]
  2. v4 [diff vs current]
  3. v5 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]
  6. v6 [diff vs current]
  7. v6 [diff vs current]
  8. v7 [diff vs current]
  9. v7 current
  10. v7 [diff vs current]

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

From: mark.rutland@arm.com (Mark Rutland)
Date: 2014-06-30 09:47:12
Also in: linux-input

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 <redacted>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help