Lines Matching full:desc
56 const struct regulator_axp192_desc *desc; member
180 LOG_INST_DBG(config->log, "[0x%02x]=0x%02x mask=0x%02x", config->desc->enable_reg, in axp192_enable()
181 config->desc->enable_val, config->desc->enable_mask); in axp192_enable()
184 if (config->desc->enable_reg == AXP192_REG_GPIO0_CONTROL) { in axp192_enable()
187 ret = i2c_reg_update_byte_dt(&config->i2c, config->desc->enable_reg, in axp192_enable()
188 config->desc->enable_mask, config->desc->enable_val); in axp192_enable()
204 LOG_INST_DBG(config->log, "[0x%02x]=0 mask=0x%x", config->desc->enable_reg, in axp192_disable()
205 config->desc->enable_mask); in axp192_disable()
208 if (config->desc->enable_reg == AXP192_REG_GPIO0_CONTROL) { in axp192_disable()
211 ret = i2c_reg_update_byte_dt(&config->i2c, config->desc->enable_reg, in axp192_disable()
212 config->desc->enable_mask, 0u); in axp192_disable()
225 return linear_range_group_values_count(config->desc->ranges, config->desc->num_ranges); in axp192_count_voltages()
232 return linear_range_group_get_value(config->desc->ranges, config->desc->num_ranges, idx, in axp192_list_voltage()
245 ret = linear_range_group_get_win_index(config->desc->ranges, config->desc->num_ranges, in axp192_set_voltage()
252 idx <<= config->desc->vsel_bitpos; in axp192_set_voltage()
254 LOG_INST_DBG(config->log, "[0x%x]=0x%x mask=0x%x", config->desc->vsel_reg, idx, in axp192_set_voltage()
255 config->desc->vsel_mask); in axp192_set_voltage()
256 ret = i2c_reg_update_byte_dt(&config->i2c, config->desc->vsel_reg, config->desc->vsel_mask, in axp192_set_voltage()
272 ret = i2c_reg_read_byte_dt(&config->i2c, config->desc->vsel_reg, &raw_reg); in axp192_get_voltage()
277 raw_reg = (raw_reg & config->desc->vsel_mask) >> config->desc->vsel_bitpos; in axp192_get_voltage()
279 ret = linear_range_group_get_value(config->desc->ranges, config->desc->num_ranges, raw_reg, in axp192_get_voltage()
291 if ((mode == AXP192_DCDC_MODE_PWM) && (config->desc->workmode_reg != 0)) { in axp192_set_mode()
295 ret = i2c_reg_update_byte_dt(&config->i2c, config->desc->workmode_reg, in axp192_set_mode()
296 config->desc->workmode_mask, in axp192_set_mode()
297 config->desc->workmode_pwm_val); in axp192_set_mode()
304 if (config->desc->workmode_reg != 0) { in axp192_set_mode()
305 ret = i2c_reg_update_byte_dt(&config->i2c, config->desc->workmode_reg, in axp192_set_mode()
306 config->desc->workmode_mask, 0u); in axp192_set_mode()
327 *curr_ua = config->desc->max_ua; in axp192_get_current_limit()
358 ret = i2c_reg_read_byte_dt(&config->i2c, config->desc->enable_reg, &enabled_val); in regulator_axp192_init()
363 is_enabled = ((enabled_val & config->desc->enable_mask) == config->desc->enable_val); in regulator_axp192_init()
374 .desc = &name##_desc, \