summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* mfd: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-03-242-2/+2
| | | | | | Cc: sameo@openedhand.com Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* mfd: add support for WM8351 revision BMark Brown2009-03-121-0/+5
| | | | | | | | | 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>
* mfd: Fix sm501_register_gpio section mismatchRakib Mullick2009-02-171-1/+1
| | | | | | | | | | | | | 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>
* mfd: fix sm501 section mismatchesAlexey Dobriyan2009-02-171-12/+12
| | | | | | | | | | 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>
* mfd: terminate pcf50633 i2c_device_id listJean Delvare2009-02-171-0/+1
| | | | | | | | | 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>
* mfd: Ensure all WM8350 IRQs are masked at startupMark Brown2009-02-171-0/+7
| | | | | | | | 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>
* mfd: fix htc-egpio iomem resource handling using resource_sizePhilipp Zabel2009-02-171-1/+1
| | | | | | | 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>
* mfd: Fix TWL4030 build on some ARM variantsMark Brown2009-02-171-1/+1
| | | | | | | | | | 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>
* mfd: wm8350 tries reaches -1Roel Kluin2009-02-171-1/+1
| | | | | | | | | 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>
* mfd: Mark WM835x USB_SLV_500MA bit as accessibleMark Brown2009-02-171-1/+1
| | | | | | | 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>
* mfd: Improve diagnostics for WM8350 ID register probeMark Brown2009-02-171-4/+19
| | | | | | | | | 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>
* mfd: Initialise WM8350 interrupts earlierMark Brown2009-02-171-9/+9
| | | | | | | | | 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>
* mfd: Fix egpio kzalloc return testJulia Lawall2009-02-171-1/+1
| | | | | | | | 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>
* mfd: Remove non exported references from pcf50633Balaji Rao2009-01-151-1/+0
| | | | | | | | 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>
* Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2009-01-131-4/+4
|\ | | | | | | | | | | | | | | | | | | * 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
| * TWL4030: fix clk API usageRussell King2009-01-131-4/+4
| | | | | | | | | | | | | | | | 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>
* | mfd: Fix twl4030-core buildSamuel Ortiz2009-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* | mfd: Ensure sm501 GPIO pin mode is GPIO when configuredBen Dooks2009-01-111-2/+28
| | | | | | | | | | | | | | | | | | | | 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>
* | mfd: dm355 evm MMC/SD card detectionDavid Brownell2009-01-111-0/+10
| | | | | | | | | | | | | | | | 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>
* | mfd: PCF50633 gpio supportBalaji Rao2009-01-113-1/+127
| | | | | | | | | | | | | | | | | | | | 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>
* | mfd: PCF50633 adc driverBalaji Rao2009-01-113-1/+286
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | mfd: PCF50633 core driverBalaji Rao2009-01-113-0/+721
|/ | | | | | | | | | 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>
* leds: Add WM8350 LED driverMark Brown2009-01-081-0/+3
| | | | | | | | | | | | | | | | | | | 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>
* mfd: Fix section mismatch in da903xMark Brown2009-01-041-2/+2
| | | | | | | | | | 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>
* mfd: move drivers/i2c/chips/menelaus.c to drivers/mfdDavid Brownell2009-01-043-0/+1296
| | | | | | | | | | | | 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>
* mfd: move drivers/i2c/chips/tps65010.c to drivers/mfdDavid Brownell2009-01-043-1/+1088
| | | | | | | | | | | | 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>
* mfd: dm355evm msp430 driverDavid Brownell2009-01-043-0/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* mfd: Add missing break from wm3850-coreMark Brown2009-01-041-0/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Add WM8351 supportMark Brown2009-01-044-0/+1108
| | | | | | | | 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>
* mfd: Support configurable numbers of DCDCs and ISINKs on WM8350Mark Brown2009-01-041-0/+6
| | | | | | | | 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>
* mfd: Handle missing WM8350 platform dataMark Brown2009-01-041-1/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Add WM8352 supportMark Brown2009-01-044-16/+1139
| | | | | | | | 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>
* mfd: Use irq_to_desc in twl4030 codeSamuel Ortiz2009-01-041-4/+26
| | | | | | | | 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>
* mfd: Dialog DA9030 battery charger MFD driverMike Rapoport2009-01-041-0/+12
| | | | | | | | 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>
* mfd: Register WM8400 codec deviceMark Brown2009-01-042-6/+26
| | | | | | | | | | 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>
* mfd: Pass driver_data onto child devicesMark Brown2009-01-041-0/+1
| | | | | | | | 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>
* mfd: Fix twl4030-core.c build errorSamuel Ortiz2009-01-041-6/+13
| | | | | | | | | | | 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>
* mfd: twl4030 regulator bug fixesDavid Brownell2009-01-041-10/+1
| | | | | | | | | | | | | | This contains two bugfixes to the initial twl4030 regulator support patch related to USB: (a) always overwrite the old list of consumers ... else the regulator handles all use the same "usb1v5" name; (b) don't set up the "usbcp" regulator, which turns out to be managed through separate controls, usually ULPI directly from the OTG controller. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: twl4030: create some regulator devicesDavid Brownell2009-01-041-10/+164
| | | | | | | | | | | | | | | | | | | | | | | | | Initial code to create twl4030 voltage regulator devices, using the new regulator framework. Note that this now starts to care what name is used to declare the TWL chip: - TWL4030 is the "old" chip; newer ones have a bigger variety of VAUX2 voltages. - TWL5030 is the core "new" chip; TPS65950 is its catalog version. - The TPS65930 and TPS65920 are cost-reduced catalog versions of TWL5030 parts ... fewer regulators, no battery charger, etc. Board-specific regulator configuration should be provided, listing which regulators are used and their constraints (e.g. 1.8V only). Code that could ("should"?) leverage the regulator stuff includes TWL4030 USB transceiver support and MMC glue, LCD support for the 3430SDP and Labrador boards, and S-Video output. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: twl4030: cleanup symbols and OMAP dependencyDavid Brownell2009-01-041-1/+1
| | | | | | | | | | | | | Finish removing dependency of TWL driver stack on platform-specific IRQ definitions ... and remove the build dependency on OMAP. This lets the TWL4030 code be included in test builds for most platforms, and will make it easier for non-OMAP folk to update most of this code for new APIs etc. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: twl4030: simplified child creation codeDavid Brownell2009-01-041-216/+84
| | | | | | | | | | | | | | | Minor cleanup to twl4030-core: define a helper function to populate a single child node, and use it to replace six inconsistent versions of the same logic. Both object and source code shrink. As part of this, some devices now have more IRQ resources: battery charger, keypad, ADC, and USB transceiver. That helps to remove some irq #defines that block the children's drivers code from compiling on non-OMAP platforms. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* power_supply: Add battery health reporting for WM8350Mark Brown2009-01-041-1/+1
| | | | | | | | | | Implement support for reporting battery health in the WM8350 battery interface. Since we are now able to report this via the classs remove the diagnostics from the interrupt handler. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Refactor WM8350 chip identificationMark Brown2009-01-041-17/+37
| | | | | | | | | | | | | Since the WM8350 driver was originally written the semantics for the identification registers of the chip have been clarified, allowing us to do an exact match on all the fields. This avoids mistakenly running on unsupported hardware. Also change to using the datasheet names more consistently for legibility and fix a printk() that should be dev_err(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Switch WM8350 revision detection to a feature based modelMark Brown2009-01-041-4/+2
| | | | | | | | Rather than check for chip revisions in the WM8350 drivers have the core code set flags for relevant differences. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: allow reading entire register banks on twl4030David Brownell2009-01-041-2/+2
| | | | | | | | | Minor change to the TWL4030 utility interface: support reads of all 256 bytes in each register bank (vs just 255). This can help when debugging, but is otherwise a NOP. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Add AUXADC support for WM8350Mark Brown2009-01-041-1/+50
| | | | | | | | The auxiliary ADC in the WM8350 is shared between several subdevices so access to it needs to be arbitrated by the core driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Add WM8350 revision H supportMark Brown2009-01-041-1/+6
| | | | | | | No other software changes are required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Add some documentation for WM8350 register lockMark Brown2009-01-041-0/+16
| | | | | | | | Hopefully this will make the purpose of these functions a bit clearer, it's not immediately obvious that the lock is a hardware feature. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Remove i.MX31ism from WM8350 i2c driverMark Brown2009-01-041-2/+0
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
* mfd: Don't mark WM8350 security register as volatileMark Brown2009-01-041-1/+1
| | | | | | | There's no need to read this back from the chip each time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
OpenPOWER on IntegriCloud