From patchwork Fri Feb 15 12:56:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14901 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2F6A023E01 for ; Fri, 15 Feb 2013 12:57:54 +0000 (UTC) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by fiordland.canonical.com (Postfix) with ESMTP id E0B32A18025 for ; Fri, 15 Feb 2013 12:57:53 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id da11so2906826veb.38 for ; Fri, 15 Feb 2013 04:57:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=Up3eLGpROJRan8zEroLKFrM8m5Uz1YyOYlYcmTErtGE=; b=PV9TOhdoo66r+gjYyX30VLISYUkAg1/0tftScJ2Rzuq5ASDvHfYLvYnadV6YD3nHQ5 Mc2OzlhuiX1vhIyVcZKCzzWtZU9sdCLLz1hg6EQ0/gG0WgHqNRV9MjcYS32SounAjRPo D9Sz8iY9iXdXnLBnT1HrqPjGWiAEJq8vj0MSoXf5+VEgdHVe8G5CZkaKUULEXInXQgJk nR//R4QkiIQqCW5wJBunKS92ppq41DocDpH4bXFEZYhHoRWs+AIw+aGW6RD8pMOSPxzH tGwi9awcxO7obrejoFtfhTdeDMG36L0RinGZ1EvdslHrsAWdPS3+Pr9JwFKhMxiu2DFg uHJg== X-Received: by 10.220.153.143 with SMTP id k15mr2918305vcw.33.1360933073348; Fri, 15 Feb 2013 04:57:53 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.221.4.5 with SMTP id oa5csp11392vcb; Fri, 15 Feb 2013 04:57:52 -0800 (PST) X-Received: by 10.194.60.5 with SMTP id d5mr4189784wjr.4.1360933072517; Fri, 15 Feb 2013 04:57:52 -0800 (PST) Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx.google.com with ESMTPS id z9si19285513wjq.155.2013.02.15.04.57.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:52 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.52 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.52; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.52 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f52.google.com with SMTP id 12so2693503wgh.31 for ; Fri, 15 Feb 2013 04:57:52 -0800 (PST) X-Received: by 10.180.99.227 with SMTP id et3mr4007169wib.6.1360933072113; Fri, 15 Feb 2013 04:57:52 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id j4sm2852410wiz.10.2013.02.15.04.57.50 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Feb 2013 04:57:51 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones Subject: [PATCH 16/35] mfd: ab8500: Add more platform checks Date: Fri, 15 Feb 2013 12:56:47 +0000 Message-Id: <1360933026-30325-17-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> References: <1360933026-30325-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlXzrSizhSH2bOlSDhpF6EOvp6bVdf9GD1tAhbVA08hM4ye9ciFvaajgSr4DaB/xHIqiEl4 Here we add the functionality to check for: - Earlier versions of the AB8505 than 2p0 - Earlier versions of the AB9540 than 2p0 Signed-off-by: Lee Jones --- include/linux/mfd/abx500/ab8500.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index f432cef..7e323fc 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -432,6 +432,16 @@ static inline int is_ab8500_2p0(struct ab8500 *ab) return (is_ab8500(ab) && (ab->chip_id == AB8500_CUT2P0)); } +static inline int is_ab8505_2p0_earlier(struct ab8500 *ab) +{ + return (is_ab8505(ab) && (ab->chip_id < AB8500_CUT2P0)); +} + +static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab) +{ + return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); +} + #ifdef CONFIG_AB8500_DEBUG void ab8500_dump_all_banks(struct device *dev); void ab8500_debug_register_interrupt(int line);