All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional
@ 2017-06-21 10:01 ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Guenter Roeck,
	Arnd Bergmann, Vic Yang, Rob Herring, Catalin Marinas,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Heiko Stuebner,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Krzysztof Kozlowski, linux-input-u79uwXL29TY76Z2rM5mHXA,
	Will Deacon, devicetree-u79uwXL29TY76Z2rM5mHXA, Kukjin Kim,
	Thierry Reding, Jonathan Hunter, Lee Jones,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Russell King,
	linux-arm-kerne


We are enabling wakeup unconditionally for cros-ec-spi, it would be good to make it optional.

And we also need to enable wakeup for cros_ec_keyb, so the userspace could disable keyboard wakeup along with other cros-ec sub devices.


Changes in v3:
Use wakeup-source property to enable wakeup.
  Suggested by Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>.

Jeffy Chen (6):
  spi: core: add support for wakeup-source dts property
  dt-bindings: spi/core: add wakeup-source optional property
  ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  mfd: cros ec: spi: remove unconditionally wakeup enable
  input: cros_ec_keyb: report wakeup events
  ARM: dts: cros-ec-keyboard: enable as wakeup source

 Documentation/devicetree/bindings/spi/spi-bus.txt |  1 +
 arch/arm/boot/dts/cros-ec-keyboard.dtsi           |  1 +
 arch/arm/boot/dts/exynos5420-peach-pit.dts        |  1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts         |  1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi   |  1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi              |  1 +
 arch/arm/boot/dts/tegra124-venice2.dts            |  1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts    |  1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi      |  1 +
 drivers/input/keyboard/cros_ec_keyb.c             |  8 ++++++++
 drivers/mfd/cros_ec_spi.c                         |  2 --
 drivers/spi/spi.c                                 | 15 +++++++++++----
 12 files changed, 28 insertions(+), 6 deletions(-)

-- 
2.1.4

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

