misc: Add power-efuse driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/22 patches 11 repliesIn review
- v2 posting 1/21 patch 1 replyApplied
- v14 patches 10 repliesSuperseded
Changes in v2 from the cover letter
- dropped pmbus/lm25066 patches, submitted separately via hwmon tree [Guenter]
- fixed indentation in power-efuse.yaml [Rob's bot]
- added more detailed description in power-efuse.yaml [Rob]
- added sysfs ABI documentation [Greg]
- replaced manual struct attribute_group and sysfs_create_group() with ATTRIBUTE_GROUPS() and driver.dev_groups [Greg]
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | dt-bindings: Add power-efuse bindingDocumentation/ | +49 | 4 replies | |
| 2/2 | misc: Add power-efuse driverDocumentation/ MAINTAINERS drivers/ +2 more | +265 | 7 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] misc: Add power-efuse driver
Hello,
This is a second revision of the v1 patch series posted previously [2].
Changes since v1:
- dropped pmbus/lm25066 patches, submitted separately via hwmon tree [Guenter]
- fixed indentation in power-efuse.yaml [Rob's bot]
- added more detailed description in power-efuse.yaml [Rob]
- added sysfs ABI documentation [Greg]
- replaced manual struct attribute_group and sysfs_create_group() with ATTRIBUTE_GROUPS() and driver.dev_groups [Greg]
A lightly edited version of the previous cover letter follows.
This patch series is another incarnation of some previous efforts [0] at enabling userspace access to the OPERATION state (and now status flags) of PMBus devices, specifically with respect to efuses protecting general-purpose power outputs. This functionality is an important component enabling a port of OpenBMC to the Delta AHE-50DC Open19 power shelf [1].
The first patch adds dt-bindings, and the second adds the implementation of the power-efuse driver. The driver is fairly simple; it merely provides a sysfs interface to enable, disable, and retrieve error flags from an underlying regulator (which in the expected usage will most likely be a PMBus device).
There is one aspect of its usage of the regulator API I'm a bit uncertain about, however: this driver seems like a case where an exclusive 'get' of the regulator (i.e. devm_regulator_get_exclusive() instead of devm_regulator_get() in efuse_probe()) would be appropriate, since in the intended usage no other device should be using an efuse's regulator. With an exclusive get though, the regulator's use_count and the consumer's enable_count don't balance out properly to allow the enable/disable operations to work properly (the former ending up one more than the latter, leading to enable_count underflows on attempts to disable the regulator). So at least for now it's using a non-exclusive get -- I'd be happy to hear any pointers on a way to allow an exclusive get to work here, though.
Thanks,
Zev
[0] https://lore.kernel.org/openbmc/[email protected]/
[1] https://www.open19.org/marketplace/delta-16kw-power-shelf/
[2] https://lore.kernel.org/openbmc/[email protected]/
Zev Weiss (2):
dt-bindings: Add power-efuse binding
misc: Add power-efuse driver
.../ABI/testing/sysfs-driver-power-efuse | 32 +++ .../devicetree/bindings/misc/power-efuse.yaml | 49 ++++ MAINTAINERS | 5 + drivers/misc/Kconfig | 15 ++ drivers/misc/Makefile | 1 + drivers/misc/power-efuse.c | 212 ++++++++++++++++++ 6 files changed, 314 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-power-efuse create mode 100644 Documentation/devicetree/bindings/misc/power-efuse.yaml create mode 100644 drivers/misc/power-efuse.c
Signature · 1 line
2.35.1