• Home
  • Raw
  • Download

Lines Matching full:max77802

3 // max77802.c - Regulator driver for the Maxim 77802
25 #include <dt-bindings/regulator/maxim,max77802.h>
46 /* MAX77802 has two register formats: 2-bit and 4-bit */
97 struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev); in max77802_set_suspend_disable() local
101 if (WARN_ON_ONCE(id >= ARRAY_SIZE(max77802->opmode))) in max77802_set_suspend_disable()
103 max77802->opmode[id] = val; in max77802_set_suspend_disable()
115 struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev); in max77802_set_mode() local
133 if (WARN_ON_ONCE(id >= ARRAY_SIZE(max77802->opmode))) in max77802_set_mode()
136 max77802->opmode[id] = val; in max77802_set_mode()
143 struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev); in max77802_get_mode() local
146 if (WARN_ON_ONCE(id >= ARRAY_SIZE(max77802->opmode))) in max77802_get_mode()
148 return max77802_map_mode(max77802->opmode[id]); in max77802_get_mode()
170 struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev); in max77802_set_suspend_mode() local
175 if (WARN_ON_ONCE(id >= ARRAY_SIZE(max77802->opmode))) in max77802_set_suspend_mode()
182 if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) { in max77802_set_suspend_mode()
195 if (max77802->opmode[id] == MAX77802_OPMODE_NORMAL) in max77802_set_suspend_mode()
206 if (max77802->opmode[id] == MAX77802_OPMODE_LP) in max77802_set_suspend_mode()
222 struct max77802_regulator_prv *max77802 = rdev_get_drvdata(rdev); in max77802_enable() local
226 if (WARN_ON_ONCE(id >= ARRAY_SIZE(max77802->opmode))) in max77802_enable()
228 if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) in max77802_enable()
229 max77802->opmode[id] = MAX77802_OPMODE_NORMAL; in max77802_enable()
233 max77802->opmode[id] << shift); in max77802_enable()
539 struct max77802_regulator_prv *max77802; in max77802_pmic_probe() local
543 max77802 = devm_kzalloc(&pdev->dev, in max77802_pmic_probe()
546 if (!max77802) in max77802_pmic_probe()
551 config.driver_data = max77802; in max77802_pmic_probe()
552 platform_set_drvdata(pdev, max77802); in max77802_pmic_probe()
574 if (id < ARRAY_SIZE(max77802->opmode)) { in max77802_pmic_probe()
576 max77802->opmode[id] = MAX77802_OPMODE_NORMAL; in max77802_pmic_probe()
578 max77802->opmode[id] = val; in max77802_pmic_probe()
595 {"max77802-pmic", 0},
602 .name = "max77802-pmic",