From patchwork Fri May 26 06:35:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9749767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A4A2760249 for ; Fri, 26 May 2017 06:43:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ED5A281C3 for ; Fri, 26 May 2017 06:43:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83441283BD; Fri, 26 May 2017 06:43:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3CAF6281C3 for ; Fri, 26 May 2017 06:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=onBqCnG3fztkrtDMsDyDSzvh29E67Wb/77BklfL+Sow=; b=o//ZjjfYs6DVHeHF94YeN53x7e WLkxfdObHNx1E/YPnjXA+0/nZjl6aukDBKB03oGKdbFpJgQQQVLR2XMd6u6lzpYcOjqQJUCJQFxtr 6HB/2NnGsuCx9aL/i3HrYtBjY2uzFhqmZ4976sSWF68PsCvb8TazD5gnKepm+8fbNnw+Il0fkhdTo UMc0+RXVrg5o6cj70grCwsZeCU5Rszd177D6FYisqZCmQu6lfgyGnLuxDqQEjU1BNqeoYimvTtIJO SG5pJ37Ztva6hKj3An9AqBrLtA9s6lmjclAXH33lHEEO2eiyo2YRmw4hvKCfSkTBzcrPY342W8Ic5 EpKYs2Dg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dE8xw-0002Im-7g; Fri, 26 May 2017 06:43:16 +0000 Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dE8r2-0005nq-8E for linux-arm-kernel@lists.infradead.org; Fri, 26 May 2017 06:36:13 +0000 Received: by mail-pf0-x22c.google.com with SMTP id 9so2628226pfj.1 for ; Thu, 25 May 2017 23:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0VlL8A3daGvF6UOaYwQt2zx07GeXlVpgbISDHCg759s=; b=MBAudS3xaE63pfaxCC3QQRMLH78M6JXgDUR5prlBGGUEBrtaFPClJrMKszpc9WGEeh n8Owq3Krc38WDtUB/f7ifz9H8iAEm3zOI0Q1eh3D62NGtbzDXu2HWhvFTRHr16YB8f/d vHwcOqc56QPTUnTzt0D/UBWgDdv2t5LphjEao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0VlL8A3daGvF6UOaYwQt2zx07GeXlVpgbISDHCg759s=; b=JijGEsxj9Saqst3l6oRf0PFypM/DTri+iXU/W1QsEWSJpopKQCVh0ThWI/4YWvxWDe CweQJANaiRXofCKEjSxPpNN0PVtsfcAceVLocRdsVNnzY8BfTbu8SsmwZaa3LtLc3Brk YIRian0F8WKpSu2S91/rryo7/ihsdHq1zfj/d5jS7RGhgRm/WiSuag6iY1OnLbvZNJAh /wBc1MuwjLf82HsdCoUek4Fthf5emisLL5J8pSkxD3vuhlWkbyT1gmJ4HV9D4MuUQwN6 uLQpc4VNvFs/C0r+PJ7VInJxAa4Ha/K1TO6so2OcLlOoVup39YHzzLSSS08MNsi84S+e CsNA== X-Gm-Message-State: AODbwcCm7gjO2b6NPFEIxkUx3HFeH66QPGqIPzZa9XZEXn/0m6Xl0tv7 aEqFy8ncuqTydani X-Received: by 10.99.115.90 with SMTP id d26mr484338pgn.198.1495780547546; Thu, 25 May 2017 23:35:47 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.222]) by smtp.gmail.com with ESMTPSA id j11sm11420635pgn.38.2017.05.25.23.35.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 May 2017 23:35:46 -0700 (PDT) From: Guodong Xu To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, lgirdwood@gmail.com, broonie@kernel.org, khilman@baylibre.com, arnd@arndb.de, gregory.clement@free-electrons.com, olof@lixom.net, thomas.petazzoni@free-electrons.com, yamada.masahiro@socionext.com, riku.voipio@linaro.org, treding@nvidia.com, krzk@kernel.org, eric@anholt.net, damm+renesas@opensource.se, ard.biesheuvel@linaro.org, linus.walleij@linaro.org, geert+renesas@glider.be Subject: [PATCH 2/6] mfd: hi6421-pmic: move hi6421_regmap_config definition to header file Date: Fri, 26 May 2017 14:35:14 +0800 Message-Id: <20170526063518.21246-3-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170526063518.21246-1-guodong.xu@linaro.org> References: <20170526063518.21246-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170525_233608_882881_98B0A309 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Guodong Xu , hw.wangxiaoyin@hisilicon.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move hi6421_regmap_config definition from c code to common header: - include/linux/mfd/hi6421-pmic.h This is to improve code re-use for upcoming hi6421 series of MFD driver. Signed-off-by: Guodong Xu --- drivers/mfd/hi6421-pmic-core.c | 7 ------- include/linux/mfd/hi6421-pmic.h | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/hi6421-pmic-core.c b/drivers/mfd/hi6421-pmic-core.c index 3fd703f..dc1b5cf 100644 --- a/drivers/mfd/hi6421-pmic-core.c +++ b/drivers/mfd/hi6421-pmic-core.c @@ -35,13 +35,6 @@ static const struct mfd_cell hi6421_devs[] = { { .name = "hi6421-regulator", }, }; -static const struct regmap_config hi6421_regmap_config = { - .reg_bits = 32, - .reg_stride = 4, - .val_bits = 8, - .max_register = HI6421_REG_TO_BUS_ADDR(HI6421_REG_MAX), -}; - static int hi6421_pmic_probe(struct platform_device *pdev) { struct hi6421_pmic *pmic; diff --git a/include/linux/mfd/hi6421-pmic.h b/include/linux/mfd/hi6421-pmic.h index 587273e..f4674ff 100644 --- a/include/linux/mfd/hi6421-pmic.h +++ b/include/linux/mfd/hi6421-pmic.h @@ -38,4 +38,10 @@ struct hi6421_pmic { struct regmap *regmap; }; +static const struct regmap_config hi6421_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 8, + .max_register = HI6421_REG_TO_BUS_ADDR(HI6421_REG_MAX), +}; #endif /* __HI6421_PMIC_H */