]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branch 'usbhost17-for-mfd' of git://github.com/rogerq/linux into for-next
Samuel Ortiz [Wed, 13 Feb 2013 23:27:29 +0000 (00:27 +0100)]
Merge branch 'usbhost17-for-mfd' of git://github.com/rogerq/linux into for-next

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge branch 'usbhost17-common' of git://github.com/rogerq/linux into for-next
Samuel Ortiz [Wed, 13 Feb 2013 23:27:03 +0000 (00:27 +0100)]
Merge branch 'usbhost17-common' of git://github.com/rogerq/linux into for-next

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH
James Ralston [Sat, 9 Feb 2013 01:33:38 +0000 (17:33 -0800)]
mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH

This patch adds the Watchdog Timer Device IDs for the Intel Wellsburg PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lpc_sch: Accomodate partial population of the MFD devices
Darren Hart [Fri, 8 Feb 2013 23:20:36 +0000 (15:20 -0800)]
mfd: lpc_sch: Accomodate partial population of the MFD devices

The current probe aborts if any of the 3 base address registers are
disabled. On a TunnelCreek system I am working on, this resulted in the
SMBIOS and GPIO devices being removed when it couldn't read the base
address for the watchdog timer.

This patch accommodates partial population of the lpc_sch_cells array and
only aborts if all the base address registers are disabled. A max size
array is allocated and the individual device cells are added to it after
their base addresses are successfully determined. This simplifies the
code a bit by removing the need for the separate tunnelcreek cells array
and combining some of the add/remove logic.

Cc: Grant Likely <grant.likely@secretlab.ca>,
Cc: Denis Turischev <denis@compulab.co.il>,
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: da9052-i2c: Staticize da9052_i2c_fix()
Fabio Estevam [Mon, 11 Feb 2013 20:48:01 +0000 (18:48 -0200)]
mfd: da9052-i2c: Staticize da9052_i2c_fix()

da9052_i2c_fix() is only used locally, so let it be static.

Fix the following sparse warning:

drivers/mfd/da9052-i2c.c:63:5: warning: symbol 'da9052_i2c_fix' was not declared. Should it be static?

Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: syscon: Fix sparse warning
Fabio Estevam [Mon, 11 Feb 2013 20:48:00 +0000 (18:48 -0200)]
mfd: syscon: Fix sparse warning

Fix the following sparse warnings:

drivers/mfd/syscon.c:40:15: warning: symbol 'syscon_node_to_regmap' was not declared. Should it be static?
drivers/mfd/syscon.c:56:15: warning: symbol 'syscon_regmap_lookup_by_compatible' was not declared. Should it be static?
drivers/mfd/syscon.c:72:15: warning: symbol 'syscon_regmap_lookup_by_phandle' was not declared. Should it be static?

Cc: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Fix kernel panic on boot
Jon Hunter [Mon, 11 Feb 2013 20:26:19 +0000 (14:26 -0600)]
mfd: twl-core: Fix kernel panic on boot

Commit 8a6aaa3 (mfd: twl-core: Collect global variables behind one
private structure (global)) removed the variable "inuse" that is used
to determine if the device has been initialised and now use the
twl_priv structure instead. This is causing the kernel to panic on
OMAP3+ devices using the twl driver, because we try to access the
twl_priv->ready member before checking if twl_priv is initialised. Fix
this and move this test to the beginning of the twl_i2c_read/write
function because twl_get_last_module() also uses the twl_priv structure.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge branch 'abx500-pinctrl-for-mfd' of git://git.kernel.org/pub/scm/linux/kernel...
Samuel Ortiz [Wed, 13 Feb 2013 23:24:41 +0000 (00:24 +0100)]
Merge branch 'abx500-pinctrl-for-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into for-next

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Fix issue that booting OS with SD card inserted
Wei WANG [Fri, 8 Feb 2013 07:24:27 +0000 (15:24 +0800)]
mfd: rtsx: Fix issue that booting OS with SD card inserted

Realtek card reader supports both SD and MS card. According to the
settings of rtsx MFD driver, SD host will be probed before MS host.
If we boot/reboot Linux with SD card inserted, the resetting flow of SD
card will succeed, and the following resetting flow of MS is sure to fail.
Then MS upper-level driver will ask rtsx driver to turn power off. This
request leads to the result that the following SD commands fail and SD card
can't be accessed again.

In this commit, Realtek's SD and MS host driver will check whether the card
that upper driver requesting is the one existing in the slot. If not, Realtek's
host driver will refuse the operation to make sure the exlusive accessing
at the same time.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500: Fix compile error
Linus Walleij [Wed, 6 Feb 2013 22:23:01 +0000 (23:23 +0100)]
mfd: ab8500: Fix compile error

When compiling the AB8500 core driver in the latest
MFD tree the following happens:

  CC      drivers/mfd/ab8500-debugfs.o
