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: <Y8p/ZOj+wUf5os5o@sirena.org.uk>
Date:   Fri, 20 Jan 2023 11:47:48 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Bjorn Andersson <quic_bjorande@...cinc.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 2/4] regulator: Introduce Maxim MAX20411 Step-Down
 converter

On Thu, Jan 19, 2023 at 01:47:47PM -0800, Bjorn Andersson wrote:

> +	desc->ops = &max20411_ops;
> +	desc->owner = THIS_MODULE;
> +	desc->type = REGULATOR_VOLTAGE;
> +	desc->supply_name = "vin";
> +	desc->name = "max20411";
> +
> +	/*
> +	 * voltage = 0.24375V + selector * 6.25mV
> +	 * with valid selector between 41 to 165 (0.5V to 1.275V)
> +	 */
> +	desc->min_uV = MAX20411_BASE_UV;
> +	desc->uV_step = MAX20411_UV_STEP;
> +	desc->linear_min_sel = MAX20411_MIN_SEL;
> +	desc->n_voltages = MAX20411_MAX_SEL;

Doesn't really matter either way but the more normal way to write
this is to have a static struct with all the fixed values in it
rather than dynamically initialising one at runtime.  Otherwise
this looks good.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