Lines Matching +full:charging +full:- +full:current
1 // SPDX-License-Identifier: GPL-2.0+
13 static int max77693_charger_state(struct pmic *p, int state, int current) in max77693_charger_state() argument
18 return -ENODEV; in max77693_charger_state()
29 return -ENOTSUPP; in max77693_charger_state()
32 if (current < CHARGER_MIN_CURRENT || current > CHARGER_MAX_CURRENT) { in max77693_charger_state()
33 printf("%s: Wrong charge current: %d [mA]\n", in max77693_charger_state()
34 __func__, current); in max77693_charger_state()
35 return -EINVAL; in max77693_charger_state()
38 /* set charging current */ in max77693_charger_state()
41 val |= current * 10 / 333; /* 0.1A/3 steps */ in max77693_charger_state()
44 /* enable charging */ in max77693_charger_state()
48 /* check charging current */ in max77693_charger_state()
61 return -ENODEV; in max77693_charger_bat_present()
80 return -ENOMEM; in pmic_init_max77693()
85 p->name = name; in pmic_init_max77693()
86 p->interface = PMIC_I2C; in pmic_init_max77693()
87 p->number_of_regs = PMIC_NUM_OF_REGS; in pmic_init_max77693()
88 p->hw.i2c.addr = MAX77693_PMIC_I2C_ADDR; in pmic_init_max77693()
89 p->hw.i2c.tx_num = 1; in pmic_init_max77693()
90 p->bus = bus; in pmic_init_max77693()
92 p->chrg = &power_chrg_pmic_ops; in pmic_init_max77693()