]> git.baikalelectronics.ru Git - kernel.git/commit
mfd / platform: cros_ec_vbc: Instantiate only if the EC has a VBC NVRAM
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Wed, 12 Dec 2018 17:34:01 +0000 (18:34 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 1 Feb 2019 08:09:27 +0000 (08:09 +0000)
commit7aadaeabdde6dd5d8842d174eb64f61cb97be214
treeee4adec16869b918a08c69a0fa09aaab2c5d2982
parent5d034958a52aa174017d8a9a35972a44f902d223
mfd / platform: cros_ec_vbc: Instantiate only if the EC has a VBC NVRAM

The cros-ec-vbc driver is DT-only and there is a DT property that
indicates if the EC has the VCB NVRAM, in such case instantiate the
driver but don't instantiate on the other cases.

To do this move the check code to its parent instead of play with the
attribute group visibility. This changes a bit the actual behaviour.
Before the patch if an EC doesn't have a VBC NVRAM an empty vbc 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 vbc
is set.

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>
drivers/mfd/cros_ec_dev.c
drivers/platform/chrome/cros_ec_vbc.c