History log of /include/linux/mfd/palmas.h
Revision Date Author Comments
e7cf34ef396d6ceaa776661830d4ce332da650f0 30-Jun-2014 Nishanth Menon <nm@ti.com> regulator: palmas: Rename reg_info to palmas_reg_info

reg_info is a generic term which might cause conflict at a later point
in time. To prevent such a thing from occuring in future, rename to
palmas_reg_info.

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
fe40b173441e4519347395825d15d2c5386494c8 18-Jun-2014 Keerthy <j-keerthy@ti.com> regulator: palmas: Add palmas_pmic_driver_data structure

Add palmas_pmic_driver_data structure.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
7ec70c73c9e93556fd19bb6bdfbbd089d9db438b 18-Jun-2014 Keerthy <j-keerthy@ti.com> mfd: palmas: shift the palmas_sleep_requestor_info structure definition to the header file

shift the palmas_sleep_requestor_info structure definition to the header file.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
9f057dc1d01383e6975e515ba8e661d2aeb6bdfc 18-Jun-2014 Keerthy <j-keerthy@ti.com> regulator: palmas: Shift the reg_info structure definition to the header file

Shift the reg_info structure definition to the header file.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
027d7c2a26ad637f14c72f401dd8da0bb6df20c8 18-Jun-2014 Keerthy <j-keerthy@ti.com> mfd: palmas: Add tps65917 specific definitions and enums

Add tps65917 specific definitions and enums.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
45ac60c0bc93f64c3fe64de8308c8e4bd67ac165 22-May-2014 Keerthy <j-keerthy@ti.com> mfd: palmas: Format the header file

Formats the palmas header file. Convert all
the offset values to hexadecimal.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
3f79a3fb5f41e8f2229e5bf8aa725eaa79686f14 21-Apr-2014 Chanwoo Choi <cw00.choi@samsung.com> extcon: palmas: Use devm_extcon_dev_allocate for extcon_dev

This patch use devm_extcon_dev_allocate() to simplify the memory control
of extcon device.

Cc: Graeme Gregory <gg@slimlogic.co.uk>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Felipe Balbi <balbi@ti.com>
Tested-by: Felipe Balbi <balbi@ti.com>
cc01b4639c94b1732995a9909a8973bfed67db2b 13-Aug-2013 Laxman Dewangan <ldewangan@nvidia.com> mfd: palmas: Add support for external control configuration

Some of Palmas resources like clock, SMPSs, LDOs etc can be controlled
by external pins ENABLE1, ENABLE2 or NSLEEP.

Add support to configure these resources to externally controlled.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
0a8d3e2412841c6b1dab1006fd5f7ab5b689db21 06-Aug-2013 Laxman Dewangan <ldewangan@nvidia.com> pinctrl: palmas: add pincontrol driver

TI Palmas series Power Management IC have multiple pins which can be
configured for different functionality. This pins can be configured
for different function. Also their properties like pull up/down,
open drain enable/disable are configurable.

Add support for pincontrol driver Palmas series device like TPS65913,
TPS80036. The driver supports to be register from DT only.

Changes from V1:
- Add generic property for pins and functions in pinconf-generic.
- Add APIs to map the DT and subnode.
- Move common utils APIs to the pinctrl-utils from this file.
- Update the binding document accordingly.
Changes from V2:
- Add ack by Lee.
- Correct the binding docs.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
b81eec09a484c588ead035003ce7555ca8a9963a 08-Aug-2013 Bill Huang <bilhuang@nvidia.com> mfd: palmas: Add power off control

Hook up "pm_power_off" to palmas power off routine if there is DT
property "ti,system-power-controller" defined, so platform which is
powered by this regulator can be powered off properly.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
77409d9bcc0ee3fc309a3d6fd18553f6ec5a9aa6 12-Aug-2013 Kishon Vijay Abraham I <kishon@ti.com> regulator: palmas: model SMPS10 as two regulators

SMPS10 has two outputs OUT1 and OUT2 and have one input IN1.
SMPS10-OUT2 is connected to SMPS10-IN1 and can be configured either
in BOOST mode or BYPASS mode. regulator_enable of SMPS10-OUT2 configures
it in BOOST mode. For BYPASS mode regulator_allow_bypass() API can be
used. SMPS10-OUT1 is connected to SMPS10-OUT2 and can be enabled using
regulator_enable().

