* [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
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 ` [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source Jeffy Chen
0 siblings, 2 replies; 7+ 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] 7+ messages in thread
* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
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:45 ` Krzysztof Kozlowski
2017-06-21 10:01 ` [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source Jeffy Chen
1 sibling, 1 reply; 7+ 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] 7+ messages in thread
* [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source
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 ` [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices Jeffy Chen
@ 2017-06-21 10:01 ` Jeffy Chen
1 sibling, 0 replies; 7+ 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] 7+ messages in thread
* [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices
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:45 ` Krzysztof Kozlowski
2017-06-21 15:33 ` jeffy
0 siblings, 1 reply; 7+ 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] 7+ 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
@ 2017-06-21 15:33 ` jeffy
2017-06-21 15:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ 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] 7+ messages in thread
* [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
2017-06-22 2:33 ` jeffy
0 siblings, 1 reply; 7+ 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] 7+ 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
@ 2017-06-22 2:33 ` jeffy
0 siblings, 0 replies; 7+ 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] 7+ messages in thread
end of thread, other threads:[~2017-06-22 2:33 UTC | newest]
Thread overview: 7+ 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 ` [RFC PATCH v3 3/6] ARM/arm64: dts: enable wakeup for cros-ec-spi devices Jeffy Chen
2017-06-21 10:45 ` Krzysztof Kozlowski
2017-06-21 15:33 ` jeffy
2017-06-21 15:36 ` Krzysztof Kozlowski
2017-06-22 2:33 ` jeffy
2017-06-21 10:01 ` [RFC PATCH v3 6/6] ARM: dts: cros-ec-keyboard: enable as wakeup source Jeffy Chen
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).