Commit Graph

332 Commits

Author SHA1 Message Date
Carlo Caione cfb61a4196 mfd: AXP20x: Add mfd driver for AXP20x PMIC
This patch introduces the preliminary support for PMICs X-Powers AXP202
and AXP209. The AXP209 and AXP202 are the PMUs (Power Management Unit)
used by A10, A13 and A20 SoCs and developed by X-Powers, a sister company
of Allwinner.

The core enables support for two subsystems:
- PEK (Power Enable Key)
- Regulators

Signed-off-by: Carlo Caione <carlo@caione.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-03 08:11:25 +01:00
Lee Jones 28fee3fa0e Immutable branch between MFD and Extcon due for v3.16 merge-window.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTV7vmAAoJEFGvii+H/HdhStcQAIPXONkcTtnRijYYVo4+zMfY
 5lyEc7bpboK3FJW0SrSM3gt6jSjFayz7HN+oVd5ez73XYlKr+X4oap6GD1VnP+r2
 d2kc0ccfRa5oMPdeth0xabwmXnG2Cm3i3EwLGZAjxRAI72nmmTJu08HSWYSw9tBs
 oxKLuuYNhdIRAoEHrA5wyymb4fq2AdQrdNGEXZ9utZEK7z0+DRxD3LxeNEiW8dU2
 pU9XXlEbp9gQKsyiRL+MPxuFH7C7QpaQN1aryKupHEHtuRPjxqIsXETUsmxGt+sQ
 P3jN3FayYRYknqWSda+/lgEjkzw0CgeLFpR13emt5P2K8K8NPcV17mHhggWxFaes
 iGPi9cgotV9X2zxAgayAusunPRHEQ8Yz7bnQsXBuH04CbBgnu53gBUQyELQhJ2xO
 HBG6VVn5kXCpb80OWX/lTefEIN3yfuH15eV/cmBk3Qu6qqVFjCg6cBqi2b5QFPYN
 8ks/58ewbhKqh+T+yr7N70sXIfOF9aBIqREdnlp/uXaCYLkylSNaUPpxZTllDUnE
 QoJVTMwb/BgGKolhpfwva2UkVPt5C50w1+mNLh05d9IMF/C9kyQMcsC7rOa229LU
 XwtDoWFUTMzjNqTRBTLdElfkEnEET07xDvv3SQTAj30eTCaQs0+gxDMNSrDN/0zN
 u6uUTp1grfVVOoz1FPcS
 =q4Ul
 -----END PGP SIGNATURE-----
mergetag object a613b739b8
 type commit
 tag ib-mfd-omap-3.16
 tagger Lee Jones <lee.jones@linaro.org> 1398263769 +0100
 
 Immutable branch between MFD and ARM OMAP due for v3.16 merge-window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTV9ADAAoJEFGvii+H/HdhPhkP/1Xoc6APceeJaX8jOmx0rxzQ
 PhYl3er5b3eYtxgGR8s8FrdVrYNyEytGZtMoQN3EYhVnq/ZvbPkR8zMruDszUHYP
 PBfcZJi4GBJIAQU30a8Dvla8UtFaph+IoxSd6E4hSIvb+UFjSvi9ZjQYX82gFop4
 TLeAPW4byQP2YKSkDUq5WzzMLbjQ+ZanJSrueYXmu4VOVgtA0+nBWVj5B8PD1m+O
 2Sp2vhdCPCgIsChQZl3i9h2HroUtomnNWeCdv0YzOwISlvUv+aBg7khK35Jtw7v3
 YeAx3YelQ3z2dnFS/ddEvLKthuTV5BfyGq+dJjMwBLrOv81rzHFBYLCRiABB0RgD
 EUEAv3IJ31SpjrsO0uXnGFp69gMsJgOwLRcjM8TfUi+Wd4YQcbl/tCYX2k7voJ6u
 fbpqarr1zgZpV7r1cX2ivsm8VY2bzQ7p2Dh681oQtHyM+RC94dVvGS0cAaVlnhYY
 MtJWEdtpY3hRcx5qVE8+8wf5RYyXjluhme1EGhO8VL13hMw7ofmtfl2OKN4WAsYO
 KIDMTVJ9RneUQQ6FOx270x17Gp01vxoHIV6pBMi7Uo65l7xrs2YEfgUJhp4eCVXT
 dD4appF5q090UwD7lYADztQZ8RB5GLELZH6Vkpw3qPtfqM97zSy9IFMzTxn446ic
 vdktkG6GJab2vg3mLxDf
 =izRQ
 -----END PGP SIGNATURE-----
