summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-06-18mfd: arizona: Integrate wm8997 into Arizona mfdCharles Keepax8-0/+1582
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform. This patch integrates the wm8997 into the Arizona mfd. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: wm8994: Reset device during probeMark Brown1-0/+11
Ensure that the device is in a known good state. This should have little practical impact as the runtime PM will reset the device shortly after probe but it's neater. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-17mfd: palmas: Remove code which is not necessary for a device tree bootJ Keerthy1-106/+0
Remove code which is not necessary for a device tree boot. Boot tested on OMAP5-UEVM board. Signed-off-by: J Keerthy <j-keerthy@ti.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13Merge tag 'am335x_tsc-adc' of git://breakpoint.cc/bigeasy/linuxSamuel Ortiz9-194/+486
A complete refurbished series inclunding: - DT support for the MFD, TSC and ADC driver & platform device support, which has no users, has been killed. - iio_map from last series is gone and replaced by proper nodes in the device tree. - suspend fixes which means correct data structs are taken and no interrupt storm - fifo split which should problem with TSC & ADC beeing used at the same time - The ADC channels are now checked before blindly applied. That means the touch part reads X, Y and Z coordinates and does not mix them up. Same goes for the IIO ADC driver. - The IIO ADC driver now creates files named in_voltageX_raw where X represents the ADC line instead of a number starting at 0. A read from this file can return -EBUSY in case touch is busy and the ADC didn't collect a value.
2013-06-13mfd: 88pm860x: Convert to managed resources for allocating memoryLee Jones1-3/+2
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: max8925: Convert to managed resources for allocating memoryLee Jones1-2/+2
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: max77686: Convert to managed resources for allocating memoryLee Jones1-17/+8
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: janz-cmodio: Convert to managed resources for allocating memoryLee Jones1-8/+4
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-pasic3: Convert to managed resources for allocating memoryLee Jones1-3/+1
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-i2cpld: Convert to managed resources for allocating memoryLee Jones1-10/+5
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-egpio: Convert to managed resources for allocating memoryLee Jones1-5/+4
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: davinci_voicecodec: Convert to managed resources for allocating memoryLee Jones1-7/+3
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: cros_ec: Convert to managed resources for allocating memoryLee Jones1-19/+9
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: asic3: Convert to managed resources for allocating memoryLee Jones1-10/+4
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: adp5520: Convert to managed resources for allocating memoryLee Jones1-6/+2
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: abx500-core: Convert to managed resources for allocating memoryLee Jones1-6/+4
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab8500-gpadc: Convert to managed resources for allocating memoryLee Jones1-5/+1
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab8500-debug: Convert to managed resources for allocating memoryLee Jones1-22/+12
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab3100-otp: Convert to managed resources for allocating memoryLee Jones1-9/+5
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: tps65912: Convert to managed resources for allocating memoryLee Jones3-4/+4
Saves on code and simplifies the driver, as these resources are now tracked and freed automatically when the driver is realised. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13Merge branch 'for-mfd-next' of ↵Samuel Ortiz7-46/+77
git://git.linaro.org/people/ljones/linux-3.0-ux500
2013-06-13mfd: 88pm860x: Use devm_regmap_init_i2c()Sachin Kamat1-2/+1
devm_regmap_init_i2c() is device managed and makes cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add AB8500 external regulators as MFD devicesLee Jones1-0/+10
The AB8500 external regulator driver is now a device in its own right, so it requires registering and probing in the normal way. This patch will ensure the driver is probed once registered for all devices which support them. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: dbx500-prcmu: Use correct names for clock management registersLee Jones1-2/+2
... as stipulated by the Hardware Specification document. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: Replace strict_strtoul() with kstrtoul() in ab* and att*Jingoo Han3-21/+14
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add of_compatible property for ab8500-codecFabio Baltieri1-0/+1
Add of_compatible string to the ab8500-codec cell to allow the driver to grab handlers such as regulators from device-tree when available. Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add device for new RTC version for AB8540 cut2Alexandre Torgue2-8/+49
AB8540 RTC have changed between AB8540_cut1 and AB8540_cut2.Different ressources to define for those two version. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Julien Delacou <julien.delacou@stericsson.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Drop references to ab8500-ledsLee Jones1-13/+0
The ab8500-leds driver has never been upstreamed and was replaced by a PWM framework based driver, so these references are not needed anymore. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13Merge tag 'mfd-arizona-v3.10-rc2' of ↵Samuel Ortiz9-38/+305
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc mfd: arizona: Updates for v3.10 A bunch of enhancements and fixes for the arizona devices, adding a few new features (the main one being device tree) and improving robustness.
2013-06-12iio: ti_am335x_adc: check if we found the valueSebastian Andrzej Siewior1-2/+6
Usually we get all the values we wanted but it is possible, that te ADC unit is busy performing the conversation for the HW events. In that case -EBUSY is returned and the user may re-call the function. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12iio: ti_am335x_adc: Allow to specify input lineSebastian Andrzej Siewior3-23/+56
The TSC part allows to specify the input lines. The IIO part assumes that it usues always the last few, that means if IIO has adc-channels set to 2 it will use channel 6 and 7. However it might make sense to use only 6. This patch changes the device property (which was introduced recently and was never in an official release) in a way that the user can specify which of the AIN lines should be used. In Addition to this, the name is now AINx where x is the channel number i.e. for AIN6 we would have 6. Prior this, it always started counting at 0 which is confusing. In addition to this, it also checks for correct step number during reading and does not rely on proper FIFO depth. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for usSebastian Andrzej Siewior1-4/+6
The previous patch ("input/ti_am335x_tsc: ACK the HW_PEN irq in ISR") acked the interrupt so we don't freeze if we don't handle an enabled interrupt source. The interrupt core has a mechanism for this and to get it work one should only say that it handled an interrupt if it is actually the case. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_tsc: ACK the HW_PEN irq in ISRSebastian Andrzej Siewior1-0/+6
The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to be used as a wake up source. Once this interrupt source is unmaksed, the devices ends up in ISR and never continues. This change ACKs the interrupt and disables it so the system does not freeze. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_adc: use only FIFO0 and clean up a littleSebastian Andrzej Siewior3-40/+44
The driver programs a threshold of "coordinate_readouts" say 5. The REG_FIFO0THR registers says it should it be programmed to "threshold minus one". The driver does not expect just 5 coordinates but 5 * 2 + 2. Multiplied by two because 5 for X and 5 for Y and plus 2 because we have two Z. The whole thing kind of works because It reads the 5 coordinates for X and Y from FIFO0 and FIFO1 and the last element in each FIFO is ignored within the loop and read later. Nothing guaranties that FIFO1 is ready by the time it is read. In fact I could see that that FIFO1 reaturns for Y channels 8,9, 10, 12, 6 and for Y channel 7 for Z. The problem is that channel 7 and channel 12 got somehow mixed up. The other Problem is that FIFO1 is also used by the IIO part leading to wrong results if both (tsc & adc) are used. The patch tries to clean up the whole thing a little: - Remove the +1 and -1 in REG_STEPCONFIG, REG_STEPDELAY and its counter part in the for loop. This is just confusing. - Use only FIFO0 in TSC. The fifo has space for 64 entries so should be fine. - Read the whole FIFO in one function and check the channel. - in case we dawdle around, make sure we only read a multiple of our coordinate set. On the second interrupt we will cleanup the remaining enties. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: iio: ti_am335x_adc: rename device from tiadc to TI-am335x-adcSebastian Andrzej Siewior2-3/+2
TI-adc reads a little better compared to tiadc. And if we add am335x to it then we have the same naming scheme as the tsc side. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: input: ti_am335x_tsc: rename device from tsc to TI-am335x-tscSebastian Andrzej Siewior2-2/+2
tsc is a very generic name. This patch adds a TI and HW prefix to it less generic. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: mfd: ti_am335x_tsc remove remaining platform data piecesSebastian Andrzej Siewior3-54/+0
The two header files removed here are unused and have no users as this platform was never used with platform devices. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12arm: am33xx: add TSC/ADC mfd device supportPatil, Rachna2-0/+32
Add support for core multifunctional device along with its clients touchscreen and ADC. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2013-06-12mfd: ti_tscadc: deal with partial activationPantelis Antoniou2-18/+28
Fix the mfd device in the case where a subdevice might not be activated. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12iio: ti_tscadc: provide datasheet_name and scan_typePantelis Antoniou1-5/+24
This patch provides the members "datasheet_name" and scan_type. This is the remaining part of the earlier patch where I (bigeasy) removed iio_map because it is now supplied by the device tree. It also static names as suggested by Jonathan. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: ti_am335x_tscadc: remove platform_data supportSebastian Andrzej Siewior1-17/+6
This patch removes access to platform data mfd_tscadc_board because the platform is DT only. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: ti_am335x_tscadc: Add DT supportPatil, Rachna1-6/+26
Add DT support in the MFD core driver. The node name is "am3359" because it was tested on this platform. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12iio: ti_am335x_adc: remove platform_data supportSebastian Andrzej Siewior1-14/+7
This patch removes access to platform data mfd_tscadc_board because the platform is DT only. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12iio: ti_am335x_adc: Add DT supportPatil, Rachna2-5/+25
Add DT support for client ADC driver. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am33x_tsc: remove platform_data supportSebastian Andrzej Siewior1-24/+1
This patch removes access to platform data mfd_tscadc_board because the platform is DT only. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am33x_tsc: Add DT supportPatil, Rachna3-23/+127
This patch adds DT support to touch driver. It also provides a binding document which is used by the MFD and IIO part of the device. This patch also renames steps_to_configure to coordinate_readouts because the original name misleads the purpose of the variable. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am33x_tsc: remove unwanted fifo flushPatil, Rachna1-10/+0
When touchscreen and ADC are used together, this unwanted fifo flush leads to loss of ADC data. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am33x_tsc: Order of TSC wires, made configurablePatil, Rachna3-19/+98
The current driver expected touchscreen input wires(XP,XN,YP,YN) to be connected in a particular order. Making changes to accept this as platform data. Sebastian reworked the original patch and removed a lot of the not required pieces. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am33x_tsc: Step enable bits made configurablePatil, Rachna4-7/+62
Current code has hard coded value written to step enable bits. Now the bits are updated based on how many steps are needed to be configured got from platform data. The user needs to take care not to exceed the count more than 16. While using ADC and TSC one should take care to set this parameter correctly. Sebastian added the common lock and moved the code, that manipulates the steps, from into the mfd module. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_devSebastian Andrzej Siewior4-13/+23
The mfd driver creates platform data for the child devices and it is the ti_tscadc_dev struct. This struct is copied for the two devices. The copy of the structure makes a common lock in this structure a little less usefull. Therefore the platform data is not a pointer to the structure and the same structure is used. While doing the change I noticed that the suspend/resume code assumes the wrong pointer for ti_tscadc_dev and this has been fixed as well. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>