Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259278
| From | YH Huang <yh.huang@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] pwm-backlight: fix the panel power sequence |
| Date | 2015-10-30 08:50 +0100 |
| Message-ID | <qpcBH-30K-7@gated-at.bofh.it> (permalink) |
| References | <qk9l9-1PY-25@gated-at.bofh.it> <qk9Ev-2dv-17@gated-at.bofh.it> <qmpOO-6iz-17@gated-at.bofh.it> <qoXCG-23G-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Hpilipp,
On Thu, 2015-10-29 at 16:40 +0100, Philipp Zabel wrote:
> Hi YH,
>
> Am Donnerstag, den 22.10.2015, 23:12 +0800 schrieb YH Huang:
> > In the case of the panel disabled by the bootloader,
> > your patch still has the following code and always enables the backlight
> > in the probe function.
> > pb->enable_gpio = devm_gpiod_get_optional(&pdev->dev, "enable",
> > - GPIOD_OUT_HIGH);
>
> You are right.
>
> > What do you think if I remove these two lines in my patch?
> > if (pb->enable_gpio)
> > gpiod_direction_output(pb->enable_gpio, 0);
>
> That won't work if the gpio is still configured as input. How about I
> add the GPIOD_ASIS change to my patch you remove that and the above from
> yours?
I revise these two lines
if (pb->enable_gpio)
gpiod_direction_output(pb->enable_gpio, 0);
into
if (pb->enable_gpio) {
if(gpiod_get_value(pb->enable_gpio) == 0)
gpiod_direction_output(pb->enable_gpio, 0);
else
gpiod_direction_output(pb->enable_gpio, 1);
}
I am not sure what "phandle" is working for.
My change is like your patch but remove the "phandle related" and
"gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT".
Do we really need these?
Also, do you think it is right that I do the "pwm_enable(pb->pwm);"
before "gpiod_set_value(pb->enable_gpio, 1);" in power on function?
Regards,
YH Huang
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2] pwm-backlight: fix the panel power sequence YH Huang <yh.huang@mediatek.com> - 2015-10-22 17:20 +0200
Re: [PATCH v2] pwm-backlight: fix the panel power sequence Philipp Zabel <p.zabel@pengutronix.de> - 2015-10-29 16:50 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence YH Huang <yh.huang@mediatek.com> - 2015-10-30 08:50 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence Philipp Zabel <p.zabel@pengutronix.de> - 2015-10-30 11:40 +0100
csiph-web