All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux dev-4.7 0/2] enable gpio-keys
@ 2017-04-12  1:45 Brad Bishop
  2017-04-12  1:45 ` [PATCH linux dev-4.7 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-12  1:45 UTC (permalink / raw)
  To: joel

Enable the gpio-keys and evdev drivers on ast24xx generally.

Bind gpio-key events to the checkstop and air-water cooled gpios on the
Witherspoon system.

Brad Bishop (2):
  ARM: configs: aspeed: Enable keyboard-gpio
  ARM: dts: Enable checkstop and cooling gpio keys

 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 17 +++++++++++++++++
 arch/arm/configs/aspeed_g4_defconfig             |  8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig             |  8 +++++++-
 3 files changed, 31 insertions(+), 2 deletions(-)

-- 
1.8.3.1

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

* [PATCH linux dev-4.7 1/2] ARM: configs: aspeed: Enable keyboard-gpio
  2017-04-12  1:45 [PATCH linux dev-4.7 0/2] enable gpio-keys Brad Bishop
@ 2017-04-12  1:45 ` Brad Bishop
  2017-04-12  1:45 ` [PATCH linux dev-4.7 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-12  1:45 UTC (permalink / raw)
  To: joel

Some OpenBMC systems will be using keyboard-gpio so enable it
in our configs.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 arch/arm/configs/aspeed_g4_defconfig | 8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index 552297b..4350f67 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -103,7 +103,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -138,6 +143,7 @@ CONFIG_SENSORS_ADM1275=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index c5e7295..b6b3ca0 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -102,7 +102,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -135,6 +140,7 @@ CONFIG_PMBUS=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
-- 
1.8.3.1

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

* [PATCH linux dev-4.7 2/2] ARM: dts: Enable checkstop and cooling gpio keys
  2017-04-12  1:45 [PATCH linux dev-4.7 0/2] enable gpio-keys Brad Bishop
  2017-04-12  1:45 ` [PATCH linux dev-4.7 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
@ 2017-04-12  1:45 ` Brad Bishop
       [not found]   ` <1491970386.3829.5.camel@aj.id.au>
  2017-04-12  4:17 ` [PATCH linux dev-4.7 0/2] enable gpio-keys Joel Stanley
  2017-04-13 19:37 ` [PATCH linux dev-4.7 v2 " Brad Bishop
  3 siblings, 1 reply; 11+ messages in thread
From: Brad Bishop @ 2017-04-12  1:45 UTC (permalink / raw)
  To: joel

Enable gpio-keys events for the checkstop and water/air cooled
gpios for use by applications on the Witherspoon system.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index e3a7b77..dbf64f5 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -2,6 +2,7 @@
 
 #include "aspeed-g5.dtsi"
 #include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Witherspoon BMC";
@@ -31,6 +32,22 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		air-water {
+			label = "air-water";
+			gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_1>;
+		};
+
+		checkstop {
+			label = "checkstop";
+			gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_2>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-- 
1.8.3.1

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

* Re: [PATCH linux dev-4.7 0/2] enable gpio-keys
  2017-04-12  1:45 [PATCH linux dev-4.7 0/2] enable gpio-keys Brad Bishop
  2017-04-12  1:45 ` [PATCH linux dev-4.7 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
  2017-04-12  1:45 ` [PATCH linux dev-4.7 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
@ 2017-04-12  4:17 ` Joel Stanley
  2017-04-13  3:59   ` Brad Bishop
  2017-04-13 19:37 ` [PATCH linux dev-4.7 v2 " Brad Bishop
  3 siblings, 1 reply; 11+ messages in thread
From: Joel Stanley @ 2017-04-12  4:17 UTC (permalink / raw)
  To: Brad Bishop; +Cc: joel@jms.id.au

Hi Brad,

On Wed, Apr 12, 2017 at 11:15 AM, Brad Bishop
<bradleyb@fuzziesquirrel.com> wrote:
> Enable the gpio-keys and evdev drivers on ast24xx generally.
>
> Bind gpio-key events to the checkstop and air-water cooled gpios on the
> Witherspoon system.

Thanks for the patches. It looks like something went wrong in your
git-send-email invocation:

 From: Brad Bishop <bradleyb@fuzziesquirrel.com>
 To: "joel@jms.id.au" <openbmc@lists.ozlabs.org>

Did you intend to send it to me as well as the list?

Cheers,

Joel

>
> Brad Bishop (2):
>   ARM: configs: aspeed: Enable keyboard-gpio
>   ARM: dts: Enable checkstop and cooling gpio keys
>
>  arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 17 +++++++++++++++++
>  arch/arm/configs/aspeed_g4_defconfig             |  8 +++++++-
>  arch/arm/configs/aspeed_g5_defconfig             |  8 +++++++-
>  3 files changed, 31 insertions(+), 2 deletions(-)
>
> --
> 1.8.3.1

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

* Re: [PATCH linux dev-4.7 2/2] ARM: dts: Enable checkstop and cooling gpio keys
       [not found]   ` <1491970386.3829.5.camel@aj.id.au>
@ 2017-04-12  4:17     ` Andrew Jeffery
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Jeffery @ 2017-04-12  4:17 UTC (permalink / raw)
  To: Brad Bishop, joel; +Cc: OpenBMC

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

Cc'ing the list as it got sent privately.

On Wed, 2017-04-12 at 13:43 +0930, Andrew Jeffery wrote:
> On Tue, 2017-04-11 at 21:45 -0400, Brad Bishop wrote:
> > Enable gpio-keys events for the checkstop and water/air cooled
> > gpios for use by applications on the Witherspoon system.
> > 
> > > Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
> > 
> > ---
> >  arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 17
> > +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > index e3a7b77..dbf64f5 100644
> > --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> > @@ -2,6 +2,7 @@
> >  
> >  #include "aspeed-g5.dtsi"
> >  #include <dt-bindings/gpio/aspeed-gpio.h>
> > +#include <dt-bindings/input/input.h>
> >  
> >  / {
> > >  	model = "Witherspoon BMC";
> > 
> > @@ -31,6 +32,22 @@
> > >  		};
> > >  	};
> > 
> >  
> > > +	gpio-keys {
> > > +		compatible = "gpio-keys";
> > 
> > +
> > > +		air-water {
> > > +			label = "air-water";
> > > +			gpios = <&gpio ASPEED_GPIO(B, 5)
> > > GPIO_ACTIVE_LOW>;
> > 
> > +			linux,code = <KEY_1>;
> 
> What do you think of the idea of using the GPIO index instead of
> linearly assigning keycodes as needed? So:
> 
> 			linux,code = <ASPEED_GPIO(B, 5)>;
> 
> That way at least the assignment isn't completely arbitrary.
> 
> Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH linux dev-4.7 0/2] enable gpio-keys
  2017-04-12  4:17 ` [PATCH linux dev-4.7 0/2] enable gpio-keys Joel Stanley
@ 2017-04-13  3:59   ` Brad Bishop
  0 siblings, 0 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-13  3:59 UTC (permalink / raw)
  To: Joel Stanley; +Cc: openbmc

> Hi Brad,
> 
> On Wed, Apr 12, 2017 at 11:15 AM, Brad Bishop
> <bradleyb@fuzziesquirrel.com> wrote:
> > Enable the gpio-keys and evdev drivers on ast24xx generally.
> >
> > Bind gpio-key events to the checkstop and air-water cooled gpios on the
> > Witherspoon system.
> 
> Thanks for the patches. It looks like something went wrong in your
> git-send-email invocation:
> 
>  From: Brad Bishop <bradleyb@fuzziesquirrel.com>
>  To: "joel@jms.id.au" <openbmc@lists.ozlabs.org>
> 
> Did you intend to send it to me as well as the list?

I did.  Sorry about that.

> 
> Cheers,
> 
> Joel
> 
> >
> > Brad Bishop (2):
> >   ARM: configs: aspeed: Enable keyboard-gpio
> >   ARM: dts: Enable checkstop and cooling gpio keys
> >
> >  arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 17 +++++++++++++++++
> >  arch/arm/configs/aspeed_g4_defconfig             |  8 +++++++-
> >  arch/arm/configs/aspeed_g5_defconfig             |  8 +++++++-
> >  3 files changed, 31 insertions(+), 2 deletions(-)
> >
> > --
> > 1.8.3.1

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

* [PATCH linux dev-4.7 v2 0/2] enable gpio-keys
  2017-04-12  1:45 [PATCH linux dev-4.7 0/2] enable gpio-keys Brad Bishop
                   ` (2 preceding siblings ...)
  2017-04-12  4:17 ` [PATCH linux dev-4.7 0/2] enable gpio-keys Joel Stanley
@ 2017-04-13 19:37 ` Brad Bishop
  2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
  2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
  3 siblings, 2 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-13 19:37 UTC (permalink / raw)
  To: openbmc, joel

Enable the gpio-keys and evdev drivers on ast24xx generally.

Bind gpio-key events to the checkstop and air-water cooled gpios on the
Witherspoon system.

v2:
    Use gpio numbers for keycodes.

Brad Bishop (2):
  ARM: configs: aspeed: Enable keyboard-gpio
  ARM: dts: Enable checkstop and cooling gpio keys

 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
 arch/arm/configs/aspeed_g4_defconfig             |  8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig             |  8 +++++++-
 3 files changed, 30 insertions(+), 2 deletions(-)

-- 
1.8.3.1

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

* [PATCH linux dev-4.7 v2 1/2] ARM: configs: aspeed: Enable keyboard-gpio
  2017-04-13 19:37 ` [PATCH linux dev-4.7 v2 " Brad Bishop
@ 2017-04-13 19:37   ` Brad Bishop
  2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
  1 sibling, 0 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-13 19:37 UTC (permalink / raw)
  To: openbmc, joel

Some OpenBMC systems will be using keyboard-gpio so enable it
in our configs.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 arch/arm/configs/aspeed_g4_defconfig | 8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig
index 552297b..4350f67 100644
--- a/arch/arm/configs/aspeed_g4_defconfig
+++ b/arch/arm/configs/aspeed_g4_defconfig
@@ -103,7 +103,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -138,6 +143,7 @@ CONFIG_SENSORS_ADM1275=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index c5e7295..b6b3ca0 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -102,7 +102,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -135,6 +140,7 @@ CONFIG_PMBUS=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
-- 
1.8.3.1

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

* [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys
  2017-04-13 19:37 ` [PATCH linux dev-4.7 v2 " Brad Bishop
  2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
@ 2017-04-13 19:37   ` Brad Bishop
  2017-04-13 22:53     ` Andrew Jeffery
  1 sibling, 1 reply; 11+ messages in thread
From: Brad Bishop @ 2017-04-13 19:37 UTC (permalink / raw)
  To: openbmc, joel

Enable gpio-keys events for the checkstop and water/air cooled
gpios for use by applications on the Witherspoon system.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index e3a7b77..4a68b30 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -31,6 +31,22 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		air-water {
+			label = "air-water";
+			gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+		};
+
+		checkstop {
+			label = "checkstop";
+			gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-- 
1.8.3.1

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

* Re: [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys
  2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
@ 2017-04-13 22:53     ` Andrew Jeffery
  2017-04-19  4:21       ` Brad Bishop
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Jeffery @ 2017-04-13 22:53 UTC (permalink / raw)
  To: openbmc

Hi Brad,

On Fri, Apr 14, 2017, at 05:07, Brad Bishop wrote:
> Enable gpio-keys events for the checkstop and water/air cooled
> gpios for use by applications on the Witherspoon system.
> 
> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> index e3a7b77..4a68b30 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> @@ -31,6 +31,22 @@
>  		};
>  	};
>  
> +       gpio-keys {
> +               compatible = "gpio-keys";
> +
> +               air-water {
> +                       label = "air-water";
> +                       gpios = <&gpio ASPEED_GPIO(B, 5)
> GPIO_ACTIVE_LOW>;
> +                       linux,code = <&gpio ASPEED_GPIO(B, 5)
> GPIO_ACTIVE_LOW>;

This doesn't look right to me. linux,code doesn't appear to be anything
more than a single value cell in the documentation: 

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/input/gpio-keys.txt?id=refs/tags/v4.11-rc6

I expect you just want the macro,  and not phandle or gpio flags. I was
expecting to see:

linux,code = <ASPEED_GPIO(B, 5)>;

Is there a reason you've done it this way? Have you checked reading
values from userspace gives the expected value?

Andrew

> +               };
> +
> +               checkstop {
> +                       label = "checkstop";
> +                       gpios = <&gpio ASPEED_GPIO(J, 2)
> GPIO_ACTIVE_LOW>;
> +                       linux,code = <&gpio ASPEED_GPIO(J, 2)
> GPIO_ACTIVE_LOW>;
> +               };
> +       };
> +
>  	leds {
>  		compatible = "gpio-leds";
>  
> -- 
> 1.8.3.1

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

* Re: [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys
  2017-04-13 22:53     ` Andrew Jeffery
@ 2017-04-19  4:21       ` Brad Bishop
  0 siblings, 0 replies; 11+ messages in thread
From: Brad Bishop @ 2017-04-19  4:21 UTC (permalink / raw)
  To: Andrew Jeffery; +Cc: openbmc

Andrew

Thanks for looking.

> On Apr 13, 2017, at 6:53 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> Hi Brad,
> 
> On Fri, Apr 14, 2017, at 05:07, Brad Bishop wrote:
>> Enable gpio-keys events for the checkstop and water/air cooled
>> gpios for use by applications on the Witherspoon system.
>> 
>> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
>> ---
>> arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>> 
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
>> b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
>> index e3a7b77..4a68b30 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
>> @@ -31,6 +31,22 @@
>> 		};
>> 	};
>> 
>> +       gpio-keys {
>> +               compatible = "gpio-keys";
>> +
>> +               air-water {
>> +                       label = "air-water";
>> +                       gpios = <&gpio ASPEED_GPIO(B, 5)
>> GPIO_ACTIVE_LOW>;
>> +                       linux,code = <&gpio ASPEED_GPIO(B, 5)
>> GPIO_ACTIVE_LOW>;
> 
> This doesn't look right to me. linux,code doesn't appear to be anything
> more than a single value cell in the documentation: 
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/input/gpio-keys.txt?id=refs/tags/v4.11-rc6
> 
> I expect you just want the macro,  and not phandle or gpio flags. I was
> expecting to see:
> 
> linux,code = <ASPEED_GPIO(B, 5)>;

Agreed and fixed.

> 
> Is there a reason you've done it this way? Have you checked reading
> values from userspace gives the expected value?

No and No.  Busted.  I fully exercised v3 on a Palmetto ( I can’t easily control the state of these specific Witherspoon gpios ).

> 
> Andrew
> 
>> +               };
>> +
>> +               checkstop {
>> +                       label = "checkstop";
>> +                       gpios = <&gpio ASPEED_GPIO(J, 2)
>> GPIO_ACTIVE_LOW>;
>> +                       linux,code = <&gpio ASPEED_GPIO(J, 2)
>> GPIO_ACTIVE_LOW>;
>> +               };
>> +       };
>> +
>> 	leds {
>> 		compatible = "gpio-leds";
>> 
>> -- 
>> 1.8.3.1

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

end of thread, other threads:[~2017-04-19  4:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12  1:45 [PATCH linux dev-4.7 0/2] enable gpio-keys Brad Bishop
2017-04-12  1:45 ` [PATCH linux dev-4.7 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
2017-04-12  1:45 ` [PATCH linux dev-4.7 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
     [not found]   ` <1491970386.3829.5.camel@aj.id.au>
2017-04-12  4:17     ` Andrew Jeffery
2017-04-12  4:17 ` [PATCH linux dev-4.7 0/2] enable gpio-keys Joel Stanley
2017-04-13  3:59   ` Brad Bishop
2017-04-13 19:37 ` [PATCH linux dev-4.7 v2 " Brad Bishop
2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 1/2] ARM: configs: aspeed: Enable keyboard-gpio Brad Bishop
2017-04-13 19:37   ` [PATCH linux dev-4.7 v2 2/2] ARM: dts: Enable checkstop and cooling gpio keys Brad Bishop
2017-04-13 22:53     ` Andrew Jeffery
2017-04-19  4:21       ` Brad Bishop

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.