summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps65910.c
AgeCommit message (Collapse)Author
2017-06-15regulator: tps65910: wire up sleep control configurationMichał Mirosław
This enables configuring the PMIC's sleep mode via device-tree. A pointer indirection to sleep mode data is removed, as it simplifies the implementation slightly. In current kernel tree, platform data structure is not used outside MFD cell drivers. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09mfd: tps65910: Use devm_mfd_add_devices and devm_regmap_add_irq_chipLaxman Dewangan
Use devm_mfd_add_devices() for adding MFD child devices and devm_regmap_add_irq_chip() for IRQ chip registration. This reduces the error code path and .remove callback for removing MFD child devices and deleting IRQ chip data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-04-19mfd: tps65910: Use devm_mfd_add_devices() for mfd_device registrationLaxman Dewangan
Use devm_mfd_add_devices() for MFD devices registration and remove the call of mfd_remove_devices() from .remove callback to remove MFD child-devices. This is done by managed device framework. CC: Tony Lindgren <tony@atomide.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-11mfd: Drop owner assignment from i2c_driversKrzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26mfd: tps65910: Work around silicon erratum SWCZ010Arnout Vandecappelle (Essensium/Mind)
http://www.ti.com/lit/pdf/SWCZ010: Glitch on SDA-SCL not managed correctly by the I2C IP Impact: The standard specifies that the I2C transfer should restart on a start event in all cases. The current design does not support two consecutive Start conditions. This can cause the first real access after such a glitch to be corrupted. Description: An unexpected glitch on SDA and SCL can generate a wrong start event. In the current design, the SCL line must toggle two times to detect a new start event and completely restart the I2C access; hence the real start event is not detected in the case of a single SCL toggle. Workaround: Repeat I2C access. A simpler workaround is to make a dummy transfer just before the first access to the tps65910 chip. This can be done unconditionally. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-09mfd: tps65910: Rid data size incompatibility warn when building for 64bitLee Jones
Extinguishes: ../drivers/mfd/tps65910.c: In function ‘tps65910_parse_dt’: ../drivers/mfd/tps65910.c:404:14: warning: cast from pointer to integer of different size Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-06-03mfd: tps65910: Make of_device_id array constJingoo Han
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: tps65910: Fix regmap_irq_chip_data leak on mfd_add_devices failKrzysztof Kozlowski
The tps65910_i2c_probe() allocates regmap_irq_chip in tps65910_irq_init() but it does not clean this up in case of mfd_add_devices() failure. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: tps65910: Fix possible invalid pointer dereference on ↵Krzysztof Kozlowski
regmap_add_irq_chip fail Fixes: 4aab3fadad32 ("mfd: tps65910: Move interrupt implementation code to mfd file") tps65910_irq_init() sets 'tps65910->chip_irq' before calling regmap_add_irq_chip(). If the regmap_add_irq_chip() call fails in memory allocation of regmap_irq_chip_data members then: 1. The 'tps65910->chip_irq' will still hold some value 2. 'tps65910->irq_data' will be pointing to already freed memory (because regmap_add_irq_chip() will free it on error) This results in invalid memory access during driver remove because the tps65910_irq_exit() tests whether 'tps65910->chip_irq' is not zero. Cc: <stable@vger.kernel.org> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-06mfd: ti: Constify struct mfd_cell where possibleGeert Uytterhoeven
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting refcounting pointers in original mfd_cell arrays"), the "cell" parameter of mfd_add_devices() is "const" again. Hence make all cell data passed to mfd_add_devices() const where possible. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-10-25Merge tag 'mfd-lee-3.13-1' of git://git.linaro.org/people/ljones/mfdSamuel Ortiz
mfd-lee-3.13-1 MFD patches due for v3.13.
2013-10-24mfd: tps65910: Remove warning during dt node parsingLaxman Dewangan
Driver throw the warning message if dt node does not have the info for VMBCH-Threshold and VMBCH2-Threshold. These properties are optional property and hence it is not mandatory to have these on DT node and in this case it should not throw the warning message. It creates noise from driver as follows: [ 0.384605] tps65910 4-002d: VMBCH-Threshold not specified [ 0.384616] tps65910 4-002d: VMBCH2-Threshold not specified Removing the warning message from driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-10-23mfd: tps65910: Include linux/of.h headerSachin Kamat
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2012-12-16Merge tag 'mfd-3.8-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFS update from Samuel Ortiz: "This is the MFD patch set for the 3.8 merge window. We have several new drivers, most of the time coming with their sub devices drivers: - Austria Microsystem's AS3711 - Nano River's viperboard - TI's TPS80031, AM335x TS/ADC, - Realtek's MMC/memstick card reader - Nokia's retu We also got some notable cleanups and improvements: - tps6586x got converted to IRQ domains. - tps65910 and tps65090 moved to the regmap IRQ API. - STMPE is now Device Tree aware. - A general twl6040 and twl-core cleanup, with moves to the regmap I/O and IRQ APIs and a conversion to the recently added PWM framework. - sta2x11 gained regmap support. Then the rest is mostly tiny cleanups and fixes, among which we have Mark's wm5xxx and wm8xxx patchset." Far amount of annoying but largely trivial conflicts. Many due to __devinit/exit removal, others due to one or two of the new drivers also having come in through another tree. * tag 'mfd-3.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (119 commits) mfd: tps6507x: Convert to devm_kzalloc mfd: stmpe: Update DT support for stmpe driver mfd: wm5102: Add readback of DSP status 3 register mfd: arizona: Log if we fail to create the primary IRQ domain mfd: tps80031: MFD_TPS80031 needs to select REGMAP_IRQ mfd: tps80031: Add terminating entry for tps80031_id_table mfd: sta2x11: Fix potential NULL pointer dereference in __sta2x11_mfd_mask() mfd: wm5102: Add tuning for revision B mfd: arizona: Defer patch initialistation until after first device boot mfd: tps65910: Fix wrong ack_base register mfd: tps65910: Remove unused data mfd: stmpe: Get rid of irq_invert_polarity mfd: ab8500-core: Fix invalid free of devm_ allocated data mfd: wm5102: Mark DSP memory regions as volatile mfd: wm5102: Correct default for LDO1_CONTROL_2 mfd: arizona: Register haptics devices mfd: wm8994: Make current device behaviour the default mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQ mfd: Fix stmpe.c build when OF is not enabled mfd: jz4740-adc: Use devm_kzalloc ...
2012-11-30mfd: tps65910: Fix wrong ack_base registerKim, Milo
The interrupt status registers of TPS65910/1 should be cleared when the associated interrupt event occurs. This work is done in the regmap irq thread - using 'ack_base' register. The ACK registers should be fixed as status register, not mask registers. This patch fixes the infinite interrupt event problem by clearing interrupt status registers. Tested on the AM3517 Craneboard. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-30mfd: tps65910: Remove unused dataKim, Milo
The 'io_mutex' is not used anywhere. The regmap API supports the mutex internally, so no additional mutex is required. And 'domain' private data is unnecessary because the irq domain is already registered by using regmap_add_irq_chip(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-28mfd: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28mfd: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-20mfd: tps65910: Pass irq_domain when adding mfd sub devicesLaxman Dewangan
When adding the sub device "tps65910-rtc", is it passed the IO resource IRQ for the interrupt number. This interrupt needs to map in the device irq domain. Pass the irq domain of device in mfd_add_devices() so that proper irq mapping can be done when adding the sub device RTC. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: tps65910: Move interrupt implementation code to mfd fileLaxman Dewangan
In place of implementing the irq support in separate file, moving implementation to main mfd file. The irq files only contains the table and init steps only and does not need extra file to have this only for this purpose. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: tps65910: Initialize mfd devices after all initialization doneLaxman Dewangan
Add sub devices of tps65910 after all initialization like interrupt, clock etc. is done. This will make sure that require data gets initialized properly before sub devices probe's get called. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-29mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device listVenu Byravarasu
Add RTC alarm interrupt details to TPS65910 MFD device list, to support RTC alarm events. Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-14mfd: dt: tps65910: Add power off controlBill Huang
Add DT property "ti,system-power-controller" telling whether or not this pmic is in charge of controlling the system power, so the power off routine can be hooked up to system call "pm_power_off". Based on the work by: Dan Willemsen <dwillemsen@nvidia.com> Signed-off-by: Bill Huang <bilhuang@nvidia.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-14mfd: core: Push irqdomain mapping out into devicesMark Brown
Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Add tps65910 32-kHz-crystal-input initJohan Hovold
Replace tps65910_misc_init with a dedicated init function for the 32-kHz-crystal input, and make the code more readable. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Add device-tree entry to enable tps65910 external 32-kHz oscillatorJohan Hovold
Add device-tree entry to enable external 32-kHz crystal oscillator input. Compile-only tested. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09mfd: Add support for enabling tps65910 external 32-kHz oscillatorJohan Hovold
Add flag to platform data to enable external 32-kHz crystal oscillator (or square wave) input. The tps6591x can use either an internal 32-kHz RC oscillator or an external crystal (or square wave) to generate the 32-kHz clock. The default setting depends on the selected boot mode. In boot mode 00 the internal RC oscillator is used at power-on, but the external crystal oscillator (or square wave) can be enabled by clearing the ck32k_ctrl flag in the device control register. Note that there is no way to switch from the external crystal oscillator to the internal RC oscillator. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-22mfd: Remove the parsing of dt info for tps65910 gpioLaxman Dewangan
Remove the parsing of device node information for sub devices from core file. The sub devices will parse the information as per the sub-devices specific information. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-22mfd: Save device node parsed platform data for tps65910 sub devicesLaxman Dewangan
Save the allocated memory to store the parsed device node information to the global device structure so that sub devices can directly use this pointer. In this way, the sub devices does not require to re-allocate the memory for storing the sub-devices specific device node information. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Fix tps65910 build failureSamuel Ortiz
The tps65910_parse_dt() prototype for !CONFIG_OF was not correct, leading to: drivers/mfd/tps65910.c: In function ‘tps65910_i2c_probe’: drivers/mfd/tps65910.c:218:3: error: too many arguments to function ‘tps65910_parse_dt’ Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Register tps65910 gpios as an mfd deviceLaxman Dewangan
As gpio support for tps65910 is on gpio driver, registering gpio support as the mfd sub devices instead of calling gpio_init() from the core probe. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert all tps65910 allocation to devm_*Laxman Dewangan
Convert memory allocation and regmap initialization to use devm_* functions. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Cache tps65910 register when we need itLaxman Dewangan
During regmap initialization, we do not provide the default value and hence in place of caching register during regmap_init(), cache it when actually we need it i.e. after reading of that register. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add tps65910 device-tree supportRhyland Klein
Add device tree based initialization support for TI's tps65910 pmic. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Commonize tps65910 regmap access through headerRhyland Klein
This change removes the read/write callback functions in favor of common regmap accessors inside the header file. This change also makes use of regmap_read/write for single register access which maps better onto what this driver actually needs. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Fix tps65910 section annotationsMark Brown
A warning was being generated by the reference from tps65910_i2c_probe() to tps65910_sleepinit() since the latter was annotated as __init but the former was unannotated. Since these functions can only be called during device init make them both __devinit, and while we're at it also annotate tps65910_i2c_remove() __devexit for symmetry. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-01mfd: Add support for tps65910 device sleepLaxman Dewangan
Adding support for device sleep through the external input control signal "SLEEP". Changing the SLEEP signal state can switch the device into SLEEP and ACTIVE state. Also adding sleep configuration for different resources so that they should be keep on during sleep state of device. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-16mfd: Use correct variable name for tps65910 regmap configLaxman Dewangan
This was the copy-paste issue in reg cache support code where variable name for regmap config was not really starting from the device name, it was starting from some other device name. Fixing this so that variable name contains actual device name. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-06mfd: Use regmap for tps65910 register access.Laxman Dewangan
Using regmap apis for accessing the device registers and using RBTREE caching mechanims for caching registers. Enabling caching of the registers which is used for voltage controls. By doing this, the modify_bits operation is faster as it does not involve the i2c register read from device, just read from cache. This results faster set voltage operation. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-06mfd: Initialize tps65910 irq platform data properlyLaxman Dewangan
irq_base of the tps65910 irq platform data should be initialized with the board provided irq_base data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-01-09mfd: Make TPS65910 usable without interruptsAfzal Mohammed
TPS65910 can be used without interrupts. Hence let probe succeed in case interrupt can't be configured and let Kernel only to complain about it Signed-off-by: Afzal Mohammed <afzal@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-20mfd: Handle tps65910 clear-mask correctlyMarcus Folkesson
The function is not actually cleaing the bitmask. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31mfd: Avoid two assignments if failures happen in tps65910_i2c_probeJesper Juhl
In drivers/mfd/tps65910.c:tps65910_i2c_probe() there's potential for a tiny optimization. We assign to init_data->irq and init_data->irq_base long before we need them, and there are two potential exits from the function before they are needed. Moving the assignments below these two potential exits means we completely avoid doing them in these two (failure) cases. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31mfd: Don't leak init_data in tps65910_i2c_probeJesper Juhl
There are a couple of situations where we leak init_data in drivers/mfd/tps65910.c:tps65910_i2c_probe() - this patch should take care of them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-31mfd: Implement tps65910 IRQ cleanupMark Brown
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 <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-27MFD: TPS65910: Add support for TPS65911 deviceJorge Eduardo Candelaria
The TPS65911 is the next generation of the TPS65910 family of PMIC chips. It adds a few features: - Watchdog Timer - PWM & LED generators - Comparators for system control status It also adds a set of Interrupts and GPIOs, among other things. The driver exports a function to identify between different versions of the tps65910 family, allowing other modules to identify the capabilities of the current chip. Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-27mfd: Fix off-by-one value range checking for tps65910_i2c_writeAxel Lin
If bytes == (TPS65910_MAX_REGISTER + 1), we have a buffer overflow when doing memcpy(&msg[1], src, bytes). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-27TPS65910: IRQ: Add interrupt controllerGraeme Gregory
This module controls the interrupt handling for the tps chip. The interrupt sources are the following: - GPIO falling/rising edge detection - Battery voltage below/above threshold - PWRON signal - PWRHOLD signal - Temperature detection - RTC alarm and periodic event Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-05-27TPS65910: GPIO: Add GPIO driverGraeme Gregory
TPS65910 has one configurable GPIO that can be used for several purposes. Subsequent versions of the TPS chip support more than one GPIO. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>