/home/elinwal/linux-next/drivers/mfd/ab8500-debugfs.c:157:3: error: 'AB8500_SYS_CTRL1_BLOCK' undeclared here (not in a function)
/home/elinwal/linux-next/drivers/mfd/ab8500-debugfs.c:157:2: error: array index in initializer not of integer type
/home/elinwal/linux-next/drivers/mfd/ab8500-debugfs.c:157:2: error: (near initialization for 'debug_ranges')
(...)

This is due to a missing include statement, so fix
it up.

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: Add missing GENERIC_HARDIRQS dependecies
Heiko Carstens [Wed, 6 Feb 2013 16:23:51 +0000 (17:23 +0100)]
mfd: Add missing GENERIC_HARDIRQS dependecies

A lot of mfd drivers select MFD_CORE which however depends on
GENERIC_HARDIRQS support.
So add the missing dependency to all drivers to get rid of
this link error:

ERROR: "irq_create_mapping" [drivers/mfd/mfd-core.ko] undefined!

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoMerge branch 'for-mfd' of git://git.linaro.org/people/ljones/linux-3.0-ux500 into...
Samuel Ortiz [Wed, 13 Feb 2013 23:23:17 +0000 (00:23 +0100)]
Merge branch 'for-mfd' of git://git.linaro.org/people/ljones/linux-3.0-ux500 into for-next

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoDocumentation: Add docs for max8925 dt
Qing Xu [Mon, 4 Feb 2013 15:40:47 +0000 (23:40 +0800)]
Documentation: Add docs for max8925 dt

add docs for dt of max8925-mfd, max8925-backlight, and
max8925-battery

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max8925: Add dts
Qing Xu [Mon, 4 Feb 2013 15:40:46 +0000 (23:40 +0800)]
mfd: max8925: Add dts

Add max8925 dts support into mmp2 brownstone platform

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max8925: Support dt for backlight
Qing Xu [Mon, 4 Feb 2013 15:40:45 +0000 (23:40 +0800)]
mfd: max8925: Support dt for backlight

Add device tree support in max8925 backlight.

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max8925: Fix onkey driver irq base
Qing Xu [Mon, 4 Feb 2013 15:40:44 +0000 (23:40 +0800)]
mfd: max8925: Fix onkey driver irq base

update onkey driver's irq base, it should get from max8925,
but not save in a private value

Signed-off-by: Qing Xu <qingx@marvell.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max8925: Fix mfd device register failure
Qing Xu [Mon, 4 Feb 2013 15:40:43 +0000 (23:40 +0800)]
mfd: max8925: Fix mfd device register failure

we encounter rtc/power/touch driver registry failure, root cause
it is resources confilict in insert_resouce, solved by changing
mfd_add_devices 5th parameter to NULL

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: max8925: Add irqdomain for dt
Qing Xu [Mon, 4 Feb 2013 15:40:42 +0000 (23:40 +0800)]
mfd: max8925: Add irqdomain for dt

Add irqdomains for max8925's main irq, wrap irq register operations
into irqdomain's map func. it is necessary for dt support.

Also, add dt support for max8925 driver.

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: vexpress: Allow vexpress-sysreg to self-initialise
Catalin Marinas [Mon, 4 Feb 2013 18:08:02 +0000 (18:08 +0000)]
mfd: vexpress: Allow vexpress-sysreg to self-initialise

The vexpress_sysreg_init() is a core_initcall() already and it can
trigger the early initialisation if a matching node is found. This patch
allows the SoC code to avoid calling vexpress_sysreg_of_early_init()
explicitly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Support RTS5227
Roger Tseng [Mon, 4 Feb 2013 07:45:59 +0000 (15:45 +0800)]
mfd: rtsx: Support RTS5227

Support new model RTS5227.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
Reviewed-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Implement driving adjustment to device-dependent callbacks
Roger Tseng [Mon, 4 Feb 2013 07:45:58 +0000 (15:45 +0800)]
mfd: rtsx: Implement driving adjustment to device-dependent callbacks

Implement different ways of selecting driving capability(a necessary adjustment
along with voltage change). It was origionally in device-independent
mmc/host/rtsx_pci_sdmmc.c. Moving it here to support devices which may have a
different way of adjustment.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
Reviewed-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: vexpress: Add pseudo-GPIO based LEDs
Pawel Moll [Wed, 30 Jan 2013 10:33:16 +0000 (10:33 +0000)]
mfd: vexpress: Add pseudo-GPIO based LEDs

The LEDs on the Versatile Express motherboard are controlled
through simple memory-mapped register. This patch extends
the pseudo-GPIO controller definition for these lines and
creates generic "leds-gpio" device using them

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: ab8500: Rename ab8500 to abx500 for hwmon driver
Hongbo Zhang [Wed, 30 Jan 2013 10:21:27 +0000 (18:21 +0800)]
mfd: ab8500: Rename ab8500 to abx500 for hwmon driver