mergetag object c42ba72ec3
 type commit
 tag ib-mfd-regulator-3.16
 tagger Lee Jones <lee.jones@linaro.org> 1398675220 +0100
 
 Immutable branch between MFD and Regulator due for v3.16 merge-window.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTXhcuAAoJEFGvii+H/HdhoJEQAI15rEldcSpzLCYiinEfiKUI
 d+6zn5Gx6pKtkfCWdplHxM82Fe5H/kbgCLq+SSCQ6DFrOGXC34i4JnmhdCvcaU/K
 OEtXsG1i2PNzJwMFcnXVW5wD6LnS/b+243XtBtfQ887j9A1R2tEM9ka+i5AP3+O2
 NoBT9DshWWnj16CRJbMMFgNqDI6+QUoirgKzOXLp9stuzrThYU7kaluyMmMUREAx
 tXl8jOBH2Nu0YBiVi6Cgn1xNqtX0Snc9UU1QcugJzuPtyseFsQGUp1cP/ahmeP0y
 EFzKoDbKpag1BV/IEsKWfiD6KEEPFd3IUcZugXIhlRKSGsEcIRTeu6PBFMq9FssF
 hfajzbTw7aDFmYq3Ifc4V6MGtalnCoJz0bsM5XA1voWqXJ+9Tqp4p/5xbJVn2ObA
 /e8k5ljeRH+PBuRKrxgmJJUP3n/QXlJMZ+IrI3BTSeMLu2xZ1U95ynbHO8s3Dxdd
 CpX4xbDq82cBn+JNG3K9+l8XTZUdaWwEQ18VylVcbBdEa4jS2lMyYKIFCJiERLNt
 LCD6hzMGjF7/qVeXhi9AyITEe1XrFSjeTv8WH2R3C4vVXLcjQ3bCnWTFlszbGBsK
 /H0dUWg0HofMrR/oATydWtrgj5F+1aEIdZZqDU0hUCvC849c62zprqXUe7TbP6FT
 yvAlikr5PGMIWw89DCn1
 =NGmT
 -----END PGP SIGNATURE-----

Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16', 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16', 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into ibs-for-mfd-merged
2014-06-03 08:08:40 +01:00
Linus Walleij 5a826feedc mfd: stmpe: Probe properly from the Device Tree
The current STMPE I2C probing code does not really match the
compatible strings - it matches node names happening to give
the right device name. Instead, let's introduce some real
compatible matching, more complex, more accurate. Make the
driver depend on OF since all platforms using it are DT-only.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-05-09 10:51:09 +01:00
Krzysztof Kozlowski aee2a57c74 mfd: max77836: Add MAX77836 support to max14577 driver
Add Maxim 77836 support to max14577 driver. The chipsets have same MUIC
component so the extcon, charger and regulators are almost the same. The
MAX77836 however has also PMIC and Fuel Gauge.

The MAX77836 uses three I2C slave addresses and has additional interrupts
(related to PMIC and Fuel Gauge). It has also Interrupt Source register,
just like MAX77686 and MAX77693.

The MAX77836 PMIC's TOPSYS and INTSRC interrupts are reported in the
PMIC block. The PMIC block has different I2C slave address and uses own
regmap so another regmap_irq_chip is needed.

