lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] regulator: new driver for the AD5398 and AD5821
Date
On Tue 1 Jun 2010 10:37, Mark Brown pondered:
> On Tue, Jun 01, 2010 at 09:33:58AM -0400, Mike Frysinger wrote:
> > From: Sonic Zhang <sonic.zhang@analog.com>
>
> > This driver supports both the AD5398 and the AD5821. It adapts into the
> > voltage and current framework. The generic userspace-consumer and virtual
>
> Might be useful to put something here saying what these chips do...

[snip]

> > +/**
> > + * ad5398_platform_data - platform data for ad5398
> > + * @current_bits: effective bits in register
> > + * @current_offset: offset of effective bits in register
> > + * @ad5398_init_data: regulator init data
> > + */
> > +struct ad5398_platform_data {
> > + unsigned short current_bits;
> > + unsigned short current_offset;
> > + struct regulator_init_data *regulator_data;
> > +};
>
> 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...

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

-Robin


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