aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-09-26Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-ledsLinus Torvalds1-0/+34
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: move leds-clevo-mail's probe function to .devinit.text leds: Fix indentation in LEDS_LP3944 Kconfig entry leds: Fix LED names leds: Fix leds-pca9532 whitespace issues leds: fix coding style in worker thread code for ledtrig-gpio. leds: gpio-leds: fix typographics fault leds: Add WM831x status LED driver
2009-09-23Merge git://git.infradead.org/battery-2.6Linus Torvalds1-0/+189
* git://git.infradead.org/battery-2.6: power_supply: Add driver for the PMU on WM831x PMICs ds2760_battery: Fix integer overflow for time_to_empty_now wm97xx_battery: Convert to dev_pm_ops wm97xx_battery: Use irq to detect charger state wm97xx_battery: Use platform_data wm97xx-core: Pass platform_data to battery ds2760_battery: implement set_charged() feature power_supply: get_by_name and set_charged functionality power_supply: EXPORT_SYMBOL cleanups ds2760_battery: add current_accum module parameter ds2760_battery: handle full_active_uAh == 0 case correctly ds2760_battery: add rated_capacity module parameter ds2760_battery: export more features ds2760_battery: delay power supply registration wm8350_power: Implement charge type property power_supply: Add a charge_type property, and use it for olpc driver olpc_battery: Add an 'error' sysfs device that displays raw errors Revert "power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL"
2009-09-23Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Anton Vorontsov16-10/+3395
Conflicts: drivers/power/wm97xx_battery.c
2009-09-22regulator: add buck3 in da903x driverHaojian Zhuang1-1/+3
BUCK3 is the new component in DA9035. So there're three BUCKs in DA9035. And there're two BUCKs in DA9034. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-09-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds1-0/+52
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] sizeof cleanup [WATCHDOG] wdt_pci: fix printk and variable type [WATCHDOG] wdt_pci - use pci_request_region [WATCHDOG] ar7_wdt: Fix error handling during probe. [WATCHDOG] ar7_wdt: convert to become a platform driver [WATCHDOG] fix book E watchdog to take WDIOC_SETTIMEOUT arg in seconds [WATCHDOG] davinci: use clock framework for timer frequency [WATCHDOG] Use DIV_ROUND_UP() macro in the coh901327 WDT [WATCHDOG] Add support for WM831x watchdog [WATCHDOG] Add watchdog driver for NUC900 [WATCHDOG] add SBC-FITPC2 watchdog driver
2009-09-18[WATCHDOG] Add support for WM831x watchdogMark Brown1-0/+52
The WM831x series of devices provide a watchdog with configurable behaviour on timer expiry. Currently this driver support refreshes via a register or GPIO line and autonomous refreshes from a hardware source (eg, a clock). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2009-09-17mfd: Convert WM8350 to use request_threaded_irq()Mark Brown1-1/+0
Instead of hand rolling our own variant. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17regulator: AB3100 supportLinus Walleij1-0/+28
This adds support for the regulators found in the AB3100 Mixed-Signal IC. It further also defines platform data for the ST-Ericsson U300 platform and extends the AB3100 MFD driver so that platform/board data with regulation constraints and an init function can be passed down all the way from the board to the regulators. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Fix ab3100-otp build failureSamuel Ortiz1-0/+1
ab3100.h should include linux/workqueue.h for otp to build properly. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Add Freescale MC13783 driverSascha Hauer2-0/+480
This driver provides the core Freescale MC13783 support. It registers the client platform_devices and provides access to the A/D converter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: AB3100 accessor function cleanupsLinus Walleij1-4/+4
This adds the _interruptible suffix to the AB3100 accessor functions on par with mutex_lock_interruptible() that's used for blocking simultaneous calls to the AB3100 acessor functions. Since these accesses are slow on a 100kHz I2C bus and may line up waiting for the mutex, we need to handle interruption by system shutdown or kill signals and may just as well denote that in the function names. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17regulator: Add WM831x LDO supportMark Brown1-0/+626
The WM831x series of devices provide three types of LDO: - General purpose LDOs supporting voltages from 0.9-3.3V - High performance analogue LDOs supporting voltages from 1-3.5V - Very low power consumption LDOs intended to support always on functionality. This patch adds support for all three kinds of LDO. Each regulator is probed as an individual platform device with resources used to provide the register map location of the regulator. Mixed hardware and software control of regulators is not current supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17regulator: Add WM831x DC-DC buck convertor supportMark Brown1-0/+571
The WM831x series of devices all have 3 DC-DC buck convertors. This driver implements software control for these regulators via the regulator API. Use with split hardware/software control of individual regulators is not supported, though regulators not controlled by software may be controlled via the hardware control interfaces. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17input: Add support for the WM831x ON pinMark Brown1-0/+19
The WM831x series of PMICs support control of initial power on through the ON pin on the device with soft control of the pin at other times. Represent this to userspace as KEY_POWER. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17gpio: Add WM831X GPIO driverMark Brown1-0/+55
Add support for the GPIO pins on the WM831x. No direct support is currently supplied for configuring non-gpiolib functionality such as pull configuration and alternate functions, soft configuration of these will be provided in a future patch. Currently use of these pins as interrupts is not supported due to the ongoing issues with generic irq not support interrupt controllers on interrupt driven buses. Users can directly request the interrupts with the wm831x-specific APIs currently provided if required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Export ISEL values from WM831x coreMark Brown1-0/+21
The current settings which can be used with the WM831x current sinks can't easily be mapped between register values and currents at run time without a lookup table since the values scale logarithmically to match the way the human eye interprets brightness. This lookup table is inclided in the core since several drivers need to use it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Add basic WM831x OTP supportMark Brown1-0/+162
The WM831x series of devices use OTP (One Time Programmable, a type of PROM) to store system configuration. At run time this data is visible via registers. Currently the only explicitly supported feature is that the unique ID provided by every WM831x device is exported to user space via sysfs. Other configuration data may be read by system-specific code in the pre_init() and post_init() platform data operations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Conditionally add WM831x backlight subdeviceMark Brown1-0/+6
The WM831x backlight driver requires at least the specification of the current sink to use and a maximum current to allow them to function and will actively interfere with other users of the regulators it uses if misconfigured so only register the subdevice for it if this platform data has been supplied. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Add WM831x AUXADC supportMark Brown2-0/+218
The WM831x contains an auxiliary ADC with a number of switchable inputs which is used to monitor some of the voltages and temperatures in the system and has some external inputs which can be used for machine specific purposes. Provide an API allowing drivers to read values from the ADC. An internal reference voltage is provided to allow callibration of the ADC. This is used to calibrate the device at startup. The hardware also supports continuous readings and digital comparators. These are not yet supported by the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Add WM831x interrupt supportMark Brown2-0/+785
The WM831x includes an interrupt controller managing interrupts for the various functions on the chip. This patch adds support for the core interrupt block on the device. Ideally this would be supported by genirq, particularly for the GPIOs, but currently genirq is unable to cope with controllers on interrupt driven buses so we cut'n'paste the generic interface. Once genirq is able to cope chips like this it should be a case of filing the prefixes off the code and redoing wm831x-irq.c to move over. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Initial core support for WM831x series devicesMark Brown2-0/+354
The WM831x series of devices are register compatible processor power management subsystems, providing regulator and power path management facilities along with other services like watchdog, RTC and touch panel controllers. This patch adds very basic support, providing basic single register I2C access, handling of the security key and registration of the devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Allow multiple MFD cells with the same nameMark Brown1-0/+1
Provide basic support for MFDs having multiple cells of a given type with different IDs by adding an id to the mfd_cell structure and then adding that to the id passed in to mfd_add_devices(). As it stands this approach requires that MFDs using this feature deal with ensuring that there aren't any ID collisions resulting from multiple MFDs of the same type being instantiated. This needs to happen with the existing code too, but with this approach there is a knock on effect on the IDs for non-duplicated devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Remove VIB defines from pcap header fileDaniel Ribeiro1-4/+0
Vibrator will be accessed via the pcap-regulator driver, no need to expose its bits in the header file. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: fix wrong define for 10bit pcf50633 ADC modePaul Fertser1-1/+2
The 10 bits definition was the 8 bits one. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: use a dedicated workqueue for pcf50633 irq processingPaul Fertser1-0/+1
Using the default kernel "events" workqueue causes problems with synchronous adc readings if initiated from some task on the same workqueue. I had a deadlock trying to use pcf50633_adc_sync_read from a power_supply class driver because the reading was initiated from the workqueue and it waited for the irq processing to complete (to get the result) and that was put on the same workqueue. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17hwmon: Add WM835x PMIC hardware monitoring driverMark Brown1-0/+6
This driver provides reporting of the status supply voltage rails of the WM835x series of PMICs via the hwmon API. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: add ezx_pcap_setbitsDaniel Ribeiro1-0/+1
Provides an atomic set_bits functions, as needed by the pcap-regulator driver. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: add set_ts_bits for pcapDaniel Ribeiro1-0/+1
Some TS controller bits are on the same register as the ADC control, save TS specific bits and export a set_ts_bits function so the TS driver can set it with the adc_mutex lock held. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-17mfd: Introduce irq_to_pcap()Daniel Ribeiro1-0/+1
Export an irq_to_pcap function to get pcap irq number, for the keypad driver. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-09-07leds: Add WM831x status LED driverMark Brown1-0/+34
The WM831x devices feature two software controlled status LEDs with hardware assisted blinking. The device can also autonomously control the LEDs based on a selection of sources. This can be configured at boot time using either platform data or the chip OTP. A sysfs file in the style of that for triggers allowing the control source to be configured at run time. Triggers can't be used here since they can't depend on the implementation details of a specific LED type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-04power_supply: Add driver for the PMU on WM831x PMICsMark Brown1-0/+189
The WM831x PMICs provide power path management from three sources: a wall supply, USB and a battery with integrated charger. They also provide an additional backup supply with integrated for maintaining always on functionality such as the RTC and monitoring of power switches. After some initial configuration at startup the device operates autonomously, the driver simply provides reporting of the current state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2009-06-17mfd: fix tmio related warningsSamuel Ortiz1-1/+1
We can not have .driver_data as const since platform_set_drvdata() doesnt take a const. The hclk mmc_data field can be const though. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-17mfd: asic3: remove SD/SDIO controller register definitionsPhilipp Zabel1-216/+3
Only the base addresses remain, as they are needed to set up the IOMEM resources. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-17mfd: add ASIC3 IRQ numbersPhilipp Zabel1-0/+7
IRQ number definitions for PWM, LED, SPI and OWM (ds1wm). Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-17mfd: asic3: add asic3_set_register common operationPhilipp Zabel1-5/+5
Used to configure single bits of the SDHWCTRL_SDCONF and EXTCF_RESET/SELECT registers needed for DS1WM, MMC/SDIO and PCMCIA functionality. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-17mfd: add PCAP driverDaniel Ribeiro1-0/+256
The PCAP Asic as present on EZX phones is a multi function device with voltage regulators, ADC, touch screen controller, RTC, USB transceiver, leds controller, and audio codec. It has two SPI ports, typically one is connected to the application processor and another to the baseband, this driver provides read/write functions to its registers, irq demultiplexer and ADC queueing/abstraction. This chip is used on a lot of Motorola phones, it was manufactured by TI as a custom product with the name PTWL93017, later this design evolved into the ATLAS PMIC from Freescale (MC13783). Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-17mfd: add U300 AB3100 core supportLinus Walleij1-0/+103
This adds a core driver for the AB3100 mixed-signal circuit found in the ST-Ericsson U300 series platforms. This driver is a singleton proxy for all accesses to the AB3100 sub-drivers which will be merged on top of this one, RTC, regulators, battery and system power control, vibrator, LEDs, and an ALSA codec. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Reviewed-by: Mike Rapoport <mike@compulab.co.il> Reviewed-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2009-06-13MFD,mmc: tmio_mmc: make HCLK configurablePhilipp Zabel1-0/+7
The Toshiba parts all have a 24 MHz HCLK, but HTC ASIC3 has a 24.576 MHz HCLK and AMD Imageon w228x's HCLK is 80 MHz. With this patch, the MFD driver provides the HCLK frequency to tmio_mmc via mfd_cell->driver_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Ian Molton <ian@mnementh.co.uk> Acked-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
2009-04-08Merge git://git.infradead.org/battery-2.6Linus Torvalds2-1/+2
* git://git.infradead.org/battery-2.6: pda_power: Add optional OTG transceiver and voltage regulator support pcf50633_charger: Remove unused mbc_set_status function pcf50633_charger: Enable periodic charging restart
2009-04-05mfd: remove DS1WM clock handlingPhilipp Zabel1-0/+1
This driver requests a clock that usually is supplied by the MFD in which the DS1WM is contained. Currently, it is impossible for a MFD to register their clocks with the generic clock API due to different implementations across architectures. For now, this patch removes the clock handling from DS1WM altogether, trusting that the MFD enable/disable functions will switch the clock if needed. The clock rate is obtained from a new parameter in driver_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: remove unused PASIC3 bus_shift fieldPhilipp Zabel1-1/+0
Removes the now-unused bus_shift field from pasic3_platform_data. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-04-05mfd: convert DS1WM to use MFD corePhilipp Zabel1-0/+5
This patch converts the DS1WM driver into an MFD cell. 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 Brown1-0/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-03-11ASoC: Add initial driver for the WM8400 CODECMark Brown1-0/+1
The WM8400 is a highly integrated audio CODEC and power management unit intended for mobile multimedia application. This driver supports the primary audio CODEC features, including: - 1W speaker driver - Fully differential headphone output - Up to 4 differential microphone inputs Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-02pcf50633_charger: Remove unused mbc_set_status functionBalaji Rao1-1/+0
The 'pcf50633_mbc_set_status' function is unused, so remove it. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-02-02pcf50633_charger: Enable periodic charging restartBalaji Rao1-0/+2
The battery charger state machine switches into charging mode when the battery voltage falls below 96% of a battery float voltage. But the voltage drop in Li-ion batteries is marginal(1~2 %) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 80%. This work_struct function restarts charging at regular intervals to make sure the battery doesn't discharge too much. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2009-01-15Merge branch 'topic/asoc' into next/asocTakashi Iwai10-5/+707
2009-01-11regulator: PCF50633 pmic driverBalaji Rao1-0/+67
Changes from V1: - Removed support for suspend_enable & suspend_disable functions. Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11power_supply: PCF50633 battery charger driverBalaji Rao1-0/+134
Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Cc: Andy Green <andy@openmoko.com> Cc: David Woodhouse <dwmw2@infradead.org> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2009-01-11mfd: PCF50633 gpio supportBalaji Rao1-0/+52
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>