Since we have two regmap_irq_chip, use shared interrupts on MAX77836.

This patch adds additional defines and functions to the max14577 MFD core
driver so the driver will handle both chipsets. Also this patch replaces
"0x1 << N" with BIT(N) in defines for register masks.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-04-23 14:08:54 +01:00
Arnd Bergmann 3033ee62c0 mfd: Remove obsolete ti-ssp driver
The tnetv107x platform is getting removed, so this driver
is not needed any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 09:00:07 +00:00
Matt Porter 037b60f2ca mfd: Add bcm590xx pmu driver
Add a driver for the BCM590xx PMU multi-function devices. The driver
initially supports regmap initialization and instantiation of the
voltage regulator device function of the PMU.

Signed-off-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:59:59 +00:00
Krzysztof Kozlowski 0c8a9dea21 mfd: max14577: Select REGMAP_IRQ
MAXIM 14577 MFD driver uses the regmap_irq_chip so it's Kconfig entry
should select REGMAP_IRQ.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:59:58 +00:00
Lee Jones 2d5d366a08 mfd: tps65218: Fix reported randconfig error
Reported error was:
  ERROR: "regmap_del_irq_chip" [drivers/mfd/tps65218.ko] undefined!
    when CONFIG_REGMAP_IRQ is not enabled.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:42 +00:00
Stephen Boyd 549f8db793 mfd: pm8921: Loosen Kconfig dependency
Allow this driver to be compiled on all ARM builds as it doesn't
rely on anything within arm/mach-msm.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:32 +00:00
Stephen Boyd e7b81fca7d mfd: pm8921: Use ssbi regmap
Use a regmap so that the pm8xxx read/write APIs can be removed
once all consumer drivers are converted.

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:31 +00:00
Stephen Boyd dc1a95ccaa mfd: pm8921: Migrate to irqdomains
Convert this driver to use irqdomains so that the PMIC's child
devices can be converted to devicetree.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2014-03-19 08:58:29 +00:00
Stephen Boyd cced3548ba mfd: pm8921: Update for genirq changes
Since this code has been marked broken for some time a few genirq
tree wide changes weren't made. set_irq_wake() was renamed to
irq_set_irq_wake() in commit a0cd9ca2b (genirq: Namespace
cleanup, 2011-02-10) and commit 10a8c383 (irq: introduce entry
and exit functions for chained handlers) introduced the chained
irq functions but this driver wasn't updated to use them. Fix
these problems and remove the BROKEN marking on this driver.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:29 +00:00
Stephen Boyd bc866fc7a8 mfd: pm8xxx: Move pm8xxx-irq.c contents into only driver that uses it
The pm8xxx-irq.c code is practically mandatory given that the
pm8921-core driver will WARN about it missing and the Kconfig
marks it as default y when a PM8xxx chips is enabled. The only
reason the file was split out was because we planned to support
other pm8xxx chips with different pm8xxx-core.c files. Now that
we have DT on ARM this isn't necessary because we should be able
to support all the ssbi based PM8xxx chips in one driver and one
file with no data bloat. Let's move this code into the only
driver that uses it right now (pm8921) so that it's always compiled when
needed. In the future we can rename pm8921-core.c to something
more generic.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:28 +00:00
Michael Brunner a3ee75092e mfd: kempld: Add support for COMe-mBT10, COMe-cBT6 and COMe-cHL6 to Kontron PLD driver
This patch adds DMI system IDs for the Kontron modules COMe-mBT10, COMe-cBT6
and COMe-cHL6 to the Kontron PLD driver. The list of supported products in
the module description is also updated.

Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Acked-by: Christian Rauch <christian.rauch@kontron.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:24 +00:00
Roger Tseng 730876be25 mfd: Add realtek USB card reader driver
Realtek USB card reader provides a channel to transfer command or data to flash
memory cards. This driver exports host instances for mmc and memstick subsystems
and handles basic works.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:18 +00:00
Laszlo Papp 921a1b0c1a mfd: Trivial: Fix a grammar issues in MFD Kconfig
s/to support for/to add support for/

