summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* mfd: Convert WM8350 to use request_threaded_irq()Mark Brown2009-09-171-18/+6
| | | | | | | 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>
* mfd: Fix twl4030-power warningsSamuel Ortiz2009-09-171-4/+4
| | | | | | KEY_1 and KEY_2 definitions conflicts with include/linux/input.h Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* regulator: AB3100 supportLinus Walleij2009-09-171-0/+4
| | | | | | | | | | | | | | | | 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>
* mfd: Fix ab3100-otp build failureSamuel Ortiz2009-09-171-1/+0
| | | | | | ab3100.h should include linux/workqueue.h for otp to build properly. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Print warning for twl4030 out-of-order script loadingAmit Kucheria2009-09-171-0/+6
| | | | | | | | | | | | | | | | | When the sleep script is loaded before the wakeup script, there is a chance that the system might go to sleep before the wakeup script loading is completed. This will lead to a system that does not wakeup and has been observed to cause non-booting boards. Various options were considered to solve this problem, including modification of the core twl4030 power code to be smart enough to reorder the loading of the scripts. But it felt too over-engineered. Hence this patch just warns the DPS script developer so that they may be reordered in the board-code itself. Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add support for TWL4030/5030 dynamic power switchingAmit Kucheria2009-09-174-0/+490
| | | | | | | | | | | | | The TWL4030/5030 family of multifunction devices allows board-specific control of the the various regulators, clock and reset lines through 'scripts' that are loaded into its memory. This allows for Dynamic Power Switching (DPS). Implement board-independent core support for DPS that is then used by board-specific code to load custom DPS scripts. Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: AB3100 OTP readoutLinus Walleij2009-09-173-0/+278
| | | | | | | | | | | | This adds the ability to read out OTP (One-Time Programmable) registers in the AB3100 MFD ASIC. It's a simple sysfs file you can cat to prompt. The OTP registers of the AB3100 are used to store various device-unique information such as customer ID, product flags and the 3GPP standard IMEI (International Mobile Equipment Indentity) number. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add Freescale MC13783 driverSascha Hauer2009-09-173-0/+439
| | | | | | | | | 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>
* mfd: AB3100 disable irq nosyncLinus Walleij2009-09-171-1/+1
| | | | | | | | | This will make the worker fire interrupt disable the AB3100 IRQ without sync which resolves a race since the interrupt obviously cannot wait for itself to complete while being handled. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: AB3100 alter default settingLinus Walleij2009-09-171-1/+1
| | | | | | | | | This alters the default setting for AB3100_IMRB1 from 0xff to 0xbf. These registers are used for the yet unimplemented ADC and this new setting will deactivate ADC Trigger 1. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: AB3100 propagate errorLinus Walleij2009-09-171-1/+1
| | | | | | | | | This makes ab3100_set_register_interruptible() propagate the error code from suboperations properly so it can be handles properly. (A special case comes from signal interruption.) Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: AB3100 accessor function cleanupsLinus Walleij2009-09-171-19/+24
| | | | | | | | | | | | | 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>
* mfd: Hook WM831x into build systemMark Brown2009-09-172-0/+12
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Export ISEL values from WM831x coreMark Brown2009-09-171-0/+64
| | | | | | | | | | | 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>
* mfd: Add basic WM831x OTP supportMark Brown2009-09-172-0/+87
| | | | | | | | | | | | | | 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>
* mfd: Conditionally add WM831x backlight subdeviceMark Brown2009-09-171-0/+15
| | | | | | | | | | | 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>
* mfd: Add WM831x AUXADC supportMark Brown2009-09-171-0/+101
| | | | | | | | | | | | | | | | | 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>
* mfd: Add WM831x interrupt supportMark Brown2009-09-172-2/+569
| | | | | | | | | | | | | | | | 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>
* mfd: Initial core support for WM831x series devicesMark Brown2009-09-171-0/+1357
| | | | | | | | | | | | | | 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>
* mfd: Allow multiple MFD cells with the same nameMark Brown2009-09-171-1/+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>
* mfd: register ezx-pcap earlierAntonio Ospite2009-09-171-1/+1
| | | | | | | | | Register ezx-pcap earlier so it can be used with cpufreq Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Correct ro and cd implemantion on DM355Vipin Bhandari2009-09-171-2/+10
| | | | | | | | | | | | | | | | | | | | This patch corrects the support for MMCSD card detection and read only feature for SoC DM355. EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that Bit 2 and 4 should be checked for card detection. However on the EVM, bits 1 and 3 gives this status, for MMC/SD instance 0 and 1 respectively. The pdf also suggests that Bit 1 and 3 should be checked for write protection. However on the EVM bits 2 and 4 gives this status. This document can be downloaded from http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: revise locking for pcf50633 ADCPaul Fertser2009-09-171-16/+16
| | | | | | | | | | | | | | Current implementation is prone to races, this patch attempts to remove all but one (in pcf50633_adc_sync_read). The idea is that we need to guard the queue access only on inserting and removing items. If we insert and there're no more items in the queue it means that the last irq already happened and we need to trigger ADC manually. If not, then the next conversion will be triggered by the irq handler upon completion of the previous. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: use a dedicated workqueue for pcf50633 irq processingPaul Fertser2009-09-171-1/+4
| | | | | | | | | | | | | | 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>
* mfd: Add twl4030-pwrbutton as a twl4030 childFelipe Balbi2009-09-171-0/+13
| | | | | | | | | Make that twl4030-pwrbutton.c driver probe with current child creation api for twl4030. Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* hwmon: Add WM835x PMIC hardware monitoring driverMark Brown2009-09-171-0/+3
| | | | | | | | | 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>
* mfd: remove unnecessary semicolons from twl4030Joe Perches2009-09-171-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: add ezx_pcap_setbitsDaniel Ribeiro2009-09-171-0/+23
| | | | | | | | 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>
* mfd: fix pcap irq bottom handlerDaniel Ribeiro2009-09-171-22/+27
| | | | | | | | Mask interrupts before servicing them and loop while pcap asserts the interrupt line. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: add set_ts_bits for pcapDaniel Ribeiro2009-09-171-4/+18
| | | | | | | | | 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>
* mfd: Introduce irq_to_pcap()Daniel Ribeiro2009-09-171-4/+5
| | | | | | | 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>
* mfd: fix ab3100 warning on x86_64Samuel Ortiz2009-09-171-4/+4
| | | | | | The file_operations write prototype should return a ssize_t. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: twl4030 irq fixesRussell King2009-08-041-31/+24
| | | | | | | | | | | | | | | | | | | The TWL4030 IRQ handler has a bug which leads to spinlock lock-up. It is calling the 'unmask' function in a process context. :The mask/unmask/ack functions are only designed to be called from the IRQ handler code, or the proper API interfaces found in linux/interrupt.h. Also there is no need to have IRQ chaining mechanism. The right way to handle this is to claim the parent interrupt as a standard interrupt and arrange for handle_twl4030_pih to take care of the rest of the devices. Mail thread on this issue can be found at: http://marc.info/?l=linux-arm-kernel&m=124629940123396&w=2 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-07-081-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: gpio_mouse - use standard driver registration method Input: mark serio and i8042 as suspended when hibernating too Input: add support for generic GPIO-based matrix keypad Input: arrange keyboards alphabetically Input: gpio-keys - avoid possibility of sleeping in timer function Input: gpio-keys - revert 'change timer to workqueue' Input: dm355evm_keys - fix kconfig symbol names Input: wacom - add DTF720a support and fix rotation on Intuos3 Input: i8042 - more reset quirks for MSI Wind-clone netbooks
| * Input: dm355evm_keys - fix kconfig symbol namesDavid Brownell2009-06-281-2/+1
| | | | | | | | | | | | | | | | | | The keypad driver for the DM355 EVM got slightly broken as it merged, since it moved from input/keyboard to input/misc and its Kconfig symbol changed. This patch copes with the changed Kconfig symbol. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | mfd: fix pcap adc lockingDaniel Ribeiro2009-07-031-1/+3
| | | | | | | | | | | | | | Release the lock on error. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: sm501, fix lock imbalanceJiri Slaby2009-07-031-1/+2
| | | | | | | | | | | | | | Add omitted unlock in sm501_unit_power. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | [WATCHDOG] twl4030 watchdog driverTimo Kokkonen2009-06-201-0/+12
| | | | | | | | | | | | | | | | | | Implementation of twl4030 watchdog driver. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@nokia.com> Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@nokia.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | Merge branch 'for-linus' of ↵Linus Torvalds2009-06-201-0/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits) Input: add driver for Synaptics I2C touchpad Input: synaptics - add support for reporting x/y resolution Input: ALPS - handle touchpoints buttons correctly Input: gpio-keys - change timer to workqueue Input: ads7846 - pin change interrupt support Input: add support for touchscreen on W90P910 ARM platform Input: appletouch - improve finger detection Input: wacom - clear Intuos4 wheel data when finger leaves proximity Input: ucb1400 - move static function from header into core Input: add driver for EETI touchpanels Input: ads7846 - more detailed model name in sysfs Input: ads7846 - support swapping x and y axes Input: ati_remote2 - use non-atomic bitops Input: introduce lm8323 keypad driver Input: psmouse - ESD workaround fix for OLPC XO touchpad Input: tsc2007 - make sure platform provides get_pendown_state() Input: uinput - flush all pending ff effects before destroying device Input: simplify name handling for certain input handles Input: serio - do not use deprecated dev.power.power_state Input: wacom - add support for Intuos4 tablets ...
| * Merge commit 'v2.6.30' into nextDmitry Torokhov2009-06-112-9/+1
| |\
| * | Input: ucb1400 - move static function from header into coreSebastian Andrzej Siewior2009-05-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | it's a little too large for static line. The ts is currently the only mainline user but Marek Vasut claims that there is a battery driver in an ARM tree which also needs this function. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | | mfd: early init for MFD running regulatorsSamuel Ortiz2009-06-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | For MFDs running regulator cores, we really want them to be brought up early during boot. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il>
* | | mfd: fix tmio related warningsSamuel Ortiz2009-06-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | mfd: asic3: enable SD/SDIO cellPhilipp Zabel2009-06-171-1/+113
| | | | | | | | | | | | | | | | | | | | | This enables the ASIC3's SD/SDIO MFD cell, supported by the tmio_mmc driver. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | mfd: asic3: enable DS1WM cellPhilipp Zabel2009-06-172-0/+100
| | | | | | | | | | | | | | | | | | | | | This enables the ASIC3's DS1WM MFD cell, supported by the ds1wm driver. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | mfd: asic3: use resource_size macro instead of local variablePhilipp Zabel2009-06-171-4/+2
| | | | | | | | | | | | | | | | | | | | | This should make the code a little bit easier to read. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | mfd: asic3: add clock handling for MFD cellsPhilipp Zabel2009-06-171-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ASIC3 has to work on both PXA and S3C and since their struct clk implementations differ, we can't register out clocks with the clkdev mechanism (yet?). For now we have to keep clock handling internal to this driver and enable/disable the clocks via the mfd_cell->enable/disable functions. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | mfd: asic3: add asic3_set_register common operationPhilipp Zabel2009-06-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | mfd: Fix Kconfig help text for WM8350Mark Brown2009-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | More with the grammar. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | | mfd: add PCAP driverDaniel Ribeiro2009-06-173-0/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud