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:	Tue, 06 Sep 2011 12:32:41 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	LKML <linux-kernel@...r.kernel.org>,
	anish kumar <anish198519851985@...il.com>
Subject: Re: Blockers on IIO usage of regmap.

On 09/06/11 12:14, Jonathan Cameron wrote:
> Hi Mark,
> 
> Just a quick heads up that the big blocker for
> us making more use of regmap is lack of default
> control of cs_change for spi buses.  That leads to
> a lot of hand crafted spi read / write routines and
> is rather tedious.
> 
> When I have the time I'll look into sorting that side
> out.
> 
> Also, we will need a couple of variants of bulk read for
> spi. Classic ones are 
> 
> TX  Add0...Add7 XXXXXXXXXXX  XXXXXXXXXXX  XXXXXXXX
> RX  XXXXXXXXXXX Da0.....Da7  Db0.....Db7  etc
oops, been a bit inconsistent here. Add0 should have been
Ada0 for first address. (thanks Anish)  To clarify

Ada0..Ada7 is the address of first register for bulk read
(address incrementing assumed for later addresses)
Da0...Da7 is the data from that address.
XXXX is don't care.
> 
> TX  Add0...Add7 XXXXXXXXXXX  XXXXXXXXXXX  XXXXXXXXXX
> RX  XXXXXXXXXXX XXXXXXXXXXX  Da0.....Da7  Db0....Db7
> 
> TX  Ada0...Ada7  Adb1...Adb7 Adc1...Adc7  etc
> RX  XXXXXXXXXXX  Da0.....Da7 Db0.....Db7  etc

One more common varient is a 'magic' register read which corresponds to
read all in a cyclic fashion.  That one would be nasty for caching as
it won't be obvious to regmap which registers were actually read.  
> 
> Last one is a kind of 'simulated' bulk read where address is simply incremented
> (just for complexity that increment may well be by 2 rather than one...)
> That one is only sort of a 'bulk' read, but rather common.
> 
> So basically we need some bus specific 'mode' hook somewhere.
> Given we have separate init functions for the buses could we
> add a struct regmap_spi_config to the parameter list?
> 
> IIRC IIO has several drivers in each of the above categories so sharing
> the code via regmap would be great!
> 
> What do you think?
> 
> Jonathan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