Thread (37 messages) 37 messages, 7 authors, 2012-10-29
STALE4958d

[PATCH v2 04/13] regulators: Versatile Express regulator driver

From: Mark Brown <hidden>
Date: 2012-09-20 13:01:15

On Wed, Sep 19, 2012 at 05:58:25PM +0100, Pawel Moll wrote:
On Wed, 2012-09-19 at 03:21 +0100, Mark Brown wrote:
quoted
No, we should provide a way to describe this situation in the API - it's
not unreasonable and having to pick step sizes is obviously suboptimal.
Actually before I finally got this mail (our mail system was playing
stupid today), I came up with idea of using the power supply specified
tolerance as a base to chose the step sizes. This comes down to such
code (with the regulator_*_voltage_linear in the ops):
That's probably OK, though check that the numbers come out sensible
(people tend to work to nice round numbers).
+       if (ret < 0) {
+               /* No operating points defined, allow any value within range */
+               struct regulation_constraints *constraints =
+                               regulator->rdev->constraints;
+
+               return min_uV >= constraints->min_uV &&
+                               max_uV <= constraints->max_uV;
+       }
I'd rather have the driver explicitly say it supports continuous
voltages with a flag in the descriptor (to make sure we don't end up
being overly optimistic because the driver wasn't well implemented) but
other than that this looks good.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help