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: <181dafaa-ec04-43cd-b0a4-208da8cd89e9@baylibre.com>
Date: Tue, 26 Aug 2025 10:11:09 -0500
From: David Lechner <dlechner@...libre.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Michael Hennerich <Michael.Hennerich@...log.com>,
 Jonathan Cameron <jic23@...nel.org>, Nuno Sá
 <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] iio: adc: ad7124: add clock output support

On 8/26/25 3:13 AM, Andy Shevchenko wrote:
> On Tue, Aug 26, 2025 at 1:55 AM David Lechner <dlechner@...libre.com> wrote:
>>
>> Add support for the AD7124's internal clock output. If the #clock-cells
>> property is present, turn on the internal clock output during probe.
>>
>> If both the clocks and #clock-names properties are present (not allowed
>> by devicetree bindings), assume that an external clock is being used so
>> that we don't accidentally have two outputs fighting each other.
> 
> ...
> 
>>  static const int ad7124_master_clk_freq_hz[3] = {
>> -       [AD7124_LOW_POWER] = 76800,
>> -       [AD7124_MID_POWER] = 153600,
>> -       [AD7124_FULL_POWER] = 614400,
>> +       [AD7124_LOW_POWER] = AD7124_INT_CLK_HZ / 8,
>> +       [AD7124_MID_POWER] = AD7124_INT_CLK_HZ / 4,
>> +       [AD7124_FULL_POWER] = AD7124_INT_CLK_HZ,
> 
> Perhaps / 1 ?

Seems redundant.

> 
>>  };
> 
> ...
> 
>> +               const char *name __free(kfree) = kasprintf(GFP_KERNEL, "%s-clk",
>> +                       fwnode_get_name(dev_fwnode(dev)));
> 
> What's wrong with the %pfwP specifier?

I didn't know about it.

> 
>> +               if (!name)
>> +                       return -ENOMEM;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