drivers: qcom: socinfo: Add support for ADP hardware type

Add ADP hardware support to socinfo driver.

Change-Id: I156a926a9426d2c891465aed3679b12dd21ff582
Signed-off-by: Saurabh Ambulkar <sambulka@codeaurora.org>
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
This commit is contained in:
Saurabh Ambulkar 2020-06-29 19:07:29 +05:30 • committed by Shreyas K K
commit ffa8640833

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2009-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019, Linaro Ltd.
*/
@ -53,6 +53,7 @@ enum {
HW_PLATFORM_RCM = 21,
HW_PLATFORM_STP = 23,
HW_PLATFORM_SBC = 24,
HW_PLATFORM_ADP = 25,
HW_PLATFORM_HDK = 31,
HW_PLATFORM_ATP = 33,
HW_PLATFORM_IDP = 34,
@ -76,6 +77,7 @@ static const char * const hw_platform[] = {
[HW_PLATFORM_DTV] = "DTV",
[HW_PLATFORM_STP] = "STP",
[HW_PLATFORM_SBC] = "SBC",
[HW_PLATFORM_ADP] = "ADP",
[HW_PLATFORM_HDK] = "HDK",
[HW_PLATFORM_ATP] = "ATP",
[HW_PLATFORM_IDP] = "IDP",
@ -99,6 +101,10 @@ static const char * const qrd_hw_platform_subtype[] = {
[PLATFORM_SUBTYPE_QRD_INVALID] = "INVALID",
};
static const char * const adp_hw_platform_subtype[] = {
[0] = "ADP",
};
enum {
PLATFORM_SUBTYPE_UNKNOWN = 0x0,
PLATFORM_SUBTYPE_CHARM = 0x1,
@ -440,6 +446,9 @@ msm_get_platform_subtype(struct device *dev,
}
return snprintf(buf, PAGE_SIZE, "%-.32s\n",
qrd_hw_platform_subtype[hw_subtype]);
} else if (socinfo_get_platform_type() == HW_PLATFORM_ADP) {
return scnprintf(buf, PAGE_SIZE, "%-.32s\n",
adp_hw_platform_subtype[0]);
} else {
if (hw_subtype >= PLATFORM_SUBTYPE_INVALID) {
pr_err("Invalid hardware platform subtype\n");