Commit Graph

1949 Commits (936063175afd895913a5e9db77e1a0ef43ea44ea)

Author SHA1 Message Date
Fabio Baltieri 6f8cfa9984 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>
2013-02-14 00:22:53 +01:00
Aaron Sierra 01560f6bb9 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>
2013-02-14 00:22:52 +01:00
Peter Ujfalusi fbc6ae363e 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>
2013-02-14 00:22:52 +01:00
Peter Ujfalusi ac7bc5a953 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>
2013-02-14 00:22:52 +01:00
Peter Ujfalusi 80a97ccd33 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>
2013-02-14 00:22:51 +01:00
Peter Ujfalusi 6382a06141 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>
2013-02-14 00:22:51 +01:00
Peter Ujfalusi 7e2e6c5758 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>
2013-02-14 00:22:50 +01:00
Peter Ujfalusi e581238f28 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>
2013-02-14 00:22:50 +01:00
Peter Ujfalusi 6dd810b5e6 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>
2013-02-14 00:22:50 +01:00
Peter Ujfalusi 3c3302794c 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>
2013-02-14 00:22:50 +01:00
Peter Ujfalusi 050cde1363 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>
2013-02-14 00:22:49 +01:00
Peter Ujfalusi 5d4e9bd79a 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>
2013-02-14 00:22:49 +01:00
Mark Brown 3d91f8282c 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>
2013-02-14 00:22:48 +01:00
Mark Brown 648a98808c 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>
2013-02-14 00:22:48 +01:00
Mark Brown dc781d0e10 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>
2013-02-14 00:22:47 +01:00
Mark Brown 595e5bf75c 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>
2013-02-14 00:22:47 +01:00
Mark Brown 0cc9d08d3d 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>
2013-02-14 00:22:47 +01:00
Sachin Kamat f1c68e4dd4 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>
2013-02-14 00:22:46 +01:00
Mark Brown 71f39e5c08 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>
2013-02-14 00:22:46 +01:00
Mark Brown d7768111a9 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>
2013-02-14 00:22:46 +01:00
Mark Brown 025d982079 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>
2013-02-14 00:22:45 +01:00
Laxman Dewangan a36516b016 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>
2013-02-14 00:22:44 +01:00
Roger Quadros ab3f2a86d1 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>
2013-02-13 13:22:56 +02:00
Roger Quadros a8c4e9e111 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>
2013-02-13 13:22:55 +02:00
Roger Quadros c4df00aed9 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>
2013-02-13 13:22:53 +02:00
Roger Quadros c6cd087ed0 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>
2013-02-13 13:22:52 +02:00
Roger Quadros 340c64eaba 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>
2013-02-13 13:22:51 +02:00
Roger Quadros 06ba7dc75f 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>
2013-02-13 13:22:50 +02:00
Roger Quadros ccac71a7f0 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>
2013-02-13 13:22:49 +02:00
Roger Quadros d7eaf86610 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>
2013-02-13 13:22:48 +02:00
Roger Quadros 27d4f2c654 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>
2013-02-13 13:22:47 +02:00
Roger Quadros a1f0d7a1f8 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>
2013-02-13 13:22:46 +02:00
Roger Quadros 300c2f8ff4 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>
2013-02-13 13:22:44 +02:00
Roger Quadros 6675144668 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>
2013-02-13 13:22:43 +02:00
Roger Quadros 7ed8619141 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>
2013-02-13 13:22:42 +02:00
Roger Quadros 8bdbd15494 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>
2013-02-13 13:22:41 +02:00
Roger Quadros 32a51f2a53 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>
2013-02-13 13:22:40 +02:00
Roger Quadros 0bde3e9fee 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>
2013-02-13 13:22:39 +02:00
Roger Quadros 1a7a8d70cd 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>
2013-02-13 13:22:38 +02:00
Roger Quadros 7e0ff1035c 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>
2013-02-13 13:22:36 +02:00
Roger Quadros 9d9c6ae79c 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>
2013-02-13 13:22:35 +02:00
Olof Johansson cae617b64c Merge branch 'fixes-for-3.9' into next/fixes-non-critical
This is a branch of fixes that originally were scheduled for 3.8 but
due to the request from Linus to hold back on all but the most critical
of fixes, we're re-queueing them for 3.9 here.

