platform/chrome: Remove cros-kbd-led-backlight
Subsystems (5)
Tzung-Bi Shih
maintainercover platform/chrome: Remove cros-kbd-led-backlight
After applying 4c03a44e2668 ("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added via drivers/mfd/cros_ec_dev.c by 970c3a6b7aa3 ("mfd: cros_ec: Register keyboard backlight subdevice").
The series removes the OF match and the DT bindings.
Tzung-Bi Shih (2):
platform/chrome: cros_kbd_led_backlight: Remove OF match
dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
.../chrome/google,cros-kbd-led-backlight.yaml | 36 ----------- .../bindings/mfd/google,cros-ec.yaml | 3 - .../platform/chrome/cros_kbd_led_backlight.c | 62 ++++--------------- 3 files changed, 11 insertions(+), 90 deletions(-) delete mode 100644 Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
Signature · 1 line
2.47.0.338.g60cca15819-goog
Tzung-Bi Shih
maintainerPATCH 1/2 platform/chrome: cros_kbd_led_backlight: Remove OF match
After applying 4c03a44e2668 ("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added via drivers/mfd/cros_ec_dev.c by 970c3a6b7aa3 ("mfd: cros_ec: Register keyboard backlight subdevice").
Remove the OF match.
--- .../platform/chrome/cros_kbd_led_backlight.c | 62 ++++--------------- 1 file changed, 11 insertions(+), 51 deletions(-)
drivers/platform/chrome/cros_kbd_led_backlight.c +11 -51
@@ -121,7 +121,17 @@ static const struct keyboard_led_drvdata keyboard_led_drvdata_acpi = {#endif /* CONFIG_ACPI */ -#if IS_ENABLED (CONFIG_CROS_EC ) +#if IS_ENABLED (CONFIG_MFD_CROS_EC_DEV ) +static int keyboard_led_init_ec_pwm_mfd (struct platform_device *pdev) +{ +struct cros_ec_dev *ec_dev =dev_get_drvdata (pdev->dev.parent); +struct cros_ec_device *cros_ec = ec_dev->ec_dev; +struct keyboard_led *keyboard_led =platform_get_drvdata (pdev); + + keyboard_led->ec = cros_ec; + +return 0 ; +} static int keyboard_led_set_brightness_ec_pwm(struct led_classdev *cdev,
@@ -169,44 +179,6 @@ keyboard_led_get_brightness_ec_pwm(struct led_classdev *cdev)return resp->percent; } -static int keyboard_led_init_ec_pwm (struct platform_device *pdev) -{ -struct keyboard_led *keyboard_led =platform_get_drvdata (pdev); - - keyboard_led->ec =dev_get_drvdata (pdev->dev.parent); -if (!keyboard_led->ec) { -dev_err (&pdev->dev,"no parent EC device\n" ); -return -EINVAL ; - } - -return 0 ; -} - -static const __maybe_unused struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = { - .init = keyboard_led_init_ec_pwm, - .brightness_set_blocking = keyboard_led_set_brightness_ec_pwm, - .brightness_get = keyboard_led_get_brightness_ec_pwm, - .max_brightness =KEYBOARD_BACKLIGHT_MAX , -}; - -#else /* IS_ENABLED(CONFIG_CROS_EC) */ - -static const __maybe_unused struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = {}; - -#endif /* IS_ENABLED(CONFIG_CROS_EC) */ - -#if IS_ENABLED (CONFIG_MFD_CROS_EC_DEV ) -static int keyboard_led_init_ec_pwm_mfd (struct platform_device *pdev) -{ -struct cros_ec_dev *ec_dev =dev_get_drvdata (pdev->dev.parent); -struct cros_ec_device *cros_ec = ec_dev->ec_dev; -struct keyboard_led *keyboard_led =platform_get_drvdata (pdev); - - keyboard_led->ec = cros_ec; - -return 0 ; -} -static const struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm_mfd = { .init = keyboard_led_init_ec_pwm_mfd, .brightness_set_blocking = keyboard_led_set_brightness_ec_pwm,
@@ -270,17 +242,6 @@ static const struct acpi_device_id keyboard_led_acpi_match[] = {MODULE_DEVICE_TABLE (acpi, keyboard_led_acpi_match);#endif -#ifdef CONFIG_OF -static const struct of_device_id keyboard_led_of_match[] = { - { - .compatible ="google,cros-kbd-led-backlight" , - .data = &keyboard_led_drvdata_ec_pwm, - }, - {} -}; -MODULE_DEVICE_TABLE (of, keyboard_led_of_match); -#endif -static const struct platform_device_id keyboard_led_id[] = { {"cros-keyboard-leds" ,0 }, {}
@@ -291,7 +252,6 @@ static struct platform_driver keyboard_led_driver = { .driver = { .name = "cros-keyboard-leds", .acpi_match_table = ACPI_PTR(keyboard_led_acpi_match), - .of_match_table = of_match_ptr(keyboard_led_of_match), }, .probe = keyboard_led_probe, .id_table = keyboard_led_id,
Signature · 1 line
2.47.0.338.g60cca15819-goog
Tzung-Bi Shih
maintainerPATCH 2/2 dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
In reply to Tzung-Bi ShihAfter applying 4c03a44e2668 ("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added via drivers/mfd/cros_ec_dev.c by 970c3a6b7aa3 ("mfd: cros_ec: Register keyboard backlight subdevice").
Remove the DT bindings.
--- .../chrome/google,cros-kbd-led-backlight.yaml | 36 ------------------- .../bindings/mfd/google,cros-ec.yaml | 3 -- 2 files changed, 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml deleted +0 -36
@@ -1,36 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/chrome/google,cros-kbd-led-backlight.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: ChromeOS keyboard backlight LED driver. - -maintainers: - - Tzung-Bi Shih <[email protected]> - -properties: - compatible: - const: google,cros-kbd-led-backlight - -required: - - compatible - -additionalProperties: false - -examples: - - | - spi { - #address-cells = <1>; - #size-cells = <0>; - - cros_ec: ec@0 { - compatible = "google,cros-ec-spi"; - reg = <0>; - interrupts = <15 0>; - - kbd-led-backlight { - compatible = "google,cros-kbd-led-backlight"; - }; - }; - };
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +0 -3
@@ -108,9 +108,6 @@ properties: pwm: $ref: /schemas/pwm/google,cros-ec-pwm.yaml# - kbd-led-backlight: - $ref: /schemas/chrome/google,cros-kbd-led-backlight.yaml# - keyboard-controller: $ref: /schemas/input/google,cros-ec-keyb.yaml#
Signature · 1 line
2.47.0.338.g60cca15819-goog
Re: [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
Quoted 5 lines · Tzung-Bi Shih
After applying
4c03a44e2668("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added viadrivers/mfd/cros_ec_dev.cby970c3a6b7aa3("mfd:cros_ec: Register keyboard backlight subdevice").
Quoted 9 lines
Remove the DT bindings.
Signed-off-by Tzung-Bi Shih <[email protected]>--- .../chrome/google,cros-kbd-led-backlight.yaml | 36 ------------------- .../bindings/mfd/google,cros-ec.yaml | 3 -- 2 files changed, 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
Re: [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
In reply to Tzung-Bi ShihQuoted 11 lines · Tzung-Bi Shih
After applying
4c03a44e2668("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added viadrivers/mfd/cros_ec_dev.cby970c3a6b7aa3("mfd:cros_ec: Register keyboard backlight subdevice").Remove the DT bindings.
Signed-off-by Tzung-Bi Shih <[email protected]>--- .../chrome/google,cros-kbd-led-backlight.yaml | 36 ------------------- .../bindings/mfd/google,cros-ec.yaml | 3 --
Quoted 2 lines
2 files changed, 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
Signature · 1 line
Lee Jones [李琼斯]
Tzung-Bi Shih
maintainerQuoted 8 lines · Tzung-Bi Shih
After applying
4c03a44e2668("arm64: dts: mediatek: mt8195-cherry: Remove keyboard-backlight node"), there are no users for using the OF match. Instead, the device is added viadrivers/mfd/cros_ec_dev.cby970c3a6b7aa3("mfd:cros_ec: Register keyboard backlight subdevice").The series removes the OF match and the DT bindings.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match
commit: c42951620dd473835f653ec5e127c8f284f4381b
[2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
commit: 770aed02a55a249362ba3c2e6c361107b02aae7bThanks!