lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2358142.UaIIZZriA2@phil>
Date:   Thu, 14 Jun 2018 14:49:05 +0200
From:   Heiko Stuebner <heiko@...ech.de>
To:     dri-devel@...ts.freedesktop.org
Cc:     Emil Velikov <emil.l.velikov@...il.com>,
        Lin Huang <hl@...k-chips.com>, David Airlie <airlied@...ux.ie>,
        Brian Norris <briannorris@...omium.org>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH v4 1/3] drm/panel: refactor INNOLUX P079ZCA panel driver

Am Mittwoch, 14. März 2018, 13:02:13 CEST schrieb Emil Velikov:
> Hi Lin,
> 
> On 14 March 2018 at 09:12, Lin Huang <hl@...k-chips.com> wrote:
> > From: huang lin <hl@...k-chips.com>
> >
> > Refactor Innolux P079ZCA panel driver, let it support
> > multi panel.
> >
> > Change-Id: If89be5e56dba8cb498e2d50c1bbeb0e8016123a2
> > Signed-off-by: Lin Huang <hl@...k-chips.com>

[...]

> > @@ -207,19 +248,28 @@ static const struct drm_panel_funcs innolux_panel_funcs = {
> 
> >
> > -       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->desc = desc;
> > +       innolux->vddi = devm_regulator_get(dev, "power");
> > +       innolux->avdd = devm_regulator_get(dev, "avdd");
> > +       innolux->avee = devm_regulator_get(dev, "avee");
> >
> AFAICT devm_regulator_get returns a pointer which is unsuitable to be
> passed into regulator_{enable,disable}.
> Hence, the IS_ERR check should stay. If any of the regulators are
> optional, you want to call regulator_{enable,disable} only as
> applicable.

using the regulator_bulk APIs should help to make this far easier,
as you can just define the per-panel supplies in in the panel_desc
and then get + enable the correct ones per bound panel.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