We are using a generic abx500 hwmon layer, so rename specific ab8500 to generic
abx500 for hwmon device and driver matching.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Optimize card detect flow
Wei WANG [Tue, 29 Jan 2013 07:21:37 +0000 (15:21 +0800)]
mfd: rtsx: Optimize card detect flow

1. Schedule card detect work at the end of the ISR
2. Callback function ops->cd_deglitch may delay for a period of time.
It is not proper to call this callback when local irq disabled.
3. Card detect flow can't be executed in parallel with other card reader
operations, so it's better to be protected by mutex.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Use macros to replace some variables
Wei WANG [Tue, 29 Jan 2013 07:21:36 +0000 (15:21 +0800)]
mfd: rtsx: Use macros to replace some variables

In function rtsx_pci_switch_clock, some variables, such as min_n, max_n,
and max_div, are not necessary. And those assigned values look very
obscure for others. It's more proper to use macro definitions here to
replace these variables.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Fix checkpatch warning
Wei WANG [Tue, 29 Jan 2013 07:21:35 +0000 (15:21 +0800)]
mfd: rtsx: Fix checkpatch warning

WARNING: Avoid CamelCase: <min_N>
+ u8 N, min_N, max_N, clk_divider;

WARNING: Avoid CamelCase: <max_N>
+ u8 N, min_N, max_N, clk_divider;

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Declare that the DMA address limitation is 32bit explicitly
Wei WANG [Tue, 29 Jan 2013 07:21:34 +0000 (15:21 +0800)]
mfd: rtsx: Declare that the DMA address limitation is 32bit explicitly

Realtek PCIe card reader only supports 32bit DMA.
This declaration can improve the readability.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Remove redundant code
Wei WANG [Tue, 29 Jan 2013 07:21:33 +0000 (15:21 +0800)]
mfd: rtsx: Remove redundant code

In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: rtsx: Fix typo in comment
Wei WANG [Tue, 29 Jan 2013 07:21:32 +0000 (15:21 +0800)]
mfd: rtsx: Fix typo in comment

Fix a misspelling word in comment

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: remove suspend/resume callbacks
Laxman Dewangan [Tue, 29 Jan 2013 09:05:18 +0000 (14:35 +0530)]
mfd: tps65090: remove suspend/resume callbacks

The tps65090 mfd driver implement the suspend/resume callbacks
which just disable and enable irqs in suspend/resume respectively.

This operation is already done in irq suspend and irq_resume and
hence it is not require to implement the same in the driver.

Remove this non-require code.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: Pass irq domain when adding mfd sub devices
Laxman Dewangan [Tue, 29 Jan 2013 09:05:17 +0000 (14:35 +0530)]
mfd: tps65090: Pass irq domain when adding mfd sub devices

When device is get added through DT then irq_base is 0 (zero)
and in this case regmap_irq_chip_get_base() generates warning.
The interrupt of this device get added through irq_domain_add_linear()
when irq_base is 0.

Hence pass the irq domain in place of base_irq when calling
mfd_add_devices().

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps65090: add DT support for tps65090
Laxman Dewangan [Tue, 29 Jan 2013 09:05:15 +0000 (14:35 +0530)]
mfd: tps65090: add DT support for tps65090

Add device tree support for the TI PMIC TPS65090.
The device can be registered through platform or DT.

Add device tree binding document for this device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Make DSP scratch registers readable
Mark Brown [Fri, 25 Jan 2013 09:09:23 +0000 (17:09 +0800)]
mfd: wm5102: Make DSP scratch registers readable

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: tps6507x: Add DT support
Vishwanathrao Badarkhe, Manish [Thu, 24 Jan 2013 10:55:17 +0000 (16:25 +0530)]
mfd: tps6507x: Add DT support

Add device tree based initialization support for TI's
tps6507x mfd device.

Signed-off-by: Vishwanathrao Badarkhe, Manish <manishv.b@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: 88pm80x: Remove redundant devm_* calls
Yi Zhang [Tue, 22 Jan 2013 02:43:45 +0000 (10:43 +0800)]
mfd: 88pm80x: Remove redundant devm_* calls

devm_* functions are device managed and make error handling
and code simpler; it also fix error exit paths

Signed-off-by: Yi Zhang <yizhang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: db8500-prcmu: Add ux500_wdt mfd_cell
Fabio Baltieri [Fri, 18 Jan 2013 11:40:14 +0000 (12:40 +0100)]
mfd: db8500-prcmu: Add ux500_wdt mfd_cell

This patch adds the necessary structures to use the watchdog
functionality of PRCMU.