Signed-off-by: Laszlo Papp <lpapp@kde.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:14 +00:00
Keerthy 44b4dc6163 mfd: tps65218: Add driver for the TPS65218 PMIC
The TPS65218 chip is a power management IC for Portable Navigation Systems
and Tablet Computing devices. It contains the following components:

 - Regulators.
 - Over Temperature warning and Shut down.

This patch adds support for tps65218 mfd device. At this time only
the regulator functionality is made available.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:06 +00:00
Linus Walleij a6e6e660ba mfd: Include all drivers in subsystem menu
It is currently not possible to select the SA1100 or Vexpress
drivers in the MFD subsystem, because the menu for the entire
subsystem ends before these options are presented.

Move the main menu closing and the endif for HAS_IOMEM to the
end of the file so these are selectable again.

Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:01 +00:00
Sebastian Reichel b2931b98ce mfd: twl4030-madc: Move driver to drivers/iio/adc
This is a driver for an A/D converter, which belongs into
drivers/iio/adc.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:16:20 +00:00
Alexander Shiyan e5a3da2143 mfd: mc13xxx: Remove useless symbol MFD_MC13783
Symbol MFD_MC13783 always selected by MFD_MC13XXX, so no need
to keep additional symbol.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:09 +00:00
Thierry Reding fcfccdb22f mfd: cros ec: spi: Depend on OF
The driver is not used on any non-DT platform, so it can depend on the
OF Kconfig symbol to make that explicit. This is in preparation of a
subsequent patch which parses some parameters from the device tree and
would otherwise have to conditionalize that code.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:04 +00:00
Milo Kim 470eca47bd mfd: Add LP3943 MFD driver
LP3943 has 16 output pins which can be used as GPIO expander and PWM generator.

* Regmap I2C interface for R/W LP3943 registers

* Atomic operations for output pin assignment
  The driver should check whether requested pin is available or not.
  If the pin is already used, pin request returns as a failure.
  A driver data, 'pin_used' is checked when gpio_request() and
  pwm_request() are called. If the pin is available, then pin_used is set.
  And it is cleared when gpio_free() and pwm_free().

* Device tree support
  Compatible strings for GPIO and PWM driver.
  LP3943 platform data is PWM related, so parsing the device tree is
  implemented in the PWM driver.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:27:59 +00:00
Chanwoo Choi 3008ddbe06 mfd: max14577: Add max14577 MFD driver core
This patch adds max14577 core/irq driver to support MUIC(Micro USB IC)
device and charger device and support irq domain method to control
internal interrupt of max14577 device. Also, this patch supports DT
binding with max14577_i2c_parse_dt().

The MAXIM 14577 chip contains Micro-USB Interface Circuit and Li+ Battery
Charger. It contains accessory and USB charger detection logic. It supports
USB 2.0 Hi-Speed, UART and stereo audio signals over Micro-USB connector.

The battery charger is compliant with the USB Battery Charging Specification
Revision 1.1. It has also SFOUT LDO output for powering USB devices.

Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:13:36 +00:00
Michal Marek 72ac01274a mfd: Make MFD_AS3722 depend on I2C=y
MFD_AS3722 can only be builtin, so it needs I2C builtin as well.
With I2C=m, we get:

drivers/mfd/as3722.c:372: undefined reference to `devm_regmap_init_i2c'
drivers/built-in.o: In function `as3722_i2c_driver_init':
drivers/mfd/as3722.c:444: undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `as3722_i2c_driver_exit':
drivers/mfd/as3722.c:444: undefined reference to `i2c_del_driver'

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-11-26 09:12:19 +00:00
Linus Torvalds 9073e1a804 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "Usual earth-shaking, news-breaking, rocket science pile from
  trivial.git"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
  doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
  doc: add missing files to timers/00-INDEX
  timekeeping: Fix some trivial typos in comments
  mm: Fix some trivial typos in comments
  irq: Fix some trivial typos in comments
  NUMA: fix typos in Kconfig help text
  mm: update 00-INDEX
  doc: Documentation/DMA-attributes.txt fix typo
  DRM: comment: `halve' -> `half'
  Docs: Kconfig: `devlopers' -> `developers'
  doc: typo on word accounting in kprobes.c in mutliple architectures
  treewide: fix "usefull" typo
  treewide: fix "distingush" typo
  mm/Kconfig: Grammar s/an/a/
  kexec: Typo s/the/then/
  Documentation/kvm: Update cpuid documentation for steal time and pv eoi
  treewide: Fix common typo in "identify"
  __page_to_pfn: Fix typo in comment
  Correct some typos for word frequency
  clk: fixed-factor: Fix a trivial typo
  ...
2013-11-15 16:47:22 -08:00
Laxman Dewangan d460a6f3d6 mfd: Add support for ams AS3722 PMIC
The ams AS3722 is a compact system PMU suitable for mobile phones,
tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
controller, 11 LDOs, RTC, automatic battery, temperature and
over-current monitoring, 8 GPIOs, ADC and a watchdog.

Add MFD core driver for the AS3722 to support core functionality.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Florian Lobmaier <florian.lobmaier@ams.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-10-23 16:22:33 +01:00
Linus Walleij 60013b94d9 mfd: Add STw481x driver
This adds a driver for the STw481x PMICs found in the Nomadik
family of platforms. This one uses pure device tree probing.
Print some of the OTP registers on boot and register a regulator
MFD child.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-10-23 16:21:12 +01:00
Masanari Iida 8c88126bbb treewide: Fix typo in Kconfig
Correct spelling typo in Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 15:23:02 +02:00
Martin Schwidefsky 0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Krystian Garbaciak 8e685483b0 mfd: da9063: Add Dialog DA9063 core driver
This is MFD module providing access to registers and interrupts of DA906x
series PMIC. It is used by other functional modules, registered as MFD cells.
Driver uses regmap with paging to access extended register list. Register map
is divided into two pages, where the second page is used during initialisation.

This module provides support to following functional cells:
 - Regulators
 - RTC
 - HWMON
 - OnKey (power key misc input device)
 - Vibration (force-feedback input device)
 - Watchdog
 - LEDs

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 03:15:52 +02:00
Mark Brown ca16ecbccb mfd: wm8997: Make Kconfig prompt for WM8997 more consistent
The Kconfig prompt for WM8997 says "Support for..." while the other MFD
Kconfigs (including the adjacent ones for other Arizona devices) just
list the device name which sticks out like a sore thumb when doing
configuration.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-07-31 02:04:18 +02:00
Tomasz Figa 443c6ae253 mfd: max8998: Add irq domain support
This patch adds irq domain support for max8998 interrupts.

To keep both non-DT and DT worlds happy, simple domain is used, which is
linear when no explicit IRQ base is specified and legacy, with static
mapping, otherwise.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-30 23:29:44 +02:00
Kevin Strasser 43620a1794 mfd: Kontron PLD mfd driver
Add core MFD driver for the on-board PLD found on some Kontron embedded
modules. The PLD device may provide functions like watchdog, GPIO, UART
and I2C bus.

The following modules are supported:
	* COMe-bIP#
	* COMe-bPC2 (ETXexpress-PC)
	* COMe-bSC# (ETXexpress-SC T#)
	* COMe-cCT6
	* COMe-cDC2 (microETXexpress-DC)
	* COMe-cPC2 (microETXexpress-PC)
	* COMe-mCT10
	* ETX-OH

