Граф коммитов

427288 Коммитов

Автор SHA1 Сообщение Дата
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
Jingoo Han 924ff918ad mfd: ti_am335x_tscadc: Use devm_ioremap_resource()
Use devm_ioremap_resource() in order to make the code simpler,
and remove redundant return value check of platform_get_resource()
because the value is checked by devm_ioremap_resource().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:13 +00:00
anthony.olech.opensource@diasemi.com bcb5a7d335 mfd: da9052: Fix volatile register definition ommissions
Three of the PMIC registers have some bits that are changed
autonomously by the PMIC itself (some time) after being set
by some component driver of the DA9052 PMIC and hence they
need to be marked as volatile so that the regmap API will
not cache their values.

Acked-by: David Dajun Chen <david.chen@diasemi.com>
Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:13 +00:00
Krzysztof Kozlowski ad09dd6a1f mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C devices for MUIC and haptic
with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by devm_regmap_init_i2c() and i2c_unregister_device().

If i2c_new_dummy() fails for MUIC or haptic devices, fail also the probe
for main MFD driver.

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:12 +00:00
Krzysztof Kozlowski 159ce52a6b mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C device for companion chip
with i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by regmap_init_i2c().

If i2c_new_dummy() fails for companion device, fail also the probe for
main MFD driver.

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:11 +00:00
Krzysztof Kozlowski a7ab1c8b26 mfd: 88pm860x: Fix I2C device resource leak on regmap init fail
During probe the driver allocates dummy I2C device for companion chip
and then allocates a regmap for it. If regmap_init_i2c() fails then the
I2C driver (allocated with i2c_new_dummy()) is not freed and this
resource leaks.

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:11 +00:00
Krzysztof Kozlowski 96cf3dedc4 mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C devices for RTC and ADC
with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC or ADC devices, fail also the probe
for main MFD driver.

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:10 +00:00
Krzysztof Kozlowski ed26f87b9f mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for
main MFD driver.

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:09 +00:00
Krzysztof Kozlowski b9e183a1d4 mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C device for RTC with
i2c_new_dummy() but it does not check the return value of this call.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

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:09 +00:00
Krzysztof Kozlowski 97dc4ed3fa mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error
During probe the driver allocates dummy I2C devices for RTC, haptic and
MUIC with i2c_new_dummy() but it does not check the return value of this
calls.

In case of error (i2c_new_device(): memory allocation failure or I2C
address cannot be used) this function returns NULL which is later used
by i2c_unregister_device().

If i2c_new_dummy() fails for RTC, haptic or MUIC devices, fail also the
probe for main MFD driver.

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:08 +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
Sachin Kamat 52397fe18d mfd: stmpe: Trivial: Remove unnecessary semicolon
Semicolon is not necessary after the while statement.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:07 +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 a381b13e2a mfd: tc3589x: Reform device tree probing
This changes the following mechanisms in the TC3589x device tree
probing path:

- Use the .of_match_table in struct device_driver to match the
  device in the device tree.
- Add matches for the proper compatible strings "toshiba,..."
  and all sub-variants, just as is done for the .id matches.
- Move over all the allocation of platform data etc to the
  tc3589x_of_probe() function and follow the pattern of passing
  a platform data pointer back, or an error pointer on error,
  as found in the STMPE driver.
- Match the new (proper) compatible strings for the GPIO and
  keypad MFD cells.
- Use of_device_is_compatible() rather than just !strcmp()
  to discover which cells to instantiate.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:05 +00:00
Charles Keepax 47ec66a17c mfd: wm5110: Make additional DSP registers available to the user
Expose some DSP registers which are useful for DSP users to be able to
access whilst debugging their firmware.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:05 +00:00
Charles Keepax 8dbb947af3 mfd: wm5102: Make additional DSP registers available to the user
Expose some DSP registers which are useful for DSP users to be able to
access whilst debugging their firmware.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:04 +00:00
Krzysztof Kozlowski a0b0ea491e mfd: max14577: Add of_compatible to extcon mfd_cell
Add of_compatible ("maxim,max14577-muic") to the mfd_cell for extcon
driver. If entry with such compatible is present in the DTS, the extcon
driver will have of_node set.

