Commit graph

427332 commits

Author SHA1 Message Date
Peter Tyser
429b941abd mfd: lpc_ich: Remove lpc_ich_cfg struct use
Future chipsets will use different register layouts that don't map
cleanly to the lpc_ich_cfg fields.  Remove the lpc_ich_cfg struct and
add explicit fields to the higher level lpc_ich_priv structure.

This change should have no functional impact.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 09:00:01 +00:00
Peter Tyser
f0776b8ce0 mfd: lpc_ich: Only configure watchdog or GPIO when present
Some chipsets don't currently have GPIO support enabled.  For these
chipsets don't go through the process of initializing the GPIO region.

Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 09:00:00 +00:00
Peter Tyser
f5dccb1587 mfd: lpc_ich: Fix ACPI enable bitmask
The original bitmask of 0x10 was incorrect and would result in a write
to a reserved read-only bit instead of enabling the ACPI I/O
region.  Update it to the proper value of 0x80.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 09:00:00 +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
Matt Porter
c6215037ac mfd: Add bcm590xx pmu DT binding
Add a DT binding for the BCM590xx PMUs. The binding inherits from
the generic regulator bindings.

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:58 +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
Tomas Novotny
56816b700c mfd: twl-core: Fix accessibility of some twl4030 audio registers
There are some unused registers in twl4030 at I2C address 0x49 and function
twl4030_49_nop_reg() is used to check accessibility of that registers. These
registers are written in decimal format but the values are correct in
hexadecimal format. (It can be checked few lines above the patched code -
these registers are marked as unused there.)

As a consequence three registers of audio submodule are treated as
inaccessible (preamplifier carkit right and both handsfree registers).

Cc: stable@vger.kernel.org
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:43 +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
Opensource [Steve Twiss]
9fc2b9ca99 mfd: da9063: Upgrade of register definitions to support production silicon
This patch updates the register definitions for DA9063 to support the
production silicon variant code ID (0x5). These changes are not backwards
compatible with the previous register definitions and can only be used
with the production variant of DA9063.

Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:41 +00:00
Alexander Shiyan
416dc642af mfd: syscon: Simplify syscon_match_pdevname()
Since we do not want to add new platform IDs for the syscon driver,
there is no reason to iterate over IDs. This patch simplifies
syscon_match_pdevname() function to remove such iteration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:41 +00:00
Adam Thomson
94b6c3dac0 mfd: da9055: Add DT binding documentation for PMIC
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:40 +00:00
Josh Cartwright
202f7680af mfd: pm8921: Fixup probe() error path when irq invalid
platform_get_irq() returns a negative error code when an IRQ is invalid
or unspecified.  Make 'irq' signed to properly handle this.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:39 +00:00
Adam Thomson
d9a335155c mfd: da9055: Add DT support for PMIC
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:39 +00:00
Sachin Kamat
392966937d mfd: vexpress: Staticize vexpress_config_bridges
vexpress_config_bridges is local to this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:38 +00:00
Stephen Warren
09507305a5 mfd: as3722: Make FUSE7_REG readable
The FUSE7_REG register is not currently marked readable. This causes
as3722_sd0_is_low_voltage() to emit an error during boot, and assume
the range of the SD0 regulator:

as3722-regulator as3722-regulator: Reg 0xa7 read failed: -5

Fixes: d4807ad2c4 ("regmap: Check readable regs in _regmap_read")
  [exposed the bug, by checking for readability]
Fixes: 762a8ee808 ("regulator: as3722: detect SD0 low-voltage mode")
  [left out this register from the readable list]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:37 +00:00
Stephen Boyd
d2d24ad1c4 mfd: pm8921: Use IRQCHIP_SKIP_SET_WAKE
We don't need to implement a dummy irq_set_wake op if we just set
IRQCHIP_SKIP_SET_WAKE.