* fixes-for-3.9:
  ARM: dts: imx6: fix fec ptp clock slow 10 time
  ARM: highbank: mask cluster id from cpu_logical_map
  ARM: scu: mask cluster id from cpu_logical_map
  ARM: scu: add empty scu_enable for !CONFIG_SMP
  ARM: at91/at91sam9x5.dtsi: fix usart3 TXD
  ARM: at91: at91sam9x5: fix usart3 pinctrl name
  ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440
  ARM: dts: fix tick and alarm irq numbers for exynos5440
  ARM: dts: fix compatible value for exynos pinctrl
  ARM: dts: Fix compatible value of pinctrl module on EXYNOS5440
  ARM: S3C24XX: fix uninitialized variable warning
  mfd/vexpress: vexpress_sysreg_setup must not be __init
  ARM: ux500: Fix u9540 booting issues
  arm: mvebu: i2c come back in defconfig
  arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  Dove: activate GPIO interrupts in DT
  ARM: ux500: add spin_unlock(&master_lock).
  ARM: ux500: Disable Power Supply and Battery Management by default

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-02-12 15:03:55 -08:00
Olof Johansson b22d18c3b4 Two fixes for broken <mach/id.h> cleanup.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRGitiAAoJEEEQszewGV1zzygP/3xX3w1fMFayBO8uPV0WWUKu
 Bbaxi0HakHJqfAzjI3kXdJExmSUmo2GDR1AQ6HdyZ+Z4ez4y5BH8ds8VJ4LB17Ju
 YFRNLGqtJAnLayd93ARVhXuSjoQDQHnGk+YKkK6tuSnHOAUoOhdtg2Xy2PAN15LI
 iWA9vwYM5TqzJIuefPys/EWzBWuQBzK2BfdBLHMXvLMwffQMAD/NmjfO91gngUq1
 vhsYr9G89nfvgYsPYNf2zaAZ6yTx6v8BWZzqtG5kdRYexUlEquH9nSMVfagCFDKw
 +OTQoQUvZI27yoxtCfTiRPN2aydPSWsSdK8+fMWsG9F/kZ5yyoHuYV3cpP9uKNx6
 paecXV6tkit/NHgULN1U3liPFLOI+D12FwsgbObuxj6w7CrxAwMrEDZnStk1IBwx
 YaOzOmev4Xnh1boc2IxO6D9zxlnUApXRZFvUUyKb7XnYTm3CZUhMq51VW8zYYees
 z0cuAJQ7aByvOS6kXNUkBa1J8YHIZAODiTilPvMSnp78B6NY7cHOYBBHB7BTgono
 lBc/l5vh8atExefeEVqUe7pFRyVeiOnzRAqDMznDJPat7ty/rPt5c/lUa2Xd0pNJ
 s66OklWhrouWVQC9zi24A9j5JN29XksL1AtU3rTAbznHE19ThMCxf08cP3jxvmXi
 okILdKzLF9NU8i6VlBMa
 =cbIq
 -----END PGP SIGNATURE-----

Merge tag 'for-arm-soc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/cleanup

From Linus Walleij:
Two fixes for broken <mach/id.h> cleanup.

* tag 'for-arm-soc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  mfd: db8500-prcmu: update resource passing
  drivers/db8500-cpufreq: delete dangling include

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-02-12 15:00:14 -08:00
Linus Walleij 05ec260ede mfd: db8500-prcmu: update resource passing
When trying to get rid of the cross-includes of <mach/id.h>
from different drivers, so we can localize ASIC/CPU detection
to the mach-ux500 folder, we run into the way the PRCMU
handles base addresses and firmware detection.

This patch updates the firmware version detection to pass
the required information as platform data instead of
relying on cpu_is_* macros.

