On Fri, Mar 09, 2012 at 10:58:34AM +0100, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> > I've modify the patch based on your review. However, the last one cannot
> > be made because regulator_unregister is void return.
> so we have a issue here regulator_unregister MUST return an error conde
The e
> + if (anatop_reg->control_reg) {
> + sel = (uv - anatop_reg->min_voltage) / 25000;
sel = DIV_ROUND_UP(uv - anatop_reg->min_voltage, 25000);
Use DIV_ROUND_UP to avoid the possible truncate of integer division.
This ensures the selected volatge falls within the specified range
On 16:00 Fri 09 Mar , Ying-Chun Liu (PaulLiu) wrote:
> (2012年03月08日 22:18), Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> +static int __devexit anatop_regulator_remove(struct platform_device *pdev)
> >> +{
> >> + struct regulator_dev *rdev = platform_get_drvdata(pdev);
> >> + struct anatop_reg
> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -213,6 +213,14 @@ config REGULATOR_PCAP
> This driver provides support for the voltage regulators of the
> PCAP2 PMIC.
>
> +config REGULATOR_ANATOP
> + tristate "Freescale i.MX on-chip ANATOP LDO regulato
(2012年03月08日 22:18), Jean-Christophe PLAGNIOL-VILLARD wrote:
>> +static int __devexit anatop_regulator_remove(struct platform_device *pdev)
>> +{
>> +struct regulator_dev *rdev = platform_get_drvdata(pdev);
>> +struct anatop_regulator *sreg = rdev_get_drvdata(rdev);
>> +kfree(sreg->name
On 17:59 Thu 08 Mar , Ying-Chun Liu (PaulLiu) wrote:
> From: "Ying-Chun Liu (PaulLiu)"
>
> Anatop is an integrated regulator inside i.MX6 SoC.
> There are 3 digital regulators which controls PU, CORE (ARM), and SOC.
> And 3 analog regulators which controls 1P1, 2P5, 3P0 (USB).
> This patch ad
From: "Ying-Chun Liu (PaulLiu)"
Anatop is an integrated regulator inside i.MX6 SoC.
There are 3 digital regulators which controls PU, CORE (ARM), and SOC.
And 3 analog regulators which controls 1P1, 2P5, 3P0 (USB).
This patch adds the Anatop regulator driver.
Signed-off-by: Nancy Chen
Signed-of