* [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
@ 2024-05-26 18:17 Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 1/4] leds: class: warn about name collisions earlier Thomas Weißschuh
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-26 18:17 UTC (permalink / raw)
To: Lee Jones, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
Pavel Machek
Cc: chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe, Thomas Weißschuh
Extend the cros_ec MFD device to also load cros_kbd_led_backlight
when the EC reports EC_FEATURE_PWM_KEYB.
As the driver can now be probed multiple times, some preparation in the
LED core is necessary to avoid name collisions.
Patch 1 is a general cleanup for the LED core.
Patch 2 modifies the LED core to skip the default collision handling.
Patch 3 adds the new probing logic to cros_kbd_led_backlight.
Patch 4 wires up the driver to the cros_ec mfd devices.
The helper keyboard_led_is_mfd_device is a bit iffy.
But using match data doesn't work.
* driver_data from platform_device_id is overwritten by the mfd platform data
* Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
internals of cros_kbd_led_backlight
Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
To: Lee Jones <lee@kernel.org>
To: Benson Leung <bleung@chromium.org>
To: Guenter Roeck <groeck@chromium.org>
To: Tzung-Bi Shih <tzungbi@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: chrome-platform@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Cc: Dustin Howett <dustin@howett.net>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: linux-leds@vger.kernel.org
Cc: Rajas Paranjpe <paranjperajas@gmail.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Changes in v3:
- Avoid probing multiple times (Confirmed by Rajas)
- Add Kconfig dependency on MFD_CROS_EC_DEV
- Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
Changes in v2:
- Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
- Split out mfd registration into own commit (Lee)
- Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
- Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
---
Thomas Weißschuh (4):
leds: class: warn about name collisions earlier
leds: add flag to avoid automatic renaming of led devices
platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
mfd: cros_ec: Register keyboard backlight subdevice
drivers/leds/led-class.c | 9 +++---
drivers/mfd/cros_ec_dev.c | 9 ++++++
drivers/platform/chrome/Kconfig | 2 +-
drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
include/linux/leds.h | 1 +
5 files changed, 54 insertions(+), 7 deletions(-)
---
base-commit: 6fbf71854e2ddea7c99397772fbbb3783bfe15b5
change-id: 20240505-cros_ec-kbd-led-framework-7e2e831bc79c
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 1/4] leds: class: warn about name collisions earlier
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
@ 2024-05-26 18:17 ` Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 2/4] leds: add flag to avoid automatic renaming of led devices Thomas Weißschuh
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-26 18:17 UTC (permalink / raw)
To: Lee Jones, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
Pavel Machek
Cc: chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe, Thomas Weißschuh
Other warnings refer to the name after renaming, which is clearer when
that name is mentioned first.
It is also clearer where "ret" comes from.
While at it, also add the necessary newline to the message and fix the
parameter alignment.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/leds/led-class.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 24fcff682b24..c298355d5b7d 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -503,6 +503,9 @@ int led_classdev_register_ext(struct device *parent,
ret = led_classdev_next_name(proposed_name, final_name, sizeof(final_name));
if (ret < 0)
return ret;
+ else if (ret)
+ dev_warn(parent, "Led %s renamed to %s due to name collision\n",
+ proposed_name, final_name);
if (led_cdev->color >= LED_COLOR_ID_MAX)
dev_warn(parent, "LED %s color identifier out of range\n", final_name);
@@ -518,10 +521,6 @@ int led_classdev_register_ext(struct device *parent,
if (init_data && init_data->fwnode)
device_set_node(led_cdev->dev, init_data->fwnode);
- if (ret)
- dev_warn(parent, "Led %s renamed to %s due to name collision",
- proposed_name, dev_name(led_cdev->dev));
-
if (led_cdev->flags & LED_BRIGHT_HW_CHANGED) {
ret = led_add_brightness_hw_changed(led_cdev);
if (ret) {
--
2.45.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 2/4] leds: add flag to avoid automatic renaming of led devices
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 1/4] leds: class: warn about name collisions earlier Thomas Weißschuh
@ 2024-05-26 18:17 ` Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device Thomas Weißschuh
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-26 18:17 UTC (permalink / raw)
To: Lee Jones, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
Pavel Machek
Cc: chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe, Thomas Weißschuh
Add a mechanism for drivers to opt-out of the automatic device renaming
on conflicts.
Those drivers will provide their own conflict resolution.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/leds/led-class.c | 2 ++
include/linux/leds.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index c298355d5b7d..2f08c20702f3 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -503,6 +503,8 @@ int led_classdev_register_ext(struct device *parent,
ret = led_classdev_next_name(proposed_name, final_name, sizeof(final_name));
if (ret < 0)
return ret;
+ else if (ret && led_cdev->flags & LED_REJECT_NAME_CONFLICT)
+ return -EEXIST;
else if (ret)
dev_warn(parent, "Led %s renamed to %s due to name collision\n",
proposed_name, final_name);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 6300313c46b7..36663ac6c58a 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -107,6 +107,7 @@ struct led_classdev {
#define LED_BRIGHT_HW_CHANGED BIT(21)
#define LED_RETAIN_AT_SHUTDOWN BIT(22)
#define LED_INIT_DEFAULT_TRIGGER BIT(23)
+#define LED_REJECT_NAME_CONFLICT BIT(24)
/* set_brightness_work / blink_timer flags, atomic, private. */
unsigned long work_flags;
--
2.45.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 1/4] leds: class: warn about name collisions earlier Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 2/4] leds: add flag to avoid automatic renaming of led devices Thomas Weißschuh
@ 2024-05-26 18:17 ` Thomas Weißschuh
2024-05-28 5:37 ` Tzung-Bi Shih
2024-06-03 1:57 ` Tzung-Bi Shih
2024-05-26 18:17 ` [PATCH v3 4/4] mfd: cros_ec: Register keyboard backlight subdevice Thomas Weißschuh
` (2 subsequent siblings)
5 siblings, 2 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-26 18:17 UTC (permalink / raw)
To: Lee Jones, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
Pavel Machek
Cc: chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe, Thomas Weißschuh
The ChromeOS EC used in Framework laptops supports the standard CrOS EC
keyboard backlight protocol.
However the firmware on these laptops doesn't implement the ACPI ID
GOOG0002 that is recognized by cros_kbd_led_backlight and they also
don't use device tree.
Prepare the existing cros_kbd_led_backlight driver to be probed through
the CrOS EC mfd device which works without ACPI or OF support.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
drivers/platform/chrome/Kconfig | 2 +-
drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index 073616b5b5a0..7dbeb786352a 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -150,7 +150,7 @@ config CROS_EC_PROTO
config CROS_KBD_LED_BACKLIGHT
tristate "Backlight LED support for Chrome OS keyboards"
- depends on LEDS_CLASS && (ACPI || CROS_EC)
+ depends on LEDS_CLASS && (ACPI || CROS_EC || MFD_CROS_EC_DEV)
help
This option enables support for the keyboard backlight LEDs on
select Chrome OS systems.
diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c
index b83e4f328620..78097c8a4966 100644
--- a/drivers/platform/chrome/cros_kbd_led_backlight.c
+++ b/drivers/platform/chrome/cros_kbd_led_backlight.c
@@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/leds.h>
+#include <linux/mfd/core.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -194,13 +195,46 @@ static const __maybe_unused struct keyboard_led_drvdata keyboard_led_drvdata_ec_
#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,
+ .brightness_get = keyboard_led_get_brightness_ec_pwm,
+ .max_brightness = KEYBOARD_BACKLIGHT_MAX,
+};
+
+#else /* IS_ENABLED(CONFIG_MFD_CROS_EC_DEV) */
+
+static const struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm_mfd = {};
+
+#endif /* IS_ENABLED(CONFIG_MFD_CROS_EC_DEV) */
+
+static int keyboard_led_is_mfd_device(struct platform_device *pdev)
+{
+ return IS_ENABLED(CONFIG_MFD_CROS_EC_DEV) && mfd_get_cell(pdev);
+}
+
static int keyboard_led_probe(struct platform_device *pdev)
{
const struct keyboard_led_drvdata *drvdata;
struct keyboard_led *keyboard_led;
int error;
- drvdata = device_get_match_data(&pdev->dev);
+ if (keyboard_led_is_mfd_device(pdev))
+ drvdata = &keyboard_led_drvdata_ec_pwm_mfd;
+ else
+ drvdata = device_get_match_data(&pdev->dev);
if (!drvdata)
return -EINVAL;
@@ -216,13 +250,15 @@ static int keyboard_led_probe(struct platform_device *pdev)
}
keyboard_led->cdev.name = "chromeos::kbd_backlight";
- keyboard_led->cdev.flags |= LED_CORE_SUSPENDRESUME;
+ keyboard_led->cdev.flags |= LED_CORE_SUSPENDRESUME | LED_REJECT_NAME_CONFLICT;
keyboard_led->cdev.max_brightness = drvdata->max_brightness;
keyboard_led->cdev.brightness_set = drvdata->brightness_set;
keyboard_led->cdev.brightness_set_blocking = drvdata->brightness_set_blocking;
keyboard_led->cdev.brightness_get = drvdata->brightness_get;
error = devm_led_classdev_register(&pdev->dev, &keyboard_led->cdev);
+ if (error == -EEXIST) /* Already bound via other mechanism */
+ return -ENODEV;
if (error)
return error;
--
2.45.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 4/4] mfd: cros_ec: Register keyboard backlight subdevice
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
` (2 preceding siblings ...)
2024-05-26 18:17 ` [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device Thomas Weißschuh
@ 2024-05-26 18:17 ` Thomas Weißschuh
2024-05-31 15:35 ` [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Lee Jones
2024-07-09 9:25 ` [GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window[GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window Lee Jones
5 siblings, 0 replies; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-26 18:17 UTC (permalink / raw)
To: Lee Jones, Benson Leung, Guenter Roeck, Tzung-Bi Shih,
Pavel Machek
Cc: chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe, Thomas Weißschuh
Load cros_kbd_led_backlight when the EC reports EC_FEATURE_PWM_KEYB.
This makes cros_kbd_led_backlight work on machines without specific
ACPI or OF support for the keyboard backlight.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
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 a52d59cc2b1e..4444b361aeae 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -99,6 +99,10 @@ static const struct mfd_cell cros_ec_wdt_cells[] = {
{ .name = "cros-ec-wdt", }
};
+static const struct mfd_cell cros_ec_keyboard_leds_cells[] = {
+ { .name = "cros-keyboard-leds", },
+};
+
static const struct cros_feature_to_cells cros_subdevices[] = {
{
.id = EC_FEATURE_CEC,
@@ -125,6 +129,11 @@ static const struct cros_feature_to_cells cros_subdevices[] = {
.mfd_cells = cros_ec_wdt_cells,
.num_cells = ARRAY_SIZE(cros_ec_wdt_cells),
},
+ {
+ .id = EC_FEATURE_PWM_KEYB,
+ .mfd_cells = cros_ec_keyboard_leds_cells,
+ .num_cells = ARRAY_SIZE(cros_ec_keyboard_leds_cells),
+ },
};
static const struct mfd_cell cros_ec_platform_cells[] = {
--
2.45.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-05-26 18:17 ` [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device Thomas Weißschuh
@ 2024-05-28 5:37 ` Tzung-Bi Shih
2024-05-28 5:41 ` Thomas Weißschuh
2024-06-03 1:57 ` Tzung-Bi Shih
1 sibling, 1 reply; 17+ messages in thread
From: Tzung-Bi Shih @ 2024-05-28 5:37 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Lee Jones, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> +#if IS_ENABLED(CONFIG_MFD_CROS_EC_DEV)
[...]
> +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,
> + .brightness_get = keyboard_led_get_brightness_ec_pwm,
They are only available if IS_ENABLED(CONFIG_CROS_EC).
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-05-28 5:37 ` Tzung-Bi Shih
@ 2024-05-28 5:41 ` Thomas Weißschuh
2024-05-28 6:53 ` Tzung-Bi Shih
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-28 5:41 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Lee Jones, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On 2024-05-28 05:37:32+0000, Tzung-Bi Shih wrote:
> On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> > +#if IS_ENABLED(CONFIG_MFD_CROS_EC_DEV)
> [...]
> > +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,
> > + .brightness_get = keyboard_led_get_brightness_ec_pwm,
>
> They are only available if IS_ENABLED(CONFIG_CROS_EC).
config MFD_CROS_EC_DEV
depends on CROS_EC
Do you prefer this to be spelled out explicitly somewhere?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-05-28 5:41 ` Thomas Weißschuh
@ 2024-05-28 6:53 ` Tzung-Bi Shih
0 siblings, 0 replies; 17+ messages in thread
From: Tzung-Bi Shih @ 2024-05-28 6:53 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Lee Jones, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Tue, May 28, 2024 at 07:41:09AM +0200, Thomas Weißschuh wrote:
> On 2024-05-28 05:37:32+0000, Tzung-Bi Shih wrote:
> > On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> > > +#if IS_ENABLED(CONFIG_MFD_CROS_EC_DEV)
> > [...]
> > > +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,
> > > + .brightness_get = keyboard_led_get_brightness_ec_pwm,
> >
> > They are only available if IS_ENABLED(CONFIG_CROS_EC).
>
> config MFD_CROS_EC_DEV
> depends on CROS_EC
>
> Do you prefer this to be spelled out explicitly somewhere?
I see. I missed the part. The dependency is not obvious from only reading
the C file though.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
` (3 preceding siblings ...)
2024-05-26 18:17 ` [PATCH v3 4/4] mfd: cros_ec: Register keyboard backlight subdevice Thomas Weißschuh
@ 2024-05-31 15:35 ` Lee Jones
2024-05-31 15:49 ` Thomas Weißschuh
2024-07-09 9:25 ` [GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window[GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window Lee Jones
5 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-05-31 15:35 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Benson Leung, Guenter Roeck, Tzung-Bi Shih, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Sun, 26 May 2024, Thomas Weißschuh wrote:
> Extend the cros_ec MFD device to also load cros_kbd_led_backlight
> when the EC reports EC_FEATURE_PWM_KEYB.
> As the driver can now be probed multiple times, some preparation in the
> LED core is necessary to avoid name collisions.
>
> Patch 1 is a general cleanup for the LED core.
> Patch 2 modifies the LED core to skip the default collision handling.
> Patch 3 adds the new probing logic to cros_kbd_led_backlight.
> Patch 4 wires up the driver to the cros_ec mfd devices.
>
> The helper keyboard_led_is_mfd_device is a bit iffy.
> But using match data doesn't work.
>
> * driver_data from platform_device_id is overwritten by the mfd platform data
> * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
> internals of cros_kbd_led_backlight
>
> Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
>
> To: Lee Jones <lee@kernel.org>
> To: Benson Leung <bleung@chromium.org>
> To: Guenter Roeck <groeck@chromium.org>
> To: Tzung-Bi Shih <tzungbi@kernel.org>
> To: Pavel Machek <pavel@ucw.cz>
> Cc: chrome-platform@lists.linux.dev
> Cc: linux-kernel@vger.kernel.org
> Cc: Dustin Howett <dustin@howett.net>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: linux-leds@vger.kernel.org
> Cc: Rajas Paranjpe <paranjperajas@gmail.com>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> Changes in v3:
> - Avoid probing multiple times (Confirmed by Rajas)
> - Add Kconfig dependency on MFD_CROS_EC_DEV
> - Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
>
> Changes in v2:
> - Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
> - Split out mfd registration into own commit (Lee)
> - Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
> - Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
>
> ---
> Thomas Weißschuh (4):
> leds: class: warn about name collisions earlier
> leds: add flag to avoid automatic renaming of led devices
> platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
> mfd: cros_ec: Register keyboard backlight subdevice
>
> drivers/leds/led-class.c | 9 +++---
> drivers/mfd/cros_ec_dev.c | 9 ++++++
> drivers/platform/chrome/Kconfig | 2 +-
> drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
> include/linux/leds.h | 1 +
> 5 files changed, 54 insertions(+), 7 deletions(-)
Looks okay.
Does the platform patch need to be applied with the others?
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
2024-05-31 15:35 ` [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Lee Jones
@ 2024-05-31 15:49 ` Thomas Weißschuh
2024-05-31 15:53 ` Lee Jones
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-31 15:49 UTC (permalink / raw)
To: Lee Jones
Cc: Benson Leung, Guenter Roeck, Tzung-Bi Shih, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On 2024-05-31 16:35:30+0000, Lee Jones wrote:
> On Sun, 26 May 2024, Thomas Weißschuh wrote:
>
> > Extend the cros_ec MFD device to also load cros_kbd_led_backlight
> > when the EC reports EC_FEATURE_PWM_KEYB.
> > As the driver can now be probed multiple times, some preparation in the
> > LED core is necessary to avoid name collisions.
> >
> > Patch 1 is a general cleanup for the LED core.
> > Patch 2 modifies the LED core to skip the default collision handling.
> > Patch 3 adds the new probing logic to cros_kbd_led_backlight.
> > Patch 4 wires up the driver to the cros_ec mfd devices.
> >
> > The helper keyboard_led_is_mfd_device is a bit iffy.
> > But using match data doesn't work.
> >
> > * driver_data from platform_device_id is overwritten by the mfd platform data
> > * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
> > internals of cros_kbd_led_backlight
> >
> > Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
> >
> > To: Lee Jones <lee@kernel.org>
> > To: Benson Leung <bleung@chromium.org>
> > To: Guenter Roeck <groeck@chromium.org>
> > To: Tzung-Bi Shih <tzungbi@kernel.org>
> > To: Pavel Machek <pavel@ucw.cz>
> > Cc: chrome-platform@lists.linux.dev
> > Cc: linux-kernel@vger.kernel.org
> > Cc: Dustin Howett <dustin@howett.net>
> > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > Cc: linux-leds@vger.kernel.org
> > Cc: Rajas Paranjpe <paranjperajas@gmail.com>
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> >
> > Changes in v3:
> > - Avoid probing multiple times (Confirmed by Rajas)
> > - Add Kconfig dependency on MFD_CROS_EC_DEV
> > - Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
> >
> > Changes in v2:
> > - Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
> > - Split out mfd registration into own commit (Lee)
> > - Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
> > - Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
> >
> > ---
> > Thomas Weißschuh (4):
> > leds: class: warn about name collisions earlier
> > leds: add flag to avoid automatic renaming of led devices
> > platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
> > mfd: cros_ec: Register keyboard backlight subdevice
> >
> > drivers/leds/led-class.c | 9 +++---
> > drivers/mfd/cros_ec_dev.c | 9 ++++++
> > drivers/platform/chrome/Kconfig | 2 +-
> > drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
> > include/linux/leds.h | 1 +
> > 5 files changed, 54 insertions(+), 7 deletions(-)
>
> Looks okay.
Thanks.
> Does the platform patch need to be applied with the others?
Each patch depends on all its predecessors.
(but I'm not sure I understood your question)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
2024-05-31 15:49 ` Thomas Weißschuh
@ 2024-05-31 15:53 ` Lee Jones
2024-05-31 15:59 ` Thomas Weißschuh
0 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-05-31 15:53 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Benson Leung, Guenter Roeck, Tzung-Bi Shih, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Fri, 31 May 2024, Thomas Weißschuh wrote:
> On 2024-05-31 16:35:30+0000, Lee Jones wrote:
> > On Sun, 26 May 2024, Thomas Weißschuh wrote:
> >
> > > Extend the cros_ec MFD device to also load cros_kbd_led_backlight
> > > when the EC reports EC_FEATURE_PWM_KEYB.
> > > As the driver can now be probed multiple times, some preparation in the
> > > LED core is necessary to avoid name collisions.
> > >
> > > Patch 1 is a general cleanup for the LED core.
> > > Patch 2 modifies the LED core to skip the default collision handling.
> > > Patch 3 adds the new probing logic to cros_kbd_led_backlight.
> > > Patch 4 wires up the driver to the cros_ec mfd devices.
> > >
> > > The helper keyboard_led_is_mfd_device is a bit iffy.
> > > But using match data doesn't work.
> > >
> > > * driver_data from platform_device_id is overwritten by the mfd platform data
> > > * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
> > > internals of cros_kbd_led_backlight
> > >
> > > Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
> > >
> > > To: Lee Jones <lee@kernel.org>
> > > To: Benson Leung <bleung@chromium.org>
> > > To: Guenter Roeck <groeck@chromium.org>
> > > To: Tzung-Bi Shih <tzungbi@kernel.org>
> > > To: Pavel Machek <pavel@ucw.cz>
> > > Cc: chrome-platform@lists.linux.dev
> > > Cc: linux-kernel@vger.kernel.org
> > > Cc: Dustin Howett <dustin@howett.net>
> > > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > > Cc: linux-leds@vger.kernel.org
> > > Cc: Rajas Paranjpe <paranjperajas@gmail.com>
> > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > >
> > > Changes in v3:
> > > - Avoid probing multiple times (Confirmed by Rajas)
> > > - Add Kconfig dependency on MFD_CROS_EC_DEV
> > > - Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
> > >
> > > Changes in v2:
> > > - Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
> > > - Split out mfd registration into own commit (Lee)
> > > - Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
> > > - Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
> > >
> > > ---
> > > Thomas Weißschuh (4):
> > > leds: class: warn about name collisions earlier
> > > leds: add flag to avoid automatic renaming of led devices
> > > platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
> > > mfd: cros_ec: Register keyboard backlight subdevice
> > >
> > > drivers/leds/led-class.c | 9 +++---
> > > drivers/mfd/cros_ec_dev.c | 9 ++++++
> > > drivers/platform/chrome/Kconfig | 2 +-
> > > drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
> > > include/linux/leds.h | 1 +
> > > 5 files changed, 54 insertions(+), 7 deletions(-)
> >
> > Looks okay.
>
> Thanks.
>
> > Does the platform patch need to be applied with the others?
>
> Each patch depends on all its predecessors.
> (but I'm not sure I understood your question)
Does the Platform patch have 'build-time' deps on the others?
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
2024-05-31 15:53 ` Lee Jones
@ 2024-05-31 15:59 ` Thomas Weißschuh
2024-06-03 1:54 ` Tzung-Bi Shih
0 siblings, 1 reply; 17+ messages in thread
From: Thomas Weißschuh @ 2024-05-31 15:59 UTC (permalink / raw)
To: Lee Jones
Cc: Benson Leung, Guenter Roeck, Tzung-Bi Shih, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On 2024-05-31 16:53:56+0000, Lee Jones wrote:
> On Fri, 31 May 2024, Thomas Weißschuh wrote:
>
> > On 2024-05-31 16:35:30+0000, Lee Jones wrote:
> > > On Sun, 26 May 2024, Thomas Weißschuh wrote:
> > >
> > > > Extend the cros_ec MFD device to also load cros_kbd_led_backlight
> > > > when the EC reports EC_FEATURE_PWM_KEYB.
> > > > As the driver can now be probed multiple times, some preparation in the
> > > > LED core is necessary to avoid name collisions.
> > > >
> > > > Patch 1 is a general cleanup for the LED core.
> > > > Patch 2 modifies the LED core to skip the default collision handling.
> > > > Patch 3 adds the new probing logic to cros_kbd_led_backlight.
> > > > Patch 4 wires up the driver to the cros_ec mfd devices.
> > > >
> > > > The helper keyboard_led_is_mfd_device is a bit iffy.
> > > > But using match data doesn't work.
> > > >
> > > > * driver_data from platform_device_id is overwritten by the mfd platform data
> > > > * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
> > > > internals of cros_kbd_led_backlight
> > > >
> > > > Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
> > > >
> > > > To: Lee Jones <lee@kernel.org>
> > > > To: Benson Leung <bleung@chromium.org>
> > > > To: Guenter Roeck <groeck@chromium.org>
> > > > To: Tzung-Bi Shih <tzungbi@kernel.org>
> > > > To: Pavel Machek <pavel@ucw.cz>
> > > > Cc: chrome-platform@lists.linux.dev
> > > > Cc: linux-kernel@vger.kernel.org
> > > > Cc: Dustin Howett <dustin@howett.net>
> > > > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > > > Cc: linux-leds@vger.kernel.org
> > > > Cc: Rajas Paranjpe <paranjperajas@gmail.com>
> > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > > >
> > > > Changes in v3:
> > > > - Avoid probing multiple times (Confirmed by Rajas)
> > > > - Add Kconfig dependency on MFD_CROS_EC_DEV
> > > > - Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
> > > >
> > > > Changes in v2:
> > > > - Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
> > > > - Split out mfd registration into own commit (Lee)
> > > > - Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
> > > > - Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
> > > >
> > > > ---
> > > > Thomas Weißschuh (4):
> > > > leds: class: warn about name collisions earlier
> > > > leds: add flag to avoid automatic renaming of led devices
> > > > platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
> > > > mfd: cros_ec: Register keyboard backlight subdevice
> > > >
> > > > drivers/leds/led-class.c | 9 +++---
> > > > drivers/mfd/cros_ec_dev.c | 9 ++++++
> > > > drivers/platform/chrome/Kconfig | 2 +-
> > > > drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
> > > > include/linux/leds.h | 1 +
> > > > 5 files changed, 54 insertions(+), 7 deletions(-)
> > >
> > > Looks okay.
> >
> > Thanks.
> >
> > > Does the platform patch need to be applied with the others?
> >
> > Each patch depends on all its predecessors.
> > (but I'm not sure I understood your question)
>
> Does the Platform patch have 'build-time' deps on the others?
Yes.
Patch 3 makes use of LED_REJECT_NAME_CONFLICT which was introduced in Patch 2.
Patch 1, 2, 3 have build-time deps on their predecessors.
Patch 4 has a run-time deps on Patch 3.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device
2024-05-31 15:59 ` Thomas Weißschuh
@ 2024-06-03 1:54 ` Tzung-Bi Shih
0 siblings, 0 replies; 17+ messages in thread
From: Tzung-Bi Shih @ 2024-06-03 1:54 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Lee Jones, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Fri, May 31, 2024 at 05:59:01PM +0200, Thomas Weißschuh wrote:
> On 2024-05-31 16:53:56+0000, Lee Jones wrote:
> > On Fri, 31 May 2024, Thomas Weißschuh wrote:
> >
> > > On 2024-05-31 16:35:30+0000, Lee Jones wrote:
> > > > On Sun, 26 May 2024, Thomas Weißschuh wrote:
> > > >
> > > > > Extend the cros_ec MFD device to also load cros_kbd_led_backlight
> > > > > when the EC reports EC_FEATURE_PWM_KEYB.
> > > > > As the driver can now be probed multiple times, some preparation in the
> > > > > LED core is necessary to avoid name collisions.
> > > > >
> > > > > Patch 1 is a general cleanup for the LED core.
> > > > > Patch 2 modifies the LED core to skip the default collision handling.
> > > > > Patch 3 adds the new probing logic to cros_kbd_led_backlight.
> > > > > Patch 4 wires up the driver to the cros_ec mfd devices.
> > > > >
> > > > > The helper keyboard_led_is_mfd_device is a bit iffy.
> > > > > But using match data doesn't work.
> > > > >
> > > > > * driver_data from platform_device_id is overwritten by the mfd platform data
> > > > > * Setting the driver_data in drivers/mfd/cros_ec_dev.c would expose the
> > > > > internals of cros_kbd_led_backlight
> > > > >
> > > > > Tested on a Framework 13 AMD, Firmware 3.05, and a Jinlon Chromebook.
> > > > >
> > > > > To: Lee Jones <lee@kernel.org>
> > > > > To: Benson Leung <bleung@chromium.org>
> > > > > To: Guenter Roeck <groeck@chromium.org>
> > > > > To: Tzung-Bi Shih <tzungbi@kernel.org>
> > > > > To: Pavel Machek <pavel@ucw.cz>
> > > > > Cc: chrome-platform@lists.linux.dev
> > > > > Cc: linux-kernel@vger.kernel.org
> > > > > Cc: Dustin Howett <dustin@howett.net>
> > > > > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > > > > Cc: linux-leds@vger.kernel.org
> > > > > Cc: Rajas Paranjpe <paranjperajas@gmail.com>
> > > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > > > >
> > > > > Changes in v3:
> > > > > - Avoid probing multiple times (Confirmed by Rajas)
> > > > > - Add Kconfig dependency on MFD_CROS_EC_DEV
> > > > > - Link to v2: https://lore.kernel.org/r/20240511-cros_ec-kbd-led-framework-v2-0-b20c48109e46@weissschuh.net
> > > > >
> > > > > Changes in v2:
> > > > > - Fix build with CONFIG_MFD_CROS_EC_DEV=n (kernel test robot)
> > > > > - Split out mfd registration into own commit (Lee)
> > > > > - Simplify keyboard_led_is_mfd_device() with mfd_get_cell()
> > > > > - Link to v1: https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net
> > > > >
> > > > > ---
> > > > > Thomas Weißschuh (4):
> > > > > leds: class: warn about name collisions earlier
> > > > > leds: add flag to avoid automatic renaming of led devices
> > > > > platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
> > > > > mfd: cros_ec: Register keyboard backlight subdevice
> > > > >
> > > > > drivers/leds/led-class.c | 9 +++---
> > > > > drivers/mfd/cros_ec_dev.c | 9 ++++++
> > > > > drivers/platform/chrome/Kconfig | 2 +-
> > > > > drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
> > > > > include/linux/leds.h | 1 +
> > > > > 5 files changed, 54 insertions(+), 7 deletions(-)
> > > >
> > > > Looks okay.
> > >
> > > Thanks.
> > >
> > > > Does the platform patch need to be applied with the others?
> > >
> > > Each patch depends on all its predecessors.
> > > (but I'm not sure I understood your question)
> >
> > Does the Platform patch have 'build-time' deps on the others?
>
> Yes.
>
> Patch 3 makes use of LED_REJECT_NAME_CONFLICT which was introduced in Patch 2.
>
> Patch 1, 2, 3 have build-time deps on their predecessors.
> Patch 4 has a run-time deps on Patch 3.
Patch 1 is independent actually.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-05-26 18:17 ` [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device Thomas Weißschuh
2024-05-28 5:37 ` Tzung-Bi Shih
@ 2024-06-03 1:57 ` Tzung-Bi Shih
2024-06-13 14:34 ` Lee Jones
1 sibling, 1 reply; 17+ messages in thread
From: Tzung-Bi Shih @ 2024-06-03 1:57 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Lee Jones, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> The ChromeOS EC used in Framework laptops supports the standard CrOS EC
> keyboard backlight protocol.
> However the firmware on these laptops doesn't implement the ACPI ID
> GOOG0002 that is recognized by cros_kbd_led_backlight and they also
> don't use device tree.
>
> Prepare the existing cros_kbd_led_backlight driver to be probed through
> the CrOS EC mfd device which works without ACPI or OF support.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
The patch overall looks good to me but it depends on previous patch in the
series (for LED_REJECT_NAME_CONFLICT). Let's wait for review.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-06-03 1:57 ` Tzung-Bi Shih
@ 2024-06-13 14:34 ` Lee Jones
2024-06-14 2:39 ` Tzung-Bi Shih
0 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-06-13 14:34 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Thomas Weißschuh, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Mon, 03 Jun 2024, Tzung-Bi Shih wrote:
> On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> > The ChromeOS EC used in Framework laptops supports the standard CrOS EC
> > keyboard backlight protocol.
> > However the firmware on these laptops doesn't implement the ACPI ID
> > GOOG0002 that is recognized by cros_kbd_led_backlight and they also
> > don't use device tree.
> >
> > Prepare the existing cros_kbd_led_backlight driver to be probed through
> > the CrOS EC mfd device which works without ACPI or OF support.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>
> The patch overall looks good to me but it depends on previous patch in the
> series (for LED_REJECT_NAME_CONFLICT). Let's wait for review.
I plan to take this via MFD.
Is someone going to Ack this patch?
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device
2024-06-13 14:34 ` Lee Jones
@ 2024-06-14 2:39 ` Tzung-Bi Shih
0 siblings, 0 replies; 17+ messages in thread
From: Tzung-Bi Shih @ 2024-06-14 2:39 UTC (permalink / raw)
To: Lee Jones
Cc: Thomas Weißschuh, Benson Leung, Guenter Roeck, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
On Thu, Jun 13, 2024 at 03:34:51PM +0100, Lee Jones wrote:
> On Mon, 03 Jun 2024, Tzung-Bi Shih wrote:
>
> > On Sun, May 26, 2024 at 08:17:17PM +0200, Thomas Weißschuh wrote:
> > > The ChromeOS EC used in Framework laptops supports the standard CrOS EC
> > > keyboard backlight protocol.
> > > However the firmware on these laptops doesn't implement the ACPI ID
> > > GOOG0002 that is recognized by cros_kbd_led_backlight and they also
> > > don't use device tree.
> > >
> > > Prepare the existing cros_kbd_led_backlight driver to be probed through
> > > the CrOS EC mfd device which works without ACPI or OF support.
> > >
> > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> >
> > The patch overall looks good to me but it depends on previous patch in the
> > series (for LED_REJECT_NAME_CONFLICT). Let's wait for review.
>
> I plan to take this via MFD.
>
> Is someone going to Ack this patch?
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window[GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
` (4 preceding siblings ...)
2024-05-31 15:35 ` [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Lee Jones
@ 2024-07-09 9:25 ` Lee Jones
5 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2024-07-09 9:25 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Benson Leung, Guenter Roeck, Tzung-Bi Shih, Pavel Machek,
chrome-platform, linux-kernel, Dustin Howett, Mario Limonciello,
linux-leds, Rajas Paranjpe
Enjoy!
The following changes since commit 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0:
Linux 6.10-rc1 (2024-05-26 15:20:12 -0700)
are available in the Git repository at:
ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-leds-platform-v6.11
for you to fetch changes up to 970c3a6b7aa3c68ccdf5af2562c3d39533dd62a9:
mfd: cros_ec: Register keyboard backlight subdevice (2024-06-14 10:09:40 +0100)
----------------------------------------------------------------
Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window
----------------------------------------------------------------
Thomas Weißschuh (4):
leds: class: Warn about name collisions earlier
leds: class: Add flag to avoid automatic renaming of LED devices
platform/chrome: cros_kbd_led_backlight: allow binding through MFD
mfd: cros_ec: Register keyboard backlight subdevice
drivers/leds/led-class.c | 9 +++---
drivers/mfd/cros_ec_dev.c | 9 ++++++
drivers/platform/chrome/Kconfig | 2 +-
drivers/platform/chrome/cros_kbd_led_backlight.c | 40 ++++++++++++++++++++++--
include/linux/leds.h | 1 +
5 files changed, 54 insertions(+), 7 deletions(-)
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2024-07-09 9:25 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-26 18:17 [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 1/4] leds: class: warn about name collisions earlier Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 2/4] leds: add flag to avoid automatic renaming of led devices Thomas Weißschuh
2024-05-26 18:17 ` [PATCH v3 3/4] platform/chrome: cros_kbd_led_backlight: allow binding through mfd device Thomas Weißschuh
2024-05-28 5:37 ` Tzung-Bi Shih
2024-05-28 5:41 ` Thomas Weißschuh
2024-05-28 6:53 ` Tzung-Bi Shih
2024-06-03 1:57 ` Tzung-Bi Shih
2024-06-13 14:34 ` Lee Jones
2024-06-14 2:39 ` Tzung-Bi Shih
2024-05-26 18:17 ` [PATCH v3 4/4] mfd: cros_ec: Register keyboard backlight subdevice Thomas Weißschuh
2024-05-31 15:35 ` [PATCH v3 0/4] cros_kbd_led_backlight: allow binding through cros_ec mfd device Lee Jones
2024-05-31 15:49 ` Thomas Weißschuh
2024-05-31 15:53 ` Lee Jones
2024-05-31 15:59 ` Thomas Weißschuh
2024-06-03 1:54 ` Tzung-Bi Shih
2024-07-09 9:25 ` [GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window[GIT PULL] Immutable branch between MFD, LEDs and Platform due for the v6.11 merge window Lee Jones
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).