Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1333842

Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support

From "Kim, Milo" <milo.kim@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support
Date 2016-02-15 00:40 +0100
Message-ID <r2eqM-1c5-65@gated-at.bofh.it> (permalink)
References <qYTCa-3TO-11@gated-at.bofh.it> <qYTCa-3TO-15@gated-at.bofh.it> <r19CN-7IJ-5@gated-at.bofh.it> <r1qDE-2aX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support "Kim, Milo" <milo.kim@ti.com> - 2016-02-12 01:20 +0100
  Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support Paul Kocialkowski <contact@paulk.fr> - 2016-02-12 19:30 +0100
    Re: [PATCH v2 2/4] regulator: lp872x: Add enable GPIO pin support "Kim, Milo" <milo.kim@ti.com> - 2016-02-15 00:40 +0100

csiph-web