[PATCH v8 0/3] Introduce Embedded Controller driver for Acer A500
From: Dmitry Osipenko
Date: Mon Dec 28 2020 - 11:07:44 EST
This series adds support for the Embedded Controller which is found on
Acer Iconia Tab A500 (Android tablet device).
The Embedded Controller is ENE KB930 and it's running firmware customized
for the A500. The firmware interface may be reused by some other sibling
Acer tablets, although none of those tablets are supported in upstream yet.
Changelog:
v8: - This series partially missed v5.11 kernel release, hence resending
for v5.12.
Please note that Thierry Reding already applied the v7 DT patch which
added the EC node to the Acer A500 device-tree, this change presents
in v5.11.
v7: - Improved MFD Kconfig entry by adding explicit dependency on OF and
by rewording the help message, matching it to the other MFD drivers.
- Improved comments in the code by removing unnecessary comments, adding
necessary and rewording some others.
- Added expressive defines for the command opcodes.
- Fixed alphabet order of the MFD driver includes.
- Removed unnecessary size checks which are already done by regmap core.
- Renamed 'rmap' variable to 'regmap'.
v6: - Fixed dtschema-checker warning about a wrong indentation, reported
by kernel bot for v5.
v5: - No changes. Re-sending again in order to check whether dtschema-bot
warning is resolved now, which didn't happen in v4 because bot used
older 5.9 kernel code base instead of 5.10.
v4: - No code changes. Added r-b from Rob Herring and Sebastian Reichel.
Re-sending for 5.11.
- The v3 of LED driver was applied by Pavel Machek and already presents
in v5.10 kernel.
v3: - Rebased on a recent linux-next. Fixed new merge conflict and dropped
"regmap: Use flexible sleep" patch because it's already applied.
v2: - Factored out KB930 device-tree binding into a separate file, like it
was suggested by Lubomir Rintel.
- Switched to use regmap API like it was suggested by Lubomir Rintel.
- Added patch "regmap: Use flexible sleep" which allows not to hog
CPU while LED is switching state.
- Corrected MODULE_LICENSE to use "GPL" in all patches.
- Corrected MFD driver Kconfig entry like it was suggested by
Lubomir Rintel, it now depends on I2C.
- Switched to use I2C probe_new() in the MFD driver.
- Renamed the global pm_off variable, like it was suggested by
Lubomir Rintel and Lee Jones.
- Dropped serial number from the battery driver because I realized
that it's not a battery serial, but a device serial.
- Battery driver now uses dev_err_probe(), like it was suggested by
Sebastian Reichel.
- Dropped legacy LED_ON usage from the LED driver and renamed the
LEDs, like it was suggested by Pavel Machek. I also checked whether
LED-name customization via device-tree could be needed by other
potentially compatible devices and it shouldn't be needed, anyways it
won't be difficult to extend the code even if I'm wrong.
Dmitry Osipenko (3):
dt-bindings: mfd: Add ENE KB930 Embedded Controller binding
mfd: Add driver for Embedded Controller found on Acer Iconia Tab A500
power: supply: Add battery gauge driver for Acer Iconia Tab A500
.../devicetree/bindings/mfd/ene-kb930.yaml | 65 ++++
drivers/mfd/Kconfig | 11 +
drivers/mfd/Makefile | 1 +
drivers/mfd/acer-ec-a500.c | 202 ++++++++++++
drivers/power/supply/Kconfig | 6 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/acer_a500_battery.c | 297 ++++++++++++++++++
7 files changed, 583 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml
create mode 100644 drivers/mfd/acer-ec-a500.c
create mode 100644 drivers/power/supply/acer_a500_battery.c
--
2.29.2