Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: act8865 regulator modes and suspend states

Add documentation for act8865 regulator modes and suspend states.
Add active-semi,8865-regulator.h file for device tree binding constants
for act8865 regulators.

Signed-off-by: Raag Jadav <raagjadav@gmail.com>
Link: https://lore.kernel.org/r/1565721176-8955-3-git-send-email-raagjadav@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Raag Jadav and committed by
Mark Brown
ff461ebf 9e127fab

+53 -2
+25 -2
Documentation/devicetree/bindings/regulator/act8865-regulator.txt
··· 34 34 - inl67-supply: The input supply for LDO_REG3 and LDO_REG4 35 35 36 36 Any standard regulator properties can be used to configure the single regulator. 37 + regulator-initial-mode, regulator-allowed-modes and regulator-mode could be specified 38 + for act8865 using mode values from dt-bindings/regulator/active-semi,8865-regulator.h 39 + file. 37 40 38 41 The valid names for regulators are: 39 42 - for act8846: ··· 49 46 50 47 Example: 51 48 -------- 49 + 50 + #include <dt-bindings/regulator/active-semi,8865-regulator.h> 52 51 53 52 i2c1: i2c@f0018000 { 54 53 pmic: act8865@5b { ··· 70 65 regulator-name = "VCC_1V2"; 71 66 regulator-min-microvolt = <1100000>; 72 67 regulator-max-microvolt = <1300000>; 73 - regulator-suspend-mem-microvolt = <1150000>; 74 - regulator-suspend-standby-microvolt = <1150000>; 75 68 regulator-always-on; 69 + 70 + regulator-allowed-modes = <ACT8865_REGULATOR_MODE_FIXED>, 71 + <ACT8865_REGULATOR_MODE_LOWPOWER>; 72 + regulator-initial-mode = <ACT8865_REGULATOR_MODE_FIXED>; 73 + 74 + regulator-state-mem { 75 + regulator-on-in-suspend; 76 + regulator-suspend-min-microvolt = <1150000>; 77 + regulator-suspend-max-microvolt = <1150000>; 78 + regulator-changeable-in-suspend; 79 + regulator-mode = <ACT8865_REGULATOR_MODE_LOWPOWER>; 80 + }; 76 81 }; 77 82 78 83 vcc_3v3_reg: DCDC_REG3 { ··· 97 82 regulator-min-microvolt = <3300000>; 98 83 regulator-max-microvolt = <3300000>; 99 84 regulator-always-on; 85 + 86 + regulator-allowed-modes = <ACT8865_REGULATOR_MODE_NORMAL>, 87 + <ACT8865_REGULATOR_MODE_LOWPOWER>; 88 + regulator-initial-mode = <ACT8865_REGULATOR_MODE_NORMAL>; 89 + 90 + regulator-state-mem { 91 + regulator-off-in-suspend; 92 + }; 100 93 }; 101 94 102 95 vddfuse_reg: LDO_REG2 {
+28
include/dt-bindings/regulator/active-semi,8865-regulator.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Device Tree binding constants for the ACT8865 PMIC regulators 4 + */ 5 + 6 + #ifndef _DT_BINDINGS_REGULATOR_ACT8865_H 7 + #define _DT_BINDINGS_REGULATOR_ACT8865_H 8 + 9 + /* 10 + * These constants should be used to specify regulator modes in device tree for 11 + * ACT8865 regulators as follows: 12 + * ACT8865_REGULATOR_MODE_FIXED: It is specific to DCDC regulators and it 13 + * specifies the usage of fixed-frequency 14 + * PWM. 15 + * 16 + * ACT8865_REGULATOR_MODE_NORMAL: It is specific to LDO regulators and it 17 + * specifies the usage of normal mode. 18 + * 19 + * ACT8865_REGULATOR_MODE_LOWPOWER: For DCDC and LDO regulators; it specify 20 + * the usage of proprietary power-saving 21 + * mode. 22 + */ 23 + 24 + #define ACT8865_REGULATOR_MODE_FIXED 1 25 + #define ACT8865_REGULATOR_MODE_NORMAL 2 26 + #define ACT8865_REGULATOR_MODE_LOWPOWER 3 27 + 28 + #endif