/linux/lib/ |
H A D | linear_ranges.c | 79 * @selector: selector for which the value is searched 82 * Search given ranges for value which matches given selector. 84 * Return: 0 on success, -EINVAL given selector is not found from any of the 87 int linear_range_get_value(const struct linear_range *r, unsigned int selector, in linear_range_get_value() argument 90 if (r->min_sel > selector || r->max_sel < selector) in linear_range_get_value() 93 *val = r->min + (selector - r->min_sel) * r->step; in linear_range_get_value() 103 * @selector: selector for which the value is searched 106 * Search through an array of ranges for value which matches given selector. 108 * Return: 0 on success, -EINVAL given selector is not found from any of the 112 unsigned int selector, unsigned int *val) in linear_range_get_value_array() argument [all …]
|
/linux/drivers/firmware/arm_scmi/ |
H A D | pinctrl.c | 175 u32 selector, in scmi_pinctrl_validate_id() argument 184 if (selector >= value || value == 0) in scmi_pinctrl_validate_id() 192 u32 selector, char *name, in scmi_pinctrl_attributes() argument 204 ret = scmi_pinctrl_validate_id(ph, selector, type); in scmi_pinctrl_attributes() 215 tx->identifier = cpu_to_le32(selector); in scmi_pinctrl_attributes() 238 selector, (u32 *)&type, name, in scmi_pinctrl_attributes() 244 u32 selector; member 256 msg->identifier = cpu_to_le32(p->selector); in iter_pinctrl_assoc_prepare_message() 287 u32 selector, in scmi_pinctrl_list_associations() argument 299 .selector = selector, in scmi_pinctrl_list_associations() [all …]
|
/linux/kernel/entry/ |
H A D | syscall_user_dispatch.c | 46 if (likely(sd->selector)) { in syscall_user_dispatch() 49 * the selector is loaded by userspace. in syscall_user_dispatch() 51 if (unlikely(__get_user(state, sd->selector))) { in syscall_user_dispatch() 74 char __user *selector) in task_set_syscall_user_dispatch() argument 78 if (offset || len || selector) in task_set_syscall_user_dispatch() 95 * To enable a tracer to set a tracees selector the in task_set_syscall_user_dispatch() 96 * selector address must be untagged for access_ok(), in task_set_syscall_user_dispatch() 98 * tagged tracees selector. in task_set_syscall_user_dispatch() 100 if (selector && !access_ok(untagged_addr(selector), sizeof(*selector))) in task_set_syscall_user_dispatch() 108 task->syscall_dispatch.selector = selector; in task_set_syscall_user_dispatch() [all …]
|
/linux/drivers/md/ |
H A D | dm-path-selector.h | 10 * Path-Selector registration. 31 * If a path selector uses this flag, a high resolution timer is used 44 /* Information about a path selector type */ 54 * Constructs a path selector object, takes custom arguments 60 * Add an opaque path object, along with some selector specific 73 * Notify the selector that a path has failed. 78 * Ask selector to reinstate a path. 84 * or path selector status 95 /* Register a path selector */ 98 /* Unregister a path selector */ [all …]
|
H A D | dm-ps-queue-length.c | 13 * queue-length path selector - choose a path with the least number of 18 #include "dm-path-selector.h" 30 struct selector { struct 43 static struct selector *alloc_selector(void) in alloc_selector() argument 45 struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL); in alloc_selector() 58 struct selector *s = alloc_selector(); in ql_create() 79 struct selector *s = ps->context; in ql_destroy() 93 /* When called with NULL path, return selector status/args. */ in ql_status() 118 struct selector *s = ps->context; in ql_add_path() 166 struct selector *s = ps->context; in ql_fail_path() [all …]
|
H A D | dm-ps-round-robin.c | 10 * Round-robin path selector. 15 #include "dm-path-selector.h" 47 * Round-robin selector 50 struct selector { struct 56 static struct selector *alloc_selector(void) in alloc_selector() argument 58 struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL); in alloc_selector() 71 struct selector *s; in rr_create() 83 struct selector *s = ps->context; in rr_destroy() 124 struct selector *s = ps->context; in rr_add_path() 168 struct selector *s = ps->context; in rr_fail_path() [all …]
|
H A D | dm-ps-service-time.c | 9 * Throughput oriented path selector. 13 #include "dm-path-selector.h" 25 struct selector { struct 39 static struct selector *alloc_selector(void) in alloc_selector() argument 41 struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL); in alloc_selector() 54 struct selector *s = alloc_selector(); in st_create() 75 struct selector *s = ps->context; in st_destroy() 115 struct selector *s = ps->context; in st_add_path() 178 struct selector *s = ps->context; in st_fail_path() 189 struct selector *s = ps->context; in st_reinstate_path() [all …]
|
H A D | dm-ps-historical-service-time.c | 25 #include "dm-path-selector.h" 44 struct selector { struct 130 static struct selector *alloc_selector(void) in alloc_selector() 132 struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL); in alloc_selector() 149 struct selector *s = ps->context; in hst_weight() 164 struct selector *s = ps->context; in hst_set_weights() 177 struct selector *s; in hst_create() 229 struct selector *s = ps->context; in hst_destroy() 244 struct selector *s = ps->context; in hst_status() 270 struct selector *s = ps->context; in hst_add_path() [all …]
|
/linux/drivers/clk/bcm/ |
H A D | clk-bcm281xx.c | 38 .sel = SELECTOR(0x0a10, 0, 2), 47 .sel = SELECTOR(0x0a04, 0, 2), 55 .sel = SELECTOR(0x0a00, 0, 2), 79 .sel = SELECTOR(0x0e74, 0, 2), 101 .sel = SELECTOR(0x0a28, 0, 3), 113 .sel = SELECTOR(0x0a2c, 0, 3), 125 .sel = SELECTOR(0x0a34, 0, 3), 137 .sel = SELECTOR(0x0a30, 0, 3), 148 .sel = SELECTOR(0x0a24, 0, 2), 158 .sel = SELECTOR(0x0a38, 0, 2), [all …]
|
H A D | clk-bcm21664.c | 38 .sel = SELECTOR(0x0a10, 0, 2), 64 .sel = SELECTOR(0x0a28, 0, 3), 76 .sel = SELECTOR(0x0a2c, 0, 3), 88 .sel = SELECTOR(0x0a34, 0, 3), 100 .sel = SELECTOR(0x0a30, 0, 3), 159 .sel = SELECTOR(0x0a10, 0, 2), 169 .sel = SELECTOR(0x0a14, 0, 2), 179 .sel = SELECTOR(0x0a18, 0, 2), 191 .sel = SELECTOR(0x0a64, 0, 3), 202 .sel = SELECTOR(0x0a68, 0, 3), [all …]
|
H A D | clk-kona-setup.c | 12 /* These are used when a selector or trigger is found to be unneeded */ 143 pr_err("%s: bad selector offset for %s (%u > %u)\n", in peri_clk_data_offsets_valid() 280 * A selector bitfield must be valid. Its parent_sel array must 294 * Make sure the selector field can hold all the in sel_valid() 295 * selector values we expect to be able to use. A in sel_valid() 296 * clock only needs to have a selector defined if it in sel_valid() 298 * highest selector value will be in the last entry in sel_valid() 304 pr_err("%s: bad selector for %s " in sel_valid() 311 pr_warn("%s: ignoring selector for %s (no parents)\n", in sel_valid() 431 if (!sel_valid(sel, "selector", name)) in peri_clk_data_valid() [all …]
|
/linux/arch/x86/include/asm/ |
H A D | gsseg.h | 15 extern asmlinkage void asm_load_gs_index(u16 selector); 20 static inline void native_lkgs(unsigned int selector) in native_lkgs() argument 22 u16 sel = selector; in native_lkgs() 28 static inline void native_load_gs_index(unsigned int selector) in native_load_gs_index() argument 31 native_lkgs(selector); in native_load_gs_index() 36 asm_load_gs_index(selector); in native_load_gs_index() 55 static inline void load_gs_index(unsigned int selector) in load_gs_index() argument 58 native_load_gs_index(selector); in load_gs_index() 60 loadsegment(gs, selector); in load_gs_index()
|
/linux/drivers/regulator/ |
H A D | helpers.c | 178 * written if the range changed, even if the old selector was same as in write_separate_vsel_and_range() 194 * @sel: Selector to set 275 * @sel: Selector to set 316 int selector = 0; in regulator_map_voltage_iterate() local 329 selector = i; in regulator_map_voltage_iterate() 334 return selector; in regulator_map_voltage_iterate() 482 unsigned int selector = 0; in regulator_map_voltage_pickable_linear_range() local 498 selector += linear_range_values_in_range(range); in regulator_map_voltage_pickable_linear_range() 505 selector += linear_range_values_in_range(range); in regulator_map_voltage_pickable_linear_range() 509 ret = selector + sel - range->min_sel; in regulator_map_voltage_pickable_linear_range() [all …]
|
H A D | tps65910-regulator.c | 595 unsigned selector) in tps65910_set_voltage_dcdc_sel() argument 603 dcdc_mult = (selector / VDD1_2_NUM_VOLT_FINE) + 1; in tps65910_set_voltage_dcdc_sel() 606 vsel = (selector % VDD1_2_NUM_VOLT_FINE) + 3; in tps65910_set_voltage_dcdc_sel() 613 dcdc_mult = (selector / VDD1_2_NUM_VOLT_FINE) + 1; in tps65910_set_voltage_dcdc_sel() 616 vsel = (selector % VDD1_2_NUM_VOLT_FINE) + 3; in tps65910_set_voltage_dcdc_sel() 623 vsel = selector + 3; in tps65910_set_voltage_dcdc_sel() 632 unsigned selector) in tps65910_set_voltage_sel() argument 653 selector << LDO_SEL_SHIFT); in tps65910_set_voltage_sel() 656 selector << BBCH_BBSEL_SHIFT); in tps65910_set_voltage_sel() 663 unsigned selector) in tps65911_set_voltage_sel() argument [all …]
|
H A D | max8660.c | 127 u8 selector = max8660->shadow_regs[reg]; in max8660_dcdc_get_voltage_sel() local 129 return selector; in max8660_dcdc_get_voltage_sel() 133 unsigned int selector) in max8660_dcdc_set_voltage_sel() argument 140 ret = max8660_write(max8660, reg, 0, selector); in max8660_dcdc_set_voltage_sel() 166 u8 selector = max8660->shadow_regs[MAX8660_MDTV2]; in max8660_ldo5_get_voltage_sel() local 167 return selector; in max8660_ldo5_get_voltage_sel() 171 unsigned int selector) in max8660_ldo5_set_voltage_sel() argument 176 ret = max8660_write(max8660, MAX8660_MDTV2, 0, selector); in max8660_ldo5_set_voltage_sel() 225 u8 selector = (max8660->shadow_regs[MAX8660_L12VCR] >> shift) & 0xf; in max8660_ldo67_get_voltage_sel() local 227 return selector; in max8660_ldo67_get_voltage_sel() [all …]
|
H A D | mc13892-regulator.c | 166 * to get the actual register value for that voltage selector 402 unsigned int val, selector; in mc13892_sw_regulator_get_voltage_sel() local 415 * since this means the selector value we return is at a different in mc13892_sw_regulator_get_voltage_sel() 416 * offset into the selector table. in mc13892_sw_regulator_get_voltage_sel() 424 selector = val & mc13892_regulators[id].vsel_mask; in mc13892_sw_regulator_get_voltage_sel() 428 selector += MC13892_SWxHI_SEL_OFFSET; in mc13892_sw_regulator_get_voltage_sel() 431 dev_dbg(rdev_get_dev(rdev), "%s id: %d val: 0x%08x selector: %d\n", in mc13892_sw_regulator_get_voltage_sel() 432 __func__, id, val, selector); in mc13892_sw_regulator_get_voltage_sel() 434 return selector; in mc13892_sw_regulator_get_voltage_sel() 438 unsigned selector) in mc13892_sw_regulator_set_voltage_sel() argument [all …]
|
/linux/include/linux/ |
H A D | linear_range.h | 10 * struct linear_range - table of selector - value pairs 18 * @min_sel: Lowest selector for range 19 * @max_sel: Highest selector for range 45 int linear_range_get_value(const struct linear_range *r, unsigned int selector, 48 unsigned int selector, unsigned int *val); 50 unsigned int val, unsigned int *selector, 53 unsigned int val, unsigned int *selector, 56 unsigned int val, unsigned int *selector); 59 unsigned int *selector, bool *found);
|
/linux/drivers/pinctrl/ |
H A D | pinctrl-da850-pupd.c | 41 unsigned int selector) in da850_pupd_get_group_name() argument 43 return da850_pupd_group_names[selector]; in da850_pupd_get_group_name() 47 unsigned int selector, in da850_pupd_get_group_pins() argument 65 unsigned int selector, in da850_pupd_pin_config_group_get() argument 74 arg = !!(~val & BIT(selector)); in da850_pupd_pin_config_group_get() 89 arg = !!(val & BIT(selector)); in da850_pupd_pin_config_group_get() 101 unsigned int selector, in da850_pupd_pin_config_group_set() argument 118 ena &= ~BIT(selector); in da850_pupd_pin_config_group_set() 121 ena |= BIT(selector); in da850_pupd_pin_config_group_set() 122 sel |= BIT(selector); in da850_pupd_pin_config_group_set() [all …]
|
H A D | pinmux.c | 40 unsigned int selector = 0; in pinmux_check_ops() local 53 while (selector < nfuncs) { in pinmux_check_ops() 55 selector); in pinmux_check_ops() 58 selector); in pinmux_check_ops() 61 selector++; in pinmux_check_ops() 336 unsigned int selector = 0; in pinmux_func_name_to_selector() local 339 while (selector < nfuncs) { in pinmux_func_name_to_selector() 340 const char *fname = ops->get_function_name(pctldev, selector); in pinmux_func_name_to_selector() 343 return selector; in pinmux_func_name_to_selector() 345 selector++; in pinmux_func_name_to_selector() [all …]
|
H A D | pinconf.c | 77 int selector, ret; in pin_config_group_get() local 96 selector = pinctrl_get_group_selector(pctldev, pin_group); in pin_config_group_get() 97 if (selector < 0) { in pin_config_group_get() 98 ret = selector; in pin_config_group_get() 102 ret = ops->pin_config_group_get(pctldev, selector, config); in pin_config_group_get() 336 struct seq_file *s, unsigned int selector, in pinconf_dump_group() argument 344 ops->pin_config_group_dbg_show(pctldev, s, selector); in pinconf_dump_group() 352 unsigned int selector = 0; in pinconf_groups_show() local 357 while (selector < ngroups) { in pinconf_groups_show() 358 const char *gname = pctlops->get_group_name(pctldev, selector); in pinconf_groups_show() [all …]
|
H A D | pinctrl-mlxbf3.c | 131 unsigned int selector) in mlxbf3_get_group_name() argument 133 return mlxbf3_pinctrl_single_group_names[selector]; in mlxbf3_get_group_name() 137 unsigned int selector, in mlxbf3_get_group_pins() argument 142 *pins = &selector; in mlxbf3_get_group_pins() 173 unsigned int selector) in mlxbf3_pmx_get_func_name() argument 175 return mlxbf3_pmx_funcs[selector].name; in mlxbf3_pmx_get_func_name() 179 unsigned int selector, in mlxbf3_pmx_get_groups() argument 183 *groups = mlxbf3_pmx_funcs[selector].groups; in mlxbf3_pmx_get_groups() 190 unsigned int selector, in mlxbf3_pmx_set() argument 195 if (selector == MLXBF3_GPIO_HW_MODE) { in mlxbf3_pmx_set() [all …]
|
/linux/drivers/pinctrl/visconti/ |
H A D | pinctrl-common.c | 123 unsigned int selector, in visconti_pin_config_group_set() argument 132 pins = priv->devdata->groups[selector].pins; in visconti_pin_config_group_set() 133 num_pins = priv->devdata->groups[selector].nr_pins; in visconti_pin_config_group_set() 136 __func__, selector, num_pins, num_configs); in visconti_pin_config_group_set() 163 unsigned int selector) in visconti_get_group_name() argument 167 return priv->devdata->groups[selector].name; in visconti_get_group_name() 171 unsigned int selector, in visconti_get_group_pins() argument 177 *pins = priv->devdata->groups[selector].pins; in visconti_get_group_pins() 178 *num_pins = priv->devdata->groups[selector].nr_pins; in visconti_get_group_pins() 200 unsigned int selector) in visconti_get_function_name() argument [all …]
|
/linux/drivers/pinctrl/cirrus/ |
H A D | pinctrl-madera-core.c | 455 unsigned int selector) in madera_get_group_name() argument 459 if (selector < priv->chip->n_pin_groups) in madera_get_group_name() 460 return priv->chip->pin_groups[selector].name; in madera_get_group_name() 462 selector -= priv->chip->n_pin_groups; in madera_get_group_name() 463 return madera_pin_single_group_names[selector]; in madera_get_group_name() 467 unsigned int selector, in madera_get_group_pins() argument 473 if (selector < priv->chip->n_pin_groups) { in madera_get_group_pins() 474 *pins = priv->chip->pin_groups[selector].pins; in madera_get_group_pins() 475 *num_pins = priv->chip->pin_groups[selector].n_pins; in madera_get_group_pins() 478 selector -= priv->chip->n_pin_groups; in madera_get_group_pins() [all …]
|
/linux/drivers/pinctrl/ti/ |
H A D | pinctrl-ti-iodelay.c | 378 * ti_iodelay_get_pingroup() - Find the group mapped by a group selector 380 * @selector: Group Selector 382 * Return: Corresponding group representing group selector 385 ti_iodelay_get_pingroup(struct ti_iodelay_device *iod, unsigned int selector) in ti_iodelay_get_pingroup() argument 389 g = pinctrl_generic_get_group(iod->pctl, selector); in ti_iodelay_get_pingroup() 392 selector); in ti_iodelay_get_pingroup() 579 * @selector: Group selector 585 unsigned int selector, in ti_iodelay_pinconf_group_get() argument 592 group = ti_iodelay_get_pingroup(iod, selector); in ti_iodelay_pinconf_group_get() 604 * @selector: Group selector [all …]
|
/linux/tools/testing/selftests/syscall_user_dispatch/ |
H A D | sud_benchmark.c | 36 * To test returning from a sigsys with selector blocked, the test 59 char selector; variable 60 #define SYSCALL_BLOCK (selector = SYSCALL_DISPATCH_FILTER_BLOCK) 61 #define SYSCALL_UNBLOCK (selector = SYSCALL_DISPATCH_FILTER_ALLOW) 166 &selector)) { in main() 175 if (selector == SYSCALL_DISPATCH_FILTER_ALLOW) { in main() 176 fprintf(stderr, "Failed to return with selector blocked.\n"); in main()
|