[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB904C5425BA6F4E8424B3B51A1414D17140805E4C@NWD2CMBX1.ad.analog.com>
Date: Tue, 3 Jul 2012 05:51:39 -0400
From: "Zhang, Sonic" <Sonic.Zhang@...log.com>
To: "axel.lin@...il.com" <axel.lin@...il.com>
CC: Lars-Peter Clausen <lars@...afoo.de>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Liam Girdwood <lrg@...com>
Subject: RE: [PATCH v2] regulator: ad5398: Fix min/max current limit
boundary checking
>-----Original Message-----
>From: Axel Lin [mailto:axel.lin@...il.com]
>Sent: Tuesday, July 03, 2012 5:44 PM
>To: Zhang, Sonic
>Cc: Lars-Peter Clausen; Mark Brown; linux-kernel@...r.kernel.org; Liam
>Girdwood
>Subject: Re: [PATCH v2] regulator: ad5398: Fix min/max current limit boundary
>checking
>
>>>As long as it is smaller than the maximum requested current, yes. You
>>>request a current range with the regulator API and any value within this
>>>range is fine as the actual output current.
>>>
>>
>> If so, please also set the max_uA as well.
>
>The equation to calculate the selector does not depend on max_uA.
>So I think we don't need to set the requested max_uA.
>
But, ad5398_set_current_limit() behaves different for min_uA and max_uA with you patch. Is this expected?
Sonic
>Current does check the selected current by:
>if (ad5398_calc_current(chip, selector) > max_uA)
> return -EINVAL;
>
>This ensures the selected current falls within specified range.
>
>Regards,
>Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists