Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20240526-cros_ec-kbd-led-framework-v3-3-ee577415a521@weissschuh.net
Signed-off-by: Lee Jones <lee@kernel.org>
|
|
fallback match
Instead of using fallback driver name match, provide ID table[1] for the
primary match.
Also shrink the name for fitting to [2].
[1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353
[2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608
Reviewed-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20240329075630.2069474-15-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
|
|
drivers/platform/chrome/cros_kbd_led_backlight.c got a new build warning
when using the randconfig in [1]:
>>> warning: unused variable 'keyboard_led_drvdata_ec_pwm'
The warning happens when CONFIG_CROS_EC is set but CONFIG_OF is not set.
Reproduce:
- mkdir build_dir
- wget [1] -O build_dir/.config
- COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 \
O=build_dir ARCH=s390 SHELL=/bin/bash drivers/platform/chrome/
Fix the warning by using __maybe_unused. Also use IS_ENABLED() because
CROS_EC is a tristate.
[1]: https://download.01.org/0day-ci/archive/20220717/202207170538.MR39dw8m-lkp@intel.com/config
Fixes: 40f58143745e ("platform/chrome: cros_kbd_led_backlight: support EC PWM backend")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220718105047.2356542-1-tzungbi@kernel.org
|
|
EC PWM backend uses EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT and
EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT for setting and getting the brightness
respectively.
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Link: https://lore.kernel.org/r/20220523090822.3035189-6-tzungbi@kernel.org
|
|
For letting device tree based machines to use the driver, support OF match.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Link: https://lore.kernel.org/r/20220523090822.3035189-5-tzungbi@kernel.org
|
|
cros_kbd_led_backlight uses ACPI_KEYBOARD_BACKLIGHT_WRITE and
ACPI_KEYBOARD_BACKLIGHT_READ for setting and getting the brightness
respectively.
Separate ACPI operations for preparing the driver to support other
backends.
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220523090822.3035189-3-tzungbi@kernel.org
|
|
To be neat and reduce conflict possibility, sort the headers
alphabetically.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220523090822.3035189-2-tzungbi@kernel.org
|
|
Adopt the SPDX license identifier headers to ease license compliance
management. Also change the term 'Chrome OS' for 'ChromeOS' to be
coherent with other drivers.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
|
|
This is a driver for ACPI-based keyboard backlight LEDs found on
Chromebooks. The driver locates \\_SB.KBLT ACPI device and exports
backlight as "chromeos::kbd_backlight" LED class device in sysfs.
Signed-off-by: Simon Que <sque@chromium.org>
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: Evan McClain <aeroevan@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
|