Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cecc0b27 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "socinfo: Add support for ADP platform"

parents 4886c304 f3301267
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,7 @@ enum {
	HW_PLATFORM_RCM	= 21,
	HW_PLATFORM_RCM	= 21,
	HW_PLATFORM_STP = 23,
	HW_PLATFORM_STP = 23,
	HW_PLATFORM_SBC = 24,
	HW_PLATFORM_SBC = 24,
	HW_PLATFORM_ADP = 25,
	HW_PLATFORM_IOT = 32,
	HW_PLATFORM_IOT = 32,
	HW_PLATFORM_INVALID
	HW_PLATFORM_INVALID
};
};
@@ -87,6 +88,7 @@ const char *hw_platform[] = {
	[HW_PLATFORM_DTV] = "DTV",
	[HW_PLATFORM_DTV] = "DTV",
	[HW_PLATFORM_STP] = "STP",
	[HW_PLATFORM_STP] = "STP",
	[HW_PLATFORM_SBC] = "SBC",
	[HW_PLATFORM_SBC] = "SBC",
	[HW_PLATFORM_ADP] = "ADP",
	[HW_PLATFORM_IOT] = "IOT"
	[HW_PLATFORM_IOT] = "IOT"
};
};


@@ -95,6 +97,16 @@ enum {
	ACCESSORY_CHIP_CHARM = 58,
	ACCESSORY_CHIP_CHARM = 58,
};
};


enum {
	PLATFORM_SUBTYPE_ADP_V1 = 0x0,
	PLATFORM_SUBTYPE_ADP_INVALID,
};

const char *adp_hw_platform_subtype[] = {
	[PLATFORM_SUBTYPE_ADP_V1] = "ADP_V1",
	[PLATFORM_SUBTYPE_ADP_INVALID] = "INVALID",
};

enum {
enum {
	PLATFORM_SUBTYPE_QRD = 0x0,
	PLATFORM_SUBTYPE_QRD = 0x0,
	PLATFORM_SUBTYPE_SKUAA = 0x1,
	PLATFORM_SUBTYPE_SKUAA = 0x1,
@@ -705,6 +717,14 @@ msm_get_platform_subtype(struct device *dev,
		}
		}
		return snprintf(buf, PAGE_SIZE, "%-.32s\n",
		return snprintf(buf, PAGE_SIZE, "%-.32s\n",
					qrd_hw_platform_subtype[hw_subtype]);
					qrd_hw_platform_subtype[hw_subtype]);
	}
	if (socinfo_get_platform_type() == HW_PLATFORM_ADP) {
		if (hw_subtype >= PLATFORM_SUBTYPE_ADP_INVALID) {
			pr_err("Invalid hardware platform sub type for adp found\n");
			hw_subtype = PLATFORM_SUBTYPE_ADP_INVALID;
		}
		return snprintf(buf, PAGE_SIZE, "%-.32s\n",
					adp_hw_platform_subtype[hw_subtype]);
	} else {
	} else {
		if (hw_subtype >= PLATFORM_SUBTYPE_INVALID) {
		if (hw_subtype >= PLATFORM_SUBTYPE_INVALID) {
			pr_err("Invalid hardware platform subtype\n");
			pr_err("Invalid hardware platform subtype\n");