mfd: cros_ec_dev: Add gpio device and DT binding
cover 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(+)
[1] https://lore.kernel.org/r/[email protected]
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
Signature · 1 line
https://chromeos.dev
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.
--- Documentation/devicetree/bindings/mfd/google,cros-ec.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +7 -0
@@ -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";
Signature · 1 line
https://chromeos.dev
Re: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller
Quoted 19 lines · Stephen Boyd
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]>
Quoted 1 line
---
Best regards,
Krzysztof
Bartosz Golaszewski
AppliedRe: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller
In reply to Stephen BoydQuoted 50 lines · Stephen Boyd
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(+)Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +7
-1@@ -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"; --
Quoted 2 lines
Applied, thanks!
Bart
Lee Jones
maintainerRe: [PATCH 1/2] dt-bindings: cros-ec: Add properties for GPIO controller
Quoted 48 lines · Bartosz Golaszewski
Quoted 47 lines · Stephen Boyd
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(+)Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +7
-0@@ -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;
Quoted 7 lines
Quoted 5 lines
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +0
-1proximity { compatible = "google,cros-ec-mkbp-proximity"; --Applied, thanks!
Why are you applying this MFD patch?
Signature · 1 line
Lee Jones [李琼斯]
PATCH 2/2 mfd: cros_ec_dev: Add gpio device if feature present on EC
In reply to Stephen BoydThe 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.
--- drivers/mfd/cros_ec_dev.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/mfd/cros_ec_dev.c +9 -0
@@ -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,
Signature · 1 line
https://chromeos.dev
Quoted 10 lines · Stephen Boyd
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 [李琼斯]
This series was applied to chrome-platform/linux.git (for-kernelci) by Lee Jones <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-kernelci) by Lee Jones <[email protected]>:
Quoted 10 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
This series was applied to chrome-platform/linux.git (for-next) by Lee Jones <[email protected]>:
Hello:
This series was applied to chrome-platform/linux.git (for-next) by Lee Jones <[email protected]>:
Quoted 10 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html