aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23mfd: Push byte swap out of WM8994 bulk I/OMark Brown1-4/+6
For bulk I/O it is both convenient and more sensible to pre-swap the data rather than doing the swap as part of the I/O operation so move the byte swaps we're currently doing into the core write function into the register based functions, giving the bulk write function a straight pass through to the chip. This leaves reads inconsistent, this will be addressed as a followup patch. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Avoid copying data in WM8994 I2C writeMark Brown1-9/+13
As well as providing a trivial performance optimisation this also avoids allocating a copy of the message on the stack which is beneficial when doing large transfers. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Remove copy from WM831x I2C write functionMark Brown1-5/+13
This saves us allocating an array on the stack, giving a meaningless performance improvement and ensuring that if drivers ever do large writes we'll not allocate large arrays on the stack. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Staticise WM8994 PM opsMark Brown1-1/+2
They're not exported. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23regulator: Add a subdriver for TI TPS6105x regulator portions v2Linus Walleij5-1/+214
This adds a subdriver for the regulator found inside the TPS61050 and TPS61052 chips. Cc: Samuel Ortiz <[email protected]> Cc: Ola Lilja <[email protected]> Cc: Jonas Aberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add a core driver for TI TPS61050/TPS61052 chips v2Linus Walleij4-0/+351
The TPS61050/TPS61052 are boost converters, LED drivers, LED flash drivers and a simple GPIO pin chips. Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Cc: Jonas Aberg <[email protected]> Cc: Ola Lilja <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23gpio: Add Tunnel Creek support to sch_gpioDenis Turischev2-20/+44
Almost the same driver for both Poulsbo and Tunnel Creek. The difference is in quantity of GPIOs powered by the core power rail and by suspend power supply, default values for some GPIOs, etc. Detect actual hardware by platform device ID assigned in lpc_sch and set configuration accordingly. Signed-off-by: Denis Turischev <[email protected]> Acked-by: Grant Likely <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add Tunnel Creek support to lpc_schDenis Turischev1-1/+6
Intel Poulsbo SCH and Tunnel Creek provide almost the same LPC interface. Use the same driver for both devices while storing PCI ID to distinguish between platforms to apply plarform related quirks. Signed-off-by: Denis Turischev <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23pci_ids: Add Intel Tunnel Creek LPC Bridge device ID.Denis Turischev1-0/+1
Signed-off-by: Denis Turischev <[email protected]> Acked-by: Jesse Barnes <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23regulator: MAX8997/8966 supportMyungJoo Ham4-1/+1250
This patch supports PMIC/Regulator part of MAX8997/MAX8966 MFD. In this initial release, selecting voltages or current-limit and switching on/off the regulators are supported. Controlling voltages for DVS with GPIOs is not implemented fully and requires more considerations: it controls multiple bucks (selection of 1, 2, and 5) at the same time with SET1~3 gpios. Thus, when DVS-GPIO is activated, we lose the ability to control the voltage of a single buck regulator independently; i.e., contolling a buck affects other two bucks. Therefore, using the conventional regulator framework directly might be problematic. However, in this driver, we try to choose a setting without such side effect of affecting other regulators and then try to choose a setting with the minimum side effect (the sum of voltage changes in other regulators). On the other hand, controlling all the three bucks simultenously based on the voltage set table may help build cpufreq and similar system more robust; i.e., all the three voltages are consistent every time without glitches during transition. Signed-off-by: MyungJoo Ham <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add WM8994 bulk register write operationMark Brown2-0/+25
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Append additional read write on 88pm860xHaojian Zhuang2-0/+111
Append the additional read/write operation on 88pm860x for accessing test page in 88PM860x. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Adopt mfd_data in 88pm860x input driverHaojian Zhuang2-126/+127
Copy 88pm860x platform data into different mfd_data structure for onkey/touch/codec/power driver. So move the identification of device node from those drivers to mfd driver. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Adopt mfd_data in 88pm860x regulatorHaojian Zhuang3-86/+132
Copy 88pm860x platform data into different mfd_data structure for regulator driver. So move the identification of device node from regulator driver to mfd driver. Signed-off-by: Haojian Zhuang <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Adopt mfd_data in 88pm860x ledHaojian Zhuang3-93/+79
Copy 88pm860x platform data into different mfd_data structure for led driver. So move the identification of device node from led driver to mfd driver. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Adopt mfd_data in 88pm860x backlightHaojian Zhuang3-72/+60
Copy 88pm860x platform data into different mfd_data structure for backlight driver. So move the identification of device node from backlight driver to mfd driver. Signed-off-by: Haojian Zhuang <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Fix MAX8997 Kconfig entry typosRandy Dunlap1-1/+1
Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add "platform:" prefix for twl4030-madc platform modaliasAxel Lin1-1/+1
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Fix ab8500-gpadc to measure charger currentKarl Komierowski1-3/+18
The GPADC in the AB8500 was incorrectly configured when a charger current channel was selected. Signed-off-by: Karl Komierowski <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Calibrate ab8500 gpadc using OTP valuesJohan Palsson1-5/+281
The GPADC found in the AB8500 needs to be calibrated to work properly. This is done by writing a number of special OTP (one-time-programmable) registers at production. This patch makes sure that these values are used to calibrate the returned value from the GPADC so that it is correct. Signed-off-by: Johan Palsson <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Free dangling irq in ab8500 gpadc probe error pathDaniel Willerud1-1/+3
Signed-off-by: Daniel Willerud <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Reentrance and revamp ab8500 gpadc fetching interfaceDaniel Willerud2-46/+75
This revamps the interface so that AB8500 GPADCs are fetched by name. Probed GPADCs are added to a list and this list is searched for a matching GPADC. This makes it possible to have multiple AB8500 GPADC instances instead of it being a singleton, and rids the need to keep a GPADC pointer around in the core AB8500 MFD struct. Currently the match is made to the device name which is by default numbered from the device instance such as "ab8500-gpadc.0" but by using the .init_name field of the device a more intiutive naming for the GPADC blocks can be achieved if desired. Signed-off-by: Daniel Willerud <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Move ab8500 gpadc header to subdirDaniel Willerud2-12/+12
This moves the ab8500-gpadc.h header down into the ab8500/ subdir in include/linux/mfd and fixes some whitespace in the header in the process. Signed-off-by: Daniel Willerud <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: MAX8997/8966 supportMyungJoo Ham5-0/+875
MAX8997/MAX8966 chip is a multi-function device with I2C bussses. The chip includes PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and Battery (charging) control. This patch is an initial release of a MAX8997/8966 driver that supports to enable the chip with its primary I2C bus that connects every device mentioned above except for Fuel Gauge, which uses another I2C bus. The fuel gauge is not supported by this mfd driver and is supported by a seperated driver of MAX17042 Fuel Gauge (yes, the fuel gauge part is compatible with MAX17042). Signed-off-by: MyungJoo Ham <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Rename mfd_shared_cell_{en,dis}able to drop the "shared" partAndres Salomon3-8/+8
As requested by Samuel, there's not really any reason to have "shared" in the name. This also modifies the only user of the function, as well. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23w1: Silence ds1wm warnings related to mfd_get_cell changesAndres Salomon1-7/+2
mfd_get_cell returns a const, so change the ds1wm client to store a const mfd cell. This silences type mismatch warnings. Since we're guaranteed to have the mfd_cell, we can also simplify the code a bit to get rid of a temporary variable and NULL check. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: ab8500-core switch off status addedMattias Wallin1-0/+47
This patch adds a sysfs file with the ab8500 switch off status. The switch off status contains information of what caused the ab8500 chip to power off. A print during boot is also added. Signed-off-by: Mattias Wallin <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: ab8500 chip revision 3.0 supportMattias Wallin2-6/+7
This patch adds support for ab8500 chip revision cut 3.0. Also rephrased from Changes to Author in the header. Signed-off-by: Mattias Wallin <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23jz4740: silence warnings related to mfd_get_cell changesAndres Salomon2-2/+2
mfd_get_cell returns a const, so change the jz4740 clients to store a const mfd cell. This silences type mismatch warnings. Signed-off-by: Andres Salomon <[email protected]> Acked-by: Anton Vorontsov <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23tmio: Silence warnings introduced by mfd changesAndres Salomon4-18/+17
This silences warnings such as drivers/video/tmiofb.c: In function 'tmiofb_hw_init': drivers/video/tmiofb.c:270: warning: initialization discards qualifiers from pointer target type These were added by me in commit 2a79bb1d. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add platform data to support multiple WM831x devices per boardMark Brown1-0/+3
If a system contains multiple WM831x devices we need to pass a device number through to the MFD so that we use unique device IDs when we instantiate child devices. In order to get support for this into 2.6.39 add some platform data to support the configuration, but no implementation as yet. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Convert WM8994/58 interrupt masking to enable/disable operationsMark Brown1-4/+4
The WM8994/58 interrupt masking support is a much better match for the genirq enable and disable operations than for the mask and unmask operations. The latter are intended to used during interrupt handling for temporary changes which isn't really practical on a slow bus. Convert the operations over to match this. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Convert WM831x interrupt masking to enable/disable operationsMark Brown1-4/+8
The WM831x interrupt masking support is a much better match for the genirq enable and disable operations than for the mask and unmask operations. The latter are intended to used during interrupt handling for temporary changes which isn't really practical on a slow bus. Convert the operations over to match this. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23hwmon: twl4030: Hwmon Driver for TWL4030 MADCKeerthy4-0/+213
This driver exposes the sysfs nodes of the TWL4030 MADC module. All the voltage channel values are expressed in terms of mV. Channel 13 and channel 14 are reserved. There are channels which represent temperature and current the output is represented by celcius and mA respectively. Signed-off-by: Keerthy <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add twl4030 madc driverKeerthy4-0/+954
Introducing a driver for MADC on TWL4030 powerIC. MADC stands for monitoring ADC. This driver monitors the real time conversion of analog signals like battery temperature, battery cuurent etc. Signed-off-by: Keerthy <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add MODULE_DEVICE_TABLE to vx855Axel Lin1-0/+1
The device table is required to load modules based on modaliases. After adding the MODULE_DEVICE_TABLE, below entries will be added to modules.pcimap: vx855 0x00001106 0x00008409 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 Signed-off-by: Axel Lin <[email protected]> Acked-by: Harald Welte <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add MODULE_DEVICE_TABLE to pcf50633-coreAxel Lin1-0/+1
The device table is required to load modules based on modaliases. After adding the MODULE_DEVICE_TABLE, below entries will be added to modules.alias: alias i2c:pcf50633 pcf50633 Signed-off-by: Axel Lin <[email protected]> Acked-by: Harald Welte <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add MODULE_DEVICE_TABLE to mc13xxx-coreAxel Lin1-0/+1
The device table is required to load modules based on modaliases. After adding the MODULE_DEVICE_TABLE, below entries will be added to modules.alias: alias spi:mc13892 mc13xxx_core alias spi:mc13783 mc13xxx_core Signed-off-by: Axel Lin <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add sharing for cs5535 acpi/pms cellsAndres Salomon2-22/+57
This enables sharing of cs5535-mfd cells via the new mfd_shared_* API. Hooks for enable/disble of resources are added, with refcounting of resources being automatically handled so that cs5535_mfd_res_enable/disable are only called when necessary. Clients of cs5535-mfd (in this case, olpc-xo1.c) are also modified to use the mfd_shared API. The platform drivers are also renamed to olpc-xo1-{pms,acpi}, and resource enabling/disabling is replaced with mfd_shared API calls. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: add platform_device sharing support for mfdAndres Salomon2-0/+70
This adds functions to enable platform_device sharing for mfd clients. Each platform driver (mfd client) that wants to share an mfd_cell's platform_device uses the mfd_shared_platform_driver_{un,}register() functions instead of platform_driver_{un,}register(). Along with registering the platform driver, these also register a new platform device with the same characteristics as the original cell, but a different name. Given an mfd_cell with the name "foo", drivers that want to share access to its resources can call mfd_shared_platform_driver_register with platform drivers named (for example) "bar" and "baz". This will register two platform devices and drivers named "bar" and "baz" that share the same cell as the platform device "foo". The drivers can then call "foo" cell's enable hooks (or mfd_shared_cell_enable) to enable resources, and obtain platform resources as they normally would. This deals with platform handling only; mfd driver-specific details, hardware handling, refcounting, etc are all dealt with separately. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Add refcounting support to mfd_cellsAndres Salomon2-5/+73
This provides convenience functions for sharing of cells across multiple mfd clients. Mfd drivers can provide enable/disable hooks to actually tweak the hardware, and clients can call mfd_shared_cell_{en,dis}able without having to worry about whether or not another client happens to have enabled or disabled the cell/hardware. Note that this is purely optional; drivers can continue to use the mfd_cell's enable/disable hooks for their own purposes, if desired. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Remove driver_data field from mfd_cellAndres Salomon2-4/+0
All users of this have now been switched over to using mfd_data; it can go away now. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23rdc321x-southbridge: Use mfd_data instead of driver_dataAndres Salomon3-4/+6
Use mfd_data for passing information from mfd drivers to soc clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23fb: Use mfd_data instead of driver_data for tmio-fbAndres Salomon2-9/+8
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes tmio-fb only; mfd drivers with other cells are not modified. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mtd: Use mfd_data instead of driver_data for tmio_nandAndres Salomon3-4/+3
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes tmio-nand only; mfd drivers with other cells are not modified. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mmc: Use mfd_data instead of driver_data for tmio-mmcAndres Salomon6-22/+14
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes tmio-mmc only; mfd drivers with other cells are not modified. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23w1: Use mfd_data instead of driver_data for dsw1wm.cAndres Salomon3-5/+4
Use mfd_data for passing information from mfd drivers to mfd clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). This changes ds1wm only; mfd drivers with other cells are not modified, with the exception of led_cell. The led_cell.driver_data line is dropped from htc-pasic3.c in this patch as well. It's not used in mainline (there's no leds-pasic3 platform driver), so it should be safe to take care of that here. Signed-off-by: Andres Salomon <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23asoc: wm8400-codec: Use mfd_data instead of driver_dataAndres Salomon2-2/+3
Use mfd_data for passing information from mfd drivers to soc clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). Signed-off-by: Andres Salomon <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23asoc: davinci_voicecodec: use mfd_data instead of driver_dataAndres Salomon3-4/+5
Use mfd_data for passing information from mfd drivers to soc clients. The mfd_cell's driver_data field is being phased out. Clients that were using driver_data now access .mfd_data via mfd_get_data(). Signed-off-by: Andres Salomon <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
2011-03-23mfd: Rename platform_data field of mfd_cell to mfd_dataAndres Salomon8-39/+39
Rename the platform_data variable to imply a distinction between common platform_data driver usage (typically accessed via pdev->dev.platform_data) and the way MFD passes data down to clients (using a wrapper named mfd_get_data). All clients have already been changed to use the wrapper function, so this can be a quick single-commit change that only touches things in drivers/mfd. Signed-off-by: Andres Salomon <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>