Lines Matching full:desc
138 const struct regulator_pca9420_desc *desc; member
231 return linear_range_group_values_count(config->desc->ranges, in regulator_pca9420_count_voltages()
232 config->desc->num_ranges); in regulator_pca9420_count_voltages()
240 return linear_range_group_get_value(config->desc->ranges, in regulator_pca9420_list_voltage()
241 config->desc->num_ranges, idx, in regulator_pca9420_list_voltage()
254 ret = linear_range_group_get_win_index(config->desc->ranges, in regulator_pca9420_set_voltage()
255 config->desc->num_ranges, min_uv, in regulator_pca9420_set_voltage()
261 idx <<= config->desc->vsel_pos; in regulator_pca9420_set_voltage()
263 return i2c_reg_update_byte_dt(&cconfig->i2c, config->desc->vsel_reg + in regulator_pca9420_set_voltage()
265 config->desc->vsel_mask, (uint8_t)idx); in regulator_pca9420_set_voltage()
277 ret = i2c_reg_read_byte_dt(&cconfig->i2c, config->desc->vsel_reg + in regulator_pca9420_get_voltage()
284 raw_reg = (raw_reg & config->desc->vsel_mask) >> config->desc->vsel_pos; in regulator_pca9420_get_voltage()
286 return linear_range_group_get_value(config->desc->ranges, in regulator_pca9420_get_voltage()
287 config->desc->num_ranges, raw_reg, in regulator_pca9420_get_voltage()
298 *curr_ua = config->desc->max_ua; in regulator_pca9420_get_current_limit()
300 *curr_ua = MIN(config->desc->max_ua, cconfig->vin_ilim_ua); in regulator_pca9420_get_current_limit()
313 dis_val = (!active_discharge) << config->desc->ad_pos; in regulator_pca9420_set_active_discharge()
315 config->desc->ad_mask, dis_val); in regulator_pca9420_set_active_discharge()
331 *active_discharge = !((raw_reg & config->desc->ad_mask) >> config->desc->ad_pos); in regulator_pca9420_get_active_discharge()
343 en_val = config->enable_inverted ? 0 : config->desc->enable_val; in regulator_pca9420_enable()
344 return i2c_reg_update_byte_dt(&cconfig->i2c, config->desc->enable_reg in regulator_pca9420_enable()
346 config->desc->enable_mask, en_val); in regulator_pca9420_enable()
356 dis_val = config->enable_inverted ? config->desc->enable_val : 0; in regulator_pca9420_disable()
357 return i2c_reg_update_byte_dt(&cconfig->i2c, config->desc->enable_reg in regulator_pca9420_disable()
359 config->desc->enable_mask, dis_val); in regulator_pca9420_disable()
393 config->desc->enable_reg + PCA9420_MODECFG_OFFSET(i), in regulator_pca9420_init()
394 config->desc->enable_mask, 0U); in regulator_pca9420_init()
403 config->desc->ranges, config->desc->num_ranges, in regulator_pca9420_init()
409 idx <<= config->desc->vsel_pos; in regulator_pca9420_init()
413 config->desc->vsel_reg + PCA9420_MODECFG_OFFSET(i), in regulator_pca9420_init()
414 config->desc->vsel_mask, (uint8_t)idx); in regulator_pca9420_init()
521 .desc = &name ## _desc, \