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

Hi,

This is quick respin of the previous version because I introduced a
build problem between patch 3 and 6 due a wrong squash on my side. Sorry
about that. I also take this opportunity to do some few cleanups.

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.

Waiting for your feedback. Best regards,
 Enric

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.
- Create the attributes directly instead of use the attach/detach callbacks.
- Add a "default MFD_CROS_EC_CHARDEV" in Kconfig for this.
- Removed the checks for missing debug_info, are not needed now.
- Removed a comment that no longer applies.
- Removed unnecessary IS_ENABLED.
- Removed 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       |  36 ++++-
 drivers/platform/chrome/cros_ec_vbc.c         |  59 +++++---
 include/linux/mfd/cros_ec.h                   |  21 ---
 17 files changed, 400 insertions(+), 207 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


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

end of thread, other threads:[~2018-12-11 11:18 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 12:18 [PATCH v3 0/8] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers Enric Balletbo i Serra
2018-11-27 12:18 ` [PATCH v3 1/8] mfd / platform: cros_ec: use devm_mfd_add_devices Enric Balletbo i Serra
2018-11-29 23:30   ` Guenter Roeck
2018-12-03 10:32   ` Lee Jones
2018-12-03 22:13     ` Enric Balletbo i Serra
2018-12-04  9:22       ` Lee Jones
2018-11-27 12:18 ` [PATCH v3 2/8] mfd / platform: cros_ec: move lightbar attributes to its own driver Enric Balletbo i Serra
2018-11-29 23:34   ` Guenter Roeck
2018-12-03 10:36   ` Lee Jones
2018-12-03 22:21     ` Enric Balletbo i Serra
2018-12-04  9:21       ` Lee Jones
2018-12-04 11:52         ` Enric Balletbo i Serra
2018-12-04 16:57           ` Guenter Roeck
2018-12-05  8:09             ` Lee Jones
2018-12-05  7:25           ` Lee Jones
2018-11-27 12:18 ` [PATCH v3 3/8] mfd / platform: cros_ec: move vbc " Enric Balletbo i Serra
2018-11-29 23:36   ` Guenter Roeck
2018-12-03 10:42   ` Lee Jones
2018-11-27 12:18 ` [PATCH v3 4/8] mfd / platform: cros_ec: move debugfs " Enric Balletbo i Serra
2018-12-03 10:55   ` Lee Jones
2018-12-10 18:04   ` Guenter Roeck
2018-11-27 12:18 ` [PATCH v3 5/8] mfd / platform: cros_ec: move device sysfs " Enric Balletbo i Serra
2018-12-03 10:56   ` Lee Jones
2018-12-10 18:13   ` Guenter Roeck
2018-12-10 18:22     ` Enric Balletbo i Serra
2018-12-10 18:28       ` Guenter Roeck
2018-12-10 21:27         ` Enric Balletbo Serra
2018-12-10 21:50           ` Guenter Roeck
2018-12-10 22:11             ` Enric Balletbo Serra
2018-12-10 22:25               ` Guenter Roeck
2018-11-27 12:18 ` [PATCH v3 6/8] mfd / platform: cros_ec: instantiate only if th EC has a VBC NVRAM Enric Balletbo i Serra
2018-12-03 10:57   ` Lee Jones
2018-12-10 18:15   ` Guenter Roeck
2018-12-10 18:30     ` Guenter Roeck
2018-11-27 12:18 ` [PATCH v3 7/8] platform/chrome: cros_ec_lightbar: instantiate only if the EC has a lightbar Enric Balletbo i Serra
2018-12-10 18:20   ` Guenter Roeck
2018-12-11 11:18     ` Enric Balletbo i Serra
2018-11-27 12:18 ` [PATCH v3 8/8] mfd: cros_ec: add a dev_release empty method Enric Balletbo i Serra
2018-11-27 17:29   ` Guenter Roeck
2018-11-27 17:52     ` Greg Kroah-Hartman
2018-11-29  1:17       ` Guenter Roeck
2018-11-29  7:55         ` Greg Kroah-Hartman
2018-11-29 22:11           ` Enric Balletbo i Serra
2018-11-29 22:28             ` Guenter Roeck
2018-11-30  8:30             ` Greg Kroah-Hartman

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