lkml.org 
[lkml]   [2010]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] regulator: new drivers for AD5398 and AD5821
On Thu, Jun 03, 2010 at 11:27:20AM +0800, sonic zhang wrote:

> The AD5398 and AD5821 are single 10-bit DAC with 120 mA output current
> sink capability. They feature an internal reference and operates from
> a single 2.7 V to 5.5 V supply.

> This driver supports both the AD5398 and the AD5821. It adapts into the
> voltage and current framework.

Looks good, just a few fairly small things.

> + if (chip->min_uA < init_data->constraints.min_uA)
> + chip->user_min_uA = init_data->constraints.min_uA;
> + else
> + chip->user_min_uA = chip->min_uA;
> + if (chip->max_uA > init_data->constraints.max_uA)
> + chip->user_max_uA = init_data->constraints.max_uA;
> + else
> + chip->user_max_uA = chip->max_uA;

Your driver should not be worrying about the constraints, the regulator
core will take care of enforcing them.

> +MODULE_DESCRIPTION("AD5398 and AD5821 current regulator driver");
> +MODULE_AUTHOR("Sonic Zhang");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:ad5398-regulator");

This is an I2C device, not a platform device.


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