The watchdog driver is named ux500_wdt.

Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agowatchdog: Add support for ux500_wdt watchdog
Fabio Baltieri [Tue, 29 Jan 2013 08:57:19 +0000 (09:57 +0100)]
watchdog: Add support for ux500_wdt watchdog

This patch adds support for the ux500_wdt watchdog that is found in
ST-Ericsson Ux500 platform.  The driver is based on PRCMU APIs.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: dbx500-prcmu: Export a9wdog functions
Fabio Baltieri [Fri, 18 Jan 2013 11:40:12 +0000 (12:40 +0100)]
mfd: dbx500-prcmu: Export a9wdog functions

Add EXPORT_SYMBOL to db500_prcmu_*_a9wdog functions to allow usage from
module.

Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: dbx500-prcmu: Add watchdog ID definitions
Fabio Baltieri [Fri, 18 Jan 2013 11:40:11 +0000 (12:40 +0100)]
mfd: dbx500-prcmu: Add watchdog ID definitions

Add definition of watchdog IDs to be used by ux500_wdt driver.

Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: lpc_ich: Fix gpio base and control offsets
Aaron Sierra [Thu, 24 Jan 2013 20:52:39 +0000 (14:52 -0600)]
mfd: lpc_ich: Fix gpio base and control offsets

In ICH5 and earlier the GPIOBASE and GPIOCTRL registers are found at
offsets 0x58 and 0x5C, respectively. This patch allows GPIO access to
properly be enabled (and disabled) for these chipsets.

Signed-off-by: Agócs Pál <agocs.pal.86@gmail.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Move twl_i2c_read/write_u8 to header as inline function
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:59 +0000 (14:53 +0100)]
mfd: twl-core: Move twl_i2c_read/write_u8 to header as inline function

twl_i2c_read/write_u8 become as a simple wrapper over the twl_i2c_read/write.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Remove no longer valid comment regarding to write buffer size
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:58 +0000 (14:53 +0100)]
mfd: twl-core: Remove no longer valid comment regarding to write buffer size

With the regmap conversion there is no longeer a need to allocate bigger
buffer for writes

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Collect global variables behind one private structure (global)
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:57 +0000 (14:53 +0100)]
mfd: twl-core: Collect global variables behind one private structure (global)

Gather the global variables under a single structure and allocate it with
devm_kzalloc(). It is easier to see them and if in the future we try to add
support for multiple instance of twl in the system it is going to be much
simpler.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Move 'inuse' check early at probe time
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:56 +0000 (14:53 +0100)]
mfd: twl-core: Move 'inuse' check early at probe time

We can fail earlier in case multiple instance of the twl-core is tried to
be loaded.
The twl-core by design only supports one instance.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Do not create dummy pdata when booted with DT
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:55 +0000 (14:53 +0100)]
mfd: twl-core: Do not create dummy pdata when booted with DT

When booted with DT we can manage without the dummy pdata.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Do not try to call legacy mfd add_children() when booted with DT
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:54 +0000 (14:53 +0100)]
mfd: twl-core: Do not try to call legacy mfd add_children() when booted with DT

There is really no point to retry to add children devices in case the
of_platform_populate() fails.
We do not have any information provided via pdata in this case anyways.
Depending on the boot type (legacy or DT) only execute either one.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Allocate twl_modules dynamically
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:53 +0000 (14:53 +0100)]
mfd: twl-core: Allocate twl_modules dynamically

At boot time we can allocate the twl_modules array dynamically based on the
twl class we are using with devm_kzalloc() instead of the static
twl_modules[] array.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: Use the lookup table to find the correct subchip for the modules
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:52 +0000 (14:53 +0100)]
mfd: twl-core: Use the lookup table to find the correct subchip for the modules

Instead of using SUB_CHIP_ID* or magic numbers use the twl_mapping table to
look for the subchip ID.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: twl-core: No need to check for invalid subchip ID
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:51 +0000 (14:53 +0100)]
mfd: twl-core: No need to check for invalid subchip ID

The module id table no longer can have invalid/unused entries.
No need for checking the ID for validity.

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 module id lookup and definitions
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:50 +0000 (14:53 +0100)]
mfd: twl-core: Clean up module id lookup and definitions

Use enums for all module definitions:
twl_module_ids for common functionality among twl4030/twl6030
twl4030_module_ids for twl4030 specific ids
twl6030_module_ids for twl6030 specific ids

In this way the list can be managed easier when new functionality going to
be implemented.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoARM: OMAP: zoom-display: Remove the use of TWL4030_MODULE_PWM1
Peter Ujfalusi [Wed, 16 Jan 2013 13:53:49 +0000 (14:53 +0100)]
ARM: OMAP: zoom-display: Remove the use of TWL4030_MODULE_PWM1

