diff mbox series

[1/3] drm/bridge: it6505: Modified power sequence

Message ID 20220707080600.49041-2-allen.chen@ite.com.tw (mailing list archive)
State New, archived
Headers show
Series drm/bridge: it6505: Fixes bugs | expand

Commit Message

allen July 7, 2022, 8:05 a.m. UTC
From: allen chen <allen.chen@ite.com.tw>

Change power sequence to meet it6505 data sheet requirement when boot on.

Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
Signed-off-by: Allen Chen <allen.chen@ite.com.tw>

---
 drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Robert Foss July 12, 2022, 8:07 a.m. UTC | #1
Hi Allen,

On Thu, 7 Jul 2022 at 10:06, allen <allen.chen@ite.com.tw> wrote:
>
> From: allen chen <allen.chen@ite.com.tw>
>
> Change power sequence to meet it6505 data sheet requirement when boot on.
>
> Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
> Signed-off-by: Allen Chen <allen.chen@ite.com.tw>
>
> ---
>  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> index 2d119e3016b3..aa5e0aa1af85 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -3029,7 +3029,7 @@ static int it6505_init_pdata(struct it6505 *it6505)
>                 return PTR_ERR(pdata->ovdd);
>         }
>
> -       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
> +       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);

Making this change is problematic since it requires a corresponding
change in all of the device trees that use this device. It's against
policy to change this interface after it has been introduced.

Unless anyone thinks otherwise, I would like to see this patch dropped.

>         if (IS_ERR(pdata->gpiod_reset)) {
>                 dev_err(dev, "gpiod_reset gpio not found");
>                 return PTR_ERR(pdata->gpiod_reset);
> --
> 2.25.1
>
Pin-yen Lin July 12, 2022, 9:08 a.m. UTC | #2
Hi Robert,

On Tue, Jul 12, 2022 at 4:07 PM Robert Foss <robert.foss@linaro.org> wrote:
>
> Hi Allen,
>
> On Thu, 7 Jul 2022 at 10:06, allen <allen.chen@ite.com.tw> wrote:
> >
> > From: allen chen <allen.chen@ite.com.tw>
> >
> > Change power sequence to meet it6505 data sheet requirement when boot on.
> >
> > Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
> > Signed-off-by: Allen Chen <allen.chen@ite.com.tw>
> >
> > ---
> >  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> > index 2d119e3016b3..aa5e0aa1af85 100644
> > --- a/drivers/gpu/drm/bridge/ite-it6505.c
> > +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> > @@ -3029,7 +3029,7 @@ static int it6505_init_pdata(struct it6505 *it6505)
> >                 return PTR_ERR(pdata->ovdd);
> >         }
> >
> > -       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
> > +       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
>
> Making this change is problematic since it requires a corresponding
> change in all of the device trees that use this device. It's against
> policy to change this interface after it has been introduced.
>
> Unless anyone thinks otherwise, I would like to see this patch dropped.

I don't really understand why this would require corresponding change
in device trees.

Currently there's no real it6505 user on upstream. Also, the GPIO
value will be changed
in it6505_poweron, so this change only affects the power on sequence of it6505.

>
> >         if (IS_ERR(pdata->gpiod_reset)) {
> >                 dev_err(dev, "gpiod_reset gpio not found");
> >                 return PTR_ERR(pdata->gpiod_reset);
> > --
> > 2.25.1
> >
Chen-Yu Tsai July 12, 2022, 9:41 a.m. UTC | #3
On Tue, Jul 12, 2022 at 4:08 PM Robert Foss <robert.foss@linaro.org> wrote:
>
> Hi Allen,
>
> On Thu, 7 Jul 2022 at 10:06, allen <allen.chen@ite.com.tw> wrote:
> >
> > From: allen chen <allen.chen@ite.com.tw>
> >
> > Change power sequence to meet it6505 data sheet requirement when boot on.
> >
> > Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
> > Signed-off-by: Allen Chen <allen.chen@ite.com.tw>
> >
> > ---
> >  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> > index 2d119e3016b3..aa5e0aa1af85 100644
> > --- a/drivers/gpu/drm/bridge/ite-it6505.c
> > +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> > @@ -3029,7 +3029,7 @@ static int it6505_init_pdata(struct it6505 *it6505)
> >                 return PTR_ERR(pdata->ovdd);
> >         }
> >
> > -       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
> > +       pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
>
> Making this change is problematic since it requires a corresponding
> change in all of the device trees that use this device. It's against
> policy to change this interface after it has been introduced.
>
> Unless anyone thinks otherwise, I would like to see this patch dropped.

