aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lartey <[email protected]>2013-03-22 14:55:12 +0000
committerSamuel Ortiz <[email protected]>2013-04-08 17:46:21 +0200
commit654003e98213991e4d534487907baad2afd9828d (patch)
tree06b32b3973545032955404b6a471f8b3995208fd
parent895ce2d891a094aeb7e9e3f3ec6a0e4c8bf038aa (diff)
mfd: palmas: is_palmas_charger needed by multiple drivers
is_palmas_charger checks for the presence of charging functionality in the device Signed-off-by: Graeme Gregory <[email protected]> Signed-off-by: Ian Lartey <[email protected]> Acked-by: Laxman Dewangani <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
-rw-r--r--include/linux/mfd/palmas.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 3bbda22721ea..4a066d0caf44 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -1,9 +1,10 @@
/*
* TI Palmas
*
- * Copyright 2011 Texas Instruments Inc.
+ * Copyright 2011-2013 Texas Instruments Inc.
*
* Author: Graeme Gregory <[email protected]>
+ * Author: Ian Lartey <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -22,6 +23,15 @@
#define PALMAS_NUM_CLIENTS 3
+/* The ID_REVISION NUMBERS */
+#define PALMAS_CHIP_OLD_ID 0x0000
+#define PALMAS_CHIP_ID 0xC035
+#define PALMAS_CHIP_CHARGER_ID 0xC036
+
+#define is_palmas(a) (((a) == PALMAS_CHIP_OLD_ID) || \
+ ((a) == PALMAS_CHIP_ID))
+#define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID)
+
struct palmas_pmic;
struct palmas_gpadc;
struct palmas_resource;