mfd: sc27xx: Add USB charger type detection support

The Spreadtrum SC27XX series PMICs supply the USB charger type detection
function, and related registers are located on the PMIC global registers
region, thus we implement and export this function in the MFD driver for
users to get the USB charger type.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Baolin Wang
2020-02-17 10:26:16 +08:00
committed by Lee Jones
parent ba5836933a
commit 2a7e7274f3
2 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_MFD_SC27XX_PMIC_H
#define __LINUX_MFD_SC27XX_PMIC_H
extern enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev);
#endif /* __LINUX_MFD_SC27XX_PMIC_H */