Lines Matching refs:max8997

49 static inline void max8997_set_gpio(struct max8997_data *max8997)  in max8997_set_gpio()  argument
51 int set3 = (max8997->buck125_gpioindex) & 0x1; in max8997_set_gpio()
52 int set2 = ((max8997->buck125_gpioindex) >> 1) & 0x1; in max8997_set_gpio()
53 int set1 = ((max8997->buck125_gpioindex) >> 2) & 0x1; in max8997_set_gpio()
55 gpio_set_value(max8997->buck125_gpios[0], set1); in max8997_set_gpio()
56 gpio_set_value(max8997->buck125_gpios[1], set2); in max8997_set_gpio()
57 gpio_set_value(max8997->buck125_gpios[2], set3); in max8997_set_gpio()
244 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_reg_is_enabled() local
245 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_reg_is_enabled()
262 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_reg_enable() local
263 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_reg_enable()
275 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_reg_disable() local
276 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_reg_disable()
289 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_get_voltage_register() local
299 if (max8997->buck1_gpiodvs) in max8997_get_voltage_register()
300 reg += max8997->buck125_gpioindex; in max8997_get_voltage_register()
304 if (max8997->buck2_gpiodvs) in max8997_get_voltage_register()
305 reg += max8997->buck125_gpioindex; in max8997_get_voltage_register()
315 if (max8997->buck5_gpiodvs) in max8997_get_voltage_register()
316 reg += max8997->buck125_gpioindex; in max8997_get_voltage_register()
354 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_get_voltage_sel() local
355 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_get_voltage_sel()
399 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_set_voltage_charger_cv() local
400 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_set_voltage_charger_cv()
451 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_set_voltage_ldobuck() local
452 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_set_voltage_ldobuck()
494 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_set_voltage_buck_time_sel() local
505 if (max8997->buck1_gpiodvs) in max8997_set_voltage_buck_time_sel()
509 if (max8997->buck2_gpiodvs) in max8997_set_voltage_buck_time_sel()
513 if (max8997->buck5_gpiodvs) in max8997_set_voltage_buck_time_sel()
524 max8997->ramp_delay * 1000); in max8997_set_voltage_buck_time_sel()
541 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_assess_side_effect() local
565 buckx_val[0] = max8997->buck1_vol; in max8997_assess_side_effect()
566 buckx_val[1] = max8997->buck2_vol; in max8997_assess_side_effect()
567 buckx_val[2] = max8997->buck5_vol; in max8997_assess_side_effect()
568 buckx_gpiodvs[0] = max8997->buck1_gpiodvs; in max8997_assess_side_effect()
569 buckx_gpiodvs[1] = max8997->buck2_gpiodvs; in max8997_assess_side_effect()
570 buckx_gpiodvs[2] = max8997->buck5_gpiodvs; in max8997_assess_side_effect()
589 (buckx_val[others])[max8997->buck125_gpioindex]; in max8997_assess_side_effect()
618 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_set_voltage_buck() local
629 if (max8997->buck1_gpiodvs) in max8997_set_voltage_buck()
633 if (max8997->buck2_gpiodvs) in max8997_set_voltage_buck()
637 if (max8997->buck5_gpiodvs) in max8997_set_voltage_buck()
671 if (max8997->ignore_gpiodvs_side_effect == false) in max8997_set_voltage_buck()
676 max8997->buck125_gpioindex, tmp_idx); in max8997_set_voltage_buck()
682 max8997->buck125_gpioindex = new_idx; in max8997_set_voltage_buck()
683 max8997_set_gpio(max8997); in max8997_set_voltage_buck()
693 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_set_voltage_safeout_sel() local
694 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_set_voltage_safeout_sel()
710 struct max8997_data *max8997 = rdev_get_drvdata(rdev); in max8997_reg_disable_suspend() local
711 struct i2c_client *i2c = max8997->iodev->i2c; in max8997_reg_disable_suspend()
719 max8997_read_reg(i2c, reg, &max8997->saved_states[rid]); in max8997_reg_disable_suspend()
730 rdev->desc->name, max8997->saved_states[rid] & mask, in max8997_reg_disable_suspend()
1016 struct max8997_data *max8997; in max8997_pmic_probe() local
1032 max8997 = devm_kzalloc(&pdev->dev, sizeof(struct max8997_data), in max8997_pmic_probe()
1034 if (!max8997) in max8997_pmic_probe()
1037 max8997->dev = &pdev->dev; in max8997_pmic_probe()
1038 max8997->iodev = iodev; in max8997_pmic_probe()
1039 max8997->num_regulators = pdata->num_regulators; in max8997_pmic_probe()
1040 platform_set_drvdata(pdev, max8997); in max8997_pmic_probe()
1041 i2c = max8997->iodev->i2c; in max8997_pmic_probe()
1043 max8997->buck125_gpioindex = pdata->buck125_default_idx; in max8997_pmic_probe()
1044 max8997->buck1_gpiodvs = pdata->buck1_gpiodvs; in max8997_pmic_probe()
1045 max8997->buck2_gpiodvs = pdata->buck2_gpiodvs; in max8997_pmic_probe()
1046 max8997->buck5_gpiodvs = pdata->buck5_gpiodvs; in max8997_pmic_probe()
1047 memcpy(max8997->buck125_gpios, pdata->buck125_gpios, sizeof(int) * 3); in max8997_pmic_probe()
1048 max8997->ignore_gpiodvs_side_effect = pdata->ignore_gpiodvs_side_effect; in max8997_pmic_probe()
1054 max8997->buck1_vol[i] = ret = in max8997_pmic_probe()
1063 max8997->buck2_vol[i] = ret = in max8997_pmic_probe()
1072 max8997->buck5_vol[i] = ret = in max8997_pmic_probe()
1081 if (max_buck1 < max8997->buck1_vol[i]) in max8997_pmic_probe()
1082 max_buck1 = max8997->buck1_vol[i]; in max8997_pmic_probe()
1083 if (max_buck2 < max8997->buck2_vol[i]) in max8997_pmic_probe()
1084 max_buck2 = max8997->buck2_vol[i]; in max8997_pmic_probe()
1085 if (max_buck5 < max8997->buck5_vol[i]) in max8997_pmic_probe()
1086 max_buck5 = max8997->buck5_vol[i]; in max8997_pmic_probe()
1102 max8997->buck1_vol[i], in max8997_pmic_probe()
1105 max8997->buck2_vol[i], in max8997_pmic_probe()
1108 max8997->buck5_vol[i], in max8997_pmic_probe()
1142 (max8997->buck125_gpioindex >> 2) in max8997_pmic_probe()
1145 (max8997->buck125_gpioindex >> 1) in max8997_pmic_probe()
1148 (max8997->buck125_gpioindex >> 0) in max8997_pmic_probe()
1161 max8997->ramp_delay = 10; /* set 10mV/us, which is the default */ in max8997_pmic_probe()
1179 config.dev = max8997->dev; in max8997_pmic_probe()
1181 config.driver_data = max8997; in max8997_pmic_probe()
1187 dev_err(max8997->dev, "regulator init failed for %d\n", in max8997_pmic_probe()