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: 100548 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp112901qge; Thu, 25 May 2017 23:36:03 -0700 (PDT) X-Received: by 10.99.98.66 with SMTP id w63mr452538pgb.223.1495780563322; Thu, 25 May 2017 23:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495780563; cv=none; d=google.com; s=arc-20160816; b=KSxSUTyYK+A1GJUDKzWrYcdXBpYPbdN+hnKj9mhywPTTFA/arin6BOSBHPkGgzkoTK JqSl++qk0A3PhVPSc6x0Y5kABwJGfATMfP+cqTBMzh8UTTcUtIsLXNKzbDljaGqJOw4W mmSj25Fh+HLzYhS5A31rnFhgq58iSjFl0KY8R/4+kHS8z+W+CsWJrU7pXgLK8zBZaTAS aCOJvGdFPChELNPDXbIwf4RepIgFRW/G+xTEXm5foQEGfiwGP3+f1c9Earz6/QwzQNxt DetIMa0khVO+YK92aqzv96lwxIgI9cZm7EMa9Mqec3rT1aYkS/5j9D/Iea5LqRXBsKkS 3jyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0VlL8A3daGvF6UOaYwQt2zx07GeXlVpgbISDHCg759s=; b=AXlm3MHhCKDvkSXara2BkvTsxPql9lYdUYl40YID4gP23Se3JNPavoA8uZf36TsyYz nawSZkWNDdyXU+gfyO+4ly98ne1/U9AxMuYDDbtUK6P6PypsxqgFGOCgJydeUiWsxopG 7qAlhd0wR/IB8oqcEZ0GYeKu7dhOManEe+DMjVxC2D7TMdkZ1OcjjFn2/DWQiK5d9Fic HlrZggbYqBhoNeCnrSWAxnV1OdA+RaZRX1wxr3a8YSoVaLg5/ogNF/v4oKvCEfLr6UP5 cVUHLnOYdlKziwt2I2YTKSHyq7f+FSKfE6FN9JihmEMNcQokpenxvgM6z0IsfUYToUua ObdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w90si31562355pfj.142.2017.05.25.23.36.02; Thu, 25 May 2017 23:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946939AbdEZGf4 (ORCPT + 25 others); Fri, 26 May 2017 02:35:56 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:34183 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163654AbdEZGfx (ORCPT ); Fri, 26 May 2017 02:35:53 -0400 Received: by mail-pf0-f174.google.com with SMTP id 9so2628229pfj.1 for ; Thu, 25 May 2017 23:35:53 -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=LCnT7Mt0/Nmu/krKIHE0MxRxS3dM98lfn4H/gZMNKmaPX/EUSsR8embzlBw2/b8E73 wqh7Dgi509NYsTB3CRXKy8joqVbVltg+TV+ScDBnNKcGU7f7Nlf0WLqhfj98hloqSRNN vAhJFkkhUOwMNf3cLS1yOC4Qc55MDPP5gPaJY7P+WM3UprwULQbFqwAPrPoohOWyYo1+ CWMsPPbzdbYo92BQMCTifchkmCURpW8/RLi0wpyJHtLK54tJgAGRgodPWKF8nn3f1iUg z8P/GorESh78J9Cm3HPrS6qKBe0tDdXXAY6s3xTsAAJultgL4LTBy5uy3dN/L9l0z0UX hDvg== X-Gm-Message-State: AODbwcAaGrLnKLvVwAcekPWqsB71IRCUq8KcwOqtSNYTW1xlzn2WaTHM loSY0RWTo+7m/e31 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 Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, hw.wangxiaoyin@hisilicon.com, Guodong Xu 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.10.2 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 */