Originally-From: Michael Brunner <michael.brunner@kontron.com>
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-24 13:48:22 +02:00
Pawel Moll 8eb12b9816 mfd: vexpress: Make the driver optional for arm and arm64
The driver can be used on either arm or arm64 platforms, but
the latter doesn't have any platform-specific configuration
options, so it must be possible to manually enable the driver.

As the gpiolib is optional for arm64 arch, the gpio/led code
must be compiled conditionally.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-19 11:32:00 +02:00
Charles Keepax dc7d48635d mfd: arizona: Integrate wm8997 into Arizona mfd
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus
interfacing, for smartphones, tablets and other portable audio devices
based on the Arizona platform.

This patch integrates the wm8997 into the Arizona mfd.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18 00:49:52 +02:00
Geert Uytterhoeven fc83f586ad mfd: cros_ec: Fix Kconfig typo - s/ned/need/
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-11 19:27:52 +02:00
Arnd Bergmann 45fcac1aad mfd: Move ssbi driver into drivers/mfd
There is no reason for ssbi to have its own top-level driver directory
when the only users of this interface are all MFD drivers. The only
mainline driver using it at the moment (PM8921) is marked broken and in
fact does not compile. I have verified that fixing the trivial build
breakage in pm8921 links in the new ssbi code just fine, but that
can be a separate patch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-11 19:27:51 +02:00
Arnd Bergmann 3993eff9da mfd: ab8500: Debugfs code depends on gpadc
The AB8500_DEBUG code specifically requires access to the gpadc code,
not just the common ab8500 driver.

drivers/built-in.o: In function `ab8500_gpadc_bat_ctrl_print':
 mfd/ab8500-debugfs.c:1733: undefined reference to `ab8500_gpadc_get'
 mfd/ab8500-debugfs.c:1734: undefined reference to `ab8500_gpadc_read_raw'
 mfd/ab8500-debugfs.c:1736: undefined reference to `ab8500_gpadc_ad_to_voltage'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-05-17 00:42:29 +02:00
David Rientjes c972c12803 mfd: tps65912: Select MFD_CORE
CONFIG_MFD_CORE must be selected for TPS65912 to properly buid.
Otherwise it results in a link error:

	drivers/built-in.o: In function `tps65912_device_init':
	(.text+0x587e4): undefined reference to `mfd_add_devices'
	drivers/built-in.o: In function `tps65912_device_init':
	(.text+0x5884c): undefined reference to `mfd_remove_devices'
	drivers/built-in.o: In function `tps65912_device_exit':
	(.text+0x58878): undefined reference to `mfd_remove_devices'

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-05-16 14:45:59 +02:00
Linus Torvalds d7ab7302f9 For 3.10 we have a few new MFD drivers for:
- The ChromeOS embedded controller which provides keyboard, battery and power
   management services. This controller is accessible through i2c or SPI.
 
 - Silicon Laboratories 476x controller, providing access to their FM chipset
   and their audio codec.
 
 - Realtek's RTS5249, a memory stick, MMC and SD/SDIO PCI based reader.
 
 - Nokia's Tahvo power button and watchdog device. This device is very similar
   to Retu and is thus supported by the same code base.
 
 - STMicroelectronics STMPE1801, a keyboard and GPIO controller supported by
   the stmpe driver.
 
 - ST-Ericsson AB8540 and AB8505 power management and voltage converter
   controllers through the existing ab8500 code.
 
 Some other drivers got cleaned up or improved. In particular:
 
 - The Linaro/STE guys got the ab8500 driver in sync with their internal code
   through a series of optimizations, fixes and improvements.
 
 - The AS3711 and OMAP USB drivers now have DT support.
 
 - The arizona clock and interrupt handling code got improved.
 
 - The wm5102 register patch and boot mechanism also got improved.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRhttxAAoJEIqAPN1PVmxKl6QP/ilyz2OnuZSJKAT+N3tt0EpR
 6hFk0H6uSiHJ5aNyA22WGJq97R3jW9eGK9uD4AKCQ05l9UF/c5+YeXtmGHtxDLCb
 jBrErfB6GmEn1H2TzVK+Rp1WPAB/yoYHJosgGNCwohvuffhMiogSVHlI09EY4mQh
 2Eo0RTN1UXKXSOZN+E7hb+GbIFzU8eOlEFdc2jh4qtfsvMDANbEByrZM6s0QFB31
 LPn03uBL0+iwE8KW2144LKsfzeOos4JWbumyG9Lh6BugUSy1e/Zvv7aWNVeMvY8C
 0+ZUk0bzRm9g7e3X4iYLPSboZt7J6DLaBlWXnUaOsJb+YRkUGh094ySdKojP3EiK
 8SWSfH4EDwIANKC4zyXMcyny8OewySyrTTd0BTlbgHFyDmvmHk213crsCcilHzRb
 3wrX0ETrk96Dkla4/e7IAyME+AbrglStHVGGf2hexlPm2nZdLsE8lfyo9yqjPqzy
 w49y7mpTA5PVE63szB1tI/58W2snZtXAEdQGjZmDQp29vDZaeR1t3W/IhKNG30JN
 SZGiX3H/6YS4MDZ48N709H83hM4V93XrHKsN59NjQe8NZ7AnSIfns9IgMciGBv7r
 aBE+Uwm9htK270Hvl5q8qDDnKaVGYOFlCq9qaeZ2k8NPyyRlQCRpJYjtSplYAnGr
 iLI0JdM32u3qdf5IT+Cw
 =Wq20
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next

