diff mbox

[linux,dev-4.7,2/2] ARM: dts: Enable checkstop and cooling gpio keys

Message ID 1491961541-10864-3-git-send-email-bradleyb@fuzziesquirrel.com
State Superseded, archived
Headers show

Commit Message

Brad Bishop April 12, 2017, 1:45 a.m. UTC
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(+)

Comments

Andrew Jeffery April 12, 2017, 4:17 a.m. UTC | #1
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
diff mbox

Patch

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";