Skip to contentSkip to conversation

Add OnKey support for DA9063

PATCH Superseded S Twiss 1 participant 3 messages Apr 10, 2015

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

S Twiss

author
#0 lore raw

v2 cover Add OnKey support for DA9063

From: S Twiss <[email protected]>

This patch set adds OnKey driver support for the Dialog Semiconductor DA9063 PMIC.

[PATCH V2 1/2]: kernel driver onkey support
[PATCH V2 2/2]: device tree bindings document

Thank you,
Steve Twiss, Dialog Semiconductor Ltd.

S Twiss (2):
input: misc: da9063: OnKey driver
devicetree: Add bindings for DA9063 OnKey

 Documentation/devicetree/bindings/mfd/da9063.txt |  22 ++-
 MAINTAINERS                                      |   2 +-
 drivers/input/misc/Kconfig                       |  10 +
 drivers/input/misc/Makefile                      |   1 +
 drivers/input/misc/da9063-onkey.c                | 228 +++++++++++++++++++++++
 drivers/mfd/da9063-core.c                        |  55 ++++++
 include/linux/mfd/da9063/pdata.h                 |   1 +
 7 files changed, 316 insertions(+), 3 deletions(-)
 create mode 100644 drivers/input/misc/da9063-onkey.c
Signature · 1 line
end-of-patch for PATCH V2
author
#1 lore raw

PATCH v2 1/2 input: misc: da9063: OnKey driver

From: Steve Twiss <[email protected]>

Add OnKey driver support for DA9063

---
Changes from PATCH V1 to V2
---------------------------
- Remove the circular dependency comment in the main e-mail body linking PATCH V1 1/2 and 2/2
- Alter the copyright header information to match expected GPLv2 text from http://www.gnu.org/licenses/gpl-2.0.html

This patch applies against linux-next and v4.0-rc6

 MAINTAINERS                       |   2 +-
 drivers/input/misc/Kconfig        |  10 ++
 drivers/input/misc/Makefile       |   1 +
 drivers/input/misc/da9063-onkey.c | 228 ++++++++++++++++++++++++++++++++++++++
 drivers/mfd/da9063-core.c         |  55 +++++++++
 include/linux/mfd/da9063/pdata.h  |   1 +
 6 files changed, 296 insertions(+), 1 deletion(-)
 create mode 100644 drivers/input/misc/da9063-onkey.c
MAINTAINERS +1 -1
index 1de6afa..97e20cf 100644
@@ -3138,7 +3138,7 @@ S:	Supported
 F:	Documentation/hwmon/da90??
 F:	drivers/gpio/gpio-da90??.c
 F:	drivers/hwmon/da90??-hwmon.c
-F:	drivers/input/misc/da90??_onkey.c
+F:	drivers/input/misc/da90???onkey.c
 F:	drivers/input/touchscreen/da9052_tsi.c
 F:	drivers/leds/leds-da90??.c
 F:	drivers/mfd/da903x.c
drivers/input/misc/Kconfig +10 -0
index 6deb8da..9d7a79d 100644
@@ -586,6 +586,16 @@ config INPUT_DA9055_ONKEY
 	  To compile this driver as a module, choose M here: the module
 	  will be called da9055_onkey.
 
+config INPUT_DA9063_ONKEY
+	tristate "Dialog DA9063 OnKey"
+	depends on MFD_DA9063
+	help
+	  Support the ONKEY of Dialog DA9063 Power Management IC as an
+	  input device reporting power button statue.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called da9063-onkey.
+
 config INPUT_DM355EVM
 	tristate "TI DaVinci DM355 EVM Keypad and IR Remote"
 	depends on MFD_DM355EVM_MSP
drivers/input/misc/Makefile +1 -0
index 403a1a5..50ae57e 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C)		+= cma3000_d0x_i2c.o
 obj-$(CONFIG_INPUT_COBALT_BTNS)		+= cobalt_btns.o
 obj-$(CONFIG_INPUT_DA9052_ONKEY)	+= da9052_onkey.o
 obj-$(CONFIG_INPUT_DA9055_ONKEY)	+= da9055_onkey.o
+obj-$(CONFIG_INPUT_DA9063_ONKEY)	+= da9063-onkey.o
 obj-$(CONFIG_INPUT_DM355EVM)		+= dm355evm_keys.o
 obj-$(CONFIG_INPUT_E3X0_BUTTON)		+= e3x0-button.o
 obj-$(CONFIG_INPUT_DRV260X_HAPTICS)	+= drv260x.o
drivers/input/misc/da9063-onkey.c new file +228 -0

228 lines not on this page · raw message

drivers/mfd/da9063-core.c +55 -0

85 lines not on this page · raw message

include/linux/mfd/da9063/pdata.h +1 -0
index 95c8742..612383b 100644
@@ -103,6 +103,7 @@ struct da9063;
 struct da9063_pdata {
 	int				(*init)(struct da9063 *da9063);
 	int				irq_base;
+	bool				key_power;
 	unsigned			flags;
 	struct da9063_regulators_pdata	*regulators_pdata;
 	struct led_platform_data	*leds_pdata;
Signature · 1 line
end-of-patch for PATCH V2
author
#2 lore raw

PATCH v2 2/2 devicetree: Add bindings for DA9063 OnKey

In reply to S Twiss

From: Steve Twiss <[email protected]>

Add device tree bindings for the DA9063 OnKey driver

---
Changes from PATCH V1 to V2
---------------------------
- Remove the circular dependency comment linking patches in the main e-mail
- Search and replace 'keyword' with 'property' in onkey sub-node description
- Reformat onkey sub-node content to move the description for disable-key-power into a new optional properties sub-section so it has a more promiment position

This patch applies against linux-next and v4.0-rc6

 Documentation/devicetree/bindings/mfd/da9063.txt | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/da9063.txt +20 -2
index 42c6fa6..c671784 100644
@@ -2,9 +2,10 @@
 
 DA9093 consists of a large and varied group of sub-devices (I2C Only):
 
-Device                   Supply Names    Description
-------                   ------------    -----------
+Device			 Supply Names	 Description
+------			 ------------	 -----------
 da9063-regulator        :               : LDOs & BUCKs
+da9063-onkey            :               : On Key
 da9063-rtc              :               : Real-Time Clock
 da9063-watchdog         :               : Watchdog
 
@@ -51,6 +52,18 @@ Sub-nodes:
   the DA9063. There are currently no entries in this binding, however
   compatible = "dlg,da9063-rtc" should be added if a node is created.
 
+- onkey : This node defines the OnKey settings for controlling the key
+  functionality of the device. The node should contain the compatible property
+  with the value "dlg,da9063-onkey".
+
+  Optional onkey properties:
+
+  - dlg,disable-key-power : Disable power-down using a long key-press. If this
+    entry exists the OnKey driver will remove support for the KEY_POWER key
+    press. If this entry does not exist then by default the key-press
+    triggered power down is enabled and the OnKey will support both KEY_POWER
+    and KEY_SLEEP.
+
 - watchdog : This node defines settings for the Watchdog timer associated
   with the DA9063. There are currently no entries in this binding, however
   compatible = "dlg,da9063-watchdog" should be added if a node is created.
@@ -73,6 +86,11 @@ Example:
 			compatible = "dlg,da9063-watchdog";
 		};
 
+		onkey {
+			compatible = "dlg,da9063-onkey";
+			dlg,disable-key-power;
+		};
+
 		regulators {
 			DA9063_BCORE1: bcore1 {
 				regulator-name = "BCORE1";
Signature · 1 line
end-of-patch for PATCH V2