aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* mfd: tc6393xb: Fail ohci suspend if full state restore is requiredDmitry Eremin-Solenikov2015-02-201-1/+12
| | | | | | | | | | | | | | | | | commit 1a5fb99de4850cba710d91becfa2c65653048589 upstream. Some boards with TC6393XB chip require full state restore during system resume thanks to chip's VCC being cut off during suspend (Sharp SL-6000 tosa is one of them). Failing to do so would result in ohci Oops on resume due to internal memory contentes being changed. Fail ohci suspend on tc6393xb is full state restore is required. Recommended workaround is to unbind tmio-ohci driver before suspend and rebind it after resume. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy errorKrzysztof Kozlowski2014-04-301-0/+6
| | | | | | | | | | | | | | | | | | | | | commit 159ce52a6b777fc82fa0b51c7440e25f9e4c6feb upstream. During probe the driver allocates dummy I2C device for companion chip with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by regmap_init_i2c(). If i2c_new_dummy() fails for companion device, fail also the probe for main MFD driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> [bwh: Backported to 3.2: - Adjust filename, context - Add kfree() before return, as driver is not using managed allocations] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy errorKrzysztof Kozlowski2014-04-301-0/+9
| | | | | | | | | | | | | | | | | | | commit 96cf3dedc491d2f1f66cc26217f2b06b0c7b6797 upstream. During probe the driver allocates dummy I2C devices for RTC and ADC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by i2c_unregister_device(). If i2c_new_dummy() fails for RTC or ADC devices, fail also the probe for main MFD driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy errorKrzysztof Kozlowski2014-04-301-0/+4
| | | | | | | | | | | | | | | | | commit ed26f87b9f71693a1d1ee85f5e6209601505080f upstream. During probe the driver allocates dummy I2C device for RTC with i2c_new_dummy() but it does not check the return value of this call. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by i2c_unregister_device(). If i2c_new_dummy() fails for RTC device, fail also the probe for main MFD driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy errorKrzysztof Kozlowski2014-04-301-0/+18
| | | | | | | | | | | | | | | | | | | commit 97dc4ed3fa377ec91bb60ba98b70d645c2099384 upstream. During probe the driver allocates dummy I2C devices for RTC, haptic and MUIC with i2c_new_dummy() but it does not check the return value of this calls. In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later used by i2c_unregister_device(). If i2c_new_dummy() fails for RTC, haptic or MUIC devices, fail also the probe for main MFD driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: Include all drivers in subsystem menuLinus Walleij2014-04-301-3/+3
| | | | | | | | | | | | | | | | commit a6e6e660baa5c583022e3e48c85316bace027825 upstream. It is currently not possible to select the SA1100 or Vexpress drivers in the MFD subsystem, because the menu for the entire subsystem ends before these options are presented. Move the main menu closing and the endif for HAS_IOMEM to the end of the file so these are selectable again. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: adp5520: Restore mode bits on resumeLars-Peter Clausen2013-05-301-2/+6
| | | | | | | | | | | | | commit c6cc25fda58da8685ecef3f179adc7b99c8253b2 upstream. The adp5520 unfortunately also clears the BL_EN bit when the nSTNDBY bit is cleared. So we need to make sure to restore it during resume if it was set before suspend. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: Only unregister platform devices allocated by the mfd coreCharles Keepax2013-01-031-2/+13
| | | | | | | | | | | | | | | | | | | commit b9fbb62eb61452d728c39b2e5020739c575aac53 upstream. mfd_remove_devices would iterate over all devices sharing a parent with an mfd device regardless of whether they were allocated by the mfd core or not. This especially caused problems when the device structure was not contained within a platform_device, because to_platform_device is used on each device pointer. This patch defines a device_type for mfd devices and checks this is present from mfd_remove_devices_fn before processing the device. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Tested-by: Peter Tyser <ptyser@xes-inc.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* ARM: pxa: remove irq_to_gpio from ezx-pcap driverArnd Bergmann2012-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | commit 59ee93a528b94ef4e81a08db252b0326feff171f upstream. The irq_to_gpio function was removed from the pxa platform in linux-3.2, and this driver has been broken since. There is actually no in-tree user of this driver that adds this platform device, but the driver can and does get enabled on some platforms. Without this patch, building ezx_defconfig results in: drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work': drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: wm831x: Feed the device UUID into device_add_randomness()Mark Brown2012-08-101-0/+8
| | | | | | | | | | | commit 27130f0cc3ab97560384da437e4621fc4e94f21c upstream. wm831x devices contain a unique ID value. Feed this into the newly added device_add_randomness() to add some per device seed data to the pool. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* random: make 'add_interrupt_randomness()' do something saneTheodore Ts'o2012-08-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 775f4b297b780601e61787b766f306ed3e1d23eb upstream. We've been moving away from add_interrupt_randomness() for various reasons: it's too expensive to do on every interrupt, and flooding the CPU with interrupts could theoretically cause bogus floods of entropy from a somewhat externally controllable source. This solves both problems by limiting the actual randomness addition to just once a second or after 64 interrupts, whicever comes first. During that time, the interrupt cycle data is buffered up in a per-cpu pool. Also, we make sure the the nonblocking pool used by urandom is initialized before we start feeding the normal input pool. This assures that /dev/urandom is returning unpredictable data as soon as possible. (Based on an original patch by Linus, but significantly modified by tytso.) Tested-by: Eric Wustrow <ewust@umich.edu> Reported-by: Eric Wustrow <ewust@umich.edu> Reported-by: Nadia Heninger <nadiah@cs.ucsd.edu> Reported-by: Zakir Durumeric <zakir@umich.edu> Reported-by: J. Alex Halderman <jhalderm@umich.edu>. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
* mfd: Clear twl6030 IRQ status register only onceNishanth Menon2012-04-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 3f8349e6e98ba0455437724589072523865eae5e upstream. TWL6030 family of PMIC use a shadow interrupt status register while kernel processes the current interrupt event. However, any write(0 or 1) to register INT_STS_A, INT_STS_B or INT_STS_C clears all 3 interrupt status registers. Since clear of the interrupt is done on 32k clk, depending on I2C bus speed, we could in-adverently clear the status of a interrupt status pending on shadow register in the current implementation. This is due to the fact that multi-byte i2c write operation into three seperate status register could result in multiple load and clear of status and result in lost interrupts. Instead, doing a single byte write to INT_STS_A register with 0x0 will clear all three interrupt status registers without the related risk. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "mfd: Test for jack detection when deciding if wm8994 should suspend"Greg Kroah-Hartman2012-03-131-14/+0
| | | | | | | | | | This reverts commit 315e73b400c9a287a53efb5f857d308589674ac5 as it breaks the 3.2-stable build. Reported-by: Ben Guthro <ben@guthro.net> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mfd: Fix cs5535 section mismatchChristian Gmeiner2012-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 97e43c983c721a47546e6db3b7711dcd912a6481 upstream. Silence following warnings: WARNING: drivers/mfd/cs5535-mfd.o(.data+0x20): Section mismatch in reference from the variable cs5535_mfd_drv to the function .devinit.text:cs5535_mfd_probe() The variable cs5535_mfd_drv references the function __devinit cs5535_mfd_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/mfd/cs5535-mfd.o(.data+0x28): Section mismatch in reference from the variable cs5535_mfd_drv to the function .devexit.text:cs5535_mfd_remove() The variable cs5535_mfd_drv references the function __devexit cs5535_mfd_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Rename the variable from *_drv to *_driver so modpost ignore the OK references to __devinit/__devexit functions. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Acked-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mfd: Test for jack detection when deciding if wm8994 should suspendMark Brown2012-03-121-0/+14
| | | | | | | | | | | | commit e7c248a049c2aac21bded0b0722caee6f0e57256 upstream. The jack detection on WM1811 is often required during system suspend, add it as another check when deciding if we should suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mfd: Fix ACPI conflict checkJean Delvare2012-03-121-1/+1
| | | | | | | | | | | | | | | | commit 81b5482c32769abb6dfb979560dab2f952ba86fa upstream. The code is currently always checking the first resource of every device only (several times.) This has been broken since the ACPI check was added in February 2010 in commit 91fedede0338eb6203cdd618d8ece873fdb7c22c. Fix the check to run on each resource individually, once. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mfd: Include linux/io.h to jz4740-adcAxel Lin2011-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/io.h to fix below build error: CC drivers/mfd/jz4740-adc.o drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_irq_demux': drivers/mfd/jz4740-adc.c:73: error: implicit declaration of function 'readb' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_enabled': drivers/mfd/jz4740-adc.c:110: error: implicit declaration of function 'writeb' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_set_config': drivers/mfd/jz4740-adc.c:146: error: implicit declaration of function 'readl' drivers/mfd/jz4740-adc.c:151: error: implicit declaration of function 'writel' drivers/mfd/jz4740-adc.c: In function 'jz4740_adc_probe': drivers/mfd/jz4740-adc.c:249: error: implicit declaration of function 'ioremap_nocache' drivers/mfd/jz4740-adc.c:249: warning: assignment makes pointer from integer without a cast drivers/mfd/jz4740-adc.c:289: warning: passing argument 3 of 'mfd_add_devices' discards qualifiers from pointer target type include/linux/mfd/core.h:93: note: expected 'struct mfd_cell *' but argument is of type 'const struct mfd_cell *' drivers/mfd/jz4740-adc.c:299: error: implicit declaration of function 'iounmap' make[2]: *** [drivers/mfd/jz4740-adc.o] Error 1 make[1]: *** [drivers/mfd] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Use request_threaded_irq for twl4030-irq instead of irq_set_chained_handlerNeilBrown2011-12-201-5/+8
| | | | | | | | | | | | | | | | irq_set_chained_handler sets 'desc->handle_irq'. However this irq is called by handle_nested_irq from handle_twl4030_pih, and that uses action->thread_fn. So the handled set with irq_set_chained_handler is never called. So change to use request_threaded_irq instead - that sets the correct field. Tested on GTA04 Phoenux. Signed-off-by: NeilBrown <neilb@suse.de> Tested-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Base interrupt for twl4030-irq must be one-shotNeilBrown2011-12-201-2/+3
| | | | | | | | | | | | As the interrupt source is only cleared by the threaded interrupt service routine, we need to make the base interrupt IRQF_ONESHOT. Without this, the first interrupt from the TWL4030 cause the CPU to enter an infinite loop trying to handle to interrupt but never clearing it. Signed-off-by: NeilBrown <neilb@suse.de> Tested-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Handle tps65910 clear-mask correctlyMarcus Folkesson2011-12-201-1/+1
| | | | | | | The function is not actually cleaing the bitmask. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: add #ifdef CONFIG_DEBUG_FS guard for ab8500_debug_resourcesAxel Lin2011-12-201-0/+2
| | | | | | | | | | Fix below build warning if CONFIG_DEBUG_FS is disabled. CC drivers/mfd/ab8500-core.o drivers/mfd/ab8500-core.c:623: warning: 'ab8500_debug_resources' defined but not used Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix twl-core oops while calling twl_i2c_* for unbound driverIlya Yanok2011-12-201-8/+8
| | | | | | | | | Check inuse variable before trying to access twl_map to prevent dereferencing of uninitialized variable. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Cc: stable@kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: include linux/module.h for ab5500-debugfsAxel Lin2011-12-201-1/+1
| | | | | | | | | | | | Include linux/module.h to fix below build error: CC drivers/mfd/ab5500-debugfs.o drivers/mfd/ab5500-debugfs.c:571: error: 'THIS_MODULE' undeclared here (not in a function) make[2]: *** [drivers/mfd/ab5500-debugfs.o] Error 1 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Update wm8994 active device checks for WM1811Mark Brown2011-12-201-0/+1
| | | | | | | | This didn't go in as part of the original MFD patch for WM1811 due to cross tree issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Set tps6586x bits if new value is different from the old oneAxel Lin2011-12-201-1/+1
| | | | | | | | | | It does not make sense to write new value only when all the bit_mask bits are zero. We need to write new value if the bit mask fields of new value is not equal to old value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Set da903x bits if new value is different from the old oneAxel Lin2011-12-201-1/+1
| | | | | | | | | | It does not make sense to write new value only when all the bit_mask bits are zero. We need to write new value if the bit mask fields of new value is not equal to old value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Set adp5520 bits if new value is different from the old oneAxel Lin2011-12-201-1/+1
| | | | | | | | | | Current code checks if all the bit_mask bits are all zero is wrong. We need to write new value if the bit mask fields of new value is not equal to old value. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add missed free_irq in da903x_removeAxel Lin2011-12-201-0/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: fix build failures in recently added ab5500 codePaul Gortmaker2011-11-072-0/+2
| | | | | | | | | These files had implicit dependencies on modular support which now show up as build failures with the module cleanup work merged to mainline. Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds2011-11-0614-0/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
| * mfd: Add export.h for EXPORT_SYMBOL/THIS_MODULE as requiredPaul Gortmaker2011-10-314-0/+4
| | | | | | | | | | | | | | These macros are in <linux/export.h> and will no longer be implicitly everywhere anymore. Fix it up in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * mfd: Add module.h to the implicit drivers/mfd usersPaul Gortmaker2011-10-3111-0/+11
| | | | | | | | | | | | | | | | | | With the pending module.h cleanup, these files will fail to compile, unless they explicitly call out the include of this file. [omap-usb-host addition courtesy of Anand Gadiyar <gadiyar@ti.com>] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | Merge branch 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6Linus Torvalds2011-11-0332-2111/+4039
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6: (80 commits) mfd: Fix missing abx500 header file updates mfd: Add missing <linux/io.h> include to intel_msic x86, mrst: add platform support for MSIC MFD driver mfd: Expose TurnOnStatus in ab8500 sysfs mfd: Remove support for early drop ab8500 chip mfd: Add support for ab8500 v3.3 mfd: Add ab8500 interrupt disable hook mfd: Convert db8500-prcmu panic() into pr_crit() mfd: Refactor db8500-prcmu request_clock() function mfd: Rename db8500-prcmu init function mfd: Fix db5500-prcmu defines mfd: db8500-prcmu voltage domain consumers additions mfd: db8500-prcmu reset code retrieval mfd: db8500-prcmu tweak for modem wakeup mfd: Add db8500-pcmu watchdog accessor functions for watchdog mfd: hwacc power state db8500-prcmu accessor mfd: Add db8500-prcmu accessors for PLL and SGA clock mfd: Move to the new db500 PRCMU API mfd: Create a common interface for dbx500 PRCMU drivers mfd: Initialize DB8500 PRCMU regs ... Fix up trivial conflicts in arch/arm/mach-imx/mach-mx31moboard.c arch/arm/mach-omap2/board-omap3beagle.c arch/arm/mach-u300/include/mach/irqs.h drivers/mfd/wm831x-spi.c
| * mfd: Add missing <linux/io.h> include to intel_msicMika Westerberg2011-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Without this header we might get following compilation errors: drivers/mfd/intel_msic.c:303:2: error: implicit declaration of function 'readb' drivers/mfd/intel_msic.c:433:2: error: implicit declaration of function 'ioremap_nocache' drivers/mfd/intel_msic.c:433:17: warning: assignment makes pointer from integer without a cast drivers/mfd/intel_msic.c:455:2: error: implicit declaration of function 'iounmap' Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Expose TurnOnStatus in ab8500 sysfsAndrew Lynn2011-10-241-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Expose TurnOnStatus (Power key, RTC alarm, Vbus detect, etc) in sysfs. This magic value can be read by system users to determine what caused the platform to turn on last (this) time. Signed-off-by: Andrew Lynn <andrew.lynn@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Reviewed-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Remove support for early drop ab8500 chipMattias Wallin2011-10-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | This patch removes the early drop version of ab8500 which have the really bad version nr 0x0. This chip should not be found in the wild and only exist as ST-Ericsson scrap equipment. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Reviewed-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Add support for ab8500 v3.3Mattias Wallin2011-10-241-0/+1
| | | | | | | | | | | | | | | | | | This patch adds support for ab8500 cut 3, MetalFix 3 or v3.3. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Reviewed-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Add ab8500 interrupt disable hookVirupax Sadashivpetimath2011-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add the missing interrupt disable hook in the irq_chip callbacks for ab8500. Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Convert db8500-prcmu panic() into pr_crit()Linus Walleij2011-10-241-3/+3
| | | | | | | | | | | | | | | | | | panic() is too heavy for this, indeed the PRCMU is critical for the system but not to the point that we should stop everything, if we can still get a prompt or so. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Refactor db8500-prcmu request_clock() functionLinus Walleij2011-10-241-8/+11
| | | | | | | | | | | | | | | | This refactors the mfd/dbx500-prcmu drivers to use a switch() statement rather than nested if/else-construction. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Rename db8500-prcmu init functionLinus Walleij2011-10-241-2/+2
| | | | | | | | | | | | | | | | This renames the PRCMU clock force initialization function to have a less generic name. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Fix db5500-prcmu definesLinus Walleij2011-10-241-2/+5
| | | | | | | | | | | | | | | | This fixes two erroneous defines for the PLLs and adds new defines for the reset pin controls. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: db8500-prcmu voltage domain consumers additionsBengt Jonsson2011-10-241-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | This rectifies the device name of the MCDE voltage domain regulator consumer and adds a number of other consumers to the voltage domains. Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: db8500-prcmu reset code retrievalSebastian Rasmussen2011-10-241-0/+11
| | | | | | | | | | | | | | | | | | This implements the reset code retrieval function so we can ipso facto get to know how the system was reset. Signed-off-by: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: db8500-prcmu tweak for modem wakeupMattias Nilsson2011-10-241-4/+28
| | | | | | | | | | | | | | | | | | | | | | This is a tweak for the case where the modem goes to sleep while emitting the AC_WAKE_ACK anyway. Also print the modem errors as critical, since they jeopardize the entire platform when they occur. Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Add db8500-pcmu watchdog accessor functions for watchdogJonas Aberg2011-10-241-0/+72
| | | | | | | | | | | | | | | | | | This implements the watchdog accessor functions for the DB8500 PRCMU, making it possible to implement the watchdog driver. Signed-off-by: Jonas Aberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: hwacc power state db8500-prcmu accessorBengt Jonsson2011-10-241-0/+126
| | | | | | | | | | | | | | | | | | This implements the accessor function for hardware accelerator power state settings. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Add db8500-prcmu accessors for PLL and SGA clockMattias Nilsson2011-10-241-1/+82
| | | | | | | | | | | | | | | | | | This extends the DB8500 PRCMU driver with accessor calls for the PRCMU PLL and SGA clocks. Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Move to the new db500 PRCMU APIMattias Nilsson2011-10-244-149/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have a shared API between the DB8500 and DB5500 PRCMU's, switch to using this neutral API instead. We delete the parts of db8500-prcmu.h that is now PRCMU-neutral, and calls will be diverted to respective driver. Common registers are in dbx500-prcmu-regs.h and common accessors and defines in <linux/mfd/dbx500-prcmu.h> This way we get a a lot more abstraction and code reuse. Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Initialize DB8500 PRCMU regsMattias Nilsson2011-10-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Some clocks may be force enabled when we probe the driver, but they need to be turned off by default so we have a known state. We call this the register initialization function if we need more stuff in there in the future. Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>