aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2009-05-19mfd: pcf50633: fix unsafe disable_irq()Nelson Castillo
Without this change Openmoko Freerunner (GTA02) bootstrap will deadlock. As pointed out in other patches this issue is in the wild since the merge of: : commit 3aa551c9b4c40018f0e261a178e3d25478dc04a9 : Author: Thomas Gleixner <tglx@linutronix.de> : Date: Mon Mar 23 18:28:15 2009 +0100 : : genirq: add threaded interrupt handler support : : Add support for threaded interrupt handlers Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: <balajirrao@openmoko.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-05-19mfd: Keep a cache of WM8350 volatile valuesMark Brown
Due to the way that the WM8350 audio driver handles CODEC_ENA many of the WM8350 audio registers are marked as volatile when they aren't actually so. Allow the audio driver to see a cache of these values for inspection during interrupt context. To do this we need to stop satisfying any bits from volatile registers from cache - there's no real benefit from doing so anyway, we did the read already. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-04-05mfd: fix da903x warningSamuel Ortiz
The da903x interrupt handler is retruning an int instead of an irqreturn_t. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-04-05mfd: Use the value of the final spin when reading the AUXADCMark Brown
Reverse the order of the tests for loop exit so we use a valid value before we time out. Vanishingly unlikely to happen since we retry for several times the expected conversion time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Storage class should be before const qualifierTobias Klauser
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: PASIC3: supply clock_rate to DS1WM via driver_dataPhilipp Zabel
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: convert PASIC3 to use MFD corePhilipp Zabel
This patch makes htc-pasic3 register the DS1WM and LED cell drivers through the MFD core infrastructure instead of allocating the platform devices manually. It also calculates the bus_shift parameter from the memory resource size. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Support active high IRQs on WM835xMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: Use bulk read to fill WM8350 register cacheMark Brown
Some I2C controllers have high overheads for setting up I2C operations which makes the register cache setup on startup excessively slow since it does a lot of small transactions. Reduce this overhead by doing a bulk read of the entire register bank and filtering out what we don't need later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: remove duplicated #include from pcf50633Huang Weiyi
Removed duplicated #include <linux/device.h> in drivers/mfd/pcf50633-core.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-03Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) trivial: Update my email address trivial: NULL noise: drivers/mtd/tests/mtd_*test.c trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h trivial: Fix misspelling of "Celsius". trivial: remove unused variable 'path' in alloc_file() trivial: fix a pdlfush -> pdflush typo in comment trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL trivial: wusb: Storage class should be before const qualifier trivial: drivers/char/bsr.c: Storage class should be before const qualifier trivial: h8300: Storage class should be before const qualifier trivial: fix where cgroup documentation is not correctly referred to trivial: Give the right path in Documentation example trivial: MTD: remove EOL from MODULE_DESCRIPTION trivial: Fix typo in bio_split()'s documentation trivial: PWM: fix of #endif comment trivial: fix typos/grammar errors in Kconfig texts trivial: Fix misspelling of firmware trivial: cgroups: documentation typo and spelling corrections trivial: Update contact info for Jochen Hein trivial: fix typo "resgister" -> "register" ...
2009-03-31twl4030-regulator: expose VPLL2David Brownell
Add VPLL2 to the set of twl4030-family regulators exposed for use by various drivers. It's commonly used to power the digital video outputs (e.g. LCD or DVI displays) on OMAP3 systems. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-03-30trivial: fix typos/grammar errors in Kconfig textsMatt LaPlante
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-24mfd: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Cc: sameo@openedhand.com Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-12mfd: add support for WM8351 revision BMark Brown
No software visible difference from revision A. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-17mfd: Fix sm501_register_gpio section mismatchRakib Mullick
WARNING: drivers/mfd/built-in.o(.text+0x1706): Section mismatch in reference from the function sm501_register_gpio() to the function .devinit.text:sm501_gpio_register_chip() The function sm501_register_gpio() references the function __devinit sm501_gpio_register_chip(). This is often because sm501_register_gpio lacks a __devinit annotation or the annotation of sm501_gpio_register_chip is wrong. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: fix sm501 section mismatchesAlexey Dobriyan
drv => driver renaming is needed otherwise modpost will spit false positives re pointing to __devinit function from regular data. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: terminate pcf50633 i2c_device_id listJean Delvare
The i2c_device_id list is supposed to be zero-terminated. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2009-02-17mfd: Ensure all WM8350 IRQs are masked at startupMark Brown
The IRQs might have been left enabled in hardware, generating spurious IRQs before the drivers have registered. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: fix htc-egpio iomem resource handling using resource_sizePhilipp Zabel
Fixes an off-by-one error in the iomem resource mapping. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: Fix TWL4030 build on some ARM variantsMark Brown
Many ARM platforms do not provide a mach/cpu.h so rather than guarding the use of that header with CONFIG_ARM guard it with the guards used when testing for the OMAP variants in the body of the code. Signed-off-by: Mark Brown <broonie@sirena.org.uk> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: wm8350 tries reaches -1Roel Kluin
With a postfix decrement tries will reach -1 rather than 0, so the warning will not be issued even upon timeout. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: Mark WM835x USB_SLV_500MA bit as accessibleMark Brown
The code is out of sync with the silicon. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: Improve diagnostics for WM8350 ID register probeMark Brown
Check the return value of the device I/O functions when reading the ID registers so we can provide a more useful diagnostic when we're having trouble talking to the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: Initialise WM8350 interrupts earlierMark Brown
Ensure that the interrupt handling is configured before we do platform specific init. This allows the platform specific initialisation to configure things which use interrupts safely. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-02-17mfd: Fix egpio kzalloc return testJulia Lawall
Since ei is already known to be non-NULL, I assume that what was intended was to test the result of kzalloc. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-15mfd: Remove non exported references from pcf50633Balaji Rao
Remove references to set_irq_type and handle_level_irq which are not exported to modules Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-13Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: TWL4030: fix clk API usage [ARM] 5364/1: allow flush_ioremap_region() to be used from modules [ARM] w90x900: fix build errors and warnings [ARM] i.MX add missing include [ARM] i.MX: fix breakage from commit 278892736e99330195c8ae5861bcd9d791bbf19e [ARM] i.MX: remove LCDC controller register definitions from imx-regs.h
2009-01-13TWL4030: fix clk API usageRussell King
Always pass a struct device if one is available; and there's really no reason for the processor specific stuff in this file if only people would follow the API usage properly by using the struct device. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-11mfd: Fix twl4030-core buildSamuel Ortiz
Fixes: drivers/mfd/twl4030-core.c:657: error: implicit declaration of function 'cpu_is_omap2430' Not the nicest fix, but this should be improved by a better OMAP clock API implementation. Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: Ensure sm501 GPIO pin mode is GPIO when configuredBen Dooks
When setting an GPIO to either input or output, we should ensure that the pin configuration elsewhere in the chip is set to GPIO in-case the initial setup has not been done correctly. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: dm355 evm MMC/SD card detectionDavid Brownell
Support card detect and writeprotect switches on DM355 EVM. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 gpio supportBalaji Rao
What the PCF05633 calls as a 'GPIO' is much more than the GPIO in the linux sense and there are only 4 of them - which means, the gpiolib is not used here. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 adc driverBalaji Rao
This patch adds basic support for the PCF50633 ADC. The subtractive mode is not supported yet. Since we don't have adc subsystem, it currently lives in drivers/mfd. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Acked-by: Jonathan Cameron <jonathan.cameron@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 core driverBalaji Rao
This patch implements the core of the PCF50633 driver. This core driver has generic register read/write functions and does interrupt management for its sub devices. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-08leds: Add WM8350 LED driverMark Brown
The voltage and current regulators on the WM8350 AudioPlus PMIC can be used in concert to provide a power efficient LED driver. This driver implements support for this within the standard LED class. Platform initialisation code should configure the LED hardware in the init callback provided by the WM8350 core driver. The callback should use wm8350_isink_set_flash(), wm8350_dcdc25_set_mode() and wm8350_dcdc_set_slot() to configure the operating parameters of the regulators for their hardware and then then use wm8350_register_led() to instantiate the LED driver. This driver was originally written by Liam Girdwood, though it has been extensively modified since then. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-04mfd: Fix section mismatch in da903xMark Brown
The subdevice removal functions are marked __devexit but are referenced from the error handling path when probing so are needed even when __devexit functions are removed. Signed-off-by: Mark Brown <broonie@sirena.org.uk> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: move drivers/i2c/chips/menelaus.c to drivers/mfdDavid Brownell
ove the menelaus driver from drivers/i2c/chips to drivers/mfd since it's more of a multi-function device than anything else, and since Jean is trying to vanish drivers/i2c/chips ASAP. One way to think of these chips are as the PMIC family most used with OMAP2 generation chips. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: move drivers/i2c/chips/tps65010.c to drivers/mfdDavid Brownell
Move the tps65010 driver from drivers/i2c/chips to drivers/mfd since it's more of a multi-function device than anything else, and since Jean is trying to vanish drivers/i2c/chips ASAP. One way to think of these chips are as the PMIC family most used with OMAP1 generation chips. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: dm355evm msp430 driverDavid Brownell
Basic MFD framework for the MSP430 microcontroller firmware used on the dm355evm board: - Provides an interface for other drivers: register read/write utilities, and register declarations. - Directly exports: * Many signals through the GPIO framework + LEDs + SW6 through gpio sysfs + NTSC/nPAL jumper through gpio sysfs + ... more could be added later, e.g. MMC signals * Child devices: + LEDs, via leds-gpio child (and default triggers) + RTC, via rtc-dm355evm child device + Buttons and IR control, via dm355evm_keys - Supports power-off system call. Use the reset button to power the board back up; the power supply LED will be on, but the MSP430 waits to re-activate the regulators. - On probe() this: * Announces firmware revision * Turns off the banked LEDs * Exports the resources noted above * Hooks the power-off support * Muxes tvp5146 -or- imager for video input Unless the new tvp514x driver (tracked for mainline) is configured, this assumes that some custom imager driver handles video-in. This completely ignores the registers reporting the output voltages on the various power supplies. Someone could add a hwmon interface if that seems useful. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Add missing break from wm3850-coreMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Add WM8351 supportMark Brown
The WM8351 is a WM8350 variant. As well as register default changes the WM8351 has fewer voltage and current regulators than the WM8350. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Support configurable numbers of DCDCs and ISINKs on WM8350Mark Brown
Some WM8350 variants have fewer DCDCs and ISINKs. Identify these at probe and refuse to use the absent DCDCs when running on these chips. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Handle missing WM8350 platform dataMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Add WM8352 supportMark Brown
The WM8352 is a variant of the WM8350. Aside from the register defaults there are no software visible differences to the WM8350. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Use irq_to_desc in twl4030 codeSamuel Ortiz
The global irq_desc array is soon going to be accessible only with !CONFIG_SPARSE_IRQ. We should start using the generic irq_to_desc() routines instead. Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Dialog DA9030 battery charger MFD driverMike Rapoport
This patch amends DA903x MFD driver with definitions and methods needed for battery charger driver. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Register WM8400 codec deviceMark Brown
Register a child device for the codec in the WM8400. Also switch the unregistration of the MFD devices to use the MFD core since the current code is hand rolling the same thing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Pass driver_data onto child devicesMark Brown
The MFD cell structure provides a driver_data field but doesn't pass it on to the child devices when instantiating them - do that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-04mfd: Fix twl4030-core.c build errorSamuel Ortiz
This is a fix for: twl4030-core.c:(.text+0x16a797): undefined reference to `clk_get_rate' twl4030-core.c:(.text+0x16a797): undefined reference to `clk_put' on x86 and x86_64, as the clock API is not defined on those platforms. Signed-off-by: Samuel Ortiz <sameo@openedhand.com>