Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1261281 > unrolled thread
| Started by | YH Huang <yh.huang@mediatek.com> |
|---|---|
| First post | 2015-11-03 09:20 +0100 |
| Last post | 2015-11-06 09:40 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2] pwm-backlight: fix the panel power sequence YH Huang <yh.huang@mediatek.com> - 2015-11-03 09:20 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence Philipp Zabel <p.zabel@pengutronix.de> - 2015-11-03 12:10 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence YH Huang <yh.huang@mediatek.com> - 2015-11-04 02:50 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence Philipp Zabel <p.zabel@pengutronix.de> - 2015-11-05 10:50 +0100
Re: [PATCH v2] pwm-backlight: fix the panel power sequence YH Huang <yh.huang@mediatek.com> - 2015-11-06 09:40 +0100
| From | YH Huang <yh.huang@mediatek.com> |
|---|---|
| Date | 2015-11-03 09:20 +0100 |
| Subject | Re: [PATCH v2] pwm-backlight: fix the panel power sequence |
| Message-ID | <qqEYX-9k-45@gated-at.bofh.it> |
On Fri, 2015-10-30 at 11:34 +0100, Philipp Zabel wrote:
> Am Freitag, den 30.10.2015, 15:41 +0800 schrieb YH Huang:
> > > 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);
> > }
>
> If the GPIO is still configured as an input, the return value of
> gpiod_get_value could be random.
>
> > I am not sure what "phandle" is working for.
>
> The reasoning is that devices where there is no phandle link pointing to
> the backlight (for example from a simple-panel node), we should keep the
> current default behaviour (enable during probe).
I have a little problem for the current default behaviour.
Should we enable during probe?
Before this patch ( http://patchwork.ozlabs.org/patch/324690/ ),
we disable "enable-gpio" in the probe function.
Do you have any idea of this?
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/
[toc] | [next] | [standalone]
| From | Philipp Zabel <p.zabel@pengutronix.de> |
|---|---|
| Date | 2015-11-03 12:10 +0100 |
| Message-ID | <qqHDr-1VD-7@gated-at.bofh.it> |
| In reply to | #1261281 |
Hi YH, Am Dienstag, den 03.11.2015, 16:11 +0800 schrieb YH Huang: > > The reasoning is that devices where there is no phandle link pointing to > > the backlight (for example from a simple-panel node), we should keep the > > current default behaviour (enable during probe). > > I have a little problem for the current default behaviour. > Should we enable during probe? Here I mean enabling the backlight (at the end of the probe function), not enabling the GPIO already when requesting it. > Before this patch ( http://patchwork.ozlabs.org/patch/324690/ ), > we disable "enable-gpio" in the probe function. While before this patch the GPIO would be initialized in the disabled state, the call to backlight_update_status at the end of the probe function would still enable the backlight afterwards. regards Philipp -- 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/
[toc] | [prev] | [next] | [standalone]
| From | YH Huang <yh.huang@mediatek.com> |
|---|---|
| Date | 2015-11-04 02:50 +0100 |
| Message-ID | <qqVn3-2e0-1@gated-at.bofh.it> |
| In reply to | #1261390 |
On Tue, 2015-11-03 at 12:08 +0100, Philipp Zabel wrote:
> Hi YH,
>
> Am Dienstag, den 03.11.2015, 16:11 +0800 schrieb YH Huang:
> > > The reasoning is that devices where there is no phandle link pointing to
> > > the backlight (for example from a simple-panel node), we should keep the
> > > current default behaviour (enable during probe).
> >
> > I have a little problem for the current default behaviour.
> > Should we enable during probe?
>
> Here I mean enabling the backlight (at the end of the probe function),
> not enabling the GPIO already when requesting it.
>
> > Before this patch ( http://patchwork.ozlabs.org/patch/324690/ ),
> > we disable "enable-gpio" in the probe function.
>
> While before this patch the GPIO would be initialized in the disabled
> state, the call to backlight_update_status at the end of the probe
> function would still enable the backlight afterwards.
Based on this, could we disable it initially and update in the
backlight_update_status function?
Like this,
if (pb->enable_gpio) {
if (phandle &&
gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT &&
gpiod_get_value(pb->enable_gpio) == 1)
gpiod_direction_output(pb->enable_gpio, 1);
else
gpiod_direction_output(pb->enable_gpio, 0);
}
And then update with props.brightness in backlight_update_status.
I am not sure, maybe I miss something.
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/
[toc] | [prev] | [next] | [standalone]
| From | Philipp Zabel <p.zabel@pengutronix.de> |
|---|---|
| Date | 2015-11-05 10:50 +0100 |
| Message-ID | <qrpl7-4PH-1@gated-at.bofh.it> |
| In reply to | #1262023 |
Am Mittwoch, den 04.11.2015, 09:47 +0800 schrieb YH Huang:
> On Tue, 2015-11-03 at 12:08 +0100, Philipp Zabel wrote:
> > Hi YH,
> >
> > Am Dienstag, den 03.11.2015, 16:11 +0800 schrieb YH Huang:
> > > > The reasoning is that devices where there is no phandle link pointing to
> > > > the backlight (for example from a simple-panel node), we should keep the
> > > > current default behaviour (enable during probe).
> > >
> > > I have a little problem for the current default behaviour.
> > > Should we enable during probe?
> >
> > Here I mean enabling the backlight (at the end of the probe function),
> > not enabling the GPIO already when requesting it.
> >
> > > Before this patch ( http://patchwork.ozlabs.org/patch/324690/ ),
> > > we disable "enable-gpio" in the probe function.
> >
> > While before this patch the GPIO would be initialized in the disabled
> > state, the call to backlight_update_status at the end of the probe
> > function would still enable the backlight afterwards.
>
> Based on this, could we disable it initially and update in the
> backlight_update_status function?
>
> Like this,
>
> if (pb->enable_gpio) {
> if (phandle &&
> gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT &&
> gpiod_get_value(pb->enable_gpio) == 1)
> gpiod_direction_output(pb->enable_gpio, 1);
The gpiod_direction_output call is a no-op, since the direction is
already output and the value is already 1.
Also, I propose to set initial blanking to FB_BLANK_POWERDOWN in this
case, and wait for the panel driver to enable the backlight at the
appropriate time.
regards
Philipp
--
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/
[toc] | [prev] | [next] | [standalone]
| From | YH Huang <yh.huang@mediatek.com> |
|---|---|
| Date | 2015-11-06 09:40 +0100 |
| Message-ID | <qrKIV-26Z-13@gated-at.bofh.it> |
| In reply to | #1263052 |
On Thu, 2015-11-05 at 10:40 +0100, Philipp Zabel wrote:
> >
> > Based on this, could we disable it initially and update in the
> > backlight_update_status function?
> >
> > Like this,
> >
> > if (pb->enable_gpio) {
> > if (phandle &&
> > gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT &&
> > gpiod_get_value(pb->enable_gpio) == 1)
> > gpiod_direction_output(pb->enable_gpio, 1);
>
> The gpiod_direction_output call is a no-op, since the direction is
> already output and the value is already 1.
> Also, I propose to set initial blanking to FB_BLANK_POWERDOWN in this
> case, and wait for the panel driver to enable the backlight at the
> appropriate time.
Thanks your kindly reply.
Your patch looks good to me.
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web