devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight
@ 2024-12-06  3:14 Tzung-Bi Shih
  2024-12-06  3:14 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match Tzung-Bi Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2024-12-06  3:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, lee
  Cc: nfraprado, angelogioacchino.delregno, matthias.bgg, linux,
	devicetree, chrome-platform, linux-mediatek, bleung, groeck,
	tzungbi

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

-- 
2.47.0.338.g60cca15819-goog


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

* [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match
  2024-12-06  3:14 [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
@ 2024-12-06  3:14 ` Tzung-Bi Shih
  2024-12-06  3:14 ` [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight Tzung-Bi Shih
  2024-12-13  1:49 ` [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
  2 siblings, 0 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2024-12-06  3:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, lee
  Cc: nfraprado, angelogioacchino.delregno, matthias.bgg, linux,
	devicetree, chrome-platform, linux-mediatek, bleung, groeck,
	tzungbi

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.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
 .../platform/chrome/cros_kbd_led_backlight.c  | 62 ++++---------------
 1 file changed, 11 insertions(+), 51 deletions(-)

diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c
index 374de6dad4fa..fc27bd7fc4b9 100644
--- a/drivers/platform/chrome/cros_kbd_led_backlight.c
+++ b/drivers/platform/chrome/cros_kbd_led_backlight.c
@@ -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,
-- 
2.47.0.338.g60cca15819-goog


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

* [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
  2024-12-06  3:14 [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
  2024-12-06  3:14 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match Tzung-Bi Shih
@ 2024-12-06  3:14 ` Tzung-Bi Shih
  2024-12-10 23:01   ` Rob Herring (Arm)
  2024-12-11 11:11   ` Lee Jones
  2024-12-13  1:49 ` [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
  2 siblings, 2 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2024-12-06  3:14 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, lee
  Cc: nfraprado, angelogioacchino.delregno, matthias.bgg, linux,
	devicetree, chrome-platform, linux-mediatek, bleung, groeck,
	tzungbi

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 DT bindings.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
 .../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

diff --git a/Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml b/Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
deleted file mode 100644
index c94ab8f9e0b8..000000000000
--- a/Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml
+++ /dev/null
@@ -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 <tzungbi@kernel.org>
-
-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";
-        };
-      };
-    };
diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
index aac8819bd00b..50f457090066 100644
--- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
+++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
@@ -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#
 
-- 
2.47.0.338.g60cca15819-goog


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

* Re: [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
  2024-12-06  3:14 ` [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight Tzung-Bi Shih
@ 2024-12-10 23:01   ` Rob Herring (Arm)
  2024-12-11 11:11   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2024-12-10 23:01 UTC (permalink / raw)
  To: Tzung-Bi Shih
  Cc: conor+dt, linux, nfraprado, linux-mediatek, groeck, krzk+dt,
	matthias.bgg, chrome-platform, lee, angelogioacchino.delregno,
	bleung, devicetree


On Fri, 06 Dec 2024 03:14:05 +0000, Tzung-Bi Shih wrote:
> 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 DT bindings.
> 
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> ---
>  .../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
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


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

* Re: [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight
  2024-12-06  3:14 ` [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight Tzung-Bi Shih
  2024-12-10 23:01   ` Rob Herring (Arm)
@ 2024-12-11 11:11   ` Lee Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2024-12-11 11:11 UTC (permalink / raw)
  To: Tzung-Bi Shih
  Cc: robh, krzk+dt, conor+dt, nfraprado, angelogioacchino.delregno,
	matthias.bgg, linux, devicetree, chrome-platform, linux-mediatek,
	bleung, groeck

On Fri, 06 Dec 2024, Tzung-Bi Shih wrote:

> 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 DT bindings.
> 
> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> ---
>  .../chrome/google,cros-kbd-led-backlight.yaml | 36 -------------------
>  .../bindings/mfd/google,cros-ec.yaml          |  3 --

Acked-by: Lee Jones <lee@kernel.org>

>  2 files changed, 39 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/chrome/google,cros-kbd-led-backlight.yaml

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight
  2024-12-06  3:14 [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
  2024-12-06  3:14 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match Tzung-Bi Shih
  2024-12-06  3:14 ` [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight Tzung-Bi Shih
@ 2024-12-13  1:49 ` Tzung-Bi Shih
  2 siblings, 0 replies; 6+ messages in thread
From: Tzung-Bi Shih @ 2024-12-13  1:49 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, lee
  Cc: nfraprado, angelogioacchino.delregno, matthias.bgg, linux,
	devicetree, chrome-platform, linux-mediatek, bleung, groeck

On Fri, Dec 06, 2024 at 03:14:03AM +0000, Tzung-Bi Shih wrote:
> 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.
> 
> [...]

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: 770aed02a55a249362ba3c2e6c361107b02aae7b

Thanks!

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

end of thread, other threads:[~2024-12-13  1:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06  3:14 [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih
2024-12-06  3:14 ` [PATCH 1/2] platform/chrome: cros_kbd_led_backlight: Remove OF match Tzung-Bi Shih
2024-12-06  3:14 ` [PATCH 2/2] dt-bindings: cros-ec: Remove google,cros-kbd-led-backlight Tzung-Bi Shih
2024-12-10 23:01   ` Rob Herring (Arm)
2024-12-11 11:11   ` Lee Jones
2024-12-13  1:49 ` [PATCH 0/2] platform/chrome: Remove cros-kbd-led-backlight Tzung-Bi Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).