Use the future proof TWL_MODULE_PWM module id instead to aim the twl-core
cleanup planed for 3.9 kernel cycle.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Provide platform data for MICBIAS configuration
Mark Brown [Mon, 28 Jan 2013 16:47:37 +0000 (00:47 +0800)]
mfd: arizona: Provide platform data for MICBIAS configuration

Allow the MICBIAS voltages and other attributes to be configured by the
platform.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Clarify mixer underclocking error
Mark Brown [Sun, 27 Jan 2013 16:32:53 +0000 (00:32 +0800)]
mfd: arizona: Clarify mixer underclocking error

If the mixer is underclocked it will drop a sample so log that error
more directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Disable interrupts during resume
Mark Brown [Sun, 27 Jan 2013 04:07:32 +0000 (12:07 +0800)]
mfd: arizona: Disable interrupts during resume

Runtime power management does not function during system suspend but the
Arizona devices need to use runtime power management to power up the device
in order to handle interrupts. Try to avoid interrupts firing during
resume by disabling the primary IRQ before interrupts are reenabled on
resume and only reenabling it again during main resume.

The goal is to avoid issues in the situation where an interrupt is asserted
during resume (eg, due to it being the wake source) and the interrupt
handling gets scheduled prior to the device being able to handle runtime
PM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Refresh register defaults
Mark Brown [Sun, 27 Jan 2013 04:07:30 +0000 (12:07 +0800)]
mfd: wm5102: Refresh register defaults

The WM5102 register defaults are not up to date with the current register
map, synchronise them with those for current devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Mark DSP memory regions as volatile and readable
Mark Brown [Sun, 27 Jan 2013 04:07:23 +0000 (12:07 +0800)]
mfd: wm5102: Mark DSP memory regions as volatile and readable

We can cache some of them but this is simpler for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm8994: Use devm_regulator_bulk_get API
Sachin Kamat [Tue, 8 Jan 2013 08:31:22 +0000 (14:01 +0530)]
mfd: wm8994: Use devm_regulator_bulk_get API

devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Update rev B patch for latest evaluation
Mark Brown [Wed, 2 Jan 2013 14:30:18 +0000 (14:30 +0000)]
mfd: wm5102: Update rev B patch for latest evaluation

The latest evaluation of the revision B silicon suggests some changes to
the tuning applied for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: arizona: Register MICVDD supply first to ensure no retries
Mark Brown [Thu, 20 Dec 2012 15:38:03 +0000 (15:38 +0000)]
mfd: arizona: Register MICVDD supply first to ensure no retries

Not strictly required as probe deferral will take care of everything but
it makes boot a little smoother.

Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: wm5102: Mark only extant DSP registers volatile
Mark Brown [Tue, 11 Dec 2012 07:51:39 +0000 (16:51 +0900)]
mfd: wm5102: Mark only extant DSP registers volatile

Since regmap sometimes uses volatile as a proxy for readable simply
having a blanket condition can mark too many registers as readable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agortc: palmas: Add RTC driver Palmas series PMIC
Laxman Dewangan [Thu, 3 Jan 2013 10:47:00 +0000 (16:17 +0530)]
rtc: palmas: Add RTC driver Palmas series PMIC

TI Palmas series PMIC support the RTC and alarm functionality.
Add RTC driver with alarm support for this device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agogpio: palmas: Add support for Palmas GPIO
Laxman Dewangan [Thu, 3 Jan 2013 10:46:59 +0000 (16:16 +0530)]
gpio: palmas: Add support for Palmas GPIO

Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can
work as input/output.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: palmas: Add APIs to access the Palmas' registers
Laxman Dewangan [Thu, 3 Jan 2013 10:46:58 +0000 (16:16 +0530)]
mfd: palmas: Add APIs to access the Palmas' registers

Palmas register set is divided into different blocks (base and offset)
and hence different i2c addresses. The i2c address offsets are derived
from base address of block of registers.

Add inline APIs to access the Palma's registers which takes the base of
register block and register offset. The i2c address offset is  derived
from the base address of register blocks.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: palmas: Add rtc irq number as irq resource for palmas-rtc
Laxman Dewangan [Thu, 3 Jan 2013 10:46:57 +0000 (16:16 +0530)]
mfd: palmas: Add rtc irq number as irq resource for palmas-rtc

Palma RTC is capable of generating alarm interrupt. Pass the alarm interrupt
as IRQ_RESOURCE for palmas-rtc sub device driver so that rtc driver can get
irq as platform_get_irq().

Also pass the irq domain in mfd_add_devices() to properly offset the irqs for
sub devices. This is needed when adding device through DT.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomfd: omap-usb-host: get rid of build warning
Roger Quadros [Wed, 2 Jan 2013 13:59:28 +0000 (15:59 +0200)]
mfd: omap-usb-host: get rid of build warning

Fixes the below build warning when driver is built-in.

