profile/ivi/kernel-x86-ivi.git
11 years agomfd: arizona: Register haptics devices
Mark Brown [Tue, 27 Nov 2012 17:37:13 +0000 (17:37 +0000)]
mfd: arizona: Register haptics devices

Both WM5102 and WM5110 support haptics, register the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm8994: Make current device behaviour the default
Mark Brown [Tue, 27 Nov 2012 15:23:30 +0000 (15:23 +0000)]
mfd: wm8994: Make current device behaviour the default

As the wm8994 series of devices are now very mature make the current
behaviour of the devices the default behaviour, any future revisions are
likely to have only minor updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ
Axel Lin [Tue, 27 Nov 2012 07:15:17 +0000 (15:15 +0800)]
mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ

This fixes below build error:

drivers/built-in.o: In function `tps65090_i2c_probe':
drivers/mfd/tps65090.c:180: undefined reference to `regmap_add_irq_chip'
drivers/mfd/tps65090.c:190: undefined reference to `regmap_irq_chip_get_base'
drivers/mfd/tps65090.c:203: undefined reference to `regmap_del_irq_chip'
drivers/built-in.o: In function `tps65090_i2c_remove':
drivers/mfd/tps65090.c:213: undefined reference to `regmap_del_irq_chip'
make: *** [vmlinux] Error 1

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Fix stmpe.c build when OF is not enabled
Randy Dunlap [Mon, 12 Nov 2012 17:20:49 +0000 (09:20 -0800)]
mfd: Fix stmpe.c build when OF is not enabled

Fix build errors when CONFIG_OF is not enabled by including
<linux/of.h> (needs to be added in any case).
An alternative fix could be to make the driver depend on OF.

drivers/mfd/stmpe.c:1025:2: error: implicit declaration of function 'of_property_read_u32'
drivers/mfd/stmpe.c:1030:2: error: implicit declaration of function 'for_each_child_of_node'
drivers/mfd/stmpe.c:1030:36: error: expected ';' before '{' token

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: jz4740-adc: Use devm_kzalloc
Devendra Naga [Sat, 24 Nov 2012 11:14:38 +0000 (06:14 -0500)]
mfd: jz4740-adc: Use devm_kzalloc

Use devm_kzalloc and remove the error path free'ing and unload free'ing
as the devm resource functions free them.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: stmpe-i2c: Move .driver structure fields inside {} in stmpe_i2c_driver
Viresh Kumar [Thu, 22 Nov 2012 18:56:19 +0000 (00:26 +0530)]
mfd: stmpe-i2c: Move .driver structure fields inside {} in stmpe_i2c_driver

Currently, few fields in stmpe_i2c_driver are initialized as:
.driver.owner = THIS_MODULE,

Group them under {}, like:
.driver = {
.owner = THIS_MODULE,
...
},

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Simplify IRQ domain registration code in STMPE
Lee Jones [Fri, 23 Nov 2012 15:19:29 +0000 (15:19 +0000)]
mfd: Simplify IRQ domain registration code in STMPE

Historically, a driver would have to decide whether it required
a Linear or Legacy IRQ domain when registering one. This can end
up as quite a lot of code. A new Simple call now exists which
simplifies this process. Let's make use of it here.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rc5t583: Fix array subscript is above array bounds
Axel Lin [Tue, 20 Nov 2012 02:34:56 +0000 (10:34 +0800)]
mfd: rc5t583: Fix array subscript is above array bounds

I got below build warning while compiling this driver.
It's obviously RC5T583_MAX_INTERRUPT_MASK_REGS is 9 but irq_en_add
array only has 8 elements.

  CC      drivers/mfd/rc5t583-irq.o
drivers/mfd/rc5t583-irq.c: In function 'rc5t583_irq_sync_unlock':
drivers/mfd/rc5t583-irq.c:227: warning: array subscript is above array bounds
drivers/mfd/rc5t583-irq.c: In function 'rc5t583_irq_init':
drivers/mfd/rc5t583-irq.c:349: warning: array subscript is above array bounds

Since the number of interrupt enable registers is 8, this patch adds
define for RC5T583_MAX_INTERRUPT_EN_REGS to fix this bug.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: viperboard: Do version query in dma memory
Lars Poeschel [Mon, 26 Nov 2012 10:24:53 +0000 (11:24 +0100)]
mfd: viperboard: Do version query in dma memory

The query for the viperboard version was done with memory buffer
on the stack but usb transfers need dma capable memory buffer.
This is fixed now.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMFD: ti_am335x_tscadc: Pass correct error message
Patil, Rachna [Tue, 6 Nov 2012 08:09:03 +0000 (13:39 +0530)]
MFD: ti_am335x_tscadc: Pass correct error message

Pass on the correct error message from platform_get_irq()
instead of hard coding it to "EINVAL".

