Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 0/3] DA9063 Onkey Improvements and Fixes
@ 2019-11-27 13:23 Marco Felsch
  2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Marco Felsch @ 2019-11-27 13:23 UTC (permalink / raw)
  To: support.opensource, stwiss.opensource, dmitry.torokhov, robh+dt,
	Adam.Thomson.Opensource
  Cc: devicetree, kernel, linux-input

Hi,

this is v2 contains all comments made on [1]. Please check the patch
based changelog for further information. Patch "Input: da9063 - fix
capability and drop KEY_SLEEP"  is already applied mainline.

[1] https://www.spinics.net/lists/devicetree/msg309431.html

Marco Felsch (3):
  dt-bindings: Input: da9062 - add key-opmode documentation
  input: misc: da9063_onkey: add mode change support
  dt-bindings: Input: da9062 - fix dlg,disable-key-power description

 .../devicetree/bindings/input/da9062-onkey.txt   | 15 ++++++++++++---
 drivers/input/misc/da9063_onkey.c                | 16 ++++++++++++++++
 drivers/mfd/da9062-core.c                        |  1 +
 3 files changed, 29 insertions(+), 3 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation
  2019-11-27 13:23 [PATCH v2 0/3] DA9063 Onkey Improvements and Fixes Marco Felsch