This may be useful for extcon consumers and it is documented in
bindings documentation.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:03 +00:00
Krzysztof Kozlowski ec2b26724f mfd: max14577: Remove not needed header inclusion
Remove not needed max14577-private.h header inclusion in the main driver
header. Remove obvious comment.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:03 +00:00
Krzysztof Kozlowski 5e98fc8fea mfd: max14577: Remove unused enum max14577_irq_source
Remove unused symbol: enum max14577_irq_source.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19 08:58:02 +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
Lee Jones 0caeaede0b Merge branch 'ib-mfd-io-3.15' into HEAD 2014-03-19 08:57:53 +00:00
Lee Jones 1a55361e21 Merge branch 'ib-mfd-omap' into HEAD 2014-03-19 08:57:44 +00:00
Lee Jones 507792c9c3 Merge branch 'ib-mfd-regulator-3.15' into HEAD 2014-03-19 08:57:33 +00:00
Charles Keepax df8eddb31f mfd: wm5102: Update register patch
Update the register patch based on latest evaluation of the device.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:58:09 +00:00
Sachin Kamat ba3e31f87e Documentation: mfd: Add binding document for S2MPA01
Added initial binding documentation for S2MPA01 MFD.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:56:45 +00:00
Sachin Kamat f187927146 regulator: Add support for S2MPA01 regulator
Add support for S2MPA01 voltage and current regulator.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:56:30 +00:00
Sachin Kamat ce24991e1e mfd: Add support for S2MPA01 device
Add the necessary entries required for S2MPA01 multi-function
device. While at it also convert whitespaces to tabs in core.h.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:56:17 +00:00
Pankaj Dubey 8f695de515 mfd: sec-core: Silence compiler warning
When used 64bit compiler GCC warns as
drivers/mfd/sec-core.c:199:10: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:50:20 +00:00
Krzysztof Kozlowski 65aba1e049 mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error
During probe the sec-core driver allocates dummy I2C device for RTC with
i2c_new_dummy() but return value is not checked. In case of error
(i2c_new_device(): memory allocation failure or I2C address cannot be
used) this function returns NULL which is later used by
devm_regmap_init_i2c() or i2c_unregister_device().

If i2c_new_dummy() fails for RTC device, fail also the probe for main
MFD driver.

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-18 10:50:18 +00:00
Krzysztof Kozlowski dc6919663f mfd: sec: Add support for S2MPS14
Add support for S2MPS14 PMIC device to the MFD sec-core driver.
The S2MPS14 is similar to S2MPS11 but it has fewer regulators, two
clocks instead of three and a little different registers layout.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:50:09 +00:00
Krzysztof Kozlowski 677620952a mfd: sec-irq: Use consistent S2MPS11 RTC alarm interrupt indexes
The S2MPS11 RTC has two alarms: alarm0 and alarm1 (corresponding
interrupts are named similarly). Use consistent names for interrupts to
limit possible errors.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:49:52 +00:00
Krzysztof Kozlowski 3e5a45f7f1 mfd: sec-core: Select different RTC regmaps for devices
This patch prepares for adding support for S2MPS14 RTC driver by
selecting different regmaps for S2MPS1X/S5M876X RTC devices.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:49:38 +00:00
Krzysztof Kozlowski b07e2b70b9 mfd: sec-core: Add maximum RTC register for regmap config
Add maximum register to the regmap used by rtc-s5m driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:48:43 +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
Sebastian Reichel 1e1bce3956 Documentation: DT: Document twl4030-madc binding
Add devicetree binding documentation for twl4030-madc
analog digital converter.

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:03 +00:00
Sebastian Reichel 168ae30802 mfd: twl4030-madc: Use twl_i2c_read/write_u16 for 16 bit registers
Simplify reading and writing of 16 bit TWL registers in the
driver by using twl_i2c_read_u16 and twl_i2c_write_u16.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:15:50 +00:00
Sebastian Reichel 204dfd63a0 mfd: twl-core: Add twl_i2c_read/write_u16
Add a simple twl_i2c_read/write_u16 wrapper over
the twl_i2c_read/write, which is similar to the
twl_i2c_read/write_u8 wrapper.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:15:34 +00:00
Sebastian Reichel 99be0245c8 mfd: twl4030-madc: Cleanup driver
Some style fixes in twl4030-madc driver.

Reported-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:13:39 +00:00
Sebastian Reichel 2f39b70fef mfd: twl4030-madc: Add DT support and convert to IIO framework
This converts twl4030-madc module to use the Industrial IO ADC
framework and adds device tree support.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Tested-by: Marek Belisko <marek@goldelico.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:13:23 +00:00
Sebastian Reichel e7f22b7516 mfd: twl4030-madc: Use managed resources
Update twl4030-madc driver to use managed resources.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Tested-by: Marek Belisko <marek@goldelico.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 08:07:15 +00:00
Roger Quadros 2e1b365cea mfd: omap-usb-tll: Update DT clock binding information
The omap-usb-tll driver needs one clock for each TLL channel.
Add this information to the DT binding document.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-13 22:27:17 +00:00
Roger Quadros c233544f30 mfd: omap-usb-host: Update DT clock binding information
The omap-usb-host driver expects certained named clocks.
Add this information to the DT binding document.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-13 22:26:12 +00:00
Roger Quadros 051fc06dfa mfd: omap-usb-host: Use clock names as per function for reference clocks
Use a meaningful name for the reference clocks so that it indicates the
function.

Update the OMAP4+ USB Host node as well to be in sync with the changes.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-13 22:25:45 +00:00
Roger Quadros 775bb078e9 mfd: omap-usb-host: Use proper clock name instead of alias
Use the proper clock name 'usbhost_120m_fck' instead of the
alias 'ehci_logic_fck'

Get rid of the 'ehci_logic_fck' alias from the OMAP3 hwmod data
as well.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-13 22:25:16 +00:00
Roger Quadros fedb2e7c2d mfd: omap-usb-host: Always fail on clk_get() error
Be more strict and always fail on clk_get() error.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-13 22:24:49 +00:00