aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-12-14regulator: Add support for twl6030 regulatorsRajendra Nayak3-22/+130
This patch updates the regulator driver to add support for TWL6030 PMIC specific LDO regulators. SMPS resources are not yet supported for TWL6030 and also .set_mode and .get_status for LDO's are yet to be implemented for TWL6030. Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Acked-by: Mark Brown <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-14rtc: Add twl6030 RTC supportBalaji T K2-44/+114
This patch adds support for RTC in phoenix TWL6030. Register offset addresses have changed in TWL6030 rtc-twl.c will hence forth support all twl RTC (4030, 5030, 6030 ..) Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Reviewed-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-14mfd: Add support for twl6030 irq frameworkBalaji T K7-21/+490
This patch adds support for phoenix interrupt framework. New iInterrupt status register A, B, C are introduced in Phoenix and are cleared on write. Due to the differences in interrupt handling with respect to TWL4030, twl6030-irq.c is created for TWL6030 PMIC Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Rename twl4030_ routines in twl-regulator.cRajendra Nayak2-93/+98
This patch renames all twl4030_ functions to twl so that regulator driver can be reused by Triton - TWL4030 and Phoenix - TWL6030. Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Rename twl4030_ routines in rtc-twl.cBalaji T K2-69/+69
This patch renames all twl4030_ functions to twl_ so that RTC driver can be shared between Triton and Phoenix. Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Nayak Rajendra <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Rename all twl4030_i2c*Balaji T K13-160/+187
This patch renames function names like twl4030_i2c_write_u8, twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8 and also common variable in twl-core.c Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13Merge branch 'master' into develRussell King16-85/+134
2009-12-13ARM: fix lh7a40x buildRussell King1-8/+0
No idea if this platform actually uses cpufreq_get(), but it doesn't have any cpufreq drivers. That's not to say it doesn't use cpufreq_get() in its drivers. LH7a40x is unmaintained anyhow, and should probably be killed off. Signed-off-by: Russell King <[email protected]>
2009-12-13ARM: fix sa1100 buildRussell King3-16/+14
Fix: arch/arm/mach-sa1100/generic.c:117: error: redefinition of 'cpufreq_get' include/linux/cpufreq.h:299: error: previous definition of 'cpufreq_get' was here cpufreq_get() is used on these platforms to tell drivers what the CPU frequency is, and therefore the bus frequency - which is critical for setting the PCMCIA and LCD timings. Adding ifdefs to these drivers to select cpufreq_get() or some other interface adds confusion. Making these drivers use some other interface for the normal paths and cpufreq stuff for the cpufreq notifier is insane as well. (Why x86 can't provide a version of cpufreq_get() which returns the CPU frequency when CPUFREQ is disabled is beyond me, rather than requiring a dummy zero-returning cpufreq_get(). Especially as they do: unsigned long khz = cpufreq_get(cpu); if (!khz) khz = tsc_khz; In other words, if CPUFREQ is disabled, get it from tsc_khz - why not provide a dummy cpufreq_get() which returns tsc_khz?) Signed-off-by: Russell King <[email protected]>
2009-12-13mfd: Rename twl4030* driver files to enable re-useSantosh Shilimkar22-21/+21
The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030 for OMAP3. The common modules like RTC, Regulator creates opportunity to re-use the most of the code from twl4030. This patch renames few common drivers twl4030* files to twl* to enable the code re-use. Signed-off-by: Rajendra Nayak <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13Merge branch 'nfs-for-2.6.33'Trond Myklebust30-469/+1078
2009-12-13mfd: Clarify twl4030 return value for read and writeAmit Kucheria1-8/+22
We should be checking if all the messages were tranferred. If not, then we should propagate the i2c core error code or EIO. Currently we return success (0) even if none of messages were transferred successfully. Signed-off-by: Amit Kucheria <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Add all twl4030 regulators to the twl4030 mfd driverJuha Keski-Saari2-4/+30
Add all twl4030 regulators to the twl4030 mfd driver and twl4030_platform_data Signed-off-by: Juha Keski-Saari <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Don't set mc13783 ADREFMODE for touch conversionsUwe Kleine-König1-2/+2
Setting ADREFMODE is utter nonsense, but that's hard to read out of the spec. Strange enough it's possible to read x and y values even when it's set. When unset you can get values not only for the axes, but also for contact resistance which allows the touch driver to report pressure values. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Remove ezx-pcap defines for custom led gpio encodingAntonio Ospite1-3/+0
We used these, in a first version of leds-pcap driver, in order to encode gpio enabling and gpio inversion for a led inside the variable used for the gpio number. In the new leds-pcap driver we rely on gpio_is_valid() to derive if a led is gpio enabled and we have a dedicated flag to tell if the gpio value has to be inverted. Signed-off-by: Antonio Ospite <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Near complete mc13783 rewriteUwe Kleine-König3-466/+617
This fixes several things while still providing the old API: - simplify and fix locking - better error handling - don't ack all irqs making it impossible to detect a reset of the rtc - use a timeout variant to wait for completion of ADC conversion - provide platform-data to regulator subdevice (This allows making struct mc13783 opaque for other drivers after the regulator driver is updated to use its platform_data.) - expose all interrupts - use threaded irq After all users in mainline are converted to the new API, some things (e.g. mc13783-private.h) can go away. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Remove build time warning for WM835x register default tablesMark Brown1-8/+0
Systems using the WM835x need to choose which of the default register settings are required on the system. Currently there is a compile time warning as well as a runtime error intended to flag up to users that this is required but this also triggers for people building the driver in order to obtain build coverage. Remove the build warning, leaving only the runtime error, in order to reduce noise for people doing generic kernel work. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Force I2C to be built in when building WM831xMark Brown1-1/+1
This works around issues with allmodconfig where it won't propagate the dependency from the WM831x core back to the I2C and MFD cores. When doing allmodconfig this causes WM831x to be omitted and ensures that in normal builds the dependencies get shaken out. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Don't allow wm831x to be built as a moduleMark Brown1-1/+1
The genirq infrastructure functions aren't currently exported, preventing modular builds. Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Fix incorrect error check for wm8350-coreDan Carpenter1-1/+1
It was *pdev which was allocated not pdev. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Fix twl4030 warningAlan Cox1-1/+2
Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13gpiolib: Implement gpio_to_irq() for wm831xMark Brown1-0/+13
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Remove default selection of AB4500Linus Walleij1-1/+0
This remove the default 'y' selection of AB4500, currently everyone enabling the SPI subsystem will get a copy of this driver. Signed-off-by: Linus Walleij <[email protected]> Cc: Srinidhi Kasagar <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Move WM831x to generic IRQMark Brown4-137/+122
Replace the wm831x-local IRQ infrastructure with genirq, allowing access to the diagnostic infrastructure of genirq and allowing us to implement interrupt support for the GPIOs. The switchover is done within the wm831x specific IRQ API, further patches will convert the individual drivers to use genirq directly. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Initial support for twl5031Ilkka Koskinen3-11/+180
TWL5031 introduces two new interrupts in PIH. Moreover, BCI has changed remarkably and, thus, it's disabled when TWL5031 is in use. Signed-off-by: Ilkka Koskinen <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Mask and unmask wm8350 IRQs on request and freeMark Brown5-41/+9
Bring the WM8350 IRQ API more in line with the generic IRQ API by masking and unmasking interrupts as they are requested and freed. This is mostly just a case of deleting the mask and unmask calls from the individual drivers. The RTC driver is changed to mask the periodic IRQ after requesting it rather than only unmasking the alarm IRQ. If the periodic IRQ fires in the period where it is reqested then there will be a spurious notification but there should be no serious consequences from this. The CODEC drive is changed to explicitly disable headphone jack detection prior to requesting the IRQs. This will avoid the IRQ firing with no jack set up. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Convert wm8350 IRQ handlers to irq_handler_tMark Brown6-34/+59
This is done as simple code transformation, the semantics of the IRQ API provided by the core are are still very different to those of genirq (mainly with regard to masking). Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: ezx-pcap: Don't pass pcap pointer as subdev drvdata.Antonio Ospite1-1/+0
Abusing subdev drvdata is not needed anymore, as all pcap subdevs are now retrieving the pcap pointer from their parent device. This change removes a leftover coming from early versions of ezx-pcap and its subdevs drivers. Signed-off-by: Antonio Ospite <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Allow configuration of VDCDC2 for tps65010Ben Dooks2-0/+47
Add function to allow the configuation fo the VDCDC2 register by external users, to allow changing of the standard and low-power running modes. This is needed, for example, for the Simtec IM2440D20 where we need to use the low-power mode to shutdown the LDO/DCDC that are not needed during suspend (saving substantial power) and the runtime use of the low-power mode to change VCore. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Simtec Linux Team <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Allow the board to choose any GPIO base for tps65010Ben Dooks1-1/+1
If the board does not care where the TPS turns up, then specifiying the value -1 to get gpiolib to dynamically allocate the base for the chip is valid. Change the test to look for != 0, so that any boards specifying zero will not end up with gpio that they didn't want. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Simtec Liunx Team <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Enable twl4030 32kHz oscillator low-power modeIlkka Koskinen2-2/+12
Allows TWL's 32kHz oscillator to go in low-power mode when main battery voltage is running low. Signed-off-by: Ilkka Koskinen <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Allow platforms to specify an IRQ base for WM8350Mark Brown1-0/+2
This is currently unused by the wm8350 drivers but getting it merged now will reduce merge issues in the future when implementing wm8350 genirq support. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Fix more undefined twl4030-power resconfig value checksAmit Kucheria1-2/+2
Based on Aaro's previous fix, this needs to be fixed for the newly added remap_off and remap_sleep resources as well. The code tries to skip values initialized with -1, but since the values are unsigned the comparison is always true. The patch eliminates the following compiler warnings: drivers/mfd/twl4030-power.c: In function 'twl4030_configure_resource': drivers/mfd/twl4030-power.c:338: warning: comparison is always true due to limited range of data type Signed-off-by: Amit Kucheria <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Optimised twl4030-power power scripts for the rx51Amit Kucheria1-36/+82
The power scripts optimisation was mainly done by: Tero Kristo <[email protected]> and Arnaud Mandy <[email protected]> I'm only refactoring and testing it against the mainline kernel. Signed-off-by: Amit Kucheria <[email protected]> Cc: Tero Kristo <[email protected]> Cc: [email protected] Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Cleanup pcf50633_probe error handlingLars-Peter Clausen1-17/+26
Currently the child devices were not freed if the irq could not be requested. This patch restructures the function, that in case of an error all previously allocated resources are freed. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Staticise __adp5520_ack_bits()Mark Brown1-1/+2
The function is not exported as the __ indicates. __ Signed-off-by: Mark Brown <[email protected]> Acked-by: Michael Hennerich <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: fix undefined twl4030-power resconfig value checksAaro Koskinen2-3/+4
The code tries to skip values initialized with -1, but since the values are unsigned the comparison is always true. The patch eliminates the following compiler warnings: drivers/mfd/twl4030-power.c: In function 'twl4030_configure_resource': drivers/mfd/twl4030-power.c:338: warning: comparison is always true due to limited range of data type drivers/mfd/twl4030-power.c:358: warning: comparison is always true due to limited range of data type drivers/mfd/twl4030-power.c:363: warning: comparison is always true due to limited range of data type Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Add support for remapping twl4030-power power statesAmit Kucheria2-0/+39
The <RESOURCE>_REMAP register allows configuration of the <RESOURCE> in case of a sleep or off transition. Allow this property of resources to be configured (through twl4030_resconfig) and add code to parse these values to program the registers accordingly. Signed-off-by: Amit Kucheria <[email protected]> Cc: [email protected] Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Add comments for the twl4030-power register and bit layoutAmit Kucheria1-2/+10
Describe how the resource registers are laid out and the various bit-fields in them. Signed-off-by: Amit Kucheria <[email protected]> Cc: [email protected] Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: twl4030-power: Rename DEVGROUP to DEV_GRPAmit Kucheria1-8/+8
Stick to the names used in the reference manual Signed-off-by: Amit Kucheria <[email protected]> Cc: [email protected] Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Fix pcf50633-regulator drvdata usageLars-Peter Clausen2-2/+4
Currently the pcf50633-regulator driver data is set to the pcf50633 core structure, but the pcf50633-regulator remove handler assumes that it is set to the regulator device. This patch fixes the issue by accessing the pcf506533 core structure through its parent device and setting the driver data to the regulator device. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Use platform_device_add_data to set pcf50633 regulator platform dataLars-Peter Clausen1-1/+2
Platform devices allocated with platform_device_alloc should use platform_device_add_data to set the platform data, because kfree will be called on the platform_data when the device is released. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Fix memleak in pcf50633_client_dev_registerLars-Peter Clausen6-28/+12
Since platform_device_add_data copies the passed data, the allocated subdev_pdata is never freed. A simple fix would be to either free subdev_pdata or put it onto the stack. But since the pcf50633 child devices can rely on beeing children of the pcf50633 core device it's much more elegant to get access to pcf50633 core structure through that link. This allows to get completly rid of pcf5033_subdev_pdata. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Move pcf50633 messages to appropriate log levelsArnaud Patard1-2/+2
IRQs masking/unmasking should be less verbose. Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Make pcf50633 suspend/resume belong to i2c_driverLars-Peter Clausen1-6/+6
When not using the i2c suspend/resume callbacks the i2c client resumed before the i2c master. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Disable unnecessary pcf50633 shutdown on lowsysPaul Fertser1-0/+3
On gta02 hardware revision A5 it can actually bring the system down during normal operating conditions so we disable it. Signed-off-by: Paul Fertser <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Convert WM835x IRQ handling to use a data tableMark Brown2-648/+387
Rather than open coding individual IRQs in each function which manipulates them store data for IRQs in a table which is then referenced in the users. This is a substantial code shrink and should be a performance win in cases where only a single IRQ goes off at once since instead of reading four of the second level IRQ registers for each interrupt we read only the sub-registers which have had an interrupt flagged. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Split wm8350 IRQ code into a separate fileMark Brown4-763/+815
In preparation for refactoring - it's over 700 lines of well-isolated code and having it in a file by itself makes things more managable. While we're at it make sure that we clean up the IRQ if we fail after acquiring it on init. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13input/keyboard: new driver for ADP5520 MFD PMICsMichael Hennerich3-0/+231
Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Bryan Wu <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2009-12-13mfd: Add ADP5520/ADP5501 driverMichael Hennerich4-0/+688
Base driver for Analog Devices ADP5520/ADP5501 MFD PMICs Subdevs: LCD Backlight : drivers/video/backlight/adp5520_bl.c LEDs : drivers/led/leds-adp5520.c GPIO : drivers/gpio/adp5520-gpio.c (ADP5520 only) Keys : drivers/input/keyboard/adp5520-keys.c (ADP5520 only) Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Bryan Wu <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>