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: <CACPK8Xei8nbZ0LfZn+7xfLi2LZroS7Nq7wXBwRy6b5pZkWqzRQ@mail.gmail.com>
Date:   Tue, 31 Oct 2017 11:34:49 +1030
From:   Joel Stanley <joel@....id.au>
To:     Philipp Zabel <philipp.zabel@...il.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Rick Altherr <raltherr@...gle.com>,
        Rob Herring <robh+dt@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio@...r.kernel.org, devicetree <devicetree@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: adc: aspeed: Deassert reset in probe

On Tue, Oct 31, 2017 at 11:02 AM, Joel Stanley <joel@....id.au> wrote:
> On Tue, Oct 31, 2017 at 2:51 AM, Philipp Zabel <philipp.zabel@...il.com> wrote:
>> Hi Joel,
>>
>> On Mon, Oct 30, 2017 at 8:22 AM, Joel Stanley <joel@....id.au> wrote:
>>> The ASPEED SoC must deassert a reset in order to use the ADC peripheral.
>>>
>>> The device tree bindings are updated to document the resets phandle, and
>>> the example is updated to match what is expected for both the reset and
>>> clock phandle.
>>>
>>> Signed-off-by: Joel Stanley <joel@....id.au>
>>> ---
>>>  .../devicetree/bindings/iio/adc/aspeed_adc.txt      |  4 +++-
>>>  drivers/iio/adc/aspeed_adc.c                        | 21 ++++++++++++++++-----
>>>  2 files changed, 19 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
>>> index 674e133b7cd7..034fc2ba100e 100644
>>> --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
>>> +++ b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
>>> @@ -8,6 +8,7 @@ Required properties:
>>>  - reg: memory window mapping address and length
>>>  - clocks: Input clock used to derive the sample clock. Expected to be the
>>>            SoC's APB clock.
>>> +- resets: Reset controller phandle
>>
>> Adding new required properties to existing bindings would break backwards
>> compatibility. In this case, the reset is optional anyway.
>
> As far as the hardware is concerned (and therefore the bindings), the
> reset is required.
>
> To date the only reason the driver worked was an out of tree hack in
> mach-aspeed. I have written a clk/reset driver and are now working to
> ensure the drivers work correctly.
>
> The driver is written to make the reset optional as it's unlikely the
> clk/reset driver and device tree updates will land this merge window.
> As we say; the bindings should describe the hardware, not the Linux
> implementation of the driver.

I changed my mind. No one would have been able to successfully use
this driver without out of tree hacks to release the reset, so we are
not regressing any functionality by requiring the reset controller.

I will submit v2 with the controller required, and save any stuffing
around in the future.

Cheers,

Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