devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add initial support for DA9150 Charger & Fuel-Gauge IC
@ 2014-06-11 11:11 Adam Thomson
  2014-06-11 11:11 ` [PATCH 1/8] mfd: Add support for DA9150 combined charger & fuel-gauge device Adam Thomson
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Adam Thomson @ 2014-06-11 11:11 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz, Jonathan Cameron,
	linux-iio-u79uwXL29TY76Z2rM5mHXA, Dmitry Eremin-Solenikov,
	David Woodhouse, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	support.opensource-WBD+wuPFNBhBDgjK7y7TUQ

This patch set adds initial support for the Dialog DA9150 Integrated Charger &
Fuel-Gauge IC. The device also provides GPIO and GPADC functionality.

In this patch set the following is provided:
 - MFD Core support and DT bindings documentation.
 - Fix to IIO framework (inkern.c, of_iio_channel_get_by_name()) to correctly
   return NULL for failure cases.
 - IIO GPADC support and DT bindings documentation.
 - Power Supply Charger support and DT bindings documentation.
 - Add Dialog vendor prefix for DT.

 To keep patch submission from being too large, support for GPIO and Fuel-Gauge
 will come after initial support patches are accepted.

 This patch set is baselined against the v3.15 kernel version.

Adam Thomson (8):
  mfd: Add support for DA9150 combined charger & fuel-gauge device
  mfd: da9150: Add DT binding documentation for core
  iio: of_iio_channel_get_by_name() returns non-null pointers for error
    legs
  iio: Add support for DA9150 GPADC
  iio: da9150: Add DT binding documentation for GPADC
  power: Add support for DA9150 Charger
  power: da9150: Add DT binding documentation for charger
  DT: Add vendor prefix for Dialog Semiconductor Ltd.

 .../devicetree/bindings/iio/da9150-gpadc.txt       |   16 +
 Documentation/devicetree/bindings/mfd/da9150.txt   |   53 +
 .../devicetree/bindings/power/da9150-charger.txt   |   29 +
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 drivers/iio/adc/Kconfig                            |    9 +
 drivers/iio/adc/Makefile                           |    1 +
 drivers/iio/adc/da9150-gpadc.c                     |  396 +++++++
 drivers/iio/inkern.c                               |    6 +-
 drivers/mfd/Kconfig                                |   12 +
 drivers/mfd/Makefile                               |    2 +
 drivers/mfd/da9150-core.c                          |  398 +++++++
 drivers/mfd/da9150-i2c.c                           |  268 +++++
 drivers/power/Kconfig                              |   23 +
 drivers/power/Makefile                             |    1 +
 drivers/power/da9150-charger.c                     |  790 +++++++++++++
 include/linux/mfd/da9150/charger.h                 |   58 +
 include/linux/mfd/da9150/core.h                    |  125 +++
 include/linux/mfd/da9150/gpadc.h                   |   71 ++
 include/linux/mfd/da9150/pdata.h                   |  148 +++
 include/linux/mfd/da9150/registers.h               | 1160 ++++++++++++++++++++
 20 files changed, 3565 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/da9150-gpadc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/da9150.txt
 create mode 100644 Documentation/devicetree/bindings/power/da9150-charger.txt
 create mode 100644 drivers/iio/adc/da9150-gpadc.c
 create mode 100644 drivers/mfd/da9150-core.c
 create mode 100644 drivers/mfd/da9150-i2c.c
 create mode 100644 drivers/power/da9150-charger.c
 create mode 100644 include/linux/mfd/da9150/charger.h
 create mode 100644 include/linux/mfd/da9150/core.h
 create mode 100644 include/linux/mfd/da9150/gpadc.h
 create mode 100644 include/linux/mfd/da9150/pdata.h
 create mode 100644 include/linux/mfd/da9150/registers.h

--
1.9.3

^ permalink raw reply	[flat|nested] 31+ messages in thread
* [PATCH v3 0/8] Add initial support for DA9150 Charger & Fuel-Gauge IC
@ 2014-09-23 10:53 Adam Thomson
       [not found] ` <cover.1411396718.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 31+ messages in thread
From: Adam Thomson @ 2014-09-23 10:53 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz, Jonathan Cameron,
	linux-iio-u79uwXL29TY76Z2rM5mHXA, Sebastian Reichel,
	Dmitry Eremin-Solenikov, David Woodhouse,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Grant Likely,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Morton, Joe Perches,
	linux-api-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	support.opensource-WBD+wuPFNBhBDgjK7y7TUQ

This patch set adds initial support for the Dialog DA9150 Integrated Charger &
Fuel-Gauge IC. The device also provides GPIO and GPADC functionality.

In this patch set the following is provided:
 - MFD Core support and DT bindings documentation.
 - IIO GPADC support and DT bindings documentation.
 - Power Supply Charger support and DT bindings documentation.
 - Update to MAINTAINERS file to add DA9150 files to Dialog support list.
 - Update to IIO ABI document to add info regarding input current readings.

To keep patch submission from being too large, support for GPIO and Fuel-Gauge
will come after initial support patches are accepted.

This patch set is baselined against the v3.17-rc6 kernel version.


Changes in v3:
- IRQ register and remove helper functions removed from MFD, deemed unnecessary.
  Drivers using helper functions updated to use direct calls to relevant
  kernel framework functions.
- MFD I2C file removed and code folded into -core file as requested.
- MFD core now buildable as driver module.
- Platform data structure definition moved into core header, pdata.h removed.
- Update functions in GPADC driver to be static, where appropriate.
- Change units of GPADC readings to match ABI documentation. Updates to charger
  driver also made to align with this modification.
- Refactor GPADC temp calculations to use scale & offset method.
- Scale values now returned as FRACTIONAL to allow for accurate conversion in
  user-space.
- Tidy up of GPADC scale, offset and raw functions to return from case statements
  with correct return types.
- Update GPADC channel macros naming to prefix with DA9150, prevent conflict.
- GPADC GPIO voltage readings actually in 6V range, updated accordingly.
- Addition to IIO ABI document to add details on input current readings.
- Small style updates to address comments.

Changes in v2:
 - Drop devicetree prefix patch as this is being dealt with separately.
 - IIO framework fix patch removed from set, has already been accepted/merged.
 - Use __ instead of _ for protecting #ifdefs in headers.
 - Moved private data & definitions to source files and remove unwanted headers.
 - Bug fix to EXPORT_SYMBOL for common functions in MFD core used by
   sub-devices, so they can be correctly built as kernel modules.
 - Removed unnecessary channels from GPADC IIO driver to simplify code.
 - For GPADC IIO driver, VBAT reading now provides scale and offset values as it
   is a linear scale.
 - GPADC read code refactored to make it tidier.
 - Remove use of flag to indicate GPADC availability. IIO framework should
   indicate need to defer if it's not yet instantiated.
 - Unwanted comments removed.
 - Removed conditional shutdown of device (Charger/MFD) as this is not needed.
 - Removed AC type supply from charger as device cannot differentiate. Now just
   uses USB supply type.
 - Removed use of invalid-tbat flag from platform data as it doesn't really add
   anything to the driver except forcing battery present status.
 - Bug fix for checking of usb_phy validity in Charger probe() function.
 - Addition of common IRQ release function to allow sub-devices to explicitly
   tidy up IRQs when devm clean up is too late.
 - Improved tidy up of resources in charger.
 - Fix location of IIO GPADC related devicetree binding document so it now
   resides correctly under 'adc' directory.
 - Add update to MAINTAINERS file to include these files in Dialog support list.

Adam Thomson (8):
  mfd: Add support for DA9150 combined charger & fuel-gauge device
  mfd: da9150: Add DT binding documentation for core
  iio: Add support for DA9150 GPADC
  iio: da9150: Add DT binding documentation for GPADC
  power: Add support for DA9150 Charger
  power: da9150: Add DT binding documentation for charger
  MAINTAINERS: Include DA9150 files in Dialog Semiconductor support
    list.
  iio: Add ABI documentation for input current readings

 Documentation/ABI/testing/sysfs-bus-iio            |   17 +
 .../devicetree/bindings/iio/adc/da9150-gpadc.txt   |   16 +
 Documentation/devicetree/bindings/mfd/da9150.txt   |   41 +
 .../devicetree/bindings/power/da9150-charger.txt   |   26 +
 MAINTAINERS                                        |    4 +
 drivers/iio/adc/Kconfig                            |    9 +
 drivers/iio/adc/Makefile                           |    1 +
 drivers/iio/adc/da9150-gpadc.c                     |  406 +++++++
 drivers/mfd/Kconfig                                |   12 +
 drivers/mfd/Makefile                               |    2 +-
 drivers/mfd/da9150-core.c                          |  413 +++++++
 drivers/power/Kconfig                              |   12 +
 drivers/power/Makefile                             |    1 +
 drivers/power/da9150-charger.c                     |  740 +++++++++++++
 include/linux/mfd/da9150/core.h                    |   68 ++
 include/linux/mfd/da9150/registers.h               | 1155 ++++++++++++++++++++
 16 files changed, 2922 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/da9150.txt
 create mode 100644 Documentation/devicetree/bindings/power/da9150-charger.txt
 create mode 100644 drivers/iio/adc/da9150-gpadc.c
 create mode 100644 drivers/mfd/da9150-core.c
 create mode 100644 drivers/power/da9150-charger.c
 create mode 100644 include/linux/mfd/da9150/core.h
 create mode 100644 include/linux/mfd/da9150/registers.h

