Home
last modified time | relevance | path

Searched refs:sel (Results 1 – 25 of 57) sorted by relevance

123

/linux-4.19.296/drivers/regulator/
Danatop-regulator.c39 int sel; member
71 int sel; in anatop_regmap_enable() local
73 sel = anatop_reg->bypass ? LDO_FET_FULL_ON : anatop_reg->sel; in anatop_regmap_enable()
74 return regulator_set_voltage_sel_regmap(reg, sel); in anatop_regmap_enable()
94 anatop_reg->sel = selector; in anatop_regmap_core_set_voltage_sel()
100 anatop_reg->sel = selector; in anatop_regmap_core_set_voltage_sel()
109 return anatop_reg->sel; in anatop_regmap_core_get_voltage_sel()
117 int sel; in anatop_regmap_get_bypass() local
119 sel = regulator_get_voltage_sel_regmap(reg); in anatop_regmap_get_bypass()
120 if (sel == LDO_FET_FULL_ON) in anatop_regmap_get_bypass()
[all …]
Dmax77693-regulator.c60 unsigned int reg, sel; in max77693_chg_get_current_limit() local
68 sel = reg & reg_data->linear_mask; in max77693_chg_get_current_limit()
71 if (sel <= reg_data->min_sel) in max77693_chg_get_current_limit()
72 sel = 0; in max77693_chg_get_current_limit()
74 sel -= reg_data->min_sel; in max77693_chg_get_current_limit()
76 val = chg_min_uA + reg_data->uA_step * sel; in max77693_chg_get_current_limit()
88 int sel = 0; in max77693_chg_set_current_limit() local
90 while (chg_min_uA + reg_data->uA_step * sel < min_uA) in max77693_chg_set_current_limit()
91 sel++; in max77693_chg_set_current_limit()
93 if (chg_min_uA + reg_data->uA_step * sel > max_uA) in max77693_chg_set_current_limit()
[all …]
Dvctrl-regulator.c51 unsigned int sel; member
150 return vctrl->sel; in vctrl_get_voltage_sel()
158 unsigned int orig_sel = vctrl->sel; in vctrl_set_voltage_sel()
164 if (selector >= vctrl->sel || !vctrl->ovp_threshold) { in vctrl_set_voltage_sel()
170 vctrl->sel = selector; in vctrl_set_voltage_sel()
175 while (vctrl->sel != selector) { in vctrl_set_voltage_sel()
179 if (selector >= vctrl->vtable[vctrl->sel].ovp_min_sel) in vctrl_set_voltage_sel()
182 next_sel = vctrl->vtable[vctrl->sel].ovp_min_sel; in vctrl_set_voltage_sel()
193 vctrl->sel = next_sel; in vctrl_set_voltage_sel()
195 delay = DIV_ROUND_UP(vctrl->vtable[vctrl->sel].out - in vctrl_set_voltage_sel()
[all …]
Dda9210-regulator.c89 unsigned int sel; in da9210_set_current_limit() local
96 sel = i; in da9210_set_current_limit()
97 sel = sel << DA9210_BUCK_ILIM_SHIFT; in da9210_set_current_limit()
100 DA9210_BUCK_ILIM_MASK, sel); in da9210_set_current_limit()
111 unsigned int sel; in da9210_get_current_limit() local
119 sel = (data & DA9210_BUCK_ILIM_MASK) >> DA9210_BUCK_ILIM_SHIFT; in da9210_get_current_limit()
121 return da9210_buck_limits[sel]; in da9210_get_current_limit()
Darizona-ldo1.c58 int sel; in arizona_ldo1_hc_map_voltage() local
60 sel = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); in arizona_ldo1_hc_map_voltage()
61 if (sel >= rdev->desc->n_voltages) in arizona_ldo1_hc_map_voltage()
62 sel = rdev->desc->n_voltages - 1; in arizona_ldo1_hc_map_voltage()
64 return sel; in arizona_ldo1_hc_map_voltage()
68 unsigned sel) in arizona_ldo1_hc_set_voltage_sel() argument
75 if (sel == rdev->desc->n_voltages - 1) in arizona_ldo1_hc_set_voltage_sel()
88 val = sel << ARIZONA_LDO1_VSEL_SHIFT; in arizona_ldo1_hc_set_voltage_sel()
Dwm831x-ldo.c75 int sel, reg = ldo->base + WM831X_LDO_SLEEP_CONTROL; in wm831x_gp_ldo_set_suspend_voltage() local
77 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_gp_ldo_set_suspend_voltage()
78 if (sel < 0) in wm831x_gp_ldo_set_suspend_voltage()
79 return sel; in wm831x_gp_ldo_set_suspend_voltage()
81 return wm831x_set_bits(wm831x, reg, WM831X_LDO1_ON_VSEL_MASK, sel); in wm831x_gp_ldo_set_suspend_voltage()
328 int sel, reg = ldo->base + WM831X_LDO_SLEEP_CONTROL; in wm831x_aldo_set_suspend_voltage() local
330 sel = regulator_map_voltage_linear_range(rdev, uV, uV); in wm831x_aldo_set_suspend_voltage()
331 if (sel < 0) in wm831x_aldo_set_suspend_voltage()
332 return sel; in wm831x_aldo_set_suspend_voltage()
334 return wm831x_set_bits(wm831x, reg, WM831X_LDO7_ON_VSEL_MASK, sel); in wm831x_aldo_set_suspend_voltage()
[all …]
Drk808-regulator.c165 unsigned sel) in rk808_buck1_2_i2c_set_voltage_sel() argument
177 delta_sel = sel - old_sel; in rk808_buck1_2_i2c_set_voltage_sel()
196 delta_sel = sel - old_sel; in rk808_buck1_2_i2c_set_voltage_sel()
199 sel <<= ffs(mask) - 1; in rk808_buck1_2_i2c_set_voltage_sel()
200 val = tmp | sel; in rk808_buck1_2_i2c_set_voltage_sel()
214 unsigned sel) in rk808_buck1_2_set_voltage_sel() argument
224 return rk808_buck1_2_i2c_set_voltage_sel(rdev, sel); in rk808_buck1_2_set_voltage_sel()
239 sel <<= ffs(rdev->desc->vsel_mask) - 1; in rk808_buck1_2_set_voltage_sel()
240 sel |= old_sel & ~rdev->desc->vsel_mask; in rk808_buck1_2_set_voltage_sel()
242 ret = regmap_write(rdev->regmap, reg, sel); in rk808_buck1_2_set_voltage_sel()
[all …]
Dltc3589.c114 int sel, shift; in ltc3589_set_ramp_delay() local
123 for (sel = 0; sel < 4; sel++) { in ltc3589_set_ramp_delay()
124 if ((880 << sel) >= ramp_delay) { in ltc3589_set_ramp_delay()
127 0x3 << shift, sel << shift); in ltc3589_set_ramp_delay()
136 int sel; in ltc3589_set_suspend_voltage() local
138 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3589_set_suspend_voltage()
139 if (sel < 0) in ltc3589_set_suspend_voltage()
140 return sel; in ltc3589_set_suspend_voltage()
144 rdev->desc->vsel_mask, sel); in ltc3589_set_suspend_voltage()
Dti-abb-regulator.c312 static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel) in ti_abb_set_voltage_sel() argument
333 if (sel >= desc->n_voltages) { in ti_abb_set_voltage_sel()
335 sel, desc->n_voltages); in ti_abb_set_voltage_sel()
340 if (sel == abb->current_info_idx) { in ti_abb_set_voltage_sel()
341 dev_dbg(dev, "%s: Already at sel=%d\n", __func__, sel); in ti_abb_set_voltage_sel()
345 info = &abb->info[sel]; in ti_abb_set_voltage_sel()
359 sel, abb->current_info_idx); in ti_abb_set_voltage_sel()
368 abb->current_info_idx = sel; in ti_abb_set_voltage_sel()
372 __func__, desc->volt_table[sel], sel, in ti_abb_set_voltage_sel()
Dda9063-regulator.c183 unsigned int sel; in da9063_get_current_limit() local
186 ret = regmap_field_read(regl->ilimit, &sel); in da9063_get_current_limit()
190 if (sel >= rinfo->n_current_limits) in da9063_get_current_limit()
191 sel = rinfo->n_current_limits - 1; in da9063_get_current_limit()
193 return rinfo->current_limits[sel]; in da9063_get_current_limit()
361 int ret, sel; in da9063_set_suspend_voltage() local
363 sel = regulator_map_voltage_linear(rdev, uV, uV); in da9063_set_suspend_voltage()
364 if (sel < 0) in da9063_set_suspend_voltage()
365 return sel; in da9063_set_suspend_voltage()
367 sel <<= ffs(rdev->desc->vsel_mask) - 1; in da9063_set_suspend_voltage()
[all …]
Dbd9571mwv-regulator.c72 unsigned int sel) in bd9571mwv_avs_set_voltage_sel_regmap() argument
81 rdev->desc->vsel_mask, sel); in bd9571mwv_avs_set_voltage_sel_regmap()
104 unsigned int sel) in bd9571mwv_reg_set_voltage_sel_regmap() argument
107 rdev->desc->vsel_mask, sel); in bd9571mwv_reg_set_voltage_sel_regmap()
Dltc3676.c87 int sel; in ltc3676_set_suspend_voltage() local
90 sel = regulator_map_voltage_linear(rdev, uV, uV); in ltc3676_set_suspend_voltage()
91 if (sel < 0) in ltc3676_set_suspend_voltage()
92 return sel; in ltc3676_set_suspend_voltage()
96 rdev->desc->vsel_mask, sel); in ltc3676_set_suspend_voltage()
/linux-4.19.296/drivers/clk/bcm/
Dclk-bcm281xx.c46 .sel = SELECTOR(0x0a10, 0, 2),
55 .sel = SELECTOR(0x0a04, 0, 2),
63 .sel = SELECTOR(0x0a00, 0, 2),
87 .sel = SELECTOR(0x0e74, 0, 2),
109 .sel = SELECTOR(0x0a28, 0, 3),
121 .sel = SELECTOR(0x0a2c, 0, 3),
133 .sel = SELECTOR(0x0a34, 0, 3),
145 .sel = SELECTOR(0x0a30, 0, 3),
156 .sel = SELECTOR(0x0a24, 0, 2),
166 .sel = SELECTOR(0x0a38, 0, 2),
[all …]
Dclk-kona-setup.c21 #define selector_clear_exists(sel) ((sel)->width = 0) argument
54 struct bcm_clk_sel *sel; in clk_requires_trigger() local
60 sel = &peri->sel; in clk_requires_trigger()
61 if (sel->parent_count && selector_exists(sel)) in clk_requires_trigger()
84 struct bcm_clk_sel *sel; in peri_clk_data_offsets_valid() local
148 sel = &peri->sel; in peri_clk_data_offsets_valid()
149 if (selector_exists(sel)) { in peri_clk_data_offsets_valid()
150 if (sel->offset > limit) { in peri_clk_data_offsets_valid()
152 __func__, name, sel->offset, limit); in peri_clk_data_offsets_valid()
291 static bool sel_valid(struct bcm_clk_sel *sel, const char *field_name, in sel_valid() argument
[all …]
Dclk-bcm21664.c46 .sel = SELECTOR(0x0a10, 0, 2),
72 .sel = SELECTOR(0x0a28, 0, 3),
84 .sel = SELECTOR(0x0a2c, 0, 3),
96 .sel = SELECTOR(0x0a34, 0, 3),
108 .sel = SELECTOR(0x0a30, 0, 3),
167 .sel = SELECTOR(0x0a10, 0, 2),
177 .sel = SELECTOR(0x0a14, 0, 2),
187 .sel = SELECTOR(0x0a18, 0, 2),
199 .sel = SELECTOR(0x0a64, 0, 3),
210 .sel = SELECTOR(0x0a68, 0, 3),
[all …]
Dclk-kona.c820 static u8 parent_index(struct bcm_clk_sel *sel, u8 parent_sel) in parent_index() argument
824 BUG_ON(sel->parent_count > (u32)U8_MAX); in parent_index()
825 for (i = 0; i < sel->parent_count; i++) in parent_index()
826 if (sel->parent_sel[i] == parent_sel) in parent_index()
839 static u8 selector_read_index(struct ccu_data *ccu, struct bcm_clk_sel *sel) in selector_read_index() argument
847 if (!selector_exists(sel)) in selector_read_index()
852 reg_val = __ccu_read(ccu, sel->offset); in selector_read_index()
855 parent_sel = bitfield_extract(reg_val, sel->shift, sel->width); in selector_read_index()
858 index = parent_index(sel, parent_sel); in selector_read_index()
861 __func__, parent_sel, ccu->name, sel->offset); in selector_read_index()
[all …]
/linux-4.19.296/drivers/media/v4l2-core/
Dv4l2-subdev.c154 struct v4l2_subdev_selection *sel) in check_selection() argument
156 if (sel->which != V4L2_SUBDEV_FORMAT_TRY && in check_selection()
157 sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) in check_selection()
160 if (sel->pad >= sd->entity.num_pads) in check_selection()
319 struct v4l2_subdev_selection sel; in subdev_do_ioctl() local
326 memset(&sel, 0, sizeof(sel)); in subdev_do_ioctl()
327 sel.which = crop->which; in subdev_do_ioctl()
328 sel.pad = crop->pad; in subdev_do_ioctl()
329 sel.target = V4L2_SEL_TGT_CROP; in subdev_do_ioctl()
332 sd, pad, get_selection, subdev_fh->pad, &sel); in subdev_do_ioctl()
[all …]
/linux-4.19.296/drivers/media/tuners/
Dmt20xx.c107 unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1, in mt2032_compute_freq() local
120 if(s>1890) sel=0; in mt2032_compute_freq()
121 else if(s>1720) sel=1; in mt2032_compute_freq()
122 else if(s>1530) sel=2; in mt2032_compute_freq()
123 else if(s>1370) sel=3; in mt2032_compute_freq()
124 else sel=4; // >1090 in mt2032_compute_freq()
127 if(s>1790) sel=0; // <1958 in mt2032_compute_freq()
128 else if(s>1617) sel=1; in mt2032_compute_freq()
129 else if(s>1449) sel=2; in mt2032_compute_freq()
130 else if(s>1291) sel=3; in mt2032_compute_freq()
[all …]
/linux-4.19.296/drivers/clk/imx/
Dclk-imx6q.c180 int parent, child, sel; in of_assigned_ldb_sels() local
214 sel = ldb_di_sel_by_clock_id(parent); in of_assigned_ldb_sels()
215 if (sel < 0) { in of_assigned_ldb_sels()
222 *ldb_di0_sel = sel; in of_assigned_ldb_sels()
224 *ldb_di1_sel = sel; in of_assigned_ldb_sels()
315 unsigned int sel[2][4]; in init_ldb_clks() local
319 sel[0][0] = (reg >> CS2CDR_LDB_DI0_CLK_SEL_SHIFT) & 7; in init_ldb_clks()
320 sel[1][0] = (reg >> CS2CDR_LDB_DI1_CLK_SEL_SHIFT) & 7; in init_ldb_clks()
322 sel[0][3] = sel[0][2] = sel[0][1] = sel[0][0]; in init_ldb_clks()
323 sel[1][3] = sel[1][2] = sel[1][1] = sel[1][0]; in init_ldb_clks()
[all …]
Dclk-imx35.c38 unsigned char arm, ahb, sel; member
42 { .arm = 1, .ahb = 4, .sel = 0},
43 { .arm = 1, .ahb = 3, .sel = 1},
44 { .arm = 2, .ahb = 2, .sel = 0},
45 { .arm = 0, .ahb = 0, .sel = 0},
46 { .arm = 0, .ahb = 0, .sel = 0},
47 { .arm = 0, .ahb = 0, .sel = 0},
48 { .arm = 4, .ahb = 1, .sel = 0},
49 { .arm = 1, .ahb = 5, .sel = 0},
50 { .arm = 1, .ahb = 8, .sel = 0},
[all …]
/linux-4.19.296/include/linux/mfd/
Dimx25-tsadc.h118 #define MX25_ADCQ_CFG_REFP(sel) ((sel) << 7) argument
124 #define MX25_ADCQ_CFG_IN(sel) ((sel) << 4) argument
133 #define MX25_ADCQ_CFG_REFN(sel) ((sel) << 2) argument
/linux-4.19.296/drivers/clk/sunxi-ng/
Dccu_frac.c91 u32 reg, sel; in ccu_frac_helper_set_rate() local
97 sel = 0; in ccu_frac_helper_set_rate()
99 sel = cf->select; in ccu_frac_helper_set_rate()
106 writel(reg | sel, common->base + common->reg); in ccu_frac_helper_set_rate()
/linux-4.19.296/include/uapi/linux/
Dxfrm.h367 struct xfrm_selector sel; member
412 struct xfrm_selector sel; member
429 struct xfrm_selector sel; member
437 struct xfrm_selector sel; member
461 struct xfrm_selector sel; member
/linux-4.19.296/drivers/clk/tegra/
Dclk-pll.c521 struct tegra_clk_pll_freq_table *sel; in _get_table_rate() local
524 for (sel = pll->params->freq_table; sel->input_rate != 0; sel++) in _get_table_rate()
525 if (sel->input_rate == parent_rate && in _get_table_rate()
526 sel->output_rate == rate) in _get_table_rate()
529 if (sel->input_rate == 0) in _get_table_rate()
533 p = _p_div_to_hw(hw, sel->p); in _get_table_rate()
537 p = ilog2(sel->p); in _get_table_rate()
540 cfg->input_rate = sel->input_rate; in _get_table_rate()
541 cfg->output_rate = sel->output_rate; in _get_table_rate()
542 cfg->m = sel->m; in _get_table_rate()
[all …]
/linux-4.19.296/drivers/clk/zte/
Dclk.c194 u32 sel, integ, fra_div, tmp; in calc_reg() local
202 sel = tmp / BPAR; in calc_reg()
206 tmp = (sel << 24) | (integ << 16) | (0xff << 8) | fra_div; in calc_reg()
217 u32 sel, integ, fra_div, tmp; in calc_rate() local
221 sel = (tmp >> 24) & BIT(0); in calc_rate()
227 tmp += sel * BPAR; in calc_rate()

123