drivers/mfd/omap-usb-host.c:750:12: warning:
‘usbhs_omap_remove’ defined but not used [-Wunused-function]

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: Don't spam console on clk_set_parent failure
Roger Quadros [Wed, 28 Nov 2012 14:31:29 +0000 (16:31 +0200)]
mfd: omap-usb-host: Don't spam console on clk_set_parent failure

clk_set_parent is expected to fail on OMAP3 platforms. We don't
consider that as fatal so don't spam console.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: clean up omap_usbhs_init()
Roger Quadros [Mon, 12 Nov 2012 14:32:01 +0000 (16:32 +0200)]
mfd: omap-usb-host: clean up omap_usbhs_init()

We split initializing revision 1 and revision 2 into different
functions. Initialization is now done dynamically so that only
the number of ports available on the system are initialized.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: Get rid of unnecessary spinlock
Roger Quadros [Thu, 15 Nov 2012 09:48:51 +0000 (11:48 +0200)]
mfd: omap-usb-host: Get rid of unnecessary spinlock

The driver does not have an interrupt handler and
we don't really need a spinlock, so get rid of it.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: Manage HSIC clocks for HSIC mode
Roger Quadros [Mon, 12 Nov 2012 14:53:16 +0000 (16:53 +0200)]
mfd: omap-usb-host: Manage HSIC clocks for HSIC mode

Enable the optional HSIC clocks (60MHz and 480MHz) for the ports
that are configured in HSIC mode.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: cleanup clock management code
Roger Quadros [Thu, 8 Nov 2012 15:40:25 +0000 (17:40 +0200)]
mfd: omap-usb-host: cleanup clock management code

All ports have similarly named port clocks so we can
bunch them into a port data structure and use for loop
to enable/disable the clocks.

Dynamically allocate and get clocks based on number of ports
available on the platform

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: override number of ports from platform data
Roger Quadros [Thu, 8 Nov 2012 17:18:08 +0000 (19:18 +0200)]
mfd: omap-usb-host: override number of ports from platform data

Both OMAP4 and 5 exhibit the same revision ID in the REVISION register
but they have different number of ports i.e. 2 and 3 respectively.
So we can't rely on REVISION register for number of ports on OMAP5
and depend on platform data (or device tree) instead.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: know about number of ports from revision register
Roger Quadros [Thu, 8 Nov 2012 16:04:26 +0000 (18:04 +0200)]
mfd: omap-usb-host: know about number of ports from revision register

The revision register should tell us how many ports are present.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: Use devm_kzalloc() and devm_request_and_ioremap()
Roger Quadros [Mon, 26 Nov 2012 15:59:22 +0000 (17:59 +0200)]
mfd: omap-usb-host: Use devm_kzalloc() and devm_request_and_ioremap()

Use devm_ variants of kzalloc and ioremap. Also clean up error path.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap_usb_host: Avoid missing platform data checks in suspend/resume
Roger Quadros [Thu, 8 Nov 2012 16:41:56 +0000 (18:41 +0200)]
mfd: omap_usb_host: Avoid missing platform data checks in suspend/resume

Get rid of the unnecessary missing platform data checks
in runtime_suspend/resume. We are already checking for missing
platform data in probe.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: Add OMAP5 revision and HSIC support
Roger Quadros [Thu, 8 Nov 2012 14:10:41 +0000 (16:10 +0200)]
mfd: omap-usb-tll: Add OMAP5 revision and HSIC support

The TLL module on OMAP5 has 3 channels.
HSIC mode requires the TLL channel to be in Transparent UTMI mode.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: serialize access to TLL device
Roger Quadros [Mon, 26 Nov 2012 14:56:26 +0000 (16:56 +0200)]
mfd: omap-usb-tll: serialize access to TLL device

Get rid of the unnecessary spin_lock_irqsave/restore() as there is
no interrupt handler for this driver. Instead we serialize access
to tll_dev using a global spinlock.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: Fix error message
Roger Quadros [Mon, 26 Nov 2012 13:26:28 +0000 (15:26 +0200)]
mfd: omap-usb-tll: Fix error message

omap_enable/disable_tll() can fail if TLL device is not
initialized. It could be due to multiple reasons and not only
due to missing platform data.

Also make local variables static and use 'struct device *'
instead of 'struct platform_device *' for global reference.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: Check for missing platform data in probe
Roger Quadros [Mon, 26 Nov 2012 13:17:32 +0000 (15:17 +0200)]
mfd: omap-usb-tll: Check for missing platform data in probe

No need to check for missing platform data in runtime_suspend/resume
as it makes more sense to do it in the probe function.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: introduce and use mode_needs_tll()
Roger Quadros [Thu, 8 Nov 2012 12:40:45 +0000 (14:40 +0200)]
mfd: omap-usb-tll: introduce and use mode_needs_tll()

