dev: pmic: add function to read pmi variant

PMI8950 and PMI8937 have same rev id to distinguish between them.
PBS writes PMI8937 id into one of the spare registers.
Add a function to retrieve the id.

Change-Id: If1de4422c81a0c7c335db98e528eb5e00cde955d
diff --git a/dev/pmic/pm8x41/pm8x41.c b/dev/pmic/pm8x41/pm8x41.c
index 4ce9869..4a4da3a 100644
--- a/dev/pmic/pm8x41/pm8x41.c
+++ b/dev/pmic/pm8x41/pm8x41.c
@@ -565,6 +565,13 @@
 	REG_WRITE(lpg_base + off, val);
 }
 
+uint8_t pmi8950_get_pmi_subtype()
+{
+	uint8_t subtype;
+	spmi_reg_read((PMI8950_SLAVE_ID >> 16), REVID_REV_ID_SPARE_0, &subtype, 0);
+	return subtype;
+}
+
 uint8_t pm8x41_get_pmic_rev()
 {
 	return REG_READ(REVID_REVISION4);