I think you're confusing GPIO_ACTIVE_{LOW,HIGH} flags in the device tree
vs GPIOD_OUT_{LOW,HIGH}, which just sets the "default" state the GPIO
should be in when it is requested.

This change doesn't impact the device tree.


Regards
ChenYu

> >         if (IS_ERR(pdata->gpiod_reset)) {
> >                 dev_err(dev, "gpiod_reset gpio not found");
> >                 return PTR_ERR(pdata->gpiod_reset);
> > --
> > 2.25.1
> >
Robert Foss July 12, 2022, 9:55 a.m. UTC | #4
Hi,




On Tue, Jul 12, 2022, 11:41 Chen-Yu Tsai <wenst@chromium.org> wrote:

> On Tue, Jul 12, 2022 at 4:08 PM Robert Foss <robert.foss@linaro.org>
> wrote:
> >
> > Hi Allen,
> >
> > On Thu, 7 Jul 2022 at 10:06, allen <allen.chen@ite.com.tw> wrote:
> > >
> > > From: allen chen <allen.chen@ite.com.tw>
> > >
> > > Change power sequence to meet it6505 data sheet requirement when boot
> on.
> > >
> > > Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
> > > Signed-off-by: Allen Chen <allen.chen@ite.com.tw>
> > >
> > > ---
> > >  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/bridge/ite-it6505.c
> b/drivers/gpu/drm/bridge/ite-it6505.c
> > > index 2d119e3016b3..aa5e0aa1af85 100644
> > > --- a/drivers/gpu/drm/bridge/ite-it6505.c
> > > +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> > > @@ -3029,7 +3029,7 @@ static int it6505_init_pdata(struct it6505
> *it6505)
> > >                 return PTR_ERR(pdata->ovdd);
> > >         }
> > >
> > > -       pdata->gpiod_reset = devm_gpiod_get(dev, "reset",
> GPIOD_OUT_HIGH);
> > > +       pdata->gpiod_reset = devm_gpiod_get(dev, "reset",
> GPIOD_OUT_LOW);
> >
> > Making this change is problematic since it requires a corresponding
> > change in all of the device trees that use this device. It's against
> > policy to change this interface after it has been introduced.
> >
> > Unless anyone thinks otherwise, I would like to see this patch dropped.
>
> I think you're confusing GPIO_ACTIVE_{LOW,HIGH} flags in the device tree
> vs GPIOD_OUT_{LOW,HIGH}, which just sets the "default" state the GPIO
> should be in when it is requested.
>
> This change doesn't impact the device tree.
>

Thanks ChenYu, you are 100% right.


Reviewed-by: Robert Foss <robert.foss@linaro.org>


>
> Regards
> ChenYu
>
> > >         if (IS_ERR(pdata->gpiod_reset)) {
> > >                 dev_err(dev, "gpiod_reset gpio not found");
> > >                 return PTR_ERR(pdata->gpiod_reset);
> > > --
> > > 2.25.1
> > >
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 2d119e3016b3..aa5e0aa1af85 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -3029,7 +3029,7 @@  static int it6505_init_pdata(struct it6505 *it6505)
 		return PTR_ERR(pdata->ovdd);
 	}
 
-	pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+	pdata->gpiod_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
 	if (IS_ERR(pdata->gpiod_reset)) {
 		dev_err(dev, "gpiod_reset gpio not found");
 		return PTR_ERR(pdata->gpiod_reset);