Repository navigation
Commit e8eef82
regulator: Provide a selector based set_voltage_sel() operation
Many regulator drivers implement voltage setting by looping through a
table of possible values, normally because the set of available voltages
can't be mapped onto selectors with simple calcuation. Factor out these
loops by providing a variant of set_voltage() which takes a selector rather
than a voltage range as an argument and implementing a loop through the
available selectors in the core.
This is not going to be suitable for use with all devices as when the
regulator voltage can be mapped onto selector values with a simple
calculation the linear scan through the available values will be more
expensive than just doing the calculation, especially for regulators
that provide fine grained voltage control.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>1 parent 7579025 commit e8eef82
2 files changed
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1637 | 1637 | | |
1638 | 1638 | | |
1639 | 1639 | | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
1640 | 1666 | | |
1641 | 1667 | | |
1642 | 1668 | | |
| |||
1672 | 1698 | | |
1673 | 1699 | | |
1674 | 1700 | | |
1675 | | - | |
| 1701 | + | |
| 1702 | + | |
1676 | 1703 | | |
1677 | 1704 | | |
1678 | 1705 | | |
| |||
2256 | 2283 | | |
2257 | 2284 | | |
2258 | 2285 | | |
2259 | | - | |
| 2286 | + | |
2260 | 2287 | | |
2261 | 2288 | | |
2262 | 2289 | | |
| |||
2354 | 2381 | | |
2355 | 2382 | | |
2356 | 2383 | | |
| 2384 | + | |
| 2385 | + | |
2357 | 2386 | | |
2358 | 2387 | | |
2359 | 2388 | | |
2360 | 2389 | | |
2361 | 2390 | | |
2362 | 2391 | | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
2363 | 2396 | | |
2364 | 2397 | | |
2365 | 2398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
0 commit comments