lkml.org 
[lkml]   [2014]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] Add ltc3562 voltage regulator driver
On Fri, Oct 31, 2014 at 03:07:57PM +0100, Mike Looijmans wrote:
> On 30-10-2014 17:51, Mark Brown wrote:

> >This appears to be reimplementing regmap (including a cache). Please
> >use that instead. Pretty much the entire driver could then be replaced
> >with the regmap helpers, none of the operations look like they'd be
> >needed, and you'd get the regmap diagnostic infrastructure.

> The chip doesn't have an I2C register map, it uses "commands".
> It does not support read transactions at all, it will NACK those. The first
> byte contains a bit mask that tells which outputs are to be configured and
> in what mode, the next is the enable bit and setpoint value. The first byte
> already contains data, it's not just an address.

If that's the case the code is really rather unclear about what it's
doing - the use of "reg" for what's being written doesn't help, nor does
the fact that what looks like a cache is being kept. The code should
either use regmap or make it clear why that doesn't fit well.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-10-31 19:41    [W:0.093 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site