| /Linux-v4.19/drivers/input/touchscreen/ |
| D | cyttsp_core.c | 84 static int ttsp_read_block_data(struct cyttsp *ts, u8 command, in ttsp_read_block_data() argument 91 error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command, in ttsp_read_block_data() 102 static int ttsp_write_block_data(struct cyttsp *ts, u8 command, in ttsp_write_block_data() argument 109 error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command, in ttsp_write_block_data() 120 static int ttsp_send_command(struct cyttsp *ts, u8 cmd) in ttsp_send_command() argument 122 return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd); in ttsp_send_command() 125 static int cyttsp_handshake(struct cyttsp *ts) in cyttsp_handshake() argument 127 if (ts->use_hndshk) in cyttsp_handshake() 128 return ttsp_send_command(ts, in cyttsp_handshake() 129 ts->xy_data.hst_mode ^ CY_HNDSHK_BIT); in cyttsp_handshake() [all …]
|
| D | ad7879.c | 137 static int ad7879_read(struct ad7879 *ts, u8 reg) in ad7879_read() argument 142 error = regmap_read(ts->regmap, reg, &val); in ad7879_read() 144 dev_err(ts->dev, "failed to read register %#02x: %d\n", in ad7879_read() 152 static int ad7879_write(struct ad7879 *ts, u8 reg, u16 val) in ad7879_write() argument 156 error = regmap_write(ts->regmap, reg, val); in ad7879_write() 158 dev_err(ts->dev, in ad7879_write() 167 static int ad7879_report(struct ad7879 *ts) in ad7879_report() argument 169 struct input_dev *input_dev = ts->input; in ad7879_report() 173 x = ts->conversion_data[AD7879_SEQ_XPOS] & MAX_12BIT; in ad7879_report() 174 y = ts->conversion_data[AD7879_SEQ_YPOS] & MAX_12BIT; in ad7879_report() [all …]
|
| D | mxs-lradc-ts.c | 100 static bool mxs_lradc_check_touch_event(struct mxs_lradc_ts *ts) in mxs_lradc_check_touch_event() argument 102 return !!(readl(ts->base + LRADC_STATUS) & in mxs_lradc_check_touch_event() 106 static void mxs_lradc_map_ts_channel(struct mxs_lradc_ts *ts, unsigned int vch, in mxs_lradc_map_ts_channel() argument 110 ts->base + LRADC_CTRL4 + STMP_OFFSET_REG_CLR); in mxs_lradc_map_ts_channel() 112 ts->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET); in mxs_lradc_map_ts_channel() 115 static void mxs_lradc_setup_ts_channel(struct mxs_lradc_ts *ts, unsigned int ch) in mxs_lradc_setup_ts_channel() argument 126 LRADC_CH_NUM_SAMPLES(ts->over_sample_cnt - 1), in mxs_lradc_setup_ts_channel() 127 ts->base + LRADC_CH(ch)); in mxs_lradc_setup_ts_channel() 134 ts->base + LRADC_CH(ch) + STMP_OFFSET_REG_CLR); in mxs_lradc_setup_ts_channel() 145 LRADC_DELAY_LOOP(ts->over_sample_cnt - 1) | in mxs_lradc_setup_ts_channel() [all …]
|
| D | tsc200x-core.c | 120 static void tsc200x_update_pen_state(struct tsc200x *ts, in tsc200x_update_pen_state() argument 124 input_report_abs(ts->idev, ABS_X, x); in tsc200x_update_pen_state() 125 input_report_abs(ts->idev, ABS_Y, y); in tsc200x_update_pen_state() 126 input_report_abs(ts->idev, ABS_PRESSURE, pressure); in tsc200x_update_pen_state() 127 if (!ts->pen_down) { in tsc200x_update_pen_state() 128 input_report_key(ts->idev, BTN_TOUCH, !!pressure); in tsc200x_update_pen_state() 129 ts->pen_down = true; in tsc200x_update_pen_state() 132 input_report_abs(ts->idev, ABS_PRESSURE, 0); in tsc200x_update_pen_state() 133 if (ts->pen_down) { in tsc200x_update_pen_state() 134 input_report_key(ts->idev, BTN_TOUCH, 0); in tsc200x_update_pen_state() [all …]
|
| D | goodix.c | 88 static int goodix_check_cfg_8(struct goodix_ts_data *ts, 90 static int goodix_check_cfg_16(struct goodix_ts_data *ts, 237 static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data) in goodix_ts_read_input_report() argument 250 error = goodix_i2c_read(ts->client, GOODIX_READ_COOR_ADDR, in goodix_ts_read_input_report() 253 dev_err(&ts->client->dev, "I2C transfer error: %d\n", in goodix_ts_read_input_report() 260 if (touch_num > ts->max_touch_num) in goodix_ts_read_input_report() 265 error = goodix_i2c_read(ts->client, in goodix_ts_read_input_report() 288 static void goodix_ts_report_touch(struct goodix_ts_data *ts, u8 *coor_data) in goodix_ts_report_touch() argument 295 input_mt_slot(ts->input_dev, id); in goodix_ts_report_touch() 296 input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true); in goodix_ts_report_touch() [all …]
|
| D | melfas_mip4.c | 188 static int mip4_i2c_xfer(struct mip4_ts *ts, in mip4_i2c_xfer() argument 194 .addr = ts->client->addr, in mip4_i2c_xfer() 199 .addr = ts->client->addr, in mip4_i2c_xfer() 210 res = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg)); in mip4_i2c_xfer() 215 dev_err(&ts->client->dev, in mip4_i2c_xfer() 234 static int mip4_get_fw_version(struct mip4_ts *ts) in mip4_get_fw_version() argument 237 u8 buf[sizeof(ts->fw_version)]; in mip4_get_fw_version() 240 error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), buf, sizeof(buf)); in mip4_get_fw_version() 242 memset(&ts->fw_version, 0xff, sizeof(ts->fw_version)); in mip4_get_fw_version() 246 mip4_parse_fw_version(buf, &ts->fw_version); in mip4_get_fw_version() [all …]
|
| D | s3c2410_ts.c | 89 static struct s3c2410ts ts; variable 111 data0 = readl(ts.io + S3C2410_ADCDAT0); in touch_timer_fire() 112 data1 = readl(ts.io + S3C2410_ADCDAT1); in touch_timer_fire() 117 if (ts.count == (1 << ts.shift)) { in touch_timer_fire() 118 ts.xp >>= ts.shift; in touch_timer_fire() 119 ts.yp >>= ts.shift; in touch_timer_fire() 121 dev_dbg(ts.dev, "%s: X=%lu, Y=%lu, count=%d\n", in touch_timer_fire() 122 __func__, ts.xp, ts.yp, ts.count); in touch_timer_fire() 124 input_report_abs(ts.input, ABS_X, ts.xp); in touch_timer_fire() 125 input_report_abs(ts.input, ABS_Y, ts.yp); in touch_timer_fire() [all …]
|
| D | ads7846.c | 203 static void ads7846_stop(struct ads7846 *ts) in ads7846_stop() argument 205 if (!ts->disabled && !ts->suspended) { in ads7846_stop() 207 ts->stopped = true; in ads7846_stop() 209 wake_up(&ts->wait); in ads7846_stop() 210 disable_irq(ts->spi->irq); in ads7846_stop() 215 static void ads7846_restart(struct ads7846 *ts) in ads7846_restart() argument 217 if (!ts->disabled && !ts->suspended) { in ads7846_restart() 219 ts->stopped = false; in ads7846_restart() 221 enable_irq(ts->spi->irq); in ads7846_restart() 226 static void __ads7846_disable(struct ads7846 *ts) in __ads7846_disable() argument [all …]
|
| D | hideep.c | 181 static int hideep_pgm_w_mem(struct hideep_ts *ts, u32 addr, in hideep_pgm_w_mem() argument 184 struct pgm_packet *packet = (void *)ts->xfer_buf; in hideep_pgm_w_mem() 187 .addr = ts->client->addr, in hideep_pgm_w_mem() 201 ret = i2c_transfer(ts->client->adapter, &msg, 1); in hideep_pgm_w_mem() 208 static int hideep_pgm_r_mem(struct hideep_ts *ts, u32 addr, in hideep_pgm_r_mem() argument 211 struct pgm_packet *packet = (void *)ts->xfer_buf; in hideep_pgm_r_mem() 215 .addr = ts->client->addr, in hideep_pgm_r_mem() 221 .addr = ts->client->addr, in hideep_pgm_r_mem() 235 ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg)); in hideep_pgm_r_mem() 242 static int hideep_pgm_r_reg(struct hideep_ts *ts, u32 addr, u32 *val) in hideep_pgm_r_reg() argument [all …]
|
| D | tsc2007_core.c | 91 bool tsc2007_is_pen_down(struct tsc2007 *ts) in tsc2007_is_pen_down() argument 107 if (!ts->get_pendown_state) in tsc2007_is_pen_down() 110 return ts->get_pendown_state(&ts->client->dev); in tsc2007_is_pen_down() 115 struct tsc2007 *ts = handle; in tsc2007_soft_irq() local 116 struct input_dev *input = ts->input; in tsc2007_soft_irq() 120 while (!ts->stopped && tsc2007_is_pen_down(ts)) { in tsc2007_soft_irq() 124 mutex_lock(&ts->mlock); in tsc2007_soft_irq() 125 tsc2007_read_values(ts, &tc); in tsc2007_soft_irq() 126 mutex_unlock(&ts->mlock); in tsc2007_soft_irq() 128 rt = tsc2007_calculate_resistance(ts, &tc); in tsc2007_soft_irq() [all …]
|
| D | sun4i-ts.c | 126 static void sun4i_ts_irq_handle_input(struct sun4i_ts_data *ts, u32 reg_val) in sun4i_ts_irq_handle_input() argument 131 x = readl(ts->base + TP_DATA); in sun4i_ts_irq_handle_input() 132 y = readl(ts->base + TP_DATA); in sun4i_ts_irq_handle_input() 134 if (!ts->ignore_fifo_data) { in sun4i_ts_irq_handle_input() 135 input_report_abs(ts->input, ABS_X, x); in sun4i_ts_irq_handle_input() 136 input_report_abs(ts->input, ABS_Y, y); in sun4i_ts_irq_handle_input() 142 input_report_key(ts->input, BTN_TOUCH, 1); in sun4i_ts_irq_handle_input() 143 input_sync(ts->input); in sun4i_ts_irq_handle_input() 145 ts->ignore_fifo_data = false; in sun4i_ts_irq_handle_input() 150 ts->ignore_fifo_data = true; in sun4i_ts_irq_handle_input() [all …]
|
| D | zforce_ts.c | 143 static int zforce_command(struct zforce_ts *ts, u8 cmd) in zforce_command() argument 145 struct i2c_client *client = ts->client; in zforce_command() 155 mutex_lock(&ts->access_mutex); in zforce_command() 157 mutex_unlock(&ts->access_mutex); in zforce_command() 166 static void zforce_reset_assert(struct zforce_ts *ts) in zforce_reset_assert() argument 168 gpiod_set_value_cansleep(ts->gpio_rst, 1); in zforce_reset_assert() 171 static void zforce_reset_deassert(struct zforce_ts *ts) in zforce_reset_deassert() argument 173 gpiod_set_value_cansleep(ts->gpio_rst, 0); in zforce_reset_deassert() 176 static int zforce_send_wait(struct zforce_ts *ts, const char *buf, int len) in zforce_send_wait() argument 178 struct i2c_client *client = ts->client; in zforce_send_wait() [all …]
|
| D | ipaq-micro-ts.c | 32 struct touchscreen_data *ts = data; in micro_ts_receive() local 35 input_report_abs(ts->input, ABS_X, in micro_ts_receive() 37 input_report_abs(ts->input, ABS_Y, in micro_ts_receive() 39 input_report_key(ts->input, BTN_TOUCH, 1); in micro_ts_receive() 40 input_sync(ts->input); in micro_ts_receive() 42 input_report_abs(ts->input, ABS_X, 0); in micro_ts_receive() 43 input_report_abs(ts->input, ABS_Y, 0); in micro_ts_receive() 44 input_report_key(ts->input, BTN_TOUCH, 0); in micro_ts_receive() 45 input_sync(ts->input); in micro_ts_receive() 49 static void micro_ts_toggle_receive(struct touchscreen_data *ts, bool enable) in micro_ts_toggle_receive() argument [all …]
|
| D | zet6223.c | 48 struct zet6223_ts *ts = input_get_drvdata(dev); in zet6223_start() local 50 enable_irq(ts->client->irq); in zet6223_start() 57 struct zet6223_ts *ts = input_get_drvdata(dev); in zet6223_stop() local 59 disable_irq(ts->client->irq); in zet6223_stop() 64 struct zet6223_ts *ts = dev_id; in zet6223_irq() local 71 u8 bufsize = 3 + 4 * ts->fingernum; in zet6223_irq() 77 ret = i2c_master_recv(ts->client, buf, bufsize); in zet6223_irq() 80 dev_err_ratelimited(&ts->client->dev, in zet6223_irq() 89 for (i = 0; i < ts->fingernum; i++) { in zet6223_irq() 93 input_mt_slot(ts->input, i); in zet6223_irq() [all …]
|
| D | ad7877.c | 270 struct ad7877 *ts = spi_get_drvdata(spi); in ad7877_read_adc() local 284 AD7877_POL(ts->stopacq_polarity) | in ad7877_read_adc() 286 AD7877_ACQ(ts->acquisition_time) | AD7877_FCD(0); in ad7877_read_adc() 298 req->xfer[1].delay_usecs = ts->vref_delay_usecs; in ad7877_read_adc() 303 req->xfer[2].delay_usecs = ts->vref_delay_usecs; in ad7877_read_adc() 310 req->xfer[4].tx_buf = &ts->cmd_crtl2; /*REF OFF*/ in ad7877_read_adc() 314 req->xfer[5].tx_buf = &ts->cmd_crtl1; /*DEFAULT*/ in ad7877_read_adc() 331 static int ad7877_process_data(struct ad7877 *ts) in ad7877_process_data() argument 333 struct input_dev *input_dev = ts->input; in ad7877_process_data() 337 x = ts->conversion_data[AD7877_SEQ_XPOS] & MAX_12BIT; in ad7877_process_data() [all …]
|
| D | stmpe-ts.c | 131 struct stmpe_touch *ts = in stmpe_work() local 134 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work() 145 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work() 150 __stmpe_reset_fifo(ts->stmpe); in stmpe_work() 152 input_report_abs(ts->idev, ABS_PRESSURE, 0); in stmpe_work() 153 input_report_key(ts->idev, BTN_TOUCH, 0); in stmpe_work() 154 input_sync(ts->idev); in stmpe_work() 161 struct stmpe_touch *ts = data; in stmpe_ts_handler() local 167 cancel_delayed_work_sync(&ts->work); in stmpe_ts_handler() 175 stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL, in stmpe_ts_handler() [all …]
|
| D | ts4800-ts.c | 51 struct ts4800_ts *ts = dev->private; in ts4800_ts_open() local 54 ts->pendown = false; in ts4800_ts_open() 55 ts->debounce = DEBOUNCE_COUNT; in ts4800_ts_open() 57 ret = regmap_update_bits(ts->regmap, ts->reg, ts->bit, ts->bit); in ts4800_ts_open() 59 dev_warn(ts->dev, "Failed to enable touchscreen\n"); in ts4800_ts_open() 64 struct ts4800_ts *ts = dev->private; in ts4800_ts_close() local 67 ret = regmap_update_bits(ts->regmap, ts->reg, ts->bit, 0); in ts4800_ts_close() 69 dev_warn(ts->dev, "Failed to disable touchscreen\n"); in ts4800_ts_close() 76 struct ts4800_ts *ts = dev->private; in ts4800_ts_poll() local 77 u16 last_x = readw(ts->base + X_OFFSET); in ts4800_ts_poll() [all …]
|
| D | raydium_i2c_ts.c | 266 static int raydium_i2c_query_ts_info(struct raydium_data *ts) in raydium_i2c_query_ts_info() argument 268 struct i2c_client *client = ts->client; in raydium_i2c_query_ts_info() 285 if (ts->report_data && ts->pkg_size != data_info.pkg_size) { in raydium_i2c_query_ts_info() 288 ts->pkg_size, data_info.pkg_size); in raydium_i2c_query_ts_info() 290 ts->pkg_size = data_info.pkg_size; in raydium_i2c_query_ts_info() 291 ts->report_size = ts->pkg_size - RM_PACKET_CRC_SIZE; in raydium_i2c_query_ts_info() 294 ts->contact_size = data_info.tp_info_size; in raydium_i2c_query_ts_info() 295 ts->data_bank_addr = le32_to_cpu(data_info.data_bank_addr); in raydium_i2c_query_ts_info() 299 ts->data_bank_addr, ts->report_size, ts->contact_size); in raydium_i2c_query_ts_info() 309 &ts->info, sizeof(ts->info)); in raydium_i2c_query_ts_info() [all …]
|
| D | elants_i2c.c | 234 static int elants_i2c_calibrate(struct elants_data *ts) in elants_i2c_calibrate() argument 236 struct i2c_client *client = ts->client; in elants_i2c_calibrate() 244 ts->state = ELAN_WAIT_RECALIBRATION; in elants_i2c_calibrate() 245 reinit_completion(&ts->cmd_done); in elants_i2c_calibrate() 252 ret = wait_for_completion_interruptible_timeout(&ts->cmd_done, in elants_i2c_calibrate() 255 ts->state = ELAN_STATE_NORMAL; in elants_i2c_calibrate() 265 if (memcmp(rek_resp, ts->cmd_resp, sizeof(rek_resp))) { in elants_i2c_calibrate() 268 (int)sizeof(ts->cmd_resp), ts->cmd_resp); in elants_i2c_calibrate() 301 static int elants_i2c_query_hw_version(struct elants_data *ts) in elants_i2c_query_hw_version() argument 303 struct i2c_client *client = ts->client; in elants_i2c_query_hw_version() [all …]
|
| D | cy8ctmg110_ts.c | 68 static void cy8ctmg110_power(struct cy8ctmg110 *ts, bool poweron) in cy8ctmg110_power() argument 70 if (ts->reset_pin) in cy8ctmg110_power() 71 gpio_direction_output(ts->reset_pin, 1 - poweron); in cy8ctmg110_power() 152 static int cy8ctmg110_set_sleepmode(struct cy8ctmg110 *ts, bool sleep) in cy8ctmg110_set_sleepmode() argument 166 return cy8ctmg110_write_regs(ts, CY8CTMG110_TOUCH_WAKEUP_TIME, 3, reg_p); in cy8ctmg110_set_sleepmode() 182 struct cy8ctmg110 *ts; in cy8ctmg110_probe() local 196 ts = kzalloc(sizeof(struct cy8ctmg110), GFP_KERNEL); in cy8ctmg110_probe() 198 if (!ts || !input_dev) { in cy8ctmg110_probe() 203 ts->client = client; in cy8ctmg110_probe() 204 ts->input = input_dev; in cy8ctmg110_probe() [all …]
|
| D | auo-pixcir-ts.c | 134 static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, in auo_pixcir_collect_data() argument 137 struct i2c_client *client = ts->client; in auo_pixcir_collect_data() 138 const struct auo_pixcir_ts_platdata *pdata = ts->pdata; in auo_pixcir_collect_data() 183 struct auo_pixcir_ts *ts = dev_id; in auo_pixcir_interrupt() local 184 const struct auo_pixcir_ts_platdata *pdata = ts->pdata; in auo_pixcir_interrupt() 191 while (!ts->stopped) { in auo_pixcir_interrupt() 194 if (ts->touch_ind_mode) { in auo_pixcir_interrupt() 196 input_mt_sync(ts->input); in auo_pixcir_interrupt() 197 input_report_key(ts->input, BTN_TOUCH, 0); in auo_pixcir_interrupt() 198 input_sync(ts->input); in auo_pixcir_interrupt() [all …]
|
| /Linux-v4.19/drivers/mfd/ |
| D | ucb1x00-ts.c | 57 static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y) in ucb1x00_ts_evt_add() argument 59 struct input_dev *idev = ts->idev; in ucb1x00_ts_evt_add() 68 static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts) in ucb1x00_ts_event_release() argument 70 struct input_dev *idev = ts->idev; in ucb1x00_ts_event_release() 80 static inline void ucb1x00_ts_mode_int(struct ucb1x00_ts *ts) in ucb1x00_ts_mode_int() argument 82 ucb1x00_reg_write(ts->ucb, UCB_TS_CR, in ucb1x00_ts_mode_int() 92 static inline unsigned int ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts) in ucb1x00_ts_read_pressure() argument 95 ucb1x00_io_write(ts->ucb, COLLIE_TC35143_GPIO_TBL_CHK, 0); in ucb1x00_ts_read_pressure() 96 ucb1x00_reg_write(ts->ucb, UCB_TS_CR, in ucb1x00_ts_read_pressure() 102 return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_AD2, ts->adcsync); in ucb1x00_ts_read_pressure() [all …]
|
| /Linux-v4.19/kernel/time/ |
| D | tick-sched.c | 116 static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now) in tick_sched_do_timer() argument 137 if (ts->inidle) in tick_sched_do_timer() 138 ts->got_idle_tick = 1; in tick_sched_do_timer() 141 static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) in tick_sched_handle() argument 152 if (ts->tick_stopped) { in tick_sched_handle() 155 ts->idle_jiffies++; in tick_sched_handle() 161 ts->next_tick = 0; in tick_sched_handle() 201 static bool can_stop_full_tick(int cpu, struct tick_sched *ts) in can_stop_full_tick() argument 211 if (check_tick_dependency(&ts->tick_dep_mask)) in can_stop_full_tick() 306 struct tick_sched *ts; in tick_nohz_dep_set_cpu() local [all …]
|
| /Linux-v4.19/tools/perf/util/ |
| D | thread-stack.c | 74 static int thread_stack__grow(struct thread_stack *ts) in thread_stack__grow() argument 79 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow() 82 new_stack = realloc(ts->stack, sz); in thread_stack__grow() 86 ts->stack = new_stack; in thread_stack__grow() 87 ts->sz = new_sz; in thread_stack__grow() 95 struct thread_stack *ts; in thread_stack__new() local 97 ts = zalloc(sizeof(struct thread_stack)); in thread_stack__new() 98 if (!ts) in thread_stack__new() 101 if (thread_stack__grow(ts)) { in thread_stack__new() 102 free(ts); in thread_stack__new() [all …]
|
| /Linux-v4.19/drivers/gpio/ |
| D | gpio-max730x.c | 53 struct max7301 *ts = gpiochip_get_data(chip); in max7301_direction_input() local 62 config = &ts->port_config[offset >> 2]; in max7301_direction_input() 64 if (ts->input_pullup_active & BIT(offset)) in max7301_direction_input() 69 mutex_lock(&ts->lock); in max7301_direction_input() 74 ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config); in max7301_direction_input() 76 mutex_unlock(&ts->lock); in max7301_direction_input() 81 static int __max7301_set(struct max7301 *ts, unsigned offset, int value) in __max7301_set() argument 84 ts->out_level |= 1 << offset; in __max7301_set() 85 return ts->write(ts->dev, 0x20 + offset, 0x01); in __max7301_set() 87 ts->out_level &= ~(1 << offset); in __max7301_set() [all …]
|