summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>2018-12-12 18:34:02 +0100
committerLee Jones <lee.jones@linaro.org>2019-02-01 08:09:27 +0000
commitfd68bd0f5d4c2090c95f84e27b05d0836bcd6c0c (patch)
tree2da97f30022aaaf7397236ee87935532945e86d0 /Documentation/devicetree/bindings/mfd
parent0545625baa5981bb0a583e6a6045155936d3ea95 (diff)
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>
Diffstat (limited to 'Documentation/devicetree/bindings/mfd')
0 files changed, 0 insertions, 0 deletions