Also change label from "err" to "ret" for better
readability and update the same in error path.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: sec: Fix reg_offset for interrupt registers
Inderpal Singh [Wed, 17 Oct 2012 06:18:55 +0000 (11:48 +0530)]
mfd: sec: Fix reg_offset for interrupt registers

reg_offset is offset of the status/mask registers. Now, since status_base
and mask_base are pointing to corresponding first registers, reg_offset
should start from 0 otheriwse regmap_add_irq_chip will fail during probe.

Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm8994: Add support for WM1811 rev E
Mark Brown [Fri, 23 Nov 2012 03:05:33 +0000 (12:05 +0900)]
mfd: wm8994: Add support for WM1811 rev E

This is supported identically to the previous revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoDocumentation: Fix historical inconsistency in STMPE DT doc
Lee Jones [Thu, 22 Nov 2012 12:24:24 +0000 (12:24 +0000)]
Documentation: Fix historical inconsistency in STMPE DT doc

Previously a generic binding 'i2c-client-wake' was created which
enabled I2C devices to register themselves as wake-up devices.
This binding was later over-thrown by 'wakeup-source'. The STMPE
driver was fixed-up, but the document was neglected. This patch
aims to rectify that.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500-core: Add abx500-clk as an mfd child device
Ulf Hansson [Thu, 22 Nov 2012 10:35:40 +0000 (11:35 +0100)]
mfd: ab8500-core: Add abx500-clk as an mfd child device

Hierarchically, the abx500-clk shall be considered as a child of the
ab8500 core. The abx500-clk is intiated at arch init and thus the clks
will be available when clients needs them.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add an AS3711 PMIC MFD driver
Guennadi Liakhovetski [Thu, 22 Nov 2012 10:12:04 +0000 (11:12 +0100)]
mfd: Add an AS3711 PMIC MFD driver

AS3711 is a PMIC with multiple DCDC and LDO power supplies, GPIOs, an RTC,
a battery charger and a general purpose ADC. This patch adds support for
the MFD with support for a regulator driver and a backlight driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: stmpe: Use devm_*() routines
Viresh Kumar [Thu, 22 Nov 2012 05:10:29 +0000 (10:40 +0530)]
mfd: stmpe: Use devm_*() routines

This patch frees stmpe driver from tension of freeing resources.
devm_* derivatives of multiple routines are used while allocating resources,
which would be freed automatically by kernel.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lpc_ich: One uninitialized cell is no error
Paul Bolle [Mon, 19 Nov 2012 20:04:11 +0000 (21:04 +0100)]
mfd: lpc_ich: One uninitialized cell is no error

At every boot of an (outdated) laptop lpc_ich prints an error:
    lpc_ich 0000:00:1f.0: I/O space for GPIO uninitialized

But if one looks at lpc_ich's probe function one notices that the code
only cares if both lpc_ich_init_wdt() and lpc_ich_init_gpio() fail to
add any cells. So stop treating the failure to add a single cell as an
error. Those messages can be printed at notice level. And then only warn
if no cells were added.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lpc_ich: Fix resource request for [mem 0x00000000]
Peter Hurley [Wed, 21 Nov 2012 16:30:50 +0000 (17:30 +0100)]
mfd: lpc_ich: Fix resource request for [mem 0x00000000]

The older southbridges supported by the lpc_ich driver do not
provide memory-mapped space of the root complex. The driver
correctly avoids computing the iomem address in this case, yet
submits a zeroed resource request anyway (via mfd_add_devices()).

Remove the iomem resource from the resource array submitted to the
mfd core for the older southbridges.

Acked-by: Aaron Sierra <asierra@xes-inc.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Change TWL4030_MODULE_* ids to TWL_MODULE_*
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:54 +0000 (09:28 +0100)]
mfd: twl-core: Change TWL4030_MODULE_* ids to TWL_MODULE_*

To facilitate upcoming cleanup in twl stack.
No functional changes.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl4030-irq: Change TWL4030_MODULE_* ids to TWL_MODULE_*
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:53 +0000 (09:28 +0100)]
mfd: twl4030-irq: Change TWL4030_MODULE_* ids to TWL_MODULE_*

To facilitate upcoming cleanup in twl stack.
No functional changes.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl4030-power: Change TWL4030_MODULE_* ids to TWL_MODULE_*
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:52 +0000 (09:28 +0100)]
mfd: twl4030-power: Change TWL4030_MODULE_* ids to TWL_MODULE_*

To facilitate upcoming cleanup in twl stack.
No functional changes.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl4030-madc: Change TWL4030_MODULE_* ids to TWL_MODULE_*
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:51 +0000 (09:28 +0100)]
mfd: twl4030-madc: Change TWL4030_MODULE_* ids to TWL_MODULE_*

To facilitate upcoming cleanup in twl stack.
No functional changes.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: re-group the twl_mapping table for easier reading
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:50 +0000 (09:28 +0100)]
mfd: twl-core: re-group the twl_mapping table for easier reading