* [RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional
@ 2017-06-21 10:01 ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen,
	Guenter Roeck, Arnd Bergmann, Vic Yang, Rob Herring,
	Catalin Marinas, linux-samsung-soc, Heiko Stuebner,
	linux-rockchip, Krzysztof Kozlowski, linux-input, Will Deacon,
	devicetree, Kukjin Kim, Thierry Reding, Jonathan Hunter,
	Lee Jones, linux-tegra, Russell King, linux-arm-kernel,
	Gwendal Grignou, Mark Brown, Enric Balletbo Serra, linux-spi,
	Mark Rutland


We are enabling wakeup unconditionally for cros-ec-spi, it would be good to make it optional.

And we also need to enable wakeup for cros_ec_keyb, so the userspace could disable keyboard wakeup along with other cros-ec sub devices.


Changes in v3:
Use wakeup-source property to enable wakeup.
  Suggested by Dmitry Torokhov <dmitry.torokhov@gmail.com>.

Jeffy Chen (6):
  spi: core: add support for wakeup-source dts property
  dt-bindings: spi/core: add wakeup-source optional property
  ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  mfd: cros ec: spi: remove unconditionally wakeup enable
  input: cros_ec_keyb: report wakeup events
  ARM: dts: cros-ec-keyboard: enable as wakeup source

 Documentation/devicetree/bindings/spi/spi-bus.txt |  1 +
 arch/arm/boot/dts/cros-ec-keyboard.dtsi           |  1 +
 arch/arm/boot/dts/exynos5420-peach-pit.dts        |  1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts         |  1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi   |  1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi              |  1 +
 arch/arm/boot/dts/tegra124-venice2.dts            |  1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts    |  1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi      |  1 +
 drivers/input/keyboard/cros_ec_keyb.c             |  8 ++++++++
 drivers/mfd/cros_ec_spi.c                         |  2 --
 drivers/spi/spi.c                                 | 15 +++++++++++----
 12 files changed, 28 insertions(+), 6 deletions(-)

-- 
2.1.4

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

* [RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional
@ 2017-06-21 10:01 ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-arm-kernel


We are enabling wakeup unconditionally for cros-ec-spi, it would be good to make it optional.

And we also need to enable wakeup for cros_ec_keyb, so the userspace could disable keyboard wakeup along with other cros-ec sub devices.


Changes in v3:
Use wakeup-source property to enable wakeup.
  Suggested by Dmitry Torokhov <dmitry.torokhov@gmail.com>.

Jeffy Chen (6):
  spi: core: add support for wakeup-source dts property
  dt-bindings: spi/core: add wakeup-source optional property
  ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  mfd: cros ec: spi: remove unconditionally wakeup enable
  input: cros_ec_keyb: report wakeup events
  ARM: dts: cros-ec-keyboard: enable as wakeup source

 Documentation/devicetree/bindings/spi/spi-bus.txt |  1 +
 arch/arm/boot/dts/cros-ec-keyboard.dtsi           |  1 +
 arch/arm/boot/dts/exynos5420-peach-pit.dts        |  1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts         |  1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi   |  1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi              |  1 +
 arch/arm/boot/dts/tegra124-venice2.dts            |  1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts    |  1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi      |  1 +
 drivers/input/keyboard/cros_ec_keyb.c             |  8 ++++++++
 drivers/mfd/cros_ec_spi.c                         |  2 --
 drivers/spi/spi.c                                 | 15 +++++++++++----
 12 files changed, 28 insertions(+), 6 deletions(-)

-- 
2.1.4

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

* [RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property
       [not found] ` <1498039313-24220-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-06-21 10:01   ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen, Mark Brown,
	linux-spi

Use generic wakeup-source property to enable spi device wakeup.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 drivers/spi/spi.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c3f6b52..a510bba 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -547,11 +547,16 @@ int spi_add_device(struct spi_device *spi)
 
 	/* Device may be bound to an active driver when this returns */
 	status = device_add(&spi->dev);
-	if (status < 0)
+	if (status < 0) {
 		dev_err(dev, "can't add %s, status %d\n",
-				dev_name(&spi->dev), status);
-	else
-		dev_dbg(dev, "registered child %s\n", dev_name(&spi->dev));
+			dev_name(&spi->dev), status);
+		goto done;
+	}
+
+	dev_dbg(dev, "registered child %s\n", dev_name(&spi->dev));
+
+	if (device_property_read_bool(&spi->dev, "wakeup-source"))
+		device_init_wakeup(&spi->dev, true);
 
 done:
 	mutex_unlock(&spi_add_lock);
@@ -638,6 +643,8 @@ void spi_unregister_device(struct spi_device *spi)
 	if (!spi)
 		return;
 
+	device_init_wakeup(&spi->dev, false);
+
 	if (spi->dev.of_node) {
 		of_node_clear_flag(spi->dev.of_node, OF_POPULATED);
 		of_node_put(spi->dev.of_node);
-- 
2.1.4

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

* [RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property
@ 2017-06-21 10:01   ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

Use generic wakeup-source property to enable spi device wakeup.

Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

Changes in v3: None

 drivers/spi/spi.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c3f6b52..a510bba 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -547,11 +547,16 @@ int spi_add_device(struct spi_device *spi)
 
 	/* Device may be bound to an active driver when this returns */
 	status = device_add(&spi->dev);
-	if (status < 0)
+	if (status < 0) {
 		dev_err(dev, "can't add %s, status %d\n",
-				dev_name(&spi->dev), status);
-	else
-		dev_dbg(dev, "registered child %s\n", dev_name(&spi->dev));
+			dev_name(&spi->dev), status);
+		goto done;
+	}
+
+	dev_dbg(dev, "registered child %s\n", dev_name(&spi->dev));
+
+	if (device_property_read_bool(&spi->dev, "wakeup-source"))
+		device_init_wakeup(&spi->dev, true);
 
 done:
 	mutex_unlock(&spi_add_lock);
@@ -638,6 +643,8 @@ void spi_unregister_device(struct spi_device *spi)
 	if (!spi)
 		return;
 
+	device_init_wakeup(&spi->dev, false);
+
 	if (spi->dev.of_node) {
 		of_node_clear_flag(spi->dev.of_node, OF_POPULATED);
 		of_node_put(spi->dev.of_node);
-- 
2.1.4


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
  2017-06-21 10:01 ` Jeffy Chen
                   ` (2 preceding siblings ...)
  (?)
@ 2017-06-21 10:01 ` Jeffy Chen
  2017-06-26 16:00     ` Rob Herring
  -1 siblings, 1 reply; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen, devicetree,
	Mark Brown, linux-spi, Rob Herring, Mark Rutland

Update document devicetree bindings to support "wakeup-source" property.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
index 1f6e86f..0fa1ccf 100644
--- a/Documentation/devicetree/bindings/spi/spi-bus.txt
+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
 		    Defaults to 1 if not present.
 - spi-rx-delay-us - Microsecond delay after a read transfer.
 - spi-tx-delay-us - Microsecond delay after a write transfer.
+- wakeup-source   - Device can be used as a wakeup source.
 
 Some SPI controllers and devices support Dual and Quad SPI transfer mode.
 It allows data in the SPI system to be transferred using 2 wires (DUAL) or 4
-- 
2.1.4

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  2017-06-21 10:01 ` Jeffy Chen
  (?)
@ 2017-06-21 10:01     ` Jeffy Chen
  -1 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Kukjin Kim,
	Thierry Reding, Heiko Stuebner,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Jonathan Hunter,
	Catalin Marinas, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	Russell King, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Will Deacon, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Mark Rutland, Krzysztof Kozlowski

We used to enable wakeup for cros-ec-spi devices unconditionally.
Now we are using the more generic wakeup-source property to enable it.

Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

Changes in v3: None

 arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
 arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
 7 files changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index f9a75bf..a65ec2a 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -950,6 +950,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 953dc86..5209832 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -919,6 +919,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
index d752a31..94924df 100644
--- a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
@@ -232,6 +232,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_int>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index 5cf987b..198fc30 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -318,6 +318,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 6e59cec..008574d 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -845,6 +845,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
index 759af96..e0e54a9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
@@ -758,6 +758,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c_20: i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index eb50593..409199b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -798,6 +798,7 @@ ap_i2c_audio: &i2c8 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_ap_int_l>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
-- 
2.1.4

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 10:01     ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen, Kukjin Kim,
	Thierry Reding, Heiko Stuebner, devicetree, Jonathan Hunter,
	Catalin Marinas, linux-tegra, Russell King, linux-samsung-soc,
	Rob Herring, linux-arm-kernel, Will Deacon, linux-rockchip,
	Mark Rutland, Krzysztof Kozlowski

We used to enable wakeup for cros-ec-spi devices unconditionally.
Now we are using the more generic wakeup-source property to enable it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
 arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
 7 files changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index f9a75bf..a65ec2a 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -950,6 +950,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 953dc86..5209832 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -919,6 +919,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
index d752a31..94924df 100644
--- a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
@@ -232,6 +232,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_int>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index 5cf987b..198fc30 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -318,6 +318,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 6e59cec..008574d 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -845,6 +845,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
index 759af96..e0e54a9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
@@ -758,6 +758,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c_20: i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index eb50593..409199b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -798,6 +798,7 @@ ap_i2c_audio: &i2c8 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_ap_int_l>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
-- 
2.1.4

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 10:01     ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-arm-kernel

We used to enable wakeup for cros-ec-spi devices unconditionally.
Now we are using the more generic wakeup-source property to enable it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
 arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
 arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
 arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
 arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
 7 files changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index f9a75bf..a65ec2a 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -950,6 +950,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 953dc86..5209832 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -919,6 +919,7 @@
 		reg = <0>;
 		spi-max-frequency = <3125000>;
 		google,has-vbc-nvram;
+		wakeup-source;
 
 		controller-data {
 			samsung,spi-feedback-delay = <1>;
diff --git a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
index d752a31..94924df 100644
--- a/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
+++ b/arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi
@@ -232,6 +232,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_int>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index 5cf987b..198fc30 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -318,6 +318,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 6e59cec..008574d 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -845,6 +845,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
index 759af96..e0e54a9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
@@ -758,6 +758,7 @@
 			reg = <0>;
 
 			google,cros-ec-spi-msg-delay = <2000>;
+			wakeup-source;
 
 			i2c_20: i2c-tunnel {
 				compatible = "google,cros-ec-i2c-tunnel";
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index eb50593..409199b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -798,6 +798,7 @@ ap_i2c_audio: &i2c8 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&ec_ap_int_l>;
 		spi-max-frequency = <3000000>;
+		wakeup-source;
 
 		i2c_tunnel: i2c-tunnel {
 			compatible = "google,cros-ec-i2c-tunnel";
-- 
2.1.4

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

* [RFC PATCH v3 4/6] mfd: cros ec: spi: remove unconditionally wakeup enable
  2017-06-21 10:01 ` Jeffy Chen
                   ` (4 preceding siblings ...)
  (?)
@ 2017-06-21 10:01 ` Jeffy Chen
  -1 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen, Lee Jones

We used to enable wakeup for cros-ec-spi devices unconditionally.
Now we are using the more generic wakeup-source property to enable it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 drivers/mfd/cros_ec_spi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index c971407..0be7051 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -674,8 +674,6 @@ static int cros_ec_spi_probe(struct spi_device *spi)
 		return err;
 	}
 
-	device_init_wakeup(&spi->dev, true);
-
 	return 0;
 }
 
-- 
2.1.4

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

* [RFC PATCH v3 5/6] input: cros_ec_keyb: report wakeup events
  2017-06-21 10:01 ` Jeffy Chen
                   ` (5 preceding siblings ...)
  (?)
@ 2017-06-21 10:01 ` Jeffy Chen
  -1 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen,
	Gwendal Grignou, Guenter Roeck, Arnd Bergmann, Vic Yang,
	linux-input, Enric Balletbo Serra, Lee Jones

Report wakeup events when process events.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

---

Changes in v3:
Use wakeup-source property to enable wakeup.
  Suggested by Dmitry Torokhov <dmitry.torokhov@gmail.com>.

 drivers/input/keyboard/cros_ec_keyb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 79eb295..5dc387b 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -293,6 +293,9 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
 		return NOTIFY_DONE;
 	}
 
+	if (device_may_wakeup(ckdev->dev))
+		pm_wakeup_event(ckdev->dev, 0);
+
 	return NOTIFY_OK;
 }
 
@@ -639,6 +642,9 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
 		return err;
 	}
 
+	if (device_property_read_bool(dev, "wakeup-source"))
+		device_init_wakeup(dev, true);
+
 	return 0;
 }
 
@@ -649,6 +655,8 @@ static int cros_ec_keyb_remove(struct platform_device *pdev)
 	blocking_notifier_chain_unregister(&ckdev->ec->event_notifier,
 					   &ckdev->notifier);
 
+	device_init_wakeup(&pdev->dev, false);
+
 	return 0;
 }
 
-- 
2.1.4

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

* [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source
       [not found] ` <1498039313-24220-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2017-06-21 10:01     ` Jeffy Chen
@ 2017-06-21 10:01   ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: briannorris, dmitry.torokhov, dianders, Jeffy Chen, devicetree,
	Rob Herring, Mark Rutland, Russell King, linux-arm-kernel

Enable cros-ec-keyboard as a wakeup source.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
index c0451051..3168a5e 100644
--- a/arch/arm/boot/dts/cros-ec-keyboard.dtsi
+++ b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
@@ -16,6 +16,7 @@
 		keypad,num-rows = <8>;
 		keypad,num-columns = <13>;
 		google,needs-ghost-filter;
+		wakeup-source;
 
 		linux,keymap = <
 			MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-- 
2.1.4

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

* [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source
@ 2017-06-21 10:01   ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland,
	Russell King, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Enable cros-ec-keyboard as a wakeup source.

Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

Changes in v3: None

 arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
index c0451051..3168a5e 100644
--- a/arch/arm/boot/dts/cros-ec-keyboard.dtsi
+++ b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
@@ -16,6 +16,7 @@
 		keypad,num-rows = <8>;
 		keypad,num-columns = <13>;
 		google,needs-ghost-filter;
+		wakeup-source;
 
 		linux,keymap = <
 			MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-- 
2.1.4


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source
@ 2017-06-21 10:01   ` Jeffy Chen
  0 siblings, 0 replies; 33+ messages in thread
From: Jeffy Chen @ 2017-06-21 10:01 UTC (permalink / raw)
  To: linux-arm-kernel

Enable cros-ec-keyboard as a wakeup source.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
index c0451051..3168a5e 100644
--- a/arch/arm/boot/dts/cros-ec-keyboard.dtsi
+++ b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
@@ -16,6 +16,7 @@
 		keypad,num-rows = <8>;
 		keypad,num-columns = <13>;
 		google,needs-ghost-filter;
+		wakeup-source;
 
 		linux,keymap = <
 			MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-- 
2.1.4

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  2017-06-21 10:01     ` Jeffy Chen
  (?)
@ 2017-06-21 10:45         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 10:45 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Kukjin Kim, Thierry Reding,
	Heiko Stuebner, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Jonathan Hunter, Catalin Marinas,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Russell King,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Will Deacon,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland

On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
> We used to enable wakeup for cros-ec-spi devices unconditionally.
> Now we are using the more generic wakeup-source property to enable it.

Using wakeup-source property is still enabling this unconditionally.
What  do you exactly mean here?

>
> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> Changes in v3: None
>
>  arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
>  arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
>  arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
>  arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
>  arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
>  arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
>  7 files changed, 7 insertions(+)

Please split it per arch (arm and arm64) and per machine. I'll take
exynos after splitting.

Best regards,
Krzysztof

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 10:45         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 10:45 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, briannorris, dmitry.torokhov, dianders, Kukjin Kim,
	Thierry Reding, Heiko Stuebner, devicetree, Jonathan Hunter,
	Catalin Marinas, linux-tegra, Russell King, linux-samsung-soc,
	Rob Herring, linux-arm-kernel, Will Deacon, linux-rockchip,
	Mark Rutland

On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> We used to enable wakeup for cros-ec-spi devices unconditionally.
> Now we are using the more generic wakeup-source property to enable it.

Using wakeup-source property is still enabling this unconditionally.
What  do you exactly mean here?

>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> Changes in v3: None
>
>  arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
>  arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
>  arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
>  arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
>  arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
>  arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
>  7 files changed, 7 insertions(+)

Please split it per arch (arm and arm64) and per machine. I'll take
exynos after splitting.

Best regards,
Krzysztof

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 10:45         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 10:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> We used to enable wakeup for cros-ec-spi devices unconditionally.
> Now we are using the more generic wakeup-source property to enable it.

Using wakeup-source property is still enabling this unconditionally.
What  do you exactly mean here?

>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
>
> Changes in v3: None
>
>  arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
>  arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
>  arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
>  arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
>  arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
>  arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
>  7 files changed, 7 insertions(+)

Please split it per arch (arm and arm64) and per machine. I'll take
exynos after splitting.

Best regards,
Krzysztof

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

* Re: [RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property
  2017-06-21 10:01   ` Jeffy Chen
  (?)
@ 2017-06-21 10:52   ` Mark Brown
  -1 siblings, 0 replies; 33+ messages in thread
From: Mark Brown @ 2017-06-21 10:52 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, briannorris, dmitry.torokhov, dianders, linux-spi

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

On Wed, Jun 21, 2017 at 06:01:48PM +0800, Jeffy Chen wrote:
> Use generic wakeup-source property to enable spi device wakeup.

If this is a generic property shouldn't it be in the driver core rather
than individual subsystems?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  2017-06-21 10:45         ` Krzysztof Kozlowski
@ 2017-06-21 15:33           ` jeffy
  -1 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-21 15:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Mark Rutland, devicetree, dmitry.torokhov, Heiko Stuebner,
	linux-rockchip, Catalin Marinas, briannorris, Will Deacon,
	linux-kernel, Rob Herring, dianders, linux-samsung-soc,
	Kukjin Kim, Thierry Reding, linux-tegra, Russell King,
	Jonathan Hunter, linux-arm-kernel

Hi Krzysztof,

thanx for your comment.

On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> We used to enable wakeup for cros-ec-spi devices unconditionally.
>> Now we are using the more generic wakeup-source property to enable it.
>
> Using wakeup-source property is still enabling this unconditionally.
> What  do you exactly mean here?
i mean the wakeup-source is an optional property, we can disable wakeup 
by not adding it.

but now i enable it to all exist cros-ec-spi devices for not breaking 
current stuffs :)
>
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>> Changes in v3: None
>>
>>   arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
>>   arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
>>   arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
>>   arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
>>   arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
>>   arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
>>   arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
>>   7 files changed, 7 insertions(+)
>
> Please split it per arch (arm and arm64) and per machine. I'll take
> exynos after splitting.
ok, sounds good, will do it in next version, thanx~
>
> Best regards,
> Krzysztof
>
>
>

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 15:33           ` jeffy
  0 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-21 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Krzysztof,

thanx for your comment.

On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>> We used to enable wakeup for cros-ec-spi devices unconditionally.
>> Now we are using the more generic wakeup-source property to enable it.
>
> Using wakeup-source property is still enabling this unconditionally.
> What  do you exactly mean here?
i mean the wakeup-source is an optional property, we can disable wakeup 
by not adding it.

but now i enable it to all exist cros-ec-spi devices for not breaking 
current stuffs :)
>
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>> Changes in v3: None
>>
>>   arch/arm/boot/dts/exynos5420-peach-pit.dts      | 1 +
>>   arch/arm/boot/dts/exynos5800-peach-pi.dts       | 1 +
>>   arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 1 +
>>   arch/arm/boot/dts/tegra124-nyan.dtsi            | 1 +
>>   arch/arm/boot/dts/tegra124-venice2.dts          | 1 +
>>   arch/arm64/boot/dts/nvidia/tegra132-norrin.dts  | 1 +
>>   arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi    | 1 +
>>   7 files changed, 7 insertions(+)
>
> Please split it per arch (arm and arm64) and per machine. I'll take
> exynos after splitting.
ok, sounds good, will do it in next version, thanx~
>
> Best regards,
> Krzysztof
>
>
>

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  2017-06-21 15:33           ` jeffy
  (?)
@ 2017-06-21 15:36             ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 15:36 UTC (permalink / raw)
  To: jeffy
  Cc: Mark Rutland, devicetree, dmitry.torokhov, Heiko Stuebner,
	linux-rockchip, Catalin Marinas, briannorris, Will Deacon,
	linux-kernel, Rob Herring, dianders, linux-samsung-soc,
	Kukjin Kim, Thierry Reding, linux-tegra, Russell King,
	Jonathan Hunter, linux-arm-kernel

On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
> Hi Krzysztof,
> 
> thanx for your comment.
> 
> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
> > On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> > > We used to enable wakeup for cros-ec-spi devices unconditionally.
> > > Now we are using the more generic wakeup-source property to enable it.
> > 
> > Using wakeup-source property is still enabling this unconditionally.
> > What  do you exactly mean here?
> i mean the wakeup-source is an optional property, we can disable wakeup by
> not adding it.

Maybe mention this in commit msg? This removes any confusion. "Till now
the driver always enabled wakeup but now it supports wakeup property so
add it to keep same functionality."

Best regards,
Krzysztof

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 15:36             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 15:36 UTC (permalink / raw)
  To: jeffy
  Cc: linux-kernel, briannorris, dmitry.torokhov, dianders, Kukjin Kim,
	Thierry Reding, Heiko Stuebner, devicetree, Jonathan Hunter,
	Catalin Marinas, linux-tegra, Russell King, linux-samsung-soc,
	Rob Herring, linux-arm-kernel, Will Deacon, linux-rockchip,
	Mark Rutland

On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
> Hi Krzysztof,
> 
> thanx for your comment.
> 
> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
> > On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> > > We used to enable wakeup for cros-ec-spi devices unconditionally.
> > > Now we are using the more generic wakeup-source property to enable it.
> > 
> > Using wakeup-source property is still enabling this unconditionally.
> > What  do you exactly mean here?
> i mean the wakeup-source is an optional property, we can disable wakeup by
> not adding it.

Maybe mention this in commit msg? This removes any confusion. "Till now
the driver always enabled wakeup but now it supports wakeup property so
add it to keep same functionality."

Best regards,
Krzysztof

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-21 15:36             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 33+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-21 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
> Hi Krzysztof,
> 
> thanx for your comment.
> 
> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
> > On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> > > We used to enable wakeup for cros-ec-spi devices unconditionally.
> > > Now we are using the more generic wakeup-source property to enable it.
> > 
> > Using wakeup-source property is still enabling this unconditionally.
> > What  do you exactly mean here?
> i mean the wakeup-source is an optional property, we can disable wakeup by
> not adding it.

Maybe mention this in commit msg? This removes any confusion. "Till now
the driver always enabled wakeup but now it supports wakeup property so
add it to keep same functionality."

Best regards,
Krzysztof

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
  2017-06-21 15:36             ` Krzysztof Kozlowski
  (?)
