aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'korg/linux-3.0.y' into cm-13.0rogersb112015-11-101-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: crypto/algapi.c drivers/gpu/drm/i915/i915_debugfs.c drivers/gpu/drm/i915/intel_display.c drivers/video/fbmem.c include/linux/nls.h kernel/cgroup.c kernel/signal.c kernel/timeconst.pl net/ipv4/ping.c Change-Id: I1f532925d1743df74d66bcdd6fc92f05c72ee0dd
| * mfd: adp5520: Restore mode bits on resumeLars-Peter Clausen2013-05-071-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge remote-tracking branch 'kernelorg/linux-3.0.y' into 3_0_64Andrew Dodd2013-02-275-10/+22
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/Kconfig arch/arm/include/asm/hwcap.h arch/arm/kernel/smp.c arch/arm/plat-samsung/adc.c drivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_drv.h drivers/mmc/core/sd.c drivers/net/tun.c drivers/net/usb/usbnet.c drivers/regulator/max8997.c drivers/usb/core/hub.c drivers/usb/host/xhci.h drivers/usb/serial/qcserial.c fs/jbd2/transaction.c include/linux/migrate.h kernel/sys.c kernel/time/timekeeping.c lib/genalloc.c mm/memory-failure.c mm/memory_hotplug.c mm/mempolicy.c mm/page_alloc.c mm/vmalloc.c mm/vmscan.c mm/vmstat.c scripts/Kbuild.include Change-Id: I91e2d85c07320c7ccfc04cf98a448e89bed6ade6
| * mfd: Only unregister platform devices allocated by the mfd coreCharles Keepax2013-01-171-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * ARM: pxa: remove irq_to_gpio from ezx-pcap driverArnd Bergmann2012-08-151-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * random: remove rand_initialize_irq()Theodore Ts'o2012-08-152-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c5857ccf293968348e5eb4ebedc68074de3dcda6 upstream. With the new interrupt sampling system, we are no longer using the timer_rand_state structure in the irq descriptor, so we can stop initializing it now. [ Merged in fixes from Sedat to find some last missing references to rand_initialize_irq() ] Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mfd: wm831x: Feed the device UUID into device_add_randomness()Mark Brown2012-08-151-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * random: make 'add_interrupt_randomness()' do something saneTheodore Ts'o2012-08-151-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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | merge opensource jb u5codeworkx2012-09-222-7/+9
| | | | | | | | Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
* | Merge linux-3.0.31 from korg into jellybeancodeworkx2012-09-185-19/+53
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mm/proc-v7.S drivers/base/core.c drivers/gpu/drm/i915/i915_gem_execbuffer.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_lvds.c drivers/gpu/drm/radeon/evergreen.c drivers/gpu/drm/radeon/r100.c drivers/gpu/drm/radeon/radeon_connectors.c drivers/gpu/drm/radeon/rs600.c drivers/usb/core/hub.c drivers/usb/host/xhci-pci.c drivers/usb/host/xhci.c drivers/usb/serial/qcserial.c fs/proc/base.c Change-Id: Ia98b35db3f8c0bfd95817867d3acb85be8e5e772
| * 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>
| * 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: 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: Turn on the twl4030-madc MADC clockKyle Manna2012-01-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3d6271f92e98094584fd1e609a9969cd33e61122 upstream. Without turning the MADC clock on, no MADC conversions occur. $ cat /sys/class/hwmon/hwmon0/device/in8_input [ 53.428436] twl4030_madc twl4030_madc: conversion timeout! cat: read error: Resource temporarily unavailable Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * mfd: Check for twl4030-madc NULL pointerKyle Manna2012-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | commit d0e84caeb4cd535923884735906e5730329505b4 upstream. If the twl4030-madc device wasn't registered, and another device, such as twl4030-madc-hwmon, calls twl4030_madc_conversion() a NULL pointer is dereferenced. Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * mfd: Copy the device pointer to the twl4030-madc structureKyle Manna2012-01-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 66cc5b8e50af87b0bbd0f179d76d2826f4549c13 upstream. Worst case this fixes the following error: [ 72.086212] (NULL device *): conversion timeout! Best case it prevents a crash Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
| * mfd: Fix mismatch in twl4030 mutex lock-unlockSanjeev Premi2012-01-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e178ccb33569da17dc897a08a3865441b813bdfb upstream. A mutex is locked on entry into twl4030_madc_conversion(). Immediate return on some error conditions leaves the mutex locked. This patch ensures that mutex is always unlocked before leaving the function. Signed-off-by: Sanjeev Premi <premi@ti.com> Cc: Keerthy <j-keerthy@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * mfd: Fix twl-core oops while calling twl_i2c_* for unbound driverIlya Yanok2012-01-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | commit 8653be1afd60d6e8c36139b487e375b70357d9ef upstream. Check inuse variable before trying to access twl_map to prevent dereferencing of uninitialized variable. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | samsung update 1codeworkx2012-06-0213-500/+3047
|/
* revert "mfd: Fix twl4030 dependencies for audio codec"Greg Kroah-Hartman2011-12-091-1/+1
| | | | | | | | | | | | | | This reverts commit 11b8fc6ae54bf18a48c94e181c37ca135b858b42, which was commit f09ee0451a44a4e913a7c3cec3805508f7de6c54 upstream. Koen Kooi <koen@dominion.thruhere.net> reports that this shouldn't have been applied to the 3.0 kernel as it isn't relevant there, only 3.1. Reported-by: Koen Kooi <koen@dominion.thruhere.net> Cc: Thomas Weber <weber@corscience.de> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* mfd: Fix twl4030 dependencies for audio codecThomas Weber2011-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | commit f09ee0451a44a4e913a7c3cec3805508f7de6c54 upstream. The codec for Devkit8000 (TWL4030) was not detected except when build with CONFIG_SND_SOC_ALL_CODECS. twl-core.c still uses the CONFIG_TWL4030_CODEC for twl_has_codec(). In commit 57fe7251f5bfc4332f24479376de48a1e8ca6211 the CONFIG_TWL4030_CODEC was renamed into CONFIG_MFD_TWL4030_AUDIO, thatswhy the codec was not detected. This patch renames the CONFIG_ TWL4030_CODEC into CONFIG_MFD_TWL4030_AUDIO in twl-core.c. Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* mfd: Make omap-usb-host TLL mode work againAnand Gadiyar2011-10-031-1/+0
| | | | | | | | | | | | | | | commit e600cffe618ff0da29ae1f8b8d3824ce0e2409fc upstream. This code section seems to have been accidentally copy pasted. It causes incorrect bits to be set up in the TLL_CHANNEL_CONF register and prevents the TLL mode from working correctly. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* mfd: Fix initialisation of tps65910 interruptsJohan Hovold2011-10-031-0/+2
| | | | | | | | | | | | | | commit fa948761e685fb03823b3029e5b6bdb52229d6ce upstream. Fix regression introduced by commit a2974732ca7614aaf0baf9d6dd3ad893d50ce1c5 (TPS65911: Add new irq definitions) which caused irq_num to be incorrectly set for tps65910. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* w1: ds1wm: add a reset recovery parameterJean-François Dagenais2011-07-082-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression in 3.0 reported by Paul Parsons regarding the removal of the msleep(1) in the ds1wm_reset() function: : The linux-3.0-rc4 DS1WM 1-wire driver is logging "bus error, retrying" : error messages on an HP iPAQ hx4700 PDA (XScale-PXA270): : : <snip> : Driver for 1-wire Dallas network protocol. : DS1WM w1 busmaster driver - (c) 2004 Szabolcs Gyurko : 1-Wire driver for the DS2760 battery monitor chip - (c) 2004-2005, Szabolcs Gyurko : ds1wm ds1wm: pass: 1 bus error, retrying : ds1wm ds1wm: pass: 2 bus error, retrying : ds1wm ds1wm: pass: 3 bus error, retrying : ds1wm ds1wm: pass: 4 bus error, retrying : ds1wm ds1wm: pass: 5 bus error, retrying : ... : : The visible result is that the battery charging LED is erratic; sometimes : it works, mostly it doesn't. : : The linux-2.6.39 DS1WM 1-wire driver worked OK. I haven't tried 3.0-rc1, : 3.0-rc2, or 3.0-rc3. This sleep should not be required on normal circuitry provided the pull-ups on the bus are correctly adapted to the slaves. Unfortunately, this is not always the case. The sleep is restored but as a parameter to the probe function in the pdata. [akpm@linux-foundation.org: coding-style fixes] Reported-by: Paul Parsons <lost.distance@yahoo.com> Tested-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Jean-François Dagenais <dagenaisj@sonatest.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mfd: Add Makefile and Kconfig Entries for tps65911 comparatorAxel Lin2011-07-052-0/+4
| | | | | | | | Base on Mark's comment [1], I make the Kconfig entry invisible to users. [1] https://lkml.org/lkml/2011/5/14/136 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix build error for tps65911-comparator.cAxel Lin2011-07-051-1/+1
| | | | | | | | | | | | | | Fix below build error: CC drivers/mfd/tps65911-comparator.o drivers/mfd/tps65911-comparator.c: In function 'tps65911_comparator_probe': drivers/mfd/tps65911-comparator.c:131: error: 'struct tps65910_platform_data' has no member named 'vmbch_threshold' drivers/mfd/tps65911-comparator.c:137: error: 'struct tps65910_platform_data' has no member named 'vmbch2_threshold' make[2]: *** [drivers/mfd/tps65911-comparator.o] Error 1 make[1]: *** [drivers/mfd] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Revert "mfd: Add omap-usbhs runtime PM support"Keshava Munegowda2011-07-051-9/+122
| | | | | | | | | | | | | | | This reverts commit 7e6502d577106fb5b202bbaac64c5f1b065e6daa. Oops are produced during initialization of ehci and ohci drivers. This is because the run time pm apis are used by the driver but the corresponding hwmod structures and initialization is not merged. hence revering back the commit id 7e6502d577106fb5b202bbaac64c5f1b065e6daa Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reported-by: Luciano Coelho <coelho@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix build breakage caused by tps65910 gpio directory moveLiam Girdwood2011-05-281-1/+1
| | | | | | Signed-off-by: Liam Girdwood <lrg@ti.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Use mfd cell platform_data for db8500-prcmu cells platform bitsMattias Wallin2011-05-281-1/+2
| | | | | | | | | | | With the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* TPS65911: Comparator: Add comparator driverJorge Eduardo Candelaria2011-05-271-0/+188
| | | | | | | | | | | This driver adds functionality to the tps65911 chip driver. Two of the comparators are configurable by software and measures VCCS voltage to detect high or low voltage scenarios. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* GPIO: TPS65910: Move driver to drivers/gpio/Jorge Eduardo Candelaria2011-05-273-93/+3
| | | | | | | | | The GPIO driver should reside in drivers/gpio/ for better organization. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* TPS65911: Add new irq definitionsJorge Eduardo Candelaria2011-05-271-13/+44
| | | | | | | | | | | | | | | | | | TPS65911 adds new interrupt sources, as well as two new registers to handle them, one for interrupt status and one for interrupt masking. The added irqs are: -VMBCH2 - Low and High threshold -GPIO1-8 - Rising and falling edge detection -WTCHDG - Watchdog interrupt -PWRDN - PWRDN reset interrupt The code should handle these new registers only when the chip version is TPS65911. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* MFD: TPS65910: Add support for TPS65911 deviceJorge Eduardo Candelaria2011-05-271-1/+3
| | | | | | | | | | | | | | | | | | | The TPS65911 is the next generation of the TPS65910 family of PMIC chips. It adds a few features: - Watchdog Timer - PWM & LED generators - Comparators for system control status It also adds a set of Interrupts and GPIOs, among other things. The driver exports a function to identify between different versions of the tps65910 family, allowing other modules to identify the capabilities of the current chip. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* mfd: Fix off-by-one value range checking for tps65910_i2c_writeAxel Lin2011-05-271-1/+1
| | | | | | | | | If bytes == (TPS65910_MAX_REGISTER + 1), we have a buffer overflow when doing memcpy(&msg[1], src, bytes). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* linux-next: build failure after merge of the voltage treeJorge Eduardo Candelaria2011-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On May 10, 2011, at 9:27 PM, Stephen Rothwell wrote: > Hi Jorge, > > On Tue, 10 May 2011 12:30:36 -0500 Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> wrote: >> >> On May 10, 2011, at 3:38 AM, Liam Girdwood wrote: >> >>> On Tue, 2011-05-10 at 12:44 +1000, Stephen Rothwell wrote: >>>> Hi Liam, >>>> >>>> After merging the voltage tree, today's linux-next build (x86_64 >>>> allmodconfig) failed like this: >>>> >>>> ERROR: "tps65910_gpio_init" [drivers/mfd/tps65910.ko] undefined! >>>> ERROR: "tps65910_irq_init" [drivers/mfd/tps65910.ko] undefined! >>>> ERROR: "irq_modify_status" [drivers/mfd/tps65910-irq.ko] undefined! >>>> ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/tps65910-irq.ko] undefined! >>>> ERROR: "handle_edge_irq" [drivers/mfd/tps65910-irq.ko] undefined! >>>> >>>> I have used the voltage tree from next-20110509 for today. >>> >>> Jorge, could you send a fix for this today. >> >> The following patch should solve this: >> >> From: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> >> MFD: Fix TPS65910 build >> >> Support for tps65910 as a module is not available. The driver can >> only be compiled as built-in. OTOH, the regulator driver can still >> be built as module without breaking the compilation. >> >> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> > > Today (even with the above patch included) I got these errors from the > x86_64 allmodconfig build: > > tps65910.c:(.text+0xf4140): undefined reference to `i2c_master_send' > drivers/built-in.o: In function `tps65910_i2c_read': > tps65910.c:(.text+0xf41d2): undefined reference to `i2c_transfer' > drivers/built-in.o: In function `tps65910_i2c_init': > tps65910.c:(.init.text+0xcb83): undefined reference to `i2c_register_driver' > drivers/built-in.o: In function `tps65910_i2c_exit': > tps65910.c:(.exit.text+0x6e0): undefined reference to `i2c_del_driver' > > I have used the voltage tree from next-20110509 again today. Following patch should fix the dependency problems. Please review: From: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> [PATCH] MFD: TPS65910: Fix I2C dependency TPS65910 driver can only be compiled built-in, so the I2C driver should be as well. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* linux-next: build failure after merge of the voltage treeJorge Eduardo Candelaria2011-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On May 10, 2011, at 3:38 AM, Liam Girdwood wrote: > On Tue, 2011-05-10 at 12:44 +1000, Stephen Rothwell wrote: >> Hi Liam, >> >> After merging the voltage tree, today's linux-next build (x86_64 >> allmodconfig) failed like this: >> >> ERROR: "tps65910_gpio_init" [drivers/mfd/tps65910.ko] undefined! >> ERROR: "tps65910_irq_init" [drivers/mfd/tps65910.ko] undefined! >> ERROR: "irq_modify_status" [drivers/mfd/tps65910-irq.ko] undefined! >> ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/tps65910-irq.ko] undefined! >> ERROR: "handle_edge_irq" [drivers/mfd/tps65910-irq.ko] undefined! >> >> I have used the voltage tree from next-20110509 for today. > > Jorge, could you send a fix for this today. > > Thanks > > Liam > The following patch should solve this: From: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> MFD: Fix TPS65910 build Support for tps65910 as a module is not available. The driver can only be compiled as built-in. OTOH, the regulator driver can still be built as module without breaking the compilation. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* TPS65910: IRQ: Add interrupt controllerGraeme Gregory2011-05-273-1/+200
| | | | | | | | | | | | | | | | | | This module controls the interrupt handling for the tps chip. The interrupt sources are the following: - GPIO falling/rising edge detection - Battery voltage below/above threshold - PWRON signal - PWRHOLD signal - Temperature detection - RTC alarm and periodic event Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* TPS65910: GPIO: Add GPIO driverGraeme Gregory2011-05-273-1/+99
| | | | | | | | | | | TPS65910 has one configurable GPIO that can be used for several purposes. Subsequent versions of the TPS chip support more than one GPIO. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* MFD: TPS65910: Add new mfd device for TPS65910Graeme Gregory2011-05-273-0/+217
| | | | | | | | | | | | | | | | | | The TPS65910 chip is a power management IC for multimedia and handheld devices. It contains the following components: - Regulators - GPIO controller - RTC The tps65910 core driver is registered as a platform driver and provides communication through I2C with the host device for the different components. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* mfd: Add omap-usbhs runtime PM supportKeshava Munegowda2011-05-261-122/+9
| | | | | | | | | | | The usbhs core driver does not enable/disable the interface and functional clocks; These clocks are handled by hwmod and runtime pm, hence insted of the clock enable/disable, the runtime pm APIS are used. however,the port clocks and tll clocks are handled by the usbhs core. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix ASIC3 SD Host Controller Configuration sizePaul Parsons2011-05-261-1/+2
| | | | | | | The size of the TC6380AF SD Host Controller Configuration area is 0x200 bytes (assuming registers are aligned on 32-bit boundaries), not 0x400 bytes. Source: Toshiba TC6380AF Specification sections 4.2 and 4.3.1 Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix omap_usbhs_alloc_children error handlingAxel Lin2011-05-261-1/+3
| | | | | | | | | | | | | 1. Return proper error if omap_usbhs_alloc_child fails 2. In the case of goto err_ehci, we should call platform_device_unregister(ehci) instead of platform_device_put(ehci) because we have already added the platform device to device hierarchy. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix omap usbhs crash when rmmoding ehci or ohciKeshava Munegowda2011-05-261-8/+19
| | | | | | | | | | | | The disabling of clocks and freeing GPIO are changed to fix the occurrence of the crash of rmmod of ehci and ohci drivers. The GPIOs should be freed after the spin locks are unlocked. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: stable@kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add ASIC3 LED supportPaul Parsons2011-05-261-6/+68
| | | | | | | Add LED support for the HTC ASIC3. Underlying support is provided by the mfd/asic3 and leds/leds-asic3 drivers. An example configuration is provided by the pxa/hx4700 platform. Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Update twl4030-code maintainer e-mail addressPeter Ujfalusi2011-05-261-2/+2
| | | | | Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Correct the name and bitmask for ab8500-gpadc BTempPullUpJohan Palsson2011-05-261-3/+3
| | | | | | | | | | | The bitmask for enabling the BatTemp pull-up was wrong and is corrected. The name is also changed to be inline with the AB8500 register description Signed-off-by: Johan Palsson <johan.palsson@stericsson.com> Reviewed-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add manual ab8500-gpadc batt temp activation for AB8500 3.0Karl Komierowski2011-05-261-1/+33
| | | | | | | | | | | | In AB8500 3.0 the pull-up supplying the NTC must be manually activated. Add enumerators to chip version detection logic. Signed-off-by: Kalle Komierowski <karl.komierowski@stericsson.com> Reviewed-by: Johan Palsson <johan.palsson@stericsson.com> Reviewed-by: Daniel Willerud <daniel.willerud@stericsson.com> Reviewed-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: Provide ab8500-core enumerators for chip cutsLinus Walleij2011-05-261-16/+16
| | | | | | | | Since functionality in MFD cells may need to be adjusted according to chip revision, let's enumerate them and keep track of them. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Check twl4030-power remove script error condition after i2cwriteLesly A M2011-05-261-1/+1
| | | | | | | | Fixing the error condition check in twl4030 remove script function. Due to some typo in commit ID: 11a441ce82d6ffecfd39b324024de0cd630b36c1 Signed-off-by: Lesly A M <leslyam@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Fix twl6030 irq definitionsGraeme Gregory2011-05-261-2/+2
| | | | | | | | | | The charger fault IRQs from the twl will in future patches be handled by a seperate IRQ handler in the charger driver than the general charger IRQ. Give them different IRQ numbers now to allow the charger driver to be merged in the future. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>