summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/axp20x_usb_power.c
Commit message (Collapse)AuthorAgeFilesLines
* power: supply: axp20x_usb_power: use IIO channels when availableQuentin Schulz2017-01-291-4/+66
| | | | | | | | | | | | | | | | | The X-Powers AXP20X PMIC exposes the current current and voltage measures via an internal ADC. This adds the possibility to read IIO channels directly for processed values rather than reading the registers and computing the value. For backward compatibility purpose, if the IIO driver is not compiled, this driver will fall back on previous behaviour which is direct register readings. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: supply: axp20x_usb_power: fix warning on 64bitMichal Suchanek2017-01-121-2/+3
| | | | | | | | | | | | | | | Casting of_device_get_match_data return value to int causes warning on 64bit architectures. ../drivers/power/supply/axp20x_usb_power.c: In function 'axp20x_usb_power_probe': ../drivers/power/supply/axp20x_usb_power.c:297:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Fixes: 0dcc70ca8644 ("power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: supply: axp20x_usb_power: add 100mA max current limit for AXP223Quentin Schulz2017-01-041-5/+8
| | | | | | | | | | | | | The X-Powers AXP223 shares most of its behaviour with the AXP221 PMIC but allows the VBUS power supply max current to be set to 100mA (like the AXP209 PMIC). This basically adds a new compatible to the VBUS power supply driver and adds a check on the compatible when setting current max limit. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: supply: axp20x_usb_power: set min voltage and max current from sysfsQuentin Schulz2017-01-041-0/+81
| | | | | | | | | AXP20X and AXP22X PMICs allow setting the min voltage and max current of VBUS power supply. This adds entries in sysfs to allow to do so. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: supply: axp20x_usb_power: use of_device_id data field instead of ↵Quentin Schulz2017-01-041-11/+15
| | | | | | | | | | | device_is_compatible This replaces calls to of_device_is_compatible to check data field of of_device_id matched when probing the driver. Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: move power supply drivers to power/supplySebastian Reichel2016-08-111-0/+294
This moves all power supply drivers from drivers/power/ to drivers/power/supply/. The intention is a cleaner source tree, since drivers/power/ also contains frameworks unrelated to power supply, like adaptive voltage scaling. Signed-off-by: Sebastian Reichel <sre@kernel.org>