@ 2017-06-22  2:33               ` jeffy
  -1 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-22  2:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw, Kukjin Kim, Thierry Reding,
	Heiko Stuebner, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Jonathan Hunter, Catalin Marinas,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Russell King,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Will Deacon,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland

Hi Krzysztof,

thanx for noting that, will add it to next version :)


On 06/21/2017 11:36 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
>> Hi Krzysztof,
>>
>> thanx for your comment.
>>
>> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
>>> On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org> wrote:
>>>> We used to enable wakeup for cros-ec-spi devices unconditionally.
>>>> Now we are using the more generic wakeup-source property to enable it.
>>>
>>> Using wakeup-source property is still enabling this unconditionally.
>>> What  do you exactly mean here?
>> i mean the wakeup-source is an optional property, we can disable wakeup by
>> not adding it.
>
> Maybe mention this in commit msg? This removes any confusion. "Till now
> the driver always enabled wakeup but now it supports wakeup property so
> add it to keep same functionality."
>
> Best regards,
> Krzysztof
>
>
>
>

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

* Re: [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-22  2:33               ` jeffy
  0 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-22  2:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, briannorris, dmitry.torokhov, dianders, Kukjin Kim,
	Thierry Reding, Heiko Stuebner, devicetree, Jonathan Hunter,
	Catalin Marinas, linux-tegra, Russell King, linux-samsung-soc,
	Rob Herring, linux-arm-kernel, Will Deacon, linux-rockchip,
	Mark Rutland

