All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add GPIO keys polled for pca955x
@ 2017-07-18 20:43 Christopher Bostic
  2017-07-18 20:43 ` [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
  2017-07-18 20:43 ` [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED Christopher Bostic
  0 siblings, 2 replies; 7+ messages in thread
From: Christopher Bostic @ 2017-07-18 20:43 UTC (permalink / raw)
  To: joel; +Cc: Christopher Bostic, openbmc

Define gpio keys polled devices in the device tree for fan presence lines off of
the pca955x. Enable GPIO keys polled config option.

Christopher Bostic (2):
  ARM: dts: aspeed: Add gpio-keys-polled for fan presence
  ARM: configs: aspeed: Add GPIO_KEYS_POLLED

 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 34 ++++++++++++++++++++++++
 arch/arm/configs/aspeed_g5_defconfig             | 1 +
 2 files changed, 35 insertions(+)

-- 
1.8.2.2

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

* [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
  2017-07-18 20:43 [PATCH v2 0/2] Add GPIO keys polled for pca955x Christopher Bostic
@ 2017-07-18 20:43 ` Christopher Bostic
  2017-07-19  9:28   ` Joel Stanley
  2017-07-18 20:43 ` [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED Christopher Bostic
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Bostic @ 2017-07-18 20:43 UTC (permalink / raw)
  To: joel; +Cc: Christopher Bostic, openbmc

Define gpio-keys-polled.  Add pca-955x chip IO as GPIO source.

Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
---
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 | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index 34c5dfc..f574d7b3 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -62,6 +62,38 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		#poll-interval = <100>;
+		autorepeat;
+
+		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 +256,8 @@
 		reg = <0x60>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		gpio-controller;
+		#gpio-cells = <2>;
 
 		fan0: led@0 {
 			label = "fan0";
-- 
1.8.2.2

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

* [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED
  2017-07-18 20:43 [PATCH v2 0/2] Add GPIO keys polled for pca955x Christopher Bostic
  2017-07-18 20:43 ` [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
@ 2017-07-18 20:43 ` Christopher Bostic
  2017-07-19  9:41   ` Joel Stanley
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Bostic @ 2017-07-18 20:43 UTC (permalink / raw)
  To: joel; +Cc: Christopher Bostic, openbmc

Configure to build gpio_keys_polled device driver.

Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/configs/aspeed_g5_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
index ad121ed..1868442 100644
--- a/arch/arm/configs/aspeed_g5_defconfig
+++ b/arch/arm/configs/aspeed_g5_defconfig
@@ -106,6 +106,7 @@ CONFIG_REALTEK_PHY=y
 CONFIG_INPUT_EVDEV=y
 # CONFIG_KEYBOARD_ATKBD is not set
 CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_GPIO_POLLED=y
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
-- 
1.8.2.2

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

* Re: [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
  2017-07-18 20:43 ` [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
@ 2017-07-19  9:28   ` Joel Stanley
  2017-07-19 15:54     ` Christopher Bostic
  0 siblings, 1 reply; 7+ messages in thread
From: Joel Stanley @ 2017-07-19  9:28 UTC (permalink / raw)
  To: Christopher Bostic; +Cc: OpenBMC Maillist

On Wed, Jul 19, 2017 at 6:13 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
>
> +       gpio-keys-polled {
> +               compatible = "gpio-keys-polled";
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               #poll-interval = <100>;

Are you sure that this needs to be polled this often?

We should consider how much traffic this generates on the bus (how
often it is contended), and how that fits in with other devices on
that master. If you've done these calculations then please amend your
commit message with that information.

> +               autorepeat;

None of the other gpio-keys nodes have this set. Can you expand your
commit message to explain why you set this please.

> @@ -224,6 +256,8 @@
>                 reg = <0x60>;
>                 #address-cells = <1>;
>                 #size-cells = <0>;
> +               gpio-controller;
> +               #gpio-cells = <2>;

This appears to be an unrelated change?

Cheers,

Joel

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

* Re: [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED
  2017-07-18 20:43 ` [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED Christopher Bostic
@ 2017-07-19  9:41   ` Joel Stanley
  0 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2017-07-19  9:41 UTC (permalink / raw)
  To: Christopher Bostic; +Cc: OpenBMC Maillist

On Wed, Jul 19, 2017 at 6:13 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
> Configure to build gpio_keys_polled device driver.
>
> Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

Applied to dev-4.10.

Cheers,

Joel

> ---
>  arch/arm/configs/aspeed_g5_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig
> index ad121ed..1868442 100644
> --- a/arch/arm/configs/aspeed_g5_defconfig
> +++ b/arch/arm/configs/aspeed_g5_defconfig
> @@ -106,6 +106,7 @@ CONFIG_REALTEK_PHY=y
>  CONFIG_INPUT_EVDEV=y
>  # CONFIG_KEYBOARD_ATKBD is not set
>  CONFIG_KEYBOARD_GPIO=y
> +CONFIG_KEYBOARD_GPIO_POLLED=y
>  # CONFIG_INPUT_MOUSE is not set
>  # CONFIG_SERIO is not set
>  # CONFIG_VT is not set
> --
> 1.8.2.2
>

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

* Re: [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
  2017-07-19  9:28   ` Joel Stanley
@ 2017-07-19 15:54     ` Christopher Bostic
  2017-07-20  3:53       ` Joel Stanley
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Bostic @ 2017-07-19 15:54 UTC (permalink / raw)
  To: Joel Stanley; +Cc: OpenBMC Maillist



On 7/19/17 4:28 AM, Joel Stanley wrote:
> On Wed, Jul 19, 2017 at 6:13 AM, Christopher Bostic
> <cbostic@linux.vnet.ibm.com> wrote:
>> +       gpio-keys-polled {
>> +               compatible = "gpio-keys-polled";
>> +               #address-cells = <1>;
>> +               #size-cells = <0>;
>> +               #poll-interval = <100>;
> Are you sure that this needs to be polled this often?
>
> We should consider how much traffic this generates on the bus (how
> often it is contended), and how that fits in with other devices on
> that master. If you've done these calculations then please amend your
> commit message with that information.
Discussed with Brad Bishop and Matt Spinler - agreed to increase period 
to 1 second.

>
>> +               autorepeat;
> None of the other gpio-keys nodes have this set. Can you expand your
> commit message to explain why you set this please.

This isn't necessary.  Will remove.

>> @@ -224,6 +256,8 @@
>>                  reg = <0x60>;
>>                  #address-cells = <1>;
>>                  #size-cells = <0>;
>> +               gpio-controller;
>> +               #gpio-cells = <2>;

Will remove.

Thanks,
Chris
> This appears to be an unrelated change?
>
> Cheers,
>
> Joel
>

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

* Re: [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence
  2017-07-19 15:54     ` Christopher Bostic
@ 2017-07-20  3:53       ` Joel Stanley
  0 siblings, 0 replies; 7+ messages in thread
From: Joel Stanley @ 2017-07-20  3:53 UTC (permalink / raw)
  To: Christopher Bostic; +Cc: OpenBMC Maillist

On Thu, Jul 20, 2017 at 1:24 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
>
>
> On 7/19/17 4:28 AM, Joel Stanley wrote:
>>
>> On Wed, Jul 19, 2017 at 6:13 AM, Christopher Bostic
>> <cbostic@linux.vnet.ibm.com> wrote:
>>>
>>> +       gpio-keys-polled {
>>> +               compatible = "gpio-keys-polled";
>>> +               #address-cells = <1>;
>>> +               #size-cells = <0>;
>>> +               #poll-interval = <100>;
>>
>> Are you sure that this needs to be polled this often?
>>
>> We should consider how much traffic this generates on the bus (how
>> often it is contended), and how that fits in with other devices on
>> that master. If you've done these calculations then please amend your
>> commit message with that information.
>
> Discussed with Brad Bishop and Matt Spinler - agreed to increase period to 1
> second.

Okay. You forgot to add this to the commit message.

Cheers,

Joel

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

end of thread, other threads:[~2017-07-20  3:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 20:43 [PATCH v2 0/2] Add GPIO keys polled for pca955x Christopher Bostic
2017-07-18 20:43 ` [PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence Christopher Bostic
2017-07-19  9:28   ` Joel Stanley
2017-07-19 15:54     ` Christopher Bostic
2017-07-20  3:53       ` Joel Stanley
2017-07-18 20:43 ` [PATCH v2 2/2] ARM: configs: aspeed: Add GPIO_KEYS_POLLED Christopher Bostic
2017-07-19  9:41   ` 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.