Home
last modified time | relevance | path

Searched refs:kp (Results 1 – 25 of 172) sorted by relevance

1234567

/Linux-v5.4/drivers/input/keyboard/
Dbcm-keypad.c95 static int bcm_kp_get_keycode(struct bcm_kp *kp, int row, int col) in bcm_kp_get_keycode() argument
97 unsigned int row_shift = get_count_order(kp->n_cols); in bcm_kp_get_keycode()
98 unsigned short *keymap = kp->input_dev->keycode; in bcm_kp_get_keycode()
103 static void bcm_kp_report_keys(struct bcm_kp *kp, int reg_num, int pull_mode) in bcm_kp_report_keys() argument
112 writel(0xFFFFFFFF, kp->base + KPICRN_OFFSET(reg_num)); in bcm_kp_report_keys()
114 state = readl(kp->base + KPSSRN_OFFSET(reg_num)); in bcm_kp_report_keys()
115 change = kp->last_state[reg_num] ^ state; in bcm_kp_report_keys()
116 kp->last_state[reg_num] = state; in bcm_kp_report_keys()
124 keycode = bcm_kp_get_keycode(kp, row, col); in bcm_kp_report_keys()
125 input_report_key(kp->input_dev, keycode, key_press); in bcm_kp_report_keys()
[all …]
Dpmic8xxx-keypad.c108 static u8 pmic8xxx_col_state(struct pmic8xxx_kp *kp, u8 col) in pmic8xxx_col_state() argument
112 return 1 << kp->num_cols; in pmic8xxx_col_state()
114 return col & ((1 << kp->num_cols) - 1); in pmic8xxx_col_state()
129 static int pmic8xxx_chk_sync_read(struct pmic8xxx_kp *kp) in pmic8xxx_chk_sync_read() argument
134 rc = regmap_read(kp->regmap, KEYP_SCAN, &scan_val); in pmic8xxx_chk_sync_read()
136 dev_err(kp->dev, "Error reading KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read()
142 rc = regmap_write(kp->regmap, KEYP_SCAN, scan_val); in pmic8xxx_chk_sync_read()
144 dev_err(kp->dev, "Error writing KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read()
154 static int pmic8xxx_kp_read_data(struct pmic8xxx_kp *kp, u16 *state, in pmic8xxx_kp_read_data() argument
161 rc = regmap_read(kp->regmap, data_reg, &val); in pmic8xxx_kp_read_data()
[all …]
Dtwl4030_keypad.c125 static int twl4030_kpread(struct twl4030_keypad *kp, in twl4030_kpread() argument
131 dev_warn(kp->dbg_dev, in twl4030_kpread()
138 static int twl4030_kpwrite_u8(struct twl4030_keypad *kp, u8 data, u32 reg) in twl4030_kpwrite_u8() argument
143 dev_warn(kp->dbg_dev, in twl4030_kpwrite_u8()
150 static inline u16 twl4030_col_xlate(struct twl4030_keypad *kp, u8 col) in twl4030_col_xlate() argument
159 return 1 << kp->n_cols; in twl4030_col_xlate()
161 return col & ((1 << kp->n_cols) - 1); in twl4030_col_xlate()
164 static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state) in twl4030_read_kp_matrix_state() argument
168 int ret = twl4030_kpread(kp, new_state, in twl4030_read_kp_matrix_state()
169 KEYP_FULL_CODE_7_0, kp->n_rows); in twl4030_read_kp_matrix_state()
[all …]
/Linux-v5.4/drivers/pwm/
Dpwm-bcm-kona.c82 static void kona_pwmc_prepare_for_settings(struct kona_pwmc *kp, in kona_pwmc_prepare_for_settings() argument
85 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
89 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_prepare_for_settings()
98 static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan) in kona_pwmc_apply_settings() argument
100 unsigned int value = readl(kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
105 writel(value, kp->base + PWM_CONTROL_OFFSET); in kona_pwmc_apply_settings()
114 struct kona_pwmc *kp = to_kona_pwmc(chip); in kona_pwmc_config() local
130 rate = clk_get_rate(kp->clk); in kona_pwmc_config()
159 kona_pwmc_prepare_for_settings(kp, chan); in kona_pwmc_config()
161 value = readl(kp->base + PRESCALE_OFFSET); in kona_pwmc_config()
[all …]
/Linux-v5.4/crypto/
Daes_generic.c1186 const u32 *kp = ctx->key_enc + 4; in crypto_aes_encrypt() local
1195 f_nround(b1, b0, kp); in crypto_aes_encrypt()
1196 f_nround(b0, b1, kp); in crypto_aes_encrypt()
1200 f_nround(b1, b0, kp); in crypto_aes_encrypt()
1201 f_nround(b0, b1, kp); in crypto_aes_encrypt()
1204 f_nround(b1, b0, kp); in crypto_aes_encrypt()
1205 f_nround(b0, b1, kp); in crypto_aes_encrypt()
1206 f_nround(b1, b0, kp); in crypto_aes_encrypt()
1207 f_nround(b0, b1, kp); in crypto_aes_encrypt()
1208 f_nround(b1, b0, kp); in crypto_aes_encrypt()
[all …]
Dvmac.c148 #define nh_16(mp, kp, nw, rh, rl) \ argument
153 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
154 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
159 #define nh_16_2(mp, kp, nw, rh, rl, rh1, rl1) \ argument
164 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
165 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
167 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \
168 pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \
174 #define nh_vmac_nhbytes(mp, kp, nw, rh, rl) \ argument
179 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
[all …]
/Linux-v5.4/kernel/
Dparams.c100 static bool param_check_unsafe(const struct kernel_param *kp) in param_check_unsafe() argument
102 if (kp->flags & KERNEL_PARAM_FL_HWPARAM && in param_check_unsafe()
106 if (kp->flags & KERNEL_PARAM_FL_UNSAFE) { in param_check_unsafe()
108 kp->name); in param_check_unsafe()
218 int param_set_##name(const char *val, const struct kernel_param *kp) \
220 return strtolfn(val, 0, (type *)kp->arg); \
222 int param_get_##name(char *buffer, const struct kernel_param *kp) \
225 *((type *)kp->arg)); \
245 int param_set_charp(const char *val, const struct kernel_param *kp) in param_set_charp() argument
248 pr_err("%s: string parameter too long\n", kp->name); in param_set_charp()
[all …]
Dfail_function.c15 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs);
17 static void fei_post_handler(struct kprobe *kp, struct pt_regs *regs, in fei_post_handler() argument
28 struct kprobe kp; member
62 attr->kp.symbol_name = kstrdup(sym, GFP_KERNEL); in fei_attr_new()
63 if (!attr->kp.symbol_name) { in fei_attr_new()
67 attr->kp.pre_handler = fei_kprobe_handler; in fei_attr_new()
68 attr->kp.post_handler = fei_post_handler; in fei_attr_new()
78 kfree(attr->kp.symbol_name); in fei_attr_free()
88 if (!strcmp(attr->kp.symbol_name, sym)) in fei_attr_lookup()
124 if (attr->kp.addr) { in fei_retval_set()
[all …]
Dkprobes.c307 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance() argument
309 __this_cpu_write(kprobe_instance, kp); in set_kprobe_instance()
372 struct kprobe *kp; in opt_pre_handler() local
374 list_for_each_entry_rcu(kp, &p->list, list) { in opt_pre_handler()
375 if (kp->pre_handler && likely(!kprobe_disabled(kp))) { in opt_pre_handler()
376 set_kprobe_instance(kp); in opt_pre_handler()
377 kp->pre_handler(kp, regs); in opt_pre_handler()
389 op = container_of(p, struct optimized_kprobe, kp); in free_aggr_kprobe()
401 op = container_of(p, struct optimized_kprobe, kp); in kprobe_optready()
417 op = container_of(p, struct optimized_kprobe, kp); in kprobe_disarmed()
[all …]
Dtest_kprobes.c50 static struct kprobe kp = { variable
60 ret = register_kprobe(&kp); in test_kprobe()
67 unregister_kprobe(&kp); in test_kprobe()
112 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes()
115 kp.addr = NULL; in test_kprobes()
116 kp.flags = 0; in test_kprobes()
193 .kp.symbol_name = "kprobe_target"
236 .kp.symbol_name = "kprobe_target2"
245 rp.kp.addr = NULL; in test_kretprobes()
246 rp.kp.flags = 0; in test_kretprobes()
/Linux-v5.4/arch/x86/kernel/kprobes/
Dopt.c37 struct kprobe *kp; in __recover_optprobed_insn() local
42 kp = get_kprobe((void *)addr - i); in __recover_optprobed_insn()
44 if (kp && kprobe_optimized(kp)) { in __recover_optprobed_insn()
45 op = container_of(kp, struct optimized_kprobe, kp); in __recover_optprobed_insn()
63 if (addr == (unsigned long)kp->addr) { in __recover_optprobed_insn()
64 buf[0] = kp->opcode; in __recover_optprobed_insn()
67 offs = addr - (unsigned long)kp->addr - 1; in __recover_optprobed_insn()
151 if (kprobe_disabled(&op->kp)) in optimized_callback()
156 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
165 regs->ip = (unsigned long)op->kp.addr + INT3_SIZE; in optimized_callback()
[all …]
/Linux-v5.4/arch/arm/probes/kprobes/
Dopt-arm.c125 static int can_optimize(struct kprobe *kp) in can_optimize() argument
127 if (kp->ainsn.stack_space < 0) in can_optimize()
133 if (kp->ainsn.stack_space > 255 - sizeof(struct pt_regs)) in can_optimize()
154 struct kprobe *p = &op->kp; in optimized_callback()
158 regs->ARM_pc = (unsigned long)op->kp.addr; in optimized_callback()
165 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
167 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
169 opt_pre_handler(&op->kp, regs); in optimized_callback()
178 op->kp.ainsn.insn_singlestep(p->opcode, &p->ainsn, regs); in optimized_callback()
266 (unsigned long)(op->kp.addr) + 4); in NOKPROBE_SYMBOL()
[all …]
/Linux-v5.4/include/linux/
Dmoduleparam.h51 int (*set)(const char *val, const struct kernel_param *kp);
53 int (*get)(char *buffer, const struct kernel_param *kp);
340 extern int param_set_byte(const char *val, const struct kernel_param *kp);
341 extern int param_get_byte(char *buffer, const struct kernel_param *kp);
345 extern int param_set_short(const char *val, const struct kernel_param *kp);
346 extern int param_get_short(char *buffer, const struct kernel_param *kp);
350 extern int param_set_ushort(const char *val, const struct kernel_param *kp);
351 extern int param_get_ushort(char *buffer, const struct kernel_param *kp);
355 extern int param_set_int(const char *val, const struct kernel_param *kp);
356 extern int param_get_int(char *buffer, const struct kernel_param *kp);
[all …]
Dkprobes.h148 struct kprobe kp; member
212 ri->rp, ri->rp->kp.addr); in kretprobe_assert()
290 struct kprobe kp; member
368 int disable_kprobe(struct kprobe *kp);
369 int enable_kprobe(struct kprobe *kp);
371 void dump_kprobe(struct kprobe *kp);
425 static inline int disable_kprobe(struct kprobe *kp) in disable_kprobe() argument
429 static inline int enable_kprobe(struct kprobe *kp) in enable_kprobe() argument
441 return disable_kprobe(&rp->kp); in disable_kretprobe()
445 return enable_kprobe(&rp->kp); in enable_kretprobe()
/Linux-v5.4/drivers/staging/speakup/
Dkeyhelp.c51 u_char *kp, counters[MAXFUNCS], ch, ch1; in build_key_data() local
58 kp = state_tbl + nstates + 1; in build_key_data()
59 while (*kp++) { in build_key_data()
61 for (i = 0; i < nstates; i++, kp++) { in build_key_data()
62 if (!*kp) in build_key_data()
64 if ((state_tbl[i] & 16) != 0 && *kp == SPK_KEY) in build_key_data()
66 counters[*kp]++; in build_key_data()
81 kp = state_tbl + nstates + 1; in build_key_data()
82 while ((ch = *kp++)) { in build_key_data()
84 ch1 = *kp++; in build_key_data()
[all …]
/Linux-v5.4/samples/kprobes/
Dkprobe_example.c23 static struct kprobe kp = { variable
97 kp.pre_handler = handler_pre; in kprobe_init()
98 kp.post_handler = handler_post; in kprobe_init()
99 kp.fault_handler = handler_fault; in kprobe_init()
101 ret = register_kprobe(&kp); in kprobe_init()
106 pr_info("Planted kprobe at %p\n", kp.addr); in kprobe_init()
112 unregister_kprobe(&kp); in kprobe_exit()
113 pr_info("kprobe at %p unregistered\n", kp.addr); in kprobe_exit()
Dkretprobe_example.c83 my_kretprobe.kp.symbol_name = func_name; in kretprobe_init()
90 my_kretprobe.kp.symbol_name, my_kretprobe.kp.addr); in kretprobe_init()
97 pr_info("kretprobe at %p unregistered\n", my_kretprobe.kp.addr); in kretprobe_exit()
101 my_kretprobe.nmissed, my_kretprobe.kp.symbol_name); in kretprobe_exit()
/Linux-v5.4/arch/powerpc/kernel/
Doptprobes.c115 if (kprobe_disabled(&op->kp)) in optimized_callback()
121 kprobes_inc_nmissed_count(&op->kp); in optimized_callback()
123 __this_cpu_write(current_kprobe, &op->kp); in optimized_callback()
124 regs->nip = (unsigned long)op->kp.addr; in optimized_callback()
126 opt_pre_handler(&op->kp, regs); in optimized_callback()
316 memcpy(op->optinsn.copied_insn, op->kp.addr, in arch_optimize_kprobes()
318 patch_instruction(op->kp.addr, in arch_optimize_kprobes()
319 create_branch((unsigned int *)op->kp.addr, in arch_optimize_kprobes()
327 arch_arm_kprobe(&op->kp); in arch_unoptimize_kprobe()
345 return ((unsigned long)op->kp.addr <= addr && in arch_within_optimized_kprobe()
[all …]
/Linux-v5.4/drivers/power/supply/
Dtest_power.c334 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument
341 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument
347 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument
354 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument
361 const struct kernel_param *kp) in param_set_battery_status() argument
368 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument
375 const struct kernel_param *kp) in param_set_battery_health() argument
382 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument
389 const struct kernel_param *kp) in param_set_battery_present() argument
397 const struct kernel_param *kp) in param_get_battery_present() argument
[all …]
/Linux-v5.4/kernel/trace/
Dtrace_kprobe.c99 return tk->rp.kp.offset; in trace_kprobe_offset()
104 return !!(kprobe_gone(&tk->rp.kp)); in trace_kprobe_has_gone()
150 snprintf(buf, sizeof(buf), "0x%p", tk->rp.kp.addr); in trace_kprobe_match_command_head()
151 else if (tk->rp.kp.offset) in trace_kprobe_match_command_head()
153 trace_kprobe_symbol(tk), tk->rp.kp.offset); in trace_kprobe_match_command_head()
186 return !(list_empty(&tk->rp.kp.list) && in trace_kprobe_is_registered()
187 hlist_unhashed(&tk->rp.kp.hlist)); in trace_kprobe_is_registered()
200 addr += tk->rp.kp.offset; in trace_kprobe_address()
202 addr = (unsigned long)tk->rp.kp.addr; in trace_kprobe_address()
223 return tk ? kprobe_on_func_entry(tk->rp.kp.addr, in trace_kprobe_on_func_entry()
[all …]
/Linux-v5.4/security/apparmor/
Dlsm.c1248 static int param_set_aabool(const char *val, const struct kernel_param *kp);
1249 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
1257 static int param_set_aauint(const char *val, const struct kernel_param *kp);
1258 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
1265 static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp);
1266 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
1274 static int param_set_audit(const char *val, const struct kernel_param *kp);
1275 static int param_get_audit(char *buffer, const struct kernel_param *kp);
1277 static int param_set_mode(const char *val, const struct kernel_param *kp);
1278 static int param_get_mode(char *buffer, const struct kernel_param *kp);
[all …]
/Linux-v5.4/tools/thermal/tmon/
Dpid.c62 p_param.kp = .36; in init_thermal_controller()
101 p_term = -p_param.kp * (xk - xk_1); in controller_handler()
102 i_term = p_param.kp * p_param.ki * p_param.ts * ek; in controller_handler()
103 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
/Linux-v5.4/drivers/iio/pressure/
Ddps310.c479 s64 kp; in dps310_calculate_pressure() local
488 kp = (s64)kpi; in dps310_calculate_pressure()
507 denoms[1] = kp; in dps310_calculate_pressure()
509 denoms[2] = kp * kp; in dps310_calculate_pressure()
511 denoms[3] = kp * kp * kp; in dps310_calculate_pressure()
515 denoms[5] = kp * kt; in dps310_calculate_pressure()
517 denoms[6] = kp * kp * kt; in dps310_calculate_pressure()
/Linux-v5.4/drivers/char/
Dsonypi.c763 struct sonypi_keypress kp; in input_keyrelease() local
765 while (kfifo_out_locked(&sonypi_device.input_fifo, (unsigned char *)&kp, in input_keyrelease()
766 sizeof(kp), &sonypi_device.input_fifo_lock) in input_keyrelease()
767 == sizeof(kp)) { in input_keyrelease()
769 input_report_key(kp.dev, kp.key, 0); in input_keyrelease()
770 input_sync(kp.dev); in input_keyrelease()
778 struct sonypi_keypress kp = { NULL }; in sonypi_report_input_event() local
795 kp.key = BTN_MIDDLE; in sonypi_report_input_event()
796 kp.dev = jog_dev; in sonypi_report_input_event()
806 kp.dev = key_dev; in sonypi_report_input_event()
[all …]
/Linux-v5.4/drivers/gpu/drm/
Ddrm_kms_helper_common.c41 static int edid_firmware_set(const char *val, const struct kernel_param *kp) in edid_firmware_set() argument
48 static int edid_firmware_get(char *buffer, const struct kernel_param *kp) in edid_firmware_get() argument

1234567