MAXIM Semiconductor's PMIC, MAX77620 and MAX20024 have the
multiple DCDC and LDOs. This supplies the power to different
components of the system.
Also these rails has configuration for ramp time, flexible
power sequence, slew rate etc.
Add regulator driver to access these rails via regulator APIs.
Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
Signed-off-by: Mallikarjun Kasoju <mkasoju@xxxxxxxxxx>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
---
- Cleanup code based on comment received on mfd/rtc.
- Avoid duplication on error message.
Changes form V2:
- Run coccicheck and checkpatch in strict mode for the alignment.
- Refactor Regulator driver to use core API for DT parsing.
- Update based on API changes.
Changes from V3:
- Change all sys initcall to module driver.
- change the max77620_read argument to unisgned int from u8.
Changes from V4:
- Added DT binding document as devicetree/bindings/regulator/regulator-max77620.txt
- Detail out properties.
Changes from V5:
- Separate out DT binding doc for regulator.
Changes from V6:
- Use direct regmap APIs.
- Drop active-discharge configuration as it wil be move to core and through
callback. Follow on patches are palnned for this.