Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1513736

[PATCH v4 0/6] Advantech iManager EC driver set

From Richard Vidal-Dorsch <richard.dorsch@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v4 0/6] Advantech iManager EC driver set
Date 2016-11-02 09:40 +0100
Message-ID <syZfr-3TD-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The Advantech iManager is a custom embedded controller based on ITE IT8518
or IT8528 EC (depending on PCB). It runs a custom firmware that provides
access to features such as GPIO, I2C/SMbus, hwmon, watchdog, and
backlight/brightness control.  All drivers are being managed by the
iManager (mfd) core driver.  It acts as a 'gateway' and handles
communications between EC and sub-drivers.  The imanager-core follows a
similar concept as Kontron's kempld-core driver.
During core init, the device id list is retrieved from the firmware and an
internal device list is being created. This list is then passed down to
managed drivers.

The out-of-tree iManager driver set is maintained at
https://www.github.com/rvido/iManager

Notebook manufactures such as Dell (XPS series) or Razerzone (Razer Blade)
are using similar ITE ECs or even the same ones to implement their own
embedded functions.  Due to the level of firmware customization which those
ITE ECs provide, the iManager EC driver set is incompatible with those
vendors solutions (and probably others too).

Note that v1..v3 were submitted in Jan. 2016.  It took some time to apply
suggested changes.  However, I kept the original versioning to avoid conflict
with previous patch submissions.

Thanks to Krzysztof Kozłowski, Guenter Roeck, and Lee Jones for their
invaluable feedback.  Those drivers clearly needed to be further improved
and cleaned.

Changes from v3:
- Merge imanager-ec-* with corresponding drivers
  This eliminates static init vars and reduces code size
- Remove Documentation/devicetree/bindings/mfd/imanager.txt
  No support for DT
- Add API comments
- List include files in alphabetic order
- Run patches through ./scripts/checkpatch.pl --strict
- Remove headers except imanger.h/imanager-ec.h
  Store them in include/linux/mfd/
imanager-core:
  - Reduce amount of exported functions in core
  - Use usleep_range() instead of udelay()
  - Use dev_info() or dev_warn() where necessary
  - Fix register/probing and __init/__exit
  - Optimize imanager_read_device_config()
  - Shrink down EC device table to known and supported devices
  - Define flags with BIT()
  - Use new imanager device struct
i2c-imanager:
  - Add support for multiple I2C/SMbus adapters
  - Use new imanager device struct
imanager-hwmon-*
gpio-imanager:
imanager_bl:
imanager_wdt:
  - Define flags with BIT()
  - Use new imanager device struct

Changes from v2:
- Remove .owner from platform_driver in:
  drivers/gpio/imanager-bl
  drivers/gpio/imanager-core.c
  drivers/gpio/imanager-i2c.c
  drivers/gpio/imanager-hwmon.c

Changes from v1:
- Remove .owner from platform_driver in drivers/gpio/imanager-gpio.c
- Remove .owner from platform_driver in drivers/gpio/imanager-wdt.c
- Replace 2015 by 2016 in all files

Richard Vidal-Dorsch (6):
  Add Advantech iManager MFD core driver
  Add Advantech iManager GPIO driver
  Add Advantech iManager HWmon driver
  Add Advantech iManager I2C driver
  Add Advantech iManager Backlight driver
  Add Advantech iManager Watchdog driver

 drivers/gpio/Kconfig                  |   10 +
 drivers/gpio/Makefile                 |    1 +
 drivers/gpio/gpio-imanager.c          |  155 +++++
 drivers/hwmon/Kconfig                 |   11 +
 drivers/hwmon/Makefile                |    1 +
 drivers/hwmon/imanager-hwmon.c        | 1226 +++++++++++++++++++++++++++++++++
 drivers/i2c/busses/Kconfig            |   10 +
 drivers/i2c/busses/Makefile           |    1 +
 drivers/i2c/busses/i2c-imanager.c     |  461 +++++++++++++
 drivers/mfd/Kconfig                   |   18 +
 drivers/mfd/Makefile                  |    1 +
 drivers/mfd/imanager-core.c           |  941 +++++++++++++++++++++++++
 drivers/video/backlight/Kconfig       |    8 +
 drivers/video/backlight/Makefile      |    1 +
 drivers/video/backlight/imanager_bl.c |  210 ++++++
 drivers/watchdog/Kconfig              |   11 +
 drivers/watchdog/Makefile             |    1 +
 drivers/watchdog/imanager_wdt.c       |  303 ++++++++
 include/linux/mfd/imanager-ec.h       |  228 ++++++
 include/linux/mfd/imanager.h          |  221 ++++++
 20 files changed, 3819 insertions(+)
 create mode 100644 drivers/gpio/gpio-imanager.c
 create mode 100644 drivers/hwmon/imanager-hwmon.c
 create mode 100644 drivers/i2c/busses/i2c-imanager.c
 create mode 100644 drivers/mfd/imanager-core.c
 create mode 100644 drivers/video/backlight/imanager_bl.c
 create mode 100644 drivers/watchdog/imanager_wdt.c
 create mode 100644 include/linux/mfd/imanager-ec.h
 create mode 100644 include/linux/mfd/imanager.h

-- 
2.10.1

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/6] Advantech iManager EC driver set Richard Vidal-Dorsch <richard.dorsch@gmail.com> - 2016-11-02 09:40 +0100
  [PATCH v4 6/6] Add Advantech iManager Watchdog driver Richard Vidal-Dorsch <richard.dorsch@gmail.com> - 2016-11-02 09:40 +0100
  [PATCH v4 5/6] Add Advantech iManager Backlight driver Richard Vidal-Dorsch <richard.dorsch@gmail.com> - 2016-11-02 09:50 +0100
  [PATCH v4 2/6] Add Advantech iManager GPIO driver Richard Vidal-Dorsch <richard.dorsch@gmail.com> - 2016-11-02 09:50 +0100
    Re: [PATCH v4 2/6] Add Advantech iManager GPIO driver Linus Walleij <linus.walleij@linaro.org> - 2016-11-05 09:40 +0100
  [PATCH v4 4/6] Add Advantech iManager I2C driver Richard Vidal-Dorsch <richard.dorsch@gmail.com> - 2016-11-02 09:50 +0100
  Re: [PATCH v4 1/6] Add Advantech iManager MFD core driver Lee Jones <lee.jones@linaro.org> - 2016-11-03 09:40 +0100

csiph-web