lkml.org 
[lkml]   [2012]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V1 1/2] mfd: tps65910: use regmap for device register access.
On Thu, Feb 09, 2012 at 10:33:01AM +0530, Laxman Dewangan wrote:
> On Wednesday 08 February 2012 07:28 PM, Mark Brown wrote:

> >But that's just raw_write(), there's no benefit to the additional API
> >call.

> raw_write supported for the volatile register only.

That's an implementation detail since there's little if any use case for
such use, the main use of raw_write() is dumping blocks of data like
firmwares and coefficients which are rarely cached.

> I require an api which can work for volatile as well as non-volatile
> registers.
> Either extend raw_write to support both cases (remove warning and
> handle properly) or add bulk_write.

> I think as bulk_read is there and so having bulk_write on same line
> should be OK.

Note that there's a very important difference between the bulk and raw
versions of the API which you're not taking into account: the bulk
version takes care of endianness differences between the device and the
host. This would mean that for send we'd need to rewrite the input
array which means we have to take a copy of the data as we probably
shouldn't be changing the input data.

Indeed, looking at the drivers in mainline I can't actually see any of
them which do block writes.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-02-09 12:59    [W:0.046 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site