devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] input: touchscreen: edt-ft5x06: make wakeup source behavior configurable
@ 2018-05-17  9:05 Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Daniel Mack
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel Mack @ 2018-05-17  9:05 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, mark.rutland, shawnguo, kernel, fabio.estevam
  Cc: devicetree, Daniel Mack, linux-arm-kernel, linux-input

Hi,

I have a platform that features an edt-ft5x06 touch panel and that
doesn't want to wake on touch screen activity.

Here's a trivial series of patches that make the edt-ft5x06 driver only
act as wakeup source when requested through device properties or DTS.

The third patch changes the default in two DTS files that use this
driver.

I guess the first two patches should go through the input tree, while
the third can be picked by the IMX people. There are no compile-time
dependencies, so the order doesn't matter.


Thanks,
Daniel

v1 → v2:
	* simply drop device_init_wakeup() as the I2C core does handles
	  the wakeup-source property already (1/3)
	* add a delay after reset deassertion at resume time (2/3)
	* no changes in the DTS patch (3/3)


Daniel Mack (3):
  input: touchscreen: edt-ft5x06: don't make device a wakeup source by
    default
  input: touchscreen: edt-ft5x06: assert reset during suspend
  ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source

 .../bindings/input/touchscreen/edt-ft5x06.txt      |  3 +++
 arch/arm/boot/dts/imx28-tx28.dts                   |  1 +
 arch/arm/boot/dts/imx53-tx53-x03x.dts              |  1 +
 drivers/input/touchscreen/edt-ft5x06.c             | 27 +++++++++++++++++-----
 4 files changed, 26 insertions(+), 6 deletions(-)

-- 
2.14.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-17  9:05 [PATCH v2 0/3] input: touchscreen: edt-ft5x06: make wakeup source behavior configurable Daniel Mack
@ 2018-05-17  9:05 ` Daniel Mack
  2018-05-22 17:54   ` Rob Herring
  2018-05-17  9:05 ` [PATCH v2 2/3] input: touchscreen: edt-ft5x06: assert reset during suspend Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source Daniel Mack
  2 siblings, 1 reply; 12+ messages in thread
From: Daniel Mack @ 2018-05-17  9:05 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, mark.rutland, shawnguo, kernel, fabio.estevam
  Cc: devicetree, Daniel Mack, linux-arm-kernel, linux-input

Allow configuring the device as wakeup source through device properties, as
not all platforms want to wake up on touch screen activity.

The I2C core automatically reads the "wakeup-source" DT property to
configure a device's wakeup capability, and board supports files can set
I2C_CLIENT_WAKE in the flags.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 3 +++
 drivers/input/touchscreen/edt-ft5x06.c                             | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
index 025cf8c9324a..83f792d4d88c 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
@@ -52,6 +52,8 @@ Optional properties:
  - touchscreen-inverted-y  : See touchscreen.txt
  - touchscreen-swapped-x-y : See touchscreen.txt
 
+ - wakeup-source: touchscreen acts as wakeup source
+
 Example:
 	polytouch: edt-ft5x06@38 {
 		compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
@@ -62,4 +64,5 @@ Example:
 		interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
 		reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
 		wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
+		wakeup-source;
 	};
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 5bf63f76ddda..e18a2f215500 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1007,7 +1007,6 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
 		goto err_remove_attrs;
 
 	edt_ft5x06_ts_prepare_debugfs(tsdata, dev_driver_string(&client->dev));
-	device_init_wakeup(&client->dev, 1);
 
 	dev_dbg(&client->dev,
 		"EDT FT5x06 initialized: IRQ %d, WAKE pin %d, Reset pin %d.\n",
-- 
2.14.3

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

* [PATCH v2 2/3] input: touchscreen: edt-ft5x06: assert reset during suspend
  2018-05-17  9:05 [PATCH v2 0/3] input: touchscreen: edt-ft5x06: make wakeup source behavior configurable Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Daniel Mack
@ 2018-05-17  9:05 ` Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source Daniel Mack
  2 siblings, 0 replies; 12+ messages in thread
From: Daniel Mack @ 2018-05-17  9:05 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, mark.rutland, shawnguo, kernel, fabio.estevam
  Cc: devicetree, Daniel Mack, linux-arm-kernel, linux-input

If the device is not configured as wakeup source, it can be put in reset
during suspend to save some power.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 drivers/input/touchscreen/edt-ft5x06.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index e18a2f215500..145499022e1c 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -883,6 +883,20 @@ edt_ft5x06_ts_set_regs(struct edt_ft5x06_ts_data *tsdata)
 	}
 }
 
+static void edt_ft5x06_reset(struct edt_ft5x06_ts_data *tsdata, bool reset)
+{
+	if (!tsdata->reset_gpio)
+		return;
+
+	if (reset) {
+		gpiod_set_value_cansleep(tsdata->reset_gpio, 1);
+	} else {
+		usleep_range(5000, 6000);
+		gpiod_set_value_cansleep(tsdata->reset_gpio, 0);
+		msleep(300);
+	}
+}
+
 static int edt_ft5x06_ts_probe(struct i2c_client *client,
 					 const struct i2c_device_id *id)
 {
@@ -934,11 +948,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
 		gpiod_set_value_cansleep(tsdata->wake_gpio, 1);
 	}
 
-	if (tsdata->reset_gpio) {
-		usleep_range(5000, 6000);
-		gpiod_set_value_cansleep(tsdata->reset_gpio, 0);
-		msleep(300);
-	}
+	edt_ft5x06_reset(tsdata, false);
 
 	input = devm_input_allocate_device(&client->dev);
 	if (!input) {
@@ -1034,9 +1044,12 @@ static int edt_ft5x06_ts_remove(struct i2c_client *client)
 static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
+	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
 
 	if (device_may_wakeup(dev))
 		enable_irq_wake(client->irq);
+	else
+		edt_ft5x06_reset(tsdata, true);
 
 	return 0;
 }
@@ -1044,9 +1057,12 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
 static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
 {
 	struct i2c_client *client = to_i2c_client(dev);
+	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
 
 	if (device_may_wakeup(dev))
 		disable_irq_wake(client->irq);
+	else
+		edt_ft5x06_reset(tsdata, false);
 
 	return 0;
 }
-- 
2.14.3

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

