summaryrefslogtreecommitdiff
path: root/drivers/mfd/tps6586x.c
AgeCommit message (Collapse)Author
2012-02-15mfd: tps6586x: Natively register pm_power_offDan Willemsen
Instead of forcing the board files to register this themselves, just add a bool to the platform data to let the board files opt into this. Change-Id: I831c93026f8343d9962e174a3591e6832c5219d8 Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83598 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2011-11-30Revert "mfd: tps6586x: add suspend/resume handlers"Varun Wadekar
This reverts commit d64db664f2e8d6f4d08db249135011e32d54bc7a. Original-Change-Id: I8de61440cbbe5a12f8cf2d045e7035b9a0ab7369 Reviewed-on: http://git-master/r/22775 Tested-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rab6b8ff3206da1a823c8c9fa00aa940714a36abd
2011-11-30mfd: tps6586x: add suspend/resume handlersVarun Wadekar
if the system is woken by an alarm, tps' irq handler gets called and it tries to communicate on i2c. i2c adapters resume later which causes communication failures in tps' irq handler. the right way is to disable tps' irq while suspending in order to avoid such i2c communication failures. Original-Change-Id: I8487c8b9039d2736acf66e8b02463658428bd5a3 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/21099 Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R9822f05d8d72a91407a64d5c96d963e698efd5ec
2011-11-30mfd: tps6586x: Fix wrong gpio valueAmit Kamath
Replaced write to GPIO pin with read-modify write as old value was overwritten. Original-Change-Id: I679994ba920b70f90a2b1654ee2c0fcc3e08d02e Reviewed-on: http://git-master/r/14540 Reviewed-by: Amit Kamath <akamath@nvidia.com> Tested-by: Amit Kamath <akamath@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rf7e30c62eb580ed8727142b3b5604e2b7990f144
2011-11-30mfd: tps6586x: add api to power off tps6586xNitin Kumbhar
when tps6586x is put into sleep mode, it powers off ldos. Add an api to put tps6586x in sleep mode by resetting EXITSLREQ and setting SLEEP_MODE in SUPPLYENE register. Original-Change-Id: I80fe35d541e85014bd7b5544d212573fe35d67e5 Reviewed-on: http://git-master/r/13589 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R658c9b00e256e3f8e12184ea66451dbb8b477e89
2011-11-30ARM: tegra: tps6586x: add empty function direction_inputPritesh Raithatha
-on reset default direction is in NOT_CONFIGURED (neither input nor output) mode. -as tps6586x driver has not implemented direction_input, gpiolib sysfs only creates a value node not any direction node for each gpios. so from user space there is no way to set direction (or to call function tps6586x_update). -by adding empty function for direction_input solves the above problem by providing direction node in sysfs. Original-Change-Id: I608bcfcd4392c20afab39874deacc6dc20f45063 Reviewed-on: http://git-master/r/11340 Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Tested-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Peter Zu <pzu@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: Re07f62867121955f8f91f0418667923e7795ba5d
2011-05-26mfd: Fix tps6586x GPIO value settingVincent Palatin
In the current code, every time we set a TPS6586x GPIO pin, the tps6586x_gpio_set function is resetting all other GPIO pins. We need to update the right GPIOxOUT bit of the GPIOSET2 register instead of overriding the full value. Tested by setting sequentially GPIO2 and GPIO3 and verifying the pins voltage. Change-Id: I560edde146c5425cce37432c4ee91569eea5adcf Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-27mfd: Cleanup irq namespaceThomas Gleixner
Converted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Invert tps6586x GPIO and subdevices initializationVincent Palatin
When using a fixed voltage regulator triggered by a TPS6586x GPIO, this allows to declare and initialize it conveniently from the "subdev" list. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-02mfd: Avoid tps6586x burst writesvwadekar@nvidia.com
tps6586 does not support burst writes. i2c writes have to be 1 byte at a time. Cc: stable@kernel.org Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-01-14mfd: Convert tps6586x driver to new irq_ APIMark Brown
The genirq core is being updated to supply struct irq_data to irq_chip operations rather than an irq number. Update the tps6586x driver to the new APIs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-01-14mfd: Remove tps6586x device ID checkStephen Warren
... and convert it to a dev_info print at probe time. There are many variants of this chip with different values of VERSIONCRC. The set of values is large, and not useful to enumerate. All are SW compatible. The difference lies in default settings of the various power rails, and other similar differences. The driver, or clients of the driver, shouldn't be affected by this, since all rails should be programmed into the desired state in all cases for correct operation. Derived-from-code-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29mfd: Add TPS658621C device IDAndrew Chew
The interface for this device should be identical to that of the TPS658521A. Signed-off-by: Andrew Chew <achew@nvidia.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29mfd: Add basic tps6586x interrupt supportGary King
Add support for enabling and disabling tps6586x subdevice interrupts Signed-off-by: Gary King <gking@nvidia.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29mfd: Fix tps6586x_add_subdevs error pathAxel Lin
1. return -ENOMEM if platform_device_alloc() fail. 2. call platform_device_put() if platform_device_add() fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-10-29mfd: Free tps6586x allocated resources when unload the moduleAxel Lin
For the resources allocated in tps6586x_i2c_probe(), we need to free it in tps6586x_i2c_remove(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12mfd: Add TPS6586x driverMike Rapoport
Add mfd core driver for TPS6586x PMICs family. The driver provides I/O access for the sub-device drivers and performs regstration of the sub-devices based on the platform requirements. In addition it implements GPIOlib interface for the chip GPIOs. TODO: - add interrupt support - add platform data for PWM, backlight leds and charger Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>