* [PATCH linux dev-4.10 v5] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
@ 2017-07-26 21:51 Christopher Bostic
2017-07-27 3:08 ` Joel Stanley
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Bostic @ 2017-07-26 21:51 UTC (permalink / raw)
To: joel; +Cc: Christopher Bostic, openbmc
Define gpio-keys-polled. Add pca-955x chip IO as GPIO source.
Polling period of 1 second determined to be the max acceptable
value based on discussions with Brad Bishop and Matt Spinler.
Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
---
v5 - Fix gpio-keys-polled driver probe errors. Missing pca955x
gpio cells property and wrong format for poll-interval.
v4 - Add details regarding polling period to commit message.
v3 - Remove 'autorepeat'
- Increase polling period to 1 second.
- Remove GPIO specifiers from pca955x in dev tree
v2 - Change 'linux,code' from a unique global value to a local one
for all the gpio-keys-polled devices.
---
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index d964901..22dbb91 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -56,6 +56,37 @@
};
};
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <1000>;
+
+ fan0-presence {
+ label = "fan0-presence";
+ gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
+ linux,code = <4>;
+ };
+
+ fan1-presence {
+ label = "fan1-presence";
+ gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
+ linux,code = <5>;
+ };
+
+ fan2-presence {
+ label = "fan2-presence";
+ gpios = <&pca0 6 GPIO_ACTIVE_LOW>;
+ linux,code = <6>;
+ };
+
+ fan3-presence {
+ label = "fan3-presence";
+ gpios = <&pca0 7 GPIO_ACTIVE_LOW>;
+ linux,code = <7>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
@@ -224,6 +255,7 @@
reg = <0x60>;
#address-cells = <1>;
#size-cells = <0>;
+ #gpio-cells = <2>;
fan0: led@0 {
label = "fan0";
--
1.8.2.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux dev-4.10 v5] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
2017-07-26 21:51 [PATCH linux dev-4.10 v5] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
@ 2017-07-27 3:08 ` Joel Stanley
0 siblings, 0 replies; 2+ messages in thread
From: Joel Stanley @ 2017-07-27 3:08 UTC (permalink / raw)
To: Christopher Bostic; +Cc: OpenBMC Maillist
On Thu, Jul 27, 2017 at 7:21 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
> Define gpio-keys-polled. Add pca-955x chip IO as GPIO source.
> Polling period of 1 second determined to be the max acceptable
> value based on discussions with Brad Bishop and Matt Spinler.
>
> Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
> ---
> v5 - Fix gpio-keys-polled driver probe errors. Missing pca955x
> gpio cells property and wrong format for poll-interval.
> v4 - Add details regarding polling period to commit message.
> v3 - Remove 'autorepeat'
> - Increase polling period to 1 second.
> - Remove GPIO specifiers from pca955x in dev tree
> v2 - Change 'linux,code' from a unique global value to a local one
> for all the gpio-keys-polled devices.
From off-list:
On Thu, Jul 27, 2017 at 11:41 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
>> Even after these probe fixes something more is needed. I tried a bunch
>> of stuff but I could not get the input subsys device created by
>> gpio-keys to work, for these gpios. I ran strace on my test app here:
>>
>> https://github.com/bradbishop/gpio-keys
>>
>> and it seems like I’m getting ENOENT back on one of the ioctls. Do you
>> have some
>> time to dig into this?
>
> I'll have a look at the ioctl issue.
>
> Thanks,
> Chris
I will hold off on merging this patch until it has been tested.
Cheers,
Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-27 3:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-26 21:51 [PATCH linux dev-4.10 v5] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
2017-07-27 3:08 ` Joel Stanley
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.