2024-02-19 20:23:44

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 0/2] mfd: cros_ec_dev: Add gpio device and DT binding

This is the mfd part of a larger series[1] that describes the USB
topology on ARM based chromebooks. These two patches add the gpio device
and DT bindings when the GPIO feature is present. The gpio driver will
be sent separately.

Stephen Boyd (2):
dt-bindings: cros-ec: Add properties for GPIO controller
mfd: cros_ec_dev: Add gpio device if feature present on EC

.../devicetree/bindings/mfd/google,cros-ec.yaml | 7 +++++++
drivers/mfd/cros_ec_dev.c | 9 +++++++++
2 files changed, 16 insertions(+)

Cc: Bartosz Golaszewski <[email protected]>
Cc: Benson Leung <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Rob Herring <[email protected]>

[1] https://lore.kernel.org/r/[email protected]

base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
--
https://chromeos.dev



2024-02-19 20:24:10

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller

The ChromeOS embedded controller (EC) supports setting the state of
GPIOs when the system is unlocked, and getting the state of GPIOs in all
cases. The GPIOs are on the EC itself, so the EC acts similar to a GPIO
expander. Add the #gpio-cells and gpio-controller properties to the
cros-ec binding so that other devices described in DT can get the GPIOs
on the EC.

Cc: Linus Walleij <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Benson Leung <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Pin-yen Lin <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
index e1ca4f297c6d..aac8819bd00b 100644
--- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
+++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
@@ -93,6 +93,11 @@ properties:
'#size-cells':
const: 0

+ '#gpio-cells':
+ const: 2
+
+ gpio-controller: true
+
typec:
$ref: /schemas/chrome/google,cros-ec-typec.yaml#

@@ -275,6 +280,8 @@ examples:
interrupts = <99 0>;
interrupt-parent = <&gpio7>;
spi-max-frequency = <5000000>;
+ #gpio-cells = <2>;
+ gpio-controller;

proximity {
compatible = "google,cros-ec-mkbp-proximity";
--
https://chromeos.dev


2024-02-19 20:24:27

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 2/2] mfd: cros_ec_dev: Add gpio device if feature present on EC

The ChromeOS embedded controller (EC) supports setting the state of
GPIOs when the system is unlocked, and getting the state of GPIOs in all
cases. Check for the feature support by checking for the GPIO feature
and then populate a sub-device for the gpio hardware on the EC.

Cc: Lee Jones <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: Benson Leung <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: <[email protected]>
Cc: Pin-yen Lin <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/mfd/cros_ec_dev.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 603b1cd52785..9c3f8488b416 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -74,6 +74,10 @@ static const struct mfd_cell cros_ec_cec_cells[] = {
{ .name = "cros-ec-cec", },
};