This is a handy macro to check if the port requires the
USB TLL module or not. Use it to Enable the TLL module and manage
the clocks.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: Clean up clock handling
Roger Quadros [Thu, 8 Nov 2012 11:07:09 +0000 (13:07 +0200)]
mfd: omap-usb-tll: Clean up clock handling

Every channel has a functional clock that is similarly named.
It makes sense to use a for loop to manage these clocks as OMAPs
can come with up to 3 channels.

Dynamically allocate and get channel clocks depending on the
number of clocks avaiable on the platform.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agomfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path
Roger Quadros [Mon, 26 Nov 2012 10:56:37 +0000 (12:56 +0200)]
mfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path

Use devm_ variants of kzalloc() and ioremap(). Simplify the error path.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-tll: Fix channel count detection
Roger Quadros [Mon, 26 Nov 2012 10:28:44 +0000 (12:28 +0200)]
mfd: omap-usb-tll: Fix channel count detection

Fix channel count detecion for REV2. Also, don't give up
if we don't recognize the IP Revision. We assume the default
number of channels (i.e. 3) for unrecognized IPs.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: omap-usb-host: Consolidate OMAP USB-HS platform data (part 2/3)
Roger Quadros [Wed, 13 Feb 2013 11:16:25 +0000 (13:16 +0200)]
mfd: omap-usb-host: Consolidate OMAP USB-HS platform data (part 2/3)

Let's have a single platform data structure for the OMAP's High-Speed
USB host subsystem instead of having 3 separate ones i.e. one for
board data, one for USB Host (UHH) module and one for USB-TLL module.

This makes the code much simpler and avoids creating multiple copies of
platform data.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
For the ehci-omap.c part:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
11 years agoARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3)
Roger Quadros [Wed, 13 Feb 2013 11:12:35 +0000 (13:12 +0200)]
ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3)

Let's have a single platform data structure for the OMAP's High-Speed
USB host subsystem instead of having 3 separate ones i.e. one for
board data, one for USB Host (UHH) module and one for USB-TLL module.

This makes the code much simpler and avoids creating multiple copies of
platform data.

Part 1 touches platform headers
Part 2 touches drivers
Part 3 touches platform data

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
11 years agomfd: ab8500: allow AB9540 based devices to use ABX500 pinctrl
Lee Jones [Wed, 16 Jan 2013 15:09:36 +0000 (15:09 +0000)]
mfd: ab8500: allow AB9540 based devices to use ABX500 pinctrl

The old AB8500 GPIO driver has been un-BROKEN and converted into a
multi-platform pinctrl driver. If any AB9540 based devices wish to
request any GPIO pins that it offers, they can after this patch.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: ab8500: ensure new AB8500 pinctrl driver is probed correctly
Lee Jones [Wed, 16 Jan 2013 14:49:45 +0000 (14:49 +0000)]
mfd: ab8500: ensure new AB8500 pinctrl driver is probed correctly

The old, BROKEN AB8500 GPIO driver has been revamped as a shiny
new pinctrl driver and has been renamed as such. So, if we would
like to make use of it, we need to register it via its new name.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: ab8500: provide a irq_set_type() function
Lee Jones [Mon, 7 Jan 2013 12:23:48 +0000 (12:23 +0000)]
mfd: ab8500: provide a irq_set_type() function

In the AB8500 IRQ mask and unmask functions, we rely on testing for
IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING interrupts to
physically mask and unmask the correct interrupt lines. In order
for us to do that, the trigger needs to be set in the associated
flags. However, unless a irq_set_type() function pointer is passed
when registering the IRQ chip, the IRQ subsystem will refuse to do
it. For that reason, we're providing one.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: ab8500: actually handle the AB8500 GPIO IRQs correctly
Linus Walleij [Wed, 6 Feb 2013 20:54:34 +0000 (21:54 +0100)]
mfd: ab8500: actually handle the AB8500 GPIO IRQs correctly

The patch:
"mfd: ab8500: prepare to handle AB8500 GPIO's IRQs correctly"
altered the AB8500 IRQ mask/unmask functions such that they
would handle masking on/off the falling edge IRQ if this was
requested by the consumer. However the bit mask for hwirqs
43 and 44 was shifting the bit mask incorrectly, resulting in
the wrong IRQ being mased/unmasked.

Further while the patch would mask/unmask the correct line,
when the interrupt actually came in, it would still be treated
as a valid hwirq. The offsetting applied when masking/unmasking
was not applied when handling the IRQ, i.e. the falling edge
lines were not routed back to the rising edge lines.

This fixes both cases. The end result has been tested with
the SIM detect IRQ, GPIO12, hwirq 46 and 62.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
11 years agomfd: ab8500: prepare to handle AB8500 GPIO's IRQs correctly
Lee Jones [Thu, 20 Dec 2012 11:23:42 +0000 (11:23 +0000)]
mfd: ab8500: prepare to handle AB8500 GPIO's IRQs correctly