@ 2019-11-27 13:23 ` Marco Felsch
  2019-12-02 11:38   ` Adam Thomson
  2019-12-05 21:40   ` Rob Herring
  2019-11-27 13:23 ` [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support Marco Felsch
  2019-11-27 13:23 ` [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description Marco Felsch
  2 siblings, 2 replies; 9+ messages in thread
From: Marco Felsch @ 2019-11-27 13:23 UTC (permalink / raw)
  To: support.opensource, stwiss.opensource, dmitry.torokhov, robh+dt,
	Adam.Thomson.Opensource
  Cc: devicetree, kernel, linux-input

The onkey behaviour can be changed by programming the NONKEY_PIN
bitfield. Since the driver supports the reconfiguration we need to add
the documentation here.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v2:
- add da9061/3 references
- adapt binding description to be more general

 .../devicetree/bindings/input/da9062-onkey.txt         | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt
index 5f9fbc68e58a..0005b2bdcdd7 100644
--- a/Documentation/devicetree/bindings/input/da9062-onkey.txt
+++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
@@ -19,6 +19,16 @@ Optional properties:
     entry exists the OnKey driver will remove support for the KEY_POWER key
     press when triggered using a long press of the OnKey.
 
+- dlg,key-opmode : Set the nONKEY behaviour. This value is initial set by the
+    otp values. See nONKEY_PIN register description for more information.
+    Valid value range: 0x0..0x3
+
+References:
+
+[1] https://www.dialog-semiconductor.com/sites/default/files/da9061_datasheet_3v6.pdf
+[2] https://www.dialog-semiconductor.com/sites/default/files/da9062_datasheet_3v6.pdf
+[3] https://www.dialog-semiconductor.com/sites/default/files/da9063_datasheet_2v2.pdf
+
 Example: DA9063
 
 	pmic0: da9063@58 {
-- 
2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support
  2019-11-27 13:23 [PATCH v2 0/3] DA9063 Onkey Improvements and Fixes Marco Felsch
  2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
@ 2019-11-27 13:23 ` Marco Felsch
  2019-12-02 12:01   ` Adam Thomson
  2019-11-27 13:23 ` [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description Marco Felsch
  2 siblings, 1 reply; 9+ messages in thread
From: Marco Felsch @ 2019-11-27 13:23 UTC (permalink / raw)
  To: support.opensource, stwiss.opensource, dmitry.torokhov, robh+dt,
	Adam.Thomson.Opensource
  Cc: devicetree, kernel, linux-input

The pmic state machine behaviour upon a 'onkey press' event can be
configured using the ONKEY_PIN bit field. Most the time this is
configured correct by the OTP but sometimes we need to adjust the
behaviour so we need to add the support here.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v2:
- make use of da906x_chip_config
- rm unnecessary key_opmode

 drivers/input/misc/da9063_onkey.c | 16 ++++++++++++++++
 drivers/mfd/da9062-core.c         |  1 +
 2 files changed, 17 insertions(+)

diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index 79851923ee57..3a3f06a33eda 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -19,6 +19,7 @@
 
 struct da906x_chip_config {
 	/* REGS */
+	int onkey_config;
 	int onkey_status;
 	int onkey_pwr_signalling;
 	int onkey_fault_log;
@@ -26,6 +27,7 @@ struct da906x_chip_config {
 	/* MASKS */
 	int onkey_nonkey_mask;
 	int onkey_nonkey_lock_mask;
+	int onkey_nonkey_pin_mask;
 	int onkey_key_reset_mask;
 	int onkey_shutdown_mask;
 	/* NAMES */
@@ -44,6 +46,7 @@ struct da9063_onkey {
 
 static const struct da906x_chip_config da9063_regs = {
 	/* REGS */
+	.onkey_config = DA9063_REG_CONFIG_I,
 	.onkey_status = DA9063_REG_STATUS_A,
 	.onkey_pwr_signalling = DA9063_REG_CONTROL_B,
 	.onkey_fault_log = DA9063_REG_FAULT_LOG,
@@ -51,6 +54,7 @@ static const struct da906x_chip_config da9063_regs = {
 	/* MASKS */
 	.onkey_nonkey_mask = DA9063_NONKEY,
 	.onkey_nonkey_lock_mask = DA9063_NONKEY_LOCK,
+	.onkey_nonkey_pin_mask = DA9063_NONKEY_PIN_MASK,
 	.onkey_key_reset_mask = DA9063_KEY_RESET,
 	.onkey_shutdown_mask = DA9063_SHUTDOWN,
 	/* NAMES */
@@ -59,6 +63,7 @@ static const struct da906x_chip_config da9063_regs = {
 
 static const struct da906x_chip_config da9062_regs = {
 	/* REGS */
+	.onkey_config = DA9062AA_CONFIG_I,
 	.onkey_status = DA9062AA_STATUS_A,
 	.onkey_pwr_signalling = DA9062AA_CONTROL_B,
 	.onkey_fault_log = DA9062AA_FAULT_LOG,
@@ -66,6 +71,7 @@ static const struct da906x_chip_config da9062_regs = {
 	/* MASKS */
 	.onkey_nonkey_mask = DA9062AA_NONKEY_MASK,
 	.onkey_nonkey_lock_mask = DA9062AA_NONKEY_LOCK_MASK,
+	.onkey_nonkey_pin_mask = DA9062AA_NONKEY_PIN_MASK,
 	.onkey_key_reset_mask = DA9062AA_KEY_RESET_MASK,
 	.onkey_shutdown_mask = DA9062AA_SHUTDOWN_MASK,
 	/* NAMES */
@@ -193,6 +199,7 @@ static int da9063_onkey_probe(struct platform_device *pdev)
 {
 	struct da9063_onkey *onkey;
 	const struct of_device_id *match;
+	unsigned int val;
 	int irq;
 	int error;
 
@@ -220,6 +227,15 @@ static int da9063_onkey_probe(struct platform_device *pdev)
 	onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
 						  "dlg,disable-key-power");
 
+	if (!of_property_read_u32(pdev->dev.of_node, "dlg,key-opmode", &val)) {
+		error = regmap_update_bits(onkey->regmap,
+					   onkey->config->onkey_config,
+					   onkey->config->onkey_nonkey_pin_mask,
+					   val);
+		if (error)
+			return error;
+	}
+
 	onkey->input = devm_input_allocate_device(&pdev->dev);
 	if (!onkey->input) {
 		dev_err(&pdev->dev, "Failed to allocated input device.\n");
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index e69626867c26..aaa1f1841bc3 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -510,6 +510,7 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
 	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
 	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
 	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
+	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
 };
 
 static const struct regmap_range da9062_aa_volatile_ranges[] = {
-- 
2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description
  2019-11-27 13:23 [PATCH v2 0/3] DA9063 Onkey Improvements and Fixes Marco Felsch
  2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
  2019-11-27 13:23 ` [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support Marco Felsch
@ 2019-11-27 13:23 ` Marco Felsch
  2019-12-02 12:15   ` Adam Thomson
  2019-12-05 21:38   ` Rob Herring
  2 siblings, 2 replies; 9+ messages in thread
From: Marco Felsch @ 2019-11-27 13:23 UTC (permalink / raw)
  To: support.opensource, stwiss.opensource, dmitry.torokhov, robh+dt,
	Adam.Thomson.Opensource
  Cc: devicetree, kernel, linux-input

There was a bug within the driver since commit f889beaaab1c ("Input:
da9063 - report KEY_POWER instead of KEY_SLEEP during power
key-press"). Since we fixed the bug the KEY_POWER will be reported
always so we need to adapt the dt-bindings too. Make the description
more precise while on it.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v2:
- change description according Dmitry's suggestion.

 Documentation/devicetree/bindings/input/da9062-onkey.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt
index 0005b2bdcdd7..9f895454179d 100644
--- a/Documentation/devicetree/bindings/input/da9062-onkey.txt
+++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
@@ -15,9 +15,8 @@ Required properties:
 
 Optional 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 when triggered using a long press of the OnKey.
+- dlg,disable-key-power : If this property is present, the host will not be
+    issuing shutdown command over I2C in response to a long key-press.
 
 - dlg,key-opmode : Set the nONKEY behaviour. This value is initial set by the
     otp values. See nONKEY_PIN register description for more information.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation
  2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
@ 2019-12-02 11:38   ` Adam Thomson
  2019-12-05 21:40   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Adam Thomson @ 2019-12-02 11:38 UTC (permalink / raw)
  To: Marco Felsch, Support Opensource, Steve Twiss, dmitry.torokhov,
	robh+dt, Adam Thomson
  Cc: devicetree, kernel, linux-input

On 27 November 2019 13:23, Marco Felsch wrote:

> The onkey behaviour can be changed by programming the NONKEY_PIN
> bitfield. Since the driver supports the reconfiguration we need to add
> the documentation here.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> ---
> v2:
> - add da9061/3 references
> - adapt binding description to be more general
> 
>  .../devicetree/bindings/input/da9062-onkey.txt         | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt
> b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> index 5f9fbc68e58a..0005b2bdcdd7 100644
> --- a/Documentation/devicetree/bindings/input/da9062-onkey.txt
> +++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> @@ -19,6 +19,16 @@ Optional properties:
>      entry exists the OnKey driver will remove support for the KEY_POWER key
>      press when triggered using a long press of the OnKey.
> 
> +- dlg,key-opmode : Set the nONKEY behaviour. This value is initial set by the
> +    otp values. See nONKEY_PIN register description for more information.
> +    Valid value range: 0x0..0x3
> +
> +References:
> +
> +[1] https://www.dialog-
> semiconductor.com/sites/default/files/da9061_datasheet_3v6.pdf
> +[2] https://www.dialog-
> semiconductor.com/sites/default/files/da9062_datasheet_3v6.pdf
> +[3] https://www.dialog-
> semiconductor.com/sites/default/files/da9063_datasheet_2v2.pdf
> +
>  Example: DA9063
> 
>  	pmic0: da9063@58 {
> --
> 2.20.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support
  2019-11-27 13:23 ` [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support Marco Felsch
@ 2019-12-02 12:01   ` Adam Thomson
  0 siblings, 0 replies; 9+ messages in thread
From: Adam Thomson @ 2019-12-02 12:01 UTC (permalink / raw)
  To: Marco Felsch, Support Opensource, Steve Twiss, dmitry.torokhov,
	robh+dt, Adam Thomson
  Cc: devicetree, kernel, linux-input

On 27 November 2019 13:23, Marco Felsch wrote:

> The pmic state machine behaviour upon a 'onkey press' event can be
> configured using the ONKEY_PIN bit field. Most the time this is
> configured correct by the OTP but sometimes we need to adjust the
> behaviour so we need to add the support here.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> ---
> v2:
> - make use of da906x_chip_config
> - rm unnecessary key_opmode
> 
>  drivers/input/misc/da9063_onkey.c | 16 ++++++++++++++++
>  drivers/mfd/da9062-core.c         |  1 +
>  2 files changed, 17 insertions(+)
> 
> diff --git a/drivers/input/misc/da9063_onkey.c
> b/drivers/input/misc/da9063_onkey.c
> index 79851923ee57..3a3f06a33eda 100644
> --- a/drivers/input/misc/da9063_onkey.c
> +++ b/drivers/input/misc/da9063_onkey.c
> @@ -19,6 +19,7 @@
> 
>  struct da906x_chip_config {
>  	/* REGS */
> +	int onkey_config;
>  	int onkey_status;
>  	int onkey_pwr_signalling;
>  	int onkey_fault_log;
> @@ -26,6 +27,7 @@ struct da906x_chip_config {
>  	/* MASKS */
>  	int onkey_nonkey_mask;
>  	int onkey_nonkey_lock_mask;
> +	int onkey_nonkey_pin_mask;
>  	int onkey_key_reset_mask;
>  	int onkey_shutdown_mask;
>  	/* NAMES */
> @@ -44,6 +46,7 @@ struct da9063_onkey {
> 
>  static const struct da906x_chip_config da9063_regs = {
>  	/* REGS */
> +	.onkey_config = DA9063_REG_CONFIG_I,
>  	.onkey_status = DA9063_REG_STATUS_A,
>  	.onkey_pwr_signalling = DA9063_REG_CONTROL_B,
>  	.onkey_fault_log = DA9063_REG_FAULT_LOG,
> @@ -51,6 +54,7 @@ static const struct da906x_chip_config da9063_regs = {
>  	/* MASKS */
>  	.onkey_nonkey_mask = DA9063_NONKEY,
>  	.onkey_nonkey_lock_mask = DA9063_NONKEY_LOCK,
> +	.onkey_nonkey_pin_mask = DA9063_NONKEY_PIN_MASK,
>  	.onkey_key_reset_mask = DA9063_KEY_RESET,
>  	.onkey_shutdown_mask = DA9063_SHUTDOWN,
>  	/* NAMES */
> @@ -59,6 +63,7 @@ static const struct da906x_chip_config da9063_regs = {
> 
>  static const struct da906x_chip_config da9062_regs = {
>  	/* REGS */
> +	.onkey_config = DA9062AA_CONFIG_I,
>  	.onkey_status = DA9062AA_STATUS_A,
>  	.onkey_pwr_signalling = DA9062AA_CONTROL_B,
>  	.onkey_fault_log = DA9062AA_FAULT_LOG,
> @@ -66,6 +71,7 @@ static const struct da906x_chip_config da9062_regs = {
>  	/* MASKS */
>  	.onkey_nonkey_mask = DA9062AA_NONKEY_MASK,
>  	.onkey_nonkey_lock_mask = DA9062AA_NONKEY_LOCK_MASK,
> +	.onkey_nonkey_pin_mask = DA9062AA_NONKEY_PIN_MASK,
>  	.onkey_key_reset_mask = DA9062AA_KEY_RESET_MASK,
>  	.onkey_shutdown_mask = DA9062AA_SHUTDOWN_MASK,
>  	/* NAMES */
> @@ -193,6 +199,7 @@ static int da9063_onkey_probe(struct platform_device
> *pdev)
>  {
>  	struct da9063_onkey *onkey;
>  	const struct of_device_id *match;
> +	unsigned int val;
>  	int irq;
>  	int error;
> 
> @@ -220,6 +227,15 @@ static int da9063_onkey_probe(struct platform_device
> *pdev)
>  	onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
>  						  "dlg,disable-key-power");
> 
> +	if (!of_property_read_u32(pdev->dev.of_node, "dlg,key-opmode",
> &val)) {
> +		error = regmap_update_bits(onkey->regmap,
> +					   onkey->config->onkey_config,
> +					   onkey->config-
> >onkey_nonkey_pin_mask,
> +					   val);
> +		if (error)
> +			return error;
> +	}
> +
>  	onkey->input = devm_input_allocate_device(&pdev->dev);
>  	if (!onkey->input) {
>  		dev_err(&pdev->dev, "Failed to allocated input device.\n");
> diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
> index e69626867c26..aaa1f1841bc3 100644
> --- a/drivers/mfd/da9062-core.c
> +++ b/drivers/mfd/da9062-core.c
> @@ -510,6 +510,7 @@ static const struct regmap_range
> da9062_aa_writeable_ranges[] = {
>  	regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
>  	regmap_reg_range(DA9062AA_BBAT_CONT, DA9062AA_BBAT_CONT),
>  	regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
> +	regmap_reg_range(DA9062AA_CONFIG_I, DA9062AA_CONFIG_I),
>  };
> 
>  static const struct regmap_range da9062_aa_volatile_ranges[] = {
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description
  2019-11-27 13:23 ` [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description Marco Felsch
@ 2019-12-02 12:15   ` Adam Thomson
  2019-12-05 21:38   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Adam Thomson @ 2019-12-02 12:15 UTC (permalink / raw)
  To: Marco Felsch, Support Opensource, Steve Twiss, dmitry.torokhov,
	robh+dt, Adam Thomson
  Cc: devicetree, kernel, linux-input

On 27 November 2019 13:23, Marco Felsch wrote:

> There was a bug within the driver since commit f889beaaab1c ("Input:
> da9063 - report KEY_POWER instead of KEY_SLEEP during power
> key-press"). Since we fixed the bug the KEY_POWER will be reported
> always so we need to adapt the dt-bindings too. Make the description
> more precise while on it.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> v2:
> - change description according Dmitry's suggestion.
> 
>  Documentation/devicetree/bindings/input/da9062-onkey.txt | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt
> b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> index 0005b2bdcdd7..9f895454179d 100644
> --- a/Documentation/devicetree/bindings/input/da9062-onkey.txt
> +++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> @@ -15,9 +15,8 @@ Required properties:
> 
>  Optional 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 when triggered using a long press of the OnKey.
> +- dlg,disable-key-power : If this property is present, the host will not be
> +    issuing shutdown command over I2C in response to a long key-press.

This also changes behaviour of button press reporting as the driver will not
report a longer press (i.e. a button hold where the driver polls for release).
It will only report a short key press to user-space with this property provided.

The question here is do we still want to support long press reporting but
without the I2C sequence for shutdown? If so the driver needs to be updated to
work this way as right now it doesn't.

> 
>  - dlg,key-opmode : Set the nONKEY behaviour. This value is initial set by the
>      otp values. See nONKEY_PIN register description for more information.
> --
> 2.20.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description
  2019-11-27 13:23 ` [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description Marco Felsch
  2019-12-02 12:15   ` Adam Thomson
@ 2019-12-05 21:38   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-05 21:38 UTC (permalink / raw)
  To: Marco Felsch
  Cc: support.opensource, stwiss.opensource, dmitry.torokhov,
	Adam.Thomson.Opensource, devicetree, kernel, linux-input

On Wed, Nov 27, 2019 at 02:23:04PM +0100, Marco Felsch wrote:
> There was a bug within the driver since commit f889beaaab1c ("Input:
> da9063 - report KEY_POWER instead of KEY_SLEEP during power
> key-press"). Since we fixed the bug the KEY_POWER will be reported
> always so we need to adapt the dt-bindings too. Make the description
> more precise while on it.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> v2:
> - change description according Dmitry's suggestion.
> 
>  Documentation/devicetree/bindings/input/da9062-onkey.txt | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/input/da9062-onkey.txt b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> index 0005b2bdcdd7..9f895454179d 100644
> --- a/Documentation/devicetree/bindings/input/da9062-onkey.txt
> +++ b/Documentation/devicetree/bindings/input/da9062-onkey.txt
> @@ -15,9 +15,8 @@ Required properties:
>  
>  Optional 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 when triggered using a long press of the OnKey.
> +- dlg,disable-key-power : If this property is present, the host will not be
> +    issuing shutdown command over I2C in response to a long key-press.

This seems odd. Typically a long key press is used when the system is 
locked up and would have to be a h/w mechanism. 

Also, the new wording sounds like s/w policy, not h/w configuration. 
What the OS does in response to KEY_POWER doesn't belong in DT.

>  
>  - dlg,key-opmode : Set the nONKEY behaviour. This value is initial set by the
>      otp values. See nONKEY_PIN register description for more information.
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation
  2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
  2019-12-02 11:38   ` Adam Thomson
@ 2019-12-05 21:40   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-12-05 21:40 UTC (permalink / raw)
  To: Marco Felsch
  Cc: support.opensource, stwiss.opensource, dmitry.torokhov,
	Adam.Thomson.Opensource, devicetree, kernel, linux-input

On Wed, Nov 27, 2019 at 02:23:02PM +0100, Marco Felsch wrote:
> The onkey behaviour can be changed by programming the NONKEY_PIN
> bitfield. Since the driver supports the reconfiguration we need to add
> the documentation here.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> v2:
> - add da9061/3 references
> - adapt binding description to be more general
> 
>  .../devicetree/bindings/input/da9062-onkey.txt         | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 13:23 [PATCH v2 0/3] DA9063 Onkey Improvements and Fixes Marco Felsch
2019-11-27 13:23 ` [PATCH v2 1/3] dt-bindings: Input: da9062 - add key-opmode documentation Marco Felsch
2019-12-02 11:38   ` Adam Thomson
2019-12-05 21:40   ` Rob Herring
2019-11-27 13:23 ` [PATCH v2 2/3] input: misc: da9063_onkey: add mode change support Marco Felsch
2019-12-02 12:01   ` Adam Thomson
2019-11-27 13:23 ` [PATCH v2 3/3] dt-bindings: Input: da9062 - fix dlg,disable-key-power description Marco Felsch
2019-12-02 12:15   ` Adam Thomson
2019-12-05 21:38   ` Rob Herring

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git