summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/sc2731_charger.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-05power: supply: sc2731_charger: Free battery informationBaolin Wang1-0/+2
Free battery information in case of adding battery OCV tables. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-05power: supply: sc2731_charger: Avoid repeated charge/dischargeBaolin Wang1-2/+2
Add info->charging validation to avoid repeated charge or discharge operation. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-05power: supply: sc2731_charger: Add charger status detectionBaolin Wang1-0/+20
The USB charger status can be notified before the charger driver registers the USB phy notifier, so we should check the charger status in probe() in case we missed the USB charger notification. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-12-05power: supply: sc2731_charger: Add one work to charge/dischargeBaolin Wang1-8/+22
Since the USB notifier context is atomic, we can not start or stop charging in atomic context. Thus this patch adds one work to help to charge or discharge. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2018-09-20power: supply: Add Spreadtrum SC2731 charger supportBaolin Wang1-0/+504
This patch adds the SC2731 PMIC switch charger support. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>