On 05.08.2015 17:45, Vaibhav Hiremath wrote:
On Thursday 23 July 2015 10:21 AM, Krzysztof Kozlowski wrote:
2015-07-22 1:23 GMT+09:00 Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx>:
88PM860 device supports dual phase mode on BUCK1 output.
In normal usecase, BUCK1A and BUCK1B operates independently with 3A
capacity. And they both can work as a dual phase providing 6A capacity.
This patch updates the regulator driver to read the respective
DT property and enable dual-phase mode on BUCK1.
Note that, this is init time (one time) initialization.
Sorry for delayed response, was on bed rest almost for week.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx>
---
drivers/regulator/88pm800.c | 31 +++++++++++++++++++++++++++++++
include/linux/mfd/88pm80x.h | 3 +++
2 files changed, 34 insertions(+)
Don't you need to update the constraints also? I think the BUCK1
regulator has fixed constraint of 3 A:
PM800_BUCK(buck1, BUCK1, BUCK_ENA, 0, 3000000, buck1_volt_range,
0x55),
and now it can handle 6 A.
Actually, BUCK1A and BUCK1B both combined together provide 6A capacity.
And as discussed earlier, we need board change for this.
I am quite not sure.
AFAIU the regulator driver creates one BUCK1 regulator with constraints
3 A. However after your change the regulator will handle up to 6 A.
This means that constraints set by driver are wrong.
Additionally I can't find BUCK1A and BUCK1B regulators. Driver provides
only BUCK1.
Should I read the property and update the constraint runtime during
probe?
Driver should provide real constraints. Find the proper way to do this.
The pm800_regulator_info[] array is not const so you can change it in
whatever way you want (although it should be const for existing driver
because regulator core accepts const and passing it to driver_data is
not necessary).