From patchwork Thu Mar 7 13:17:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lartey X-Patchwork-Id: 2231731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 34A7EDF223 for ; Thu, 7 Mar 2013 13:22:49 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDaib-0003nX-M2; Thu, 07 Mar 2013 13:18:46 +0000 Received: from slimlogic.co.uk ([89.16.172.20]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDaiE-0003h3-Sr for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2013 13:18:25 +0000 Received: from localhost.localdomain (cpc1-sgyl22-0-0-cust5.sgyl.cable.virginmedia.com [92.235.204.6]) by slimlogic.co.uk (Postfix) with ESMTPSA id 721111006BD; Thu, 7 Mar 2013 13:18:21 +0000 (GMT) From: Ian Lartey To: linux-kernel@vger.kernel.org Subject: [PATCH v8 02/12] mfd: palmas: is_palmas_charger needed by multiple drivers Date: Thu, 7 Mar 2013 13:17:46 +0000 Message-Id: <1362662276-20792-2-git-send-email-ian@slimlogic.co.uk> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1362662276-20792-1-git-send-email-ian@slimlogic.co.uk> References: <1362662276-20792-1-git-send-email-ian@slimlogic.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130307_081823_902908_5BD02E3D X-CRM114-Status: UNSURE ( 9.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: t-kristo@ti.com, broonie@opensource.wolfsonmicro.com, mturquette@linaro.org, linux-watchdog@vger.kernel.org, swarren@wwwdotorg.org, j-keerthy@ti.com, linus.walleij@linaro.org, linux-doc@vger.kernel.org, lgirdwood@gmail.com, rob.herring@calxeda.com, grant.likely@secretlab.ca, wim@iguana.be, ldewangan@nvidia.com, rpurdie@rpsys.net, linux-arm-kernel@lists.infradead.org, rob@landley.net, cooloney@gmail.com, gg@slimlogic.co.uk, Ian Lartey , linux-leds@vger.kernel.org, sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org is_palmas_charger checks for the presence of charging functionality in the device Signed-off-by: Graeme Gregory Signed-off-by: Ian Lartey Acked-by: Laxman Dewangani --- 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 + * Author: Ian Lartey * * 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;