Hi Krzysztof,

thanx for noting that, will add it to next version :)


On 06/21/2017 11:36 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
>> Hi Krzysztof,
>>
>> thanx for your comment.
>>
>> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
>>> On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>> We used to enable wakeup for cros-ec-spi devices unconditionally.
>>>> Now we are using the more generic wakeup-source property to enable it.
>>>
>>> Using wakeup-source property is still enabling this unconditionally.
>>> What  do you exactly mean here?
>> i mean the wakeup-source is an optional property, we can disable wakeup by
>> not adding it.
>
> Maybe mention this in commit msg? This removes any confusion. "Till now
> the driver always enabled wakeup but now it supports wakeup property so
> add it to keep same functionality."
>
> Best regards,
> Krzysztof
>
>
>
>

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

* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
@ 2017-06-22  2:33               ` jeffy
  0 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-22  2:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Krzysztof,

thanx for noting that, will add it to next version :)


On 06/21/2017 11:36 PM, Krzysztof Kozlowski wrote:
> On Wed, Jun 21, 2017 at 11:33:29PM +0800, jeffy wrote:
>> Hi Krzysztof,
>>
>> thanx for your comment.
>>
>> On 06/21/2017 06:45 PM, Krzysztof Kozlowski wrote:
>>> On Wed, Jun 21, 2017 at 12:01 PM, Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
>>>> We used to enable wakeup for cros-ec-spi devices unconditionally.
>>>> Now we are using the more generic wakeup-source property to enable it.
>>>
>>> Using wakeup-source property is still enabling this unconditionally.
>>> What  do you exactly mean here?
>> i mean the wakeup-source is an optional property, we can disable wakeup by
>> not adding it.
>
> Maybe mention this in commit msg? This removes any confusion. "Till now
> the driver always enabled wakeup but now it supports wakeup property so
> add it to keep same functionality."
>
> Best regards,
> Krzysztof
>
>
>
>

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
@ 2017-06-26 16:00     ` Rob Herring
  0 siblings, 0 replies; 33+ messages in thread
