[PATCH 0/7] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers.

Enric Balletbo i Serra
2018-11-22T11:34:09Z

Hi,

This is another patchset to try to cleanup a bit more the crossed
references for cros-ec driver between the MFD and the platform/chrome
subsystems.

The purpose of these patches is get rid of the different cros-ec attributes
from mfd/cros_ec_dev to its own sub-driver in platform/chrome. cros_ec_dev
continues instantiating the sub-devices but the sysfs attributes are owned
by the platform driver.E.g. The lightbar driver should own his sysfs
attributes and be instantiated only if the Embedded Controller has a
lightbar.

The patchset also adds the documentation of the sysfs attributes.

Waiting for your feedback. Best regards,
Enric

Enric Balletbo i Serra (7):
mfd: cros_ec: use devm_mfd_add_devices.
mfd / platform: cros_ec: move lightbar attributes to its own driver.
mfd / platform: cros_ec: move vbc attributes to its own driver.
mfd / platform: cros_ec: move debugfs attributes to its own driver.
mfd / platform: cros_ec: move device sysfs attributes to its own
driver.
mfd / platform: cros_ec: instantiate only if th EC has a VBC NVRAM.
platform/chrome: cros_ec_lightbar: instantiate only if the EC has a
lightbar.

.../ABI/testing/sysfs-class-chromeos | 32 +++++
...sfs-class-chromeos-driver-cros-ec-lightbar | 74 ++++++++++
.../sysfs-class-chromeos-driver-cros-ec-vbc | 6 +
drivers/mfd/Kconfig | 1 -
drivers/mfd/cros_ec.c | 12 +-
drivers/mfd/cros_ec_dev.c | 115 ++++++++--------
drivers/mfd/cros_ec_dev.h | 6 -
drivers/platform/chrome/Kconfig | 44 +++++-
drivers/platform/chrome/Makefile | 7 +-
drivers/platform/chrome/cros_ec_debugfs.c | 49 +++++--
drivers/platform/chrome/cros_ec_i2c.c | 10 --
drivers/platform/chrome/cros_ec_lightbar.c | 127 ++++++++++++------
drivers/platform/chrome/cros_ec_lpc.c | 4 -
drivers/platform/chrome/cros_ec_spi.c | 11 --
drivers/platform/chrome/cros_ec_sysfs.c | 43 +++++-
drivers/platform/chrome/cros_ec_vbc.c | 62 ++++++---
include/linux/mfd/cros_ec.h | 15 +--
17 files changed, 434 insertions(+), 184 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-class-chromeos
create mode 100644 Documentation/ABI/testing/sysfs-class-chromeos-driver-cros-ec-lightbar
create mode 100644 Documentation/ABI/testing/sysfs-class-chromeos-driver-cros-ec-vbc

--
2.19.1