Pull MFD update from Samuel Ortiz:
 "For 3.10 we have a few new MFD drivers for:

   - The ChromeOS embedded controller which provides keyboard, battery
     and power management services.  This controller is accessible
     through i2c or SPI.

   - Silicon Laboratories 476x controller, providing access to their FM
     chipset and their audio codec.

   - Realtek's RTS5249, a memory stick, MMC and SD/SDIO PCI based
     reader.

   - Nokia's Tahvo power button and watchdog device.  This device is
     very similar to Retu and is thus supported by the same code base.

   - STMicroelectronics STMPE1801, a keyboard and GPIO controller
     supported by the stmpe driver.

   - ST-Ericsson AB8540 and AB8505 power management and voltage
     converter controllers through the existing ab8500 code.

  Some other drivers got cleaned up or improved.  In particular:

   - The Linaro/STE guys got the ab8500 driver in sync with their
     internal code through a series of optimizations, fixes and
     improvements.

   - The AS3711 and OMAP USB drivers now have DT support.

   - The arizona clock and interrupt handling code got improved.

   - The wm5102 register patch and boot mechanism also got improved."

* tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (104 commits)
  mfd: si476x: Don't use 0bNNN
  mfd: vexpress: Handle pending config transactions
  mfd: ab8500: Export ab8500_gpadc_sw_hw_convert properly
  mfd: si476x: Fix i2c warning
  mfd: si476x: Add header files and Kbuild plumbing
  mfd: si476x: Add chip properties handling code
  mfd: si476x: Add the bulk of the core driver
  mfd: si476x: Add commands abstraction layer
  mfd: rtsx: Support RTS5249
  mfd: retu: Add Tahvo support
  mfd: ucb1400: Pass ucb1400-gpio data through ac97 bus
  mfd: wm8994: Add some OF properties
  mfd: wm8994: Add device ID data to WM8994 OF device IDs
  input: Export matrix_keypad_parse_of_params()
  mfd: tps65090: Add compatible string for charger subnode
  mfd: db8500-prcmu: Support platform dependant device selection
  mfd: syscon: Fix warnings when printing resource_size_t
  of: Add stub of_get_parent for non-OF builds
  mfd: omap-usb-tll: Convert to devm_ioremap_resource()
  mfd: omap-usb-host: Convert to devm_ioremap_resource()
  ...