--
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-09-27 10:33 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 11:11 [PATCH 0/8] Add initial support for DA9150 Charger & Fuel-Gauge IC Adam Thomson
2014-06-11 11:11 ` [PATCH 1/8] mfd: Add support for DA9150 combined charger & fuel-gauge device Adam Thomson
     [not found]   ` <bf472aa7fddd1e67a3d5b9024b5b621744146a27.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-15 19:49     ` Jonathan Cameron
     [not found]       ` <539DF8C6.8030009-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-06-16 13:12         ` Opensource [Adam Thomson]
     [not found]           ` <2E89032DDAA8B9408CB92943514A0337AB4FD95E-68WUHU125fLLPO1uwJ3ImwLouzNaz+3S@public.gmane.org>
2014-06-16 20:13             ` Jonathan Cameron
2014-06-21 11:38             ` Jonathan Cameron
2014-06-11 11:11 ` [PATCH 2/8] mfd: da9150: Add DT binding documentation for core Adam Thomson
2014-06-11 11:11 ` [PATCH 4/8] iio: Add support for DA9150 GPADC Adam Thomson
     [not found]   ` <3c1a7551c7deaeccdca731fa95f4349c57e04249.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-11 16:34     ` Jonathan Cameron
2014-06-11 16:56       ` Opensource [Adam Thomson]
     [not found]         ` <2E89032DDAA8B9408CB92943514A0337A56F5455-68WUHU125fLLPO1uwJ3ImwLouzNaz+3S@public.gmane.org>
2014-06-15 19:55           ` Jonathan Cameron
2014-06-15 20:19     ` Jonathan Cameron
     [not found]       ` <539DFFC8.3080406-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-06-16 15:58         ` Opensource [Adam Thomson]
     [not found]           ` <2E89032DDAA8B9408CB92943514A0337AB4FD9C7-68WUHU125fLLPO1uwJ3ImwLouzNaz+3S@public.gmane.org>
2014-06-21 11:29             ` Jonathan Cameron
2014-06-11 11:11 ` [PATCH 5/8] iio: da9150: Add DT binding documentation for GPADC Adam Thomson
     [not found] ` <cover.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-11 11:11   ` [PATCH 3/8] iio: of_iio_channel_get_by_name() returns non-null pointers for error legs Adam Thomson
     [not found]     ` <0e7c03b0467ae1eace9dafebe6946d01d48e72f2.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-15 20:20       ` Jonathan Cameron
     [not found]         ` <539E0001.60005-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-06-21 11:32           ` Jonathan Cameron
2014-06-11 11:11   ` [PATCH 6/8] power: Add support for DA9150 Charger Adam Thomson
     [not found]     ` <d4ef0d7ce2d6a2919d528ed75e82d2b99ec8d962.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-16 13:27       ` Lee Jones
2014-06-17  8:21         ` Opensource [Adam Thomson]
2014-06-11 11:11   ` [PATCH 7/8] power: da9150: Add DT binding documentation for charger Adam Thomson
2014-06-11 11:11   ` [PATCH 8/8] DT: Add vendor prefix for Dialog Semiconductor Ltd Adam Thomson
     [not found]     ` <bf4b6d7b061e66d3ca7f3dd44319b9e26ae7103f.1402484954.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-06-11 12:09       ` Geert Uytterhoeven
2014-06-11 12:43         ` Rob Herring
     [not found]           ` <CAL_JsqK0RqYuZ8YB1sBZK7hMXvp6oEPfAu11m95F61_kGV3Ptg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-11 13:01             ` Geert Uytterhoeven
2014-06-11 13:17             ` Opensource [Adam Thomson]
     [not found]               ` <2E89032DDAA8B9408CB92943514A0337A56F53A6-68WUHU125fLLPO1uwJ3ImwLouzNaz+3S@public.gmane.org>
2014-06-11 14:22                 ` Rob Herring
2014-06-11 13:31           ` Adam Thomson
  -- strict thread matches above, loose matches on Subject: below --
2014-09-23 10:53 [PATCH v3 0/8] Add initial support for DA9150 Charger & Fuel-Gauge IC Adam Thomson
     [not found] ` <cover.1411396718.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-09-23 10:53   ` [PATCH 1/8] mfd: Add support for DA9150 combined charger & fuel-gauge device Adam Thomson
     [not found]     ` <8fd576055fd9e4f8c75cba06d6ebb13fea670920.1411396719.git.Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org>
2014-09-27 10:33       ` Jonathan Cameron

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