In an upcoming patch, the gpio-ab8500 driver will relinquish all
IRQ handling capability and pass it back into the AB8500 core
driver. This will aid in reducing massive code duplication within
the kernel. Also, most of the functionality is already in the
AB8500 core driver, as the GPIO IRQs are actually sandwiched
between lots of other IRQs which the core driver already handles.

All we're doing here is providing the core driver with knowledge
that each GPIO has two IRQs assigned to it; one for rising and
a separate one for falling.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agomfd: ab8500-gpadc: Use new ab8500_gpadc_get() with name parameter
Philippe Langlais [Wed, 18 Apr 2012 13:52:59 +0000 (15:52 +0200)]
mfd: ab8500-gpadc: Use new ab8500_gpadc_get() with name parameter

The new format of ab8500_gpadc_get() accepts a device name as a
parameter to specify which device to retrieve. This patch
enforces the use of that new format.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
11 years agomfd: ab8500-gpadc: Remove unused 'struct ab8500_gpadc'
Lee Jones [Mon, 28 Jan 2013 09:21:58 +0000 (09:21 +0000)]
mfd: ab8500-gpadc: Remove unused 'struct ab8500_gpadc'

The ab8500_gpadc structure carries lots of important information which
most functions make good use of. The initial expectation was that
ab8500_gpadc_runtime_idle() would be no exception; however, this hasn't
been the case to date. Let's remove it for now and add it back in only
when we have a use for it.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
11 years agomfd: ab8500-gpadc: Reduce conversion timeout
Lee Jones [Mon, 28 Jan 2013 09:20:45 +0000 (09:20 +0000)]
mfd: ab8500-gpadc: Reduce conversion timeout

Reduce the conversion timeout from 2s to 0.5s

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Karl KOMIEROWSKI <karl.komierowski@stericsson.com>
11 years agomfd: ab8500-debugfs: sizeof() mismatch bugfix
Ashok G [Tue, 28 Feb 2012 04:51:00 +0000 (10:21 +0530)]
mfd: ab8500-debugfs: sizeof() mismatch bugfix

Simple pointer error fix to obtain the expected sizeof() result.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ashok G <ashok.g@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
11 years agomfd: ab8500-gpadc: Add runtime pm support
Lee Jones [Mon, 4 Feb 2013 08:33:13 +0000 (08:33 +0000)]
mfd: ab8500-gpadc: Add runtime pm support

Add runtime pm support to speed up multiple ADC reads in a row.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
11 years agomfd: ab8500-debugfs: Add interrupt debug
Bengt Jonsson [Tue, 14 Feb 2012 12:01:00 +0000 (13:01 +0100)]
mfd: ab8500-debugfs: Add interrupt debug

This patch adds an entry in debugfs to check number of interrupts
from the AB.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
11 years agomfd ab8500-gpadc: Introduce new AB version detection
Michel JAOUEN [Thu, 9 Feb 2012 11:06:47 +0000 (12:06 +0100)]
mfd ab8500-gpadc: Introduce new AB version detection

Add support for AB8505 and AB9540

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Maxime Coquelin <maxime.coquelin@stericsson.com>
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
11 years agomfd: ab8500-debugfs: Allow number of IRQs to be provided more dynamically
Linus Walleij [Fri, 3 Feb 2012 10:19:05 +0000 (11:19 +0100)]
mfd: ab8500-debugfs: Allow number of IRQs to be provided more dynamically

With the introduction of new AB* platforms, it's important to allow
as much code reuse as possible. By allowing a system's number of IRQs
to be dynamically passed, we can reuse almost all of the -debugfs
driver.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
11 years agomfd: ab8500-core: Allow the possibility to dump all AB8500 registers
Mian Yousaf Kaukab [Fri, 27 Jan 2012 10:35:41 +0000 (11:35 +0100)]
mfd: ab8500-core: Allow the possibility to dump all AB8500 registers

Implement an API so that a user may dump all AB8500 registers
via debugfs file access.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agomfd: ab8500-debugfs: add debugfs node to read all registers
Mian Yousaf Kaukab [Thu, 26 Jan 2012 14:39:20 +0000 (15:39 +0100)]
mfd: ab8500-debugfs: add debugfs node to read all registers

Update the ab8500_registers_print() to reuse it from multiple places.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
11 years agomfd: ab8500-debugfs: Set the USB charging current to 300mA for ABV3
Philippe Langlais [Mon, 17 Oct 2011 07:48:55 +0000 (09:48 +0200)]
mfd: ab8500-debugfs: Set the USB charging current to 300mA for ABV3

In case of AB-V3, the eye diagram related issues are resolved.
So, set the device charging current to 300mA when connected to
standard host. Also, add the USB PHY tuning values to improve
the USB eye diagram

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>