[ axel.lin@ingics.com : Simplify regulator_desc setting for SMPS10_[OUT1|OUT2]

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
7281e05aabee7484624d448da208932690ed62b3 10-Jul-2013 Laxman Dewangan <ldewangan@nvidia.com> extcon: palmas: Option to disable ID/VBUS detection based on platform

Based on system design, platform needs to detect the VBUS or ID or
both. Provide option to select this through platform data to
disable part of cable detection through palmas-usb.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
43e3f38892a6a521ff5901cdb97cf6985101badd 09-Jul-2013 Laxman Dewangan <ldewangan@nvidia.com> extcon: palmas: remove unused member from palams_usb structure

Remove unused member vbus_enable and set_vbus_work from palmas_usb
as these members are not used in drivers.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
1ffb0be3ad6186b421921de91092917f0b3ee3e2 19-Jun-2013 J Keerthy <j-keerthy@ti.com> mfd: palmas: Add SMPS10_BOOST feature

The SMPS10 regulator is not presesnt in all the variants
of the PALMAS PMIC family. Hence adding a feature to distingush
between them.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
b1f254e35d85535b17af2786d06fe88f15f304f7 28-May-2013 Graeme Gregory <gg@slimlogic.co.uk> extcon: Palmas Extcon Driver

This is the driver for the USB comparator built into the palmas chip. It
handles the various USB OTG events that can be generated by cable
insertion/removal.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: George Cherian <george.cherian@ti.com>
[kishon@ti.com: adapted palmas usb driver to use the extcon framework]
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
51d3a0c999e18a802a654171b5e05952b4630148 18-Apr-2013 Laxman Dewangan <ldewangan@nvidia.com> regulator: palmas: preserve modes of rails during enable/disable

The Palma device like TPS65913 have the mode mask which is also
used for enable/disable the rails. The mode bits are defined as
00: OFF
01: AUTO
10: ECO
11: Forced PWM

and modes are set accordingly as
REGULATOR_MODE_NORMAL: AUTO
REGULATOR_MODE_IDLE: ECO
REGULATOR_MODE_FAST: PWM

Two issue observed:
1. If client calls following sequence:
regulator_enable(),
regulator_set_mode(FAST),
regulator_disable()

and again the regulator_enable() then the mode is reset
to NORMAL inplace of keeping the mode as FAST.

Fixing this by storing the current mode configured by client
and restoring modes when enable() is called after disable().

2. In following sequence, the regulator get enabled:
regulator_disable()
regulator_set_mode(FAST),

Fixing this by updating new mode in register only if it is
enabled.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
28d1e8cd671a53d6b4f967abbbc2a55f7bd333f6 18-Apr-2013 Laxman Dewangan <ldewangan@nvidia.com> regulator: palma: add ramp delay support through regulator constraints

Currently Palma regulator driver support the ramp delay
through rail specific platform data.

As regulator framework support the configuration of ramp
delay through regulator constraint, using the framework
method and removing the platform specific data approach.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
17c11a7603496949989ed286ed218a9e645b6259 17-Apr-2013 Laxman Dewangan <ldewangan@nvidia.com> regulator: palmas: add support for LDO8 tracking mode

LDO8 of Palma device like tps65913 support the tracking mode
on which LDO8 track the SMPS45 voltage when SMPS45 is ON
and use the LDO8.VOLTAGE_SEL register when SMPS45 is OFF.

On track mode, the steps of voltage change for LDO8 is 25mV
where in non-tracking mode it is 50mV. Set the steps accordingly.
Number of voltage count is still same for both the cases.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
aa07f02793ec149d560142f25af0243fff84208b 17-Apr-2013 Laxman Dewangan <ldewangan@nvidia.com> regulator: palmas: support for external regulator through control outputs

Palmas device have control outputs like REGEN1, REGEN2, REGEN3,
SYSEN1 and SYSEN2. These control outputs can be used for controlling
external voltage switches to enabled/disable voltage outputs.

Add support of these control outputs through regulator framework.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
654003e98213991e4d534487907baad2afd9828d 22-Mar-2013 Ian Lartey <ian@slimlogic.co.uk> mfd: palmas: is_palmas_charger needed by multiple drivers

is_palmas_charger checks for the presence of charging
functionality in the device

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Acked-by: Laxman Dewangani <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
df545d1cd01aab3ba3f687d5423e6c3687b069d8 01-Mar-2013 Laxman Dewangan <ldewangan@nvidia.com> mfd: palmas: Provide irq flags through DT/platform data

Currently driver sets the irq type to IRQF_TRIGGER_LOW which is
causing interrupt registration failure in ARM based SoCs as:
[ 0.208479] genirq: Setting trigger mode 8 for irq 118 failed (gic_set_type+0x0/0xf0)
[ 0.208513] dummy 0-0059: Failed to request IRQ 118: -22

Provide the irq flags through platform data if device is registered
through board file or get the irq type from DT node property in place
of hardcoding the irq flag in driver to support multiple platforms.

Also configure the device to generate the interrupt signal according to
flag type.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
60c185f059c88ad4b9b170b1f9322e3adcccca07 03-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com> mfd: palmas: Add APIs to access the Palmas' registers

Palmas register set is divided into different blocks (base and offset)
and hence different i2c addresses. The i2c address offsets are derived
from base address of block of registers.

Add inline APIs to access the Palma's registers which takes the base of
register block and register offset. The i2c address offset is derived
from the base address of register blocks.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
7cc4c92fbc1b539597c00656b3236a57d76022f4 28-Aug-2012 Graeme Gregory <gg@slimlogic.co.uk> mfd: palmas: Change regulator defns to better suite DT

In order to better fit DT parsing in of regulator definitions re-arrange
the platform data struct slightly which requires the definitions of
the regulator IDs earlier in the include file.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
190ef1a6e1e493340281d10a9dbda2eac205884c 28-Aug-2012 Graeme Gregory <gg@slimlogic.co.uk> mfd: palmas: Add pdata/data for rest of children

Add the platform data and data structures for children that shall be
added by a future set of commits.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2945fbc2fcd83df03165342c1bc3ab83d0fe9c04 15-May-2012 Graeme Gregory <gg@slimlogic.co.uk> mfd: palmas PMIC device support

Palmas is a PMIC from Texas Instruments and this is the MFD part of the
driver for this chip. The PMIC has SMPS and LDO regulators, a general
purpose ADC, GPIO, USB OTG mode detection, watchdog and RTC features.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>