Blockers on IIO usage of regmap.

From: Jonathan Cameron
Date: Tue Sep 06 2011 - 07:06:42 EST


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

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

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/