From: Rob Herring @ 2017-06-26 16:00 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, briannorris, dmitry.torokhov, dianders, devicetree,
	Mark Brown, linux-spi, Mark Rutland

On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
> Update document devicetree bindings to support "wakeup-source" property.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
> 
> Changes in v3: None
> 
>  Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
> index 1f6e86f..0fa1ccf 100644
> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
> @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
>  		    Defaults to 1 if not present.
>  - spi-rx-delay-us - Microsecond delay after a read transfer.
>  - spi-tx-delay-us - Microsecond delay after a write transfer.
> +- wakeup-source   - Device can be used as a wakeup source.

wakeup-source is valid for any device with an interrupts property 
already, so I don't think this is necessary.

Rob

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
@ 2017-06-26 16:00     ` Rob Herring
  0 siblings, 0 replies; 33+ messages in thread
From: Rob Herring @ 2017-06-26 16:00 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Rutland

On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
> Update document devicetree bindings to support "wakeup-source" property.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
> 
> Changes in v3: None
> 
>  Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
> index 1f6e86f..0fa1ccf 100644
> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
> @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
>  		    Defaults to 1 if not present.
>  - spi-rx-delay-us - Microsecond delay after a read transfer.
>  - spi-tx-delay-us - Microsecond delay after a write transfer.
> +- wakeup-source   - Device can be used as a wakeup source.

wakeup-source is valid for any device with an interrupts property 
already, so I don't think this is necessary.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
  2017-06-26 16:00     ` Rob Herring
