[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121120110845.GI10560@opensource.wolfsonmicro.com>
Date: Tue, 20 Nov 2012 20:08:47 +0900
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Andrey Smirnov <andrey.smirnov@...vergeddevices.net>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists