summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mfd: 88pm800: Enhance error handling for sub pages probe/removeChao Xie2013-06-181-33/+48
| | | | | | | | | | pm800_pages_init and pm800_pages_exit are called by pm800_probe. Change the code to enhance error handling and remove unused code at pm800_pages_init/exit and pm800_probe. Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm800: Remove the power and gpadc page addr from platform dataChao Xie2013-06-181-2/+3
| | | | | | | | | | 88pm800 has two addtional pages - power and gpadc. The address of the pages depends on the address of 88pm800. So do not need pass the address of the power and gpadc in platform data. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm800: 88pm805: Remove "IRQF_TRIGGER_FALLING" flagYi Zhang2013-06-182-2/+2
| | | | | | | | | | | 88pm800/88pm805 interrupt is asserted low if the events happened. So remove IRQF_TRIGGER_FALLING for irq request. Also, the interrupt wiring is board dependent so do not set IRQF_TRIGGER by default. Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm800: Initialize mask_invertChao Xie2013-06-181-0/+1
| | | | | | | mask_invert must be set otherwise interrupts cannot be cleared. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm80x: Fix driver name for 88pm800 and 88pm805Chao Xie2013-06-182-2/+2
| | | | | | | 88pm800 and 88pm805 shouldnot have the same driver name. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: 88pm800: Fix NULL pointer dereferenceYi Zhang2013-06-181-8/+10
| | | | | | | | | | Move "device_800_init" to fix NULL pointer error when calling "device_gpadc_init" as it needs "subchip->regmap_gpadc" to set registers via regmap interface Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: arizona: Integrate wm8997 into Arizona mfdCharles Keepax2013-06-187-0/+1580
| | | | | | | | | | | 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>
* mfd: wm8994: Reset device during probeMark Brown2013-06-181-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>
* mfd: palmas: Remove code which is not necessary for a device tree bootJ Keerthy2013-06-171-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>
* Merge tag 'am335x_tsc-adc' of git://breakpoint.cc/bigeasy/linuxSamuel Ortiz2013-06-133-140/+392
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * iio: ti_am335x_adc: check if we found the valueSebastian Andrzej Siewior2013-06-121-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>
| * iio: ti_am335x_adc: Allow to specify input lineSebastian Andrzej Siewior2013-06-122-22/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for usSebastian Andrzej Siewior2013-06-121-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>
| * input: ti_am335x_tsc: ACK the HW_PEN irq in ISRSebastian Andrzej Siewior2013-06-121-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>
| * input: ti_am335x_adc: use only FIFO0 and clean up a littleSebastian Andrzej Siewior2013-06-122-38/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mfd: iio: ti_am335x_adc: rename device from tiadc to TI-am335x-adcSebastian Andrzej Siewior2013-06-122-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>
| * mfd: input: ti_am335x_tsc: rename device from tsc to TI-am335x-tscSebastian Andrzej Siewior2013-06-122-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>
| * mfd: ti_tscadc: deal with partial activationPantelis Antoniou2013-06-121-13/+25
| | | | | | | | | | | | | | | | 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>
| * iio: ti_tscadc: provide datasheet_name and scan_typePantelis Antoniou2013-06-121-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>
| * mfd: ti_am335x_tscadc: remove platform_data supportSebastian Andrzej Siewior2013-06-121-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>
| * mfd: ti_am335x_tscadc: Add DT supportPatil, Rachna2013-06-121-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>
| * iio: ti_am335x_adc: remove platform_data supportSebastian Andrzej Siewior2013-06-121-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>
| * iio: ti_am335x_adc: Add DT supportPatil, Rachna2013-06-122-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>
| * input: ti_am33x_tsc: remove platform_data supportSebastian Andrzej Siewior2013-06-121-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>
| * input: ti_am33x_tsc: Add DT supportPatil, Rachna2013-06-122-23/+83
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * input: ti_am33x_tsc: remove unwanted fifo flushPatil, Rachna2013-06-121-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>
| * input: ti_am33x_tsc: Order of TSC wires, made configurablePatil, Rachna2013-06-121-16/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * input: ti_am33x_tsc: Step enable bits made configurablePatil, Rachna2013-06-123-5/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_devSebastian Andrzej Siewior2013-06-123-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | mfd: 88pm860x: Convert to managed resources for allocating memoryLee Jones2013-06-131-3/+2
| | | | | | | | Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: max8925: Convert to managed resources for allocating memoryLee Jones2013-06-131-2/+2
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: max77686: Convert to managed resources for allocating memoryLee Jones2013-06-131-17/+8
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: janz-cmodio: Convert to managed resources for allocating memoryLee Jones2013-06-131-8/+4
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: htc-pasic3: Convert to managed resources for allocating memoryLee Jones2013-06-131-3/+1
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: htc-i2cpld: Convert to managed resources for allocating memoryLee Jones2013-06-131-10/+5
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: htc-egpio: Convert to managed resources for allocating memoryLee Jones2013-06-131-5/+4
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: davinci_voicecodec: Convert to managed resources for allocating memoryLee Jones2013-06-131-7/+3
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: cros_ec: Convert to managed resources for allocating memoryLee Jones2013-06-131-19/+9
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: asic3: Convert to managed resources for allocating memoryLee Jones2013-06-131-10/+4
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: adp5520: Convert to managed resources for allocating memoryLee Jones2013-06-131-6/+2
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: abx500-core: Convert to managed resources for allocating memoryLee Jones2013-06-131-6/+4
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: ab8500-gpadc: Convert to managed resources for allocating memoryLee Jones2013-06-131-5/+1
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: ab8500-debug: Convert to managed resources for allocating memoryLee Jones2013-06-131-22/+12
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: ab3100-otp: Convert to managed resources for allocating memoryLee Jones2013-06-131-9/+5
| | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* | mfd: tps65912: Convert to managed resources for allocating memoryLee Jones2013-06-133-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>
* | Merge branch 'for-mfd-next' of ↵Samuel Ortiz2013-06-136-46/+75
|\ \ | | | | | | | | | git://git.linaro.org/people/ljones/linux-3.0-ux500
| * | mfd: 88pm860x: Use devm_regmap_init_i2c()Sachin Kamat2013-06-131-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>
| * | mfd: ab8500-core: Add AB8500 external regulators as MFD devicesLee Jones2013-06-131-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>
| * | mfd: dbx500-prcmu: Use correct names for clock management registersLee Jones2013-06-131-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>
| * | mfd: Replace strict_strtoul() with kstrtoul() in ab* and att*Jingoo Han2013-06-133-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>