On Wed, Apr 18, 2012 at 01:19:31PM -0700, Rhyland Klein wrote: > On Wed, 2012-04-18 at 13:03 -0700, Rhyland Klein wrote: > > Which interface are you saying is broken? The regmap interface or the > > one internal to the tps65910 code? This driver is broken. > > So to be clear... Your recommendation is to change the tps65910 code to > > remove the common read/write callbacks and to use regmap directly in > > each component, and then when using regmap, do use the regmap raw > > functions instead of the bulkread/write? > Looking at the code, I would think it makes more sense use regmap_read > which enforces types since the tps65910 code only ever seems to use > regmap to access a single register at a time. Do you agree? Yes, for single register I/O the drivers should just be using the per-register APIs regmap has if they're using regmap directly. Having wrappers for this in the header would be fine also, the things that are really problematic about the current code are the void * usage and the fact that individual drivers are writing register read/write functions. If the driver wasn't using void * this bug would've been caught by the compiler.
Attachment:
signature.asc
Description: Digital signature