1
0
Fork 0
Commit Graph

13 Commits (redonkable)

Author SHA1 Message Date
Arnd Bergmann 054814b863 mfd: tps65912: Move regmap config into core driver
When building with extra warnings enabled, most files including
linux/mfd/tps65912.h warn about a static variable defined in the
header:

include/linux/mfd/tps65912.h:331:35: warning: 'tps65912_regmap_config' defined but not used [-Wunused-const-variable=]

We also duplicate the data structure between the i2c and spi front-end
drivers. Moving it into the driver code avoids the warning and
the duplication.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-11-29 08:21:21 +00:00
Andrew F. Davis 796f5692da mfd: tps65912: Add driver for the TPS65912 PMIC
This patch adds support for TPS65912 PMIC MFD core. It provides
communication through the I2C and SPI interfaces. It contains
the following components:

 - Regulators
 - GPIO controller

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-02-11 16:30:59 +00:00
Andrew F. Davis 65b6555971 mfd: tps65912: Remove old driver in preparation for new driver
The old tps65912 driver is being replaced, delete old driver.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-02-11 16:30:31 +00:00
Paul Gortmaker 3c699105d0 mfd: Delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:07 +00:00
Geert Uytterhoeven 30fe2b5bd5 mfd: ti: Constify struct mfd_cell where possible
As of commit 03e361b25e ("mfd: Stop setting
refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
mfd_add_devices() is "const" again. Hence make all cell data passed to
mfd_add_devices() const where possible.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-06 09:13:29 +00:00
Jingoo Han 334a41ce9b mfd: Use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-07-31 13:01:29 +01:00
Lee Jones b3fff1770a mfd: tps65912: Convert to managed resources for allocating memory
Saves on code and simplifies the driver, as these resources are now
tracked and freed automatically when the driver is realised.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13 12:11:39 +02:00
Mark Brown 80e4e6716e mfd: tps65912: Declare and use tps65912_irq_exit()
Clean up interrupts on exit, silencing a sparse warning caused by
tps65912_irq_exit() being defined but not prototyped as we go.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-03-12 09:25:50 +01:00
Mark Brown 0848c94fb4 mfd: core: Push irqdomain mapping out into devices
Currently the MFD core supports remapping MFD cell interrupts using an
irqdomain but only if the MFD is being instantiated using device tree
and only if the device tree bindings use the pattern of registering IPs
in the device tree with compatible properties.  This will be actively
harmful for drivers which support non-DT platforms and use this pattern
for their DT bindings as it will mean that the core will silently change
remapping behaviour and it is also limiting for drivers which don't do
DT with this particular pattern.  There is also a potential fragility if
there are interrupts not associated with MFD cells and all the cells are
omitted from the device tree for some reason.

Instead change the code to take an IRQ domain as an optional argument,
allowing drivers to take the decision about the parent domain for their
interrupts.  The one current user of this feature is ab8500-core, it has
the domain lookup pushed out into the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-15 23:22:04 +02:00
Axel Lin d5f39d3862 mfd: Initialize tps65912 irq platform data properly
irq_base of the tps65912 irq platform data should be
initialized with the board provided irq_base data.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-02-23 17:38:10 +01:00
Jesper Juhl 677df0c901 mfd: Do not leak init_data in tps65912_device_init()
We neglect to free init_data on successful exit.  I also moved two
assignments to just before they are needed.  This avoids doing them in
case we hit an earlier error exit from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-10-24 14:09:15 +02:00
Margarita Olaya d49a0f3f14 tps65912: irq: add interrupt controller
This module controls the interrupt handling for the tps65912.
The interrupt sources can be the following:

- GPIO
- PWRON signal
- PWRHOLD signal
- Temperature detection

Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31 23:28:22 +02:00
Margarita Olaya 36e52873c6 mfd: tps65912: Add new mfd device
The tps65912 chip is a power management IC. It contains the following
components:

- Regulators
- GPIO controller

The core driver is registered as a platform driver, it provides communication
through I2C and SPI interfaces.

Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31 23:28:22 +02:00