D | rt9471.c | 1 // SPDX-License-Identifier: GPL-2.0-only 192 enum rt9471_ranges range, int val) in rt9471_set_value_by_field_range() argument 197 return -EINVAL; in rt9471_set_value_by_field_range() 199 linear_range_get_selector_within(rt9471_chg_ranges + range, val, &sel); in rt9471_set_value_by_field_range() 201 return regmap_field_write(chip->rm_fields[field], sel); in rt9471_set_value_by_field_range() 207 enum rt9471_ranges range, int *val) in rt9471_get_value_by_field_range() argument 212 ret = regmap_field_read(chip->rm_fields[field], &sel); in rt9471_get_value_by_field_range() 216 ret = linear_range_get_value(rt9471_chg_ranges + range, sel, &rvalue); in rt9471_get_value_by_field_range() 224 static int rt9471_set_ieoc(struct rt9471_chip *chip, int microamp) in rt9471_set_ieoc() argument 228 if (microamp == 0) in rt9471_set_ieoc() [all …]
|