power: supply: qti_battery_charger: Add support for display port
Change-Id: Id8444da0f1493f6127d7dcfc3f3a3f1a1c3fc579
This commit is contained in:
parent
42b638f115
commit
4476fa019f
@ -864,6 +864,11 @@ config BQ_FG_UPDATE
|
||||
help
|
||||
Say y here to enable Bq fuel gauge
|
||||
|
||||
config MI_ENABLE_DP
|
||||
tristate "enable or disable displayPort config"
|
||||
help
|
||||
Say Y here to enable create node to support dp function
|
||||
|
||||
config MI_DTPT
|
||||
tristate "mi dtpt config"
|
||||
help
|
||||
|
@ -393,6 +393,16 @@ int qti_battery_charger_get_prop(const char *name,
|
||||
*val = pst->prop[XM_PROP_CC_ORIENTATION];
|
||||
}
|
||||
break;
|
||||
#if defined(CONFIG_MI_ENABLE_DP)
|
||||
case HAS_DP_PS5169:
|
||||
pst = &bcdev->psy_list[PSY_TYPE_XM];
|
||||
rc = read_property_id(bcdev, pst, XM_PROP_HAS_DP);
|
||||
if (!rc) {
|
||||
*val = pst->prop[XM_PROP_HAS_DP];
|
||||
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -395,6 +395,9 @@ enum xm_property_id {
|
||||
XM_PROP_SERVER_RESULT,
|
||||
XM_PROP_ADSP_RESULT,
|
||||
#endif
|
||||
#if defined(CONFIG_MI_ENABLE_DP)
|
||||
XM_PROP_HAS_DP,
|
||||
#endif
|
||||
#ifdef CONFIG_MI_CHARGER_M81
|
||||
XM_PROP_ATEST,
|
||||
#endif /* CONFIG_MI_CHARGER_M81 */
|
||||
|
@ -2783,6 +2783,22 @@ static ssize_t adsp_result_show(struct class *c,
|
||||
static CLASS_ATTR_RO(adsp_result);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MI_ENABLE_DP)
|
||||
static ssize_t has_dp_show(struct class *c,
|
||||
struct class_attribute *attr, char *buf)
|
||||
{
|
||||
struct battery_chg_dev *bcdev = container_of(c, struct battery_chg_dev,
|
||||
battery_class);
|
||||
struct psy_state *pst = &bcdev->psy_list[PSY_TYPE_XM];
|
||||
int rc;
|
||||
rc = read_property_id(bcdev, pst, XM_PROP_HAS_DP);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
return scnprintf(buf, PAGE_SIZE, "%d\n", pst->prop[XM_PROP_HAS_DP]);
|
||||
}
|
||||
static CLASS_ATTR_RO(has_dp);
|
||||
#endif
|
||||
|
||||
static ssize_t fg_vendor_show(struct class *c,
|
||||
struct class_attribute *attr, char *buf)
|
||||
{
|
||||
@ -4933,6 +4949,9 @@ static struct attribute *xiaomi_battery_class_attrs[] = {
|
||||
&class_attr_server_result.attr,
|
||||
&class_attr_adsp_result.attr,
|
||||
#endif
|
||||
#if defined(CONFIG_MI_ENABLE_DP)
|
||||
&class_attr_has_dp.attr,
|
||||
#endif
|
||||
#ifndef CONFIG_MI_CHARGER_M81
|
||||
&class_attr_thermal_board_temp.attr,
|
||||
#endif /* !CONFIG_MI_CHARGER_M81 */
|
||||
|
Loading…
Reference in New Issue
Block a user