Suggested-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:37 +00:00
Stephen Boyd
2802c94c39 mfd: pm8921: Drop irq_set_lockdep_class() code
This isn't necessary as we aren't setting the summary interrupt
to wake up the system in the irq_wake() callback.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:36 +00:00
Alexander Shiyan
6a5926e697 mfd: mc13xxx: Add missing spi_setup()
The probe routine should call spi_setup() to configure the SPI bus
so it can properly communicate with the device.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:35 +00:00
Alexander Shiyan
0cfe5c90c4 mfd: mc13xxx: Limit maximum SPI speed
The patch adds the maximum speed limit in accordance with the
PMIC datasheet if other value is not given in the devicetree
description or board data.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:35 +00:00
Alexander Gordeev
471212d943 mfd: timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:34 +00:00
Jingoo Han
507c133b7d mfd: ucb1x00-core: Use SIMPLE_DEV_PM_OPS macro
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:33 +00:00
Stephen Boyd
cd0c1f8cd1 mfd: devicetree: bindings: Document PM8921/8058 PMICs
PM8921 and PM8058 are PMICs found paired with MSM8960 and MSM8660
devices respectively. They contain subdevices such as keypads,
RTC, regulators, clocks, etc.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:33 +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
c5865a5315 mfd: pm8921: Add DT match table
Allow this driver to probe based on devicetree.

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
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
559c04f6f1 mfd: ssbi: Add regmap read/write helpers
Add read and write helper functions that the pm8921-core driver
can use to read and write ssbi registers via a "no-bus" regmap.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:30 +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
Florian Vaussard
89d6899830 mfd: twl6040: Check for error when reading revision register
We may have an error when reading the revision register, so check for
the returned value.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:27 +00:00
Florian Vaussard
f8935e1cfc mfd: twl6040: Remove duplicate register write
When probing, regmap_register_patch() will bypass the cache and perform
i2c writes for the given patches. It is thus unnecessary to manually set
the TWL6040_REG_ACCCTL register just before, as it will be done when
registering the twl6040_patch.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:27 +00:00
Opensource [Anthony Olech]
16263f2879 mfd: da9052: Extend support to a new chip
Add the hash define for the new variant of the DA9053 PMIC called BC.

Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:26 +00:00
Opensource [Anthony Olech]
6c049b2ac9 mfd: da9052: Add new DA9053 BC chip variant
Add support for a new BC variant of the DA9053 PMIC.

There is one difference between it and the AA, BA and BB.

This patch also corrects a typing mistake in one of the BA
name strings that was incorrectly typed as "ab".

Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:25 +00:00
Alexander Shiyan
38d8974e33 mfd: syscon: Move diagnostic messages to dev_dbg()
This patch moves diagnostic messages used for debugging purposes
to dev_dbg().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:25 +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
Vincent Donnefort
3b9231893e gpio: ich: Add support for Intel Avoton
This patch adds support for Atom C2000 series (Avoton and Rangeley). And has
the following options:
  - New addresses register.
  - Caching output levels (see Intel external design spec, table 48-29)
  - No hardware blink.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:23 +00:00
Vincent Donnefort
e6540f3324 gpio: ich: Add output levels cache support
This patch allows GPIO driver to cache GPIO_LVL output registers. The aim is to
support chipsets on which GPIO_LVL value can't be read for output pins.

Caching output levels implies the first output values reading as 0. The driver
so can't be aware of set values GPIOs by bootloader or BIOS.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:23 +00:00
Vincent Donnefort
bb62a35bd5 gpio: ich: Add support for multiple register addresses
This patch introduces regs and reglen pointers which allow a chipset to have
register addresses differing from ICH ones.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:22 +00:00
Vincent Donnefort
ba7f74fe2b gpio: ich: Add blink capability option
This patch allows gpio_ich driver to be aware of non blink capable chipsets.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:21 +00:00
Vincent Donnefort
facd993940 mfd: lpc_ich: Add support for Intel Avoton GPIOs
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:21 +00:00
Vincent Donnefort
6cec365e3e mfd: lpc_ich: Convert ICH GPIOs IDs to enum
All those IDs are arbitrary and so can be encapsulated into an enumeration.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:20 +00:00
Opensource [Steve Twiss]
c1d12c784c mfd: da9063: Add support for production silicon variant code
Add the correct silicon variant code ID (0x5) to the driver. This
new code is the 'production' variant code ID for DA9063.

This patch will remove the older variant code ID which matches the
pre-production silicon ID (0x3) for the DA9063 chip.

There is also some small amount of correction done in this patch:
it splits the revision code and correctly names it according to
the hardware specification and moves the dev_info() call before
the variant ID test.

Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:19 +00:00
Sachin Kamat
82ae61c4b0 mfd: wm8400-core: Remove unnecessary goto
Return directly to avoid redundant lines of code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:19 +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
Sachin Kamat
c88fd91bcd mfd: stw481x: Check the return value of devm_regmap_init_i2c
devm_regmap_init_i2c can fail. Check for it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:17 +00:00
Sachin Kamat
e2f3e9bbba mfd: stw481x: Staticize stw481x_regmap_config
stw481x_regmap_config is local to this file.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:17 +00:00
Sachin Kamat
c8016d45a3 mfd: max14577: Include missing err.h
Add this header explicitly for IS_ERR and friends.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:16 +00:00
Semen Protsenko
63f5d2e8b2 mfd: vexpress-sysreg: Initialize 'site' variable
'site' variable should be initialized with 0 so that when 'site'
property doesn't exist in DTB it can be handled correctly.

'0' value means board site number is motherboard (see
Documentation/devicetree/bindings/arm/vexpress.txt for details).

Signed-off-by: Semen Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:15 +00:00
Krzysztof Kozlowski
141050cf3d mfd: 88pm800: Fix I2C device resource leak if probe fails
During probe the driver allocates two dummy I2C devices for subchips in
function pm800_pages_init(). Additionally this function allocates
regmaps for these subchips. If any of these steps fail then these dummy
I2C devices are not freed and resources leak.

On pm800_pages_init() fail the driver must call pm800_pages_exit() to
unregister dummy I2C devices.

Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:15 +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