target: msm8974: Fix vol down key & reset config

The method of detecting vol down key and registers to
configure msm reset is different on version 2.0 of the
pmic 8x41. Use these configurations only for devices
with pmic pm8x41.

Change-Id: I05a39fd165737697093916174ff14646a2c86759
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index 4d640fa..11a9967 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -146,8 +146,8 @@
 uint32_t target_volume_down()
 {
 	/* Volume down button is tied in with RESIN on MSM8974. */
-	if (pmic_ver == PMIC_VERSION_V2)
-		return pm8x41_resin_bark_workaround_status();
+	if (target_is_8974() && (pmic_ver == PM8X41_VERSION_V2))
+		return pm8x41_v2_resin_status();
 	else
 		return pm8x41_resin_status();
 }
@@ -499,7 +499,7 @@
 		writel(reboot_reason, RESTART_REASON_ADDR_V2);
 
 	/* Configure PMIC for warm reset */
-	if (pmic_ver == PMIC_VERSION_V2)
+	if (target_is_8974() && (pmic_ver == PM8X41_VERSION_V2))
 		pm8x41_v2_reset_configure(PON_PSHOLD_WARM_RESET);
 	else
 		pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
@@ -635,7 +635,7 @@
 	dprintf(CRITICAL, "Going down for shutdown.\n");
 
 	/* Configure PMIC for shutdown. */
-	if (pmic_ver == PMIC_VERSION_V2)
+	if (target_is_8974() && (pmic_ver == PM8X41_VERSION_V2))
 		pm8x41_v2_reset_configure(PON_PSHOLD_SHUTDOWN);
 	else
 		pm8x41_reset_configure(PON_PSHOLD_SHUTDOWN);