[RFC PATCH 3/3] drm/panel: panel-sharp-ls043t1le01: Use panel-common helpers

Emil Velikov emil.l.velikov at gmail.com
Sat Mar 25 14:39:03 UTC 2017


On 16 March 2017 at 22:08, Sean Paul <seanpaul at chromium.org> wrote:

>  static const struct drm_display_mode default_mode = {
> @@ -259,14 +238,14 @@ static const struct drm_panel_funcs sharp_nt_panel_funcs = {
>  static int sharp_nt_panel_add(struct sharp_nt_panel *sharp_nt)
>  {
>         struct device *dev = &sharp_nt->dsi->dev;
> -       struct device_node *np;
>         int ret;
>
>         sharp_nt->mode = &default_mode;
>
> -       sharp_nt->supply = devm_regulator_get(dev, "avdd");
> -       if (IS_ERR(sharp_nt->supply))
> -               return PTR_ERR(sharp_nt->supply);
> +       ret = panel_common_init(dev, &sharp_nt->common, "avdd", "",
> +                               "backlight");
Skimming through the GPIO APi documentation does not say what will
happen if we have an empty string for the con_id.
Might be better to pass NULL [for either supply, gpio or backlight
name] and omit the setup of the component ?

Regards,
Emil


More information about the dri-devel mailing list