From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754522AbcBNXdb (ORCPT ); Sun, 14 Feb 2016 18:33:31 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:38547 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753701AbcBNXcc (ORCPT ); Sun, 14 Feb 2016 18:32:32 -0500 Subject: Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support To: Paul Kocialkowski References: <1454697741-8687-1-git-send-email-contact@paulk.fr> <1454697741-8687-3-git-send-email-contact@paulk.fr> <56BD23ED.8010207@ti.com> <1455301532.2760.1.camel@collins> CC: , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , =?UTF-8?Q?Beno=c3=aet_Cousson?= , Tony Lindgren , Liam Girdwood , Mark Brown , Javier Martinez Canillas , , , From: "Kim, Milo" Message-ID: <56C10E36.1030808@ti.com> Date: Mon, 15 Feb 2016 08:31:02 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1455301532.2760.1.camel@collins> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/13/2016 3:25 AM, Paul Kocialkowski wrote: >>> > >+ >>> > >+ /* Always set enable GPIO high. */ >>> > >+ ret = devm_gpio_request_one(lp->dev, gpio, GPIOF_OUT_INIT_HIGH, "LP872X EN"); >>> > >+ if (ret) { >>> > >+ dev_err(lp->dev, "gpio request err: %d\n", ret); >>> > >+ return ret; >>> > >+ } >>> > >+ >>> > >+ /* Each chip has a different enable delay. */ >>> > >+ if (lp->chipid == LP8720) >>> > >+ usleep_range(LP8720_ENABLE_DELAY, 1.5 * LP8720_ENABLE_DELAY); >>> > >+ else >>> > >+ usleep_range(LP8725_ENABLE_DELAY, 1.5 * LP8725_ENABLE_DELAY); >>> > >+ >>> > >+ return 0; >>> > >+} >>> > >+ >>> > > static int lp872x_config(struct lp872x *lp) >>> > > { >>> > > struct lp872x_platform_data *pdata = lp->pdata; >>> > >@@ -875,6 +903,8 @@ static struct lp872x_platform_data >>> > > of_property_read_u8(np, "ti,dvs-state", &dvs_state); >>> > > pdata->dvs->init_state = dvs_state ? DVS_HIGH : DVS_LOW; >>> > > >>> > >+ pdata->enable_gpio = of_get_named_gpio(np, "enable-gpios", 0); >> > >> >Please move this code to lp872x_populate_pdata_from_dt(). > This already adds it in lp872x_populate_pdata_from_dt (see the context > around the insertion). Ah, sorry. Your patch is correct. > I don't know why the diff makes it seem like it's added in > lp872x_config. It's really not. I think it was from a line break of lp872x_populate_pdata_from_dt(). Let me add my ACK to this patch. Thank you. Best regards, Milo