+static const struct mfd_cell cros_ec_gpio_cells[] = {
+ { .name = "cros-ec-gpio", },
+};
+
static const struct mfd_cell cros_ec_rtc_cells[] = {
{ .name = "cros-ec-rtc", },
};
@@ -97,6 +101,11 @@ static const struct cros_feature_to_cells cros_subdevices[] = {
.mfd_cells = cros_ec_cec_cells,
.num_cells = ARRAY_SIZE(cros_ec_cec_cells),
},
+ {
+ .id = EC_FEATURE_GPIO,
+ .mfd_cells = cros_ec_gpio_cells,
+ .num_cells = ARRAY_SIZE(cros_ec_gpio_cells),
+ },
{
.id = EC_FEATURE_RTC,
.mfd_cells = cros_ec_rtc_cells,
--
https://chromeos.dev


2024-02-20 08:31:02

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller

On 19/02/2024 21:23, Stephen Boyd wrote:
> The ChromeOS embedded controller (EC) supports setting the state of
> GPIOs when the system is unlocked, and getting the state of GPIOs in all
> cases. The GPIOs are on the EC itself, so the EC acts similar to a GPIO
> expander. Add the #gpio-cells and gpio-controller properties to the
> cros-ec binding so that other devices described in DT can get the GPIOs
> on the EC.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Bartosz Golaszewski <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
> Cc: Conor Dooley <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Benson Leung <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: Pin-yen Lin <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof


2024-02-20 11:47:20

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller

On Mon, Feb 19, 2024 at 9:23 PM Stephen Boyd <[email protected]> wrote:
>
> The ChromeOS embedded controller (EC) supports setting the state of
> GPIOs when the system is unlocked, and getting the state of GPIOs in all
> cases. The GPIOs are on the EC itself, so the EC acts similar to a GPIO
> expander. Add the #gpio-cells and gpio-controller properties to the
> cros-ec binding so that other devices described in DT can get the GPIOs
> on the EC.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Bartosz Golaszewski <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
> Cc: Conor Dooley <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Benson Leung <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: Pin-yen Lin <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> index e1ca4f297c6d..aac8819bd00b 100644
> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> @@ -93,6 +93,11 @@ properties:
> '#size-cells':
> const: 0
>
> + '#gpio-cells':
> + const: 2
> +
> + gpio-controller: true
> +
> typec:
> $ref: /schemas/chrome/google,cros-ec-typec.yaml#
>
> @@ -275,6 +280,8 @@ examples:
> interrupts = <99 0>;
> interrupt-parent = <&gpio7>;
> spi-max-frequency = <5000000>;
> + #gpio-cells = <2>;
> + gpio-controller;
>
> proximity {
> compatible = "google,cros-ec-mkbp-proximity";
> --
> https://chromeos.dev
>

Applied, thanks!

Bart

2024-02-23 10:37:44

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller

On Tue, 20 Feb 2024, Bartosz Golaszewski wrote:

> On Mon, Feb 19, 2024 at 9:23 PM Stephen Boyd <[email protected]> wrote:
> >
> > The ChromeOS embedded controller (EC) supports setting the state of
> > GPIOs when the system is unlocked, and getting the state of GPIOs in all
> > cases. The GPIOs are on the EC itself, so the EC acts similar to a GPIO
> > expander. Add the #gpio-cells and gpio-controller properties to the
> > cros-ec binding so that other devices described in DT can get the GPIOs
> > on the EC.
> >
> > Cc: Linus Walleij <[email protected]>
> > Cc: Bartosz Golaszewski <[email protected]>
> > Cc: Rob Herring <[email protected]>
> > Cc: Krzysztof Kozlowski <[email protected]>
> > Cc: Conor Dooley <[email protected]>
> > Cc: Lee Jones <[email protected]>
> > Cc: Benson Leung <[email protected]>
> > Cc: Guenter Roeck <[email protected]>
> > Cc: <[email protected]>
> > Cc: <[email protected]>
> > Cc: Pin-yen Lin <[email protected]>
> > Signed-off-by: Stephen Boyd <[email protected]>
> > ---
> > Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > index e1ca4f297c6d..aac8819bd00b 100644
> > --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > @@ -93,6 +93,11 @@ properties:
> > '#size-cells':
> > const: 0
> >
> > + '#gpio-cells':
> > + const: 2
> > +
> > + gpio-controller: true
> > +
> > typec:
> > $ref: /schemas/chrome/google,cros-ec-typec.yaml#
> >
> > @@ -275,6 +280,8 @@ examples:
> > interrupts = <99 0>;
> > interrupt-parent = <&gpio7>;
> > spi-max-frequency = <5000000>;
> > + #gpio-cells = <2>;
> > + gpio-controller;
> >
> > proximity {
> > compatible = "google,cros-ec-mkbp-proximity";
> > --
> > https://chromeos.dev
> >
>
> Applied, thanks!

Why are you applying this MFD patch?

--
Lee Jones [李琼斯]

2024-02-23 17:08:52

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 0/2] mfd: cros_ec_dev: Add gpio device and DT binding

On Mon, 19 Feb 2024 12:23:22 -0800, Stephen Boyd wrote:
> This is the mfd part of a larger series[1] that describes the USB
> topology on ARM based chromebooks. These two patches add the gpio device
> and DT bindings when the GPIO feature is present. The gpio driver will
> be sent separately.
>
> Stephen Boyd (2):
> dt-bindings: cros-ec: Add properties for GPIO controller
> mfd: cros_ec_dev: Add gpio device if feature present on EC
>
> [...]

Applied, thanks!

[1/2] dt-bindings: cros-ec: Add properties for GPIO controller
commit: 365ea466d6aa5c8618e096141d72c48fb5707ee4
[2/2] mfd: cros_ec_dev: Add gpio device if feature present on EC
commit: 1fe6dcba7bcf0dbd53be0c7ea009524c4c44447b

--
Lee Jones [李琼斯]


Subject: Re: [PATCH 0/2] mfd: cros_ec_dev: Add gpio device and DT binding

Hello:

This series was applied to chrome-platform/linux.git (for-kernelci)
by Lee Jones <[email protected]>:

On Mon, 19 Feb 2024 12:23:22 -0800 you wrote:
> This is the mfd part of a larger series[1] that describes the USB
> topology on ARM based chromebooks. These two patches add the gpio device
> and DT bindings when the GPIO feature is present. The gpio driver will
> be sent separately.
>
> Stephen Boyd (2):
> dt-bindings: cros-ec: Add properties for GPIO controller
> mfd: cros_ec_dev: Add gpio device if feature present on EC
>
> [...]

Here is the summary with links:
- [1/2] dt-bindings: cros-ec: Add properties for GPIO controller
https://git.kernel.org/chrome-platform/c/7b79740d42e7
- [2/2] mfd: cros_ec_dev: Add gpio device if feature present on EC
https://git.kernel.org/chrome-platform/c/8f49b623b934

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



Subject: Re: [PATCH 0/2] mfd: cros_ec_dev: Add gpio device and DT binding

Hello:

This series was applied to chrome-platform/linux.git (for-next)
by Lee Jones <[email protected]>:

On Mon, 19 Feb 2024 12:23:22 -0800 you wrote:
> This is the mfd part of a larger series[1] that describes the USB
> topology on ARM based chromebooks. These two patches add the gpio device
> and DT bindings when the GPIO feature is present. The gpio driver will
> be sent separately.
>
> Stephen Boyd (2):
> dt-bindings: cros-ec: Add properties for GPIO controller
> mfd: cros_ec_dev: Add gpio device if feature present on EC
>
> [...]

Here is the summary with links:
- [1/2] dt-bindings: cros-ec: Add properties for GPIO controller
https://git.kernel.org/chrome-platform/c/7b79740d42e7
- [2/2] mfd: cros_ec_dev: Add gpio device if feature present on EC
https://git.kernel.org/chrome-platform/c/8f49b623b934

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html