Re: [RESEND PATCH v3 1/3] drm/panel: refactor INNOLUX P079ZCA panel driver

From: Brian Norris
Date: Wed Dec 13 2017 - 15:46:43 EST


Hi HL,

On Mon, Dec 04, 2017 at 03:17:48PM +0800, Lin Huang wrote:
> Refactor Innolux P079ZCA panel driver, let it support
> multi panel.
>
> Signed-off-by: Lin Huang <hl@xxxxxxxxxxxxxx>
> ---
> Changes in v2:
> - Change regulator property name to meet the panel datasheet
> Changes in v3:
> - this patch only refactor P079ZCA panel to support multi panel, support P097PFG panel in another patch
>
> drivers/gpu/drm/panel/panel-innolux-p079zca.c | 147 ++++++++++++++++++--------
> 1 file changed, 105 insertions(+), 42 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index 6ba9344..1597744 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
...

> @@ -134,12 +162,13 @@ static int innolux_panel_prepare(struct drm_panel *panel)
> return 0;
>
> poweroff:
> - regulator_err = regulator_disable(innolux->supply);

I think 'regulator_err' is unused after this patch. Please remove it.

> - if (regulator_err)
> - DRM_DEV_ERROR(panel->dev, "failed to disable regulator: %d\n",
> - regulator_err);
> -
> gpiod_set_value_cansleep(innolux->enable_gpio, 0);
> + regulator_disable(innolux->avee);
> +disable_avdd:
> + regulator_disable(innolux->avdd);
> +disable_vddi:
> + regulator_disable(innolux->vddi);
> +
> return err;
> }
>

...

> @@ -209,20 +256,36 @@ static const struct drm_panel_funcs innolux_panel_funcs = {
> };
>
> static const struct of_device_id innolux_of_match[] = {
> - { .compatible = "innolux,p079zca", },
> - { }

You're deleting this terminator. Please don't.

> + { .compatible = "innolux,p079zca",
> + .data = &innolux_p079zca_panel_desc
> + },
> };
> MODULE_DEVICE_TABLE(of, innolux_of_match);
>

...

Brian