Re: [PATCH v4] regulator: new drivers for AD5398 and AD5821

From: Mark Brown
Date: Thu Jun 03 2010 - 13:03:01 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/