lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] regulator: new driver for the AD5398 and AD5821
On Thu, Jun 03, 2010 at 02:59:53PM -0400, Robin Getz wrote:
> On Tue 1 Jun 2010 10:37, Mark Brown pondered:

> > Why are the current bits and offset being suppied as platform data? I
> > would *very* strongly expect that the location of the control in the
> > register will be fixed by the device type and should therefore be
> > figured out by the driver. Having the machine specifying this seems
> > redundant and error prone.

> Since the parts are general purpose (their not PMU, but people use them to
> build their own PCB defined power management system) - so it depends on the
> PCB implementation...

Please look more closely at what's actually being done by the code here.
This is controlling the location of the bitfields in the register map.
It would be exceptionally unusal for the PCB design and layout to affect
the register map of the device at all - this will be fixed in silicon no
matter how the system is wired up. Even without a regulator framework
there would be no need to specify where the bitfields in the register
map are located via platform data.

As far as system specific integration goes the regulator driver should
only be worrying about the properties of the chip, other parts of the
regulator API handle the board-specific setup.

> http://www.analog.com/ad5398
> http://www.analog.com/ad5821
> are both I2C D/A Converter, with 120mA sink capability

This is not at all unusual for drivers/regulator except in that it's a
current regulator and voltage regulators are very much more common.


\
 
 \ /
  Last update: 2010-06-03 21:11    [W:1.053 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site