From ffa8640833123aba99f6c1e5607efbc381d97944 Mon Sep 17 00:00:00 2001 From: Saurabh Ambulkar Date: Mon, 29 Jun 2020 19:07:29 +0530 Subject: [PATCH] drivers: qcom: socinfo: Add support for ADP hardware type Add ADP hardware support to socinfo driver. Change-Id: I156a926a9426d2c891465aed3679b12dd21ff582 Signed-off-by: Saurabh Ambulkar Signed-off-by: Shreyas K K --- drivers/soc/qcom/socinfo.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 61eb19837c9b..46e437631ce5 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -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");