Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp545750img; Mon, 18 Mar 2019 08:50:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqytgIaedsr8CI6v8+S+CnzstO1F1laaOC6yn8gav4IZr8CWD323QwrmBbpZQwoExTBJkdKF X-Received: by 2002:a17:902:a704:: with SMTP id w4mr19979765plq.251.1552924201884; Mon, 18 Mar 2019 08:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552924201; cv=none; d=google.com; s=arc-20160816; b=O1GEy4j4NbGHh9Yum/hlqAeJyu28hT0oQ/9/uuMi7Hi2VDZrQXytpcP6of9uaBWA4+ qK5HAftBxVGN4CIca6ivgt53PO7DbD3VHwG8q1NxQVsw8hYuLd6AAOM2joJbWLcM9w9N hhtOrDWC4YBT2IKSqTEnNc93wCjdxEvdhE5f3zFWsZ+5vLH9YoB1GMP165ejG/kKD7lW bIzfZosuiLIqiRyFYXuHrp5CHJtlOnk1TBuivQ0c4T9fHNT3AZiR4vKtY6ku6dpCbLx3 lfXIFvUdwShAvejCXemFD1ZLbGpS21p5QWSBGFCxV7UY//7bUS9iz9we2+ko0zU7DTyJ iqSw== 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; bh=D2dcjo6lWmSXC28YzxNeSfmZFB5bi9ASaXHofuLNKqc=; b=ckVR97Zw78uEMPy3HeyoBYlv/b6boFE4Jh4rBHI9ePaRInWnhcclMjgTzW2ZL33Gll cdyOO3BWbeQmlZIO4Tgyjkxgyj49lc87qEF/uEOdjCt7k0VnH817/kempmyJ51Xw/Al4 BYgAzFJREBPW3v/Top8TnGvVFlJ9t7nQNIeRlxyeGr9inscSyZiM+mftrC8MlBXsFTRl uTPO4SRh4ObWZt7IkXKI4W/lquWBMa409EwQVyN+/sme5m7AOCn9lTwu2gfR8Gjx25A1 7jeN3wqxX6CKrrq07Ci2xY+ppCnARpX1v3ZQMeuoAuqggPs8fb/P0NBbUUGnEK7QSzMP st5g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12si8838768pgk.202.2019.03.18.08.49.46; Mon, 18 Mar 2019 08:50:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727630AbfCRPtG (ORCPT + 99 others); Mon, 18 Mar 2019 11:49:06 -0400 Received: from sauhun.de ([88.99.104.3]:36852 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727499AbfCRPtA (ORCPT ); Mon, 18 Mar 2019 11:49:00 -0400 Received: from localhost (p54B330C6.dip0.t-ipconnect.de [84.179.48.198]) by pokefinder.org (Postfix) with ESMTPSA id 85F474A134A; Mon, 18 Mar 2019 16:48:58 +0100 (CET) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Lee Jones , Mark Brown , Support Opensource , Wolfram Sang , Liam Girdwood Subject: [PATCH 4/6] regulator: da9063: move definitions out of a header into the driver Date: Mon, 18 Mar 2019 16:47:56 +0100 Message-Id: <20190318154759.21978-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190318154759.21978-1-wsa+renesas@sang-engineering.com> References: <20190318154759.21978-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Those definitions are only used within the driver meanwhile, so put them there. Signed-off-by: Wolfram Sang --- drivers/regulator/da9063-regulator.c | 44 +++++++++++++++++++++++++++++++- include/linux/mfd/da9063/pdata.h | 49 ------------------------------------ 2 files changed, 43 insertions(+), 50 deletions(-) diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index 73c85039d0cf..c05859ad63d8 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c @@ -25,7 +25,6 @@ #include #include #include -#include #include @@ -34,6 +33,49 @@ REG_FIELD(_reg, __builtin_ffs((int)_mask) - 1, \ sizeof(unsigned int) * 8 - __builtin_clz((_mask)) - 1) +/* DA9063 and DA9063L regulator IDs */ +enum { + /* BUCKs */ + DA9063_ID_BCORE1, + DA9063_ID_BCORE2, + DA9063_ID_BPRO, + DA9063_ID_BMEM, + DA9063_ID_BIO, + DA9063_ID_BPERI, + + /* BCORE1 and BCORE2 in merged mode */ + DA9063_ID_BCORES_MERGED, + /* BMEM and BIO in merged mode */ + DA9063_ID_BMEM_BIO_MERGED, + /* When two BUCKs are merged, they cannot be reused separately */ + + /* LDOs on both DA9063 and DA9063L */ + DA9063_ID_LDO3, + DA9063_ID_LDO7, + DA9063_ID_LDO8, + DA9063_ID_LDO9, + DA9063_ID_LDO11, + + /* DA9063-only LDOs */ + DA9063_ID_LDO1, + DA9063_ID_LDO2, + DA9063_ID_LDO4, + DA9063_ID_LDO5, + DA9063_ID_LDO6, + DA9063_ID_LDO10, +}; + +/* Old regulator platform data */ +struct da9063_regulator_data { + int id; + struct regulator_init_data *initdata; +}; + +struct da9063_regulators_pdata { + unsigned int n_regulators; + struct da9063_regulator_data *regulator_data; +}; + /* Regulator capabilities and registers description */ struct da9063_regulator_info { struct regulator_desc desc; diff --git a/include/linux/mfd/da9063/pdata.h b/include/linux/mfd/da9063/pdata.h index 50bed4f89c1a..21a2d107f0cf 100644 --- a/include/linux/mfd/da9063/pdata.h +++ b/include/linux/mfd/da9063/pdata.h @@ -16,55 +16,6 @@ #ifndef __MFD_DA9063_PDATA_H__ #define __MFD_DA9063_PDATA_H__ -#include - -/* - * Regulator configuration - */ -/* DA9063 and DA9063L regulator IDs */ -enum { - /* BUCKs */ - DA9063_ID_BCORE1, - DA9063_ID_BCORE2, - DA9063_ID_BPRO, - DA9063_ID_BMEM, - DA9063_ID_BIO, - DA9063_ID_BPERI, - - /* BCORE1 and BCORE2 in merged mode */ - DA9063_ID_BCORES_MERGED, - /* BMEM and BIO in merged mode */ - DA9063_ID_BMEM_BIO_MERGED, - /* When two BUCKs are merged, they cannot be reused separately */ - - /* LDOs on both DA9063 and DA9063L */ - DA9063_ID_LDO3, - DA9063_ID_LDO7, - DA9063_ID_LDO8, - DA9063_ID_LDO9, - DA9063_ID_LDO11, - - /* DA9063-only LDOs */ - DA9063_ID_LDO1, - DA9063_ID_LDO2, - DA9063_ID_LDO4, - DA9063_ID_LDO5, - DA9063_ID_LDO6, - DA9063_ID_LDO10, -}; - -/* Regulators platform data */ -struct da9063_regulator_data { - int id; - struct regulator_init_data *initdata; -}; - -struct da9063_regulators_pdata { - unsigned n_regulators; - struct da9063_regulator_data *regulator_data; -}; - - /* * RGB LED configuration */ -- 2.11.0