From: Brian Norris <briannorris@chromium.org>
To: Lin Huang <hl@rock-chips.com>
Cc: thierry.reding@gmail.com, zyw@rock-chips.com,
seanpaul@chromium.org, nickey.yang@rock-chips.com,
airlied@linux.ie, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Derek Basehore <dbasehore@chromium.org>
Subject: Re: [RESENT PATCH] drm/panel: support Innolux P097PFG panel
Date: Thu, 30 Nov 2017 18:54:59 -0800 [thread overview]
Message-ID: <20171201025457.GA142685@google.com> (raw)
In-Reply-To: <1512022480-7015-1-git-send-email-hl@rock-chips.com>
One more comment:
On Thu, Nov 30, 2017 at 02:14:40PM +0800, Lin Huang wrote:
> Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel,
> it refactor Innolux P079ZCA panel driver, let it support
> multi panel, and add support P097PFG panel in this driver.
>
> Signed-off-by: Lin Huang <hl@rock-chips.com>
>
> ---
> drivers/gpu/drm/panel/panel-innolux-p079zca.c | 178 ++++++++++++++++++++------
> 1 file changed, 136 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..a40798f 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
...
> @@ -209,20 +284,39 @@ static const struct drm_panel_funcs innolux_panel_funcs = {
> };
>
> static const struct of_device_id innolux_of_match[] = {
> - { .compatible = "innolux,p079zca", },
> - { }
> + { .compatible = "innolux,p079zca",
> + .data = &innolux_p079zca_panel_desc
> + },
> + { .compatible = "innolux,p097pfg",
> + .data = &innolux_p097pfg_panel_desc
> + }
> };
> MODULE_DEVICE_TABLE(of, innolux_of_match);
>
> -static int innolux_panel_add(struct innolux_panel *innolux)
> +static int innolux_panel_add(struct mipi_dsi_device *dsi,
> + const struct panel_desc_dsi *desc)
> {
> - struct device *dev = &innolux->link->dev;
> + struct innolux_panel *innolux;
> + struct device *dev = &dsi->dev;
> struct device_node *np;
> int err;
>
> - innolux->supply = devm_regulator_get(dev, "power");
> - if (IS_ERR(innolux->supply))
> - return PTR_ERR(innolux->supply);
> + innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL);
> + if (!innolux)
> + return -ENOMEM;
> +
> + innolux->dsi_desc = desc;
> + innolux->vddi = devm_regulator_get_optional(dev, "power");
> + if (IS_ERR(innolux->vddi))
> + return PTR_ERR(innolux->vddi);
> +
> + innolux->avdd = devm_regulator_get(dev, "ppvarp");
This name ("ppvarp" and the "ppvarn" below) are names from our board
schematics, not from the panel datasheet. I would think these should be
"vdd" and "vee", like your variable names.
Brian
> + if (IS_ERR(innolux->avdd))
> + return PTR_ERR(innolux->avdd);
> +
> + innolux->avee = devm_regulator_get(dev, "ppvarn");
> + if (IS_ERR(innolux->avee))
> + return PTR_ERR(innolux->avee);
>
> innolux->enable_gpio = devm_gpiod_get_optional(dev, "enable",
> GPIOD_OUT_HIGH);
...
next prev parent reply other threads:[~2017-12-01 2:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 6:14 [RESENT PATCH] drm/panel: support Innolux P097PFG panel Lin Huang
2017-12-01 2:28 ` Brian Norris
2017-12-01 2:54 ` Brian Norris [this message]
2017-12-01 3:06 ` hl
2017-12-04 13:37 ` Lothar Waßmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171201025457.GA142685@google.com \
--to=briannorris@chromium.org \
--cc=airlied@linux.ie \
--cc=dbasehore@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hl@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickey.yang@rock-chips.com \
--cc=seanpaul@chromium.org \
--cc=thierry.reding@gmail.com \
--cc=zyw@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox