summaryrefslogtreecommitdiffstats
path: root/include/hardware/hardware.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hardware/hardware.h')
-rw-r--r--include/hardware/hardware.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h
index 416ae39..37a5a15 100644
--- a/include/hardware/hardware.h
+++ b/include/hardware/hardware.h
@@ -33,7 +33,21 @@ __BEGIN_DECLS
#define HARDWARE_MODULE_TAG MAKE_TAG_CONSTANT('H', 'W', 'M', 'T')
#define HARDWARE_DEVICE_TAG MAKE_TAG_CONSTANT('H', 'W', 'D', 'T')
-
+#ifdef QCOM_HARDWARE
+#define IS_TARGET_MPQ(status) \
+{ \
+ int id = 0; \
+ FILE *fp; \
+ if ((fp = fopen("/sys/devices/system/soc/soc0/id", "r")) != NULL) { \
+ fscanf(fp, "%d", &id); \
+ fclose(fp); \
+ } \
+ if (id == 130) \
+ status = 1; \
+ else \
+ status = 0;\
+}
+#endif
#define HARDWARE_MAKE_API_VERSION(maj,min) \
((((maj) & 0xff) << 8) | ((min) & 0xff))