aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd
AgeCommit message (Collapse)AuthorFilesLines
2011-10-25Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmapLinus Torvalds4-16/+15
* 'for-linus' of git://opensource.wolfsonmicro.com/regmap: (62 commits) mfd: Enable rbtree cache for wm831x devices regmap: Support some block operations on cached devices regmap: Allow caches for devices with no defaults regmap: Ensure rbtree syncs registers set to zero properly regmap: Allow rbtree to cache zero default values regmap: Warn on raw I/O as well as bulk reads that bypass cache regmap: Return a sensible error code if we fail to read the cache regmap: Use bsearch() to search the register defaults regmap: Fix doc comment regmap: Optimize the lookup path to use binary search regmap: Ensure we scream if we enable cache bypass/only at the same time regmap: Implement regcache_cache_bypass helper function regmap: Save/restore the bypass state upon syncing regmap: Lock the sync path, ensure we use the lockless _regmap_write() regmap: Fix apostrophe usage regmap: Make _regmap_write() global regmap: Fix lock used for regcache_cache_only() regmap: Grab the lock in regcache_cache_only() regmap: Modify map->cache_bypass directly regmap: Fix regcache_sync generic implementation ...
2011-10-24mfd: Move to the new db500 PRCMU APIMattias Nilsson3-304/+174
Now that we have a shared API between the DB8500 and DB5500 PRCMU's, switch to using this neutral API instead. We delete the parts of db8500-prcmu.h that is now PRCMU-neutral, and calls will be diverted to respective driver. Common registers are in dbx500-prcmu-regs.h and common accessors and defines in <linux/mfd/dbx500-prcmu.h> This way we get a a lot more abstraction and code reuse. Signed-off-by: Mattias Nilsson <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Create a common interface for dbx500 PRCMU driversMattias Nilsson1-0/+549
This adds a header file that contains the set of functions and definitions that will be shared between the DB8500 and DB5500 PRCMU drivers. Signed-off-by: Mattias Nilsson <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Delete ab3550 driverLinus Walleij1-47/+1
The AB3550 never passed the prototype stage. Instead it was used as a precursor to AB5500 for testing basic building blocks used in that chip, since they had large similarities. Since AB3550 will not see the light of day in product form and since the prototypes are no longer used, let's delete the driver and any references to it. Cc: Mattias Wallin <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: ab5500 chip register accessMattias Wallin2-2/+142
The analog baseband chip ab5500 is a multi functional chip containing regulators, charging, gpio, USB and accessory detect. It also contain various multimedia functionalities like digital encoder and audio codec. The core driver added with this patch provides register access via i2c via PRCMU. Event handling implemented as irq_chip will come in future patches since it depends on PRCMU functionality not yet implemented. Signed-off-by: Mattias Wallin <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Add Intel MSIC driverMika Westerberg1-0/+456
Add support for Intel MSIC chip found on Intel Medfield platforms. This chip embeds several subdevices: audio, ADC, GPIO, power button, etc. The driver creates platform device for each subdevice. We also provide an MSIC register access API which should replace the more generic SCU IPC interface currently used. Existing drivers can choose whether they convert to this new API or stick with the SCU IPC interface. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Simulate active high IRQs with wm831xMark Brown1-0/+1
In order to ease system integration provide a simulation of active high IRQs on the GPIOs by polling the GPIO status when an IRQ is generated. This isn't ideal on several fronts and will miss initially active IRQs in the current implementation but it should work well for most cases. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24input: Add power button support for mc13783Philippe Rétornaz1-0/+17
This adds support for the power-on buttons of MC13783 PMIC. Signed-off-by: Philippe Rétornaz <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Remove unused mc13xxx definesPhilippe Rétornaz1-2/+0
Signed-off-by: Philippe Rétornaz <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Support software initiated shutdown of WM831x PMICsMark Brown2-0/+6
In systems where there is no hardware signal from the processor to the PMIC to initiate the final power off sequence we must initiate the shutdown with a register write to the PMIC. Support such systems in the driver. Since this may prevent a full shutdown of the system platform data is used to enable the feature. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Remove mc13783 API functions and symbolsUwe Kleine-König1-112/+0
Now that all in-tree users are fixed to use the more general mc13xxx API the obsolete stuff can go away. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Provide a generic version of mc13xxx adc_do_conversionUwe Kleine-König2-17/+37
This is needed to convert the touch driver away from using struct mc13783. Note this patch drops MC13783_ADC0_ADREFMODE. This is unused and doesn't exist on mc13892. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Wake-up from Suspend MAX8997 supportMyungJoo Ham1-1/+0
- Support wake-up from suspend-to-ram. - Handle pending interrupt after a resume. - If pdata->wakeup is enabled, by default, the device is assumed to be capable of wakeup (the interrupt pin is connected to a wakeup-source GPIO) and may wakeup the system (MAX8997 has a power button input pin). Signed-off-by: MyungJoo Ham <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Allow WM8994 LDO enable pulls to be disabledMark Brown2-0/+9
In systems where the LDO enables are always driven (for example, being connected to an always on supply rail or a GPIO which is driven by the CPU even in suspend) then we can disable the pull downs on the LDO for a small power savings. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Refactor ab8500 GPADC API, add raw accessKarl Komierowski1-1/+4
Refactor the GPADC interface to avoid bugs in calling code: - ab8500_gpadc_[convert|read_raw|ad_to_voltage] clarifies each functions use case, *convert wraps *read_raw, and we can access raw ADC values properly. - Renamed gpadc function arguments from "input" to "channel" to clarify use, so we don't get confused again. Signed-off-by: Kalle Komierowski <[email protected]> Reviewed-by: Mattias Wallin <[email protected]> Reviewed-by: John Beckett <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-24mfd: Convert pcf50633 to use new register map APIMark Brown1-1/+2
Signed-off-by: Mark Brown <[email protected]> Tested-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-10-12ASoC: twl6040: Workaround for headset DC offset caused pop noisePeter Ujfalusi1-0/+1
Both Headset DAC need to be turned on/off at the same time before any of the output drivers are enabled (HS Left/Right, Earpiece). Move the HS DAC enable code to sequenced DAPM_SUPPLY, and attach it to the DACs. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-10-12MFD: twl6040: function to query the vibra status for clientsPeter Ujfalusi1-0/+3
If the client only interested, if any of the vibra channels enabled, or if any of the channels are set to receive audio data via PDM. This function targets mainly the vibra driver, so it can check if it is allowed to execute effects ot not. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-10-12MFD: twl6040: Cache the vibra control registersPeter Ujfalusi1-0/+1
The vibra control register will be used from the ASoC codec driver as well. In order to avoid latency issues caused by I2C read access, cache the two control register within the core driver, so we do not need to reach out to the chip to read it back. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-10-12Input: twl6040: Simplify vibra regsiter definitionsPeter Ujfalusi1-13/+7
The bits within the two control registers (for left and right channel) are identical. Use common names for the bits acros the two register. Also add the missing definition for the path selection bit. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-10-04ASoC: Add WM1811 supportMark Brown1-0/+4
The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <[email protected]>
2011-10-04mfd: Add WM1811 supportMark Brown1-0/+1
The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <[email protected]> Acked-by: Samuel Ortiz <[email protected]>
2011-09-22ASoC/MFD: twl6040: Combine bit definitions for Headset control registersPeter Ujfalusi1-8/+3
Use one set of defines for the HS bits, since they are identical in both control register. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-09-22ASoC: twl6040: Introduce SW only shadow registerPeter Ujfalusi1-2/+0
Software only shadow register to be used by the driver. For example Earpiece path will need this shadow register. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-09-20mfd: Support software initiated shutdown of WM831x PMICsMark Brown2-0/+6
In systems where there is no hardware signal from the processor to the PMIC to initiate the final power off sequence we must initiate the shutdown with a register write to the PMIC. Support such systems in the driver. Since this may prevent a full shutdown of the system platform data is used to enable the feature. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-09-19ASoC: twl6040: Chip initialization cleanupPeter Ujfalusi1-3/+0
There is no need to write to the vio registers at probe time, since most them either read only, or shared with MFD or not used. On the other hand it is a good idea to updated the ASICREV register in the cache at this time. After power up we need to restore some registers. Clean up the list to contain only the registers we are going to restore. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-09-19MFD: twl6040: Add accessor for revision IDPeter Ujfalusi1-0/+5
For client driver to use, if they need chip resvision information. Signed-off-by: Peter Ujfalusi <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-09-06mfd: Fix value of WM8994_CONFIGURE_GPIOMark Brown1-1/+1
This needs to be an out of band value for the register and on this device registers are 16 bit so we must shift left one to the 17th bit. Signed-off-by: Mark Brown <[email protected]> Cc: [email protected] Signed-off-by: Samuel Ortiz <[email protected]>
2011-08-28regulator: tps6586x: add SMx slew rate settingXin Xie1-0/+16
Add output vlotage slew rate setting for SM0/SM1 Signed-off-by: Xin Xie <[email protected]> Signed-off-by: Danny Huang <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2011-08-22mfd: Convert WM8400 to regmap APIMark Brown1-4/+3
Signed-off-by: Mark Brown <[email protected]>
2011-08-22mfd: Convert WM8994 to use new register map APIMark Brown1-7/+2
Signed-off-by: Mark Brown <[email protected]> Acked-by: Samuel Ortiz <[email protected]>
2011-08-22mfd: Convert WM831x to use regmap APIMark Brown1-5/+4
Factor out the register read/write code to use the register map API. We still need some wm831x specific code and locking in place to check that the user key is handled correctly but only on the write side, reads are not affected by the key. Signed-off-by: Mark Brown <[email protected]> Acked-by: Samuel Ortiz <[email protected]>
2011-08-17ASoC: Add WM8958 noise gate supportMark Brown1-0/+45
Signed-off-by: Mark Brown <[email protected]>
2011-08-12ASoC: Add bitfield definitions for WM8958 MICBIAS registersMark Brown1-0/+38
Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-08-08Merge branch 'for-3.1' into for-3.2Mark Brown14-19/+928
Conflict due to the fix for the register map failure - taken the for-3.1 version. Conflicts: sound/soc/codecs/sgtl5000.c
2011-08-03drivers/video/backlight/aat2870_bl.c: fix setting max_currentAxel Lin1-1/+1
- Current implementation tests wrong value for setting aat2870_bl->max_current. - In the current implementation, we cannot differentiate between 2 cases: a) if pdata->max_current is not set , or b) pdata->max_current is set to AAT2870_CURRENT_0_45 (which is also 0). Fix it by setting AAT2870_CURRENT_0_45 to be 1 and adjust the equation in aat2870_brightness() accordingly. Signed-off-by: Axel Lin <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Samuel Ortiz <[email protected]> Tested-by: Jin Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-08-01ASoC: Implement new DC servo readback mode for late WM8994 revisionsMark Brown1-0/+1
Later WM8994 devices implement a new DC servo readback mode with the register used to access the offset moved to register 0x59. Implement support for this and enable it on the appropriate devices. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-07-31mfd: Add AAT2870 mfd driverJin Park1-0/+181
Add mfd core driver for AnalogicTech AAT2870. The AAT2870 is communication through I2C and contains backlight and regulator components. Signed-off-by: Jin Park <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix missing stmpe kerneldocOm Prakash1-0/+3
Generating kerneldoc for STMPE result in warnings, so fix this by adding missing documentation. Signed-off-by: Om Prakash <[email protected]> Reviewed-by: Rabin Vincent <[email protected]> Reviewed-by: Jonas Aberg <[email protected]> Reviewed-by: Srinidhi Kasagar <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Add WM831x clock control register definitionsMark Brown1-0/+101
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Implement tps65910 IRQ cleanupMark Brown1-0/+1
The tps65910_irq_exit() cleanup function was generating a warning from sparse due to the lack of a prototype. This wasn't causing GCC warnings as the driver wasn't cleaning up its IRQs on exit at all so there was no use of an unprototyped function. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Clean-up ab8500 register fileLinus Walleij1-7/+1
This adds a previously undefined test register and removed a number of double-defined accessory detect registers (they are already defined higher up in the file. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31tps65912: gpio: add gpio driverMargarita Olaya1-0/+1
TPS65912 has five GPIOs that can be configured for different purposes. Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31tps65912: irq: add interrupt controllerMargarita Olaya1-0/+5
This module controls the interrupt handling for the tps65912. The interrupt sources can be the following: - GPIO - PWRON signal - PWRHOLD signal - Temperature detection Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: tps65912: Add new mfd deviceMargarita Olaya1-0/+321
The tps65912 chip is a power management IC. It contains the following components: - Regulators - GPIO controller The core driver is registered as a platform driver, it provides communication through I2C and SPI interfaces. Signed-off-by: Margarita Olaya Cabrera <[email protected]> Acked-by: Samuel Ortiz <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Support multiple active WM831x AUXADC conversionsMark Brown1-2/+11
The WM831x AUXADC hardware can schedule multiple conversions at once, allowing higher performance when more than one source is in use as we can have the hardware start new conversions without having to wait for a register write. Take advantage of this in the interrupt driven case, maintaining a list of callers that are waiting for AUXADC conversions and completing them all simultaneously. The external interface of the AUXADC is not changed so there will be limited use of the feature immediately. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Read wm831x AUXADC conversion results before acknowledging interruptMark Brown1-0/+1
Ensure that there's no possibility of loosing an AUXADC interrupt by reading the conversion result in the IRQ handler when using interrupts. Otherwise it's possible that under very heavy load a new conversion could be initiated before the acknowledgement for a previous interrupt has happened. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Support dynamic allocation of IRQ range for wm831xMark Brown1-1/+1
Use irq_allocate_desc() to get the IRQ range, which turns into a noop on non-sparse systems. Since all existing users are non-sparse there should be no compatibility issues. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Allow touchscreen to be disabled on wm831x devicesMark Brown1-0/+3
Allow platform data to flag the touchscreen as disabled so that if the touch driver is built in we don't end up causing lots of work by spuriously detecting touchscreen activity on systems where it isn't in use. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-07-31mfd: Fix bus lock interaction for WM831x IRQ set_type() operationMark Brown1-0/+4
The WM831x IRQ set_type() operation is doing a direct register write when called but since set_type() is called with the bus lock held this isn't legal and could cause deadlocks in the IRQ core. Fix this by posting the updates into an array and syncing in the bus_sync_unlock() callback. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>