linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ian@slimlogic.co.uk (Ian Lartey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 02/12] mfd: palmas: is_palmas_charger needed by multiple drivers
Date: Thu,  7 Mar 2013 13:17:46 +0000	[thread overview]
Message-ID: <1362662276-20792-2-git-send-email-ian@slimlogic.co.uk> (raw)
In-Reply-To: <1362662276-20792-1-git-send-email-ian@slimlogic.co.uk>

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>
---
 include/linux/mfd/palmas.h |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index a4d13d7..f66ef32 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 <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
@@ -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;
-- 
1.7.0.4

  reply	other threads:[~2013-03-07 13:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 13:17 [PATCH v8 01/12] mfd: DT bindings for the palmas family MFD Ian Lartey
2013-03-07 13:17 ` Ian Lartey [this message]
2013-03-07 13:17 ` [PATCH v8 03/12] mfd: palmas add variant and OTP detection Ian Lartey
2013-03-07 13:17 ` [PATCH v8 04/12] regulator: palmas correct dt parsing Ian Lartey
2013-03-08  9:44   ` Mark Brown
2013-03-07 13:17 ` [PATCH v8 05/12] watchdog: add Palmas Watchdog support Ian Lartey
2013-03-07 13:17 ` [PATCH v8 06/12] watchdog: Kconfig for Palmas watchdog Ian Lartey
2013-03-07 13:17 ` [PATCH v8 07/12] gpio: palmas: add in GPIO support for palmas charger Ian Lartey
2013-03-13 14:15   ` Linus Walleij
2013-03-14 11:58     ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 08/12] gpio: palmas: Enable DT support for palmas gpio Ian Lartey
2013-03-13 14:20   ` Linus Walleij
2013-03-07 13:17 ` [PATCH v8 09/12] leds: Add support for Palmas LEDs Ian Lartey
2013-03-08  1:13   ` Kim, Milo
2013-03-11 15:16     ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 10/12] clk: Kconfig for Palmas clock driver Ian Lartey
2013-03-08  1:13   ` Kim, Milo
2013-03-08 17:14     ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 11/12] leds: Kconfig for Palmas LEDs Ian Lartey
2013-03-08  1:13   ` Kim, Milo
2013-03-08 17:13     ` Ian Lartey
2013-03-13 20:31       ` Stephen Warren
2013-03-13 23:48         ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 12/12] clk: add a clock driver for palmas Ian Lartey
2013-03-21 21:23   ` Mike Turquette
2013-03-07 13:23 ` [PATCH v8 0/12] Palmas Updates Ian Lartey
2013-03-08  7:12   ` Linus Walleij
2013-03-08 17:12     ` Ian Lartey
2013-03-13 20:28 ` [PATCH v8 01/12] mfd: DT bindings for the palmas family MFD Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362662276-20792-2-git-send-email-ian@slimlogic.co.uk \
    --to=ian@slimlogic.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).