@ 2017-06-26 16:40       ` Dmitry Torokhov
  -1 siblings, 0 replies; 33+ messages in thread
From: Dmitry Torokhov @ 2017-06-26 16:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jeffy Chen, linux-kernel, briannorris, dianders, devicetree,
	Mark Brown, linux-spi, Mark Rutland

On Mon, Jun 26, 2017 at 11:00:11AM -0500, Rob Herring wrote:
> On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
> > Update document devicetree bindings to support "wakeup-source" property.
> > 
> > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> > ---
> > 
> > Changes in v3: None
> > 
> >  Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
> > index 1f6e86f..0fa1ccf 100644
> > --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
> > +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
> > @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
> >  		    Defaults to 1 if not present.
> >  - spi-rx-delay-us - Microsecond delay after a read transfer.
> >  - spi-tx-delay-us - Microsecond delay after a write transfer.
> > +- wakeup-source   - Device can be used as a wakeup source.
> 
> wakeup-source is valid for any device with an interrupts property 
> already, so I don't think this is necessary.

Do you mean it is not necessary on SPI level or not necessary at all? Or
you disagree with wording? Because we do need a way to say that on given
platform the device is supposed to be configured as a wakeup source.

Thanks.

-- 
Dmitry

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
@ 2017-06-26 16:40       ` Dmitry Torokhov
  0 siblings, 0 replies; 33+ messages in thread
From: Dmitry Torokhov @ 2017-06-26 16:40 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jeffy Chen, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Rutland

On Mon, Jun 26, 2017 at 11:00:11AM -0500, Rob Herring wrote:
> On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
> > Update document devicetree bindings to support "wakeup-source" property.
> > 
> > Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> > ---
> > 
> > Changes in v3: None
> > 
> >  Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
> > index 1f6e86f..0fa1ccf 100644
> > --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
> > +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
> > @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
> >  		    Defaults to 1 if not present.
> >  - spi-rx-delay-us - Microsecond delay after a read transfer.
> >  - spi-tx-delay-us - Microsecond delay after a write transfer.
> > +- wakeup-source   - Device can be used as a wakeup source.
> 
> wakeup-source is valid for any device with an interrupts property 
> already, so I don't think this is necessary.

Do you mean it is not necessary on SPI level or not necessary at all? Or
you disagree with wording? Because we do need a way to say that on given
platform the device is supposed to be configured as a wakeup source.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
  2017-06-26 16:40       ` Dmitry Torokhov
@ 2017-06-27  2:04         ` jeffy
  -1 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-27  2:04 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring
  Cc: linux-kernel, briannorris, dianders, devicetree, Mark Brown,
	linux-spi, Mark Rutland

Hi Rob,

On 06/27/2017 12:40 AM, Dmitry Torokhov wrote:
> On Mon, Jun 26, 2017 at 11:00:11AM -0500, Rob Herring wrote:
>> On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
>>> Update document devicetree bindings to support "wakeup-source" property.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>> ---
>>>
>>> Changes in v3: None
>>>
>>>   Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> index 1f6e86f..0fa1ccf 100644
>>> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
>>>   		    Defaults to 1 if not present.
>>>   - spi-rx-delay-us - Microsecond delay after a read transfer.
>>>   - spi-tx-delay-us - Microsecond delay after a write transfer.
>>> +- wakeup-source   - Device can be used as a wakeup source.
>>
>> wakeup-source is valid for any device with an interrupts property
>> already, so I don't think this is necessary.
i saw http://lkml.iu.edu/hypermail/linux/kernel/1510.2/04553.html add a 
Documentation/devicetree/bindings/power/wakeup-source.txt for this, but 
that serial didn't remove all wakeup-source property from other 
bindings, but standardize them, for example:
71a0151 Documentation: devicetree: fix reference to legacy wakeup properties

+++ b/Documentation/devicetree/bindings/input/gpio-keys.txt
@@ -24,6 +24,7 @@ Optional subnode-properties:
         - debounce-interval: Debouncing interval time in milliseconds.
           If not specified defaults to 5.
         - wakeup-source: Boolean, button can wake-up the system.
+                        (Legacy property supported: "gpio-key,wakeup")

>
> Do you mean it is not necessary on SPI level or not necessary at all? Or
> you disagree with wording? Because we do need a way to say that on given
> platform the device is supposed to be configured as a wakeup source.
>
> Thanks.
>

Hi guys,

Mark Brown suggested to put wakeup-source support in some common place 
instead of sub drivers, should we do that?

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
@ 2017-06-27  2:04         ` jeffy
  0 siblings, 0 replies; 33+ messages in thread
From: jeffy @ 2017-06-27  2:04 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Rutland

Hi Rob,

On 06/27/2017 12:40 AM, Dmitry Torokhov wrote:
> On Mon, Jun 26, 2017 at 11:00:11AM -0500, Rob Herring wrote:
>> On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
>>> Update document devicetree bindings to support "wakeup-source" property.
>>>
>>> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> ---
>>>
>>> Changes in v3: None
>>>
>>>   Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> index 1f6e86f..0fa1ccf 100644
>>> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>> @@ -77,6 +77,7 @@ All slave nodes can contain the following optional properties:
>>>   		    Defaults to 1 if not present.
>>>   - spi-rx-delay-us - Microsecond delay after a read transfer.
>>>   - spi-tx-delay-us - Microsecond delay after a write transfer.
>>> +- wakeup-source   - Device can be used as a wakeup source.
>>
>> wakeup-source is valid for any device with an interrupts property
>> already, so I don't think this is necessary.
i saw http://lkml.iu.edu/hypermail/linux/kernel/1510.2/04553.html add a 
Documentation/devicetree/bindings/power/wakeup-source.txt for this, but 
that serial didn't remove all wakeup-source property from other 
bindings, but standardize them, for example:
71a0151 Documentation: devicetree: fix reference to legacy wakeup properties

+++ b/Documentation/devicetree/bindings/input/gpio-keys.txt
@@ -24,6 +24,7 @@ Optional subnode-properties:
         - debounce-interval: Debouncing interval time in milliseconds.
           If not specified defaults to 5.
         - wakeup-source: Boolean, button can wake-up the system.
+                        (Legacy property supported: "gpio-key,wakeup")

>
> Do you mean it is not necessary on SPI level or not necessary at all? Or
> you disagree with wording? Because we do need a way to say that on given
> platform the device is supposed to be configured as a wakeup source.
>
> Thanks.
>

Hi guys,

Mark Brown suggested to put wakeup-source support in some common place 
instead of sub drivers, should we do that?

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property
  2017-06-27  2:04         ` jeffy
  (?)
