From patchwork Mon Jul 30 11:50:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10548967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D526813B8 for ; Mon, 30 Jul 2018 11:50:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C552B29AF3 for ; Mon, 30 Jul 2018 11:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B92D729B17; Mon, 30 Jul 2018 11:50:23 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFB3729AF3 for ; Mon, 30 Jul 2018 11:50:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727478AbeG3NY6 (ORCPT ); Mon, 30 Jul 2018 09:24:58 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38039 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbeG3NY6 (ORCPT ); Mon, 30 Jul 2018 09:24:58 -0400 Received: by mail-lf1-f67.google.com with SMTP id a4-v6so7930602lff.5 for ; Mon, 30 Jul 2018 04:50:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=hASUZsVuOnlxDpr4AC5q2rFLbCOhPb0NmVaeIy2LaSk=; b=FCzuFbTWnecGJibomA+kQIZnpTa9YbbvIDOd+sYhEij0goZ+3zLe7GRg9Mf/iEm+Gr by8C0+17QzwsHIDUi2+o09b3Oc6SI2Rk3r1UXQnkrAOyznIq87Tvpq+BQiuhoo/w88Ig +Sd9lAtsm+xzNQrqiHE7wkxAVd6u/WxiF+1pTxkVNbkPCiTrStbfCoa81ywS4NqDXUh7 q9a9xYG4fmjZUhUyuPFHdxq0CbW/Cjky0ei93bLSzu5HkxSUht7kacUhuxtC1nm3Yqnx Ll8s1VxKrXom3yRgdNOS8njfjQbIKXZtsvDPw+PBi8LivKmcSWw+qJEvwQYp4xcHH/U2 2/xA== X-Gm-Message-State: AOUpUlH6//QZ8+ggq4RWk/4BAkHH7sRe7YLGcrXBx9j1w9zzHKlnzyQm sFSymbEy350hns8V8cvvM2o= X-Google-Smtp-Source: AAOMgpebDdD5kjSVyievVEEb4Bsye4+r4rCmW/3C94rhiQQ8wpV0fpeZby9zUMYoTOmYV2hegaRQXw== X-Received: by 2002:a19:d095:: with SMTP id h143-v6mr9860956lfg.16.1532951420387; Mon, 30 Jul 2018 04:50:20 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id y5-v6sm2044373ljj.75.2018.07.30.04.50.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 04:50:19 -0700 (PDT) Date: Mon, 30 Jul 2018 14:50:08 +0300 From: Matti Vaittinen To: lgirdwood@gmail.com, broonie@kernel.org, lee.jones@linaro.org, matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: linux-clk@vger.kernel.org Subject: [PATCH] regulator: bd71837: adobt MFD changes to regulator driver Message-ID: <20180730115008.GA30634@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP MFD part for bd71837 was changed during the review. Clean regulator part to match changed MFD: - renamed header file => fix include - remove unused platdata as also type definition was removed - Kconfig option for MFD part was changed => fix depends on clause - Rename Kconfig option for regulators As Kconfig option for regulators gets now used (when dependency to MFD is satisfied) change it so that it won't require new change when support for bd71847 is added. Signed-off-by: Matti Vaittinen --- Please note that the MFD part is still not accepted/applied but I don't expect big (any?) new changes to it. v11 of MFD part was sent for review here: https://lore.kernel.org/lkml/cover.1532946848.git.matti.vaittinen@fi.rohmeurope.com/ drivers/regulator/Kconfig | 4 ++-- drivers/regulator/Makefile | 2 +- drivers/regulator/bd71837-regulator.c | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 2964eaea94c0..ff33b4c34d41 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -180,9 +180,9 @@ config REGULATOR_BCM590XX BCM590xx PMUs. This will enable support for the software controllable LDO/Switching regulators. -config REGULATOR_BD71837 +config REGULATOR_BD718XX tristate "ROHM BD71837 Power Regulator" - depends on MFD_BD71837 + depends on MFD_ROHM_BD718XX help This driver supports voltage regulators on ROHM BD71837 PMIC. This will enable support for the software controllable buck diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index bd818ceb7c72..b03a7e71d30b 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -27,7 +27,7 @@ obj-$(CONFIG_REGULATOR_AS3711) += as3711-regulator.o obj-$(CONFIG_REGULATOR_AS3722) += as3722-regulator.o obj-$(CONFIG_REGULATOR_AXP20X) += axp20x-regulator.o obj-$(CONFIG_REGULATOR_BCM590XX) += bcm590xx-regulator.o -obj-$(CONFIG_REGULATOR_BD71837) += bd71837-regulator.o +obj-$(CONFIG_REGULATOR_BD718XX) += bd71837-regulator.o obj-$(CONFIG_REGULATOR_BD9571MWV) += bd9571mwv-regulator.o obj-$(CONFIG_REGULATOR_DA903X) += da903x.o obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c index 3a487255482c..0f8ac8dec3e1 100644 --- a/drivers/regulator/bd71837-regulator.c +++ b/drivers/regulator/bd71837-regulator.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -490,7 +490,6 @@ struct reg_init { static int bd71837_probe(struct platform_device *pdev) { struct bd71837_pmic *pmic; - struct bd71837_board *pdata; struct regulator_config config = { 0 }; struct reg_init pmic_regulator_inits[] = { { @@ -558,7 +557,6 @@ static int bd71837_probe(struct platform_device *pdev) goto err; } platform_set_drvdata(pdev, pmic); - pdata = dev_get_platdata(pmic->mfd->dev); /* Register LOCK release */ err = regmap_update_bits(pmic->mfd->regmap, BD71837_REG_REGLOCK, @@ -578,9 +576,6 @@ static int bd71837_probe(struct platform_device *pdev) desc = &pmic->descs[i]; - if (pdata) - config.init_data = pdata->init_data[i]; - config.dev = pdev->dev.parent; config.driver_data = pmic; config.regmap = pmic->mfd->regmap;