Group the twl_mapping table in 5 lines chunks so it is more easier to find
the row we are looking for (if we need to).

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl: Use decimal numbers for TWL6030_MODULE_IDs
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:49 +0000 (09:28 +0100)]
mfd: twl: Use decimal numbers for TWL6030_MODULE_IDs

It is easier fro humans to understand decimal numbers than hexadecimals when
they are used as indexes.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl: Convert module id definitions to enums
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:48 +0000 (09:28 +0100)]
mfd: twl: Convert module id definitions to enums

Use enum list for the module definitions (TWL4030_MODULE_*) which will ease
up future work with the IDs.
At the same time group the IDs in block of five so it is easier to find the
ID we are looking for (to count the number they stand for).

At the same time define TWL_MODULE_LED so client drivers can switch to use
it as soon as it is possible.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl: Remove unused TWL_MODULE definitions
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:47 +0000 (09:28 +0100)]
mfd: twl: Remove unused TWL_MODULE definitions

AUDIO and MADC only available on twl4030 series and the TWL_MODULE_* mapping
is not needed.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Clean up and correct child registration
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:46 +0000 (09:28 +0100)]
mfd: twl-core: Clean up and correct child registration

Make the twl child registration calls a bit more uniform by always using the
SUB_CHIP_ID* define instead of the mixed use of the define and magic number.

At the same time correct the following devices so they are registered for the
correct parent device (i2c slave):
twl4030_wdt is accessible on 0x4b address and not 0x48
twl4030_pwrbutton is accessible on 0x4b address and not 0x49
twl4030-audio is on 0x49 all the time

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd/rtc/gpio: twl: No need to allocate bigger buffer for write
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:45 +0000 (09:28 +0100)]
mfd/rtc/gpio: twl: No need to allocate bigger buffer for write

Since the twl-core has been converted to use regmap it is no longer needed
to allocate bigger buffer for data when writing to twl.

CC: Grant Likely <grant.likely@secretlab.ca>
CC: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Convert to use regmap for I/O
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:44 +0000 (09:28 +0100)]
mfd: twl-core: Convert to use regmap for I/O

Remove the custom code to do I/O and replace it with standard regmap calls.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Support for proper PWM drivers
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:43 +0000 (09:28 +0100)]
mfd: twl-core: Support for proper PWM drivers

The twl6030-pwm driver is going to be deleted since it was only able to
control the Charging indicator LED on the twl6030 PMIC.
The new set of drivers are going to provide support for both PWMs and PWM
driven LED outputs on TWL4030 and TWL6030 PMICs.
The twl-pwm driver will handle the PWMs (2 instance) while the twl-pwmled
driver is to control the two LED instance on TWL4030 and to charging
indicator LED (1 instance) on TWL6030.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Register twl4030-madc child only for twl4030 class
Peter Ujfalusi [Tue, 13 Nov 2012 08:28:42 +0000 (09:28 +0100)]
mfd: twl-core: Register twl4030-madc child only for twl4030 class

twl4030-madc driver can only handle twl4030 class MADC. The newer revisions
of twl does not have MADC, instead they have different IP called GPADC which
is not backward compatible.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Introduce retu-mfd driver
Aaro Koskinen [Sun, 18 Nov 2012 16:36:20 +0000 (18:36 +0200)]
mfd: Introduce retu-mfd driver

Retu is a multi-function device found on Nokia Internet Tablets
implementing at least watchdog, RTC, headset detection and power button
functionality.

This patch implements minimum functionality providing register access,
IRQ handling and power off functions.

Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl6040: Remove duplicate inclusion of linux/err.h
Sachin Kamat [Tue, 20 Nov 2012 05:49:15 +0000 (11:19 +0530)]
mfd: twl6040: Remove duplicate inclusion of linux/err.h

linux/err.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Make FLL NCO test registers readable
Mark Brown [Tue, 20 Nov 2012 07:53:47 +0000 (16:53 +0900)]
mfd: wm5102: Make FLL NCO test registers readable

They contain documented status readback fields.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65217: Set PMIC to shutdown on PWR_EN toggle
Colin Foe-Parker [Tue, 20 Nov 2012 09:48:44 +0000 (15:18 +0530)]
mfd: tps65217: Set PMIC to shutdown on PWR_EN toggle

Set tps65217 PMIC status to OFF if power enable toggle is supported.
By setting this bit to 1 to enter PMIC to OFF state when PWR_EN pin
is pulled low. Also adds a DT flag to specify that device pmic
supports shutdown control or not.

Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com>
[anilkumar@ti.com: move the additions to tps65217 MFD driver]
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agommc: rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c
Wei WANG [Tue, 20 Nov 2012 03:24:44 +0000 (11:24 +0800)]
mmc: rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.c

This fixes the following build error on some architectures (parisc at least):

drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw':
drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit
declaration of function 'kzalloc'
[-Werror=implicit-function-declaration]
drivers/mmc/host/rtsx_pci_sdmmc.c:448:6: warning: assignment
makes pointer from integer without a cast [enabled by default]
drivers/mmc/host/rtsx_pci_sdmmc.c:472:2: error: implicit
declaration of function 'kfree'
[-Werror=implicit-function-declaration]

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agommc: rtsx: Configure SD_CFG2 register in sd_rw_multi
Wei WANG [Tue, 20 Nov 2012 03:24:36 +0000 (11:24 +0800)]
mmc: rtsx: Configure SD_CFG2 register in sd_rw_multi

For Realtek card reader, internal regsiter SD_CFG2 should be configured
before transferring data.
The default value of SD_CFG2 is proper for writing data. But for reading
sequence, the timing is not good enough. So in some extreme circumstance,
card reader may sample the response data from the card as good even if
the data is wrong. And this will cause the bad consequence.
In the prior version, the value of this register has been calculated,
but forgotten to write back to the internal register.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Use regmap irq framework for interrupt support
Laxman Dewangan [Tue, 20 Nov 2012 03:14:49 +0000 (08:44 +0530)]
mfd: tps65090: Use regmap irq framework for interrupt support

Use the regmap irq framework for implementing TPS65090 interrupt
support in place of implementing it locally.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Move register access APIs to header
Laxman Dewangan [Tue, 20 Nov 2012 03:14:48 +0000 (08:44 +0530)]
mfd: tps65090: Move register access APIs to header

Since tps65090 register is accessed via regmap, moving
the register access APIs to header and making it as inline.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Remove unused member of struct tps65090
Laxman Dewangan [Tue, 20 Nov 2012 03:14:47 +0000 (08:44 +0530)]
mfd: tps65090: Remove unused member of struct tps65090

Remove unused member from tps65090 data structure as
these are not used.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Add error prints when mem alloc failed
Laxman Dewangan [Tue, 20 Nov 2012 03:14:46 +0000 (08:44 +0530)]
mfd: tps65090: Add error prints when mem alloc failed

Add error prints when memory allocation failed for
tps65090 data. Also cleanups the melloc arguments.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add battery charger in tps65090 sub devs
Laxman Dewangan [Tue, 20 Nov 2012 03:14:45 +0000 (08:44 +0530)]
mfd: Add battery charger in tps65090 sub devs

TPS65090 supports the battery charging and hence adding
the device name in the list of TPS65090 children. Also
remove the tps65090-regulator as it duplicates with
tps65090-pmic for regulator driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add TI TPS80031 mfd core driver
Laxman Dewangan [Wed, 14 Nov 2012 15:39:28 +0000 (21:09 +0530)]
mfd: Add TI TPS80031 mfd core driver

TPS80031/ TPS80032 Fully Integrated Power Management with Power
Path and Battery Charger. The device provides five configurable
step-down converters, 11 general purpose LDOs, USB OTG Module,
ADC, RTC, 2 PWM, System Voltage Regulator/Battery Charger with
Power Path from USB, 32K clock generator.

Add the mfd core driver for TPS80031/TPS80032.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: wm5102: Mark some more status registers as volatile
Mark Brown [Tue, 20 Nov 2012 04:33:19 +0000 (13:33 +0900)]
mfd: wm5102: Mark some more status registers as volatile

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: wm5102: Update maximum register
Mark Brown [Tue, 20 Nov 2012 04:33:18 +0000 (13:33 +0900)]
mfd: wm5102: Update maximum register

The DSP memories are mapped into the register map, make them readable and
writable by updating max_register appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add myself to copyright
Davide Ciminaghi [Fri, 9 Nov 2012 14:20:01 +0000 (15:20 +0100)]
mfd: sta2x11-mfd: Add myself to copyright

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add defines for some sta2x11 sctl registers
Davide Ciminaghi [Fri, 9 Nov 2012 14:20:00 +0000 (15:20 +0100)]
mfd: sta2x11-mfd: Add defines for some sta2x11 sctl registers

These are required for the clock infrastructure code to properly configure
and control the sta2x11 PLLs.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add scr (otp registers) platform driver
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:59 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Add scr (otp registers) platform driver

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Use one lock per device instead of one lock per mfd
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:58 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Use one lock per device instead of one lock per mfd

The lock is used to implement atomic operations on each platform
device's registers, so it looks reasonable having one lock per
device instead of one common lock for all the devices belonging
to the same sta2x11 instance.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Do not mind about gpio platform data
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:57 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Do not mind about gpio platform data

The gpio platform driver will take care of its platform data,
let's not do any checks here.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Only add sta2x11_mfd if it hasn't already been added
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:56 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Only add sta2x11_mfd if it hasn't already been added

The pci probe method is called twice now, so we have to call
sta2x11_mfd_add() only once to avoid a -EBUSY error.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Use defines for platform devices' names
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:55 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Use defines for platform devices' names

Since there are now many sta2x11-mfd platform devices, using defines
for their names looks like a better solution.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add sta2x11_mfd_get_regs_data() function
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:54 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Add sta2x11_mfd_get_regs_data() function

