Home
last modified time | relevance | path

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

1234

/drivers/input/keyboard/
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 …]
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 …]
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 …]
/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 …]
/drivers/ufs/core/
Dufs-fault-injection.c9 static int ufs_fault_get(char *buffer, const struct kernel_param *kp);
10 static int ufs_fault_set(const char *val, const struct kernel_param *kp);
35 static int ufs_fault_get(char *buffer, const struct kernel_param *kp) in ufs_fault_get() argument
37 const char *fault_str = kp->arg; in ufs_fault_get()
42 static int ufs_fault_set(const char *val, const struct kernel_param *kp) in ufs_fault_set() argument
46 if (kp->arg == g_trigger_eh_str) in ufs_fault_set()
48 else if (kp->arg == g_timeout_str) in ufs_fault_set()
57 strlcpy(kp->arg, val, FAULT_INJ_STR_SIZE); in ufs_fault_set()
Dufs-mcq.c30 static int rw_queue_count_set(const char *val, const struct kernel_param *kp) in rw_queue_count_set() argument
32 return param_set_uint_minmax(val, kp, UFS_MCQ_MIN_RW_QUEUES, in rw_queue_count_set()
46 static int read_queue_count_set(const char *val, const struct kernel_param *kp) in read_queue_count_set() argument
48 return param_set_uint_minmax(val, kp, UFS_MCQ_MIN_READ_QUEUES, in read_queue_count_set()
62 static int poll_queue_count_set(const char *val, const struct kernel_param *kp) in poll_queue_count_set() argument
64 return param_set_uint_minmax(val, kp, UFS_MCQ_MIN_POLL_QUEUES, in poll_queue_count_set()
/drivers/accessibility/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 …]
/drivers/power/supply/
Dtest_power.c346 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument
353 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument
359 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument
366 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument
373 const struct kernel_param *kp) in param_set_battery_status() argument
380 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument
387 const struct kernel_param *kp) in param_set_battery_health() argument
394 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument
401 const struct kernel_param *kp) in param_set_battery_present() argument
409 const struct kernel_param *kp) in param_get_battery_present() argument
[all …]
/drivers/crypto/hisilicon/
Dqm.h318 static inline int q_num_set(const char *val, const struct kernel_param *kp, in q_num_set() argument
346 return param_set_int(val, kp); in q_num_set()
349 static inline int vfs_num_set(const char *val, const struct kernel_param *kp) in vfs_num_set() argument
364 return param_set_int(val, kp); in vfs_num_set()
367 static inline int mode_set(const char *val, const struct kernel_param *kp) in mode_set() argument
380 return param_set_int(val, kp); in mode_set()
383 static inline int uacce_mode_set(const char *val, const struct kernel_param *kp) in uacce_mode_set() argument
385 return mode_set(val, kp); in uacce_mode_set()
/drivers/iio/pressure/
Ddps310.c629 s64 kp; in dps310_calculate_pressure() local
638 kp = (s64)kpi; in dps310_calculate_pressure()
657 denoms[1] = kp; in dps310_calculate_pressure()
659 denoms[2] = kp * kp; in dps310_calculate_pressure()
661 denoms[3] = kp * kp * kp; in dps310_calculate_pressure()
665 denoms[5] = kp * kt; in dps310_calculate_pressure()
667 denoms[6] = kp * kp * kt; in dps310_calculate_pressure()
/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 …]
/drivers/dma/
Ddmatest.c150 static int dmatest_run_set(const char *val, const struct kernel_param *kp);
151 static int dmatest_run_get(char *val, const struct kernel_param *kp);
160 static int dmatest_chan_set(const char *val, const struct kernel_param *kp);
161 static int dmatest_chan_get(char *val, const struct kernel_param *kp);
175 static int dmatest_test_list_get(char *val, const struct kernel_param *kp);
278 static int dmatest_wait_get(char *val, const struct kernel_param *kp) in dmatest_wait_get() argument
286 return param_get_bool(val, kp); in dmatest_wait_get()
1163 static int dmatest_run_get(char *val, const struct kernel_param *kp) in dmatest_run_get() argument
1177 return param_get_bool(val, kp); in dmatest_run_get()
1180 static int dmatest_run_set(const char *val, const struct kernel_param *kp) in dmatest_run_set() argument
[all …]
/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
/drivers/input/misc/
Dati_remote2.c37 const struct kernel_param *kp, in ati_remote2_set_mask() argument
53 *(unsigned int *)kp->arg = mask; in ati_remote2_set_mask()
59 const struct kernel_param *kp) in ati_remote2_set_channel_mask() argument
63 return ati_remote2_set_mask(val, kp, ATI_REMOTE2_MAX_CHANNEL_MASK); in ati_remote2_set_channel_mask()
67 const struct kernel_param *kp) in ati_remote2_get_channel_mask() argument
71 return sprintf(buffer, "0x%04x\n", *(unsigned int *)kp->arg); in ati_remote2_get_channel_mask()
75 const struct kernel_param *kp) in ati_remote2_set_mode_mask() argument
79 return ati_remote2_set_mask(val, kp, ATI_REMOTE2_MAX_MODE_MASK); in ati_remote2_set_mode_mask()
83 const struct kernel_param *kp) in ati_remote2_get_mode_mask() argument
87 return sprintf(buffer, "0x%02x\n", *(unsigned int *)kp->arg); in ati_remote2_get_mode_mask()
/drivers/edac/
Dedac_module.c23 const struct kernel_param *kp) in edac_set_debug_level() argument
35 return param_set_int(buf, kp); in edac_set_debug_level()
/drivers/char/ipmi/
Dipmi_watchdog.c176 static int set_param_timeout(const char *val, const struct kernel_param *kp) in set_param_timeout() argument
188 *((int *)kp->arg) = l; in set_param_timeout()
208 static int set_param_str(const char *val, const struct kernel_param *kp) in set_param_str() argument
210 action_fn fn = (action_fn) kp->arg; in set_param_str()
232 static int get_param_str(char *buffer, const struct kernel_param *kp) in get_param_str() argument
234 action_fn fn = (action_fn) kp->arg; in get_param_str()
249 static int set_param_wdog_ifnum(const char *val, const struct kernel_param *kp) in set_param_wdog_ifnum() argument
251 int rv = param_set_int(val, kp); in set_param_wdog_ifnum()
Dipmi_si_hotmod.c17 static int hotmod_handler(const char *val, const struct kernel_param *kp);
185 static int hotmod_handler(const char *val, const struct kernel_param *kp) in hotmod_handler() argument
/drivers/infiniband/sw/rxe/
Drxe_sysfs.c29 static int rxe_param_set_add(const char *val, const struct kernel_param *kp) in rxe_param_set_add() argument
79 static int rxe_param_set_remove(const char *val, const struct kernel_param *kp) in rxe_param_set_remove() argument
/drivers/acpi/
Dsysfs.c91 static int param_get_debug_layer(char *buffer, const struct kernel_param *kp) in param_get_debug_layer() argument
119 static int param_get_debug_level(char *buffer, const struct kernel_param *kp) in param_get_debug_level() argument
156 const struct kernel_param *kp) in param_set_trace_method_name() argument
166 pr_err("%s: string parameter too long\n", kp->name); in param_set_trace_method_name()
198 static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp) in param_get_trace_method_name() argument
218 const struct kernel_param *kp) in param_set_trace_state() argument
254 static int param_get_trace_state(char *buffer, const struct kernel_param *kp) in param_get_trace_state() argument
280 const struct kernel_param *kp) in param_get_acpica_version() argument
/drivers/gpu/drm/i915/
Di915_mitigations.c29 static int mitigations_set(const char *val, const struct kernel_param *kp) in mitigations_set() argument
97 static int mitigations_get(char *buffer, const struct kernel_param *kp) in mitigations_get() argument
/drivers/media/usb/uvc/
Duvc_v4l2.c1341 static int uvc_v4l2_get_xu_mapping(struct uvc_xu_control_mapping *kp, in uvc_v4l2_get_xu_mapping() argument
1344 struct uvc_xu_control_mapping32 *p = (void *)kp; in uvc_v4l2_get_xu_mapping()
1354 memset(kp->reserved, 0, sizeof(kp->reserved)); in uvc_v4l2_get_xu_mapping()
1355 kp->menu_info = count ? compat_ptr(info) : NULL; in uvc_v4l2_get_xu_mapping()
1356 kp->menu_count = count; in uvc_v4l2_get_xu_mapping()
1360 static int uvc_v4l2_put_xu_mapping(const struct uvc_xu_control_mapping *kp, in uvc_v4l2_put_xu_mapping() argument
1363 if (copy_to_user(up, kp, offsetof(typeof(*up), menu_info)) || in uvc_v4l2_put_xu_mapping()
1364 put_user(kp->menu_count, &up->menu_count)) in uvc_v4l2_put_xu_mapping()
1381 static int uvc_v4l2_get_xu_query(struct uvc_xu_control_query *kp, in uvc_v4l2_get_xu_query() argument
1389 *kp = (struct uvc_xu_control_query){ in uvc_v4l2_get_xu_query()
[all …]
/drivers/scsi/fcoe/
Dfcoe_transport.c26 static int fcoe_transport_show(char *buffer, const struct kernel_param *kp);
598 static int fcoe_transport_show(char *buffer, const struct kernel_param *kp) in fcoe_transport_show() argument
861 const struct kernel_param *kp) in fcoe_transport_create() argument
866 enum fip_mode fip_mode = (enum fip_mode)(uintptr_t)kp->arg; in fcoe_transport_create()
927 const struct kernel_param *kp) in fcoe_transport_destroy() argument
972 const struct kernel_param *kp) in fcoe_transport_disable() argument
1007 const struct kernel_param *kp) in fcoe_transport_enable() argument
/drivers/platform/x86/
Dsony-laptop.c354 struct sony_laptop_keypress kp; in do_sony_laptop_release_key() local
360 (unsigned char *)&kp, sizeof(kp)) == sizeof(kp)) { in do_sony_laptop_release_key()
361 input_report_key(kp.dev, kp.key, 0); in do_sony_laptop_release_key()
362 input_sync(kp.dev); in do_sony_laptop_release_key()
378 struct sony_laptop_keypress kp = { NULL }; in sony_laptop_report_input_event() local
404 kp.key = BTN_MIDDLE; in sony_laptop_report_input_event()
405 kp.dev = jog_dev; in sony_laptop_report_input_event()
414 kp.key = sony_laptop_input_keycode_map[scancode]; in sony_laptop_report_input_event()
415 if (kp.key != KEY_UNKNOWN) in sony_laptop_report_input_event()
416 kp.dev = key_dev; in sony_laptop_report_input_event()
[all …]
/drivers/net/wireless/marvell/mwifiex/
Dsta_ioctl.c1108 int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp, in mwifiex_set_encode() argument
1118 if (kp && kp->cipher == WLAN_CIPHER_SUITE_AES_CMAC) in mwifiex_set_encode()
1129 if (kp && kp->seq && kp->seq_len) { in mwifiex_set_encode()
1130 memcpy(encrypt_key.pn, kp->seq, kp->seq_len); in mwifiex_set_encode()
1131 encrypt_key.pn_len = kp->seq_len; in mwifiex_set_encode()
/drivers/clk/bcm/
Dclk-iproc-pll.c257 static void __pll_bring_out_reset(struct iproc_pll *pll, unsigned int kp, in __pll_bring_out_reset() argument
269 val |= ki << dig_filter->ki_shift | kp << dig_filter->kp_shift | in __pll_bring_out_reset()
320 int ka = 0, ki, kp, ret; in pll_set_rate() local
352 kp = get_kp(ref_freq, kp_index); in pll_set_rate()
353 if (kp < 0) { in pll_set_rate()
355 return kp; in pll_set_rate()
426 __pll_bring_out_reset(pll, kp, ka, ki); in pll_set_rate()

1234