[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181126175158.5425-1-enric.balletbo@collabora.com>
Date: Mon, 26 Nov 2018 18:51:50 +0100
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: lee.jones@...aro.org
Cc: gwendal@...omium.org, drinkcat@...omium.org,
linux-kernel@...r.kernel.org, groeck@...omium.org,
kernel@...labora.com, bleung@...omium.org,
Olof Johansson <olof@...om.net>
Subject: [PATCH v2 0/8] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers.
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
Changes in v2:
- Use devm only for the cros-ec core.
- Removed the two exported functions to attach/detach to the cros_class.
- Use dev_warn instead of dev_err when adding the lightbar.
- Remove unneeded check of ec_dev.
- Add a "default MFD_CROS_EC_CHARDEV" in Kconfig for this.
- Remove the checks for missing debug_info, are not needed now.
- Remove a comment that no longer applies.
- Remove unnecessary check for ec_dev.
- Create the attributes directly instead of use the attach/detach callbacks.
- Remove unnecessary IS_ENABLED.
- Remove dev_err message telling that VBC is found.
- Use dev_warn instead of dev_err as the error is ignored.
- Removed ec_with_lightbar variable.
- Fix WARN when unloading. This is new in these series.
Enric Balletbo i Serra (8):
mfd / platform: 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.
mfd: cros_ec: add a dev_release empty method.
.../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 | 14 +-
drivers/mfd/cros_ec_dev.c | 93 +++++--------
drivers/mfd/cros_ec_dev.h | 6 -
drivers/platform/chrome/Kconfig | 45 ++++++-
drivers/platform/chrome/Makefile | 7 +-
drivers/platform/chrome/cros_ec_debugfs.c | 62 ++++++---
drivers/platform/chrome/cros_ec_i2c.c | 10 --
drivers/platform/chrome/cros_ec_lightbar.c | 126 ++++++++++++------
drivers/platform/chrome/cros_ec_lpc.c | 4 -
drivers/platform/chrome/cros_ec_spi.c | 11 --
drivers/platform/chrome/cros_ec_sysfs.c | 38 +++++-
drivers/platform/chrome/cros_ec_vbc.c | 59 +++++---
include/linux/mfd/cros_ec.h | 11 --
17 files changed, 402 insertions(+), 197 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
Powered by blists - more mailing lists