A couple of predefined clocks (mux and gated) need to be
initialized with the virtual address of the clock's controlling
register and the address of a spinlock used to protect against
races.

This function exports such data for all the mfd cells.

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add regmap support
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:53 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Add regmap support

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: sta2x11-mfd: Add apb-soc regs driver and factor out common code
Davide Ciminaghi [Fri, 9 Nov 2012 14:19:52 +0000 (15:19 +0100)]
mfd: sta2x11-mfd: Add apb-soc regs driver and factor out common code

A driver for the apb-soc registers is needed by the clock
infrastructure code to configure and control clocks on the sta2x11
chip.

Since some of the functions in sta2x11-mfd.c were almost identical
for the two existing platform devices, the following changes
have been performed to avoid further code duplication while
adding the apb-soc-regs driver:

* The sctl_regs and apbreg_regs fields in struct sta2x11_mfd
have been turned into just one array of pointers accessed by
device index.
* Platform probe methods have become one-liners invoking a
common probe with the device's index as second parameter.
* For loops have been inserted where the same operations
were performed for each of the two bars of a pci device.
* The apbreg_mask and sctl_mask functions were almost identical,
so they were turned into inline functions invoking a common
__sta2x11_mfd_mask() with the platform device's index as last
parameter. To do this, enum sta2x11_mfd_plat_dev has been declared in
sta2x11-mfd.h and more device types have been added to it.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agommc: rtsx: Remove a duplicate command in sd_rw_multi
Wei WANG [Mon, 19 Nov 2012 03:48:17 +0000 (11:48 +0800)]
mmc: rtsx: Remove a duplicate command in sd_rw_multi

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoiio: adc: Add viperboard adc driver
Lars Poeschel [Mon, 5 Nov 2012 14:48:26 +0000 (15:48 +0100)]
iio: adc: Add viperboard adc driver

This adds the mfd cell to use the adc part of the Nano River Technologies
viperboard.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoi2c: Add viperboard i2c master driver
Lars Poeschel [Mon, 19 Nov 2012 15:36:04 +0000 (16:36 +0100)]
i2c: Add viperboard i2c master driver

This adds the mfd cell to use the i2c part of the Nano River Technologies
viperboard as i2c master.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agogpio: Add viperboard gpio driver
Lars Poeschel [Mon, 5 Nov 2012 14:48:24 +0000 (15:48 +0100)]
gpio: Add viperboard gpio driver

This adds the mfd cell to use the gpio a and gpio b part
of the Nano River Technologies viperboard.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add viperboard driver
Lars Poeschel [Mon, 5 Nov 2012 14:48:23 +0000 (15:48 +0100)]
mfd: Add viperboard driver

Add mfd driver for Nano River Technologies viperboard.

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Only unregister platform devices allocated by the mfd core
Charles Keepax [Fri, 9 Nov 2012 16:15:28 +0000 (16:15 +0000)]
mfd: Only unregister platform devices allocated by the mfd core

mfd_remove_devices would iterate over all devices sharing a parent with
an mfd device regardless of whether they were allocated by the mfd core
or not. This especially caused problems when the device structure was
not contained within a platform_device, because to_platform_device is
used on each device pointer.

This patch defines a device_type for mfd devices and checks this is
present from mfd_remove_devices_fn before processing the device.

Cc: stable@vger.kernel.org
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agogpio: gpio-da9052: Convert to the new da9052 interrupt functions
Fabio Estevam [Thu, 4 Oct 2012 03:15:09 +0000 (00:15 -0300)]
gpio: gpio-da9052: Convert to the new da9052 interrupt functions

Convert to the new da9052 interrupt functions, so that we can get rid of
irq_base references.

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agopower: da9052-battery: Convert to the new da9052 interrupt functions
Fabio Estevam [Thu, 4 Oct 2012 03:15:08 +0000 (00:15 -0300)]
power: da9052-battery: Convert to the new da9052 interrupt functions

Convert to the new da9052 interrupt functions, so that we can get rid of
irq_base references.

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoInput: da9052_onkey.c: Convert to the new da9052 interrupt functions.
Fabio Estevam [Thu, 4 Oct 2012 03:15:07 +0000 (00:15 -0300)]
Input: da9052_onkey.c: Convert to the new da9052 interrupt functions.

Use the new da9052 irq functions and allow the driver to probe successfully.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoInput: da9052_tsi.c: Fix interrupt handling
Fabio Estevam [Thu, 4 Oct 2012 04:21:30 +0000 (01:21 -0300)]
Input: da9052_tsi.c: Fix interrupt handling

Currently da9062_tsi does not probe and it fails as follows:

da9052 1-0048: Unable to determine device interrupts

Use the new da9052 irq functions and allow the driver to probe and operate
correctly.

Tested on mx53qsb board using 'evtest' tool.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: da9052: Introduce da9052-irq.c
Fabio Estevam [Thu, 4 Oct 2012 03:15:05 +0000 (00:15 -0300)]
mfd: da9052: Introduce da9052-irq.c

