1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/platform/chrome
Enric Balletbo i Serra fd68bd0f5d platform/chrome: cros_ec_lightbar: Instantiate only if the EC has a lightbar
Due to the way attribute groups visibility work, the function
cros_ec_lightbar_attrs_are_visible is called multiple times, once per
attribute, and each of these calls makes an EC transaction. For what is
worth the EC log reports multiple errors on boot when the lightbar is
not available. Instead, check if the EC has a lightbar in the probe
function and only instantiate the device.

Ideally we should have instantiate the driver only if the
EC_FEATURE_LIGHTBAR is defined, but that's not possible because that flag
is not in the very first Pixel Chromebook (Link), only on Samus. So, the
driver is instantiated by his parent always.

This patch changes a bit the actual behaviour. Before the patch if an EC
doesn't have a lightbar an empty lightbar folder is created in
/sys/class/chromeos/<ec-device-name>, after the patch the empty folder is
not created, so, the folder is only created if the lightbar exists.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-02-01 08:09:27 +00:00
..
chromeos_laptop.c platform/chrome: chromeos_laptop: fix touchpad button mapping on Celes 2018-05-29 15:11:04 -07:00
chromeos_pstore.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc - Remove unneeded const 2018-10-09 22:40:12 -07:00
cros_ec_debugfs.c mfd / platform: cros_ec: Move debugfs attributes to its own driver 2019-02-01 08:09:27 +00:00
cros_ec_i2c.c mfd / platform: cros_ec: Use devm_mfd_add_devices 2019-02-01 08:09:27 +00:00
cros_ec_lightbar.c platform/chrome: cros_ec_lightbar: Instantiate only if the EC has a lightbar 2019-02-01 08:09:27 +00:00
cros_ec_lpc.c mfd / platform: cros_ec: Use devm_mfd_add_devices 2019-02-01 08:09:27 +00:00
cros_ec_lpc_mec.c platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_mec.h platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_reg.c platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_lpc_reg.h platform/chrome: Move mfd/cros_ec_lpc* includes to drivers/platform. 2018-09-07 15:56:36 +08:00
cros_ec_proto.c platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup 2018-11-13 21:25:28 -08:00
cros_ec_spi.c mfd / platform: cros_ec: Use devm_mfd_add_devices 2019-02-01 08:09:27 +00:00
cros_ec_sysfs.c mfd / platform: cros_ec: Move device sysfs attributes to its own driver 2019-02-01 08:09:27 +00:00
cros_ec_vbc.c mfd / platform: cros_ec_vbc: Instantiate only if the EC has a VBC NVRAM 2019-02-01 08:09:27 +00:00
cros_kbd_led_backlight.c platform/chrome: Add Chrome OS keyboard backlight LEDs support 2016-05-11 11:55:47 -07:00
Kconfig mfd / platform: cros_ec: Move device sysfs attributes to its own driver 2019-02-01 08:09:27 +00:00
Makefile mfd / platform: cros_ec: Move device sysfs attributes to its own driver 2019-02-01 08:09:27 +00:00