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]
Date:	Thu, 30 Jun 2016 21:32:05 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	apronin@...omium.org, Mark Brown <broonie@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-spi <linux-spi@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 2/4] spi: Document option to wake a device by toggling CS

Hi,

On Thu, Jun 30, 2016 at 12:12 AM, Geert Uytterhoeven
<geert@...ux-m68k.org> wrote:
> CC devicetree

And Rob and Mark...

 ./scripts/get_maintainer.pl -f
Documentation/devicetree/bindings/spi/spi-bus.txt

Mark Brown <broonie@...nel.org> (maintainer:SPI SUBSYSTEM)
Rob Herring <robh+dt@...nel.org> (maintainer:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS)
Mark Rutland <mark.rutland@....com> (maintainer:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS)
linux-spi@...r.kernel.org (open list:SPI SUBSYSTEM)
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
DEVICE TREE BINDINGS)
linux-kernel@...r.kernel.org (open list)


> On Thu, Jun 30, 2016 at 5:54 AM,  <apronin@...omium.org> wrote:
>> From: Andrey Pronin <apronin@...omium.org>
>>
>> Some SPI devices may go to sleep after a period of inactivity
>> on SPI. For such devices, if enough time has passed since the
>> last SPI transaction, toggle CS and wait for the device to
>> start before communicating with it.
>>
>> Signed-off-by: Andrey Pronin <apronin@...omium.org>
>> ---
>>  Documentation/devicetree/bindings/spi/spi-bus.txt | 7 +++++++
>>  1 file changed, 7 insertions(+)

Overall note is that devicetree bindings patches should be _before_
the code that uses them, so you should swap patch #1 and patch #2.

>>
>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
>> index 42d5954..1b7ffd4 100644
>> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
>> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
>> @@ -63,6 +63,13 @@ contain the following properties.
>>                        used for MISO. Defaults to 1 if not present.
>>  - spi-rx-delay-us  - (optional) Microsecond delay after a read transfer.
>>  - spi-tx-delay-us  - (optional) Microsecond delay after a write transfer.
>> +- cs-wake-after-sleep - (optional) Device may go to sleep after a period
>> +               of SPI inactivity. If this flag is set, toggle CS and
>> +               wait for it to wake before communicating to it.

You probably also need a property for how long it needs to be asserted
when you "toggle" it?

>> +- cs-sleep-delay  - (optional) Delay after which the device may go to
>> +               sleep if there was no SPI activity (msec).
>> +- cs-wake-duration - (optional) Time it takes the device to wake up after
>> +               toggling CS if it went to sleep (msec).

I believe that from your code the second two properties are both
required if the first property is set.  That should be in the
bindings.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