2013-05-05 17:36:20 -07:00
Andrey Smirnov 9b8e1a5e46 mfd: si476x: Add header files and Kbuild plumbing
This patch adds all necessary header files and Kbuild plumbing for the
core driver for Silicon Laboratories Si476x series of AM/FM tuner
chips.

The driver as a whole is implemented as an MFD device and this patch
adds a core portion of it that provides all the necessary
functionality to the two other drivers that represent radio and audio
codec subsystems of the chip.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-19 18:38:13 +02:00
Aaro Koskinen 95e50f6a2f mfd: retu: Add Tahvo support
Tahvo is a multi-function device on Nokia 770, implementing USB
transceiver and charge/battery control.

It's so close to Retu that a single driver can support both.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-19 00:45:20 +02:00
Samuel Ortiz ab85b120e6 mfd: Kconfig alphabetical re-ordering
Ordering so many Kconfig alphabetically makes it a lot easier to read e.g.
from menuconfig.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-09 14:45:23 +02:00
Jean-Nicolas Graux 230f13a503 mfd: support stmpe1801 18 bits enhanced port expander
Provides support for 1801 variant of stmpe gpio port expanders.
This chip has 18 gpios configurable as GPI, GPO, keypad matrix,
special key or dedicated key function.

Note that special/dedicated key function is not supported yet.

Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-09 14:15:58 +02:00
Paul Bolle d95c785500 mfd: Remove twelve unused Kconfig symbols
Twelve Kconfig symbols, all related to WM8350, WM8351, and WM8352, are
unused. Commit 19d57ed5a3 ("mfd: Remove
custom wm8350 cache implementation") removed all their (actual) users.
Remove these symbols too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-09 10:14:00 +02:00
Paul Bolle f2d614c4be mfd: da9055: Drop "select PMIC_DA9055"
The Kconfig entry for DA9055 PMIC Support selects PMIC_DA9055. That was
probably inspired by the similar select statement in the entry for
DA9052/53 PMIC with I2C. But the DA9055 PMIC only comes in an I2C
variant and its driver doesn't need a separate Kconfig symbol for shared
code. In any case, this select can be dropped as PMIC_DA9055 doesn't
exist.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-08 18:56:06 +02:00
Linus Walleij 58eb893da9 mfd: abx500: Move the AB8500 Kconfig fragment
Move the AB8500 Kconfig fragment below the AB3100 so the
menuconfig menu gets hierarchically nested and looks nice.
Having the EZX PCAP in the middle disturbs the nice
hierarchical layout from kconfig.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 18:10:30 +02:00
Alexander Shiyan 5ab3a89a74 mfd: syscon: Add non-DT support
This patch allow using syscon driver from the platform data, i.e.
possibility using driver on systems without oftree support.
For search syscon device from the client drivers,
"syscon_regmap_lookup_by_pdevname" function was added.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 17:58:22 +02:00
David Rientjes 5a324acfce mfd: cros_ec: Add MFD_CORE dependency
CONFIG_MFD_CROS_EC requires CONFIG_MFD_CORE for a couple of functions that
are declared but not defined:

	ERROR: "mfd_remove_devices" [drivers/mfd/cros_ec.ko] undefined!
	ERROR: "mfd_add_devices" [drivers/mfd/cros_ec.ko] undefined!

Fix it by selecting CONFIG_MFD_CORE anytime CONFIG_MFD_CROS_EC is enabled.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 11:20:14 +02:00
Simon Glass a17d94f0b6 mfd: Add ChromeOS EC SPI driver
This uses a SPI bus to talk to the ChromeOS EC. The protocol
is defined by the EC and is fairly simple, with a length byte,
checksum, command byte and version byte (to permit easy creation
of new commands).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 11:20:13 +02:00