mfd: palmas: is_palmas_charger needed by multiple drivers
authorIan Lartey <ian@slimlogic.co.uk>
Fri, 22 Mar 2013 14:55:12 +0000 (14:55 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Apr 2013 15:46:21 +0000 (17:46 +0200)
is_palmas_charger checks for the presence of charging
functionality in the device

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
Acked-by: Laxman Dewangani <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
include/linux/mfd/palmas.h

index 3bbda22721ea083cc35251e399a37742b72c8bae..4a066d0caf44b2b5145bd9d2274ec7c14ffe13ae 100644 (file)
@@ -1,9 +1,10 @@
 /*
  * TI Palmas
  *
- * Copyright 2011 Texas Instruments Inc.
+ * Copyright 2011-2013 Texas Instruments Inc.
  *
  * Author: Graeme Gregory <gg@slimlogic.co.uk>
+ * Author: Ian Lartey <ian@slimlogic.co.uk>
  *
  *  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
 
 #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;