@ 2017-06-30 14:44         ` Rob Herring
  -1 siblings, 0 replies; 33+ messages in thread
From: Rob Herring @ 2017-06-30 14:44 UTC (permalink / raw)
  To: jeffy
  Cc: Dmitry Torokhov, linux-kernel, Brian Norris, Doug Anderson,
	devicetree, Mark Brown, linux-spi, Mark Rutland

On Mon, Jun 26, 2017 at 9:04 PM, jeffy <jeffy.chen@rock-chips.com> wrote:
> Hi Rob,
>
> On 06/27/2017 12:40 AM, Dmitry Torokhov wrote:
>>
>> On Mon, Jun 26, 2017 at 11:00:11AM -0500, Rob Herring wrote:
>>>
>>> On Wed, Jun 21, 2017 at 06:01:49PM +0800, Jeffy Chen wrote:
>>>>
>>>> Update document devicetree bindings to support "wakeup-source" property.
>>>>
>>>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>>>> ---
>>>>
>>>> Changes in v3: None
>>>>
>>>>   Documentation/devicetree/bindings/spi/spi-bus.txt | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt
>>>> b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>>> index 1f6e86f..0fa1ccf 100644
>>>> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
>>>> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
>>>> @@ -77,6 +77,7 @@ All slave nodes can contain the following optional
>>>> properties:
>>>>                     Defaults to 1 if not present.
>>>>   - spi-rx-delay-us - Microsecond delay after a read transfer.
>>>>   - spi-tx-delay-us - Microsecond delay after a write transfer.
>>>> +- wakeup-source   - Device can be used as a wakeup source.
>>>
>>>
>>> wakeup-source is valid for any device with an interrupts property
>>> already, so I don't think this is necessary.
>
> i saw http://lkml.iu.edu/hypermail/linux/kernel/1510.2/04553.html add a
> Documentation/devicetree/bindings/power/wakeup-source.txt for this, but that
> serial didn't remove all wakeup-source property from other bindings, but
> standardize them, for example:
> 71a0151 Documentation: devicetree: fix reference to legacy wakeup properties
>
> +++ b/Documentation/devicetree/bindings/input/gpio-keys.txt
> @@ -24,6 +24,7 @@ Optional subnode-properties:
>         - debounce-interval: Debouncing interval time in milliseconds.
>           If not specified defaults to 5.
>         - wakeup-source: Boolean, button can wake-up the system.
> +                        (Legacy property supported: "gpio-key,wakeup")
>
>>
>> Do you mean it is not necessary on SPI level or not necessary at all? Or
>> you disagree with wording? Because we do need a way to say that on given
>> platform the device is supposed to be configured as a wakeup source.
>>
>> Thanks.
>>
>
> Hi guys,
>
> Mark Brown suggested to put wakeup-source support in some common place
> instead of sub drivers, should we do that?

As you point out, it is already documented in a common place. In SPI
makes no sense. Are you going to document in I2C, simple-bus, USB,
etc. as well?

wakeup-source is really a property of the system (the upstream
interrupt controller in particular), so it doesn't really need to be
documented per device.

Rob

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

end of thread, other threads:[~2017-06-30 14:44 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 10:01 [RFC PATCH v3 0/6] Report wakeup events in cros_ec_keyb and make cros-ec-spi wakeup optional Jeffy Chen
2017-06-21 10:01 ` Jeffy Chen
2017-06-21 10:01 ` Jeffy Chen
2017-06-21 10:01 ` [RFC PATCH v3 1/6] spi: core: add support for wakeup-source dts property Jeffy Chen
2017-06-21 10:01   ` Jeffy Chen
2017-06-21 10:52   ` Mark Brown
2017-06-21 10:01 ` [RFC PATCH v3 2/6] dt-bindings: spi/core: add wakeup-source optional property Jeffy Chen
2017-06-26 16:00   ` Rob Herring
2017-06-26 16:00     ` Rob Herring
2017-06-26 16:40     ` Dmitry Torokhov
2017-06-26 16:40       ` Dmitry Torokhov
2017-06-27  2:04       ` jeffy
2017-06-27  2:04         ` jeffy
2017-06-30 14:44         ` Rob Herring
     [not found] ` <1498039313-24220-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-06-21 10:01   ` [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices Jeffy Chen
2017-06-21 10:01     ` Jeffy Chen
2017-06-21 10:01     ` Jeffy Chen
     [not found]     ` <1498039313-24220-4-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-06-21 10:45       ` Krzysztof Kozlowski
2017-06-21 10:45         ` Krzysztof Kozlowski
2017-06-21 10:45         ` Krzysztof Kozlowski
2017-06-21 15:33         ` jeffy
2017-06-21 15:33           ` jeffy
2017-06-21 15:36           ` Krzysztof Kozlowski
2017-06-21 15:36             ` Krzysztof Kozlowski
2017-06-21 15:36             ` Krzysztof Kozlowski
2017-06-22  2:33             ` jeffy
2017-06-22  2:33               ` jeffy
2017-06-22  2:33               ` jeffy
2017-06-21 10:01 ` [RFC PATCH v3 4/6] mfd: cros ec: spi: remove unconditionally wakeup enable Jeffy Chen
2017-06-21 10:01 ` [RFC PATCH v3 5/6] input: cros_ec_keyb: report wakeup events Jeffy Chen
2017-06-21 10:01 ` [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source Jeffy Chen
2017-06-21 10:01   ` Jeffy Chen
2017-06-21 10:01   ` Jeffy Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.