Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 200 of 416) sorted by relevance

123

/linux-4.1.27/drivers/input/touchscreen/
Dad7879.c138 static int ad7879_read(struct ad7879 *ts, u8 reg) in ad7879_read() argument
140 return ts->bops->read(ts->dev, reg); in ad7879_read()
143 static int ad7879_multi_read(struct ad7879 *ts, u8 first_reg, u8 count, u16 *buf) in ad7879_multi_read() argument
145 return ts->bops->multi_read(ts->dev, first_reg, count, buf); in ad7879_multi_read()
148 static int ad7879_write(struct ad7879 *ts, u8 reg, u16 val) in ad7879_write() argument
150 return ts->bops->write(ts->dev, reg, val); in ad7879_write()
153 static int ad7879_report(struct ad7879 *ts) in ad7879_report() argument
155 struct input_dev *input_dev = ts->input; in ad7879_report()
159 x = ts->conversion_data[AD7879_SEQ_XPOS] & MAX_12BIT; in ad7879_report()
160 y = ts->conversion_data[AD7879_SEQ_YPOS] & MAX_12BIT; in ad7879_report()
[all …]
Dcyttsp_core.c80 static int ttsp_read_block_data(struct cyttsp *ts, u8 command, in ttsp_read_block_data() argument
87 error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command, in ttsp_read_block_data()
98 static int ttsp_write_block_data(struct cyttsp *ts, u8 command, in ttsp_write_block_data() argument
105 error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command, in ttsp_write_block_data()
116 static int ttsp_send_command(struct cyttsp *ts, u8 cmd) in ttsp_send_command() argument
118 return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd); in ttsp_send_command()
121 static int cyttsp_handshake(struct cyttsp *ts) in cyttsp_handshake() argument
123 if (ts->pdata->use_hndshk) in cyttsp_handshake()
124 return ttsp_send_command(ts, in cyttsp_handshake()
125 ts->xy_data.hst_mode ^ CY_HNDSHK_BIT); in cyttsp_handshake()
[all …]
Dtsc2005.c161 static int tsc2005_cmd(struct tsc2005 *ts, u8 cmd) in tsc2005_cmd() argument
175 error = spi_sync(ts->spi, &msg); in tsc2005_cmd()
177 dev_err(&ts->spi->dev, "%s: failed, command: %x, error: %d\n", in tsc2005_cmd()
185 static int tsc2005_write(struct tsc2005 *ts, u8 reg, u16 value) in tsc2005_write() argument
199 error = spi_sync(ts->spi, &msg); in tsc2005_write()
201 dev_err(&ts->spi->dev, in tsc2005_write()
222 static int tsc2005_read(struct tsc2005 *ts, u8 reg, u16 *value) in tsc2005_read() argument
233 error = spi_sync(ts->spi, &msg); in tsc2005_read()
241 static void tsc2005_update_pen_state(struct tsc2005 *ts, in tsc2005_update_pen_state() argument
245 input_report_abs(ts->idev, ABS_X, x); in tsc2005_update_pen_state()
[all …]
Ds3c2410_ts.c89 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 …]
Dads7846.c203 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 …]
Dsun4i-ts.c127 static void sun4i_ts_irq_handle_input(struct sun4i_ts_data *ts, u32 reg_val) in sun4i_ts_irq_handle_input() argument
132 x = readl(ts->base + TP_DATA); in sun4i_ts_irq_handle_input()
133 y = readl(ts->base + TP_DATA); in sun4i_ts_irq_handle_input()
135 if (!ts->ignore_fifo_data) { in sun4i_ts_irq_handle_input()
136 input_report_abs(ts->input, ABS_X, x); in sun4i_ts_irq_handle_input()
137 input_report_abs(ts->input, ABS_Y, y); in sun4i_ts_irq_handle_input()
143 input_report_key(ts->input, BTN_TOUCH, 1); in sun4i_ts_irq_handle_input()
144 input_sync(ts->input); in sun4i_ts_irq_handle_input()
146 ts->ignore_fifo_data = false; in sun4i_ts_irq_handle_input()
151 ts->ignore_fifo_data = true; in sun4i_ts_irq_handle_input()
[all …]
Dipaq-micro-ts.c32 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 …]
Dgoodix.c92 static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data) in goodix_ts_read_input_report() argument
97 error = goodix_i2c_read(ts->client, GOODIX_READ_COOR_ADDR, data, in goodix_ts_read_input_report()
100 dev_err(&ts->client->dev, "I2C transfer error: %d\n", error); in goodix_ts_read_input_report()
105 if (touch_num > ts->max_touch_num) in goodix_ts_read_input_report()
110 error = goodix_i2c_read(ts->client, in goodix_ts_read_input_report()
122 static void goodix_ts_report_touch(struct goodix_ts_data *ts, u8 *coor_data) in goodix_ts_report_touch() argument
129 input_mt_slot(ts->input_dev, id); in goodix_ts_report_touch()
130 input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true); in goodix_ts_report_touch()
131 input_report_abs(ts->input_dev, ABS_MT_POSITION_X, input_x); in goodix_ts_report_touch()
132 input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, input_y); in goodix_ts_report_touch()
[all …]
Dtsc2007.c151 static bool tsc2007_is_pen_down(struct tsc2007 *ts) in tsc2007_is_pen_down() argument
167 if (!ts->get_pendown_state) in tsc2007_is_pen_down()
170 return ts->get_pendown_state(&ts->client->dev); in tsc2007_is_pen_down()
175 struct tsc2007 *ts = handle; in tsc2007_soft_irq() local
176 struct input_dev *input = ts->input; in tsc2007_soft_irq()
180 while (!ts->stopped && tsc2007_is_pen_down(ts)) { in tsc2007_soft_irq()
183 tsc2007_read_values(ts, &tc); in tsc2007_soft_irq()
185 rt = tsc2007_calculate_pressure(ts, &tc); in tsc2007_soft_irq()
187 if (!rt && !ts->get_pendown_state) { in tsc2007_soft_irq()
196 if (rt <= ts->max_rt) { in tsc2007_soft_irq()
[all …]
Dad7877.c270 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 …]
Dstmpe-ts.c100 struct stmpe_touch *ts = in stmpe_work() local
103 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work()
114 int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA); in stmpe_work()
119 __stmpe_reset_fifo(ts->stmpe); in stmpe_work()
121 input_report_abs(ts->idev, ABS_PRESSURE, 0); in stmpe_work()
122 input_report_key(ts->idev, BTN_TOUCH, 0); in stmpe_work()
123 input_sync(ts->idev); in stmpe_work()
130 struct stmpe_touch *ts = data; in stmpe_ts_handler() local
136 cancel_delayed_work_sync(&ts->work); in stmpe_ts_handler()
144 stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL, in stmpe_ts_handler()
[all …]
Dzforce_ts.c142 static int zforce_command(struct zforce_ts *ts, u8 cmd) in zforce_command() argument
144 struct i2c_client *client = ts->client; in zforce_command()
154 mutex_lock(&ts->access_mutex); in zforce_command()
156 mutex_unlock(&ts->access_mutex); in zforce_command()
165 static int zforce_send_wait(struct zforce_ts *ts, const char *buf, int len) in zforce_send_wait() argument
167 struct i2c_client *client = ts->client; in zforce_send_wait()
170 ret = mutex_trylock(&ts->command_mutex); in zforce_send_wait()
179 ts->command_waiting = buf[2]; in zforce_send_wait()
181 mutex_lock(&ts->access_mutex); in zforce_send_wait()
183 mutex_unlock(&ts->access_mutex); in zforce_send_wait()
[all …]
Dcy8ctmg110_ts.c68 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 …]
Delants_i2c.c224 static int elants_i2c_calibrate(struct elants_data *ts) in elants_i2c_calibrate() argument
226 struct i2c_client *client = ts->client; in elants_i2c_calibrate()
234 ts->state = ELAN_WAIT_RECALIBRATION; in elants_i2c_calibrate()
235 reinit_completion(&ts->cmd_done); in elants_i2c_calibrate()
242 ret = wait_for_completion_interruptible_timeout(&ts->cmd_done, in elants_i2c_calibrate()
245 ts->state = ELAN_STATE_NORMAL; in elants_i2c_calibrate()
255 if (memcmp(rek_resp, ts->cmd_resp, sizeof(rek_resp))) { in elants_i2c_calibrate()
258 (int)sizeof(ts->cmd_resp), ts->cmd_resp); in elants_i2c_calibrate()
291 static int elants_i2c_query_fw_id(struct elants_data *ts) in elants_i2c_query_fw_id() argument
293 struct i2c_client *client = ts->client; in elants_i2c_query_fw_id()
[all …]
Dauo-pixcir-ts.c134 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 …]
Dst1232.c58 static int st1232_ts_read_data(struct st1232_ts_data *ts) in st1232_ts_read_data() argument
60 struct st1232_ts_finger *finger = ts->finger; in st1232_ts_read_data()
61 struct i2c_client *client = ts->client; in st1232_ts_read_data()
74 msg[1].addr = ts->client->addr; in st1232_ts_read_data()
105 struct st1232_ts_data *ts = dev_id; in st1232_ts_irq_handler() local
106 struct st1232_ts_finger *finger = ts->finger; in st1232_ts_irq_handler()
107 struct input_dev *input_dev = ts->input_dev; in st1232_ts_irq_handler()
111 ret = st1232_ts_read_data(ts); in st1232_ts_irq_handler()
130 if (ts->low_latency_req.dev) { in st1232_ts_irq_handler()
131 dev_pm_qos_remove_request(&ts->low_latency_req); in st1232_ts_irq_handler()
[all …]
Dpixcir_i2c_ts.c108 static void pixcir_ts_report(struct pixcir_i2c_ts_data *ts, in pixcir_ts_report() argument
115 struct device *dev = &ts->client->dev; in pixcir_ts_report()
116 const struct pixcir_i2c_chip_data *chip = &ts->pdata->chip; in pixcir_ts_report()
129 input_mt_assign_slots(ts->input, slots, pos, n, 0); in pixcir_ts_report()
136 slot = input_mt_get_slot_by_key(ts->input, touch->id); in pixcir_ts_report()
146 input_mt_slot(ts->input, slot); in pixcir_ts_report()
147 input_mt_report_slot_state(ts->input, in pixcir_ts_report()
150 input_event(ts->input, EV_ABS, ABS_MT_POSITION_X, touch->x); in pixcir_ts_report()
151 input_event(ts->input, EV_ABS, ABS_MT_POSITION_Y, touch->y); in pixcir_ts_report()
157 input_mt_sync_frame(ts->input); in pixcir_ts_report()
[all …]
Dcyttsp_i2c.c42 struct cyttsp *ts; in cyttsp_i2c_probe() local
49 ts = cyttsp_probe(&cyttsp_i2c_bus_ops, &client->dev, client->irq, in cyttsp_i2c_probe()
52 if (IS_ERR(ts)) in cyttsp_i2c_probe()
53 return PTR_ERR(ts); in cyttsp_i2c_probe()
55 i2c_set_clientdata(client, ts); in cyttsp_i2c_probe()
61 struct cyttsp *ts = i2c_get_clientdata(client); in cyttsp_i2c_remove() local
63 cyttsp_remove(ts); in cyttsp_i2c_remove()
DMakefile7 wm97xx-ts-y := wm97xx-core.o
10 obj-$(CONFIG_TOUCHSCREEN_88PM860X) += 88pm860x-ts.o
18 obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR) += auo-pixcir-ts.o
28 obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o
54 obj-$(CONFIG_TOUCHSCREEN_IPAQ_MICRO) += ipaq-micro-ts.o
62 obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
63 obj-$(CONFIG_TOUCHSCREEN_SUN4I) += sun4i-ts.o
75 obj-$(CONFIG_TOUCHSCREEN_WM831X) += wm831x-ts.o
76 obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
77 wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
[all …]
Dcyttsp4_i2c.c43 struct cyttsp4 *ts; in cyttsp4_i2c_probe() local
50 ts = cyttsp4_probe(&cyttsp4_i2c_bus_ops, &client->dev, client->irq, in cyttsp4_i2c_probe()
53 if (IS_ERR(ts)) in cyttsp4_i2c_probe()
54 return PTR_ERR(ts); in cyttsp4_i2c_probe()
61 struct cyttsp4 *ts = i2c_get_clientdata(client); in cyttsp4_i2c_remove() local
63 cyttsp4_remove(ts); in cyttsp4_i2c_remove()
Degalax_ts.c69 struct egalax_ts *ts = dev_id; in egalax_ts_interrupt() local
70 struct input_dev *input_dev = ts->input_dev; in egalax_ts_interrupt()
71 struct i2c_client *client = ts->client; in egalax_ts_interrupt()
170 struct egalax_ts *ts; in egalax_ts_probe() local
174 ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL); in egalax_ts_probe()
175 if (!ts) { in egalax_ts_probe()
186 ts->client = client; in egalax_ts_probe()
187 ts->input_dev = input_dev; in egalax_ts_probe()
217 input_set_drvdata(input_dev, ts); in egalax_ts_probe()
222 "egalax_ts", ts); in egalax_ts_probe()
[all …]
Dad7879-i2c.c60 struct ad7879 *ts; in ad7879_i2c_probe() local
68 ts = ad7879_probe(&client->dev, AD7879_DEVID, client->irq, in ad7879_i2c_probe()
70 if (IS_ERR(ts)) in ad7879_i2c_probe()
71 return PTR_ERR(ts); in ad7879_i2c_probe()
73 i2c_set_clientdata(client, ts); in ad7879_i2c_probe()
80 struct ad7879 *ts = i2c_get_clientdata(client); in ad7879_i2c_remove() local
82 ad7879_remove(ts); in ad7879_i2c_remove()
Dad7879-spi.c115 struct ad7879 *ts; in ad7879_spi_probe() local
131 ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, &ad7879_spi_bus_ops); in ad7879_spi_probe()
132 if (IS_ERR(ts)) in ad7879_spi_probe()
133 return PTR_ERR(ts); in ad7879_spi_probe()
135 spi_set_drvdata(spi, ts); in ad7879_spi_probe()
142 struct ad7879 *ts = spi_get_drvdata(spi); in ad7879_spi_remove() local
144 ad7879_remove(ts); in ad7879_spi_remove()
Dcyttsp_spi.c150 struct cyttsp *ts; in cyttsp_spi_probe() local
163 ts = cyttsp_probe(&cyttsp_spi_bus_ops, &spi->dev, spi->irq, in cyttsp_spi_probe()
165 if (IS_ERR(ts)) in cyttsp_spi_probe()
166 return PTR_ERR(ts); in cyttsp_spi_probe()
168 spi_set_drvdata(spi, ts); in cyttsp_spi_probe()
175 struct cyttsp *ts = spi_get_drvdata(spi); in cyttsp_spi_remove() local
177 cyttsp_remove(ts); in cyttsp_spi_remove()
Dcyttsp4_core.h451 static inline int cyttsp4_adap_read(struct cyttsp4 *ts, u16 addr, int size, in cyttsp4_adap_read() argument
454 return ts->bus_ops->read(ts->dev, ts->xfer_buf, addr, size, buf); in cyttsp4_adap_read()
457 static inline int cyttsp4_adap_write(struct cyttsp4 *ts, u16 addr, int size, in cyttsp4_adap_write() argument
460 return ts->bus_ops->write(ts->dev, ts->xfer_buf, addr, size, buf); in cyttsp4_adap_write()
465 extern int cyttsp4_remove(struct cyttsp4 *ts);
Dcyttsp4_spi.c158 struct cyttsp4 *ts; in cyttsp4_spi_probe() local
171 ts = cyttsp4_probe(&cyttsp_spi_bus_ops, &spi->dev, spi->irq, in cyttsp4_spi_probe()
174 return PTR_ERR_OR_ZERO(ts); in cyttsp4_spi_probe()
179 struct cyttsp4 *ts = spi_get_drvdata(spi); in cyttsp4_spi_remove() local
180 cyttsp4_remove(ts); in cyttsp4_spi_remove()
/linux-4.1.27/drivers/mfd/
Ducb1x00-ts.c57 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-4.1.27/kernel/time/
Dtick-sched.c134 static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) in tick_sched_handle() argument
145 if (ts->tick_stopped) { in tick_sched_handle()
148 ts->idle_jiffies++; in tick_sched_handle()
200 static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now);
208 struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); in __tick_nohz_full_check() local
211 if (ts->tick_stopped && !is_idle_task(current)) { in __tick_nohz_full_check()
213 tick_nohz_restart_sched_tick(ts, ktime_get()); in __tick_nohz_full_check()
451 update_ts_time_stats(int cpu, struct tick_sched *ts, ktime_t now, u64 *last_update_time) in update_ts_time_stats() argument
455 if (ts->idle_active) { in update_ts_time_stats()
456 delta = ktime_sub(now, ts->idle_entrytime); in update_ts_time_stats()
[all …]
Dtime.c359 void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec) in set_normalized_timespec() argument
376 ts->tv_sec = sec; in set_normalized_timespec()
377 ts->tv_nsec = nsec; in set_normalized_timespec()
389 struct timespec ts; in ns_to_timespec() local
395 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec()
397 ts.tv_sec--; in ns_to_timespec()
400 ts.tv_nsec = rem; in ns_to_timespec()
402 return ts; in ns_to_timespec()
414 struct timespec ts = ns_to_timespec(nsec); in ns_to_timeval() local
417 tv.tv_sec = ts.tv_sec; in ns_to_timeval()
[all …]
Dtimekeeping.c77 struct timespec64 ts; in tk_xtime() local
79 ts.tv_sec = tk->xtime_sec; in tk_xtime()
80 ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); in tk_xtime()
81 return ts; in tk_xtime()
84 static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts) in tk_set_xtime() argument
86 tk->xtime_sec = ts->tv_sec; in tk_set_xtime()
87 tk->tkr_mono.xtime_nsec = (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_set_xtime()
90 static void tk_xtime_add(struct timekeeper *tk, const struct timespec64 *ts) in tk_xtime_add() argument
92 tk->xtime_sec += ts->tv_sec; in tk_xtime_add()
93 tk->tkr_mono.xtime_nsec += (u64)ts->tv_nsec << tk->tkr_mono.shift; in tk_xtime_add()
[all …]
Dposix-clock.c300 static int pc_clock_gettime(clockid_t id, struct timespec *ts) in pc_clock_gettime() argument
310 err = cd.clk->ops.clock_gettime(cd.clk, ts); in pc_clock_gettime()
319 static int pc_clock_getres(clockid_t id, struct timespec *ts) in pc_clock_getres() argument
329 err = cd.clk->ops.clock_getres(cd.clk, ts); in pc_clock_getres()
338 static int pc_clock_settime(clockid_t id, const struct timespec *ts) in pc_clock_settime() argument
353 err = cd.clk->ops.clock_settime(cd.clk, ts); in pc_clock_settime()
402 static void pc_timer_gettime(struct k_itimer *kit, struct itimerspec *ts) in pc_timer_gettime() argument
411 cd.clk->ops.timer_gettime(cd.clk, kit, ts); in pc_timer_gettime()
417 struct itimerspec *ts, struct itimerspec *old) in pc_timer_settime() argument
428 err = cd.clk->ops.timer_settime(cd.clk, kit, flags, ts, old); in pc_timer_settime()
Dtest_udelay.c90 struct timespec ts; in udelay_test_show() local
92 ktime_get_ts(&ts); in udelay_test_show()
94 loops_per_jiffy, ts.tv_sec, ts.tv_nsec); in udelay_test_show()
Dntp.c545 static inline void process_adj_status(struct timex *txc, struct timespec64 *ts) in process_adj_status() argument
568 struct timespec64 *ts, in process_adjtimex_modes() argument
572 process_adj_status(txc, ts); in process_adjtimex_modes()
665 int __do_adjtimex(struct timex *txc, struct timespec64 *ts, s32 *time_tai) in __do_adjtimex() argument
682 process_adjtimex_modes(txc, ts, time_tai); in __do_adjtimex()
709 txc->time.tv_sec = (time_t)ts->tv_sec; in __do_adjtimex()
710 txc->time.tv_usec = ts->tv_nsec; in __do_adjtimex()
730 static inline struct pps_normtime pps_normalize_ts(struct timespec ts) in pps_normalize_ts() argument
733 .sec = ts.tv_sec, in pps_normalize_ts()
734 .nsec = ts.tv_nsec in pps_normalize_ts()
Dtimekeeping.h15 extern int timekeeping_inject_offset(struct timespec *ts);
18 extern void timekeeping_clocktai(struct timespec *ts);
Ditimer.c134 struct timespec ts; in cputime_sub_ns() local
137 cputime_to_timespec(ct, &ts); in cputime_sub_ns()
138 cpu_ns = timespec_to_ns(&ts); in cputime_sub_ns()
/linux-4.1.27/drivers/gpio/
Dgpio-max730x.c53 struct max7301 *ts = container_of(chip, struct max7301, 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 …]
Dgpio-max7300.c37 struct max7301 *ts; in max7300_probe() local
43 ts = devm_kzalloc(&client->dev, sizeof(struct max7301), GFP_KERNEL); in max7300_probe()
44 if (!ts) in max7300_probe()
47 ts->read = max7300_i2c_read; in max7300_probe()
48 ts->write = max7300_i2c_write; in max7300_probe()
49 ts->dev = &client->dev; in max7300_probe()
51 return __max730x_probe(ts); in max7300_probe()
Dgpio-max7301.c55 struct max7301 *ts; in max7301_probe() local
64 ts = devm_kzalloc(&spi->dev, sizeof(struct max7301), GFP_KERNEL); in max7301_probe()
65 if (!ts) in max7301_probe()
68 ts->read = max7301_spi_read; in max7301_probe()
69 ts->write = max7301_spi_write; in max7301_probe()
70 ts->dev = &spi->dev; in max7301_probe()
72 ret = __max730x_probe(ts); in max7301_probe()
/linux-4.1.27/tools/perf/util/
Dthread-stack.c108 static int thread_stack__grow(struct thread_stack *ts) in thread_stack__grow() argument
113 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow()
116 new_stack = realloc(ts->stack, sz); in thread_stack__grow()
120 ts->stack = new_stack; in thread_stack__grow()
121 ts->sz = new_sz; in thread_stack__grow()
129 struct thread_stack *ts; in thread_stack__new() local
131 ts = zalloc(sizeof(struct thread_stack)); in thread_stack__new()
132 if (!ts) in thread_stack__new()
135 if (thread_stack__grow(ts)) { in thread_stack__new()
136 free(ts); in thread_stack__new()
[all …]
/linux-4.1.27/include/linux/
Dtimekeeping.h13 extern int do_settimeofday64(const struct timespec64 *ts);
29 extern void getrawmonotonic64(struct timespec64 *ts);
30 extern void ktime_get_ts64(struct timespec64 *ts);
36 extern void getboottime64(struct timespec64 *ts);
42 static inline int do_settimeofday(const struct timespec *ts) in do_settimeofday() argument
44 return do_settimeofday64(ts); in do_settimeofday()
47 static inline int __getnstimeofday(struct timespec *ts) in __getnstimeofday() argument
49 return __getnstimeofday64(ts); in __getnstimeofday()
52 static inline void getnstimeofday(struct timespec *ts) in getnstimeofday() argument
54 getnstimeofday64(ts); in getnstimeofday()
[all …]
Dpps_kernel.h103 struct pps_event_time *ts, int event, void *data);
108 struct timespec ts) in timespec_to_pps_ktime() argument
110 kt->sec = ts.tv_sec; in timespec_to_pps_ktime()
111 kt->nsec = ts.tv_nsec; in timespec_to_pps_ktime()
116 static inline void pps_get_ts(struct pps_event_time *ts) in pps_get_ts() argument
118 getnstime_raw_and_real(&ts->ts_raw, &ts->ts_real); in pps_get_ts()
123 static inline void pps_get_ts(struct pps_event_time *ts) in pps_get_ts() argument
125 getnstimeofday(&ts->ts_real); in pps_get_ts()
131 static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec delta) in pps_sub_ts() argument
133 ts->ts_real = timespec_sub(ts->ts_real, delta); in pps_sub_ts()
[all …]
Dtime64.h41 static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) in timespec_to_timespec64() argument
43 return ts; in timespec_to_timespec64()
69 static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) in timespec_to_timespec64() argument
73 ret.tv_sec = ts.tv_sec; in timespec_to_timespec64()
74 ret.tv_nsec = ts.tv_nsec; in timespec_to_timespec64()
98 extern void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec);
133 static inline bool timespec64_valid(const struct timespec64 *ts) in timespec64_valid() argument
136 if (ts->tv_sec < 0) in timespec64_valid()
139 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid()
144 static inline bool timespec64_valid_strict(const struct timespec64 *ts) in timespec64_valid_strict() argument
[all …]
Dtime.h57 extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec);
92 static inline bool timespec_valid(const struct timespec *ts) in timespec_valid() argument
95 if (ts->tv_sec < 0) in timespec_valid()
98 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec_valid()
103 static inline bool timespec_valid_strict(const struct timespec *ts) in timespec_valid_strict() argument
105 if (!timespec_valid(ts)) in timespec_valid_strict()
108 if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) in timespec_valid_strict()
191 static inline s64 timespec_to_ns(const struct timespec *ts) in timespec_to_ns() argument
193 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns()
Dktime.h81 static inline ktime_t timespec_to_ktime(struct timespec ts) in timespec_to_ktime() argument
83 return ktime_set(ts.tv_sec, ts.tv_nsec); in timespec_to_ktime()
87 static inline ktime_t timespec64_to_ktime(struct timespec64 ts) in timespec64_to_ktime() argument
89 return ktime_set(ts.tv_sec, ts.tv_nsec); in timespec64_to_ktime()
245 struct timespec *ts) in ktime_to_timespec_cond() argument
248 *ts = ktime_to_timespec(kt); in ktime_to_timespec_cond()
264 struct timespec64 *ts) in ktime_to_timespec64_cond() argument
267 *ts = ktime_to_timespec64(kt); in ktime_to_timespec64_cond()
Dring_buffer.h121 ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts,
124 ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts,
134 ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts);
136 ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts);
180 int cpu, u64 *ts);
Dposix-clock.h62 int (*clock_gettime)(struct posix_clock *pc, struct timespec *ts);
64 int (*clock_getres) (struct posix_clock *pc, struct timespec *ts);
67 const struct timespec *ts);
Dptp_clock_kernel.h107 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
108 int (*settime64)(struct ptp_clock_info *p, const struct timespec64 *ts);
/linux-4.1.27/drivers/misc/
Dkgdbts.c187 static struct test_state ts; variable
368 ts.idx -= 2; in check_single_step()
373 ts.idx -= 4; in check_single_step()
402 ts.idx++; in skip_back_repeat_test()
404 ts.idx -= go_back; in skip_back_repeat_test()
405 fill_get_buf(ts.tst[ts.idx].get); in skip_back_repeat_test()
429 ts.idx--; in put_cont_catch()
439 ts.idx = -1; in emul_reset()
527 ts.idx--; in emul_sstep_put()
713 v2printk("get%i: %s\n", ts.idx, get_buf); in fill_get_buf()
[all …]
/linux-4.1.27/arch/arm/vdso/
Dvgettimeofday.c65 register struct timespec *ts asm("r1") = _ts; in clock_gettime_fallback()
73 : "r" (clkid), "r" (ts), "r" (nr) in clock_gettime_fallback()
79 static notrace int do_realtime_coarse(struct timespec *ts, in do_realtime_coarse() argument
87 ts->tv_sec = vdata->xtime_coarse_sec; in do_realtime_coarse()
88 ts->tv_nsec = vdata->xtime_coarse_nsec; in do_realtime_coarse()
95 static notrace int do_monotonic_coarse(struct timespec *ts, in do_monotonic_coarse() argument
104 ts->tv_sec = vdata->xtime_coarse_sec; in do_monotonic_coarse()
105 ts->tv_nsec = vdata->xtime_coarse_nsec; in do_monotonic_coarse()
112 ts->tv_sec += tomono.tv_sec; in do_monotonic_coarse()
113 timespec_add_ns(ts, tomono.tv_nsec); in do_monotonic_coarse()
[all …]
/linux-4.1.27/arch/tile/kernel/vdso/
Dvgettimeofday.c64 static inline int do_realtime(struct vdso_data *vdso, struct timespec *ts) in do_realtime() argument
71 ts->tv_sec = vdso->wall_time_sec; in do_realtime()
77 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime()
78 ts->tv_nsec = ns; in do_realtime()
83 static inline int do_monotonic(struct vdso_data *vdso, struct timespec *ts) in do_monotonic() argument
90 ts->tv_sec = vdso->monotonic_time_sec; in do_monotonic()
96 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic()
97 ts->tv_nsec = ns; in do_monotonic()
103 struct timespec *ts) in do_realtime_coarse() argument
109 ts->tv_sec = vdso->wall_time_coarse_sec; in do_realtime_coarse()
[all …]
/linux-4.1.27/drivers/scsi/pm8001/
Dpm80xx_hwi.c1511 struct task_status_struct *ts; in mpi_ssp_completion() local
1532 ts = &t->task_status; in mpi_ssp_completion()
1546 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
1547 ts->stat = SAM_STAT_GOOD; in mpi_ssp_completion()
1549 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
1550 ts->stat = SAS_PROTO_RESPONSE; in mpi_ssp_completion()
1551 ts->residual = param; in mpi_ssp_completion()
1561 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
1562 ts->stat = SAS_ABORTED_TASK; in mpi_ssp_completion()
1569 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
[all …]
Dpm8001_hwi.c1521 struct task_status_struct *ts; in pm8001_work_fn() local
1547 ts = &t->task_status; in pm8001_work_fn()
1548 ts->resp = SAS_TASK_COMPLETE; in pm8001_work_fn()
1550 ts->stat = SAS_QUEUE_FULL; in pm8001_work_fn()
1563 t, pw->handler, ts->resp, ts->stat)); in pm8001_work_fn()
1855 struct task_status_struct *ts; in mpi_ssp_completion() local
1877 ts = &t->task_status; in mpi_ssp_completion()
1890 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
1891 ts->stat = SAM_STAT_GOOD; in mpi_ssp_completion()
1893 ts->resp = SAS_TASK_COMPLETE; in mpi_ssp_completion()
[all …]
Dpm8001_sas.c382 struct task_status_struct *ts = &t->task_status; in pm8001_task_exec() local
383 ts->resp = SAS_TASK_UNDELIVERED; in pm8001_task_exec()
384 ts->stat = SAS_PHY_DOWN; in pm8001_task_exec()
391 struct task_status_struct *ts = &t->task_status; in pm8001_task_exec() local
392 ts->resp = SAS_TASK_UNDELIVERED; in pm8001_task_exec()
393 ts->stat = SAS_PHY_DOWN; in pm8001_task_exec()
904 struct task_status_struct *ts; in pm8001_open_reject_retry() local
929 ts = &task->task_status; in pm8001_open_reject_retry()
930 ts->resp = SAS_TASK_COMPLETE; in pm8001_open_reject_retry()
932 ts->stat = SAS_OPEN_REJECT; in pm8001_open_reject_retry()
[all …]
/linux-4.1.27/arch/x86/vdso/
Dvclock_gettime.c25 extern int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
46 notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) in vdso_fallback_gettime() argument
50 "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory"); in vdso_fallback_gettime()
135 notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) in vdso_fallback_gettime() argument
145 : "0" (__NR_clock_gettime), "g" (clock), "c" (ts) in vdso_fallback_gettime()
230 notrace static int __always_inline do_realtime(struct timespec *ts) in do_realtime() argument
239 ts->tv_sec = gtod->wall_time_sec; in do_realtime()
245 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime()
246 ts->tv_nsec = ns; in do_realtime()
251 notrace static int __always_inline do_monotonic(struct timespec *ts) in do_monotonic() argument
[all …]
/linux-4.1.27/drivers/net/wireless/ath/
Ddfs_pri_detector.c35 u64 ts; member
193 if (p->ts >= min_valid_ts) in pulse_queue_check_window()
199 static bool pulse_queue_enqueue(struct pri_detector *pde, u64 ts) in pulse_queue_enqueue() argument
212 p->ts = ts; in pulse_queue_enqueue()
215 pde->last_ts = ts; in pulse_queue_enqueue()
223 u64 ts, u32 min_count) in pseq_handler_create_sequences() argument
231 u32 delta_ts = ts - p->ts; in pseq_handler_create_sequences()
244 ps.first_ts = p->ts; in pseq_handler_create_sequences()
245 ps.last_ts = ts; in pseq_handler_create_sequences()
246 ps.pri = ts - p->ts; in pseq_handler_create_sequences()
[all …]
/linux-4.1.27/tools/testing/selftests/timers/
Dleap-a-day.c78 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
80 ts.tv_nsec += ns; in timespec_add()
81 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
82 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
83 ts.tv_sec++; in timespec_add()
85 return ts; in timespec_add()
183 struct timespec ts; in main() local
185 if (clock_gettime(CLOCK_TAI, &ts)) { in main()
202 struct timespec ts; in main() local
207 clock_gettime(CLOCK_REALTIME, &ts); in main()
[all …]
Dmqueue-lat.c59 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
61 ts.tv_nsec += ns; in timespec_add()
62 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
63 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
64 ts.tv_sec++; in timespec_add()
66 return ts; in timespec_add()
Draw_skew.c58 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec() argument
60 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
65 struct timespec ts; in nsec_to_ts() local
67 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
68 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
69 return ts; in nsec_to_ts()
Dnanosleep.c101 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
103 ts.tv_nsec += ns; in timespec_add()
104 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
105 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
106 ts.tv_sec++; in timespec_add()
108 return ts; in timespec_add()
Dnsleep-lat.c90 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument
92 ts.tv_nsec += ns; in timespec_add()
93 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
94 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
95 ts.tv_sec++; in timespec_add()
97 return ts; in timespec_add()
Dalarmtimer-suspend.c111 struct timespec ts; in sigalarm() local
113 clock_gettime(alarm_clock_id, &ts); in sigalarm()
116 delta_ns = timespec_sub(start_time, ts); in sigalarm()
119 printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec, in sigalarm()
120 ts.tv_nsec, delta_ns); in sigalarm()
Dleapcrash.c74 struct timespec ts; in main() local
88 clock_gettime(CLOCK_REALTIME, &ts); in main()
91 next_leap = ts.tv_sec; in main()
Dset-timer-lat.c109 struct timespec ts; in sigalarm() local
111 clock_gettime(clock_id, &ts); in sigalarm()
114 delta_ns = timespec_sub(start_time, ts); in sigalarm()
Dinconsistency-check.c170 struct timespec ts; in main() local
197 if (!clock_gettime(clockid, &ts)) { in main()
/linux-4.1.27/drivers/net/wireless/ath/ath9k/
Dar9002_mac.c316 struct ath_tx_status *ts) in ar9002_hw_proc_txdesc() argument
325 ts->ts_tstamp = ads->AR_SendTimestamp; in ar9002_hw_proc_txdesc()
326 ts->ts_status = 0; in ar9002_hw_proc_txdesc()
327 ts->ts_flags = 0; in ar9002_hw_proc_txdesc()
330 ts->ts_status |= ATH9K_TXERR_XTXOP; in ar9002_hw_proc_txdesc()
331 ts->tid = MS(status, AR_TxTid); in ar9002_hw_proc_txdesc()
332 ts->ts_rateindex = MS(status, AR_FinalTxIdx); in ar9002_hw_proc_txdesc()
333 ts->ts_seqnum = MS(status, AR_SeqNum); in ar9002_hw_proc_txdesc()
336 ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00); in ar9002_hw_proc_txdesc()
337 ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01); in ar9002_hw_proc_txdesc()
[all …]
Dar9003_mac.c355 struct ath_tx_status *ts) in ar9003_hw_proc_txdesc() argument
376 ts->ts_rateindex = MS(status, AR_FinalTxIdx); in ar9003_hw_proc_txdesc()
377 ts->ts_seqnum = MS(status, AR_SeqNum); in ar9003_hw_proc_txdesc()
378 ts->tid = MS(status, AR_TxTid); in ar9003_hw_proc_txdesc()
380 ts->qid = MS(ads->ds_info, AR_TxQcuNum); in ar9003_hw_proc_txdesc()
381 ts->desc_id = MS(ads->status1, AR_TxDescId); in ar9003_hw_proc_txdesc()
382 ts->ts_tstamp = ads->status4; in ar9003_hw_proc_txdesc()
383 ts->ts_status = 0; in ar9003_hw_proc_txdesc()
384 ts->ts_flags = 0; in ar9003_hw_proc_txdesc()
387 ts->ts_status |= ATH9K_TXERR_XTXOP; in ar9003_hw_proc_txdesc()
[all …]
Ddynack.h56 struct ts_info ts[ATH_DYN_BUF]; member
87 void ath_dynack_sample_ack_ts(struct ath_hw *ah, struct sk_buff *skb, u32 ts);
89 struct ath_tx_status *ts);
97 struct sk_buff *skb, u32 ts) {} in ath_dynack_sample_ack_ts() argument
100 struct ath_tx_status *ts) {} in ath_dynack_sample_tx_ts() argument
Ddynack.c127 st_ts = &da->st_rbf.ts[da->st_rbf.h_rb]; in ath_dynack_compute_to()
172 struct ath_tx_status *ts) in ath_dynack_sample_tx_ts() argument
188 if (ts->ts_status & ATH9K_TXERR_XRETRY) { in ath_dynack_sample_tx_ts()
202 ridx = ts->ts_rateindex; in ath_dynack_sample_tx_ts()
204 da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp; in ath_dynack_sample_tx_ts()
205 da->st_rbf.ts[da->st_rbf.t_rb].dur = ts->duration; in ath_dynack_sample_tx_ts()
222 da->st_rbf.ts[da->st_rbf.t_rb].dur -= sifs; in ath_dynack_sample_tx_ts()
226 hdr->addr1, da->st_rbf.ts[da->st_rbf.t_rb].tstamp, in ath_dynack_sample_tx_ts()
227 da->st_rbf.ts[da->st_rbf.t_rb].dur, da->st_rbf.h_rb, in ath_dynack_sample_tx_ts()
248 u32 ts) in ath_dynack_sample_ack_ts() argument
[all …]
Dxmit.c56 struct ath_tx_status *ts, int txok);
60 struct ath_tx_status *ts, int nframes, int nbad,
244 struct ath_tx_status ts; in ath_tx_flush_tid() local
250 memset(&ts, 0, sizeof(ts)); in ath_tx_flush_tid()
267 ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0); in ath_tx_flush_tid()
321 struct ath_tx_status ts; in ath_tid_drain() local
324 memset(&ts, 0, sizeof(ts)); in ath_tid_drain()
337 ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0); in ath_tid_drain()
407 struct ath_tx_status *ts, int txok, in ath_tx_count_frames() argument
421 seq_st = ts->ts_seqnum; in ath_tx_count_frames()
[all …]
Ddfs.c189 pe.ts = mactime; in ath9k_dfs_process_phyerr()
196 ard.pulse_bw_info, pe.freq, pe.ts, pe.width, pe.rssi, in ath9k_dfs_process_phyerr()
197 pe.ts - sc->dfs_prev_pulse_ts); in ath9k_dfs_process_phyerr()
198 sc->dfs_prev_pulse_ts = pe.ts; in ath9k_dfs_process_phyerr()
/linux-4.1.27/drivers/scsi/aic94xx/
Daic94xx_task.c163 struct task_status_struct *ts = &task->task_status; in asd_get_response_tasklet() local
187 ts->buf_valid_size = 0; in asd_get_response_tasklet()
194 ts->residual = le32_to_cpu(*(__le32 *)r); in asd_get_response_tasklet()
198 struct ata_task_resp *resp = (void *) &ts->buf[0]; in asd_get_response_tasklet()
200 ts->residual = le32_to_cpu(*(__le32 *)r); in asd_get_response_tasklet()
205 ts->buf_valid_size = sizeof(*resp); in asd_get_response_tasklet()
216 struct task_status_struct *ts = &task->task_status; in asd_task_tasklet_complete() local
225 ts->resp = SAS_TASK_COMPLETE; in asd_task_tasklet_complete()
226 ts->stat = SAM_STAT_GOOD; in asd_task_tasklet_complete()
229 ts->resp = SAS_TASK_COMPLETE; in asd_task_tasklet_complete()
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/pinctrl/
Dmarvell,kirkwood-pinctrl.txt130 mpp20 20 gpio, ge1(txd0), ts(mp0), tdm(tx0ql), audio(spdifi),
132 mpp21 21 gpio, ge1(txd1), sata0(act), ts(mp1), tdm(rx0ql),
134 mpp22 22 gpio, ge1(txd2), ts(mp2), tdm(tx2ql), audio(rmclk),
136 mpp23 23 gpio, ge1(txd3), sata0(prsnt), ts(mp3), tdm(rx2ql),
138 mpp24 24 gpio, ge1(rxd0), ts(mp4), tdm(spi-cs0), audio(sdo)
139 mpp25 25 gpio, ge1(rxd1), ts(mp5), tdm(spi-sck), audio(lrclk)
140 mpp26 26 gpio, ge1(rxd2), ts(mp6), tdm(spi-miso), audio(mclk)
141 mpp27 27 gpio, ge1(rxd3), ts(mp7), tdm(spi-mosi), audio(sdi)
142 mpp28 28 gpio, ge1(col), ts(mp8), tdm(int), audio(extclk)
143 mpp29 29 gpio, ge1(txclk), ts(mp9), tdm(rst)
[all …]
/linux-4.1.27/drivers/staging/skein/
Dskein_block.c33 #define ts (kw + KW_TWK_BASE) macro
38 ctx->h.tweak[0] = ts[0]; \
39 ctx->h.tweak[1] = ts[1]; \
77 X1 += ks[((R) + 2) % 5] + ts[((R) + 1) % 3]; \
78 X2 += ks[((R) + 3) % 5] + ts[((R) + 2) % 3]; \
89 X1 += ks[r + (R) + 1] + ts[r + (R) + 0]; \
90 X2 += ks[r + (R) + 2] + ts[r + (R) + 1]; \
94 ts[r + (R) + 2] = ts[r + (R) - 1]; \
163 X5 += ks[((R) + 6) % 9] + ts[((R) + 1) % 3]; \
164 X6 += ks[((R) + 7) % 9] + ts[((R) + 2) % 3]; \
[all …]
/linux-4.1.27/drivers/pps/
Dkapi.c41 static void pps_add_offset(struct pps_ktime *ts, struct pps_ktime *offset) in pps_add_offset() argument
43 ts->nsec += offset->nsec; in pps_add_offset()
44 while (ts->nsec >= NSEC_PER_SEC) { in pps_add_offset()
45 ts->nsec -= NSEC_PER_SEC; in pps_add_offset()
46 ts->sec++; in pps_add_offset()
48 while (ts->nsec < 0) { in pps_add_offset()
49 ts->nsec += NSEC_PER_SEC; in pps_add_offset()
50 ts->sec--; in pps_add_offset()
52 ts->sec += offset->sec; in pps_add_offset()
172 void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event, in pps_event() argument
[all …]
Dkc.c112 void pps_kc_event(struct pps_device *pps, struct pps_event_time *ts, in pps_kc_event() argument
120 hardpps(&ts->ts_real, &ts->ts_raw); in pps_kc_event()
Dkc.h33 struct pps_event_time *ts, int event);
42 struct pps_event_time *ts, int event) {} in pps_kc_event() argument
/linux-4.1.27/kernel/trace/
Dtrace_stat.c33 struct tracer_stat *ts; member
51 if (session->ts->stat_release) in __reset_stat_session()
52 session->ts->stat_release(snode->stat); in __reset_stat_session()
126 struct tracer_stat *ts = session->ts; in stat_seq_init() local
135 if (!ts->stat_cmp) in stat_seq_init()
136 ts->stat_cmp = dummy_cmp; in stat_seq_init()
138 stat = ts->stat_start(ts); in stat_seq_init()
142 ret = insert_stat(root, stat, ts->stat_cmp); in stat_seq_init()
150 stat = ts->stat_next(stat, i); in stat_seq_init()
156 ret = insert_stat(root, stat, ts->stat_cmp); in stat_seq_init()
[all …]
Dring_buffer.c731 int cpu, u64 *ts) in ring_buffer_normalize_time_stamp() argument
734 *ts >>= DEBUG_SHIFT; in ring_buffer_normalize_time_stamp()
2315 struct buffer_page *tail_page, u64 ts) in rb_move_tail() argument
2400 ts = rb_time_stamp(buffer); in rb_move_tail()
2401 next_page->page->time_stamp = ts; in rb_move_tail()
2420 unsigned long length, u64 ts, in __rb_reserve_next() argument
2452 tail_page, ts); in __rb_reserve_next()
2467 tail_page->page->time_stamp = ts; in __rb_reserve_next()
2559 u64 ts, delta; in rb_reserve_next_event() local
2598 ts = rb_time_stamp(cpu_buffer->buffer); in rb_reserve_next_event()
[all …]
Dring_buffer_benchmark.c14 u64 ts; member
82 u64 ts; in read_event() local
84 event = ring_buffer_consume(buffer, cpu, &ts, NULL); in read_event()
/linux-4.1.27/fs/ntfs/
Dtime.h48 static inline sle64 utc2ntfs(const struct timespec ts) in utc2ntfs() argument
54 return cpu_to_sle64((s64)ts.tv_sec * 10000000 + ts.tv_nsec / 100 + in utc2ntfs()
87 struct timespec ts; in ntfs2utc() local
95 ts.tv_nsec = do_div(t, 10000000) * 100; in ntfs2utc()
96 ts.tv_sec = t; in ntfs2utc()
97 return ts; in ntfs2utc()
/linux-4.1.27/arch/um/os-Linux/
Dtime.c83 static int after_sleep_interval(struct timespec *ts) in after_sleep_interval() argument
129 static inline long long timespec_to_us(const struct timespec *ts) in timespec_to_us() argument
131 return ((long long) ts->tv_sec * UM_USEC_PER_SEC) + in timespec_to_us()
132 ts->tv_nsec / UM_NSEC_PER_USEC; in timespec_to_us()
135 static int after_sleep_interval(struct timespec *ts) in after_sleep_interval() argument
138 long long start_usecs = timespec_to_us(ts); in after_sleep_interval()
169 struct timespec ts; in idle_sleep() local
180 ts = ((struct timespec) { .tv_sec = nsecs / UM_NSEC_PER_SEC, in idle_sleep()
183 if (nanosleep(&ts, &ts) == 0) in idle_sleep()
185 after_sleep_interval(&ts); in idle_sleep()
/linux-4.1.27/net/9p/
Dtrans_fd.c235 struct p9_trans_fd *ts = NULL; in p9_fd_poll() local
238 ts = client->trans; in p9_fd_poll()
240 if (!ts) in p9_fd_poll()
243 if (!ts->rd->f_op->poll) in p9_fd_poll()
246 if (!ts->wr->f_op->poll) in p9_fd_poll()
249 ret = ts->rd->f_op->poll(ts->rd, pt); in p9_fd_poll()
253 if (ts->rd != ts->wr) { in p9_fd_poll()
254 n = ts->wr->f_op->poll(ts->wr, pt); in p9_fd_poll()
274 struct p9_trans_fd *ts = NULL; in p9_fd_read() local
277 ts = client->trans; in p9_fd_read()
[all …]
/linux-4.1.27/tools/virtio/virtio-trace/
Dtrace-agent-rw.c110 struct rw_thread_info *ts = (struct rw_thread_info *)thread_info; in rw_thread_main() local
112 bind_cpu(ts->cpu_num); in rw_thread_main()
129 rlen = splice(ts->in_fd, NULL, ts->read_pipe, NULL, in rw_thread_main()
130 ts->pipe_size, SPLICE_F_MOVE | SPLICE_F_MORE); in rw_thread_main()
133 pr_err("Splice_read in rw-thread(%d)\n", ts->cpu_num); in rw_thread_main()
143 pr_debug("Read retry(cpu:%d)\n", ts->cpu_num); in rw_thread_main()
150 ret = splice(ts->write_pipe, NULL, ts->out_fd, NULL, in rw_thread_main()
156 ts->cpu_num); in rw_thread_main()
/linux-4.1.27/arch/arm/kernel/
Dtime.c79 static void dummy_clock_access(struct timespec64 *ts) in dummy_clock_access() argument
81 ts->tv_sec = 0; in dummy_clock_access()
82 ts->tv_nsec = 0; in dummy_clock_access()
88 void read_persistent_clock64(struct timespec64 *ts) in read_persistent_clock64() argument
90 __read_persistent_clock(ts); in read_persistent_clock64()
93 void read_boot_clock64(struct timespec64 *ts) in read_boot_clock64() argument
95 __read_boot_clock(ts); in read_boot_clock64()
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
Ddesc.c444 struct ath5k_tx_status *ts) in ath5k_hw_proc_2word_tx_status() argument
457 ts->ts_tstamp = AR5K_REG_MS(tx_status->tx_status_0, in ath5k_hw_proc_2word_tx_status()
459 ts->ts_shortretry = AR5K_REG_MS(tx_status->tx_status_0, in ath5k_hw_proc_2word_tx_status()
461 ts->ts_final_retry = AR5K_REG_MS(tx_status->tx_status_0, in ath5k_hw_proc_2word_tx_status()
464 ts->ts_seqnum = AR5K_REG_MS(tx_status->tx_status_1, in ath5k_hw_proc_2word_tx_status()
466 ts->ts_rssi = AR5K_REG_MS(tx_status->tx_status_1, in ath5k_hw_proc_2word_tx_status()
468 ts->ts_antenna = 1; in ath5k_hw_proc_2word_tx_status()
469 ts->ts_status = 0; in ath5k_hw_proc_2word_tx_status()
470 ts->ts_final_idx = 0; in ath5k_hw_proc_2word_tx_status()
475 ts->ts_status |= AR5K_TXERR_XRETRY; in ath5k_hw_proc_2word_tx_status()
[all …]
Dtrace.h66 struct ath5k_txq *q, struct ath5k_tx_status *ts),
68 TP_ARGS(priv, skb, q, ts),
83 __entry->ts_status = ts->ts_status;
84 __entry->ts_rssi = ts->ts_rssi;
85 __entry->ts_antenna = ts->ts_antenna;
Dbase.c1668 struct ath5k_txq *txq, struct ath5k_tx_status *ts, in ath5k_tx_frame_completed() argument
1689 for (i = 0; i < ts->ts_final_idx; i++) { in ath5k_tx_frame_completed()
1696 info->status.rates[ts->ts_final_idx].count = ts->ts_final_retry; in ath5k_tx_frame_completed()
1697 info->status.rates[ts->ts_final_idx + 1].idx = -1; in ath5k_tx_frame_completed()
1699 if (unlikely(ts->ts_status)) { in ath5k_tx_frame_completed()
1701 if (ts->ts_status & AR5K_TXERR_FILT) { in ath5k_tx_frame_completed()
1705 if (ts->ts_status & AR5K_TXERR_XRETRY) in ath5k_tx_frame_completed()
1707 if (ts->ts_status & AR5K_TXERR_FIFO) in ath5k_tx_frame_completed()
1711 info->status.ack_signal = ts->ts_rssi; in ath5k_tx_frame_completed()
1714 info->status.rates[ts->ts_final_idx].count++; in ath5k_tx_frame_completed()
[all …]
/linux-4.1.27/Documentation/ptp/
Dtestptp.c150 struct timespec ts; in main() local
313 if (clock_gettime(clkid, &ts)) { in main()
317 ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); in main()
322 clock_gettime(CLOCK_REALTIME, &ts); in main()
323 if (clock_settime(clkid, &ts)) { in main()
331 clock_gettime(clkid, &ts); in main()
332 if (clock_settime(CLOCK_REALTIME, &ts)) { in main()
340 ts.tv_sec = seconds; in main()
341 ts.tv_nsec = 0; in main()
342 if (clock_settime(clkid, &ts)) { in main()
[all …]
/linux-4.1.27/tools/perf/scripts/python/
Dsched-migration.py230 def get_time_slice(self, ts): argument
232 slice = TimeSlice(ts, TimeSlice(-1, None))
234 slice = self.data[-1].next(ts)
237 def find_time_slice(self, ts): argument
247 if self.data[i].start <= ts and self.data[i].end >= ts:
252 if self.data[i].end < ts:
255 elif self.data[i].start > ts:
268 ts = self[idx]
269 rq = ts.rqs[cpu]
272 raw += "Timestamp : %d.%06d\n" % (ts.start / (10 ** 9), (ts.start % (10 ** 9)) / 1000)
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/input/touchscreen/
Dsun4i.txt5 - compatible: "allwinner,sun4i-a10-ts", "allwinner,sun5i-a13-ts" or
6 "allwinner,sun6i-a31-ts"
12 - allwinner,ts-attached : boolean indicating that an actual touchscreen
30 compatible = "allwinner,sun4i-a10-ts";
33 allwinner,ts-attached;
Dstmpe.txt5 - compatible: "st,stmpe-ts"
33 compatible = "st,stmpe-ts";
/linux-4.1.27/drivers/net/ethernet/intel/e1000e/
Dptp.c109 static int e1000e_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in e1000e_phc_gettime() argument
120 *ts = ns_to_timespec64(ns); in e1000e_phc_gettime()
134 const struct timespec64 *ts) in e1000e_phc_settime() argument
141 ns = timespec64_to_ns(ts); in e1000e_phc_settime()
172 struct timespec64 ts; in e1000e_systim_overflow_work() local
174 adapter->ptp_clock_info.gettime64(&adapter->ptp_clock_info, &ts); in e1000e_systim_overflow_work()
177 (long long) ts.tv_sec, ts.tv_nsec); in e1000e_systim_overflow_work()
/linux-4.1.27/net/netfilter/
Dnf_conntrack_amanda.c62 struct ts_config *ts; member
116 search[SEARCH_CONNECT].ts); in amanda_help()
122 search[SEARCH_NEWLINE].ts); in amanda_help()
128 off = skb_find_text(skb, start, stop, search[i].ts); in amanda_help()
203 textsearch_destroy(search[i].ts); in nf_conntrack_amanda_fini()
211 search[i].ts = textsearch_prepare(ts_algo, search[i].string, in nf_conntrack_amanda_init()
214 if (IS_ERR(search[i].ts)) { in nf_conntrack_amanda_init()
215 ret = PTR_ERR(search[i].ts); in nf_conntrack_amanda_init()
231 textsearch_destroy(search[i].ts); in nf_conntrack_amanda_init()
/linux-4.1.27/drivers/media/pci/saa7134/
Dsaa7134-ts.c101 lines = dev->ts.nr_packets; in saa7134_ts_buffer_prepare()
121 int size = TS_PACKET_SIZE * dev->ts.nr_packets; in saa7134_ts_queue_setup()
124 *nbuffers = dev->ts.nr_bufs; in saa7134_ts_queue_setup()
201 saa_writeb(SAA7134_TS_DMA0, ((dev->ts.nr_packets-1)&0xff)); in saa7134_ts_init_hw()
202 saa_writeb(SAA7134_TS_DMA1, (((dev->ts.nr_packets-1)>>8)&0xff)); in saa7134_ts_init_hw()
205 ((((dev->ts.nr_packets-1)>>16)&0x3f) | 0x00)); in saa7134_ts_init_hw()
221 dev->ts.nr_bufs = tsbufs; in saa7134_ts_init1()
222 dev->ts.nr_packets = ts_nr_packets; in saa7134_ts_init1()
270 saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff); in saa7134_ts_start()
272 ((dev->ts.nr_packets - 1) >> 8) & 0xff); in saa7134_ts_start()
[all …]
/linux-4.1.27/arch/arm/boot/dts/
Dspear320-hmi.dts258 stmpe610-ts {
259 compatible = "stmpe,ts";
261 ts,sample-time = <4>;
262 ts,mod-12b = <1>;
263 ts,ref-sel = <0>;
264 ts,adc-freq = <1>;
265 ts,ave-ctrl = <1>;
266 ts,touch-det-delay = <3>;
267 ts,settling = <4>;
268 ts,fraction-z = <7>;
[all …]
Dspear1310-evb.dts375 compatible = "st,stmpe-ts";
376 ts,sample-time = <4>;
377 ts,mod-12b = <1>;
378 ts,ref-sel = <0>;
379 ts,adc-freq = <1>;
380 ts,ave-ctrl = <1>;
381 ts,touch-det-delay = <2>;
382 ts,settling = <2>;
383 ts,fraction-z = <7>;
384 ts,i-drive = <1>;
Dspear1340-evb.dts486 compatible = "st,stmpe-ts";
487 ts,sample-time = <4>;
488 ts,mod-12b = <1>;
489 ts,ref-sel = <0>;
490 ts,adc-freq = <1>;
491 ts,ave-ctrl = <1>;
492 ts,touch-det-delay = <2>;
493 ts,settling = <2>;
494 ts,fraction-z = <7>;
495 ts,i-drive = <1>;
Dsama5d3xdm.dtsi26 atmel,adc-ts-wires = <4>;
27 atmel,adc-ts-pressure-threshold = <10000>;
Dat91-cosino_mega2560.dts30 atmel,adc-ts-wires = <4>;
31 atmel,adc-ts-pressure-threshold = <10000>;
Dat91-cosino.dtsi75 atmel,adc-ts-wires = <4>;
76 atmel,adc-ts-pressure-threshold = <10000>;
/linux-4.1.27/drivers/net/ethernet/intel/igb/
Digb_ptp.c120 struct timespec64 *ts) in igb_ptp_read_i210() argument
133 ts->tv_sec = sec; in igb_ptp_read_i210()
134 ts->tv_nsec = nsec; in igb_ptp_read_i210()
138 const struct timespec64 *ts) in igb_ptp_write_i210() argument
145 wr32(E1000_SYSTIML, ts->tv_nsec); in igb_ptp_write_i210()
146 wr32(E1000_SYSTIMH, ts->tv_sec); in igb_ptp_write_i210()
287 struct timespec64 *ts) in igb_ptp_gettime_82576() argument
300 *ts = ns_to_timespec64(ns); in igb_ptp_gettime_82576()
306 struct timespec64 *ts) in igb_ptp_gettime_i210() argument
314 igb_ptp_read_i210(igb, ts); in igb_ptp_gettime_i210()
[all …]
/linux-4.1.27/arch/mn10300/kernel/
Drtc.c26 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
32 ts->tv_nsec = 0; in read_persistent_clock()
33 ts->tv_sec = mktime(tm.tm_year, tm.tm_mon, tm.tm_mday, in read_persistent_clock()
37 if (ts->tv_sec < 0) in read_persistent_clock()
38 ts->tv_sec = mktime(2009, 1, 1, 12, 0, 0); in read_persistent_clock()
/linux-4.1.27/samples/bpf/
Dtracex4_user.c25 struct timespec ts; in time_get_ns() local
27 clock_gettime(CLOCK_MONOTONIC, &ts); in time_get_ns()
28 return ts.tv_sec * 1000000000ull + ts.tv_nsec; in time_get_ns()
/linux-4.1.27/net/ipv4/
Dip_options.c59 ip_rt_get_source(iph+opt->ts+iph[opt->ts+2]-9, skb, rt); in ip_options_build()
65 memcpy(iph+opt->ts+iph[opt->ts+2]-5, &midtime, 4); in ip_options_build()
74 if (opt->ts) { in ip_options_build()
75 memset(iph+opt->ts, IPOPT_NOP, iph[opt->ts+1]); in ip_options_build()
76 opt->ts = 0; in ip_options_build()
119 if (sopt->ts) { in __ip_options_echo()
120 optlen = sptr[sopt->ts+1]; in __ip_options_echo()
121 soffset = sptr[sopt->ts+2]; in __ip_options_echo()
122 dopt->ts = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo()
123 memcpy(dptr, sptr+sopt->ts, optlen); in __ip_options_echo()
[all …]
Dsyncookies.c85 u32 ts, ts_now = tcp_time_stamp; in cookie_init_timestamp() local
96 ts = ts_now & ~TSMASK; in cookie_init_timestamp()
97 ts |= options; in cookie_init_timestamp()
98 if (ts > ts_now) { in cookie_init_timestamp()
99 ts >>= TSBITS; in cookie_init_timestamp()
100 ts--; in cookie_init_timestamp()
101 ts <<= TSBITS; in cookie_init_timestamp()
102 ts |= options; in cookie_init_timestamp()
104 return ts; in cookie_init_timestamp()
/linux-4.1.27/drivers/media/platform/vivid/
Dvivid-radio-tx.c39 struct timespec ts; in vivid_radio_tx_write() local
60 ktime_get_ts(&ts); in vivid_radio_tx_write()
61 ts = timespec_sub(ts, dev->radio_rds_init_ts); in vivid_radio_tx_write()
62 blk = ts.tv_sec * 100 + ts.tv_nsec / 10000000; in vivid_radio_tx_write()
Dvivid-radio-rx.c39 struct timespec ts; in vivid_radio_rx_read() local
65 ktime_get_ts(&ts); in vivid_radio_rx_read()
66 use_alternates = ts.tv_sec % 10 >= 5; in vivid_radio_rx_read()
73 ts = timespec_sub(ts, dev->radio_rds_init_ts); in vivid_radio_rx_read()
74 blk = ts.tv_sec * 100 + ts.tv_nsec / 10000000; in vivid_radio_rx_read()
/linux-4.1.27/tools/perf/
Dperf.h26 struct timespec ts; in rdclock() local
28 clock_gettime(CLOCK_MONOTONIC, &ts); in rdclock()
29 return ts.tv_sec * 1000000000ULL + ts.tv_nsec; in rdclock()
Dbuiltin-lock.c359 static struct lock_seq_stat *get_seq(struct thread_stat *ts, void *addr) in get_seq() argument
363 list_for_each_entry(seq, &ts->seq_list, list) { in get_seq()
376 list_add(&seq->list, &ts->seq_list); in get_seq()
400 struct thread_stat *ts; in report_lock_acquire_event() local
414 ts = thread_stat_findnew(sample->tid); in report_lock_acquire_event()
415 if (!ts) in report_lock_acquire_event()
418 seq = get_seq(ts, addr); in report_lock_acquire_event()
472 struct thread_stat *ts; in report_lock_acquired_event() local
486 ts = thread_stat_findnew(sample->tid); in report_lock_acquired_event()
487 if (!ts) in report_lock_acquired_event()
[all …]
/linux-4.1.27/drivers/ptp/
Dptp_clock.c110 struct timespec64 ts = timespec_to_timespec64(*tp); in ptp_clock_settime() local
112 return ptp->info->settime64(ptp->info, &ts); in ptp_clock_settime()
118 struct timespec64 ts; in ptp_clock_gettime() local
121 err = ptp->info->gettime64(ptp->info, &ts); in ptp_clock_gettime()
123 *tp = timespec64_to_timespec(ts); in ptp_clock_gettime()
136 struct timespec ts; in ptp_clock_adjtime() local
140 ts.tv_sec = tx->time.tv_sec; in ptp_clock_adjtime()
141 ts.tv_nsec = tx->time.tv_usec; in ptp_clock_adjtime()
144 ts.tv_nsec *= 1000; in ptp_clock_adjtime()
146 if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC) in ptp_clock_adjtime()
[all …]
Dptp_chardev.c127 struct timespec64 ts; in ptp_ioctl() local
198 pct = &sysoff->ts[0]; in ptp_ioctl()
200 getnstimeofday64(&ts); in ptp_ioctl()
201 pct->sec = ts.tv_sec; in ptp_ioctl()
202 pct->nsec = ts.tv_nsec; in ptp_ioctl()
204 ptp->info->gettime64(ptp->info, &ts); in ptp_ioctl()
205 pct->sec = ts.tv_sec; in ptp_ioctl()
206 pct->nsec = ts.tv_nsec; in ptp_ioctl()
209 getnstimeofday64(&ts); in ptp_ioctl()
210 pct->sec = ts.tv_sec; in ptp_ioctl()
[all …]
Dptp_ixp46x.c178 static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in ptp_ixp_gettime() argument
192 ts->tv_sec = div_u64_rem(ns, 1000000000, &remainder); in ptp_ixp_gettime()
193 ts->tv_nsec = remainder; in ptp_ixp_gettime()
198 const struct timespec64 *ts) in ptp_ixp_settime() argument
205 ns = ts->tv_sec * 1000000000ULL; in ptp_ixp_settime()
206 ns += ts->tv_nsec; in ptp_ixp_settime()
Dptp_pch.c452 static int ptp_pch_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in ptp_pch_gettime() argument
464 ts->tv_sec = div_u64_rem(ns, 1000000000, &remainder); in ptp_pch_gettime()
465 ts->tv_nsec = remainder; in ptp_pch_gettime()
470 const struct timespec64 *ts) in ptp_pch_settime() argument
477 ns = ts->tv_sec * 1000000000ULL; in ptp_pch_settime()
478 ns += ts->tv_nsec; in ptp_pch_settime()
/linux-4.1.27/fs/fat/
Dmisc.c189 void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, in fat_time_fat2unix() argument
218 ts->tv_sec = second + (time_cs / 100); in fat_time_fat2unix()
219 ts->tv_nsec = (time_cs % 100) * 10000000; in fat_time_fat2unix()
221 ts->tv_sec = second; in fat_time_fat2unix()
222 ts->tv_nsec = 0; in fat_time_fat2unix()
227 void fat_time_unix2fat(struct msdos_sb_info *sbi, struct timespec *ts, in fat_time_unix2fat() argument
231 time_to_tm(ts->tv_sec, in fat_time_unix2fat()
261 *time_cs = (ts->tv_sec & 1) * 100 + ts->tv_nsec / 10000000; in fat_time_unix2fat()
Dnamei_msdos.c227 struct timespec *ts, struct fat_slot_info *sinfo) in msdos_add_entry() argument
239 fat_time_unix2fat(sbi, ts, &time, &date, NULL); in msdos_add_entry()
252 dir->i_ctime = dir->i_mtime = *ts; in msdos_add_entry()
268 struct timespec ts; in msdos_create() local
286 ts = CURRENT_TIME_SEC; in msdos_create()
287 err = msdos_add_entry(dir, msdos_name, 0, is_hid, 0, &ts, &sinfo); in msdos_create()
296 inode->i_mtime = inode->i_atime = inode->i_ctime = ts; in msdos_create()
350 struct timespec ts; in msdos_mkdir() local
367 ts = CURRENT_TIME_SEC; in msdos_mkdir()
368 cluster = fat_alloc_new_dir(dir, &ts); in msdos_mkdir()
[all …]
Dnamei_vfat.c580 struct timespec *ts, in vfat_build_slots() argument
644 fat_time_unix2fat(sbi, ts, &time, &date, &time_cs); in vfat_build_slots()
656 int cluster, struct timespec *ts, in vfat_add_entry() argument
671 err = vfat_build_slots(dir, qname->name, len, is_dir, cluster, ts, in vfat_add_entry()
681 dir->i_ctime = dir->i_mtime = dir->i_atime = *ts; in vfat_add_entry()
775 struct timespec ts; in vfat_create() local
780 ts = CURRENT_TIME_SEC; in vfat_create()
781 err = vfat_add_entry(dir, &dentry->d_name, 0, 0, &ts, &sinfo); in vfat_create()
793 inode->i_mtime = inode->i_atime = inode->i_ctime = ts; in vfat_create()
864 struct timespec ts; in vfat_mkdir() local
[all …]
/linux-4.1.27/fs/udf/
Dudftime.c120 udf_time_to_disk_stamp(struct timestamp *dest, struct timespec ts) in udf_time_to_disk_stamp() argument
133 ts.tv_sec += offset * 60; in udf_time_to_disk_stamp()
134 days = ts.tv_sec / SECS_PER_DAY; in udf_time_to_disk_stamp()
135 rem = ts.tv_sec % SECS_PER_DAY; in udf_time_to_disk_stamp()
162 dest->centiseconds = ts.tv_nsec / 10000000; in udf_time_to_disk_stamp()
163 dest->hundredsOfMicroseconds = (ts.tv_nsec / 1000 - in udf_time_to_disk_stamp()
165 dest->microseconds = (ts.tv_nsec / 1000 - dest->centiseconds * 10000 - in udf_time_to_disk_stamp()
/linux-4.1.27/arch/m68k/kernel/
Dtime.c73 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
76 ts->tv_sec = 0; in read_persistent_clock()
77 ts->tv_nsec = 0; in read_persistent_clock()
84 ts->tv_sec = mktime(time.tm_year, time.tm_mon, time.tm_mday, in read_persistent_clock()
/linux-4.1.27/arch/mips/loongson/common/
Dtime.c32 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
34 ts->tv_sec = mc146818_get_cmos_time(); in read_persistent_clock()
35 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/rtc/
Drtc-lib.c140 struct timespec64 ts; in rtc_ktime_to_tm() local
143 ts = ktime_to_timespec64(kt); in rtc_ktime_to_tm()
145 if (ts.tv_nsec) in rtc_ktime_to_tm()
146 ts.tv_sec++; in rtc_ktime_to_tm()
147 rtc_time64_to_tm(ts.tv_sec, &ret); in rtc_ktime_to_tm()
/linux-4.1.27/kernel/
Dcompat.c143 static int __compat_get_timespec(struct timespec *ts, const struct compat_timespec __user *cts) in __compat_get_timespec() argument
146 __get_user(ts->tv_sec, &cts->tv_sec) || in __compat_get_timespec()
147 __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; in __compat_get_timespec()
150 static int __compat_put_timespec(const struct timespec *ts, struct compat_timespec __user *cts) in __compat_put_timespec() argument
153 __put_user(ts->tv_sec, &cts->tv_sec) || in __compat_put_timespec()
154 __put_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0; in __compat_put_timespec()
175 int compat_get_timespec(struct timespec *ts, const void __user *uts) in compat_get_timespec() argument
178 return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0; in compat_get_timespec()
180 return __compat_get_timespec(ts, uts); in compat_get_timespec()
184 int compat_put_timespec(const struct timespec *ts, void __user *uts) in compat_put_timespec() argument
[all …]
Dfutex_compat.c178 struct timespec ts; in COMPAT_SYSCALL_DEFINE6() local
186 if (compat_get_timespec(&ts, utime)) in COMPAT_SYSCALL_DEFINE6()
188 if (!timespec_valid(&ts)) in COMPAT_SYSCALL_DEFINE6()
191 t = timespec_to_ktime(ts); in COMPAT_SYSCALL_DEFINE6()
/linux-4.1.27/drivers/media/dvb-core/
Ddvb_net.c316 const u8 *ts, *ts_end, *from_where = NULL; in dvb_net_ule() local
330 for (ts = buf, ts_end = buf + buf_len; ts < ts_end; /* no default incr. */ ) { in dvb_net_ule()
337 memcpy( ule_where, ts, TS_SZ ); in dvb_net_ule()
346 if ((ts[0] != TS_SYNC) || (ts[1] & TS_TEI) || ((ts[3] & TS_SC) != 0)) { in dvb_net_ule()
348 priv->ts_count, ts[0], in dvb_net_ule()
349 (ts[1] & TS_TEI) >> 7, in dvb_net_ule()
350 (ts[3] & TS_SC) >> 6); in dvb_net_ule()
363 ts += TS_SZ; in dvb_net_ule()
369 from_where = ts + 4; in dvb_net_ule()
373 if (ts[1] & TS_PUSI) { in dvb_net_ule()
[all …]
Ddmxdev.c435 list_for_each_entry(feed, &dmxdevfilter->feed.ts, next) in dvb_dmxdev_feed_stop()
436 feed->ts->stop_filtering(feed->ts); in dvb_dmxdev_feed_stop()
456 list_for_each_entry(feed, &filter->feed.ts, next) { in dvb_dmxdev_feed_start()
457 ret = feed->ts->start_filtering(feed->ts); in dvb_dmxdev_feed_start()
516 list_for_each_entry(feed, &dmxdevfilter->feed.ts, next) { in dvb_dmxdev_filter_stop()
517 demux->release_ts_feed(demux, feed->ts); in dvb_dmxdev_filter_stop()
518 feed->ts = NULL; in dvb_dmxdev_filter_stop()
536 list_for_each_entry_safe(feed, tmp, &dmxdevfilter->feed.ts, next) { in dvb_dmxdev_delete_pids()
541 BUG_ON(!list_empty(&dmxdevfilter->feed.ts)); in dvb_dmxdev_delete_pids()
569 feed->ts = NULL; in dvb_dmxdev_start_feed()
[all …]
Ddmxdev.h60 struct dmx_ts_feed *ts; member
71 struct list_head ts; member
Ddvb_demux.h69 struct dmx_ts_feed ts; member
74 dmx_ts_cb ts; member
Ddvb_demux.c133 return feed->cb.ts(&buf[p], count, NULL, 0, &feed->feed.ts, DMX_OK); in dvb_dmx_swfilter_payload()
364 if (!feed->feed.ts.is_filtering) in dvb_dmx_swfilter_packet_type()
370 feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts, in dvb_dmx_swfilter_packet_type()
392 ((f)->feed.ts.is_filtering) && \
472 feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts, DMX_OK); in dvb_dmx_swfilter_packet()
591 demux->feed->cb.ts(buf, count, NULL, 0, &demux->feed->feed.ts, DMX_OK); in dvb_dmx_swfilter_raw()
801 feed->cb.ts = callback; in dvbdmx_allocate_ts_feed()
807 (*ts_feed) = &feed->feed.ts; in dvbdmx_allocate_ts_feed()
/linux-4.1.27/arch/parisc/kernel/
Dtime.c249 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
253 ts->tv_sec = tod_data.tod_sec; in read_persistent_clock()
254 ts->tv_nsec = tod_data.tod_usec * 1000; in read_persistent_clock()
257 ts->tv_sec = 0; in read_persistent_clock()
258 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/misc/sgi-gru/
Dgruprocfs.c177 struct gru_thread_state *ts; in cch_seq_show() local
185 ts = gru->gs_gts[i]; in cch_seq_show()
186 if (!ts) in cch_seq_show()
190 is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid, in cch_seq_show()
191 is_kernel_context(ts) ? 0 : ts->ts_tgid_owner, in cch_seq_show()
192 ts->ts_cbr_au_count * GRU_CBR_AU_SIZE, in cch_seq_show()
193 ts->ts_cbr_au_count * GRU_DSR_AU_BYTES, in cch_seq_show()
194 mode[ts->ts_user_options & in cch_seq_show()
/linux-4.1.27/arch/cris/kernel/
Dtime.c60 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
62 ts->tv_sec = 0; in read_persistent_clock()
63 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/arch/sh/boards/mach-dreamcast/
Drtc.c33 static void aica_rtc_gettimeofday(struct timespec *ts) in aica_rtc_gettimeofday() argument
45 ts->tv_sec = val1 - TWENTY_YEARS; in aica_rtc_gettimeofday()
48 ts->tv_nsec = 0; in aica_rtc_gettimeofday()
/linux-4.1.27/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_ptp.c108 static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts) in stmmac_get_time() argument
121 *ts = ns_to_timespec64(ns); in stmmac_get_time()
136 const struct timespec64 *ts) in stmmac_set_time() argument
144 priv->hw->ptp->init_systime(priv->ioaddr, ts->tv_sec, ts->tv_nsec); in stmmac_set_time()
/linux-4.1.27/tools/lib/traceevent/
Dkbuffer.h49 void *kbuffer_read_event(struct kbuffer *kbuf, unsigned long long *ts);
50 void *kbuffer_next_event(struct kbuffer *kbuf, unsigned long long *ts);
55 void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset, unsigned long long *ts);
Dkbuffer-parse.c493 void *kbuffer_next_event(struct kbuffer *kbuf, unsigned long long *ts) in kbuffer_next_event() argument
504 if (ts) in kbuffer_next_event()
505 *ts = kbuf->timestamp; in kbuffer_next_event()
571 void *kbuffer_read_event(struct kbuffer *kbuf, unsigned long long *ts) in kbuffer_read_event() argument
579 if (ts) in kbuffer_read_event()
580 *ts = kbuf->timestamp; in kbuffer_read_event()
614 unsigned long long *ts) in kbuffer_read_at_offset() argument
627 data = kbuffer_next_event(kbuf, ts); in kbuffer_read_at_offset()
/linux-4.1.27/drivers/pps/clients/
Dpps-ktimer.c44 struct pps_event_time ts; in pps_ktimer_event() local
47 pps_get_ts(&ts); in pps_ktimer_event()
49 pps_event(pps, &ts, PPS_CAPTUREASSERT, NULL); in pps_ktimer_event()
Dpps-gpio.c56 struct pps_event_time ts; in pps_gpio_irq_handler() local
60 pps_get_ts(&ts); in pps_gpio_irq_handler()
67 pps_event(info->pps, &ts, PPS_CAPTUREASSERT, NULL); in pps_gpio_irq_handler()
71 pps_event(info->pps, &ts, PPS_CAPTURECLEAR, NULL); in pps_gpio_irq_handler()
Dpps-ldisc.c35 struct pps_event_time ts; in pps_tty_dcd_change() local
37 pps_get_ts(&ts); in pps_tty_dcd_change()
48 pps_event(pps, &ts, status ? PPS_CAPTUREASSERT : in pps_tty_dcd_change()
/linux-4.1.27/drivers/net/ethernet/intel/i40e/
Di40e_ptp.c60 static void i40e_ptp_read(struct i40e_pf *pf, struct timespec64 *ts) in i40e_ptp_read() argument
72 *ts = ns_to_timespec64(ns); in i40e_ptp_read()
84 static void i40e_ptp_write(struct i40e_pf *pf, const struct timespec64 *ts) in i40e_ptp_write() argument
87 u64 ns = timespec64_to_ns(ts); in i40e_ptp_write()
184 static int i40e_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in i40e_ptp_gettime() argument
190 i40e_ptp_read(pf, ts); in i40e_ptp_gettime()
205 const struct timespec64 *ts) in i40e_ptp_settime() argument
211 i40e_ptp_write(pf, ts); in i40e_ptp_settime()
676 struct timespec64 ts; in i40e_ptp_init() local
698 ts = ktime_to_timespec64(ktime_get_real()); in i40e_ptp_init()
[all …]
/linux-4.1.27/arch/mips/mti-sead3/
Dsead3-time.c66 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
68 ts->tv_sec = 0; in read_persistent_clock()
69 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/tools/thermal/tmon/
Dpid.c71 p_param.ts = ticktime; in init_thermal_controller()
113 i_term = p_param.kp * p_param.ki * p_param.ts * ek; in controller_handler()
114 d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts; in controller_handler()
/linux-4.1.27/fs/afs/
Dmain.c40 struct timespec ts; in afs_get_client_UUID() local
51 getnstimeofday(&ts); in afs_get_client_UUID()
52 uuidtime = (u64) ts.tv_sec * 1000 * 1000 * 10; in afs_get_client_UUID()
53 uuidtime += ts.tv_nsec / 100; in afs_get_client_UUID()
/linux-4.1.27/Documentation/laptops/
Ddslm.c60 char *ts = ctime(&time); in myctime() local
61 ts[strlen(ts) - 1] = 0; in myctime()
63 return ts; in myctime()
/linux-4.1.27/drivers/media/usb/uvc/
Duvc_video.c364 static inline void uvc_video_get_ts(struct timespec *ts) in uvc_video_get_ts() argument
367 ktime_get_ts(ts); in uvc_video_get_ts()
369 ktime_get_real_ts(ts); in uvc_video_get_ts()
381 struct timespec ts; in uvc_video_clock_decode() local
431 uvc_video_get_ts(&ts); in uvc_video_clock_decode()
468 sample->host_ts = ts; in uvc_video_clock_decode()
608 struct timespec ts; in uvc_video_clock_update() local
659 ts = timespec_sub(last->host_ts, first->host_ts); in uvc_video_clock_update()
661 y2 = (ts.tv_sec + 1) * NSEC_PER_SEC + ts.tv_nsec; in uvc_video_clock_update()
679 ts.tv_sec = first->host_ts.tv_sec - 1 + div; in uvc_video_clock_update()
[all …]
/linux-4.1.27/arch/tile/gxio/
Dmpipe.c459 const struct timespec64 *ts) in gxio_mpipe_set_timestamp() argument
462 return gxio_mpipe_set_timestamp_aux(context, (uint64_t)ts->tv_sec, in gxio_mpipe_set_timestamp()
463 (uint64_t)ts->tv_nsec, in gxio_mpipe_set_timestamp()
469 struct timespec64 *ts) in gxio_mpipe_get_timestamp() argument
474 ret = gxio_mpipe_get_timestamp_aux(context, (uint64_t *)&ts->tv_sec, in gxio_mpipe_get_timestamp()
475 (uint64_t *)&ts->tv_nsec, in gxio_mpipe_get_timestamp()
482 ts->tv_nsec -= (cycles_now - cycles_prev) * 1000000000LL / clock_rate; in gxio_mpipe_get_timestamp()
483 if (ts->tv_nsec < 0) { in gxio_mpipe_get_timestamp()
484 ts->tv_nsec += 1000000000LL; in gxio_mpipe_get_timestamp()
485 ts->tv_sec -= 1; in gxio_mpipe_get_timestamp()
/linux-4.1.27/tools/perf/scripts/perl/
Dwakeup-latency.pl35 my $wakeup_ts = $last_wakeup{$common_cpu}{ts};
48 $last_wakeup{$common_cpu}{ts} = 0;
57 $last_wakeup{$target_cpu}{ts} = nsecs($common_secs, $common_nsecs);
/linux-4.1.27/arch/frv/kernel/
Dtime.c88 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
104 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
105 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/iio/humidity/
Ddht11.c73 struct {s64 ts; int value; } edges[DHT11_EDGES_PER_READ]; member
98 t = dht11->edges[i].ts - dht11->edges[i-1].ts; in dht11_decode()
113 t = dht11->edges[offset + 2*i + 2].ts - in dht11_decode()
114 dht11->edges[offset + 2*i + 1].ts; in dht11_decode()
157 dht11->edges[dht11->num_edges].ts = iio_get_time_ns(); in dht11_handle_irq()
/linux-4.1.27/include/linux/ceph/
Ddecode.h137 static inline void ceph_decode_timespec(struct timespec *ts, in ceph_decode_timespec() argument
140 ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec); in ceph_decode_timespec()
141 ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec); in ceph_decode_timespec()
144 const struct timespec *ts) in ceph_encode_timespec() argument
146 tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); in ceph_encode_timespec()
147 tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec); in ceph_encode_timespec()
/linux-4.1.27/drivers/net/ethernet/ti/
Dcpts.c170 static int cpts_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in cpts_ptp_gettime() argument
180 *ts = ns_to_timespec64(ns); in cpts_ptp_gettime()
186 const struct timespec64 *ts) in cpts_ptp_settime() argument
192 ns = timespec64_to_ns(ts); in cpts_ptp_settime()
223 struct timespec64 ts; in cpts_overflow_check() local
228 cpts_ptp_gettime(&cpts->info, &ts); in cpts_overflow_check()
229 pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec); in cpts_overflow_check()
/linux-4.1.27/arch/mips/sibyte/swarm/
Dsetup.c90 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
108 ts->tv_sec = sec; in read_persistent_clock()
109 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/arch/blackfin/kernel/
Dtime.c135 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
138 ts->tv_sec = secs_since_1970; in read_persistent_clock()
139 ts->tv_nsec = 0; in read_persistent_clock()
Dtime-ts.c352 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
355 ts->tv_sec = secs_since_1970; in read_persistent_clock()
356 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/
Dxgbe-ptp.c182 static int xgbe_gettime(struct ptp_clock_info *info, struct timespec64 *ts) in xgbe_gettime() argument
196 *ts = ns_to_timespec64(nsec); in xgbe_gettime()
202 const struct timespec64 *ts) in xgbe_settime() argument
210 nsec = timespec64_to_ns(ts); in xgbe_settime()
/linux-4.1.27/arch/avr32/kernel/
Dtime.c124 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
126 ts->tv_sec = mktime(2007, 1, 1, 0, 0, 0); in read_persistent_clock()
127 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/arch/mips/mti-malta/
Dmalta-time.c114 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
116 ts->tv_sec = mc146818_get_cmos_time(); in read_persistent_clock()
117 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/arch/mips/lasat/
Dds1603.c138 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
150 ts->tv_sec = word; in read_persistent_clock()
151 ts->tv_nsec = 0; in read_persistent_clock()
Dsysctl.c63 struct timespec64 ts; in proc_dolasatrtc() local
67 read_persistent_clock64(&ts); in proc_dolasatrtc()
68 rtctmp = ts.tv_sec; in proc_dolasatrtc()
/linux-4.1.27/arch/mips/sni/
Dtime.c186 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
188 ts->tv_sec = -1; in read_persistent_clock()
189 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/net/ethernet/freescale/
Dfec_ptp.c115 struct timespec ts; in fec_ptp_enable_pps() local
166 ts.tv_sec = div_u64_rem(ns, 1000000000ULL, &remainder); in fec_ptp_enable_pps()
167 ts.tv_nsec = remainder; in fec_ptp_enable_pps()
172 val = NSEC_PER_SEC - (u32)ts.tv_nsec + tempval; in fec_ptp_enable_pps()
393 static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in fec_ptp_gettime() argument
404 *ts = ns_to_timespec64(ns); in fec_ptp_gettime()
418 const struct timespec64 *ts) in fec_ptp_settime() argument
434 ns = timespec64_to_ns(ts); in fec_ptp_settime()
/linux-4.1.27/arch/m32r/kernel/
Dtime.c140 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
160 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
161 ts->tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); in read_persistent_clock()
/linux-4.1.27/arch/mips/dec/
Dtime.c21 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
56 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
57 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/pps/generators/
Dpps_gen_parport.c183 struct timespec ts; in next_intr_time() local
185 getnstimeofday(&ts); in next_intr_time()
187 return ktime_set(ts.tv_sec + in next_intr_time()
188 ((ts.tv_nsec > 990 * NSEC_PER_MSEC) ? 1 : 0), in next_intr_time()
/linux-4.1.27/arch/x86/um/vdso/
Dum_vdso.c19 int __vdso_clock_gettime(clockid_t clock, struct timespec *ts) in __vdso_clock_gettime() argument
24 "0" (__NR_clock_gettime), "D" (clock), "S" (ts) : "memory"); in __vdso_clock_gettime()
/linux-4.1.27/fs/
Dcompat.c1109 struct timespec ts; in poll_select_copy_remaining() local
1121 ktime_get_ts(&ts); in poll_select_copy_remaining()
1122 ts = timespec_sub(*end_time, ts); in poll_select_copy_remaining()
1123 if (ts.tv_sec < 0) in poll_select_copy_remaining()
1124 ts.tv_sec = ts.tv_nsec = 0; in poll_select_copy_remaining()
1129 rtv.tv_sec = ts.tv_sec; in poll_select_copy_remaining()
1130 rtv.tv_usec = ts.tv_nsec / NSEC_PER_USEC; in poll_select_copy_remaining()
1137 rts.tv_sec = ts.tv_sec; in poll_select_copy_remaining()
1138 rts.tv_nsec = ts.tv_nsec; in poll_select_copy_remaining()
1355 struct compat_timespec ts; in do_compat_pselect() local
[all …]
Dselect.c274 struct timespec ts = {.tv_sec = sec, .tv_nsec = nsec}; in poll_select_set_timeout() local
276 if (!timespec_valid(&ts)) in poll_select_set_timeout()
284 *to = timespec_add_safe(*to, ts); in poll_select_set_timeout()
651 struct timespec ts, end_time, *to = NULL; in do_pselect() local
655 if (copy_from_user(&ts, tsp, sizeof(ts))) in do_pselect()
659 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec)) in do_pselect()
996 struct timespec ts, end_time, *to = NULL; in SYSCALL_DEFINE5() local
1000 if (copy_from_user(&ts, tsp, sizeof(ts))) in SYSCALL_DEFINE5()
1004 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec)) in SYSCALL_DEFINE5()
/linux-4.1.27/drivers/platform/chrome/
Dchromeos_laptop.c44 static struct i2c_client *ts; variable
311 if (ts) in setup_atmel_1664s_ts()
315 ts = add_probed_i2c_device("touchscreen", type, in setup_atmel_1664s_ts()
317 return (!ts) ? -EAGAIN : 0; in setup_atmel_1664s_ts()
633 if (ts) in chromeos_laptop_exit()
634 i2c_unregister_device(ts); in chromeos_laptop_exit()
/linux-4.1.27/arch/arm/plat-omap/
Dcounter_32k.c57 static void omap_read_persistent_clock64(struct timespec64 *ts) in omap_read_persistent_clock64() argument
70 *ts = persistent_ts; in omap_read_persistent_clock64()
/linux-4.1.27/arch/powerpc/kernel/
Dtime.c731 static void __read_persistent_clock(struct timespec *ts) in __read_persistent_clock() argument
736 ts->tv_nsec = 0; in __read_persistent_clock()
745 ts->tv_sec = ppc_md.get_boot_time() - timezone_offset; in __read_persistent_clock()
750 ts->tv_sec = 0; in __read_persistent_clock()
755 ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, in __read_persistent_clock()
759 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
761 __read_persistent_clock(ts); in read_persistent_clock()
764 if (ts->tv_sec < 0) { in read_persistent_clock()
765 ts->tv_sec = 0; in read_persistent_clock()
766 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/arch/sh/kernel/
Dtime.c41 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
43 rtc_sh_get_time(ts); in read_persistent_clock()
/linux-4.1.27/drivers/net/slip/
Dslhc.c95 register struct cstate *ts; in slhc_init() local
133 ts = comp->tstate; in slhc_init()
135 ts[i].cs_this = i; in slhc_init()
136 ts[i].next = &(ts[i - 1]); in slhc_init()
138 ts[0].next = &(ts[comp->tslot_limit]); in slhc_init()
139 ts[0].cs_this = 0; in slhc_init()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
Den_clock.c168 struct timespec64 *ts) in mlx4_en_phc_gettime() argument
179 *ts = ns_to_timespec64(ns); in mlx4_en_phc_gettime()
193 const struct timespec64 *ts) in mlx4_en_phc_settime() argument
197 u64 ns = timespec64_to_ns(ts); in mlx4_en_phc_settime()
/linux-4.1.27/arch/powerpc/platforms/52xx/
Dmpc52xx_lpbfifo.c228 u32 ts; in mpc52xx_lpbfifo_irq() local
233 ts = get_tbl(); in mpc52xx_lpbfifo_irq()
311 req->irq_ticks += get_tbl() - ts; in mpc52xx_lpbfifo_irq()
331 u32 ts; in mpc52xx_lpbfifo_bcom_irq() local
334 ts = get_tbl(); in mpc52xx_lpbfifo_bcom_irq()
365 req->irq_ticks += get_tbl() - ts; in mpc52xx_lpbfifo_bcom_irq()
/linux-4.1.27/arch/s390/include/asm/
Dtimex.h114 void stck_to_timespec(unsigned long long stck, struct timespec *ts) in stck_to_timespec() argument
116 tod_to_timeval(stck - TOD_UNIX_EPOCH, ts); in stck_to_timespec()
/linux-4.1.27/drivers/media/pci/solo6x10/
Dsolo6x10-core.c50 struct timespec ts; in solo_set_time() local
52 ktime_get_ts(&ts); in solo_set_time()
54 solo_reg_write(solo_dev, SOLO_TIMER_SEC, ts.tv_sec); in solo_set_time()
55 solo_reg_write(solo_dev, SOLO_TIMER_USEC, ts.tv_nsec / NSEC_PER_USEC); in solo_set_time()
61 struct timespec ts; in solo_timer_sync() local
75 ktime_get_ts(&ts); in solo_timer_sync()
77 diff = (long)ts.tv_sec - (long)sec; in solo_timer_sync()
79 + ((long)(ts.tv_nsec / NSEC_PER_USEC) - (long)usec); in solo_timer_sync()
/linux-4.1.27/arch/um/kernel/
Dtime.c103 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
107 set_normalized_timespec(ts, nsecs / NSEC_PER_SEC, in read_persistent_clock()
/linux-4.1.27/drivers/staging/ozwpan/
Dozusbsvc.c130 struct timespec ts, now; in oz_usb_stop() local
132 getnstimeofday(&ts); in oz_usb_stop()
144 if (now.tv_sec != ts.tv_sec) in oz_usb_stop()
/linux-4.1.27/drivers/mmc/card/
Dmmc_test.c100 struct timespec ts; member
496 static unsigned int mmc_test_rate(uint64_t bytes, struct timespec *ts) in mmc_test_rate() argument
500 ns = ts->tv_sec; in mmc_test_rate()
502 ns += ts->tv_nsec; in mmc_test_rate()
523 unsigned int count, unsigned int sectors, struct timespec ts, in mmc_test_save_transfer_result() argument
537 tr->ts = ts; in mmc_test_save_transfer_result()
551 struct timespec ts; in mmc_test_print_rate() local
553 ts = timespec_sub(*ts2, *ts1); in mmc_test_print_rate()
555 rate = mmc_test_rate(bytes, &ts); in mmc_test_print_rate()
556 iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */ in mmc_test_print_rate()
[all …]
/linux-4.1.27/scripts/kconfig/
Dzconf.lex.c1001 int ts, i; variable
1258 ts = 0;
1261 ts = (ts & ~7) + 8;
1263 ts++;
1265 last_ts = ts;
1267 if (ts < first_ts) {
1271 ts -= first_ts;
1272 while (ts > 8) {
1274 ts -= 8;
1276 append_string(" ", ts);
/linux-4.1.27/drivers/net/phy/
Ddp83640.c260 const struct timespec64 *ts, u16 cmd) in tdr_write() argument
262 ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec & 0xffff);/* ns[15:0] */ in tdr_write()
263 ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec >> 16); /* ns[31:16] */ in tdr_write()
264 ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec & 0xffff); /* sec[15:0] */ in tdr_write()
265 ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec >> 16); /* sec[31:16]*/ in tdr_write()
414 struct timespec64 ts; in ptp_dp83640_adjtime() local
419 ts = ns_to_timespec64(delta); in ptp_dp83640_adjtime()
423 err = tdr_write(1, phydev, &ts, PTP_STEP_CLK); in ptp_dp83640_adjtime()
431 struct timespec64 *ts) in ptp_dp83640_gettime() argument
449 ts->tv_nsec = val[0] | (val[1] << 16); in ptp_dp83640_gettime()
[all …]
/linux-4.1.27/drivers/media/v4l2-core/
Dv4l2-common.c401 struct timespec ts; in v4l2_get_timestamp() local
403 ktime_get_ts(&ts); in v4l2_get_timestamp()
404 tv->tv_sec = ts.tv_sec; in v4l2_get_timestamp()
405 tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC; in v4l2_get_timestamp()
/linux-4.1.27/fs/cifs/
Dnetmisc.c924 struct timespec ts; in cifs_NTtimeToUnix() local
938 ts.tv_nsec = (long)(do_div(abs_t, 10000000) * 100); in cifs_NTtimeToUnix()
939 ts.tv_nsec = -ts.tv_nsec; in cifs_NTtimeToUnix()
940 ts.tv_sec = -abs_t; in cifs_NTtimeToUnix()
943 ts.tv_nsec = (long)do_div(abs_t, 10000000) * 100; in cifs_NTtimeToUnix()
944 ts.tv_sec = abs_t; in cifs_NTtimeToUnix()
947 return ts; in cifs_NTtimeToUnix()
964 struct timespec ts; in cnvrtDosUnixTm() local
1008 ts.tv_sec = sec + offset; in cnvrtDosUnixTm()
1012 ts.tv_nsec = 0; in cnvrtDosUnixTm()
[all …]
/linux-4.1.27/arch/tile/kernel/
Dhardwall.c578 struct thread_struct *ts = &p->thread; in hardwall_activate() local
604 if (ts->hardwall[hwt->index].info) { in hardwall_activate()
605 BUG_ON(ts->hardwall[hwt->index].info != info); in hardwall_activate()
610 ts->hardwall[hwt->index].info = info; in hardwall_activate()
612 list_add(&ts->hardwall[hwt->index].list, &info->task_head); in hardwall_activate()
629 struct thread_struct *ts = &task->thread; in _hardwall_deactivate() local
638 BUG_ON(ts->hardwall[hwt->index].info == NULL); in _hardwall_deactivate()
639 ts->hardwall[hwt->index].info = NULL; in _hardwall_deactivate()
640 list_del(&ts->hardwall[hwt->index].list); in _hardwall_deactivate()
/linux-4.1.27/arch/x86/include/asm/
Dx86_init.h161 void (*get_wallclock)(struct timespec *ts);
162 int (*set_wallclock)(const struct timespec *ts);
/linux-4.1.27/Documentation/networking/timestamping/
Dtxtimestamp.c108 struct timespec ts; in print_timestamp_usr() local
112 ts.tv_sec = tv.tv_sec; in print_timestamp_usr()
113 ts.tv_nsec = tv.tv_usec * 1000; in print_timestamp_usr()
115 __print_timestamp(" USR", &ts, 0, 0); in print_timestamp_usr()
137 __print_timestamp(tsname, &tss->ts[0], tskey, payload_len); in print_timestamp()
Dtimestamping.c161 struct timespec ts; in printpacket() local
269 if (ioctl(sock, SIOCGSTAMPNS, &ts)) in printpacket()
273 (long)ts.tv_sec, in printpacket()
274 (long)ts.tv_nsec); in printpacket()
/linux-4.1.27/net/
Dcompat.c227 struct timespec *ts = (struct timespec *)data; in put_cmsg_compat() local
229 cts[i].tv_sec = ts[i].tv_sec; in put_cmsg_compat()
230 cts[i].tv_nsec = ts[i].tv_nsec; in put_cmsg_compat()
462 struct timespec ts; in compat_sock_get_timestampns() local
471 ts = ktime_to_timespec(sk->sk_stamp); in compat_sock_get_timestampns()
472 if (ts.tv_sec == -1) in compat_sock_get_timestampns()
474 if (ts.tv_sec == 0) { in compat_sock_get_timestampns()
476 ts = ktime_to_timespec(sk->sk_stamp); in compat_sock_get_timestampns()
479 if (put_user(ts.tv_sec, &ctv->tv_sec) || in compat_sock_get_timestampns()
480 put_user(ts.tv_nsec, &ctv->tv_nsec)) in compat_sock_get_timestampns()
/linux-4.1.27/arch/x86/kernel/
Dpvclock.c120 struct timespec *ts) in pvclock_read_wallclock() argument
141 set_normalized_timespec(ts, now.tv_sec, now.tv_nsec); in pvclock_read_wallclock()
Drtc.c144 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
146 x86_platform.get_wallclock(ts); in read_persistent_clock()
/linux-4.1.27/drivers/net/ethernet/intel/fm10k/
Dfm10k_ptp.c288 static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in fm10k_ptp_gettime() argument
300 *ts = ns_to_timespec64(now); in fm10k_ptp_gettime()
306 const struct timespec64 *ts) in fm10k_ptp_settime() argument
310 u64 ns = timespec64_to_ns(ts); in fm10k_ptp_settime()
/linux-4.1.27/arch/nios2/kernel/
Dtime.c297 void read_persistent_clock(struct timespec *ts) in read_persistent_clock() argument
299 ts->tv_sec = mktime(2007, 1, 1, 0, 0, 0); in read_persistent_clock()
300 ts->tv_nsec = 0; in read_persistent_clock()
/linux-4.1.27/drivers/net/ethernet/intel/ixgbe/
Dixgbe_ptp.c282 static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) in ixgbe_ptp_gettime() argument
293 *ts = ns_to_timespec64(ns); in ixgbe_ptp_gettime()
307 const struct timespec64 *ts) in ixgbe_ptp_settime() argument
314 ns = timespec64_to_ns(ts); in ixgbe_ptp_settime()
407 struct timespec64 ts; in ixgbe_ptp_overflow_check() local
410 ixgbe_ptp_gettime(&adapter->ptp_caps, &ts); in ixgbe_ptp_overflow_check()
/linux-4.1.27/drivers/scsi/libsas/
Dsas_scsi_host.c55 struct task_status_struct *ts = &task->task_status; in sas_end_task() local
58 if (ts->resp == SAS_TASK_UNDELIVERED) { in sas_end_task()
63 switch (ts->stat) { in sas_end_task()
72 scsi_set_resid(sc, ts->residual); in sas_end_task()
89 if (ts->open_rej_reason == SAS_OREJ_RSVD_RETRY) in sas_end_task()
103 memcpy(sc->sense_buffer, ts->buf, in sas_end_task()
104 min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size)); in sas_end_task()
108 stat = ts->stat; in sas_end_task()
/linux-4.1.27/arch/tile/include/arch/
Dmpipe_shm.h291 uint_reg_t ts : 1; member
319 uint_reg_t ts : 1;
/linux-4.1.27/drivers/clocksource/
Dtegra20_timer.c132 static void tegra_read_persistent_clock64(struct timespec64 *ts) in tegra_read_persistent_clock64() argument
141 *ts = persistent_ts; in tegra_read_persistent_clock64()
/linux-4.1.27/tools/perf/tests/
Dswitch-tracking.c16 struct timespec ts; in spin_sleep() local
40 ts.tv_nsec = 50 * 1000 * 1000; in spin_sleep()
41 ts.tv_sec = 0; in spin_sleep()
44 err = nanosleep(&ts, NULL); in spin_sleep()
/linux-4.1.27/include/uapi/linux/
Derrqueue.h33 struct timespec ts[3]; member
/linux-4.1.27/include/linux/spi/
Dmax7301.h34 extern int __max730x_probe(struct max7301 *ts);
/linux-4.1.27/Documentation/filesystems/
Dcoda.txt557 AArrgguummeennttss
584 AArrgguummeennttss
630 AArrgguummeennttss
672 AArrgguummeennttss
704 AArrgguummeennttss
735 AArrgguummeennttss
794 AArrgguummeennttss
836 AArrgguummeennttss
864 AArrgguummeennttss
897 AArrgguummeennttss
[all …]
/linux-4.1.27/net/packet/
Daf_packet.c439 static __u32 tpacket_get_timestamp(struct sk_buff *skb, struct timespec *ts, in tpacket_get_timestamp() argument
446 ktime_to_timespec_cond(shhwtstamps->hwtstamp, ts)) in tpacket_get_timestamp()
449 if (ktime_to_timespec_cond(skb->tstamp, ts)) in tpacket_get_timestamp()
459 struct timespec ts; in __packet_set_timestamp() local
462 if (!(ts_status = tpacket_get_timestamp(skb, &ts, po->tp_tstamp))) in __packet_set_timestamp()
468 h.h1->tp_sec = ts.tv_sec; in __packet_set_timestamp()
469 h.h1->tp_usec = ts.tv_nsec / NSEC_PER_USEC; in __packet_set_timestamp()
472 h.h2->tp_sec = ts.tv_sec; in __packet_set_timestamp()
473 h.h2->tp_nsec = ts.tv_nsec; in __packet_set_timestamp()
816 struct timespec ts; in prb_close_block() local
[all …]
/linux-4.1.27/sound/core/
Dtimer.c400 struct snd_timer_instance *ts; in snd_timer_notify1() local
423 list_for_each_entry(ts, &ti->slave_active_head, active_list) in snd_timer_notify1()
424 if (ts->ccallback) in snd_timer_notify1()
425 ts->ccallback(ts, event + 100, &tstamp, resolution); in snd_timer_notify1()
710 struct snd_timer_instance *ti, *ts, *tmp; in snd_timer_interrupt() local
761 list_for_each_entry(ts, &ti->slave_active_head, active_list) { in snd_timer_interrupt()
762 ts->pticks = ti->pticks; in snd_timer_interrupt()
763 ts->resolution = resolution; in snd_timer_interrupt()
764 if (list_empty(&ts->ack_list)) in snd_timer_interrupt()
765 list_add_tail(&ts->ack_list, ack_list_head); in snd_timer_interrupt()
[all …]

123