linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/7] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers.
@ 2018-12-12 17:33 Enric Balletbo i Serra
  2018-12-12 17:33 ` [PATCH v5 1/7] mfd / platform: cros_ec: use devm_mfd_add_devices Enric Balletbo i Serra
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Enric Balletbo i Serra @ 2018-12-12 17:33 UTC (permalink / raw)
  To: lee.jones; +Cc: gwendal, drinkcat, linux-kernel, groeck, kernel, bleung

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.

Most of the patches touches mfd subsystem and platform/chrome so I'd
suggest go all using and inmutable branch.

Best regards,
 Enric

Changes in v5:
- Add static at cros_ec_attr_group.

Changes in v4:
- Added Reviewed-by tags.
- Moved mfd_remove_devices to another patch, it's already queued in Lee's tree.
- Removed patch 8 from the series, was a fix and it's already applied in current mainline.
- Use <ec-device-name> instead of <cros-ec> in documentation.
- Use default MFD_CROS_EC_CHARDEV in Kconfig.
- Changed the subject to specify the cros_ec_vbc driver.
- Fix typo s/th/the
- Get rid of the cros_ec_has_lightbar function.

Changes in v3:
- Removed cros_ec_remove from include file.
- Removed unneded check for ec_dev.
- Fixed build error as reported by the kbuild test robot.
- Do not print ec_platform name as is with dev_err is enough.

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.
- Removed 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.
- 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.

Enric Balletbo i Serra (7):
  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_vbc: instantiate only if the 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                         |  14 +-
 drivers/mfd/cros_ec_dev.c                     |  89 +++++--------
 drivers/mfd/cros_ec_dev.h                     |   6 -
 drivers/platform/chrome/Kconfig               |  47 ++++++-
 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       |  36 ++++-
 drivers/platform/chrome/cros_ec_vbc.c         |  59 +++++---
 include/linux/mfd/cros_ec.h                   |  21 ---
 17 files changed, 394 insertions(+), 211 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.2


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-02-06 20:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-12 17:33 [PATCH v5 0/7] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers Enric Balletbo i Serra
2018-12-12 17:33 ` [PATCH v5 1/7] mfd / platform: cros_ec: use devm_mfd_add_devices Enric Balletbo i Serra
2018-12-21  9:08   ` Lee Jones
2018-12-12 17:33 ` [PATCH v5 2/7] mfd / platform: cros_ec: move lightbar attributes to its own driver Enric Balletbo i Serra
2018-12-21  9:09   ` Lee Jones
2018-12-12 17:33 ` [PATCH v5 3/7] mfd / platform: cros_ec: move vbc " Enric Balletbo i Serra
2018-12-12 17:33 ` [PATCH v5 4/7] mfd / platform: cros_ec: move debugfs " Enric Balletbo i Serra
2018-12-12 17:34 ` [PATCH v5 5/7] mfd / platform: cros_ec: move device sysfs " Enric Balletbo i Serra
2018-12-12 17:34 ` [PATCH v5 6/7] mfd / platform: cros_ec_vbc: instantiate only if the EC has a VBC NVRAM Enric Balletbo i Serra
2018-12-12 17:34 ` [PATCH v5 7/7] platform/chrome: cros_ec_lightbar: instantiate only if the EC has a lightbar Enric Balletbo i Serra
2018-12-21  9:10 ` [PATCH v5 0/7] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers Lee Jones
2019-01-08 16:21   ` Enric Balletbo Serra
2019-01-09  7:25     ` Lee Jones
2019-01-09  9:15       ` Enric Balletbo i Serra
2019-01-16  8:51 ` Lee Jones
2019-01-31  9:28   ` Enric Balletbo Serra
2019-02-01  8:19     ` Lee Jones
2019-02-01  8:19 ` [GIT PULL] Immutable branch between MFD and Platform due for the v5.1 merge window Lee Jones
2019-02-06 20:07   ` Benson Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).