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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcyvEdkzx4emYwssdYuqAiPdx5iqc-tY74_ebZfLKKM3A@mail.gmail.com>
Date:   Thu, 19 Oct 2023 11:56:54 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Dmitry Rokosov <ddrokosov@...utedevices.com>
Cc:     lee@...nel.org, pavel@....cz, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        kernel@...rdevices.ru, rockosov@...il.com,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-leds@...r.kernel.org
Subject: Re: [PATCH v2 02/11] leds: aw200xx: support HWEN hardware control

On Wed, Oct 18, 2023 at 9:29 PM Dmitry Rokosov
<ddrokosov@...utedevices.com> wrote:
>
> HWEN is hardware control, which is used for enable/disable aw200xx chip.
> It's high active, internally pulled down to GND.
>
> After HWEN pin set high the chip begins to load the OTP information,
> which takes 200us to complete. About 200us wait time is needed for
> internal oscillator startup and display SRAM initialization. After
> display SRAM initialization, the registers in page 1 to page 5 can be
> configured via i2c interface.

Is there any Documentation update for this new binding?

...

> +       chip->hwen = devm_gpiod_get_optional(&client->dev, "hwen", GPIOD_OUT_HIGH);

With _optional APIs we distinguish 3 cases: found, not found, error.
And error can be (among others) the deferred probe, meaning that GPIO
_is coming_. Hence the rule of thumb for the _optional() APIs is to
check for error and bail out on that condition (note, it's applicable
to any _optional() APIs, not limited by GPIO library).

...

>         aw200xx_chip_reset(chip);
> +       aw200xx_disable(chip);

It seems it can be modeled as a (GPIO) regulator. At least many
drivers do so, but I leave this to the maintainers to decide.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