lkml.org 
[lkml]   [2012]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [RFC] regmap: Add no-"bus" configuration possibility
On Sat, Nov 03, 2012 at 05:18:17PM -0700, Andrey Smirnov wrote:

Sorry about the delay - like I say the patch was unfortunately sent
during ELC-E.

> This patch adds two callbacks to the 'regmap' configuration which user
> is expected to set with their implementation of read and write
> functionality for the device.

So, this is where I think we want to end up but a couple of high level
issues I'm seeing, both fairly easy to deal with I suspect.

> + int (*nbstr_read)(void *context, unsigned int reg, unsigned int *val);
> + int (*nbstr_write)(void *context, unsigned int reg, unsigned int val);

One issue is that I find the 'nbstr' name totally unparasable. It looks
like some sort of string or something. Just call the ops reg_ and have
done with it I think...

The other is that rather than have special cases for this I think what
we should be doing is refactoring the code so that the existing bus
based I/O fills in these ops. That will keep the code more maintainable
in the long run since there won't be magic special cases that don't get
much testing or can be missed when doing updates.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-11-20 13:01    [W:0.078 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site