Create a da9052-irq.c file so that it can handle interrupt related functions.

This is useful for allowing the da9052 drivers to use such functions
when dealing with da9052 interrupts.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: da9052-core: Use regmap_irq_get_virq() and fix the probe
Fabio Estevam [Thu, 4 Oct 2012 03:15:04 +0000 (00:15 -0300)]
mfd: da9052-core: Use regmap_irq_get_virq() and fix the probe

On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows:

da9052 1-0048: DA9052 ADC IRQ failed ret=-22

The reason for the error was due to passing only the offset as the interrupt
number in request_threaded_irq() without da9052->irq_base.

The recommended approach though is to use regmap_get_virq() to acquire the
interrupt number and this allows to get rid of da9052->irq_base.

Fix it and allow the driver to probe successfully.

Also provide a few more error logs and change the irq string to "adc-irq", so
that it appears as a single word in 'cat /proc/interrupts'

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: tps65910: Pass irq_domain when adding mfd sub devices
Laxman Dewangan [Tue, 13 Nov 2012 14:03:59 +0000 (19:33 +0530)]
mfd: tps65910: Pass irq_domain when adding mfd sub devices

When adding the sub device "tps65910-rtc", is it passed the
IO resource IRQ for the interrupt number. This interrupt needs
to map in the device irq domain. Pass the irq domain of device
in mfd_add_devices() so that proper irq mapping can be done when
adding the sub device RTC.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: tps65910: Move interrupt implementation code to mfd file
Laxman Dewangan [Tue, 13 Nov 2012 14:03:58 +0000 (19:33 +0530)]
mfd: tps65910: Move interrupt implementation code to mfd file

In place of implementing the irq support in separate file,
moving implementation to main mfd file.
The irq files only contains the table and init steps only
and does not need extra file to have this only for this
purpose.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: tps65910: Use regmap irq framework for interrupt support
Laxman Dewangan [Tue, 13 Nov 2012 14:03:57 +0000 (19:33 +0530)]
mfd: tps65910: Use regmap irq framework for interrupt support

Implement irq support of tps65910 with regmap irq framework
in place of implementing locally.
This reduces the code size significantly and easy to maintain.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: tps65910: Initialize mfd devices after all initialization done
Laxman Dewangan [Tue, 13 Nov 2012 14:03:56 +0000 (19:33 +0530)]
mfd: tps65910: Initialize mfd devices after all initialization done

Add sub devices of tps65910 after all initialization like interrupt,
clock etc. is done. This will make sure that require data gets
initialized properly before sub devices probe's get called.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoMerge tag 'lock' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap...
Samuel Ortiz [Tue, 20 Nov 2012 11:20:58 +0000 (12:20 +0100)]
Merge tag 'lock' of git://git./linux/kernel/git/broonie/regmap into for-next

regmap: Customisable lock functions

Allow maps to replace the lock function for integration with dynamic
register accessability states.

12 years agoMerge tag 'topic/domain' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Samuel Ortiz [Tue, 20 Nov 2012 11:20:47 +0000 (12:20 +0100)]
Merge tag 'topic/domain' of git://git./linux/kernel/git/broonie/regmap into for-next

12 years agomfd: Implement tps6586x gpio_to_irq
Laxman Dewangan [Tue, 13 Nov 2012 13:48:07 +0000 (19:18 +0530)]
mfd: Implement tps6586x gpio_to_irq

The TPS6586x adds the interrupt of this device using
linear mapping on irq domain.
Hence, implement gpio_to_irq to get the irq number
corresponding to TPS6586x GPIOs which is created
dynamically.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add irq io-resource for tps6586x rtc sub driver
Laxman Dewangan [Tue, 13 Nov 2012 13:48:06 +0000 (19:18 +0530)]
mfd: Add irq io-resource for tps6586x rtc sub driver

Add IRQ IORESOURCE for rtc sub driver of this device.
The rtc driver can get the irq by calling platform_get_irq().

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Convert tps6586x to irq_domain
Laxman Dewangan [Tue, 13 Nov 2012 13:48:05 +0000 (19:18 +0530)]
mfd: Convert tps6586x to irq_domain

Allocate the irq base if it base is not porvided i.e.
in case of device tree invocation of this driver.
Convert the tps6586x driver to irq domain, using a
legacy IRQ mapping if an irq_base is specified in
platform data or dynamically allocated and otherwise
using a linear mapping.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Rename the core driver
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:33 +0000 (13:55 +0200)]
mfd: twl6040: Rename the core driver

After the regmap_irq conversion there is no need to call the driver
as twl6040-core.c since there is only one c file remained.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Convert to use regmap_irq
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:32 +0000 (13:55 +0200)]
mfd: twl6040: Convert to use regmap_irq

With regmap_irq it is possible to remove the twl6040-irq.c file and
simplify the code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Correct Ready and Thermal interrupt handling
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:31 +0000 (13:55 +0200)]
mfd: twl6040: Correct Ready and Thermal interrupt handling