Now the PRCMU base address, the secondary TCDM area, the
TCPM area and the IRQ are passed as resources instead of
being grabbed from <mach/*> files. Incidentally this also
removes part of the reliance on <mach/irqs.h>.

Further it updates the firmware version detection, since the
location of the firmware ID bytes in the designated memory
are is now passed from the platform data instead. There is
no reason not to include the nice split-off of a struct to
hold the firmware information and a separate function to
populate it.

The patch actually rids the need to use the external
db8500_prcmu_early_init call at all, but I'm keepin back
that removal as I don't want the patch to be too big.

Cc: arm@kernel.org
Cc: Michel Jaoen <michel.jaouen@stericsson.com>
Cc: Lee Jones <lee.jones@linaro.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Loic Pallardy <loic.pallardy@stericsson.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-12 12:44:27 +01:00
Olof Johansson 94c16ea6ea Linux 3.8-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJRCxWdAAoJEHm+PkMAQRiG3bAH/28D2NbRLIDo6QIzk3seCCh3
 A6vqDWbX671JRa0RO38DrWhqv6L/EisvjNZMVxBNaN635+3+yC7wsKziXYxA4+AL
 Ef9JISiwXykRWwrC8Q34YBWfWgeFTmaau71IRv45x2OTwiijd6cvjXhLDrOhHEGL
 rdAGJxIdBOfuASw1zpn9PxzfAtg1j/FGP03B4yy+JFhYzuDp3pvnDIysAnXefLml
 UheuBELdNf8Jx7NtW80PTa+TQtruWPC8otoiJevV4TrAWmAOctJiM1izL+VOZqqD
 I/v5aGf9mCN+cxLq06imwgEHWmP1I7yDdjjTHrr4wwIMws1vg8PNsJqG3AsPcwM=
 =dR8S
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc6' into next/cleanup

Linux 3.8-rc6
2013-02-09 16:41:37 -08:00
Lee Jones e64d905e28 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>
2013-02-08 14:25:34 +01:00
Lee Jones 7d56a46e87 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>
2013-02-08 14:25:34 +01:00
Lee Jones 40f6e5a2b5 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>
2013-02-08 14:25:33 +01:00
Linus Walleij e2ddf46ab4 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>
2013-02-08 14:25:32 +01:00
Lee Jones 9c677b9b74 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>
2013-02-08 14:25:30 +01:00
Mark Brown 197bf85630 regulator: s5m8767: Fix build in non-DT case
Fix drift in DT parsing function name in the stub code.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 18:31:25 +00:00
Amit Daniel Kachhap 26aec009f6 regulator: add device tree support for s5m8767
This device tree support is added for PMIC block of S5m8767 multi
function driver. The usage detail is added in the device tree
documentation section. This change is tested on exynos5250 based
arndale platform by regulator voltage set/get API's.

Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04 10:31:31 +00:00
Philippe Langlais 8908c04985 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>
2013-02-04 08:33:30 +00:00
Lee Jones 9d3f653f45 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>
2013-02-04 08:33:29 +00:00
Lee Jones f825ebe522 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>
2013-02-04 08:33:27 +00:00
Ashok G 70bad04f2a 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>
2013-02-04 08:33:26 +00:00
Lee Jones 5f8aaef4fd 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>
2013-02-04 08:33:13 +00:00
Bengt Jonsson 8f0eb43be5 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>
2013-02-04 08:31:50 +00:00
Michel JAOUEN 20bf428329 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>
2013-02-04 08:31:49 +00:00
Linus Walleij ddba25f17d 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>
2013-02-04 08:31:48 +00:00
Mian Yousaf Kaukab 1d843a6c8c 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>
2013-02-04 08:31:46 +00:00
Mian Yousaf Kaukab 42002c6de9 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>
2013-02-04 08:31:45 +00:00
Philippe Langlais 40c064e43e 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>
2013-02-04 08:31:43 +00:00
John Beckett 1478a316e3 mfd: ab8500-debugfs: Export all AB8500 ADCs as debugfs nodes
Allow a user to take a glimpse into the inner workings of the
AB8500 Analogue-to-Digital Converters, via debugfs.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: John Beckett <john.beckett@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
2013-02-04 08:31:41 +00:00
carriere etienne 0fbce76eff mfd: ab8500-debugfs: Formated access AB8500 registers from debugfs entry
Add debugfs entry ab8500/hwreg to read/write bit-field in AB8500 registers.
Check the debugfs entries usage from heading comments in ab8500-debugfs.c

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: carriere etienne <etienne.carriere@stericsson.com>
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
2013-02-04 08:31:40 +00:00
Lee Jones fad55a869b mfd: ab8500-debugfs: Use NULL to initialise remaining NULL pointer
Partly for coding style reasons, but mostly because sparse warns on it.

This patch is a completion of a previous patch by Mark Brown.

Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-02-04 08:31:38 +00:00
Mattias Wallin 0b337e70d3 mfd: ab8500-debugfs: Keep count of IRQs in debugfs
This patch adds a counter to the sysfs file dynamically created
by debugfs. It also fixes an array index error.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Reviewed-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com>
2013-02-04 08:31:37 +00:00
Lee Jones 4b8ac08256 mfd: ab8500-debugfs: Provide a means for a user subscribe to IRQs
Allow users to subscribe to and view IRQ events live from debugfs.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-02-04 08:31:36 +00:00
Mian Yousaf Kaukab e0f4fec030 mfd: abx500-core: Provide an API to dump all ABx500 registers
Some drivers can detect subsystem failures e.g. shared memory driver
can detect modem sub system failures. It would be helpful in analyzing
these failures if AB register dump is available at that point. This
patch adds the API for the drivers to dump AB registers in the kernel
log.

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>
2013-02-04 08:31:34 +00:00
Jonas Aaberg c73db9f7a2 mfd: ab8500-sysctrl: export read/write symbols
Export ab8500_sysctrl_read() and ab8500_sysctrl_write() symobols.

They will be used by LTP test cases.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
2013-02-04 08:31:33 +00:00
Kennet Wallden 1abf063ffd mfd: ab8500-sysctrl: Provide configuration for SysClkReqRfClkBuf registers
Add the possibility to pass configuration settings for
SysCl1kReqRfClkBuf to SysClk8ReqRfClkBuf via platform data.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kennet Wallden <kennet.wallden@stericsson.com>
Reviewed-by: Karl-Johan PERNTZ <karl-johan.perntz@stericsson.com>
Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
2013-02-04 08:31:29 +00:00
Lee Jones d0b32fa1e1 mfd: ab8500-gpadc: Change to usleep_range() for greater resolution
The resolution of msleep is related to HZ, so with HZ set to
100 any msleep of less than 10ms will become ~10ms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-02-04 08:31:28 +00:00
Jonas Aaberg 5a4bac6e63 mfd: ab8500-sysctrl.c: Provide charging as reset reason
It's possible to supply a string to provide a reason for
triggering a restart. In this case our reason is to enter
charging-only mode, as a charger was found to be present.

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>
2013-02-04 08:28:45 +00:00
Jonas Aaberg 0903940dcd mfd: ab8500-sysctrl: Only reboot into charging mode if battery type is known
When a charger is connected, we usually want AB8500 based systems to
reboot into charging-only mode. However, if the battery type cannot
be identified this would be futile, so we'll just shut the system
down instead.

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>
2013-02-04 08:28:44 +00:00
Jonas Aaberg 7c34d7c2b5 mfd: ab8500-sysctrl: If a charger is present, reboot instead
If a charger is attached on power off, reboot the system
into charging mode instead of powering it off.

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>
2013-02-04 08:28:43 +00:00
Lee Jones 379749c463 mfd: ab8500-sysctrl: Provide a platform specific pm_power_off() call-back
The kernel allows us to specify a function call-back which will be
invoked when a system power-off request has been received. Here we
provide one which is to be used when shutting down AB8500 based
platforms.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-02-04 08:28:41 +00:00
Olof Johansson 3e93093ecd Versatile Express related driver updates for 3.9:
* Move sp810 header to a more generic location,
   mainly to share it with arm64
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJRCULAAAoJEL9jRaJfXa5PyysH/AsFbihoAGU0S7o+ggyN4S8m
 5myEfbdMvgI5Hjcl/MgcVJAl6jFpDjmBH5ZPu+o8WzoP5L91C9F//kMRZqK0zATj
 Y2OdMVNfVQG94bSsmjHryWF8W0RYcY2bQr0wJmgguNDpRLFsFdF3Rb58AWzG+2tP
 KFxDg9u/CyhC/sv7BzoKI+J3ol5wEmv4BNMbPyjYG8L5TcBfe/IZqnl6KZ/QAw5i
 QUFs3oXtT4/v8bnsxAym+VXIvjSHWs2t0CivfMyH+ZIgb3NbfJ1gIOCOJIk5XWTu
 6L1yYyBBcRr60y9p4s2Nd4NxHZEB7pyZYuboUOxSmRNnEM54RT2Nkvcdon8j6Rw=
 =uB7w
 -----END PGP SIGNATURE-----

Merge tag 'vexpress/drivers-for-3.9' of git://git.linaro.org/people/pawelmoll/linux into next/drivers

From Pawel Moll:
Versatile Express related driver updates for 3.9:
* Move sp810 header to a more generic location,
  mainly to share it with arm64

* tag 'vexpress/drivers-for-3.9' of git://git.linaro.org/people/pawelmoll/linux:
  arm: Move sp810.h to include/linux/amba/
  + Linux 3.8-rc5

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-01-30 10:04:56 -08:00
Olof Johansson 0b79f2772a Removal of the <mach/id.h> include from ux500
- First an ACKed MFD patch deleting the only consumer
   of these cpu_is* functions outside of mach-ux500
 - Introduce a new local cpu_is_u8580() in this patch
   set to avoid clashing with other patch sets.
 - Finally de-globalize <mach/id.h>.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRCAvIAAoJEEEQszewGV1zANkQAJuEX2agV62ULfukOgATLm6A
 KHvt04X8r9tsZwC6PFZYWtaD60/hUIgtFLfV5gj/RCJlpOqlCqN6+S8y55mmB/Az
 Cmp2UwFQ0w9uSI+AtJWnwyd/ViGRzoARSJqX144XhITABTi4hu7ODWpNWrVbvOmX
 Swy1qYBvsrm9L2abE0/I+O8k4YVHX1s73WocGquu6VCAXUWnDxeanrP79A/jARxa
 vhKZcD/QDfvN71KKIREQTkh3MLQszrHMavVuI3d4aEqL8Pzxn28zUjjIFQDZYhfp
 8KpuZe/Vys1+YY5ssd91C8puIi2hxabvniN/IbnYVK98V7jXx01CTSb0csUokWTA
 8AIYA34HIEwLJohcOvSzbPw121M0pjqLKhyoqkMi7ExeEolAk3Z8d3FALZ96cbPF
 WdwUQYx298hZqjsHJx42RozZeGPMxEbmgwxhvjePrIweFcbojyda/AnrFU02svLZ
 AekYiEObCqsxSmZZ+y0ey3aETD0WmnRf58uPEzylV7ko4bEdxztw+joESv2ieZ2/
 fPbRj45M4EPsqsCgQnNsGiBjPIvyKM9gon9Np4PwKHMLCYeRdkX7h5BOEx896mHv
 IAmzR5h6Y/fd8yOckdK89hF0qBoLBlowbJKa39sKhBoe/pHkumcq92zrXs2pRFQy
 KFBMEIIAEICgINOL8BLF
 =zjvx
 -----END PGP SIGNATURE-----

Merge tag 'ux500-no-idh' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/cleanup

From Linus Walleij:
Removal of the <mach/id.h> include from ux500
- First an ACKed MFD patch deleting the only consumer
  of these cpu_is* functions outside of mach-ux500
- Introduce a new local cpu_is_u8580() in this patch
  set to avoid clashing with other patch sets.
- Finally de-globalize <mach/id.h>.

* tag 'ux500-no-idh' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: de-globalize <mach/id.h>
  ARM: ux500: Introduce cpu_is_u8580()
  mfd: prcmu: delete pin control helpers

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-01-29 16:06:03 -08:00
Linus Walleij 7a4f26097d ARM: ux500: de-globalize <mach/id.h>
This removes the file <mach/id.h> from the global kernel include
scope, making it a pure mach-ux500 detail. All ASIC specifics
needed by drivers shall henceforth be passed from either platform
data or the device tree.

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-01-29 18:47:37 +01:00
Arnd Bergmann e065d3d417 mfd/vexpress: vexpress_sysreg_setup must not be __init
The patch 52666298a 'mfd: vexpress-sysreg: Don't skip initialization
on probe' adds a call to vexpress_sysreg_setup from a non-__init
function, so this also has to lose its __init annotation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: arm@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2013-01-28 14:07:14 -08:00
Olof Johansson 7bcdd8d5e3 Merge branch 'depends/cleanup' into next/drivers
* depends/cleanup: (375 commits)
  ARM: at91: fix board-rm9200-dt after sys_timer conversion
  clocksource: use clockevents_config_and_register() where possible
  ARM: use clockevents_config_and_register() where possible
  clockevents: export clockevents_config_and_register for module use
  timer: vt8500: Move timer code to drivers/clocksource
  irqchip: Move ARM vic.h to include/linux/irqchip/arm-vic.h
  ARM: picoxcell: use common irqchip_init function
  ARM: spear: use common irqchip_init function
  irqchip: Move ARM VIC to drivers/irqchip
  ARM: samsung: remove unused tick.h
  ARM: remove unneeded vic.h includes
  ARM: remove mach .handle_irq for VIC users
  ARM: VIC: set handle_arch_irq in VIC initialization
  ARM: VIC: shrink down vic.h
  irqchip: Move ARM gic.h to include/linux/irqchip/arm-gic.h
  ARM: use common irqchip_init for GIC init
  irqchip: Move ARM GIC to drivers/irqchip
  ARM: remove mach .handle_irq for GIC users
  ARM: GIC: set handle_arch_irq in GIC initialization
  ARM: GIC: remove direct use of gic_raise_softirq
  ...
2013-01-28 13:36:23 -08:00
Linus Torvalds 325a86b65c This is the first pull request for MFD fixes for 3.8
We have some build failure fixes (twl4030, vexpress, abx500 and tps65910),
 some actual runtime oops and lockup fixes (rtsx, da9052), and some more
 hypothetical NULL pointers dereferences fixes for pcf50633 and max776xx.
 
 Then we also have additional rtsx fixes for a correct switch output voltage
 and clock divider correctness for rtl8411 (rtsx driver), and irqdomain fix for
 db8550-prcmu, and some more cosmetic fixes for arizona and wm5102.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRBIBuAAoJEIqAPN1PVmxKCZYP/3EP7I6nTnHfmMJHr6KhL9F8
 h/PFzSJiYC5DHoYpvcD6ESkDtqgZTOgt/R8VzbzcfCoSAlARCyo3WenCjUhREspW
 2vCb+rVqBXc3+pn/Hed5WlTx3a231iSYiQd4OMbDkG22TuTKdf4GOWcl4KnAVMjp
 NMqD3wCkDeMkutxRO7eWc+B/eXmYDp38abiYU+xJCMfmpvRwiPp7/RQTw/9kHgF/
 VHGqzH91YPJmcF9OcDDzsvJ2zGwPsXPhtsOnwxL7KkjI4WM4EZv8Nr0NwTsuIgNJ
 liqs4QO1XpTF+bAPKW/aT4VVLxYmLrzVao+bg6A9Vn5Q6Wt+N4McectvN7yndfOQ
 GuSPI+LqcZvDEHaKGybRFdsbN+sh95f7Qz6dbFedJ3nWBhlFd7YiXgkQF3Yg38sX
 rbK66F0PuH7F010a3cbhZ4jsHUb1MxzU6YSCLwUvukF1ijitPP89md0K9YaN9cbT
 YbBdZpphaiFePz9CjRyyYJvo4DC9i9BTgC8Ac3qiG1TELhb/Dl064d4o0oDDEfzH
 qVo21yUWeJ9jsHMnFvJuaDe9IbfxyDWJSLXFPlwaW/1qdbDPKzCr1Sro4v+lmOh5
 1RIiHfu52RSPDewo0ACZPPOd8h8/Jfra37CDiGPGnjbEkUJTxC7XfHie6M9034ov
 m/ORqHJOi6Wh9Iy7YHM3
 =rxug
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

Pull MFD fixes from Samuel Ortiz:
 "This is the first pull request for MFD fixes for 3.8

  We have some build failure fixes (twl4030, vexpress, abx500 and
  tps65910), some actual runtime oops and lockup fixes (rtsx, da9052),
  and some more hypothetical NULL pointers dereferences fixes for
  pcf50633 and max776xx.

  Then we also have additional rtsx fixes for a correct switch output
  voltage and clock divider correctness for rtl8411 (rtsx driver), and
  irqdomain fix for db8550-prcmu, and some more cosmetic fixes for
  arizona and wm5102."

* tag 'mfd-for-linus-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed
  mfd: wm5102: Fix definition of WM5102_MAX_REGISTER
  mfd: twl4030: Don't warn about uninitialized return code
  mfd: da9052/53 lockup fix
  mfd: rtsx: Add clock divider hook
  mmc: rtsx: Call MFD hook to switch output voltage
  mfd: rtsx: Add output voltage switch hook
  mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM
  mfd: vexpress: Export global functions to fix build error
  mfd: arizona: Check errors from regcache_sync()
  mfd: tc3589x: Use simple irqdomain
  mfd: pcf50633: Init pcf->dev before using it
  mfd: max77693: Init max77693->dev before using it
  mfd: max77686: Init max77686->dev before using it
  mfd: db8500-prcmu: Fix irqdomain usage
  mfd: tps65910: Select REGMAP_IRQ in Kconfig to fix build error
  mfd: arizona: Disable control interface reporting for WM5102 and WM5110
2013-01-28 11:51:57 -08:00
Olof Johansson 6b914c9987 Linux 3.8-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRAuO3AAoJEHm+PkMAQRiGbfAH/1C3QQKB11aBpYLAw7qijAze
 yOui26UCnwRryxsO8zBCQjGoByy5DvY/Q0zyUCWUE6nf/JFSoKGUHzfJ1ATyzGll
 3vENP6Fnmq0Hgc4t8/gXtXrZ1k/c43cYA2XEhDnEsJlFNmNj2wCQQj9njTNn2cl1
 k6XhZ9U1V2hGYpLL5bmsZiLVI6dIpkCVw8d4GZ8BKxSLUacVKMS7ml2kZqxBTMgt
 AF6T2SPagBBxxNq8q87x4b7vyHYchZmk+9tAV8UMs1ecimasLK8vrRAJvkXXaH1t
 xgtR0sfIp5raEjoFYswCK+cf5NEusLZDKOEvoABFfEgL4/RKFZ8w7MMsmG8m0rk=
 =m68Y
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc5' into next/cleanup

Linux 3.8-rc5

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-01-27 22:07:20 -08:00
Wei WANG 2d1484f599 mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed
If rtsx_pci_sdmmc is not probed, function pointer pcr->slots[].card_event
will point to NULL, and thus rtsx_pci_card_detect will reference a NULL
pointer.
Check card_event pointer before referencing it can avoid kernel panic.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 02:18:07 +01:00
Mark Brown ff0decd493 mfd: wm5102: Fix definition of WM5102_MAX_REGISTER
Updated in latest datasheet.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 02:18:07 +01:00
Arnd Bergmann f65e9eacfa mfd: twl4030: Don't warn about uninitialized return code
If the twl4030_write_script function gets called with
a zero length argument, its return value does not
get set. We know that all scripts have a nonzero
length, but returning an error in case they ever
do is probably appropriate.

Without this patch, building omap2plus_defconfig results in:

drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in this function

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: "Kristo, Tero" <t-kristo@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 02:18:01 +01:00
Ashish Jangam 0a8c290ac5 mfd: da9052/53 lockup fix
An issue has been reported where the PMIC either locks up or fails to
respond following a system Reset. This could result in a second write
in which the bus writes the current content of the write buffer to address
of the last I2C access.

The failure case is where this unwanted write transfers incorrect data to
a critical register.

This patch fixes this issue to by following any read or write with a dummy read
to a safe register address. A safe register address is one where the contents
will not affect the operation of the system.

Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 01:35:32 +01:00
Wei WANG ab4e8f8b7b mfd: rtsx: Add clock divider hook
Add callback function conv_clk_and_div_n to convert between SSC clock
and its divider N.
For rtl8411, the formula to calculate SSC clock divider N is different
with the other card reader models.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 01:30:20 +01:00
Wei WANG d817ac4e18 mfd: rtsx: Add output voltage switch hook
Different card reader has different method to switch output voltage,
add this callback to let the card reader implement its individual switch
function.
This is needed as rtl8411 has a specific switch output voltage procedure.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-27 01:29:39 +01:00
Greg Kroah-Hartman 422d26b6ec Merge 3.8-rc5 into driver-core-next
This resolves a gpio driver merge issue pointed out in linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 21:06:30 -08:00
Greg Kroah-Hartman 74790147fb Merge 3.8-rc5 into char-misc-next
This pulls in all of the 3.8-rc5 fixes into this branch so we can test easier.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:34:27 -08:00
Thierry Reding 6c2db1c682 mfd: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:21:47 -08:00
Pawel Moll 52666298ae mfd: vexpress-sysreg: Don't skip initialization on probe
The vexpress-sysreg driver does not have to be initialized
early, when the platform doesn't require this. Unfortunately
in such case it wasn't initialized correctly - master site
lookup and config bridge registration were missing. Fixed now.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2013-01-24 12:19:23 +00:00
Paer-Olof Haakansson 34c11a709e u8500-charger: Delay for USB enumeration
If charging is started before USB enumeration of an Accessory
Charger Adapter has finished, the AB8500 will generate a
VBUS_ERROR. This in turn results in timeouts and delays the
enumeration with around 15 seconds. This patch delays the
charging and then ramps currents slowly to avoid VBUS errors.
The delay allows the enumeration to have finished before
charging is turned on.

Signed-off-by: Martin Sjoblom <martin.w.sjoblom@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
2013-01-23 14:39:22 +00:00
Lee Jones 00441b5e6b mfd: Fix compile errors and warnings when !CONFIG_AB8500_BM
drivers/mfd/ab8500-core.c:1015:21: error: ‘ab8500_bm_data’ undeclared here

include/linux/mfd/abx500/ab8500-bm.h:445:13: warning: ‘ab8500_fg_reinit’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:448:13: warning: ‘ab8500_charger_usb_state_changed’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:451:29: warning: ‘ab8500_btemp_get’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:455:12: warning: ‘ab8500_btemp_get_batctrl_temp’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:463:12: warning: ‘ab8500_fg_inst_curr_blocking’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:442:12: warning: ‘ab8500_fg_inst_curr_done’ defined but not used
include/linux/mfd/abx500/ab8500-bm.h:447:26: warning: ‘ab8500_fg_get’ defined but not used

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 17:28:44 +01:00
Guenter Roeck a17155bc9c mfd: vexpress: Export global functions to fix build error
Compiling vexpress client drivers as module results in error messages such as

ERROR: "__vexpress_config_func_get" [drivers/hwmon/vexpress.ko] undefined!
ERROR: "vexpress_config_func_put" [drivers/hwmon/vexpress.ko] undefined!

This is because the global functions in drivers/mfd/vexpress-config.c are not
exported. Fix it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 17:28:34 +01:00
Mark Brown 9270bdf540 mfd: arizona: Check errors from regcache_sync()
If the control bus is unrelabile we may hit errors during regcache_sync(),
especially given that it tends to be one the most dense bursts of I/O in
many systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 03:12:44 +01:00
Linus Walleij 1f0529b4d8 mfd: tc3589x: Use simple irqdomain
This fixes a regression in the TC3589x driver introduced in
commit 15e27b1088
"mfd: Provide the tc3589x with its own IRQ domain"

If a system with a TC3589x expander is booted and a base
IRQ is passed from platform data, a legacy domain will
be used. However, since the Ux500 is now switched to use
SPARSE_IRQ, no descriptors get allocated on-the-fly,
and we get a crash.

Fix this by switching to using the simple irqdomain that
will handle this uniformly and also allocates descriptors
explicitly.

Also fix two small whitespace errors in the vicinity while
we're at it.

Cc: stable@kernel.org
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 03:08:34 +01:00
Axel Lin b30dd8f2e5 mfd: pcf50633: Init pcf->dev before using it
Current code uses pcf->dev in the dev_err call before setting it to
&client->dev. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 03:05:33 +01:00
Axel Lin 2429d86386 mfd: max77693: Init max77693->dev before using it
Current code uses max77693->dev in the dev_err call before setting it to
&i2c->dev. Fix it.

This patch also includes below cleanups:
 - Move checking pdata earlier and show dev_err if no platform data found.
 - Remove unnecessary err_regmap goto label.
 - Unregister i2c devices if regmap init for muic fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-01-22 03:02:22 +01:00