/drivers/input/keyboard/ |
D | bcm-keypad.c | 95 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 …]
|
D | pmic8xxx-keypad.c | 116 static u8 pmic8xxx_col_state(struct pmic8xxx_kp *kp, u8 col) in pmic8xxx_col_state() argument 120 return 1 << kp->num_cols; in pmic8xxx_col_state() 122 return col & ((1 << kp->num_cols) - 1); in pmic8xxx_col_state() 137 static int pmic8xxx_chk_sync_read(struct pmic8xxx_kp *kp) in pmic8xxx_chk_sync_read() argument 142 rc = regmap_read(kp->regmap, KEYP_SCAN, &scan_val); in pmic8xxx_chk_sync_read() 144 dev_err(kp->dev, "Error reading KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read() 150 rc = regmap_write(kp->regmap, KEYP_SCAN, scan_val); in pmic8xxx_chk_sync_read() 152 dev_err(kp->dev, "Error writing KEYP_SCAN reg, rc=%d\n", rc); in pmic8xxx_chk_sync_read() 162 static int pmic8xxx_kp_read_data(struct pmic8xxx_kp *kp, u16 *state, in pmic8xxx_kp_read_data() argument 169 rc = regmap_read(kp->regmap, data_reg, &val); in pmic8xxx_kp_read_data() [all …]
|
D | twl4030_keypad.c | 138 static int twl4030_kpread(struct twl4030_keypad *kp, in twl4030_kpread() argument 144 dev_warn(kp->dbg_dev, in twl4030_kpread() 151 static int twl4030_kpwrite_u8(struct twl4030_keypad *kp, u8 data, u32 reg) in twl4030_kpwrite_u8() argument 156 dev_warn(kp->dbg_dev, in twl4030_kpwrite_u8() 163 static inline u16 twl4030_col_xlate(struct twl4030_keypad *kp, u8 col) in twl4030_col_xlate() argument 172 return 1 << kp->n_cols; in twl4030_col_xlate() 174 return col & ((1 << kp->n_cols) - 1); in twl4030_col_xlate() 177 static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state) in twl4030_read_kp_matrix_state() argument 181 int ret = twl4030_kpread(kp, new_state, in twl4030_read_kp_matrix_state() 182 KEYP_FULL_CODE_7_0, kp->n_rows); in twl4030_read_kp_matrix_state() [all …]
|
/drivers/staging/media/atomisp/pci/atomisp2/ |
D | atomisp_compat_ioctl32.c | 30 static int get_atomisp_histogram32(struct atomisp_histogram *kp, in get_atomisp_histogram32() argument 36 get_user(kp->num_elements, &up->num_elements) || in get_atomisp_histogram32() 40 kp->data = compat_ptr(tmp); in get_atomisp_histogram32() 44 static int put_atomisp_histogram32(struct atomisp_histogram *kp, in put_atomisp_histogram32() argument 47 compat_uptr_t tmp = (compat_uptr_t)((uintptr_t)kp->data); in put_atomisp_histogram32() 50 put_user(kp->num_elements, &up->num_elements) || in put_atomisp_histogram32() 57 static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp, in get_v4l2_pix_format() argument 60 if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format))) in get_v4l2_pix_format() 65 static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp, in put_v4l2_pix_format() argument 68 if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format))) in put_v4l2_pix_format() [all …]
|
/drivers/input/misc/ |
D | gpio_matrix.c | 37 static void clear_phantom_key(struct gpio_kp *kp, int out, int in) in clear_phantom_key() argument 39 struct gpio_event_matrix_info *mi = kp->keypad_info; in clear_phantom_key() 45 if (!test_bit(keycode, kp->input_devs->dev[dev]->key)) { in clear_phantom_key() 50 __clear_bit(key_index, kp->keys_pressed); in clear_phantom_key() 59 static int restore_keys_for_input(struct gpio_kp *kp, int out, int in) in restore_keys_for_input() argument 64 key_index = out * kp->keypad_info->ninputs + in; in restore_keys_for_input() 65 while (out < kp->keypad_info->noutputs) { in restore_keys_for_input() 66 if (test_bit(key_index, kp->keys_pressed)) { in restore_keys_for_input() 68 clear_phantom_key(kp, out, in); in restore_keys_for_input() 70 key_index += kp->keypad_info->ninputs; in restore_keys_for_input() [all …]
|
D | ati_remote2.c | 42 const struct kernel_param *kp, in ati_remote2_set_mask() argument 58 *(unsigned int *)kp->arg = mask; in ati_remote2_set_mask() 64 const struct kernel_param *kp) in ati_remote2_set_channel_mask() argument 68 return ati_remote2_set_mask(val, kp, ATI_REMOTE2_MAX_CHANNEL_MASK); in ati_remote2_set_channel_mask() 72 const struct kernel_param *kp) in ati_remote2_get_channel_mask() argument 76 return sprintf(buffer, "0x%04x", *(unsigned int *)kp->arg); in ati_remote2_get_channel_mask() 80 const struct kernel_param *kp) in ati_remote2_set_mode_mask() argument 84 return ati_remote2_set_mask(val, kp, ATI_REMOTE2_MAX_MODE_MASK); in ati_remote2_set_mode_mask() 88 const struct kernel_param *kp) in ati_remote2_get_mode_mask() argument 92 return sprintf(buffer, "0x%02x", *(unsigned int *)kp->arg); in ati_remote2_get_mode_mask()
|
D | gpio_input.c | 68 key_entry = kp->keys_info->keymap; in gpio_event_input_timer_func() 69 key_state = kp->key_state; in gpio_event_input_timer_func() 143 key_entry = kp->keys_info->keymap; in gpio_event_input_timer_func() 144 key_state = kp->key_state; in gpio_event_input_timer_func()
|
/drivers/pwm/ |
D | pwm-bcm-kona.c | 82 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/media/v4l2-core/ |
D | v4l2-compat-ioctl32.c | 59 static int get_v4l2_window32(struct v4l2_window __user *kp, in get_v4l2_window32() argument 69 copy_in_user(&kp->w, &up->w, sizeof(up->w)) || in get_v4l2_window32() 70 assign_in_user(&kp->field, &up->field) || in get_v4l2_window32() 71 assign_in_user(&kp->chromakey, &up->chromakey) || in get_v4l2_window32() 72 assign_in_user(&kp->global_alpha, &up->global_alpha) || in get_v4l2_window32() 74 put_user(clipcount, &kp->clipcount)) in get_v4l2_window32() 79 return put_user(NULL, &kp->clips); in get_v4l2_window32() 87 if (put_user(kclips, &kp->clips)) in get_v4l2_window32() 101 static int put_v4l2_window32(struct v4l2_window __user *kp, in put_v4l2_window32() argument 109 if (copy_in_user(&up->w, &kp->w, sizeof(kp->w)) || in put_v4l2_window32() [all …]
|
/drivers/staging/lustre/lnet/libcfs/ |
D | debug.c | 57 const struct kernel_param *kp) in libcfs_param_debug_mb_set() argument 66 if (!*((unsigned int *)kp->arg)) { in libcfs_param_debug_mb_set() 67 *((unsigned int *)kp->arg) = num; in libcfs_param_debug_mb_set() 74 *((unsigned int *)kp->arg) = cfs_trace_get_debug_mb(); in libcfs_param_debug_mb_set() 104 const struct kernel_param *kp, in param_set_delay_minmax() argument 119 *((unsigned int *)kp->arg) = d; in param_set_delay_minmax() 124 static int param_get_delay(char *buffer, const struct kernel_param *kp) in param_get_delay() argument 126 unsigned int d = *(unsigned int *)kp->arg; in param_get_delay() 135 const struct kernel_param *kp) in param_set_console_max_delay() argument 137 return param_set_delay_minmax(val, kp, in param_set_console_max_delay() [all …]
|
/drivers/staging/speakup/ |
D | keyhelp.c | 60 u_char *kp, counters[MAXFUNCS], ch, ch1; in build_key_data() local 67 kp = state_tbl + nstates + 1; in build_key_data() 68 while (*kp++) { in build_key_data() 70 for (i = 0; i < nstates; i++, kp++) { in build_key_data() 71 if (!*kp) in build_key_data() 73 if ((state_tbl[i] & 16) != 0 && *kp == SPK_KEY) in build_key_data() 75 counters[*kp]++; in build_key_data() 90 kp = state_tbl + nstates + 1; in build_key_data() 91 while ((ch = *kp++)) { in build_key_data() 93 ch1 = *kp++; in build_key_data() [all …]
|
/drivers/power/supply/ |
D | test_power.c | 337 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument 344 static int param_get_ac_online(char *buffer, const struct kernel_param *kp) in param_get_ac_online() argument 350 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument 357 static int param_get_usb_online(char *buffer, const struct kernel_param *kp) in param_get_usb_online() argument 364 const struct kernel_param *kp) in param_set_battery_status() argument 371 static int param_get_battery_status(char *buffer, const struct kernel_param *kp) in param_get_battery_status() argument 378 const struct kernel_param *kp) in param_set_battery_health() argument 385 static int param_get_battery_health(char *buffer, const struct kernel_param *kp) in param_get_battery_health() argument 392 const struct kernel_param *kp) in param_set_battery_present() argument 400 const struct kernel_param *kp) in param_get_battery_present() argument [all …]
|
/drivers/char/ |
D | sonypi.c | 777 struct sonypi_keypress kp; in input_keyrelease() local 779 while (kfifo_out_locked(&sonypi_device.input_fifo, (unsigned char *)&kp, in input_keyrelease() 780 sizeof(kp), &sonypi_device.input_fifo_lock) in input_keyrelease() 781 == sizeof(kp)) { in input_keyrelease() 783 input_report_key(kp.dev, kp.key, 0); in input_keyrelease() 784 input_sync(kp.dev); in input_keyrelease() 792 struct sonypi_keypress kp = { NULL }; in sonypi_report_input_event() local 809 kp.key = BTN_MIDDLE; in sonypi_report_input_event() 810 kp.dev = jog_dev; in sonypi_report_input_event() 820 kp.dev = key_dev; in sonypi_report_input_event() [all …]
|
/drivers/media/usb/uvc/ |
D | uvc_v4l2.c | 1284 static int uvc_v4l2_get_xu_mapping(struct uvc_xu_control_mapping *kp, in uvc_v4l2_get_xu_mapping() argument 1290 __copy_from_user(kp, up, offsetof(typeof(*up), menu_info)) || in uvc_v4l2_get_xu_mapping() 1291 __get_user(kp->menu_count, &up->menu_count)) in uvc_v4l2_get_xu_mapping() 1294 memset(kp->reserved, 0, sizeof(kp->reserved)); in uvc_v4l2_get_xu_mapping() 1296 if (kp->menu_count == 0) { in uvc_v4l2_get_xu_mapping() 1297 kp->menu_info = NULL; in uvc_v4l2_get_xu_mapping() 1303 kp->menu_info = compat_ptr(p); in uvc_v4l2_get_xu_mapping() 1308 static int uvc_v4l2_put_xu_mapping(const struct uvc_xu_control_mapping *kp, in uvc_v4l2_put_xu_mapping() argument 1312 __copy_to_user(up, kp, offsetof(typeof(*up), menu_info)) || in uvc_v4l2_put_xu_mapping() 1313 __put_user(kp->menu_count, &up->menu_count)) in uvc_v4l2_put_xu_mapping() [all …]
|
/drivers/edac/ |
D | edac_module.c | 23 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/ |
D | ipmi_watchdog.c | 196 static int set_param_timeout(const char *val, const struct kernel_param *kp) in set_param_timeout() argument 208 *((int *)kp->arg) = l; in set_param_timeout() 228 static int set_param_str(const char *val, const struct kernel_param *kp) in set_param_str() argument 230 action_fn fn = (action_fn) kp->arg; in set_param_str() 252 static int get_param_str(char *buffer, const struct kernel_param *kp) in get_param_str() argument 254 action_fn fn = (action_fn) kp->arg; in get_param_str() 264 static int set_param_wdog_ifnum(const char *val, const struct kernel_param *kp) in set_param_wdog_ifnum() argument 266 int rv = param_set_int(val, kp); in set_param_wdog_ifnum()
|
/drivers/ide/ |
D | ide.c | 179 static int ide_set_dev_param_mask(const char *s, const struct kernel_param *kp) in ide_set_dev_param_mask() argument 182 unsigned int *dev_param_mask = (unsigned int *)kp->arg; in ide_set_dev_param_mask() 247 static int ide_set_disk_chs(const char *str, const struct kernel_param *kp) in ide_set_disk_chs() argument 331 static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp) in ide_set_ignore_cable() argument
|
/drivers/infiniband/sw/rxe/ |
D | rxe_sysfs.c | 72 static int rxe_param_set_add(const char *val, const struct kernel_param *kp) in rxe_param_set_add() argument 115 static int rxe_param_set_remove(const char *val, const struct kernel_param *kp) in rxe_param_set_remove() argument
|
/drivers/usb/phy/ |
D | otg-wakelock.c | 116 static int set_enabled(const char *val, const struct kernel_param *kp) in set_enabled() argument 118 int rv = param_set_bool(val, kp); in set_enabled()
|
/drivers/scsi/fcoe/ |
D | fcoe_transport.c | 37 static int fcoe_transport_show(char *buffer, const struct kernel_param *kp); 606 static int fcoe_transport_show(char *buffer, const struct kernel_param *kp) in fcoe_transport_show() argument 869 const struct kernel_param *kp) in fcoe_transport_create() argument 874 enum fip_mode fip_mode = (enum fip_mode)kp->arg; in fcoe_transport_create() 935 const struct kernel_param *kp) in fcoe_transport_destroy() argument 980 const struct kernel_param *kp) in fcoe_transport_disable() argument 1015 const struct kernel_param *kp) in fcoe_transport_enable() argument
|
/drivers/acpi/ |
D | sysfs.c | 108 static int param_get_debug_layer(char *buffer, const struct kernel_param *kp) in param_get_debug_layer() argument 136 static int param_get_debug_level(char *buffer, const struct kernel_param *kp) in param_get_debug_level() argument 172 int param_set_trace_method_name(const char *val, const struct kernel_param *kp) in param_set_trace_method_name() argument 182 pr_err("%s: string parameter too long\n", kp->name); in param_set_trace_method_name() 214 static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp) in param_get_trace_method_name() argument 234 const struct kernel_param *kp) in param_set_trace_state() argument 270 static int param_get_trace_state(char *buffer, const struct kernel_param *kp) in param_get_trace_state() argument 300 const struct kernel_param *kp) in param_get_acpica_version() argument
|
/drivers/platform/x86/ |
D | sony-laptop.c | 368 struct sony_laptop_keypress kp; in do_sony_laptop_release_key() local 374 (unsigned char *)&kp, sizeof(kp)) == sizeof(kp)) { in do_sony_laptop_release_key() 375 input_report_key(kp.dev, kp.key, 0); in do_sony_laptop_release_key() 376 input_sync(kp.dev); in do_sony_laptop_release_key() 392 struct sony_laptop_keypress kp = { NULL }; in sony_laptop_report_input_event() local 418 kp.key = BTN_MIDDLE; in sony_laptop_report_input_event() 419 kp.dev = jog_dev; in sony_laptop_report_input_event() 428 kp.key = sony_laptop_input_keycode_map[scancode]; in sony_laptop_report_input_event() 429 if (kp.key != KEY_UNKNOWN) in sony_laptop_report_input_event() 430 kp.dev = key_dev; in sony_laptop_report_input_event() [all …]
|
/drivers/clk/bcm/ |
D | clk-iproc-pll.c | 231 static void __pll_bring_out_reset(struct iproc_pll *pll, unsigned int kp, in __pll_bring_out_reset() argument 243 val |= ki << dig_filter->ki_shift | kp << dig_filter->kp_shift | in __pll_bring_out_reset() 261 int ka = 0, ki, kp, ret; in pll_set_rate() local 292 kp = get_kp(ref_freq, kp_index); in pll_set_rate() 293 if (kp < 0) { in pll_set_rate() 295 return kp; in pll_set_rate() 353 __pll_bring_out_reset(pll, kp, ka, ki); in pll_set_rate()
|
/drivers/net/wireless/marvell/mwifiex/ |
D | sta_ioctl.c | 1148 int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp, in mwifiex_set_encode() argument 1158 if (kp && kp->cipher == WLAN_CIPHER_SUITE_AES_CMAC) in mwifiex_set_encode() 1169 if (kp && kp->seq && kp->seq_len) { in mwifiex_set_encode() 1170 memcpy(encrypt_key.pn, kp->seq, kp->seq_len); in mwifiex_set_encode() 1171 encrypt_key.pn_len = kp->seq_len; in mwifiex_set_encode()
|
/drivers/dma/ |
D | dmatest.c | 127 static int dmatest_run_set(const char *val, const struct kernel_param *kp); 128 static int dmatest_run_get(char *val, const struct kernel_param *kp); 204 static int dmatest_wait_get(char *val, const struct kernel_param *kp) in dmatest_wait_get() argument 212 return param_get_bool(val, kp); in dmatest_wait_get() 1012 static int dmatest_run_get(char *val, const struct kernel_param *kp) in dmatest_run_get() argument 1025 return param_get_bool(val, kp); in dmatest_run_get() 1028 static int dmatest_run_set(const char *val, const struct kernel_param *kp) in dmatest_run_set() argument 1034 ret = param_set_bool(val, kp); in dmatest_run_set()
|