Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755240AbbGUJw0 (ORCPT ); Tue, 21 Jul 2015 05:52:26 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:59259 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754259AbbGUJwX (ORCPT ); Tue, 21 Jul 2015 05:52:23 -0400 X-Listener-Flag: 11101 Message-ID: <1437472339.30329.57.camel@mtksdaap41> Subject: Re: [PATCH 2/2] regulator: MT6311: Add support for MT6311 regulator From: Henry Chen To: Mark Brown CC: Liam Girdwood , Matthias Brugger , Mark Rutland , Sascha Hauer , , , , , Date: Tue, 21 Jul 2015 17:52:19 +0800 In-Reply-To: <20150720173153.GH11162@sirena.org.uk> References: <1437377793-31558-1-git-send-email-henryc.chen@mediatek.com> <1437377793-31558-3-git-send-email-henryc.chen@mediatek.com> <20150720173153.GH11162@sirena.org.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1706 Lines: 49 On Mon, 2015-07-20 at 18:31 +0100, Mark Brown wrote: > On Mon, Jul 20, 2015 at 03:36:33PM +0800, Henry Chen wrote: > > > @@ -460,6 +460,15 @@ config REGULATOR_MT6397 > > This driver supports the control of different power rails of device > > through regulator interface. > > > > +config REGULATOR_MT6311 > > + tristate "MediaTek MT6311 PMIC" > > Please keep these files sorted, MT6311 should be before MT6397. > > > +static struct mt6311_pdata *mt6311_parse_regulators_dt( > > + struct device *dev) > > +{ > > + struct mt6311_pdata *pdata; > > + struct device_node *node; > > + int i, num, n; > > + > > + node = of_get_child_by_name(dev->of_node, "regulators"); > > + if (!node) { > > + dev_err(dev, "regulators node not found\n"); > > + return ERR_PTR(-ENODEV); > > + } > > + > > + num = of_regulator_match(dev, node, mt6311_matches, > > + ARRAY_SIZE(mt6311_matches)); > > Please convert this to use the modern method of specifying the regulator > DT bindings by providing of_match and regulators_node in the > regulator_desc so the core does the mapping for yand regulators_node in > the regulator_desc so the core does the mapping for yand regulators_node > in the regulator_desc so the core does the mapping for yand > regulators_node in the regulator_desc so the core does the mapping for > you and you can delete the DT handling code. > > Otherwise this driver looks good. Ok, I will correct these on next version. Thanks, Henry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/