Thread (17 messages) 17 messages, 3 authors, 2013-05-24

[RFC 3/8] mfd:syscon: Introduce claim/read/write/release APIs

From: broonie@kernel.org (Mark Brown)
Date: 2013-05-09 13:26:46
Also in: linux-devicetree, linux-serial, lkml

On Thu, May 09, 2013 at 12:58:01PM +0100, Srinivas KANDAGATLA wrote:
Currently, we have two bits of information which come from device trees.
1> The syscon bank/group definition itself.
2> syscon register offsets and bits information to the drivers.
These are the 2 things which keep changing per each SOC.
There is no other way to pass this information to the drivers other than
passing them as part of their own device node and syscon node.
Sure there is, for example the drivers could have this information
internally as part of knowing which device they're working with or they
could take advantage of some patterns in the register map to store some
higher level information that they use to configure.
quoted
 and to the extent that it is sensible it feels like something
which might be useful with any device using register maps, not just
syscon.
If you think this is going to be useful for other drivers, Am happy to
move this out of syscon to regmap something like adding
of_regmap_field_claim/regmap_field_claim/regmap_field_read/regmap_field_write/regmap_field_release
functions.
so any exiting drivers can still use the old syscon API to get the
regmap instance.
Alternatively they can use the new regmap APIs directly.
Well, I'd need to see the code to decide if it was sane but I do think
that if this is a good approach it's not syscon specific.  Anything like
this needs to be independent of DT too since not all architectures use
DT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130509/4d182b81/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help