Create new irq handler for thermal events in order to be able to handle the
event and clean up the code regarding to interrupt handling:
Use proper function names for the irq handlers
No need to read the INTD register anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Restructure power up and down code
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:30 +0000 (13:55 +0200)]
mfd: twl6040: Restructure power up and down code

Rearrange the code path for power up and down sequence.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Remove unused parameter for twl6040_power_up_completion()
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:29 +0000 (13:55 +0200)]
mfd: twl6040: Remove unused parameter for twl6040_power_up_completion()

naudint parameter has not been used, remove it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: twl6040: Fix typo for power on failure
Peter Ujfalusi [Thu, 11 Oct 2012 11:55:28 +0000 (13:55 +0200)]
mfd: twl6040: Fix typo for power on failure

Fix old copy paste bug:
automatic power-down failed -> automatic power-up failed

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Remove Unicode Byte Order Marks from da9055
Geert Uytterhoeven [Mon, 15 Oct 2012 20:44:45 +0000 (22:44 +0200)]
mfd: Remove Unicode Byte Order Marks from da9055

Older gcc (< 4.4) doesn't like files starting with Unicode BOMs:

include/linux/mfd/da9055/core.h:1: error: stray ‘\357’ in program
include/linux/mfd/da9055/core.h:1: error: stray ‘\273’ in program
include/linux/mfd/da9055/core.h:1: error: stray ‘\277’ in program
include/linux/mfd/da9055/pdata.h:1: error: stray ‘\357’ in program
include/linux/mfd/da9055/pdata.h:1: error: stray ‘\273’ in program
include/linux/mfd/da9055/pdata.h:1: error: stray ‘\277’ in program
include/linux/mfd/da9055/reg.h:1: error: stray ‘\357’ in program
include/linux/mfd/da9055/reg.h:1: error: stray ‘\273’ in program
include/linux/mfd/da9055/reg.h:1: error: stray ‘\277’ in program

Remove the BOMs, the rest of the files is plain ASCII anyway.

Output of "file" before:

include/linux/mfd/da9055/core.h:  UTF-8 Unicode (with BOM) C program text
include/linux/mfd/da9055/pdata.h: UTF-8 Unicode (with BOM) C program text
include/linux/mfd/da9055/reg.h:   UTF-8 Unicode (with BOM) C program text

Output of "file" after:

include/linux/mfd/da9055/core.h:  ASCII C program text
include/linux/mfd/da9055/pdata.h: ASCII C program text
include/linux/mfd/da9055/reg.h:   ASCII C program text

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Differentiate between u8500 and u9540 TCDM address mapping
Lee Jones [Mon, 5 Nov 2012 15:10:36 +0000 (16:10 +0100)]
mfd: Differentiate between u8500 and u9540 TCDM address mapping

The TCDM mappings are quite different from u8500 to u9540. If these
aren't correctly specified for a given board, it will fail to boot.
Here we add the correct TCDM base for the u9540.

Please note that although this patch allows us to boot the u9540,
it doesn't provide us with full enablement. For that, another
patch-set will follow which completely re-vamps the way the PRCMU
is passed TCDM mappings.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: ab8500-core: Use devm_* memory/IRQ and allocation/free routines
Lee Jones [Mon, 5 Nov 2012 15:10:35 +0000 (16:10 +0100)]
mfd: ab8500-core: Use devm_* memory/IRQ and allocation/free routines

It is better to use devm_* calls, as they allow for easier
and more automatic clean-up. Resources are device allocated,
so when a device is freed, so are all associated resources.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoDocumentation: Describe bindings for STMPE Multi-Functional Device driver
Lee Jones [Mon, 5 Nov 2012 15:10:34 +0000 (16:10 +0100)]
Documentation: Describe bindings for STMPE Multi-Functional Device driver

Here we add the required documentation for the STMPE Multi-Functional
Device (MFD) Device Tree bindings. It describes all of the bindings
currently supported by the driver.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Enable the STMPE MFD for Device Tree
Lee Jones [Mon, 5 Nov 2012 15:10:33 +0000 (16:10 +0100)]
mfd: Enable the STMPE MFD for Device Tree

This patch allows the STMPE Multi-Functional Device to be correctly
initialised when booting with Device Tree support enabled. Its
children are specified by the addition of subordinate devices to the
STMPE node in the Device Tree file.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Correct copy and paste mistake in stmpe
Lee Jones [Mon, 5 Nov 2012 15:10:32 +0000 (16:10 +0100)]
mfd: Correct copy and paste mistake in stmpe

When specifying IRQ numbers for the stmpe1601, IRQ defines for the
stmpe24xx were used instead. Fortunately, the defined numbers are
the same, hence why it survived testing. This fix is merely an
aesthetic one.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Provide the STMPE driver with its own IRQ domain
Lee Jones [Mon, 5 Nov 2012 15:10:31 +0000 (16:10 +0100)]
mfd: Provide the STMPE driver with its own IRQ domain

The STMPE driver is yet another IRQ controller which requires its
own IRQ domain. So, we provide it with one.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Prevent STMPE from abusing mfd_add_devices' irq_base parameter
Lee Jones [Mon, 5 Nov 2012 15:10:30 +0000 (16:10 +0100)]
mfd: Prevent STMPE from abusing mfd_add_devices' irq_base parameter

Originally IRQ incrementers were provided in some template resource
structures for keypad and touchscreen devices. These were passed as
IORESOURCE_IRQs to MFD core in the usual way. The true device IRQs
were instead added to the irq_base when mfd_add_devices was invoked.
This is clearly an abuse of the call, and does not scale when IRQ
Domains are brought into play. Before we can provide the STMPE with
its own IRQ Domain we must first fix this. This patche keeps most
of the driver's structure, keeping the template strategy. However,
instead of providing the IRQ as an increment to irq_base, we
dynamically populate the IORESOURCE_IRQ with the correct device IRQ.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: ab8500-core: Remove unused ab8500-gpio IRQ ranges
Lee Jones [Mon, 5 Nov 2012 15:10:29 +0000 (16:10 +0100)]
mfd: ab8500-core: Remove unused ab8500-gpio IRQ ranges

The IRQ ranges provided in ab8500-core to be passed on to the
ab8500-gpio driver are not only redundant, but they are also
causing a warning in the boot log. These IRQ ranges, like any
other MFD related IRQ resource are passed though MFD core for
automatic conversion to virtual IRQs; however, MFD core does
not support IRQ mapping of IRQ ranges. Let's just remove them.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Explicitely include slab.h to rtsx
Samuel Ortiz [Fri, 9 Nov 2012 09:19:54 +0000 (10:19 +0100)]
mfd: Explicitely include slab.h to rtsx

This fixes the following build error on some architectures (parisc at least):

drivers/mfd/rtsx_pcr.c: In function 'rtsx_pci_init_chip':
drivers/mfd/rtsx_pcr.c:985:2: error: implicit declaration of function 'kcalloc'
[-Werror=implicit-function-declaration]
drivers/mfd/rtsx_pcr.c:985:13: warning: assignment makes pointer from integer
without a cast [enabled by default]

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Select MFD_CORE for rtsx
Samuel Ortiz [Thu, 8 Nov 2012 09:38:56 +0000 (10:38 +0100)]
mfd: Select MFD_CORE for rtsx

The realtek driver use the MFD core API and thus must select MFD_CORE.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomemstick: Add realtek pcie memstick host driver
Wei WANG [Mon, 29 Oct 2012 05:49:44 +0000 (13:49 +0800)]
memstick: Add realtek pcie memstick host driver

Realtek PCI-E Memstick card host driver is used to access Memstick
card, with the help of Realtek PCI-E card reader MFD driver.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agommc: Add realtek pcie sdmmc host driver
Wei WANG [Mon, 29 Oct 2012 05:49:38 +0000 (13:49 +0800)]
mmc: Add realtek pcie sdmmc host driver

Realtek PCI-E SD/MMC card host driver is used to access SD/MMC card,
with the help of Realtek PCI-E card reader MFD driver.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Add realtek pcie card reader driver
Wei WANG [Mon, 29 Oct 2012 05:49:33 +0000 (13:49 +0800)]
mfd: Add realtek pcie card reader driver

Realtek PCI-E card reader driver adapts requests from upper-level
sdmmc/memstick layer to the real physical card reader.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: mc13xxx: Add support for mc34708
Uwe Kleine-König [Thu, 12 Jul 2012 09:57:53 +0000 (09:57 +0000)]
mfd: mc13xxx: Add support for mc34708

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: mc13xxx: Change probing details for mc13xxx devices
Uwe Kleine-König [Thu, 12 Jul 2012 09:57:52 +0000 (09:57 +0000)]
mfd: mc13xxx: Change probing details for mc13xxx devices

This removes auto-detection of which variant of mc13xxx is used because
mc34708 uses a different layout in the revision register that doesn't
allow differentiation any more.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoIIO : ADC: tiadc: Add support of TI's ADC driver
Patil, Rachna [Tue, 16 Oct 2012 07:25:45 +0000 (12:55 +0530)]
IIO : ADC: tiadc: Add support of TI's ADC driver

This patch adds support for TI's ADC driver.
This is a multifunctional device.
Analog input lines are provided on which
voltage measurements can be carried out.
You can have upto 8 input lines.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoinput: TSC: ti_tsc: Convert TSC into a MFDevice
Patil, Rachna [Tue, 16 Oct 2012 07:25:44 +0000 (12:55 +0530)]
input: TSC: ti_tsc: Convert TSC into a MFDevice

This patch converts touchscreen into a MFD client.
All the register definitions, clock initialization,
etc has been moved to MFD core driver.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>