* [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source
  2018-05-17  9:05 [PATCH v2 0/3] input: touchscreen: edt-ft5x06: make wakeup source behavior configurable Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Daniel Mack
  2018-05-17  9:05 ` [PATCH v2 2/3] input: touchscreen: edt-ft5x06: assert reset during suspend Daniel Mack
@ 2018-05-17  9:05 ` Daniel Mack
  2018-05-20 13:05   ` Shawn Guo
  2 siblings, 1 reply; 12+ messages in thread
From: Daniel Mack @ 2018-05-17  9:05 UTC (permalink / raw)
  To: dmitry.torokhov, robh+dt, mark.rutland, shawnguo, kernel, fabio.estevam
  Cc: devicetree, Daniel Mack, linux-arm-kernel, linux-input

The touchscreen driver no longer configures the device as wakeup source by
default. A "wakeup-source" property is needed.

To avoid regressions, this patch changes the DTS files for the only two
users of this driver that didn't have this property yet.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Rob Herring <robh+dt@kernel.org>
---
 arch/arm/boot/dts/imx28-tx28.dts      | 1 +
 arch/arm/boot/dts/imx53-tx53-x03x.dts | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index 0ebbc83852d0..094a39a67ec8 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -328,6 +328,7 @@
 		interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
 		reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
 		wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
+		wakeup-source;
 	};
 
 	touchscreen: tsc2007@48 {
diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts
index 0ecb43d88522..dbf0d73dc7b9 100644
--- a/arch/arm/boot/dts/imx53-tx53-x03x.dts
+++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts
@@ -220,6 +220,7 @@
 		interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
 		reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
 		wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+		wakeup-source;
 	};
 
 	touchscreen: tsc2007@48 {
-- 
2.14.3

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

* Re: [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source
  2018-05-17  9:05 ` [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source Daniel Mack
@ 2018-05-20 13:05   ` Shawn Guo
  2018-05-22 18:20     ` Dmitry Torokhov
  0 siblings, 1 reply; 12+ messages in thread
From: Shawn Guo @ 2018-05-20 13:05 UTC (permalink / raw)
  To: Daniel Mack
  Cc: mark.rutland, devicetree, dmitry.torokhov, robh+dt, kernel,
	linux-input, fabio.estevam, linux-arm-kernel

On Thu, May 17, 2018 at 11:05:52AM +0200, Daniel Mack wrote:
> The touchscreen driver no longer configures the device as wakeup source by
> default. A "wakeup-source" property is needed.
> 
> To avoid regressions, this patch changes the DTS files for the only two
> users of this driver that didn't have this property yet.
> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Rob Herring <robh+dt@kernel.org>

Applied this one, thanks.

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

* Re: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-17  9:05 ` [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Daniel Mack
@ 2018-05-22 17:54   ` Rob Herring
  2018-05-23  8:27     ` Daniel Mack
  0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2018-05-22 17:54 UTC (permalink / raw)
  To: Daniel Mack
  Cc: mark.rutland, devicetree, dmitry.torokhov, kernel, linux-input,
	fabio.estevam, shawnguo, linux-arm-kernel

On Thu, May 17, 2018 at 11:05:50AM +0200, Daniel Mack wrote:
> Allow configuring the device as wakeup source through device properties, as
> not all platforms want to wake up on touch screen activity.
> 
> The I2C core automatically reads the "wakeup-source" DT property to
> configure a device's wakeup capability, and board supports files can set
> I2C_CLIENT_WAKE in the flags.

This will break wake-up on working systems. Looks like mostly i.MX, but 
there's one AM437x board. If that board doesn't care, then it is up to 
Shawn.

Rob

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

* Re: [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source
  2018-05-20 13:05   ` Shawn Guo
@ 2018-05-22 18:20     ` Dmitry Torokhov
  2018-05-23  8:26       ` Daniel Mack
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Torokhov @ 2018-05-22 18:20 UTC (permalink / raw)
  To: Shawn Guo
  Cc: mark.rutland, devicetree, robh+dt, linux-arm-kernel, kernel,
	linux-input, fabio.estevam, Daniel Mack

On Sun, May 20, 2018 at 09:05:30PM +0800, Shawn Guo wrote:
> On Thu, May 17, 2018 at 11:05:52AM +0200, Daniel Mack wrote:
> > The touchscreen driver no longer configures the device as wakeup source by
> > default. A "wakeup-source" property is needed.
> > 
> > To avoid regressions, this patch changes the DTS files for the only two
> > users of this driver that didn't have this property yet.
> > 
> > Signed-off-by: Daniel Mack <daniel@zonque.org>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <kernel@pengutronix.de>
> > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> 
> Applied this one, thanks.

I think there are few more that need "wakeup-source" added:

arch/arm/boot/dts/am437x-sk-evm.dts
arch/arm/boot/dts/imx6q-var-dt6customboard.dts
arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi

Thanks.

-- 
Dmitry

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

* Re: [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source
  2018-05-22 18:20     ` Dmitry Torokhov
@ 2018-05-23  8:26       ` Daniel Mack
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Mack @ 2018-05-23  8:26 UTC (permalink / raw)
  To: Dmitry Torokhov, Shawn Guo
  Cc: mark.rutland, devicetree, robh+dt, kernel, linux-input,
	fabio.estevam, linux-arm-kernel

On Tuesday, May 22, 2018 08:20 PM, Dmitry Torokhov wrote:
> On Sun, May 20, 2018 at 09:05:30PM +0800, Shawn Guo wrote:
>> On Thu, May 17, 2018 at 11:05:52AM +0200, Daniel Mack wrote:
>>> The touchscreen driver no longer configures the device as wakeup source by
>>> default. A "wakeup-source" property is needed.
>>>
>>> To avoid regressions, this patch changes the DTS files for the only two
>>> users of this driver that didn't have this property yet.
>>>
>>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>>> Cc: Shawn Guo <shawnguo@kernel.org>
>>> Cc: Sascha Hauer <kernel@pengutronix.de>
>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>> Cc: Rob Herring <robh+dt@kernel.org>
>>
>> Applied this one, thanks.
> 
> I think there are few more that need "wakeup-source" added:
> 
> arch/arm/boot/dts/am437x-sk-evm.dts
> arch/arm/boot/dts/imx6q-var-dt6customboard.dts
> arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi
> arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi
> arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
> arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi

Oh, sorry for having missed them. Will send patches.


Thanks,
Daniel

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

* Re: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-22 17:54   ` Rob Herring
@ 2018-05-23  8:27     ` Daniel Mack
  2018-05-23 14:45       ` Rob Herring
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Mack @ 2018-05-23  8:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland, devicetree, dmitry.torokhov, kernel, linux-input,
	fabio.estevam, shawnguo, linux-arm-kernel

On Tuesday, May 22, 2018 07:54 PM, Rob Herring wrote:
> On Thu, May 17, 2018 at 11:05:50AM +0200, Daniel Mack wrote:
>> Allow configuring the device as wakeup source through device properties, as
>> not all platforms want to wake up on touch screen activity.
>>
>> The I2C core automatically reads the "wakeup-source" DT property to
>> configure a device's wakeup capability, and board supports files can set
>> I2C_CLIENT_WAKE in the flags.
> 
> This will break wake-up on working systems. Looks like mostly i.MX, but
> there's one AM437x board. If that board doesn't care, then it is up to
> Shawn.

I added the property to the dts files, but as Dmitry pointed out, I 
missed some. Sorry for that.


Thanks,
Daniel

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

* Re: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-23  8:27     ` Daniel Mack
@ 2018-05-23 14:45       ` Rob Herring
  2018-05-24 23:17         ` Dmitry Torokhov
  0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2018-05-23 14:45 UTC (permalink / raw)
  To: Daniel Mack
  Cc: Mark Rutland, devicetree, Dmitry Torokhov, Sascha Hauer,
	linux-input, Fabio Estevam, Shawn Guo,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Wed, May 23, 2018 at 3:27 AM, Daniel Mack <daniel@zonque.org> wrote:
> On Tuesday, May 22, 2018 07:54 PM, Rob Herring wrote:
>>
>> On Thu, May 17, 2018 at 11:05:50AM +0200, Daniel Mack wrote:
>>>
>>> Allow configuring the device as wakeup source through device properties,
>>> as
>>> not all platforms want to wake up on touch screen activity.
>>>
>>> The I2C core automatically reads the "wakeup-source" DT property to
>>> configure a device's wakeup capability, and board supports files can set
>>> I2C_CLIENT_WAKE in the flags.
>>
>>
>> This will break wake-up on working systems. Looks like mostly i.MX, but
>> there's one AM437x board. If that board doesn't care, then it is up to
>> Shawn.
>
>
> I added the property to the dts files, but as Dmitry pointed out, I missed
> some. Sorry for that.

Just adding the property to dts files doesn't fix the compatibility
problem. If a user uses an existing dtb (before this change) with a
new kernel (after this change), then wakeup will stop working.

Rob

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

* Re: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-23 14:45       ` Rob Herring
@ 2018-05-24 23:17         ` Dmitry Torokhov
  2018-05-25 15:52           ` Rob Herring
  0 siblings, 1 reply; 12+ messages in thread
From: Dmitry Torokhov @ 2018-05-24 23:17 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Sascha Hauer, linux-input, Fabio Estevam, Shawn Guo, Daniel Mack

On Wed, May 23, 2018 at 09:45:05AM -0500, Rob Herring wrote:
> On Wed, May 23, 2018 at 3:27 AM, Daniel Mack <daniel@zonque.org> wrote:
> > On Tuesday, May 22, 2018 07:54 PM, Rob Herring wrote:
> >>
> >> On Thu, May 17, 2018 at 11:05:50AM +0200, Daniel Mack wrote:
> >>>
> >>> Allow configuring the device as wakeup source through device properties,
> >>> as
> >>> not all platforms want to wake up on touch screen activity.
> >>>
> >>> The I2C core automatically reads the "wakeup-source" DT property to
> >>> configure a device's wakeup capability, and board supports files can set
> >>> I2C_CLIENT_WAKE in the flags.
> >>
> >>
> >> This will break wake-up on working systems. Looks like mostly i.MX, but
> >> there's one AM437x board. If that board doesn't care, then it is up to
> >> Shawn.
> >
> >
> > I added the property to the dts files, but as Dmitry pointed out, I missed
> > some. Sorry for that.
> 
> Just adding the property to dts files doesn't fix the compatibility
> problem. If a user uses an existing dtb (before this change) with a
> new kernel (after this change), then wakeup will stop working.

Is this a practical problem though? Do we know of any products with
this touch panel that use DTS not distributed with the kernel?

-- 
Dmitry

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

* Re: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default
  2018-05-24 23:17         ` Dmitry Torokhov
@ 2018-05-25 15:52           ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2018-05-25 15:52 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Mark Rutland, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Sascha Hauer, linux-input, Fabio Estevam, Shawn Guo, Daniel Mack

On Thu, May 24, 2018 at 6:17 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, May 23, 2018 at 09:45:05AM -0500, Rob Herring wrote:
>> On Wed, May 23, 2018 at 3:27 AM, Daniel Mack <daniel@zonque.org> wrote:
>> > On Tuesday, May 22, 2018 07:54 PM, Rob Herring wrote:
>> >>
>> >> On Thu, May 17, 2018 at 11:05:50AM +0200, Daniel Mack wrote:
>> >>>
>> >>> Allow configuring the device as wakeup source through device properties,
>> >>> as
>> >>> not all platforms want to wake up on touch screen activity.
>> >>>
>> >>> The I2C core automatically reads the "wakeup-source" DT property to
>> >>> configure a device's wakeup capability, and board supports files can set
>> >>> I2C_CLIENT_WAKE in the flags.
>> >>
>> >>
>> >> This will break wake-up on working systems. Looks like mostly i.MX, but
>> >> there's one AM437x board. If that board doesn't care, then it is up to
>> >> Shawn.
>> >
>> >
>> > I added the property to the dts files, but as Dmitry pointed out, I missed
>> > some. Sorry for that.
>>
>> Just adding the property to dts files doesn't fix the compatibility
>> problem. If a user uses an existing dtb (before this change) with a
>> new kernel (after this change), then wakeup will stop working.
>
> Is this a practical problem though? Do we know of any products with
> this touch panel that use DTS not distributed with the kernel?

Distribution of dts with kernel is irrelevant. It is how the dtb's are
handled that matters. You still need to ask in tree users.

I can't have any way of knowing what DTs may exist as there is only
one upstream repository of dts files. There's not really a good
solution on this to avoid breaking users, so we'll just have to see if
anyone (besides the known users) complains.

Rob

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

end of thread, other threads:[~2018-05-25 15:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17  9:05 [PATCH v2 0/3] input: touchscreen: edt-ft5x06: make wakeup source behavior configurable Daniel Mack
2018-05-17  9:05 ` [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Daniel Mack
2018-05-22 17:54   ` Rob Herring
2018-05-23  8:27     ` Daniel Mack
2018-05-23 14:45       ` Rob Herring
2018-05-24 23:17         ` Dmitry Torokhov
2018-05-25 15:52           ` Rob Herring
2018-05-17  9:05 ` [PATCH v2 2/3] input: touchscreen: edt-ft5x06: assert reset during suspend Daniel Mack
2018-05-17  9:05 ` [PATCH v2 3/3] ARM: dts: imx28/imx53: enable edt-ft5x06 wakeup source Daniel Mack
2018-05-20 13:05   ` Shawn Guo
2018-05-22 18:20     ` Dmitry Torokhov
2018-05-23  8:26       ` Daniel Mack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).