Symbol: ts
arch/arc/include/asm/arcregs.h
315
unsigned int pad:6, fbe:2, tqe:2, ts:4, ft:1, rse:2, pte:3, bce:3, ver:8;
arch/arc/include/asm/arcregs.h
317
unsigned int ver:8, bce:3, pte:3, rse:2, ft:1, ts:4, tqe:2, fbe:2, pad:6;
arch/arm/include/asm/vdso/gettimeofday.h
104
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm/include/asm/vdso/gettimeofday.h
42
register struct __kernel_timespec *ts asm("r1") = _ts;
arch/arm/include/asm/vdso/gettimeofday.h
50
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm/include/asm/vdso/gettimeofday.h
60
register struct old_timespec32 *ts asm("r1") = _ts;
arch/arm/include/asm/vdso/gettimeofday.h
68
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm/include/asm/vdso/gettimeofday.h
78
register struct __kernel_timespec *ts asm("r1") = _ts;
arch/arm/include/asm/vdso/gettimeofday.h
86
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm/include/asm/vdso/gettimeofday.h
96
register struct old_timespec32 *ts asm("r1") = _ts;
arch/arm/kernel/sys_oabi-compat.c
370
struct timespec64 ts;
arch/arm/kernel/sys_oabi-compat.c
371
err = get_old_timespec32(&ts, timeout);
arch/arm/kernel/sys_oabi-compat.c
374
err = __do_semtimedop(semid, sops, nsops, &ts, ns);
arch/arm/kernel/time.c
63
static void dummy_clock_access(struct timespec64 *ts)
arch/arm/kernel/time.c
65
ts->tv_sec = 0;
arch/arm/kernel/time.c
66
ts->tv_nsec = 0;
arch/arm/kernel/time.c
71
void read_persistent_clock64(struct timespec64 *ts)
arch/arm/kernel/time.c
73
__read_persistent_clock(ts);
arch/arm/mach-omap1/timer32k.c
191
static void omap_read_persistent_clock64(struct timespec64 *ts)
arch/arm/mach-omap1/timer32k.c
204
*ts = persistent_ts;
arch/arm/vdso/vgettimeofday.c
14
struct old_timespec32 *ts)
arch/arm/vdso/vgettimeofday.c
16
return __cvdso_clock_gettime32(clock, ts);
arch/arm/vdso/vgettimeofday.c
20
struct __kernel_timespec *ts)
arch/arm/vdso/vgettimeofday.c
22
return __cvdso_clock_gettime(clock, ts);
arch/arm/xen/enlighten.c
549
struct timespec64 ts;
arch/arm/xen/enlighten.c
550
xen_read_wallclock(&ts);
arch/arm/xen/enlighten.c
551
do_settimeofday64(&ts);
arch/arm/xen/enlighten.c
78
static void xen_read_wallclock(struct timespec64 *ts)
arch/arm/xen/enlighten.c
96
*ts = timespec64_add(now, ts_monotonic);
arch/arm64/include/asm/vdso/compat_gettimeofday.h
103
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/include/asm/vdso/compat_gettimeofday.h
44
register struct __kernel_timespec *ts asm("r1") = _ts;
arch/arm64/include/asm/vdso/compat_gettimeofday.h
52
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/include/asm/vdso/compat_gettimeofday.h
61
register struct old_timespec32 *ts asm("r1") = _ts;
arch/arm64/include/asm/vdso/compat_gettimeofday.h
69
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/include/asm/vdso/compat_gettimeofday.h
78
register struct __kernel_timespec *ts asm("r1") = _ts;
arch/arm64/include/asm/vdso/compat_gettimeofday.h
86
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/include/asm/vdso/compat_gettimeofday.h
95
register struct old_timespec32 *ts asm("r1") = _ts;
arch/arm64/include/asm/vdso/gettimeofday.h
43
register struct __kernel_timespec *ts asm("x1") = _ts;
arch/arm64/include/asm/vdso/gettimeofday.h
51
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/include/asm/vdso/gettimeofday.h
60
register struct __kernel_timespec *ts asm("x1") = _ts;
arch/arm64/include/asm/vdso/gettimeofday.h
68
: "r" (clkid), "r" (ts), "r" (nr)
arch/arm64/kernel/vdso/vgettimeofday.c
14
struct __kernel_timespec *ts)
arch/arm64/kernel/vdso/vgettimeofday.c
16
return __cvdso_clock_gettime(clock, ts);
arch/arm64/kernel/vdso/vgettimeofday.c
9
int __kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
arch/arm64/kernel/vdso32/vgettimeofday.c
12
struct old_timespec32 *ts)
arch/arm64/kernel/vdso32/vgettimeofday.c
14
return __cvdso_clock_gettime32(clock, ts);
arch/arm64/kernel/vdso32/vgettimeofday.c
18
struct __kernel_timespec *ts)
arch/arm64/kernel/vdso32/vgettimeofday.c
20
return __cvdso_clock_gettime(clock, ts);
arch/loongarch/include/asm/vdso/gettimeofday.h
43
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/loongarch/include/asm/vdso/gettimeofday.h
50
: "r" (nr), "r" (clkid), "r" (ts)
arch/loongarch/include/asm/vdso/gettimeofday.h
62
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/loongarch/include/asm/vdso/gettimeofday.h
69
: "r" (nr), "r" (clkid), "r" (ts)
arch/loongarch/vdso/vgettimeofday.c
10
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/loongarch/vdso/vgettimeofday.c
12
return __cvdso_clock_gettime(clock, ts);
arch/m68k/kernel/time.c
76
void read_persistent_clock64(struct timespec64 *ts)
arch/m68k/kernel/time.c
80
ts->tv_sec = 0;
arch/m68k/kernel/time.c
81
ts->tv_nsec = 0;
arch/m68k/kernel/time.c
88
ts->tv_sec = mktime64(time.tm_year + 1900, time.tm_mon + 1, time.tm_mday,
arch/mips/dec/time.c
22
void read_persistent_clock64(struct timespec64 *ts)
arch/mips/dec/time.c
57
ts->tv_sec = mktime64(year, mon, day, hour, min, sec);
arch/mips/dec/time.c
58
ts->tv_nsec = 0;
arch/mips/include/asm/octeon/cvmx-mixx-defs.h
263
uint64_t ts:1;
arch/mips/include/asm/octeon/cvmx-mixx-defs.h
279
uint64_t ts:1;
arch/mips/include/asm/vdso/gettimeofday.h
109
register struct old_timespec32 *ts asm("a1") = _ts;
arch/mips/include/asm/vdso/gettimeofday.h
118
: "r" (clkid), "r" (ts), "r" (nr)
arch/mips/include/asm/vdso/gettimeofday.h
131
register struct old_timespec32 *ts asm("a1") = _ts;
arch/mips/include/asm/vdso/gettimeofday.h
140
: "r" (clkid), "r" (ts), "r" (nr)
arch/mips/include/asm/vdso/gettimeofday.h
55
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/mips/include/asm/vdso/gettimeofday.h
68
: "r" (clkid), "r" (ts), "r" (nr)
arch/mips/include/asm/vdso/gettimeofday.h
81
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/mips/include/asm/vdso/gettimeofday.h
94
: "r" (clkid), "r" (ts), "r" (nr)
arch/mips/loongson2ef/common/time.c
24
void read_persistent_clock64(struct timespec64 *ts)
arch/mips/loongson2ef/common/time.c
26
ts->tv_sec = mc146818_get_cmos_time();
arch/mips/loongson2ef/common/time.c
27
ts->tv_nsec = 0;
arch/mips/mti-malta/malta-time.c
120
void read_persistent_clock64(struct timespec64 *ts)
arch/mips/mti-malta/malta-time.c
122
ts->tv_sec = mc146818_get_cmos_time();
arch/mips/mti-malta/malta-time.c
123
ts->tv_nsec = 0;
arch/mips/sibyte/swarm/setup.c
77
void read_persistent_clock64(struct timespec64 *ts)
arch/mips/sibyte/swarm/setup.c
95
ts->tv_sec = sec;
arch/mips/sibyte/swarm/setup.c
96
ts->tv_nsec = 0;
arch/mips/vdso/vgettimeofday.c
16
struct old_timespec32 *ts)
arch/mips/vdso/vgettimeofday.c
18
return __cvdso_clock_gettime32(clock, ts);
arch/mips/vdso/vgettimeofday.c
34
struct __kernel_timespec *ts)
arch/mips/vdso/vgettimeofday.c
36
return __cvdso_clock_gettime(clock, ts);
arch/mips/vdso/vgettimeofday.c
39
int __vdso_clock_getres_time64(clockid_t clock, struct __kernel_timespec *ts)
arch/mips/vdso/vgettimeofday.c
41
return __cvdso_clock_getres(clock, ts);
arch/mips/vdso/vgettimeofday.c
47
struct __kernel_timespec *ts)
arch/mips/vdso/vgettimeofday.c
49
return __cvdso_clock_gettime(clock, ts);
arch/nios2/kernel/time.c
339
void read_persistent_clock64(struct timespec64 *ts)
arch/nios2/kernel/time.c
341
ts->tv_sec = mktime64(2007, 1, 1, 0, 0, 0);
arch/nios2/kernel/time.c
342
ts->tv_nsec = 0;
arch/parisc/include/asm/current.h
10
struct task_struct *ts;
arch/parisc/include/asm/current.h
13
asm( "mfctl %%cr30,%0" : "=r" (ts) );
arch/parisc/include/asm/current.h
14
return ts;
arch/parisc/kernel/time.c
184
void read_persistent_clock64(struct timespec64 *ts)
arch/parisc/kernel/time.c
188
ts->tv_sec = tod_data.tod_sec;
arch/parisc/kernel/time.c
189
ts->tv_nsec = tod_data.tod_usec * 1000;
arch/parisc/kernel/time.c
192
ts->tv_sec = 0;
arch/parisc/kernel/time.c
193
ts->tv_nsec = 0;
arch/parisc/kernel/vdso32/vdso32_generic.c
14
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts);
arch/parisc/kernel/vdso32/vdso32_generic.c
15
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts);
arch/parisc/kernel/vdso32/vdso32_generic.c
24
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts)
arch/parisc/kernel/vdso32/vdso32_generic.c
26
return syscall2(__NR_clock_gettime, (long)clock, (long)ts);
arch/parisc/kernel/vdso32/vdso32_generic.c
29
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
arch/parisc/kernel/vdso32/vdso32_generic.c
31
return syscall2(__NR_clock_gettime64, (long)clock, (long)ts);
arch/parisc/kernel/vdso64/vdso64_generic.c
12
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
arch/parisc/kernel/vdso64/vdso64_generic.c
21
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/parisc/kernel/vdso64/vdso64_generic.c
23
return syscall2(__NR_clock_gettime, (long)clock, (long)ts);
arch/powerpc/include/asm/vdso/gettimeofday.h
128
int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts,
arch/powerpc/include/asm/vdso/gettimeofday.h
133
int __c_kernel_clock_gettime(clockid_t clock, struct old_timespec32 *ts,
arch/powerpc/include/asm/vdso/gettimeofday.h
135
int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
arch/powerpc/kernel/time.c
797
static void __read_persistent_clock(struct timespec64 *ts)
arch/powerpc/kernel/time.c
802
ts->tv_nsec = 0;
arch/powerpc/kernel/time.c
811
ts->tv_sec = ppc_md.get_boot_time() - timezone_offset;
arch/powerpc/kernel/time.c
816
ts->tv_sec = 0;
arch/powerpc/kernel/time.c
821
ts->tv_sec = rtc_tm_to_time64(&tm);
arch/powerpc/kernel/time.c
824
void read_persistent_clock64(struct timespec64 *ts)
arch/powerpc/kernel/time.c
826
__read_persistent_clock(ts);
arch/powerpc/kernel/time.c
829
if (ts->tv_sec < 0) {
arch/powerpc/kernel/time.c
830
ts->tv_sec = 0;
arch/powerpc/kernel/time.c
831
ts->tv_nsec = 0;
arch/powerpc/kernel/vdso/vgettimeofday.c
12
return __cvdso_clock_gettime_data(vd, clock, ts);
arch/powerpc/kernel/vdso/vgettimeofday.c
21
int __c_kernel_clock_gettime(clockid_t clock, struct old_timespec32 *ts,
arch/powerpc/kernel/vdso/vgettimeofday.c
24
return __cvdso_clock_gettime32_data(vd, clock, ts);
arch/powerpc/kernel/vdso/vgettimeofday.c
27
int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
arch/powerpc/kernel/vdso/vgettimeofday.c
30
return __cvdso_clock_gettime_data(vd, clock, ts);
arch/powerpc/kernel/vdso/vgettimeofday.c
9
int __c_kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts,
arch/powerpc/kvm/e500.c
236
unsigned int pr, tid, ts;
arch/powerpc/kvm/e500.c
241
ts = get_tlb_ts(gtlbe);
arch/powerpc/kvm/e500.c
257
pid = local_sid_lookup(&idt->id[ts][tid][pr]);
arch/powerpc/kvm/e500.c
259
kvmppc_e500_id_table_reset_one(vcpu_e500, ts, tid, pr);
arch/powerpc/kvm/e500mc.c
59
unsigned int tid, ts;
arch/powerpc/kvm/e500mc.c
64
ts = get_tlb_ts(gtlbe);
arch/powerpc/kvm/e500mc.c
68
val = (tid << 16) | ts;
arch/riscv/include/asm/vdso/gettimeofday.h
35
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/riscv/include/asm/vdso/gettimeofday.h
41
: "r"(clkid), "r"(ts), "r"(nr)
arch/riscv/include/asm/vdso/gettimeofday.h
51
register struct __kernel_timespec *ts asm("a1") = _ts;
arch/riscv/include/asm/vdso/gettimeofday.h
57
: "r"(clkid), "r"(ts), "r"(nr)
arch/riscv/kernel/vdso/vgettimeofday.c
13
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/riscv/kernel/vdso/vgettimeofday.c
15
return __cvdso_clock_gettime(clock, ts);
arch/s390/boot/printk.c
205
char ts[MAX_NUMLEN];
arch/s390/boot/printk.c
208
buf += strpad(buf, MAX_NUMLEN, as_dec(ts, ns / NSEC_PER_SEC, 0), 5, 0, 0);
arch/s390/boot/printk.c
210
buf += strpad(buf, MAX_NUMLEN, as_dec(ts, (ns % NSEC_PER_SEC) / NSEC_PER_USEC, 0), 6, 1, 0);
arch/s390/include/asm/timex.h
108
unsigned int ts : 2;
arch/s390/include/asm/vdso/gettimeofday.h
23
long clock_gettime_fallback(clockid_t clkid, struct __kernel_timespec *ts)
arch/s390/include/asm/vdso/gettimeofday.h
25
return syscall2(__NR_clock_gettime, (long)clkid, (long)ts);
arch/s390/include/asm/vdso/gettimeofday.h
36
long clock_getres_fallback(clockid_t clkid, struct __kernel_timespec *ts)
arch/s390/include/asm/vdso/gettimeofday.h
38
return syscall2(__NR_clock_getres, (long)clkid, (long)ts);
arch/s390/kernel/time.c
196
void read_persistent_clock64(struct timespec64 *ts)
arch/s390/kernel/time.c
204
ext_to_timespec64(&clk, ts);
arch/s390/kernel/vdso/vdso.h
10
int __s390_vdso_clock_getres(clockid_t clock, struct __kernel_timespec *ts);
arch/s390/kernel/vdso/vdso.h
9
int __s390_vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
arch/s390/kernel/vdso/vdso_generic.c
11
int __s390_vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/s390/kernel/vdso/vdso_generic.c
13
return __cvdso_clock_gettime(clock, ts);
arch/s390/kernel/vdso/vdso_generic.c
16
int __s390_vdso_clock_getres(clockid_t clock, struct __kernel_timespec *ts)
arch/s390/kernel/vdso/vdso_generic.c
18
return __cvdso_clock_getres(clock, ts);
arch/sparc/include/asm/vdso/gettimeofday.h
107
long clock_gettime_fallback(clockid_t clock, struct __kernel_timespec *ts)
arch/sparc/include/asm/vdso/gettimeofday.h
111
register long o1 __asm__("o1") = (long) ts;
arch/sparc/include/asm/vdso/gettimeofday.h
121
long clock_gettime_fallback(clockid_t clock, struct __kernel_timespec *ts)
arch/sparc/include/asm/vdso/gettimeofday.h
125
register long o1 __asm__("o1") = (long) ts;
arch/sparc/include/asm/vdso/gettimeofday.h
133
long clock_gettime32_fallback(clockid_t clock, struct old_timespec32 *ts)
arch/sparc/include/asm/vdso/gettimeofday.h
137
register long o1 __asm__("o1") = (long) ts;
arch/sparc/vdso/vclock_gettime.c
33
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/sparc/vdso/vclock_gettime.c
35
return __cvdso_clock_gettime(clock, ts);
arch/sparc/vdso/vclock_gettime.c
43
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts)
arch/sparc/vdso/vclock_gettime.c
45
return __cvdso_clock_gettime32(clock, ts);
arch/sparc/vdso/vclock_gettime.c
51
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
arch/sparc/vdso/vclock_gettime.c
53
return __cvdso_clock_gettime(clock, ts);
arch/um/drivers/rtc_kern.c
35
struct timespec64 ts;
arch/um/drivers/rtc_kern.c
38
read_persistent_clock64(&ts);
arch/um/drivers/rtc_kern.c
39
rtc_time64_to_tm(timespec64_to_ktime(ts) / NSEC_PER_SEC, tm);
arch/um/drivers/rtc_kern.c
54
struct timespec64 ts;
arch/um/drivers/rtc_kern.c
62
read_persistent_clock64(&ts);
arch/um/drivers/rtc_kern.c
63
secs = uml_rtc_alarm_time - ts.tv_sec;
arch/um/drivers/rtc_kern.c
79
ts.tv_nsec);
arch/um/kernel/time.c
954
void read_persistent_clock64(struct timespec64 *ts)
arch/um/kernel/time.c
965
set_normalized_timespec64(ts, nsecs / NSEC_PER_SEC,
arch/um/os-Linux/time.c
105
struct timespec ts;
arch/um/os-Linux/time.c
107
clock_gettime(CLOCK_MONOTONIC,&ts);
arch/um/os-Linux/time.c
108
return timespec_to_ns(&ts);
arch/um/os-Linux/time.c
24
static inline long long timespec_to_ns(const struct timespec *ts)
arch/um/os-Linux/time.c
26
return ((long long) ts->tv_sec * UM_NSEC_PER_SEC) + ts->tv_nsec;
arch/x86/entry/vdso/common/vclock_gettime.c
36
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/x86/entry/vdso/common/vclock_gettime.c
38
return __cvdso_clock_gettime(clock, ts);
arch/x86/entry/vdso/common/vclock_gettime.c
54
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts)
arch/x86/entry/vdso/common/vclock_gettime.c
56
return __cvdso_clock_gettime32(clock, ts);
arch/x86/entry/vdso/common/vclock_gettime.c
62
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
arch/x86/entry/vdso/common/vclock_gettime.c
64
return __cvdso_clock_gettime(clock, ts);
arch/x86/entry/vdso/common/vclock_gettime.c
78
int __vdso_clock_getres_time64(clockid_t clock, struct __kernel_timespec *ts)
arch/x86/entry/vdso/common/vclock_gettime.c
80
return __cvdso_clock_getres(clock, ts);
arch/x86/include/asm/pvclock.h
17
struct timespec64 *ts);
arch/x86/include/asm/x86_init.h
321
void (*get_wallclock)(struct timespec64 *ts);
arch/x86/include/asm/x86_init.h
322
int (*set_wallclock)(const struct timespec64 *ts);
arch/x86/kernel/pvclock.c
125
struct timespec64 *ts)
arch/x86/kernel/pvclock.c
153
set_normalized_timespec64(ts, now.tv_sec, now.tv_nsec);
arch/x86/kernel/rtc.c
108
void read_persistent_clock64(struct timespec64 *ts)
arch/x86/kernel/rtc.c
110
x86_platform.get_wallclock(ts);
arch/x86/kvm/x86.c
10258
struct timespec64 ts;
arch/x86/kvm/x86.c
10272
if (!kvm_get_walltime_and_clockread(&ts, &cycle))
arch/x86/kvm/x86.c
10275
clock_pairing.sec = ts.tv_sec;
arch/x86/kvm/x86.c
10276
clock_pairing.nsec = ts.tv_nsec;
arch/x86/kvm/x86.c
2987
static int do_realtime(struct timespec64 *ts, u64 *tsc_timestamp)
arch/x86/kvm/x86.c
2996
ts->tv_sec = gtod->wall_time_sec;
arch/x86/kvm/x86.c
3002
ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
arch/x86/kvm/x86.c
3003
ts->tv_nsec = ns;
arch/x86/kvm/x86.c
3044
static bool kvm_get_walltime_and_clockread(struct timespec64 *ts,
arch/x86/kvm/x86.c
3051
return gtod_is_based_on_tsc(do_realtime(ts, tsc_timestamp));
arch/x86/kvm/x86.c
3200
struct timespec64 ts;
arch/x86/kvm/x86.c
3202
if (kvm_get_walltime_and_clockread(&ts, &data->host_tsc)) {
arch/x86/kvm/x86.c
3203
data->realtime = ts.tv_nsec + NSEC_PER_SEC * ts.tv_sec;
arch/x86/kvm/x86.c
3441
struct timespec64 ts;
arch/x86/kvm/x86.c
3460
!kvm_get_walltime_and_clockread(&ts, &host_tsc))
arch/x86/kvm/x86.c
3485
return ts.tv_nsec + NSEC_PER_SEC * ts.tv_sec -
arch/x86/um/vdso/um_vdso.c
16
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
arch/x86/um/vdso/um_vdso.c
22
: "0" (__NR_clock_gettime), "D" (clock), "S" (ts)
arch/x86/xen/time.c
79
static void xen_read_wallclock(struct timespec64 *ts)
arch/x86/xen/time.c
86
pvclock_read_wallclock(wall_clock, vcpu_time, ts);
arch/xtensa/kernel/smp.c
193
static int boot_secondary(unsigned int cpu, struct task_struct *ts)
drivers/accel/habanalabs/common/command_submission.c
109
u64 seq, ktime_t *ts, int *error)
drivers/accel/habanalabs/common/command_submission.c
118
*ts = node->ts;
drivers/accel/habanalabs/common/command_submission.c
59
u64 seq, ktime_t ts, int error)
drivers/accel/habanalabs/common/command_submission.c
99
node->ts = ts;
drivers/accel/habanalabs/common/habanalabs.h
1869
ktime_t ts;
drivers/accel/qaic/qaic_timesync.c
264
struct timespec64 ts;
drivers/accel/qaic/qaic_timesync.c
284
ktime_get_real_ts64(&ts);
drivers/accel/qaic/qaic_timesync.c
285
req->data.tv_sec = cpu_to_le64(ts.tv_sec);
drivers/accel/qaic/qaic_timesync.c
286
req->data.tv_usec = cpu_to_le64(div_u64(ts.tv_nsec, NSEC_PER_USEC));
drivers/ata/ahci_dwc.c
215
u32 port, dmacr, ts;
drivers/ata/ahci_dwc.c
231
if (!of_property_read_u32(child, "snps,tx-ts-max", &ts)) {
drivers/ata/ahci_dwc.c
232
ts = ilog2(ts);
drivers/ata/ahci_dwc.c
234
dmacr |= FIELD_PREP(AHCI_DWC_PORT_TXTS_MASK, ts);
drivers/ata/ahci_dwc.c
237
if (!of_property_read_u32(child, "snps,rx-ts-max", &ts)) {
drivers/ata/ahci_dwc.c
238
ts = ilog2(ts);
drivers/ata/ahci_dwc.c
240
dmacr |= FIELD_PREP(AHCI_DWC_PORT_RXTS_MASK, ts);
drivers/bluetooth/btintel_pcie.c
665
char ts[128];
drivers/bluetooth/btintel_pcie.c
715
snprintf(ts, sizeof(ts), "Dump Time: %02d-%02d-%04ld %02d:%02d:%02d",
drivers/bluetooth/btintel_pcie.c
732
sizeof(*tlv) + strlen(ts) +
drivers/bluetooth/btintel_pcie.c
767
p = btintel_pcie_copy_tlv(p, BTINTEL_DUMP_TIME, ts, strlen(ts));
drivers/bus/imx-weim.c
148
struct cs_timing_state *ts;
drivers/bus/imx-weim.c
158
ts = &priv->timing_state;
drivers/bus/imx-weim.c
185
cst = &ts->cs[cs_idx];
drivers/char/ppdev.c
371
struct timespec64 ts;
drivers/char/ppdev.c
643
jiffies_to_timespec64(pp->pdev->timeout, &ts);
drivers/char/ppdev.c
644
time32[0] = ts.tv_sec;
drivers/char/ppdev.c
645
time32[1] = ts.tv_nsec / NSEC_PER_USEC;
drivers/char/ppdev.c
653
jiffies_to_timespec64(pp->pdev->timeout, &ts);
drivers/char/ppdev.c
654
time64[0] = ts.tv_sec;
drivers/char/ppdev.c
655
time64[1] = ts.tv_nsec / NSEC_PER_USEC;
drivers/clocksource/arm_arch_timer.c
1253
int kvm_arch_ptp_get_crosststamp(u64 *cycle, struct timespec64 *ts,
drivers/clocksource/arm_arch_timer.c
1279
*ts = ktime_to_timespec64(ktime);
drivers/clocksource/timer-realtek.c
36
u64 ts;
drivers/clocksource/timer-realtek.c
41
ts = ((u64)high << 32) | low;
drivers/clocksource/timer-realtek.c
43
return ts;
drivers/crypto/intel/qat/qat_common/adf_clock.c
23
static inline u64 timespec_to_us(const struct timespec64 *ts)
drivers/crypto/intel/qat/qat_common/adf_clock.c
25
return (u64)DIV_ROUND_CLOSEST_ULL(timespec64_to_ns(ts), NSEC_PER_USEC);
drivers/crypto/intel/qat/qat_common/adf_clock.c
28
static inline u64 timespec_to_ms(const struct timespec64 *ts)
drivers/crypto/intel/qat/qat_common/adf_clock.c
30
return (u64)DIV_ROUND_CLOSEST_ULL(timespec64_to_ns(ts), NSEC_PER_MSEC);
drivers/crypto/intel/qat/qat_common/adf_clock.c
35
struct timespec64 ts;
drivers/crypto/intel/qat/qat_common/adf_clock.c
37
ktime_get_real_ts64(&ts);
drivers/crypto/intel/qat/qat_common/adf_clock.c
38
return timespec_to_ms(&ts);
drivers/dma-buf/sync_file.c
369
struct sync_set_deadline ts;
drivers/dma-buf/sync_file.c
371
if (copy_from_user(&ts, (void __user *)arg, sizeof(ts)))
drivers/dma-buf/sync_file.c
374
if (ts.pad)
drivers/dma-buf/sync_file.c
377
dma_fence_set_deadline(sync_file->fence, ns_to_ktime(ts.deadline_ns));
drivers/firewire/core-cdev.c
1272
struct timespec64 ts = {0, 0};
drivers/firewire/core-cdev.c
1283
case CLOCK_REALTIME: ktime_get_real_ts64(&ts); break;
drivers/firewire/core-cdev.c
1284
case CLOCK_MONOTONIC: ktime_get_ts64(&ts); break;
drivers/firewire/core-cdev.c
1285
case CLOCK_MONOTONIC_RAW: ktime_get_raw_ts64(&ts); break;
drivers/firewire/core-cdev.c
1290
a->tv_sec = ts.tv_sec;
drivers/firewire/core-cdev.c
1291
a->tv_nsec = ts.tv_nsec;
drivers/firmware/arm_scmi/driver.c
1085
ktime_t ts;
drivers/firmware/arm_scmi/driver.c
1087
ts = ktime_get_boottime();
drivers/firmware/arm_scmi/driver.c
1113
xfer->hdr.id, xfer->rx.buf, xfer->rx.len, ts);
drivers/firmware/arm_scmi/notify.c
584
const void *buf, size_t len, ktime_t ts)
drivers/firmware/arm_scmi/notify.c
605
proto_id, evt_id, ktime_to_ns(ts));
drivers/firmware/arm_scmi/notify.c
609
eh.timestamp = ts;
drivers/firmware/arm_scmi/notify.h
92
const void *buf, size_t len, ktime_t ts);
drivers/gpio/gpio-max7300.c
33
struct max7301 *ts;
drivers/gpio/gpio-max7300.c
39
ts = devm_kzalloc(&client->dev, sizeof(struct max7301), GFP_KERNEL);
drivers/gpio/gpio-max7300.c
40
if (!ts)
drivers/gpio/gpio-max7300.c
43
ts->read = max7300_i2c_read;
drivers/gpio/gpio-max7300.c
44
ts->write = max7300_i2c_write;
drivers/gpio/gpio-max7300.c
45
ts->dev = &client->dev;
drivers/gpio/gpio-max7300.c
47
return __max730x_probe(ts);
drivers/gpio/gpio-max7301.c
46
struct max7301 *ts;
drivers/gpio/gpio-max7301.c
55
ts = devm_kzalloc(&spi->dev, sizeof(struct max7301), GFP_KERNEL);
drivers/gpio/gpio-max7301.c
56
if (!ts)
drivers/gpio/gpio-max7301.c
59
ts->read = max7301_spi_read;
drivers/gpio/gpio-max7301.c
60
ts->write = max7301_spi_write;
drivers/gpio/gpio-max7301.c
61
ts->dev = &spi->dev;
drivers/gpio/gpio-max7301.c
63
ret = __max730x_probe(ts);
drivers/gpio/gpio-max730x.c
101
config = &ts->port_config[offset >> 2];
drivers/gpio/gpio-max730x.c
103
mutex_lock(&ts->lock);
drivers/gpio/gpio-max730x.c
108
ret = __max7301_set(ts, offset, value);
drivers/gpio/gpio-max730x.c
111
ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config);
drivers/gpio/gpio-max730x.c
113
mutex_unlock(&ts->lock);
drivers/gpio/gpio-max730x.c
120
struct max7301 *ts = gpiochip_get_data(chip);
drivers/gpio/gpio-max730x.c
126
mutex_lock(&ts->lock);
drivers/gpio/gpio-max730x.c
128
config = (ts->port_config[offset >> 2] >> ((offset & 3) << 1))
drivers/gpio/gpio-max730x.c
134
level = !!(ts->out_level & (1 << offset));
drivers/gpio/gpio-max730x.c
139
level = ts->read(ts->dev, 0x20 + offset) & 0x01;
drivers/gpio/gpio-max730x.c
141
mutex_unlock(&ts->lock);
drivers/gpio/gpio-max730x.c
148
struct max7301 *ts = gpiochip_get_data(chip);
drivers/gpio/gpio-max730x.c
154
mutex_lock(&ts->lock);
drivers/gpio/gpio-max730x.c
156
ret = __max7301_set(ts, offset, value);
drivers/gpio/gpio-max730x.c
158
mutex_unlock(&ts->lock);
drivers/gpio/gpio-max730x.c
163
int __max730x_probe(struct max7301 *ts)
drivers/gpio/gpio-max730x.c
165
struct device *dev = ts->dev;
drivers/gpio/gpio-max730x.c
171
ret = devm_mutex_init(ts->dev, &ts->lock);
drivers/gpio/gpio-max730x.c
175
dev_set_drvdata(dev, ts);
drivers/gpio/gpio-max730x.c
178
ts->write(dev, 0x04, 0x01);
drivers/gpio/gpio-max730x.c
181
ts->input_pullup_active = pdata->input_pullup_active;
drivers/gpio/gpio-max730x.c
182
ts->chip.base = pdata->base;
drivers/gpio/gpio-max730x.c
184
ts->chip.base = -1;
drivers/gpio/gpio-max730x.c
186
ts->chip.label = dev->driver->name;
drivers/gpio/gpio-max730x.c
188
ts->chip.direction_input = max7301_direction_input;
drivers/gpio/gpio-max730x.c
189
ts->chip.get = max7301_get;
drivers/gpio/gpio-max730x.c
190
ts->chip.direction_output = max7301_direction_output;
drivers/gpio/gpio-max730x.c
191
ts->chip.set = max7301_set;
drivers/gpio/gpio-max730x.c
193
ts->chip.ngpio = PIN_NUMBER;
drivers/gpio/gpio-max730x.c
194
ts->chip.can_sleep = true;
drivers/gpio/gpio-max730x.c
195
ts->chip.parent = dev;
drivers/gpio/gpio-max730x.c
196
ts->chip.owner = THIS_MODULE;
drivers/gpio/gpio-max730x.c
210
ts->port_config[i] = 0xAA;
drivers/gpio/gpio-max730x.c
213
ret = max7301_direction_input(&ts->chip, offset);
drivers/gpio/gpio-max730x.c
219
return devm_gpiochip_add_data(ts->dev, &ts->chip, ts);
drivers/gpio/gpio-max730x.c
225
struct max7301 *ts = dev_get_drvdata(dev);
drivers/gpio/gpio-max730x.c
228
ts->write(dev, 0x04, 0x00);
drivers/gpio/gpio-max730x.c
50
struct max7301 *ts = container_of(chip, struct max7301, chip);
drivers/gpio/gpio-max730x.c
59
config = &ts->port_config[offset >> 2];
drivers/gpio/gpio-max730x.c
61
if (ts->input_pullup_active & BIT(offset))
drivers/gpio/gpio-max730x.c
66
mutex_lock(&ts->lock);
drivers/gpio/gpio-max730x.c
71
ret = ts->write(ts->dev, 0x08 + (offset >> 2), *config);
drivers/gpio/gpio-max730x.c
73
mutex_unlock(&ts->lock);
drivers/gpio/gpio-max730x.c
78
static int __max7301_set(struct max7301 *ts, unsigned offset, int value)
drivers/gpio/gpio-max730x.c
81
ts->out_level |= 1 << offset;
drivers/gpio/gpio-max730x.c
82
return ts->write(ts->dev, 0x20 + offset, 0x01);
drivers/gpio/gpio-max730x.c
84
ts->out_level &= ~(1 << offset);
drivers/gpio/gpio-max730x.c
85
return ts->write(ts->dev, 0x20 + offset, 0x00);
drivers/gpio/gpio-max730x.c
92
struct max7301 *ts = container_of(chip, struct max7301, chip);
drivers/gpio/gpiolib-cdev.c
662
static enum hte_return process_hw_ts(struct hte_ts_data *ts, void *p)
drivers/gpio/gpiolib-cdev.c
668
if (!ts || !p)
drivers/gpio/gpiolib-cdev.c
672
line->timestamp_ns = ts->tsc;
drivers/gpio/gpiolib-cdev.c
673
line->raw_level = ts->raw_level;
drivers/gpio/gpiolib-cdev.c
678
line->last_seqno = ts->seq;
drivers/gpio/gpiolib-cdev.c
682
if (unlikely(ts->seq < line->line_seqno))
drivers/gpio/gpiolib-cdev.c
685
diff_seqno = ts->seq - line->line_seqno;
drivers/gpio/gpiolib-cdev.c
686
line->line_seqno = ts->seq;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
2802
if (!data->bps[i].ts)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
2855
if (!output->records[i].ts)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
1054
uint64_t ts, end_idx;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
1075
ret = amdgpu_ras_smu_get_timestamp(adev, i, &ts);
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
1082
record[i - rec_idx].ts = ts;
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
1375
record.ts,
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
538
tmp = cpu_to_le64(record->ts);
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
567
record->ts = le64_to_cpu(tmp);
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
134
uint64_t ts;
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c
432
err_rec->ts = (uint64_t)ktime_get_real_seconds();
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
2990
uint64_t ts, bool write_fault)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
3023
node_id, addr >> PAGE_SHIFT, ts, write_fault))
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
592
u32 vmid, u32 node_id, uint64_t addr, uint64_t ts,
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
284
ktime_t ts)
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
287
KFD_EVENT_FMT_PAGEFAULT_START(ktime_to_ns(ts),
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.h
37
ktime_t ts);
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
3049
uint64_t addr, uint64_t ts, bool write_fault)
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
3121
if (amdgpu_ih_ts_after_or_equal(ts, svms->checkpoint_ts[gpuidx])) {
drivers/gpu/drm/amd/amdkfd/kfd_svm.h
176
uint32_t vmid, uint32_t node_id, uint64_t addr, uint64_t ts,
drivers/gpu/drm/amd/amdkfd/kfd_svm.h
227
uint64_t addr, uint64_t ts, bool write_fault)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
204
static enum dc_status convert_trng_ptn_to_trng_stg(enum dc_dp_training_pattern tps, enum dpia_set_config_ts *ts)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
210
*ts = DPIA_TS_TPS1;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
213
*ts = DPIA_TS_TPS2;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
216
*ts = DPIA_TS_TPS3;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
219
*ts = DPIA_TS_TPS4;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
222
*ts = DPIA_TS_DPRX_DONE;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
226
*ts = DPIA_TS_DPRX_DONE;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
306
enum dpia_set_config_ts ts;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
347
status = convert_trng_ptn_to_trng_stg(lt_settings->pattern_for_cr, &ts);
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
355
ts);
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
603
enum dpia_set_config_ts ts;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
625
status = convert_trng_ptn_to_trng_stg(tr_pattern, &ts);
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
633
ts);
drivers/gpu/drm/amd/ras/rascore/ras.h
251
uint64_t ts;
drivers/gpu/drm/amd/ras/rascore/ras_cmd.c
62
ras_cmd_record->ts = record->ts;
drivers/gpu/drm/amd/ras/rascore/ras_cmd.h
227
uint64_t ts;
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c
516
tmp = cpu_to_le64(record->ts);
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c
545
record->ts = le64_to_cpu(tmp);
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.h
150
uint64_t ts;
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c
272
u64 mca, ipid, ts;
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c
291
ret = ras_fw_get_timestamp(ras_core, i, &ts);
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c
299
record_umc[i - rec_idx].ts = ts;
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c
319
ras_ecc[i - rec_idx].ts = ts;
drivers/gpu/drm/amd/ras/rascore/ras_umc.c
715
err_rec->ts = ras_umc_get_eeprom_timestamp(ras_core);
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c
376
if (ras_fw_eeprom_supported(ras_core) && bank->ts)
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c
377
record->ts = bank->ts;
drivers/gpu/drm/bridge/synopsys/dw-dp.c
1227
u32 ts, hblank_interval;
drivers/gpu/drm/bridge/synopsys/dw-dp.c
1302
ts = peak_stream_bandwidth * 64 / link_bandwidth;
drivers/gpu/drm/bridge/synopsys/dw-dp.c
1303
average_bytes_per_tu = ts / 1000;
drivers/gpu/drm/bridge/synopsys/dw-dp.c
1304
average_bytes_per_tu_frac = ts / 100 - average_bytes_per_tu * 10;
drivers/gpu/drm/drm_vblank.c
1722
struct timespec64 ts;
drivers/gpu/drm/drm_vblank.c
1730
ts = ktime_to_timespec64(now);
drivers/gpu/drm/drm_vblank.c
1731
reply->tval_sec = (u32)ts.tv_sec;
drivers/gpu/drm/drm_vblank.c
1732
reply->tval_usec = ts.tv_nsec / 1000;
drivers/gpu/drm/etnaviv/etnaviv_drv.h
104
struct timespec64 ts, to = {
drivers/gpu/drm/etnaviv/etnaviv_drv.h
109
ktime_get_ts64(&ts);
drivers/gpu/drm/etnaviv/etnaviv_drv.h
112
if (timespec64_compare(&to, &ts) <= 0)
drivers/gpu/drm/etnaviv/etnaviv_drv.h
115
ts = timespec64_sub(to, ts);
drivers/gpu/drm/etnaviv/etnaviv_drv.h
117
return timespec64_to_jiffies(&ts);
drivers/gpu/drm/i915/i915_gpu_error.c
896
struct timespec64 ts;
drivers/gpu/drm/i915/i915_gpu_error.c
903
ts = ktime_to_timespec64(error->time);
drivers/gpu/drm/i915/i915_gpu_error.c
905
(s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
drivers/gpu/drm/i915/i915_gpu_error.c
906
ts = ktime_to_timespec64(error->boottime);
drivers/gpu/drm/i915/i915_gpu_error.c
908
(s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
drivers/gpu/drm/i915/i915_gpu_error.c
909
ts = ktime_to_timespec64(error->uptime);
drivers/gpu/drm/i915/i915_gpu_error.c
911
(s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC);
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
668
ktime_to_ns(fevent->ts));
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
693
crtc->base.id, ktime_to_ns(fevent->ts));
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
746
fevent->ts = ktime_get();
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
114
ktime_t ts;
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
219
static int rpi_touchscreen_i2c_read(struct rpi_touchscreen *ts, u8 reg)
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
221
return i2c_smbus_read_byte_data(ts->i2c, reg);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
224
static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts,
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
229
ret = i2c_smbus_write_byte_data(ts->i2c, reg, val);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
231
dev_err(&ts->i2c->dev, "I2C write failed: %d\n", ret);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
234
static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val)
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
245
mipi_dsi_generic_write(ts->dsi, msg, sizeof(msg));
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
252
struct rpi_touchscreen *ts = panel_to_ts(panel);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
254
rpi_touchscreen_i2c_write(ts, REG_PWM, 0);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
256
rpi_touchscreen_i2c_write(ts, REG_POWERON, 0);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
269
struct rpi_touchscreen *ts = panel_to_ts(panel);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
272
rpi_touchscreen_i2c_write(ts, REG_POWERON, 1);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
275
if (rpi_touchscreen_i2c_read(ts, REG_PORTB) & 1)
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
279
rpi_touchscreen_write(ts, DSI_LANEENABLE,
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
282
rpi_touchscreen_write(ts, PPI_D0S_CLRSIPOCOUNT, 0x05);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
283
rpi_touchscreen_write(ts, PPI_D1S_CLRSIPOCOUNT, 0x05);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
284
rpi_touchscreen_write(ts, PPI_D0S_ATMR, 0x00);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
285
rpi_touchscreen_write(ts, PPI_D1S_ATMR, 0x00);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
286
rpi_touchscreen_write(ts, PPI_LPTXTIMECNT, 0x03);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
288
rpi_touchscreen_write(ts, SPICMR, 0x00);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
289
rpi_touchscreen_write(ts, LCDCTRL, 0x00100150);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
290
rpi_touchscreen_write(ts, SYSCTRL, 0x040f);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
293
rpi_touchscreen_write(ts, PPI_STARTPPI, 0x01);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
294
rpi_touchscreen_write(ts, DSI_STARTDSI, 0x01);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
302
struct rpi_touchscreen *ts = panel_to_ts(panel);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
305
rpi_touchscreen_i2c_write(ts, REG_PWM, 255);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
312
rpi_touchscreen_i2c_write(ts, REG_PORTA, BIT(2));
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
366
struct rpi_touchscreen *ts;
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
376
ts = devm_drm_panel_alloc(dev, __typeof(*ts), base,
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
380
if (IS_ERR(ts))
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
381
return PTR_ERR(ts);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
383
i2c_set_clientdata(i2c, ts);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
385
ts->i2c = i2c;
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
387
ver = rpi_touchscreen_i2c_read(ts, REG_ID);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
403
rpi_touchscreen_i2c_write(ts, REG_POWERON, 0);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
427
ts->dsi = mipi_dsi_device_register_full(host, &info);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
428
if (IS_ERR(ts->dsi)) {
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
430
PTR_ERR(ts->dsi));
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
431
return PTR_ERR(ts->dsi);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
437
drm_panel_add(&ts->base);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
448
struct rpi_touchscreen *ts = i2c_get_clientdata(i2c);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
450
mipi_dsi_detach(ts->dsi);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
452
drm_panel_remove(&ts->base);
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
454
mipi_dsi_device_unregister(ts->dsi);
drivers/gpu/drm/scheduler/sched_rq.c
254
ktime_t ts;
drivers/gpu/drm/scheduler/sched_rq.c
274
ts = drm_sched_rq_get_min_vruntime(rq);
drivers/gpu/drm/scheduler/sched_rq.c
275
ts = drm_sched_entity_restore_vruntime(entity, ts, rq->head_prio);
drivers/gpu/drm/scheduler/sched_rq.c
276
drm_sched_rq_update_tree_locked(entity, rq, ts);
drivers/gpu/drm/scheduler/sched_rq.c
331
ktime_t ts;
drivers/gpu/drm/scheduler/sched_rq.c
333
ts = drm_sched_entity_update_vruntime(entity);
drivers/gpu/drm/scheduler/sched_rq.c
334
drm_sched_rq_update_tree_locked(entity, rq, ts);
drivers/gpu/drm/scheduler/sched_rq.c
67
ktime_t ts)
drivers/gpu/drm/scheduler/sched_rq.c
79
entity->oldest_job_waiting = ts;
drivers/gpu/drm/vmwgfx/device_include/svga3d_types.h
1391
SVGADXTimestampQueryResult ts;
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
551
struct timespec64 ts;
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
553
ts = ktime_to_timespec64(f->timestamp);
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
555
*eaction->tv_sec = ts.tv_sec;
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
556
*eaction->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/gpu/drm/xe/xe_devcoredump.c
107
ts = ktime_to_timespec64(ss->snapshot_time);
drivers/gpu/drm/xe/xe_devcoredump.c
108
drm_printf(&p, "Snapshot time: %ptSp\n", &ts);
drivers/gpu/drm/xe/xe_devcoredump.c
109
ts = ktime_to_timespec64(ss->boot_time);
drivers/gpu/drm/xe/xe_devcoredump.c
110
drm_printf(&p, "Uptime: %ptSp\n", &ts);
drivers/gpu/drm/xe/xe_devcoredump.c
90
struct timespec64 ts;
drivers/hid/hid-goodix-spi.c
112
static void *goodix_get_event_report(struct goodix_ts_data *ts, u32 addr,
drivers/hid/hid-goodix-spi.c
115
struct spi_device *spi = to_spi_device(&ts->spi->dev);
drivers/hid/hid-goodix-spi.c
133
dev_err(ts->dev, "spi transfer error: %d", error);
drivers/hid/hid-goodix-spi.c
140
static int goodix_spi_read(struct goodix_ts_data *ts, u32 addr,
drivers/hid/hid-goodix-spi.c
143
struct spi_device *spi = to_spi_device(&ts->spi->dev);
drivers/hid/hid-goodix-spi.c
148
if (GOODIX_SPI_READ_PREFIX_LEN + len > sizeof(ts->xfer_buf)) {
drivers/hid/hid-goodix-spi.c
149
dev_err(ts->dev, "read data len exceed limit %zu",
drivers/hid/hid-goodix-spi.c
150
sizeof(ts->xfer_buf) - GOODIX_SPI_READ_PREFIX_LEN);
drivers/hid/hid-goodix-spi.c
155
ts->xfer_buf[0] = GOODIX_SPI_READ_FLAG;
drivers/hid/hid-goodix-spi.c
156
put_unaligned_be32(addr, ts->xfer_buf + GOODIX_SPI_TRANS_PREFIX_LEN);
drivers/hid/hid-goodix-spi.c
160
xfers.tx_buf = ts->xfer_buf;
drivers/hid/hid-goodix-spi.c
161
xfers.rx_buf = ts->xfer_buf;
drivers/hid/hid-goodix-spi.c
167
dev_err(ts->dev, "spi transfer error: %d", error);
drivers/hid/hid-goodix-spi.c
169
memcpy(data, ts->xfer_buf + GOODIX_SPI_READ_PREFIX_LEN, len);
drivers/hid/hid-goodix-spi.c
174
static int goodix_spi_write(struct goodix_ts_data *ts, u32 addr,
drivers/hid/hid-goodix-spi.c
177
struct spi_device *spi = to_spi_device(&ts->spi->dev);
drivers/hid/hid-goodix-spi.c
182
if (GOODIX_SPI_WRITE_PREFIX_LEN + len > sizeof(ts->xfer_buf)) {
drivers/hid/hid-goodix-spi.c
183
dev_err(ts->dev, "write data len exceed limit %zu",
drivers/hid/hid-goodix-spi.c
184
sizeof(ts->xfer_buf) - GOODIX_SPI_WRITE_PREFIX_LEN);
drivers/hid/hid-goodix-spi.c
189
ts->xfer_buf[0] = GOODIX_SPI_WRITE_FLAG;
drivers/hid/hid-goodix-spi.c
190
put_unaligned_be32(addr, ts->xfer_buf + GOODIX_SPI_TRANS_PREFIX_LEN);
drivers/hid/hid-goodix-spi.c
191
memcpy(ts->xfer_buf + GOODIX_SPI_WRITE_PREFIX_LEN, data, len);
drivers/hid/hid-goodix-spi.c
195
xfers.tx_buf = ts->xfer_buf;
drivers/hid/hid-goodix-spi.c
201
dev_err(ts->dev, "spi transfer error: %d", error);
drivers/hid/hid-goodix-spi.c
206
static int goodix_dev_confirm(struct goodix_ts_data *ts)
drivers/hid/hid-goodix-spi.c
212
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/hid/hid-goodix-spi.c
217
error = goodix_spi_write(ts, GOODIX_DEV_CONFIRM_ADDR,
drivers/hid/hid-goodix-spi.c
222
error = goodix_spi_read(ts, GOODIX_DEV_CONFIRM_ADDR,
drivers/hid/hid-goodix-spi.c
233
dev_err(ts->dev, "device confirm failed, rx_buf: %*ph", 8, rx_buf);
drivers/hid/hid-goodix-spi.c
247
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
251
rsize = le16_to_cpu(ts->hid_desc.report_desc_length);
drivers/hid/hid-goodix-spi.c
253
dev_err(ts->dev, "invalid report desc size, %d", rsize);
drivers/hid/hid-goodix-spi.c
261
error = goodix_spi_read(ts, GOODIX_HID_REPORT_DESC_ADDR, rdesc, rsize);
drivers/hid/hid-goodix-spi.c
263
dev_err(ts->dev, "failed get report desc, %d", error);
drivers/hid/hid-goodix-spi.c
269
dev_err(ts->dev, "failed parse report, %d", error);
drivers/hid/hid-goodix-spi.c
297
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
307
if (report_size <= ts->hid_max_event_sz)
drivers/hid/hid-goodix-spi.c
310
ts->event_buf = devm_krealloc(ts->dev, ts->event_buf,
drivers/hid/hid-goodix-spi.c
312
if (!ts->event_buf)
drivers/hid/hid-goodix-spi.c
315
ts->hid_max_event_sz = report_size;
drivers/hid/hid-goodix-spi.c
326
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
328
set_bit(GOODIX_HID_STARTED, &ts->flags);
drivers/hid/hid-goodix-spi.c
334
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
336
clear_bit(GOODIX_HID_STARTED, &ts->flags);
drivers/hid/hid-goodix-spi.c
340
static int goodix_hid_check_ack_status(struct goodix_ts_data *ts, u32 *resp_len)
drivers/hid/hid-goodix-spi.c
353
error = goodix_spi_read(ts, GOODIX_HID_CMD_ADDR,
drivers/hid/hid-goodix-spi.c
358
dev_err(ts->dev, "hrd.size too short: %d", len);
drivers/hid/hid-goodix-spi.c
391
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
392
u16 data_register = le16_to_cpu(ts->hid_desc.data_register);
drivers/hid/hid-goodix-spi.c
393
u16 cmd_register = le16_to_cpu(ts->hid_desc.cmd_register);
drivers/hid/hid-goodix-spi.c
405
error = goodix_spi_read(ts, GOODIX_HID_SIGN_ADDR, buf, len);
drivers/hid/hid-goodix-spi.c
407
dev_err(ts->dev, "failed get win8 sign: %d", error);
drivers/hid/hid-goodix-spi.c
436
error = goodix_spi_write(ts, GOODIX_HID_CMD_ADDR, tmp_buf, tx_len);
drivers/hid/hid-goodix-spi.c
438
dev_err(ts->dev, "failed send read feature cmd, %d", error);
drivers/hid/hid-goodix-spi.c
447
error = goodix_hid_check_ack_status(ts, &response_data_len);
drivers/hid/hid-goodix-spi.c
456
error = goodix_spi_read(ts, GOODIX_HID_CMD_ADDR +
drivers/hid/hid-goodix-spi.c
460
dev_err(ts->dev, "failed read hid response data, %d", error);
drivers/hid/hid-goodix-spi.c
465
dev_err(ts->dev, "incorrect report (%d vs %d expected)",
drivers/hid/hid-goodix-spi.c
491
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
492
u16 data_register = le16_to_cpu(ts->hid_desc.data_register);
drivers/hid/hid-goodix-spi.c
493
u16 cmd_register = le16_to_cpu(ts->hid_desc.cmd_register);
drivers/hid/hid-goodix-spi.c
529
error = goodix_spi_write(ts, GOODIX_HID_CMD_ADDR, tmp_buf, tx_len);
drivers/hid/hid-goodix-spi.c
531
dev_err(ts->dev, "failed send report: %*ph", tx_len, tmp_buf);
drivers/hid/hid-goodix-spi.c
542
struct goodix_ts_data *ts = hid->driver_data;
drivers/hid/hid-goodix-spi.c
545
guard(mutex)(&ts->hid_request_lock);
drivers/hid/hid-goodix-spi.c
574
struct goodix_ts_data *ts = data;
drivers/hid/hid-goodix-spi.c
579
if (!test_bit(GOODIX_HID_STARTED, &ts->flags))
drivers/hid/hid-goodix-spi.c
590
event = goodix_get_event_report(ts, ts->hid_report_addr, ts->event_buf,
drivers/hid/hid-goodix-spi.c
594
dev_err(ts->dev, "failed get coordinate data");
drivers/hid/hid-goodix-spi.c
604
dev_err(ts->dev, "invalid coordinate event package size, %d",
drivers/hid/hid-goodix-spi.c
608
hid_input_report(ts->hid, HID_INPUT_REPORT, pkg->data,
drivers/hid/hid-goodix-spi.c
616
if (report_size >= ts->hid_max_event_sz) {
drivers/hid/hid-goodix-spi.c
617
dev_err(ts->dev, "package size exceed limit %d vs %d",
drivers/hid/hid-goodix-spi.c
618
report_size, ts->hid_max_event_sz);
drivers/hid/hid-goodix-spi.c
623
pkg = goodix_get_event_report(ts, ts->hid_report_addr + sizeof(*event),
drivers/hid/hid-goodix-spi.c
624
ts->event_buf,
drivers/hid/hid-goodix-spi.c
627
dev_err(ts->dev, "failed read attachment data content");
drivers/hid/hid-goodix-spi.c
631
hid_input_report(ts->hid, HID_INPUT_REPORT, pkg->data,
drivers/hid/hid-goodix-spi.c
637
static int goodix_hid_init(struct goodix_ts_data *ts)
drivers/hid/hid-goodix-spi.c
643
error = goodix_spi_read(ts, GOODIX_HID_DESC_ADDR, &ts->hid_desc,
drivers/hid/hid-goodix-spi.c
644
sizeof(ts->hid_desc));
drivers/hid/hid-goodix-spi.c
646
dev_err(ts->dev, "failed get hid desc, %d", error);
drivers/hid/hid-goodix-spi.c
654
hid->driver_data = ts;
drivers/hid/hid-goodix-spi.c
657
hid->dev.parent = &ts->spi->dev;
drivers/hid/hid-goodix-spi.c
659
hid->version = le16_to_cpu(ts->hid_desc.bcd_version);
drivers/hid/hid-goodix-spi.c
660
hid->vendor = le16_to_cpu(ts->hid_desc.vendor_id);
drivers/hid/hid-goodix-spi.c
661
hid->product = le16_to_cpu(ts->hid_desc.product_id);
drivers/hid/hid-goodix-spi.c
667
dev_err(ts->dev, "failed add hid device, %d", error);
drivers/hid/hid-goodix-spi.c
672
ts->hid = hid;
drivers/hid/hid-goodix-spi.c
679
struct goodix_ts_data *ts;
drivers/hid/hid-goodix-spi.c
689
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/hid/hid-goodix-spi.c
690
if (!ts)
drivers/hid/hid-goodix-spi.c
693
mutex_init(&ts->hid_request_lock);
drivers/hid/hid-goodix-spi.c
694
spi_set_drvdata(spi, ts);
drivers/hid/hid-goodix-spi.c
695
ts->spi = spi;
drivers/hid/hid-goodix-spi.c
696
ts->dev = dev;
drivers/hid/hid-goodix-spi.c
697
ts->hid_max_event_sz = GOODIX_SPI_READ_PREFIX_LEN +
drivers/hid/hid-goodix-spi.c
699
ts->event_buf = devm_kmalloc(dev, ts->hid_max_event_sz, GFP_KERNEL);
drivers/hid/hid-goodix-spi.c
700
if (!ts->event_buf)
drivers/hid/hid-goodix-spi.c
703
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
drivers/hid/hid-goodix-spi.c
704
if (IS_ERR(ts->reset_gpio))
drivers/hid/hid-goodix-spi.c
705
return dev_err_probe(dev, PTR_ERR(ts->reset_gpio),
drivers/hid/hid-goodix-spi.c
708
ts->hid_report_addr = GOODIX_HID_REPORT_ADDR;
drivers/hid/hid-goodix-spi.c
709
error = goodix_dev_confirm(ts);
drivers/hid/hid-goodix-spi.c
716
error = goodix_hid_init(ts);
drivers/hid/hid-goodix-spi.c
722
error = devm_request_threaded_irq(&ts->spi->dev, ts->spi->irq,
drivers/hid/hid-goodix-spi.c
724
"goodix_spi_hid", ts);
drivers/hid/hid-goodix-spi.c
726
dev_err(ts->dev, "could not register interrupt, irq = %d, %d",
drivers/hid/hid-goodix-spi.c
727
ts->spi->irq, error);
drivers/hid/hid-goodix-spi.c
734
hid_destroy_device(ts->hid);
drivers/hid/hid-goodix-spi.c
740
struct goodix_ts_data *ts = spi_get_drvdata(spi);
drivers/hid/hid-goodix-spi.c
743
hid_destroy_device(ts->hid);
drivers/hid/hid-goodix-spi.c
746
static int goodix_spi_set_power(struct goodix_ts_data *ts, int power_state)
drivers/hid/hid-goodix-spi.c
754
guard(mutex)(&ts->hid_request_lock);
drivers/hid/hid-goodix-spi.c
755
error = goodix_spi_write(ts, GOODIX_HID_CMD_ADDR, power_control_cmd,
drivers/hid/hid-goodix-spi.c
758
dev_err(ts->dev, "failed set power mode: %s",
drivers/hid/hid-goodix-spi.c
767
struct goodix_ts_data *ts = dev_get_drvdata(dev);
drivers/hid/hid-goodix-spi.c
769
disable_irq(ts->spi->irq);
drivers/hid/hid-goodix-spi.c
770
return goodix_spi_set_power(ts, GOODIX_SPI_POWER_SLEEP);
drivers/hid/hid-goodix-spi.c
775
struct goodix_ts_data *ts = dev_get_drvdata(dev);
drivers/hid/hid-goodix-spi.c
777
enable_irq(ts->spi->irq);
drivers/hid/hid-goodix-spi.c
778
return goodix_spi_set_power(ts, GOODIX_SPI_POWER_ON);
drivers/hid/hid-nvidia-shield.c
1047
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
1071
ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
1092
thunderstrike_destroy(ts);
drivers/hid/hid-nvidia-shield.c
1099
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
1101
ts = container_of(dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
1104
thunderstrike_destroy(ts);
drivers/hid/hid-nvidia-shield.c
1105
timer_delete_sync(&ts->psy_stats_timer);
drivers/hid/hid-nvidia-shield.c
1106
cancel_work_sync(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
301
static inline void thunderstrike_send_hostcmd_request(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
303
struct thunderstrike_hostcmd_req_report *report = ts->req_report_dmabuf;
drivers/hid/hid-nvidia-shield.c
304
struct shield_device *shield_dev = &ts->base;
drivers/hid/hid-nvidia-shield.c
308
ts->req_report_dmabuf,
drivers/hid/hid-nvidia-shield.c
321
struct thunderstrike *ts =
drivers/hid/hid-nvidia-shield.c
326
report = ts->req_report_dmabuf;
drivers/hid/hid-nvidia-shield.c
328
if (test_and_clear_bit(THUNDERSTRIKE_FW_VERSION_UPDATE, &ts->update_flags)) {
drivers/hid/hid-nvidia-shield.c
331
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
334
if (test_and_clear_bit(THUNDERSTRIKE_LED_UPDATE, &ts->update_flags)) {
drivers/hid/hid-nvidia-shield.c
337
report->led.state = ts->led_value;
drivers/hid/hid-nvidia-shield.c
338
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
341
if (test_and_clear_bit(THUNDERSTRIKE_POWER_SUPPLY_STATS_UPDATE, &ts->update_flags)) {
drivers/hid/hid-nvidia-shield.c
344
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
348
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
351
if (test_and_clear_bit(THUNDERSTRIKE_BOARD_INFO_UPDATE, &ts->update_flags)) {
drivers/hid/hid-nvidia-shield.c
354
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
357
if (test_and_clear_bit(THUNDERSTRIKE_HAPTICS_UPDATE, &ts->update_flags)) {
drivers/hid/hid-nvidia-shield.c
362
spin_lock_irqsave(&ts->haptics_update_lock, flags);
drivers/hid/hid-nvidia-shield.c
363
report->haptics.motors = ts->haptics_val;
drivers/hid/hid-nvidia-shield.c
364
spin_unlock_irqrestore(&ts->haptics_update_lock, flags);
drivers/hid/hid-nvidia-shield.c
366
thunderstrike_send_hostcmd_request(ts);
drivers/hid/hid-nvidia-shield.c
370
static inline void thunderstrike_request_firmware_version(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
372
set_bit(THUNDERSTRIKE_FW_VERSION_UPDATE, &ts->update_flags);
drivers/hid/hid-nvidia-shield.c
373
schedule_work(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
376
static inline void thunderstrike_request_board_info(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
378
set_bit(THUNDERSTRIKE_BOARD_INFO_UPDATE, &ts->update_flags);
drivers/hid/hid-nvidia-shield.c
379
schedule_work(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
383
thunderstrike_update_haptics(struct thunderstrike *ts,
drivers/hid/hid-nvidia-shield.c
388
spin_lock_irqsave(&ts->haptics_update_lock, flags);
drivers/hid/hid-nvidia-shield.c
389
ts->haptics_val = *motors;
drivers/hid/hid-nvidia-shield.c
390
spin_unlock_irqrestore(&ts->haptics_update_lock, flags);
drivers/hid/hid-nvidia-shield.c
392
set_bit(THUNDERSTRIKE_HAPTICS_UPDATE, &ts->update_flags);
drivers/hid/hid-nvidia-shield.c
393
schedule_work(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
404
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
410
ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
419
return thunderstrike_update_haptics(ts, &motors);
drivers/hid/hid-nvidia-shield.c
427
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
429
ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
431
return ts->led_state;
drivers/hid/hid-nvidia-shield.c
439
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
441
ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
445
ts->led_value = THUNDERSTRIKE_LED_OFF;
drivers/hid/hid-nvidia-shield.c
448
ts->led_value = THUNDERSTRIKE_LED_ON;
drivers/hid/hid-nvidia-shield.c
452
set_bit(THUNDERSTRIKE_LED_UPDATE, &ts->update_flags);
drivers/hid/hid-nvidia-shield.c
453
schedule_work(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
462
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
465
ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
466
spin_lock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
467
prop_values = ts->psy_stats;
drivers/hid/hid-nvidia-shield.c
468
spin_unlock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
527
static inline void thunderstrike_request_psy_stats(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
529
set_bit(THUNDERSTRIKE_POWER_SUPPLY_STATS_UPDATE, &ts->update_flags);
drivers/hid/hid-nvidia-shield.c
530
schedule_work(&ts->hostcmd_req_work);
drivers/hid/hid-nvidia-shield.c
535
struct thunderstrike *ts =
drivers/hid/hid-nvidia-shield.c
538
thunderstrike_request_psy_stats(ts);
drivers/hid/hid-nvidia-shield.c
593
struct thunderstrike *ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
597
ts->led_state = 0;
drivers/hid/hid-nvidia-shield.c
600
ts->led_state = 1;
drivers/hid/hid-nvidia-shield.c
611
struct thunderstrike *ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
630
spin_lock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
631
ts->psy_stats.voltage_boot = voltage_boot;
drivers/hid/hid-nvidia-shield.c
632
ts->psy_stats.voltage_avg = voltage_avg;
drivers/hid/hid-nvidia-shield.c
633
ts->psy_stats.voltage_min = voltage_min;
drivers/hid/hid-nvidia-shield.c
634
ts->psy_stats.voltage_now = voltage_now;
drivers/hid/hid-nvidia-shield.c
635
ts->psy_stats.capacity = capacity;
drivers/hid/hid-nvidia-shield.c
636
ts->psy_stats.temp = temp;
drivers/hid/hid-nvidia-shield.c
637
spin_unlock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
659
struct thunderstrike *ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
706
spin_lock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
707
ts->psy_stats.charge_type = charge_type;
drivers/hid/hid-nvidia-shield.c
708
ts->psy_stats.status = status;
drivers/hid/hid-nvidia-shield.c
709
spin_unlock(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
720
struct thunderstrike *ts =
drivers/hid/hid-nvidia-shield.c
724
thunderstrike_request_firmware_version(ts);
drivers/hid/hid-nvidia-shield.c
727
thunderstrike_request_board_info(ts);
drivers/hid/hid-nvidia-shield.c
731
thunderstrike_psy_stats_timer_handler(&ts->psy_stats_timer);
drivers/hid/hid-nvidia-shield.c
799
static inline int thunderstrike_led_create(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
801
struct led_classdev *led = &ts->led_dev;
drivers/hid/hid-nvidia-shield.c
803
led->name = devm_kasprintf(&ts->base.hdev->dev, GFP_KERNEL,
drivers/hid/hid-nvidia-shield.c
804
"thunderstrike%d:blue:led", ts->id);
drivers/hid/hid-nvidia-shield.c
812
return led_classdev_register(&ts->base.hdev->dev, led);
drivers/hid/hid-nvidia-shield.c
817
struct thunderstrike *ts = container_of(shield_dev, struct thunderstrike, base);
drivers/hid/hid-nvidia-shield.c
827
ts->psy_stats.capacity = 100;
drivers/hid/hid-nvidia-shield.c
828
ts->psy_stats.temp = 182;
drivers/hid/hid-nvidia-shield.c
836
devm_kasprintf(&ts->base.hdev->dev, GFP_KERNEL,
drivers/hid/hid-nvidia-shield.c
837
"thunderstrike_%d", ts->id);
drivers/hid/hid-nvidia-shield.c
864
struct thunderstrike *ts;
drivers/hid/hid-nvidia-shield.c
867
ts = devm_kzalloc(&hdev->dev, sizeof(*ts), GFP_KERNEL);
drivers/hid/hid-nvidia-shield.c
868
if (!ts)
drivers/hid/hid-nvidia-shield.c
871
ts->req_report_dmabuf = devm_kzalloc(
drivers/hid/hid-nvidia-shield.c
873
if (!ts->req_report_dmabuf)
drivers/hid/hid-nvidia-shield.c
876
shield_dev = &ts->base;
drivers/hid/hid-nvidia-shield.c
880
spin_lock_init(&ts->haptics_update_lock);
drivers/hid/hid-nvidia-shield.c
881
spin_lock_init(&ts->psy_stats_lock);
drivers/hid/hid-nvidia-shield.c
882
INIT_WORK(&ts->hostcmd_req_work, thunderstrike_hostcmd_req_work_handler);
drivers/hid/hid-nvidia-shield.c
886
ts->id = ida_alloc(&thunderstrike_ida, GFP_KERNEL);
drivers/hid/hid-nvidia-shield.c
887
if (ts->id < 0)
drivers/hid/hid-nvidia-shield.c
888
return ERR_PTR(ts->id);
drivers/hid/hid-nvidia-shield.c
890
ts->haptics_dev = shield_haptics_create(shield_dev, thunderstrike_play_effect);
drivers/hid/hid-nvidia-shield.c
891
if (IS_ERR(ts->haptics_dev)) {
drivers/hid/hid-nvidia-shield.c
893
ret = PTR_ERR(ts->haptics_dev);
drivers/hid/hid-nvidia-shield.c
903
ret = thunderstrike_led_create(ts);
drivers/hid/hid-nvidia-shield.c
909
timer_setup(&ts->psy_stats_timer, thunderstrike_psy_stats_timer_handler, 0);
drivers/hid/hid-nvidia-shield.c
917
if (ts->haptics_dev)
drivers/hid/hid-nvidia-shield.c
918
input_unregister_device(ts->haptics_dev);
drivers/hid/hid-nvidia-shield.c
920
ida_free(&thunderstrike_ida, ts->id);
drivers/hid/hid-nvidia-shield.c
924
static void thunderstrike_destroy(struct thunderstrike *ts)
drivers/hid/hid-nvidia-shield.c
926
led_classdev_unregister(&ts->led_dev);
drivers/hid/hid-nvidia-shield.c
927
power_supply_unregister(ts->base.battery_dev.psy);
drivers/hid/hid-nvidia-shield.c
928
if (ts->haptics_dev)
drivers/hid/hid-nvidia-shield.c
929
input_unregister_device(ts->haptics_dev);
drivers/hid/hid-nvidia-shield.c
930
ida_free(&thunderstrike_ida, ts->id);
drivers/hte/hte-tegra194-test.c
60
static enum hte_return process_hw_ts(struct hte_ts_data *ts, void *p)
drivers/hte/hte-tegra194-test.c
65
if (!ts || !p)
drivers/hte/hte-tegra194-test.c
68
if (ts->raw_level < 0)
drivers/hte/hte-tegra194-test.c
72
desc->attr.line_id, ts->seq, ts->tsc,
drivers/hte/hte-tegra194-test.c
73
(ts->raw_level >= 0) ? ((ts->raw_level == 0) ?
drivers/hv/hv_util.c
308
static int hv_get_adj_host_time(struct timespec64 *ts)
drivers/hv/hv_util.c
331
*ts = ns_to_timespec64(reftime_to_ns(newtime));
drivers/hv/hv_util.c
340
struct timespec64 ts;
drivers/hv/hv_util.c
342
if (!hv_get_adj_host_time(&ts))
drivers/hv/hv_util.c
343
do_settimeofday64(&ts);
drivers/hv/hv_util.c
726
static int hv_ptp_settime(struct ptp_clock_info *p, const struct timespec64 *ts)
drivers/hv/hv_util.c
740
static int hv_ptp_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/hv/hv_util.c
742
return hv_get_adj_host_time(ts);
drivers/hwtracing/stm/p_sys-t.c
424
u64 ts = ktime_get_real_ns();
drivers/hwtracing/stm/p_sys-t.c
426
sz = stm_data_write(data, m, c, false, &ts, sizeof(ts));
drivers/iio/accel/adxl313_core.c
1031
s64 ts = iio_get_time_ns(indio_dev);
drivers/iio/accel/adxl313_core.c
1048
ts);
drivers/iio/accel/adxl313_core.c
1058
ts);
drivers/iio/accel/adxl313_core.c
1076
ts);
drivers/iio/accel/adxl313_core.c
1086
ts);
drivers/iio/accel/adxl345_core.c
1679
s64 ts = iio_get_time_ns(indio_dev);
drivers/iio/accel/adxl345_core.c
1690
ts);
drivers/iio/accel/adxl345_core.c
1700
ts);
drivers/iio/accel/adxl345_core.c
1716
ts);
drivers/iio/accel/adxl345_core.c
1724
ts);
drivers/iio/accel/adxl345_core.c
1742
ts);
drivers/iio/accel/adxl345_core.c
1750
ts);
drivers/iio/accel/adxl345_core.c
1762
ts);
drivers/iio/accel/adxl355_core.c
235
aligned_s64 ts;
drivers/iio/accel/bma400_core.c
118
aligned_s64 ts;
drivers/iio/accel/bmc150-accel.h
74
aligned_s64 ts;
drivers/iio/accel/fxls8962af-core.c
1009
s64 ts = iio_get_time_ns(indio_dev);
drivers/iio/accel/fxls8962af-core.c
1023
IIO_EV_TYPE_THRESH, ev_code), ts);
drivers/iio/accel/fxls8962af-core.c
1031
IIO_EV_TYPE_THRESH, ev_code), ts);
drivers/iio/accel/fxls8962af-core.c
1039
IIO_EV_TYPE_THRESH, ev_code), ts);
drivers/iio/accel/fxls8962af-core.c
169
aligned_s64 ts;
drivers/iio/accel/kionix-kx022a.c
307
aligned_s64 ts;
drivers/iio/accel/kxsd9.c
218
aligned_s64 ts;
drivers/iio/accel/mma7455_core.c
62
aligned_s64 ts;
drivers/iio/accel/mma8452.c
1024
s64 ts = iio_get_time_ns(indio_dev);
drivers/iio/accel/mma8452.c
1036
ts);
drivers/iio/accel/mma8452.c
1043
ts);
drivers/iio/accel/mma8452.c
1050
ts);
drivers/iio/accel/mma8452.c
1074
s64 ts = iio_get_time_ns(indio_dev);
drivers/iio/accel/mma8452.c
1081
ts);
drivers/iio/accel/mma8452.c
119
aligned_s64 ts;
drivers/iio/accel/msa311.c
893
aligned_s64 ts;
drivers/iio/adc/ad4691.c
1583
static void ad4691_read_scan(struct iio_dev *indio_dev, s64 ts)
drivers/iio/adc/ad4691.c
1602
iio_push_to_buffers_with_ts(indio_dev, st->vals, sizeof(st->vals), ts);
drivers/iio/adc/ina2xx-adc.c
151
aligned_s64 ts;
drivers/iio/adc/max1118.c
41
aligned_s64 ts;
drivers/iio/adc/max11410.c
146
aligned_s64 ts;
drivers/iio/adc/max1363.c
189
aligned_s64 ts;
drivers/iio/adc/mcp3911.c
129
aligned_s64 ts;
drivers/iio/adc/pac1921.c
361
s64 ts;
drivers/iio/adc/pac1921.c
368
ts = iio_get_time_ns(indio_dev);
drivers/iio/adc/pac1921.c
370
ret = pac1921_check_push_overflow(indio_dev, ts);
drivers/iio/adc/ti-adc081c.c
39
aligned_s64 ts;
drivers/iio/adc/ti-adc084s021.c
31
aligned_s64 ts;
drivers/iio/adc/ti-ads1018.c
555
aligned_s64 ts;
drivers/iio/adc/ti-ads131e08.c
105
aligned_s64 ts;
drivers/iio/adc/ti-tsc2046.c
160
aligned_s64 ts;
drivers/iio/chemical/bme680_core.c
132
aligned_s64 ts;
drivers/iio/chemical/ccs811.c
85
aligned_s64 ts;
drivers/iio/chemical/pms7003.c
79
aligned_s64 ts;
drivers/iio/chemical/scd30_core.c
624
aligned_s64 ts;
drivers/iio/chemical/scd4x.c
670
aligned_s64 ts;
drivers/iio/chemical/sps30.c
114
aligned_s64 ts;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
103
new_chip_period = period / ts->mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
104
inv_update_acc(&ts->chip_period, new_chip_period);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
105
ts->period = ts->mult * ts->chip_period.val;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
110
static void inv_align_timestamp_it(struct inv_sensors_timestamp *ts)
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
112
const int64_t period_min = (int64_t)ts->min_period * ts->mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
113
const int64_t period_max = (int64_t)ts->max_period * ts->mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
119
delta = ts->it.lo - ts->timestamp;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
122
add_max = period_max - (int64_t)ts->period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
123
sub_max = period_min - (int64_t)ts->period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
124
jitter = INV_SENSORS_TIMESTAMP_JITTER((int64_t)ts->period, ts->chip.jitter);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
132
ts->timestamp += adjust;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
135
void inv_sensors_timestamp_interrupt(struct inv_sensors_timestamp *ts,
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
147
it = &ts->it;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
154
valid = inv_update_chip_period(ts, period);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
158
if (ts->timestamp == 0) {
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
160
interval = (int64_t)ts->period * (int64_t)sample_nb;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
161
ts->timestamp = it->up - interval;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
167
inv_align_timestamp_it(ts);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
171
void inv_sensors_timestamp_apply_odr(struct inv_sensors_timestamp *ts,
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
178
if (ts->new_mult == 0)
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
182
ts->mult = ts->new_mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
183
ts->new_mult = 0;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
184
ts->period = ts->mult * ts->chip_period.val;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
192
if (ts->timestamp != 0) {
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
194
fifo_mult = fifo_period / ts->chip.clock_period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
195
fifo_period = fifo_mult * ts->chip_period.val;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
198
ts->timestamp = ts->it.up - interval;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
41
void inv_sensors_timestamp_init(struct inv_sensors_timestamp *ts,
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
44
memset(ts, 0, sizeof(*ts));
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
47
ts->chip = *chip;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
48
ts->min_period = INV_SENSORS_TIMESTAMP_MIN(chip->clock_period, chip->jitter);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
49
ts->max_period = INV_SENSORS_TIMESTAMP_MAX(chip->clock_period, chip->jitter);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
52
ts->mult = chip->init_period / chip->clock_period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
53
ts->period = chip->init_period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
56
inv_update_acc(&ts->chip_period, chip->clock_period);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
60
int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts,
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
66
if (fifo && ts->new_mult != 0)
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
69
mult = period / ts->chip.clock_period;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
70
if (mult != ts->mult)
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
71
ts->new_mult = mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
75
inv_sensors_timestamp_apply_odr(ts, 0, 0, 0);
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
81
static bool inv_validate_period(struct inv_sensors_timestamp *ts, uint32_t period)
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
86
period_min = ts->min_period * ts->mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
87
period_max = ts->max_period * ts->mult;
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
94
static bool inv_update_chip_period(struct inv_sensors_timestamp *ts,
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
99
if (!inv_validate_period(ts, period))
drivers/iio/gyro/adxrs290.c
79
aligned_s64 ts;
drivers/iio/gyro/itg3200_buffer.c
55
aligned_s64 ts;
drivers/iio/humidity/dht11.c
126
t = dht11->edges[offset + 2 * i + 2].ts -
drivers/iio/humidity/dht11.c
127
dht11->edges[offset + 2 * i + 1].ts;
drivers/iio/humidity/dht11.c
175
dht11->edges[dht11->num_edges].ts = ktime_get_boottime_ns();
drivers/iio/humidity/dht11.c
84
struct {s64 ts; int value; } edges[DHT11_EDGES_PER_READ];
drivers/iio/humidity/dht11.c
99
dht11->edges[i].ts - dht11->edges[i - 1].ts,
drivers/iio/humidity/hdc100x.c
47
aligned_s64 ts;
drivers/iio/humidity/hts221.h
43
aligned_s64 ts;
drivers/iio/imu/bmi323/bmi323_core.c
176
aligned_s64 ts;
drivers/iio/imu/inv_icm42600/inv_icm42600.h
200
struct inv_sensors_timestamp ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
1179
inv_sensors_timestamp_init(&accel_st->ts, &ts_chip);
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
1210
struct inv_sensors_timestamp *ts = &accel_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
1234
inv_sensors_timestamp_apply_odr(ts, st->fifo.period,
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
1240
ts_val = inv_sensors_timestamp_pop(ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
639
struct inv_sensors_timestamp *ts = &accel_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
660
ret = inv_sensors_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr),
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
283
struct inv_sensors_timestamp *ts = &sensor_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
288
inv_sensors_timestamp_reset(ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
376
struct inv_sensors_timestamp *ts = &sensor_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
398
inv_sensors_timestamp_apply_odr(ts, 0, 0, 0);
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
503
struct inv_sensors_timestamp *ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
511
ts = &gyro_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
512
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_gyro,
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
521
ts = &accel_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
522
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_accel,
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
537
struct inv_sensors_timestamp *ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
552
ts = &gyro_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
553
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, gyro_ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
560
ts = &accel_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
561
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, accel_ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
913
inv_sensors_timestamp_reset(&gyro_st->ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
914
inv_sensors_timestamp_reset(&accel_st->ts);
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
346
struct inv_sensors_timestamp *ts = &gyro_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
367
ret = inv_sensors_timestamp_update_odr(ts, inv_icm42600_odr_to_period(conf.odr),
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
764
inv_sensors_timestamp_init(&gyro_st->ts, &ts_chip);
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
791
struct inv_sensors_timestamp *ts = &gyro_st->ts;
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
815
inv_sensors_timestamp_apply_odr(ts, st->fifo.period,
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
821
ts_val = inv_sensors_timestamp_pop(ts);
drivers/iio/imu/inv_icm45600/inv_icm45600.h
184
struct inv_sensors_timestamp ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
331
struct inv_sensors_timestamp *ts = &accel_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
336
ret = inv_sensors_timestamp_update_odr(ts, inv_icm45600_odr_to_period(conf.odr),
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
720
inv_sensors_timestamp_init(&accel_st->ts, &ts_chip);
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
746
struct inv_sensors_timestamp *ts = &accel_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
771
inv_sensors_timestamp_apply_odr(ts, st->fifo.period,
drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c
777
ts_val = inv_sensors_timestamp_pop(ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
230
struct inv_sensors_timestamp *ts = &sensor_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
238
inv_sensors_timestamp_reset(ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
459
struct inv_sensors_timestamp *ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
467
ts = &gyro_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
468
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_gyro,
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
477
ts = &accel_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
478
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_accel,
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
493
struct inv_sensors_timestamp *ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
508
ts = &gyro_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
509
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, gyro_ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
516
ts = &accel_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
517
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, accel_ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
857
inv_sensors_timestamp_reset(&gyro_st->ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
858
inv_sensors_timestamp_reset(&accel_st->ts);
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
344
struct inv_sensors_timestamp *ts = &gyro_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
349
ret = inv_sensors_timestamp_update_odr(ts, inv_icm45600_odr_to_period(conf.odr),
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
728
inv_sensors_timestamp_init(&gyro_st->ts, &ts_chip);
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
755
struct inv_sensors_timestamp *ts = &gyro_st->ts;
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
780
inv_sensors_timestamp_apply_odr(ts, st->fifo.period,
drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c
786
ts_val = inv_sensors_timestamp_pop(ts);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
499
aligned_s64 ts;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
388
s64 ts = 0;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
477
ts = data[1] << 16 | data[0] << 8 | data[3];
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
484
if (!reset_ts && ts >= 0xff0000)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
486
ts *= hw->ts_gain;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
502
gyro_sensor->ts_ref + ts);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
516
acc_sensor->ts_ref + ts);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
523
ext_sensor->ts_ref + ts);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
552
__le16 *data, s64 ts)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
601
ts + sensor->ts_ref);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
635
s64 ts = 0;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
680
ts = le32_to_cpu(iio_buff.fifo_ts);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
687
if (!reset_ts && ts >= 0xffff0000)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
689
ts *= hw->ts_gain;
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
693
ts);
drivers/iio/light/acpi-als.c
148
aligned_s64 ts;
drivers/iio/light/adjd_s311.c
121
aligned_s64 ts;
drivers/iio/light/as73211.c
641
aligned_s64 ts;
drivers/iio/light/ltr501.c
1280
aligned_s64 ts;
drivers/iio/light/max44000.c
495
aligned_s64 ts;
drivers/iio/light/opt4060.c
1067
aligned_s64 ts;
drivers/iio/light/rohm-bu27034.c
209
aligned_s64 ts;
drivers/iio/light/rpr0521.c
204
aligned_s64 ts;
drivers/iio/light/st_uvis25_core.c
240
aligned_s64 ts;
drivers/iio/light/vcnl4000.c
1573
aligned_s64 ts;
drivers/iio/magnetometer/ak8974.c
199
aligned_s64 ts;
drivers/iio/magnetometer/ak8975.c
428
aligned_s64 ts;
drivers/iio/magnetometer/mag3110.c
64
aligned_s64 ts;
drivers/iio/magnetometer/yamaha-yas530.c
240
aligned_s64 ts;
drivers/iio/pressure/mprls0025pa.h
77
aligned_s64 ts;
drivers/iio/pressure/ms5611_core.c
216
aligned_s64 ts;
drivers/iio/pressure/rohm-bm1390.c
142
aligned_s64 ts;
drivers/iio/pressure/rohm-bm1390.c
401
buffer[i].ts = data->old_timestamp;
drivers/iio/proximity/hx9023s.c
148
aligned_s64 ts;
drivers/iio/proximity/irsd200.c
765
aligned_s64 ts;
drivers/iio/proximity/isl29501.c
943
aligned_s64 ts;
drivers/iio/proximity/mb1232.c
119
aligned_s64 ts;
drivers/iio/proximity/sx_common.h
128
aligned_s64 ts;
drivers/iio/temperature/tmp006.c
255
aligned_s64 ts;
drivers/infiniband/hw/cxgb4/device.c
130
#define ts2ns(ts) div64_u64((ts) * dev->rdev.lldi.cclk_ps, 1000)
drivers/infiniband/hw/hfi1/mad.c
3825
u64 ts;
drivers/infiniband/hw/hfi1/mad.c
3843
ts = ktime_get_ns() / 1024;
drivers/infiniband/hw/hfi1/mad.c
3844
cong_log->current_time_stamp = cpu_to_be32(ts);
drivers/infiniband/hw/hfi1/mad.c
3855
if ((ts - cce->timestamp) / 2 > U32_MAX)
drivers/infiniband/hw/mthca/mthca_cmd.c
666
int ts = 0, tc = 0;
drivers/infiniband/hw/mthca/mthca_cmd.c
700
ts += 1 << (lg - 10);
drivers/infiniband/hw/mthca/mthca_cmd.c
719
mthca_dbg(dev, "Mapped %d chunks/%d KB for FW.\n", tc, ts);
drivers/infiniband/hw/mthca/mthca_cmd.c
722
mthca_dbg(dev, "Mapped %d chunks/%d KB for ICM aux.\n", tc, ts);
drivers/infiniband/hw/mthca/mthca_cmd.c
726
tc, ts, (unsigned long long) virt - (ts << 10));
drivers/input/evdev.c
146
struct timespec64 ts = ktime_to_timespec64(ev_time[client->clk_type]);
drivers/input/evdev.c
149
ev.input_event_sec = ts.tv_sec;
drivers/input/evdev.c
150
ev.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/input/evdev.c
250
struct timespec64 ts;
drivers/input/evdev.c
256
ts = ktime_to_timespec64(ev_time[client->clk_type]);
drivers/input/evdev.c
257
event.input_event_sec = ts.tv_sec;
drivers/input/evdev.c
258
event.input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/input/keyboard/qt1050.c
223
static bool qt1050_identify(struct qt1050_priv *ts)
drivers/input/keyboard/qt1050.c
229
err = regmap_read(ts->regmap, QT1050_CHIP_ID, &val);
drivers/input/keyboard/qt1050.c
231
dev_err(&ts->client->dev, "Failed to read chip ID: %d\n", err);
drivers/input/keyboard/qt1050.c
236
dev_err(&ts->client->dev, "ID %d not supported\n", val);
drivers/input/keyboard/qt1050.c
241
err = regmap_read(ts->regmap, QT1050_FW_VERSION, &val);
drivers/input/keyboard/qt1050.c
243
dev_err(&ts->client->dev, "could not read the firmware version\n");
drivers/input/keyboard/qt1050.c
247
dev_info(&ts->client->dev, "AT42QT1050 firmware version %1d.%1d\n",
drivers/input/keyboard/qt1050.c
255
struct qt1050_priv *ts = dev_id;
drivers/input/keyboard/qt1050.c
256
struct input_dev *input = ts->input;
drivers/input/keyboard/qt1050.c
262
err = regmap_read(ts->regmap, QT1050_DET_STATUS, &val);
drivers/input/keyboard/qt1050.c
264
dev_err(&ts->client->dev, "Fail to read detection status: %d\n",
drivers/input/keyboard/qt1050.c
270
err = regmap_read(ts->regmap, QT1050_KEY_STATUS, &val);
drivers/input/keyboard/qt1050.c
272
dev_err(&ts->client->dev,
drivers/input/keyboard/qt1050.c
277
changed = ts->last_keys ^ new_keys;
drivers/input/keyboard/qt1050.c
279
changed &= ts->reg_keys;
drivers/input/keyboard/qt1050.c
282
input_report_key(input, ts->keys[i].keycode,
drivers/input/keyboard/qt1050.c
285
ts->last_keys = new_keys;
drivers/input/keyboard/qt1050.c
306
static int qt1050_apply_fw_data(struct qt1050_priv *ts)
drivers/input/keyboard/qt1050.c
308
struct regmap *map = ts->regmap;
drivers/input/keyboard/qt1050.c
309
struct qt1050_key *button = &ts->keys[0];
drivers/input/keyboard/qt1050.c
346
static int qt1050_parse_fw(struct qt1050_priv *ts)
drivers/input/keyboard/qt1050.c
348
struct device *dev = &ts->client->dev;
drivers/input/keyboard/qt1050.c
378
ts->reg_keys |= BIT(button.num);
drivers/input/keyboard/qt1050.c
422
ts->keys[button.num] = button;
drivers/input/keyboard/qt1050.c
430
struct qt1050_priv *ts;
drivers/input/keyboard/qt1050.c
449
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/keyboard/qt1050.c
450
if (!ts)
drivers/input/keyboard/qt1050.c
461
ts->client = client;
drivers/input/keyboard/qt1050.c
462
ts->input = input;
drivers/input/keyboard/qt1050.c
463
ts->regmap = map;
drivers/input/keyboard/qt1050.c
465
i2c_set_clientdata(client, ts);
drivers/input/keyboard/qt1050.c
468
if (!qt1050_identify(ts))
drivers/input/keyboard/qt1050.c
472
err = qt1050_parse_fw(ts);
drivers/input/keyboard/qt1050.c
483
input->keycode = ts->keycodes;
drivers/input/keyboard/qt1050.c
484
input->keycodesize = sizeof(ts->keycodes[0]);
drivers/input/keyboard/qt1050.c
489
ts->keycodes[i] = ts->keys[i].keycode;
drivers/input/keyboard/qt1050.c
490
__set_bit(ts->keycodes[i], input->keybit);
drivers/input/keyboard/qt1050.c
494
err = regmap_update_bits(ts->regmap, QT1050_RES_CAL, 0x7f,
drivers/input/keyboard/qt1050.c
500
err = regmap_read_poll_timeout(ts->regmap, QT1050_DET_STATUS, status,
drivers/input/keyboard/qt1050.c
508
err = regmap_update_bits(ts->regmap, QT1050_RES_CAL,
drivers/input/keyboard/qt1050.c
517
err = qt1050_apply_fw_data(ts);
drivers/input/keyboard/qt1050.c
525
"qt1050", ts);
drivers/input/keyboard/qt1050.c
532
err = regmap_read(ts->regmap, QT1050_DET_STATUS, &status);
drivers/input/keyboard/qt1050.c
539
err = input_register_device(ts->input);
drivers/input/keyboard/qt1050.c
552
struct qt1050_priv *ts = i2c_get_clientdata(client);
drivers/input/keyboard/qt1050.c
561
return regmap_write(ts->regmap, QT1050_LPMODE,
drivers/input/keyboard/qt1050.c
568
struct qt1050_priv *ts = i2c_get_clientdata(client);
drivers/input/keyboard/qt1050.c
573
return regmap_write(ts->regmap, QT1050_LPMODE, 2);
drivers/input/misc/uinput.c
79
struct timespec64 ts;
drivers/input/misc/uinput.c
83
ktime_get_ts64(&ts);
drivers/input/misc/uinput.c
86
.input_event_sec = ts.tv_sec,
drivers/input/misc/uinput.c
87
.input_event_usec = ts.tv_nsec / NSEC_PER_USEC,
drivers/input/touchscreen/ad7877.c
256
struct ad7877 *ts = spi_get_drvdata(spi);
drivers/input/touchscreen/ad7877.c
270
AD7877_POL(ts->stopacq_polarity) |
drivers/input/touchscreen/ad7877.c
272
AD7877_ACQ(ts->acquisition_time) | AD7877_FCD(0);
drivers/input/touchscreen/ad7877.c
284
req->xfer[1].delay.value = ts->vref_delay_usecs;
drivers/input/touchscreen/ad7877.c
290
req->xfer[2].delay.value = ts->vref_delay_usecs;
drivers/input/touchscreen/ad7877.c
298
req->xfer[4].tx_buf = &ts->cmd_crtl2; /*REF OFF*/
drivers/input/touchscreen/ad7877.c
302
req->xfer[5].tx_buf = &ts->cmd_crtl1; /*DEFAULT*/
drivers/input/touchscreen/ad7877.c
319
static int ad7877_process_data(struct ad7877 *ts)
drivers/input/touchscreen/ad7877.c
321
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/ad7877.c
325
x = ts->conversion_data[AD7877_SEQ_XPOS] & MAX_12BIT;
drivers/input/touchscreen/ad7877.c
326
y = ts->conversion_data[AD7877_SEQ_YPOS] & MAX_12BIT;
drivers/input/touchscreen/ad7877.c
327
z1 = ts->conversion_data[AD7877_SEQ_Z1] & MAX_12BIT;
drivers/input/touchscreen/ad7877.c
328
z2 = ts->conversion_data[AD7877_SEQ_Z2] & MAX_12BIT;
drivers/input/touchscreen/ad7877.c
342
Rt = (z2 - z1) * x * ts->x_plate_ohms;
drivers/input/touchscreen/ad7877.c
350
if (Rt > ts->pressure_max)
drivers/input/touchscreen/ad7877.c
353
if (!timer_pending(&ts->timer))
drivers/input/touchscreen/ad7877.c
367
static inline void ad7877_ts_event_release(struct ad7877 *ts)
drivers/input/touchscreen/ad7877.c
369
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/ad7877.c
378
struct ad7877 *ts = timer_container_of(ts, t, timer);
drivers/input/touchscreen/ad7877.c
380
guard(spinlock_irqsave)(&ts->lock);
drivers/input/touchscreen/ad7877.c
381
ad7877_ts_event_release(ts);
drivers/input/touchscreen/ad7877.c
386
struct ad7877 *ts = handle;
drivers/input/touchscreen/ad7877.c
389
error = spi_sync(ts->spi, &ts->msg);
drivers/input/touchscreen/ad7877.c
391
dev_err(&ts->spi->dev, "spi_sync --> %d\n", error);
drivers/input/touchscreen/ad7877.c
395
scoped_guard(spinlock_irqsave, &ts->lock) {
drivers/input/touchscreen/ad7877.c
396
error = ad7877_process_data(ts);
drivers/input/touchscreen/ad7877.c
400
mod_timer(&ts->timer, jiffies + TS_PEN_UP_TIMEOUT);
drivers/input/touchscreen/ad7877.c
409
struct ad7877 *ts = data;
drivers/input/touchscreen/ad7877.c
411
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7877.c
413
if (!ts->disabled) {
drivers/input/touchscreen/ad7877.c
414
ts->disabled = true;
drivers/input/touchscreen/ad7877.c
415
disable_irq(ts->spi->irq);
drivers/input/touchscreen/ad7877.c
417
if (timer_delete_sync(&ts->timer))
drivers/input/touchscreen/ad7877.c
418
ad7877_ts_event_release(ts);
drivers/input/touchscreen/ad7877.c
427
static void ad7877_enable(struct ad7877 *ts)
drivers/input/touchscreen/ad7877.c
429
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7877.c
431
if (ts->disabled) {
drivers/input/touchscreen/ad7877.c
432
ts->disabled = false;
drivers/input/touchscreen/ad7877.c
433
enable_irq(ts->spi->irq);
drivers/input/touchscreen/ad7877.c
440
struct ad7877 *ts = dev_get_drvdata(dev); \
drivers/input/touchscreen/ad7877.c
441
ssize_t v = ad7877_read_adc(ts->spi, \
drivers/input/touchscreen/ad7877.c
460
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
462
return sprintf(buf, "%u\n", ts->disabled);
drivers/input/touchscreen/ad7877.c
469
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
478
ad7877_disable(ts);
drivers/input/touchscreen/ad7877.c
480
ad7877_enable(ts);
drivers/input/touchscreen/ad7877.c
490
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
492
return sprintf(buf, "%u\n", ts->dac);
drivers/input/touchscreen/ad7877.c
499
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
507
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7877.c
508
ts->dac = val & 0xFF;
drivers/input/touchscreen/ad7877.c
509
ad7877_write(ts->spi, AD7877_REG_DAC, (ts->dac << 4) | AD7877_DAC_CONF);
drivers/input/touchscreen/ad7877.c
519
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
521
return sprintf(buf, "%u\n", ts->gpio3);
drivers/input/touchscreen/ad7877.c
528
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
536
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7877.c
537
ts->gpio3 = !!val;
drivers/input/touchscreen/ad7877.c
538
ad7877_write(ts->spi, AD7877_REG_EXTWRITE, AD7877_EXTW_GPIO_DATA |
drivers/input/touchscreen/ad7877.c
539
(ts->gpio4 << 4) | (ts->gpio3 << 5));
drivers/input/touchscreen/ad7877.c
549
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
551
return sprintf(buf, "%u\n", ts->gpio4);
drivers/input/touchscreen/ad7877.c
558
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
566
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7877.c
567
ts->gpio4 = !!val;
drivers/input/touchscreen/ad7877.c
568
ad7877_write(ts->spi, AD7877_REG_EXTWRITE, AD7877_EXTW_GPIO_DATA |
drivers/input/touchscreen/ad7877.c
569
(ts->gpio4 << 4) | (ts->gpio3 << 5));
drivers/input/touchscreen/ad7877.c
613
static void ad7877_setup_ts_def_msg(struct spi_device *spi, struct ad7877 *ts)
drivers/input/touchscreen/ad7877.c
618
ts->cmd_crtl2 = AD7877_WRITEADD(AD7877_REG_CTRL2) |
drivers/input/touchscreen/ad7877.c
619
AD7877_POL(ts->stopacq_polarity) |
drivers/input/touchscreen/ad7877.c
620
AD7877_AVG(ts->averaging) | AD7877_PM(1) |
drivers/input/touchscreen/ad7877.c
621
AD7877_TMR(ts->pen_down_acc_interval) |
drivers/input/touchscreen/ad7877.c
622
AD7877_ACQ(ts->acquisition_time) |
drivers/input/touchscreen/ad7877.c
623
AD7877_FCD(ts->first_conversion_delay);
drivers/input/touchscreen/ad7877.c
625
ad7877_write(spi, AD7877_REG_CTRL2, ts->cmd_crtl2);
drivers/input/touchscreen/ad7877.c
627
ts->cmd_crtl1 = AD7877_WRITEADD(AD7877_REG_CTRL1) |
drivers/input/touchscreen/ad7877.c
631
ad7877_write(spi, AD7877_REG_CTRL1, ts->cmd_crtl1);
drivers/input/touchscreen/ad7877.c
633
ts->cmd_dummy = 0;
drivers/input/touchscreen/ad7877.c
635
m = &ts->msg;
drivers/input/touchscreen/ad7877.c
639
m->context = ts;
drivers/input/touchscreen/ad7877.c
641
ts->xfer[0].tx_buf = &ts->cmd_crtl1;
drivers/input/touchscreen/ad7877.c
642
ts->xfer[0].len = 2;
drivers/input/touchscreen/ad7877.c
643
ts->xfer[0].cs_change = 1;
drivers/input/touchscreen/ad7877.c
645
spi_message_add_tail(&ts->xfer[0], m);
drivers/input/touchscreen/ad7877.c
647
ts->xfer[1].tx_buf = &ts->cmd_dummy; /* Send ZERO */
drivers/input/touchscreen/ad7877.c
648
ts->xfer[1].len = 2;
drivers/input/touchscreen/ad7877.c
649
ts->xfer[1].cs_change = 1;
drivers/input/touchscreen/ad7877.c
651
spi_message_add_tail(&ts->xfer[1], m);
drivers/input/touchscreen/ad7877.c
654
ts->xfer[i + 2].rx_buf = &ts->conversion_data[AD7877_SEQ_YPOS + i];
drivers/input/touchscreen/ad7877.c
655
ts->xfer[i + 2].len = 2;
drivers/input/touchscreen/ad7877.c
657
ts->xfer[i + 2].cs_change = 1;
drivers/input/touchscreen/ad7877.c
658
spi_message_add_tail(&ts->xfer[i + 2], m);
drivers/input/touchscreen/ad7877.c
664
struct ad7877 *ts;
drivers/input/touchscreen/ad7877.c
693
ts = devm_kzalloc(&spi->dev, sizeof(struct ad7877), GFP_KERNEL);
drivers/input/touchscreen/ad7877.c
694
if (!ts)
drivers/input/touchscreen/ad7877.c
701
err = devm_add_action_or_reset(&spi->dev, ad7877_disable, ts);
drivers/input/touchscreen/ad7877.c
705
spi_set_drvdata(spi, ts);
drivers/input/touchscreen/ad7877.c
706
ts->spi = spi;
drivers/input/touchscreen/ad7877.c
707
ts->input = input_dev;
drivers/input/touchscreen/ad7877.c
709
timer_setup(&ts->timer, ad7877_timer, 0);
drivers/input/touchscreen/ad7877.c
710
mutex_init(&ts->mutex);
drivers/input/touchscreen/ad7877.c
711
spin_lock_init(&ts->lock);
drivers/input/touchscreen/ad7877.c
713
ts->model = pdata->model ? : 7877;
drivers/input/touchscreen/ad7877.c
714
ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
drivers/input/touchscreen/ad7877.c
715
ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
drivers/input/touchscreen/ad7877.c
716
ts->pressure_max = pdata->pressure_max ? : ~0;
drivers/input/touchscreen/ad7877.c
718
ts->stopacq_polarity = pdata->stopacq_polarity;
drivers/input/touchscreen/ad7877.c
719
ts->first_conversion_delay = pdata->first_conversion_delay;
drivers/input/touchscreen/ad7877.c
720
ts->acquisition_time = pdata->acquisition_time;
drivers/input/touchscreen/ad7877.c
721
ts->averaging = pdata->averaging;
drivers/input/touchscreen/ad7877.c
722
ts->pen_down_acc_interval = pdata->pen_down_acc_interval;
drivers/input/touchscreen/ad7877.c
724
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&spi->dev));
drivers/input/touchscreen/ad7877.c
727
input_dev->phys = ts->phys;
drivers/input/touchscreen/ad7877.c
761
ad7877_setup_ts_def_msg(spi, ts);
drivers/input/touchscreen/ad7877.c
767
spi->dev.driver->name, ts);
drivers/input/touchscreen/ad7877.c
782
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
784
ad7877_disable(ts);
drivers/input/touchscreen/ad7877.c
791
struct ad7877 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7877.c
793
ad7877_enable(ts);
drivers/input/touchscreen/ad7879.c
136
static int ad7879_read(struct ad7879 *ts, u8 reg)
drivers/input/touchscreen/ad7879.c
141
error = regmap_read(ts->regmap, reg, &val);
drivers/input/touchscreen/ad7879.c
143
dev_err(ts->dev, "failed to read register %#02x: %d\n",
drivers/input/touchscreen/ad7879.c
151
static int ad7879_write(struct ad7879 *ts, u8 reg, u16 val)
drivers/input/touchscreen/ad7879.c
155
error = regmap_write(ts->regmap, reg, val);
drivers/input/touchscreen/ad7879.c
157
dev_err(ts->dev,
drivers/input/touchscreen/ad7879.c
166
static int ad7879_report(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
168
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/ad7879.c
172
x = ts->conversion_data[AD7879_SEQ_XPOS] & MAX_12BIT;
drivers/input/touchscreen/ad7879.c
173
y = ts->conversion_data[AD7879_SEQ_YPOS] & MAX_12BIT;
drivers/input/touchscreen/ad7879.c
174
z1 = ts->conversion_data[AD7879_SEQ_Z1] & MAX_12BIT;
drivers/input/touchscreen/ad7879.c
175
z2 = ts->conversion_data[AD7879_SEQ_Z2] & MAX_12BIT;
drivers/input/touchscreen/ad7879.c
177
if (ts->swap_xy)
drivers/input/touchscreen/ad7879.c
194
Rt = (z2 - z1) * x * ts->x_plate_ohms;
drivers/input/touchscreen/ad7879.c
211
if (timer_pending(&ts->timer)) {
drivers/input/touchscreen/ad7879.c
214
input_report_abs(input_dev, ABS_X, ts->x);
drivers/input/touchscreen/ad7879.c
215
input_report_abs(input_dev, ABS_Y, ts->y);
drivers/input/touchscreen/ad7879.c
216
input_report_abs(input_dev, ABS_PRESSURE, ts->Rt);
drivers/input/touchscreen/ad7879.c
220
ts->x = x;
drivers/input/touchscreen/ad7879.c
221
ts->y = y;
drivers/input/touchscreen/ad7879.c
222
ts->Rt = Rt;
drivers/input/touchscreen/ad7879.c
230
static void ad7879_ts_event_release(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
232
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/ad7879.c
241
struct ad7879 *ts = timer_container_of(ts, t, timer);
drivers/input/touchscreen/ad7879.c
243
ad7879_ts_event_release(ts);
drivers/input/touchscreen/ad7879.c
248
struct ad7879 *ts = handle;
drivers/input/touchscreen/ad7879.c
251
error = regmap_bulk_read(ts->regmap, AD7879_REG_XPLUS,
drivers/input/touchscreen/ad7879.c
252
ts->conversion_data, AD7879_NR_SENSE);
drivers/input/touchscreen/ad7879.c
254
dev_err_ratelimited(ts->dev, "failed to read %#02x: %d\n",
drivers/input/touchscreen/ad7879.c
256
else if (!ad7879_report(ts))
drivers/input/touchscreen/ad7879.c
257
mod_timer(&ts->timer, jiffies + TS_PEN_UP_TIMEOUT);
drivers/input/touchscreen/ad7879.c
262
static void __ad7879_enable(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
264
ad7879_write(ts, AD7879_REG_CTRL2, ts->cmd_crtl2);
drivers/input/touchscreen/ad7879.c
265
ad7879_write(ts, AD7879_REG_CTRL3, ts->cmd_crtl3);
drivers/input/touchscreen/ad7879.c
266
ad7879_write(ts, AD7879_REG_CTRL1, ts->cmd_crtl1);
drivers/input/touchscreen/ad7879.c
268
enable_irq(ts->irq);
drivers/input/touchscreen/ad7879.c
271
static void __ad7879_disable(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
273
u16 reg = (ts->cmd_crtl2 & ~AD7879_PM(-1)) |
drivers/input/touchscreen/ad7879.c
275
disable_irq(ts->irq);
drivers/input/touchscreen/ad7879.c
277
if (timer_delete_sync(&ts->timer))
drivers/input/touchscreen/ad7879.c
278
ad7879_ts_event_release(ts);
drivers/input/touchscreen/ad7879.c
280
ad7879_write(ts, AD7879_REG_CTRL2, reg);
drivers/input/touchscreen/ad7879.c
286
struct ad7879 *ts = input_get_drvdata(input);
drivers/input/touchscreen/ad7879.c
289
if (!ts->disabled && !ts->suspended)
drivers/input/touchscreen/ad7879.c
290
__ad7879_enable(ts);
drivers/input/touchscreen/ad7879.c
297
struct ad7879 *ts = input_get_drvdata(input);
drivers/input/touchscreen/ad7879.c
300
if (!ts->disabled && !ts->suspended)
drivers/input/touchscreen/ad7879.c
301
__ad7879_disable(ts);
drivers/input/touchscreen/ad7879.c
306
struct ad7879 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7879.c
308
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/ad7879.c
310
if (!ts->suspended && !ts->disabled && input_device_enabled(ts->input))
drivers/input/touchscreen/ad7879.c
311
__ad7879_disable(ts);
drivers/input/touchscreen/ad7879.c
313
ts->suspended = true;
drivers/input/touchscreen/ad7879.c
320
struct ad7879 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7879.c
322
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/ad7879.c
324
if (ts->suspended && !ts->disabled && input_device_enabled(ts->input))
drivers/input/touchscreen/ad7879.c
325
__ad7879_enable(ts);
drivers/input/touchscreen/ad7879.c
327
ts->suspended = false;
drivers/input/touchscreen/ad7879.c
335
static void ad7879_toggle(struct ad7879 *ts, bool disable)
drivers/input/touchscreen/ad7879.c
337
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/ad7879.c
339
if (!ts->suspended && input_device_enabled(ts->input)) {
drivers/input/touchscreen/ad7879.c
342
if (ts->disabled)
drivers/input/touchscreen/ad7879.c
343
__ad7879_enable(ts);
drivers/input/touchscreen/ad7879.c
345
if (!ts->disabled)
drivers/input/touchscreen/ad7879.c
346
__ad7879_disable(ts);
drivers/input/touchscreen/ad7879.c
350
ts->disabled = disable;
drivers/input/touchscreen/ad7879.c
356
struct ad7879 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7879.c
358
return sprintf(buf, "%u\n", ts->disabled);
drivers/input/touchscreen/ad7879.c
365
struct ad7879 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ad7879.c
373
ad7879_toggle(ts, val);
drivers/input/touchscreen/ad7879.c
399
struct ad7879 *ts = gpiochip_get_data(chip);
drivers/input/touchscreen/ad7879.c
401
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7879.c
403
ts->cmd_crtl2 |= AD7879_GPIO_EN | AD7879_GPIODIR | AD7879_GPIOPOL;
drivers/input/touchscreen/ad7879.c
404
return ad7879_write(ts, AD7879_REG_CTRL2, ts->cmd_crtl2);
drivers/input/touchscreen/ad7879.c
410
struct ad7879 *ts = gpiochip_get_data(chip);
drivers/input/touchscreen/ad7879.c
412
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7879.c
414
ts->cmd_crtl2 &= ~AD7879_GPIODIR;
drivers/input/touchscreen/ad7879.c
415
ts->cmd_crtl2 |= AD7879_GPIO_EN | AD7879_GPIOPOL;
drivers/input/touchscreen/ad7879.c
417
ts->cmd_crtl2 |= AD7879_GPIO_DATA;
drivers/input/touchscreen/ad7879.c
419
ts->cmd_crtl2 &= ~AD7879_GPIO_DATA;
drivers/input/touchscreen/ad7879.c
421
return ad7879_write(ts, AD7879_REG_CTRL2, ts->cmd_crtl2);
drivers/input/touchscreen/ad7879.c
426
struct ad7879 *ts = gpiochip_get_data(chip);
drivers/input/touchscreen/ad7879.c
429
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7879.c
431
val = ad7879_read(ts, AD7879_REG_CTRL2);
drivers/input/touchscreen/ad7879.c
438
struct ad7879 *ts = gpiochip_get_data(chip);
drivers/input/touchscreen/ad7879.c
440
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/ad7879.c
443
ts->cmd_crtl2 |= AD7879_GPIO_DATA;
drivers/input/touchscreen/ad7879.c
445
ts->cmd_crtl2 &= ~AD7879_GPIO_DATA;
drivers/input/touchscreen/ad7879.c
447
return ad7879_write(ts, AD7879_REG_CTRL2, ts->cmd_crtl2);
drivers/input/touchscreen/ad7879.c
450
static int ad7879_gpio_add(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
454
mutex_init(&ts->mutex);
drivers/input/touchscreen/ad7879.c
457
if (!device_property_read_bool(ts->dev, "gpio-controller"))
drivers/input/touchscreen/ad7879.c
460
ts->gc.direction_input = ad7879_gpio_direction_input;
drivers/input/touchscreen/ad7879.c
461
ts->gc.direction_output = ad7879_gpio_direction_output;
drivers/input/touchscreen/ad7879.c
462
ts->gc.get = ad7879_gpio_get_value;
drivers/input/touchscreen/ad7879.c
463
ts->gc.set = ad7879_gpio_set_value;
drivers/input/touchscreen/ad7879.c
464
ts->gc.can_sleep = 1;
drivers/input/touchscreen/ad7879.c
465
ts->gc.base = -1;
drivers/input/touchscreen/ad7879.c
466
ts->gc.ngpio = 1;
drivers/input/touchscreen/ad7879.c
467
ts->gc.label = "AD7879-GPIO";
drivers/input/touchscreen/ad7879.c
468
ts->gc.owner = THIS_MODULE;
drivers/input/touchscreen/ad7879.c
469
ts->gc.parent = ts->dev;
drivers/input/touchscreen/ad7879.c
471
ret = devm_gpiochip_add_data(ts->dev, &ts->gc, ts);
drivers/input/touchscreen/ad7879.c
473
dev_err(ts->dev, "failed to register gpio %d\n",
drivers/input/touchscreen/ad7879.c
474
ts->gc.base);
drivers/input/touchscreen/ad7879.c
479
static int ad7879_gpio_add(struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
485
static int ad7879_parse_dt(struct device *dev, struct ad7879 *ts)
drivers/input/touchscreen/ad7879.c
495
ts->x_plate_ohms = (u16)tmp;
drivers/input/touchscreen/ad7879.c
498
&ts->first_conversion_delay);
drivers/input/touchscreen/ad7879.c
500
&ts->acquisition_time);
drivers/input/touchscreen/ad7879.c
501
device_property_read_u8(dev, "adi,median-filter-size", &ts->median);
drivers/input/touchscreen/ad7879.c
502
device_property_read_u8(dev, "adi,averaging", &ts->averaging);
drivers/input/touchscreen/ad7879.c
504
&ts->pen_down_acc_interval);
drivers/input/touchscreen/ad7879.c
506
ts->swap_xy = device_property_read_bool(dev, "touchscreen-swapped-x-y");
drivers/input/touchscreen/ad7879.c
514
struct ad7879 *ts;
drivers/input/touchscreen/ad7879.c
524
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/ad7879.c
525
if (!ts)
drivers/input/touchscreen/ad7879.c
528
err = ad7879_parse_dt(dev, ts);
drivers/input/touchscreen/ad7879.c
538
ts->dev = dev;
drivers/input/touchscreen/ad7879.c
539
ts->input = input_dev;
drivers/input/touchscreen/ad7879.c
540
ts->irq = irq;
drivers/input/touchscreen/ad7879.c
541
ts->regmap = regmap;
drivers/input/touchscreen/ad7879.c
543
timer_setup(&ts->timer, ad7879_timer, 0);
drivers/input/touchscreen/ad7879.c
544
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(dev));
drivers/input/touchscreen/ad7879.c
547
input_dev->phys = ts->phys;
drivers/input/touchscreen/ad7879.c
554
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/ad7879.c
567
err = ad7879_write(ts, AD7879_REG_CTRL2, AD7879_RESET);
drivers/input/touchscreen/ad7879.c
573
revid = ad7879_read(ts, AD7879_REG_REVID);
drivers/input/touchscreen/ad7879.c
582
ts->cmd_crtl3 = AD7879_YPLUS_BIT |
drivers/input/touchscreen/ad7879.c
590
ts->cmd_crtl2 = AD7879_PM(AD7879_PM_DYN) | AD7879_DFR |
drivers/input/touchscreen/ad7879.c
591
AD7879_AVG(ts->averaging) |
drivers/input/touchscreen/ad7879.c
592
AD7879_MFS(ts->median) |
drivers/input/touchscreen/ad7879.c
593
AD7879_FCD(ts->first_conversion_delay);
drivers/input/touchscreen/ad7879.c
595
ts->cmd_crtl1 = AD7879_MODE_INT | AD7879_MODE_SEQ1 |
drivers/input/touchscreen/ad7879.c
596
AD7879_ACQ(ts->acquisition_time) |
drivers/input/touchscreen/ad7879.c
597
AD7879_TMR(ts->pen_down_acc_interval);
drivers/input/touchscreen/ad7879.c
599
err = devm_request_threaded_irq(dev, ts->irq, NULL, ad7879_irq,
drivers/input/touchscreen/ad7879.c
601
dev_name(dev), ts);
drivers/input/touchscreen/ad7879.c
607
__ad7879_disable(ts);
drivers/input/touchscreen/ad7879.c
609
err = ad7879_gpio_add(ts);
drivers/input/touchscreen/ad7879.c
617
dev_set_drvdata(dev, ts);
drivers/input/touchscreen/ads7846.c
1001
if (!ts->stopped)
drivers/input/touchscreen/ads7846.c
1002
ads7846_report_state(ts);
drivers/input/touchscreen/ads7846.c
1004
wait_event_timeout(ts->wait, ts->stopped,
drivers/input/touchscreen/ads7846.c
1008
if (ts->pendown && !ts->stopped)
drivers/input/touchscreen/ads7846.c
1009
ads7846_report_pen_up(ts);
drivers/input/touchscreen/ads7846.c
1016
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
1018
guard(mutex)(&ts->lock);
drivers/input/touchscreen/ads7846.c
1020
if (!ts->suspended) {
drivers/input/touchscreen/ads7846.c
1022
if (!ts->disabled)
drivers/input/touchscreen/ads7846.c
1023
__ads7846_disable(ts);
drivers/input/touchscreen/ads7846.c
1025
if (device_may_wakeup(&ts->spi->dev))
drivers/input/touchscreen/ads7846.c
1026
enable_irq_wake(ts->spi->irq);
drivers/input/touchscreen/ads7846.c
1028
ts->suspended = true;
drivers/input/touchscreen/ads7846.c
1036
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
1038
guard(mutex)(&ts->lock);
drivers/input/touchscreen/ads7846.c
1040
if (ts->suspended) {
drivers/input/touchscreen/ads7846.c
1042
ts->suspended = false;
drivers/input/touchscreen/ads7846.c
1044
if (device_may_wakeup(&ts->spi->dev))
drivers/input/touchscreen/ads7846.c
1045
disable_irq_wake(ts->spi->irq);
drivers/input/touchscreen/ads7846.c
1047
if (!ts->disabled)
drivers/input/touchscreen/ads7846.c
1048
__ads7846_enable(ts);
drivers/input/touchscreen/ads7846.c
1057
struct ads7846 *ts,
drivers/input/touchscreen/ads7846.c
1067
ts->get_pendown_state = pdata->get_pendown_state;
drivers/input/touchscreen/ads7846.c
1069
ts->gpio_pendown = devm_gpiod_get(&spi->dev, "pendown", GPIOD_IN);
drivers/input/touchscreen/ads7846.c
1070
if (IS_ERR(ts->gpio_pendown)) {
drivers/input/touchscreen/ads7846.c
1072
return PTR_ERR(ts->gpio_pendown);
drivers/input/touchscreen/ads7846.c
1075
gpiod_set_debounce(ts->gpio_pendown,
drivers/input/touchscreen/ads7846.c
1086
static int ads7846_halfd_spi_msg(struct ads7846 *ts,
drivers/input/touchscreen/ads7846.c
1089
struct spi_message *m = ts->msg;
drivers/input/touchscreen/ads7846.c
1090
struct spi_transfer *x = ts->xfer;
drivers/input/touchscreen/ads7846.c
1091
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
1102
if (ts->model == 7846)
drivers/input/touchscreen/ads7846.c
1126
if (ARRAY_SIZE(ts->xfer) < offset * 2)
drivers/input/touchscreen/ads7846.c
1129
packet->rx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
drivers/input/touchscreen/ads7846.c
1133
if (ts->model == 7873) {
drivers/input/touchscreen/ads7846.c
1139
ts->model = 7846;
drivers/input/touchscreen/ads7846.c
1143
ts->msg_count = 0;
drivers/input/touchscreen/ads7846.c
1149
ts->msg_count++;
drivers/input/touchscreen/ads7846.c
1151
m->context = ts;
drivers/input/touchscreen/ads7846.c
1182
static int ads7846_setup_spi_msg(struct ads7846 *ts,
drivers/input/touchscreen/ads7846.c
1185
struct spi_message *m = &ts->msg[0];
drivers/input/touchscreen/ads7846.c
1186
struct spi_transfer *x = ts->xfer;
drivers/input/touchscreen/ads7846.c
1187
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
1195
time = NSEC_PER_SEC / ts->spi->max_speed_hz;
drivers/input/touchscreen/ads7846.c
1200
if (ts->debounce_max && ts->debounce_rep)
drivers/input/touchscreen/ads7846.c
1203
packet->count = ts->debounce_rep + 2;
drivers/input/touchscreen/ads7846.c
1207
if (ts->model == 7846)
drivers/input/touchscreen/ads7846.c
1231
packet->tx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
drivers/input/touchscreen/ads7846.c
1235
packet->rx = devm_kzalloc(&ts->spi->dev, size, GFP_KERNEL);
drivers/input/touchscreen/ads7846.c
1239
if (ts->model == 7873) {
drivers/input/touchscreen/ads7846.c
1245
ts->model = 7846;
drivers/input/touchscreen/ads7846.c
1249
ts->msg_count = 1;
drivers/input/touchscreen/ads7846.c
1251
m->context = ts;
drivers/input/touchscreen/ads7846.c
1357
struct ads7846 *ts;
drivers/input/touchscreen/ads7846.c
137
int (*setup_spi_msg)(struct ads7846 *ts,
drivers/input/touchscreen/ads7846.c
1388
ts = devm_kzalloc(dev, sizeof(struct ads7846), GFP_KERNEL);
drivers/input/touchscreen/ads7846.c
1389
if (!ts)
drivers/input/touchscreen/ads7846.c
139
void (*read_state)(struct ads7846 *ts);
drivers/input/touchscreen/ads7846.c
1393
ts->setup_spi_msg = ads7846_halfd_spi_msg;
drivers/input/touchscreen/ads7846.c
1394
ts->read_state = ads7846_halfd_read_state;
drivers/input/touchscreen/ads7846.c
1396
ts->setup_spi_msg = ads7846_setup_spi_msg;
drivers/input/touchscreen/ads7846.c
1397
ts->read_state = ads7846_read_state;
drivers/input/touchscreen/ads7846.c
1408
spi_set_drvdata(spi, ts);
drivers/input/touchscreen/ads7846.c
1410
ts->packet = packet;
drivers/input/touchscreen/ads7846.c
1411
ts->spi = spi;
drivers/input/touchscreen/ads7846.c
1412
ts->input = input_dev;
drivers/input/touchscreen/ads7846.c
1414
mutex_init(&ts->lock);
drivers/input/touchscreen/ads7846.c
1415
init_waitqueue_head(&ts->wait);
drivers/input/touchscreen/ads7846.c
1424
ts->model = pdata->model ? : 7846;
drivers/input/touchscreen/ads7846.c
1425
ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
drivers/input/touchscreen/ads7846.c
1426
ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
drivers/input/touchscreen/ads7846.c
1427
ts->vref_mv = pdata->vref_mv;
drivers/input/touchscreen/ads7846.c
1430
ts->debounce_max = pdata->debounce_max;
drivers/input/touchscreen/ads7846.c
1431
if (ts->debounce_max < 2)
drivers/input/touchscreen/ads7846.c
1432
ts->debounce_max = 2;
drivers/input/touchscreen/ads7846.c
1433
ts->debounce_tol = pdata->debounce_tol;
drivers/input/touchscreen/ads7846.c
1434
ts->debounce_rep = pdata->debounce_rep;
drivers/input/touchscreen/ads7846.c
1435
ts->filter = ads7846_debounce_filter;
drivers/input/touchscreen/ads7846.c
1436
ts->filter_data = ts;
drivers/input/touchscreen/ads7846.c
1438
ts->filter = ads7846_no_filter;
drivers/input/touchscreen/ads7846.c
1441
err = ads7846_setup_pendown(spi, ts, pdata);
drivers/input/touchscreen/ads7846.c
1446
ts->penirq_recheck_delay_usecs =
drivers/input/touchscreen/ads7846.c
1449
ts->wait_for_sync = pdata->wait_for_sync;
drivers/input/touchscreen/ads7846.c
1451
ts->gpio_hsync = devm_gpiod_get_optional(dev, "ti,hsync", GPIOD_IN);
drivers/input/touchscreen/ads7846.c
1452
if (IS_ERR(ts->gpio_hsync))
drivers/input/touchscreen/ads7846.c
1453
return PTR_ERR(ts->gpio_hsync);
drivers/input/touchscreen/ads7846.c
1455
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(dev));
drivers/input/touchscreen/ads7846.c
1456
snprintf(ts->name, sizeof(ts->name), "ADS%d Touchscreen", ts->model);
drivers/input/touchscreen/ads7846.c
1458
input_dev->name = ts->name;
drivers/input/touchscreen/ads7846.c
1459
input_dev->phys = ts->phys;
drivers/input/touchscreen/ads7846.c
1473
if (ts->model != 7845)
drivers/input/touchscreen/ads7846.c
1482
touchscreen_parse_properties(ts->input, false, &ts->core_prop);
drivers/input/touchscreen/ads7846.c
1483
ts->pressure_max = input_abs_get_max(input_dev, ABS_PRESSURE) ? : ~0;
drivers/input/touchscreen/ads7846.c
1489
if (!ts->core_prop.swap_x_y && pdata->swap_xy) {
drivers/input/touchscreen/ads7846.c
1491
ts->core_prop.swap_x_y = true;
drivers/input/touchscreen/ads7846.c
1494
err = ts->setup_spi_msg(ts, pdata);
drivers/input/touchscreen/ads7846.c
1498
ts->reg = devm_regulator_get(dev, "vcc");
drivers/input/touchscreen/ads7846.c
1499
if (IS_ERR(ts->reg)) {
drivers/input/touchscreen/ads7846.c
1500
err = PTR_ERR(ts->reg);
drivers/input/touchscreen/ads7846.c
1505
err = regulator_enable(ts->reg);
drivers/input/touchscreen/ads7846.c
1511
err = devm_add_action_or_reset(dev, ads7846_regulator_disable, ts->reg);
drivers/input/touchscreen/ads7846.c
1520
irq_flags, dev->driver->name, ts);
drivers/input/touchscreen/ads7846.c
1528
ts);
drivers/input/touchscreen/ads7846.c
1536
err = ads784x_hwmon_register(spi, ts);
drivers/input/touchscreen/ads7846.c
1546
if (ts->model == 7845)
drivers/input/touchscreen/ads7846.c
1569
struct ads7846 *ts = spi_get_drvdata(spi);
drivers/input/touchscreen/ads7846.c
1571
ads7846_stop(ts);
drivers/input/touchscreen/ads7846.c
222
static int get_pendown_state(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
224
if (ts->get_pendown_state)
drivers/input/touchscreen/ads7846.c
225
return ts->get_pendown_state();
drivers/input/touchscreen/ads7846.c
227
return gpiod_get_value(ts->gpio_pendown);
drivers/input/touchscreen/ads7846.c
230
static void ads7846_report_pen_up(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
232
struct input_dev *input = ts->input;
drivers/input/touchscreen/ads7846.c
238
ts->pendown = false;
drivers/input/touchscreen/ads7846.c
239
dev_vdbg(&ts->spi->dev, "UP\n");
drivers/input/touchscreen/ads7846.c
243
static void ads7846_stop(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
245
if (!ts->disabled && !ts->suspended) {
drivers/input/touchscreen/ads7846.c
247
ts->stopped = true;
drivers/input/touchscreen/ads7846.c
249
wake_up(&ts->wait);
drivers/input/touchscreen/ads7846.c
250
disable_irq(ts->spi->irq);
drivers/input/touchscreen/ads7846.c
255
static void ads7846_restart(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
257
if (!ts->disabled && !ts->suspended) {
drivers/input/touchscreen/ads7846.c
259
if (ts->pendown && !get_pendown_state(ts))
drivers/input/touchscreen/ads7846.c
260
ads7846_report_pen_up(ts);
drivers/input/touchscreen/ads7846.c
263
ts->stopped = false;
drivers/input/touchscreen/ads7846.c
265
enable_irq(ts->spi->irq);
drivers/input/touchscreen/ads7846.c
270
static void __ads7846_disable(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
272
ads7846_stop(ts);
drivers/input/touchscreen/ads7846.c
273
regulator_disable(ts->reg);
drivers/input/touchscreen/ads7846.c
282
static void __ads7846_enable(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
286
error = regulator_enable(ts->reg);
drivers/input/touchscreen/ads7846.c
288
dev_err(&ts->spi->dev, "Failed to enable supply: %d\n", error);
drivers/input/touchscreen/ads7846.c
290
ads7846_restart(ts);
drivers/input/touchscreen/ads7846.c
293
static void ads7846_disable(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
295
guard(mutex)(&ts->lock);
drivers/input/touchscreen/ads7846.c
297
if (!ts->disabled) {
drivers/input/touchscreen/ads7846.c
299
if (!ts->suspended)
drivers/input/touchscreen/ads7846.c
300
__ads7846_disable(ts);
drivers/input/touchscreen/ads7846.c
302
ts->disabled = true;
drivers/input/touchscreen/ads7846.c
306
static void ads7846_enable(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
308
guard(mutex)(&ts->lock);
drivers/input/touchscreen/ads7846.c
310
if (ts->disabled) {
drivers/input/touchscreen/ads7846.c
312
ts->disabled = false;
drivers/input/touchscreen/ads7846.c
314
if (!ts->suspended)
drivers/input/touchscreen/ads7846.c
315
__ads7846_enable(ts);
drivers/input/touchscreen/ads7846.c
355
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
365
if (ts->use_internal) {
drivers/input/touchscreen/ads7846.c
375
req->xfer[1].delay.value = ts->vref_delay_usecs;
drivers/input/touchscreen/ads7846.c
418
scoped_guard(mutex, &ts->lock) {
drivers/input/touchscreen/ads7846.c
419
ads7846_stop(ts);
drivers/input/touchscreen/ads7846.c
421
ads7846_restart(ts);
drivers/input/touchscreen/ads7846.c
437
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
452
scoped_guard(mutex, &ts->lock) {
drivers/input/touchscreen/ads7846.c
453
ads7846_stop(ts);
drivers/input/touchscreen/ads7846.c
455
ads7846_restart(ts);
drivers/input/touchscreen/ads7846.c
473
struct ads7846 *ts = dev_get_drvdata(dev); \
drivers/input/touchscreen/ads7846.c
474
ssize_t v = ads7846_read12_ser(&ts->spi->dev, \
drivers/input/touchscreen/ads7846.c
478
return sprintf(buf, "%u\n", adjust(ts, v)); \
drivers/input/touchscreen/ads7846.c
488
static inline unsigned null_adjust(struct ads7846 *ts, ssize_t v)
drivers/input/touchscreen/ads7846.c
501
static inline unsigned vaux_adjust(struct ads7846 *ts, ssize_t v)
drivers/input/touchscreen/ads7846.c
506
retval *= ts->vref_mv;
drivers/input/touchscreen/ads7846.c
512
static inline unsigned vbatt_adjust(struct ads7846 *ts, ssize_t v)
drivers/input/touchscreen/ads7846.c
514
unsigned retval = vaux_adjust(ts, v);
drivers/input/touchscreen/ads7846.c
517
if (ts->model == 7846)
drivers/input/touchscreen/ads7846.c
530
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
532
if (ts->model == 7843 && index < 2) /* in0, in1 */
drivers/input/touchscreen/ads7846.c
534
if (ts->model == 7845 && index != 2) /* in0 */
drivers/input/touchscreen/ads7846.c
554
static int ads784x_hwmon_register(struct spi_device *spi, struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
559
switch (ts->model) {
drivers/input/touchscreen/ads7846.c
561
if (!ts->vref_mv) {
drivers/input/touchscreen/ads7846.c
563
ts->vref_mv = 2500;
drivers/input/touchscreen/ads7846.c
564
ts->use_internal = true;
drivers/input/touchscreen/ads7846.c
569
if (!ts->vref_mv) {
drivers/input/touchscreen/ads7846.c
572
ts->model);
drivers/input/touchscreen/ads7846.c
579
spi->modalias, ts,
drivers/input/touchscreen/ads7846.c
587
struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
596
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
598
return sprintf(buf, "%u\n", ts->pendown);
drivers/input/touchscreen/ads7846.c
606
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
608
return sprintf(buf, "%u\n", ts->disabled);
drivers/input/touchscreen/ads7846.c
615
struct ads7846 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ads7846.c
624
ads7846_disable(ts);
drivers/input/touchscreen/ads7846.c
626
ads7846_enable(ts);
drivers/input/touchscreen/ads7846.c
644
struct ads7846 *ts = ads;
drivers/input/touchscreen/ads7846.c
646
if (!ts->read_cnt || (abs(ts->last_read - *val) > ts->debounce_tol)) {
drivers/input/touchscreen/ads7846.c
648
ts->read_rep = 0;
drivers/input/touchscreen/ads7846.c
653
if (ts->read_cnt < ts->debounce_max) {
drivers/input/touchscreen/ads7846.c
654
ts->last_read = *val;
drivers/input/touchscreen/ads7846.c
655
ts->read_cnt++;
drivers/input/touchscreen/ads7846.c
664
ts->read_cnt = 0;
drivers/input/touchscreen/ads7846.c
668
if (++ts->read_rep > ts->debounce_rep) {
drivers/input/touchscreen/ads7846.c
673
ts->read_cnt = 0;
drivers/input/touchscreen/ads7846.c
674
ts->read_rep = 0;
drivers/input/touchscreen/ads7846.c
678
ts->read_cnt++;
drivers/input/touchscreen/ads7846.c
699
static void ads7846_set_cmd_val(struct ads7846 *ts, enum ads7846_cmds cmd_idx,
drivers/input/touchscreen/ads7846.c
702
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
761
static int ads7846_filter(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
763
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
777
action = ts->filter(ts->filter_data, cmd_idx, &val);
drivers/input/touchscreen/ads7846.c
782
ads7846_set_cmd_val(ts, cmd_idx, val);
drivers/input/touchscreen/ads7846.c
794
static int ads7846_filter_one(struct ads7846 *ts, unsigned int cmd_idx)
drivers/input/touchscreen/ads7846.c
796
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
801
action = ts->filter(ts->filter_data, cmd_idx, &val);
drivers/input/touchscreen/ads7846.c
806
ads7846_set_cmd_val(ts, cmd_idx, val);
drivers/input/touchscreen/ads7846.c
810
static void ads7846_wait_for_hsync(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
812
if (ts->wait_for_sync) {
drivers/input/touchscreen/ads7846.c
813
ts->wait_for_sync();
drivers/input/touchscreen/ads7846.c
817
if (!ts->gpio_hsync)
drivers/input/touchscreen/ads7846.c
824
while (!gpiod_get_value(ts->gpio_hsync))
drivers/input/touchscreen/ads7846.c
828
while (gpiod_get_value(ts->gpio_hsync))
drivers/input/touchscreen/ads7846.c
832
static void ads7846_halfd_read_state(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
834
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
839
while (msg_idx < ts->msg_count) {
drivers/input/touchscreen/ads7846.c
842
ads7846_wait_for_hsync(ts);
drivers/input/touchscreen/ads7846.c
844
error = spi_sync(ts->spi, &ts->msg[msg_idx]);
drivers/input/touchscreen/ads7846.c
846
dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n",
drivers/input/touchscreen/ads7846.c
856
if (msg_idx == ts->msg_count - 1)
drivers/input/touchscreen/ads7846.c
859
error = ads7846_filter_one(ts, msg_idx);
drivers/input/touchscreen/ads7846.c
864
msg_idx = ts->msg_count - 1;
drivers/input/touchscreen/ads7846.c
871
static void ads7846_read_state(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
873
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
881
ads7846_wait_for_hsync(ts);
drivers/input/touchscreen/ads7846.c
883
m = &ts->msg[msg_idx];
drivers/input/touchscreen/ads7846.c
884
error = spi_sync(ts->spi, m);
drivers/input/touchscreen/ads7846.c
886
dev_err_ratelimited(&ts->spi->dev, "spi_sync --> %d\n", error);
drivers/input/touchscreen/ads7846.c
891
error = ads7846_filter(ts);
drivers/input/touchscreen/ads7846.c
899
static void ads7846_report_state(struct ads7846 *ts)
drivers/input/touchscreen/ads7846.c
901
struct ads7846_packet *packet = ts->packet;
drivers/input/touchscreen/ads7846.c
907
if (ts->model == 7845) {
drivers/input/touchscreen/ads7846.c
919
if (ts->model == 7843 || ts->model == 7845) {
drivers/input/touchscreen/ads7846.c
920
Rt = ts->pressure_max / 2;
drivers/input/touchscreen/ads7846.c
925
Rt *= ts->x_plate_ohms;
drivers/input/touchscreen/ads7846.c
939
if (packet->ignore || Rt > ts->pressure_max) {
drivers/input/touchscreen/ads7846.c
940
dev_vdbg(&ts->spi->dev, "ignored %d pressure %d\n",
drivers/input/touchscreen/ads7846.c
949
if (ts->penirq_recheck_delay_usecs) {
drivers/input/touchscreen/ads7846.c
950
udelay(ts->penirq_recheck_delay_usecs);
drivers/input/touchscreen/ads7846.c
951
if (!get_pendown_state(ts))
drivers/input/touchscreen/ads7846.c
965
struct input_dev *input = ts->input;
drivers/input/touchscreen/ads7846.c
967
if (!ts->pendown) {
drivers/input/touchscreen/ads7846.c
969
ts->pendown = true;
drivers/input/touchscreen/ads7846.c
970
dev_vdbg(&ts->spi->dev, "DOWN\n");
drivers/input/touchscreen/ads7846.c
973
touchscreen_report_pos(input, &ts->core_prop, x, y, false);
drivers/input/touchscreen/ads7846.c
974
input_report_abs(input, ABS_PRESSURE, ts->pressure_max - Rt);
drivers/input/touchscreen/ads7846.c
977
dev_vdbg(&ts->spi->dev, "%4d/%4d/%4d\n", x, y, Rt);
drivers/input/touchscreen/ads7846.c
983
struct ads7846 *ts = handle;
drivers/input/touchscreen/ads7846.c
985
return get_pendown_state(ts) ? IRQ_WAKE_THREAD : IRQ_HANDLED;
drivers/input/touchscreen/ads7846.c
991
struct ads7846 *ts = handle;
drivers/input/touchscreen/ads7846.c
996
while (!ts->stopped && get_pendown_state(ts)) {
drivers/input/touchscreen/ads7846.c
999
ts->read_state(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
138
static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts,
drivers/input/touchscreen/auo-pixcir-ts.c
141
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
168
if (point[i].coord_x > ts->x_max ||
drivers/input/touchscreen/auo-pixcir-ts.c
169
point[i].coord_y > ts->y_max) {
drivers/input/touchscreen/auo-pixcir-ts.c
186
struct auo_pixcir_ts *ts = dev_id;
drivers/input/touchscreen/auo-pixcir-ts.c
193
while (!ts->stopped) {
drivers/input/touchscreen/auo-pixcir-ts.c
196
if (ts->touch_ind_mode) {
drivers/input/touchscreen/auo-pixcir-ts.c
197
if (gpiod_get_value_cansleep(ts->gpio_int) == 0) {
drivers/input/touchscreen/auo-pixcir-ts.c
198
input_mt_sync(ts->input);
drivers/input/touchscreen/auo-pixcir-ts.c
199
input_report_key(ts->input, BTN_TOUCH, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
200
input_sync(ts->input);
drivers/input/touchscreen/auo-pixcir-ts.c
205
ret = auo_pixcir_collect_data(ts, point);
drivers/input/touchscreen/auo-pixcir-ts.c
208
if (!ts->touch_ind_mode)
drivers/input/touchscreen/auo-pixcir-ts.c
211
wait_event_timeout(ts->wait, ts->stopped,
drivers/input/touchscreen/auo-pixcir-ts.c
218
input_report_abs(ts->input, ABS_MT_POSITION_X,
drivers/input/touchscreen/auo-pixcir-ts.c
220
input_report_abs(ts->input, ABS_MT_POSITION_Y,
drivers/input/touchscreen/auo-pixcir-ts.c
222
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR,
drivers/input/touchscreen/auo-pixcir-ts.c
224
input_report_abs(ts->input, ABS_MT_TOUCH_MINOR,
drivers/input/touchscreen/auo-pixcir-ts.c
226
input_report_abs(ts->input, ABS_MT_ORIENTATION,
drivers/input/touchscreen/auo-pixcir-ts.c
228
input_mt_sync(ts->input);
drivers/input/touchscreen/auo-pixcir-ts.c
241
input_report_key(ts->input, BTN_TOUCH, fingers > 0);
drivers/input/touchscreen/auo-pixcir-ts.c
244
input_report_abs(ts->input, ABS_X, point[abs].coord_x);
drivers/input/touchscreen/auo-pixcir-ts.c
245
input_report_abs(ts->input, ABS_Y, point[abs].coord_y);
drivers/input/touchscreen/auo-pixcir-ts.c
248
input_sync(ts->input);
drivers/input/touchscreen/auo-pixcir-ts.c
251
if (!ts->touch_ind_mode)
drivers/input/touchscreen/auo-pixcir-ts.c
254
wait_event_timeout(ts->wait, ts->stopped,
drivers/input/touchscreen/auo-pixcir-ts.c
268
static int auo_pixcir_power_mode(struct auo_pixcir_ts *ts, int mode)
drivers/input/touchscreen/auo-pixcir-ts.c
270
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
293
static int auo_pixcir_int_config(struct auo_pixcir_ts *ts, int int_setting)
drivers/input/touchscreen/auo-pixcir-ts.c
295
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
317
ts->touch_ind_mode = int_setting == AUO_PIXCIR_INT_TOUCH_IND;
drivers/input/touchscreen/auo-pixcir-ts.c
323
static int auo_pixcir_int_toggle(struct auo_pixcir_ts *ts, bool enable)
drivers/input/touchscreen/auo-pixcir-ts.c
325
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
351
static int auo_pixcir_start(struct auo_pixcir_ts *ts)
drivers/input/touchscreen/auo-pixcir-ts.c
353
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
356
ret = auo_pixcir_power_mode(ts, AUO_PIXCIR_POWER_ACTIVE);
drivers/input/touchscreen/auo-pixcir-ts.c
363
ts->stopped = false;
drivers/input/touchscreen/auo-pixcir-ts.c
367
ret = auo_pixcir_int_toggle(ts, 1);
drivers/input/touchscreen/auo-pixcir-ts.c
378
static int auo_pixcir_stop(struct auo_pixcir_ts *ts)
drivers/input/touchscreen/auo-pixcir-ts.c
380
struct i2c_client *client = ts->client;
drivers/input/touchscreen/auo-pixcir-ts.c
383
ret = auo_pixcir_int_toggle(ts, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
392
ts->stopped = true;
drivers/input/touchscreen/auo-pixcir-ts.c
394
wake_up(&ts->wait);
drivers/input/touchscreen/auo-pixcir-ts.c
396
return auo_pixcir_power_mode(ts, AUO_PIXCIR_POWER_DEEP_SLEEP);
drivers/input/touchscreen/auo-pixcir-ts.c
401
struct auo_pixcir_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/auo-pixcir-ts.c
403
return auo_pixcir_start(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
408
struct auo_pixcir_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/auo-pixcir-ts.c
410
auo_pixcir_stop(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
416
struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/auo-pixcir-ts.c
417
struct input_dev *input = ts->input;
drivers/input/touchscreen/auo-pixcir-ts.c
428
error = auo_pixcir_start(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
434
error = auo_pixcir_power_mode(ts, AUO_PIXCIR_POWER_SLEEP);
drivers/input/touchscreen/auo-pixcir-ts.c
439
error = auo_pixcir_stop(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
450
struct auo_pixcir_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/auo-pixcir-ts.c
451
struct input_dev *input = ts->input;
drivers/input/touchscreen/auo-pixcir-ts.c
461
error = auo_pixcir_stop(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
468
error = auo_pixcir_start(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
481
struct auo_pixcir_ts *ts = data;
drivers/input/touchscreen/auo-pixcir-ts.c
483
gpiod_set_value_cansleep(ts->gpio_rst, 1);
drivers/input/touchscreen/auo-pixcir-ts.c
488
struct auo_pixcir_ts *ts;
drivers/input/touchscreen/auo-pixcir-ts.c
493
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/auo-pixcir-ts.c
494
if (!ts)
drivers/input/touchscreen/auo-pixcir-ts.c
503
ts->client = client;
drivers/input/touchscreen/auo-pixcir-ts.c
504
ts->input = input_dev;
drivers/input/touchscreen/auo-pixcir-ts.c
505
ts->touch_ind_mode = 0;
drivers/input/touchscreen/auo-pixcir-ts.c
506
ts->stopped = true;
drivers/input/touchscreen/auo-pixcir-ts.c
507
init_waitqueue_head(&ts->wait);
drivers/input/touchscreen/auo-pixcir-ts.c
509
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/auo-pixcir-ts.c
512
if (device_property_read_u32(&client->dev, "x-size", &ts->x_max)) {
drivers/input/touchscreen/auo-pixcir-ts.c
517
if (device_property_read_u32(&client->dev, "y-size", &ts->y_max)) {
drivers/input/touchscreen/auo-pixcir-ts.c
523
input_dev->phys = ts->phys;
drivers/input/touchscreen/auo-pixcir-ts.c
535
input_set_abs_params(input_dev, ABS_X, 0, ts->x_max, 0, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
536
input_set_abs_params(input_dev, ABS_Y, 0, ts->y_max, 0, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
539
input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, ts->x_max, 0, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
540
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, ts->y_max, 0, 0);
drivers/input/touchscreen/auo-pixcir-ts.c
547
input_set_drvdata(ts->input, ts);
drivers/input/touchscreen/auo-pixcir-ts.c
549
ts->gpio_int = devm_gpiod_get_index(&client->dev, NULL, 0, GPIOD_IN);
drivers/input/touchscreen/auo-pixcir-ts.c
550
error = PTR_ERR_OR_ZERO(ts->gpio_int);
drivers/input/touchscreen/auo-pixcir-ts.c
557
gpiod_set_consumer_name(ts->gpio_int, "auo_pixcir_ts_int");
drivers/input/touchscreen/auo-pixcir-ts.c
560
ts->gpio_rst = devm_gpiod_get_index(&client->dev, NULL, 1,
drivers/input/touchscreen/auo-pixcir-ts.c
562
error = PTR_ERR_OR_ZERO(ts->gpio_rst);
drivers/input/touchscreen/auo-pixcir-ts.c
569
gpiod_set_consumer_name(ts->gpio_rst, "auo_pixcir_ts_rst");
drivers/input/touchscreen/auo-pixcir-ts.c
571
error = devm_add_action_or_reset(&client->dev, auo_pixcir_reset, ts);
drivers/input/touchscreen/auo-pixcir-ts.c
589
error = auo_pixcir_int_config(ts, AUO_PIXCIR_INT_TOUCH_IND);
drivers/input/touchscreen/auo-pixcir-ts.c
596
input_dev->name, ts);
drivers/input/touchscreen/auo-pixcir-ts.c
604
error = auo_pixcir_stop(ts);
drivers/input/touchscreen/auo-pixcir-ts.c
615
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/bu21013_ts.c
171
static int bu21013_read_block_data(struct bu21013_ts *ts, u8 *buf)
drivers/input/touchscreen/bu21013_ts.c
176
ret = i2c_smbus_read_i2c_block_data(ts->client,
drivers/input/touchscreen/bu21013_ts.c
186
static int bu21013_do_touch_report(struct bu21013_ts *ts)
drivers/input/touchscreen/bu21013_ts.c
188
struct input_dev *input = ts->in_dev;
drivers/input/touchscreen/bu21013_ts.c
196
if (bu21013_read_block_data(ts, buf) < 0)
drivers/input/touchscreen/bu21013_ts.c
213
&ts->props, x, y);
drivers/input/touchscreen/bu21013_ts.c
238
struct bu21013_ts *ts = device_data;
drivers/input/touchscreen/bu21013_ts.c
243
error = bu21013_do_touch_report(ts);
drivers/input/touchscreen/bu21013_ts.c
245
dev_err(&ts->client->dev, "%s failed\n", __func__);
drivers/input/touchscreen/bu21013_ts.c
249
if (unlikely(ts->touch_stopped))
drivers/input/touchscreen/bu21013_ts.c
252
keep_polling = ts->int_gpiod ?
drivers/input/touchscreen/bu21013_ts.c
253
gpiod_get_value(ts->int_gpiod) : false;
drivers/input/touchscreen/bu21013_ts.c
261
static int bu21013_init_chip(struct bu21013_ts *ts)
drivers/input/touchscreen/bu21013_ts.c
263
struct i2c_client *client = ts->client;
drivers/input/touchscreen/bu21013_ts.c
395
struct bu21013_ts *ts = _ts;
drivers/input/touchscreen/bu21013_ts.c
397
regulator_disable(ts->regulator);
drivers/input/touchscreen/bu21013_ts.c
402
struct bu21013_ts *ts = _ts;
drivers/input/touchscreen/bu21013_ts.c
404
gpiod_set_value(ts->cs_gpiod, 0);
drivers/input/touchscreen/bu21013_ts.c
409
struct bu21013_ts *ts;
drivers/input/touchscreen/bu21013_ts.c
427
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/bu21013_ts.c
428
if (!ts)
drivers/input/touchscreen/bu21013_ts.c
431
ts->client = client;
drivers/input/touchscreen/bu21013_ts.c
433
ts->x_flip = device_property_read_bool(dev, "rohm,flip-x");
drivers/input/touchscreen/bu21013_ts.c
434
ts->y_flip = device_property_read_bool(dev, "rohm,flip-y");
drivers/input/touchscreen/bu21013_ts.c
441
ts->in_dev = in_dev;
drivers/input/touchscreen/bu21013_ts.c
442
input_set_drvdata(in_dev, ts);
drivers/input/touchscreen/bu21013_ts.c
454
touchscreen_parse_properties(in_dev, true, &ts->props);
drivers/input/touchscreen/bu21013_ts.c
457
if (!ts->props.invert_x &&
drivers/input/touchscreen/bu21013_ts.c
464
if (!ts->props.invert_y &&
drivers/input/touchscreen/bu21013_ts.c
479
ts->regulator = devm_regulator_get(dev, "avdd");
drivers/input/touchscreen/bu21013_ts.c
480
if (IS_ERR(ts->regulator)) {
drivers/input/touchscreen/bu21013_ts.c
482
return PTR_ERR(ts->regulator);
drivers/input/touchscreen/bu21013_ts.c
485
error = regulator_enable(ts->regulator);
drivers/input/touchscreen/bu21013_ts.c
491
error = devm_add_action_or_reset(dev, bu21013_power_off, ts);
drivers/input/touchscreen/bu21013_ts.c
498
ts->cs_gpiod = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
drivers/input/touchscreen/bu21013_ts.c
499
if (IS_ERR(ts->cs_gpiod))
drivers/input/touchscreen/bu21013_ts.c
500
return dev_err_probe(dev, PTR_ERR(ts->cs_gpiod), "failed to get CS GPIO\n");
drivers/input/touchscreen/bu21013_ts.c
502
gpiod_set_consumer_name(ts->cs_gpiod, "BU21013 CS");
drivers/input/touchscreen/bu21013_ts.c
504
error = devm_add_action_or_reset(dev, bu21013_disable_chip, ts);
drivers/input/touchscreen/bu21013_ts.c
511
ts->int_gpiod = devm_gpiod_get_optional(dev, "touch", GPIOD_IN);
drivers/input/touchscreen/bu21013_ts.c
512
error = PTR_ERR_OR_ZERO(ts->int_gpiod);
drivers/input/touchscreen/bu21013_ts.c
516
if (ts->int_gpiod)
drivers/input/touchscreen/bu21013_ts.c
517
gpiod_set_consumer_name(ts->int_gpiod, "BU21013 INT");
drivers/input/touchscreen/bu21013_ts.c
520
error = bu21013_init_chip(ts);
drivers/input/touchscreen/bu21013_ts.c
527
IRQF_ONESHOT, DRIVER_TP, ts);
drivers/input/touchscreen/bu21013_ts.c
539
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/bu21013_ts.c
546
struct bu21013_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/bu21013_ts.c
549
ts->touch_stopped = true;
drivers/input/touchscreen/bu21013_ts.c
556
struct bu21013_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/bu21013_ts.c
558
ts->touch_stopped = true;
drivers/input/touchscreen/bu21013_ts.c
563
regulator_disable(ts->regulator);
drivers/input/touchscreen/bu21013_ts.c
571
struct bu21013_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/bu21013_ts.c
575
error = regulator_enable(ts->regulator);
drivers/input/touchscreen/bu21013_ts.c
582
error = bu21013_init_chip(ts);
drivers/input/touchscreen/bu21013_ts.c
590
ts->touch_stopped = false;
drivers/input/touchscreen/cy8ctma140.c
102
.addr = ts->client->addr,
drivers/input/touchscreen/cy8ctma140.c
107
.addr = ts->client->addr,
drivers/input/touchscreen/cy8ctma140.c
116
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/cy8ctma140.c
119
dev_err(ts->dev, "error reading message: %d\n", ret);
drivers/input/touchscreen/cy8ctma140.c
121
dev_err(ts->dev, "wrong number of messages\n");
drivers/input/touchscreen/cy8ctma140.c
126
dev_dbg(ts->dev, "invalid event\n");
drivers/input/touchscreen/cy8ctma140.c
132
dev_err(ts->dev, "unexpected number of fingers: %d\n",
drivers/input/touchscreen/cy8ctma140.c
137
cy8ctma140_report(ts, buf, n_fingers);
drivers/input/touchscreen/cy8ctma140.c
143
static int cy8ctma140_init(struct cy8ctma140 *ts)
drivers/input/touchscreen/cy8ctma140.c
150
ret = i2c_master_send(ts->client, addr, 1);
drivers/input/touchscreen/cy8ctma140.c
152
dev_err(ts->dev, "error sending FW info message\n");
drivers/input/touchscreen/cy8ctma140.c
155
ret = i2c_master_recv(ts->client, buf, 5);
drivers/input/touchscreen/cy8ctma140.c
157
dev_err(ts->dev, "error receiving FW info message\n");
drivers/input/touchscreen/cy8ctma140.c
161
dev_err(ts->dev, "got only %d bytes\n", ret);
drivers/input/touchscreen/cy8ctma140.c
165
dev_dbg(ts->dev, "vendor %c%c, HW ID %.2d, FW ver %.4d\n",
drivers/input/touchscreen/cy8ctma140.c
171
static int cy8ctma140_power_up(struct cy8ctma140 *ts)
drivers/input/touchscreen/cy8ctma140.c
175
error = regulator_bulk_enable(ARRAY_SIZE(ts->regulators),
drivers/input/touchscreen/cy8ctma140.c
176
ts->regulators);
drivers/input/touchscreen/cy8ctma140.c
178
dev_err(ts->dev, "failed to enable regulators\n");
drivers/input/touchscreen/cy8ctma140.c
187
static void cy8ctma140_power_down(struct cy8ctma140 *ts)
drivers/input/touchscreen/cy8ctma140.c
189
regulator_bulk_disable(ARRAY_SIZE(ts->regulators),
drivers/input/touchscreen/cy8ctma140.c
190
ts->regulators);
drivers/input/touchscreen/cy8ctma140.c
196
struct cy8ctma140 *ts = d;
drivers/input/touchscreen/cy8ctma140.c
198
cy8ctma140_power_down(ts);
drivers/input/touchscreen/cy8ctma140.c
203
struct cy8ctma140 *ts;
drivers/input/touchscreen/cy8ctma140.c
208
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/cy8ctma140.c
209
if (!ts)
drivers/input/touchscreen/cy8ctma140.c
216
ts->dev = dev;
drivers/input/touchscreen/cy8ctma140.c
217
ts->client = client;
drivers/input/touchscreen/cy8ctma140.c
218
ts->input = input;
drivers/input/touchscreen/cy8ctma140.c
237
touchscreen_parse_properties(input, true, &ts->props);
drivers/input/touchscreen/cy8ctma140.c
248
input_set_drvdata(input, ts);
drivers/input/touchscreen/cy8ctma140.c
257
ts->regulators[0].supply = "vcpin";
drivers/input/touchscreen/cy8ctma140.c
258
ts->regulators[1].supply = "vdd";
drivers/input/touchscreen/cy8ctma140.c
259
error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->regulators),
drivers/input/touchscreen/cy8ctma140.c
260
ts->regulators);
drivers/input/touchscreen/cy8ctma140.c
264
error = cy8ctma140_power_up(ts);
drivers/input/touchscreen/cy8ctma140.c
268
error = devm_add_action_or_reset(dev, cy8ctma140_power_off_action, ts);
drivers/input/touchscreen/cy8ctma140.c
276
IRQF_ONESHOT, CY8CTMA140_NAME, ts);
drivers/input/touchscreen/cy8ctma140.c
282
error = cy8ctma140_init(ts);
drivers/input/touchscreen/cy8ctma140.c
290
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/cy8ctma140.c
298
struct cy8ctma140 *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/cy8ctma140.c
301
cy8ctma140_power_down(ts);
drivers/input/touchscreen/cy8ctma140.c
309
struct cy8ctma140 *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/cy8ctma140.c
313
error = cy8ctma140_power_up(ts);
drivers/input/touchscreen/cy8ctma140.c
55
static void cy8ctma140_report(struct cy8ctma140 *ts, u8 *data, int n_fingers)
drivers/input/touchscreen/cy8ctma140.c
74
slot = input_mt_get_slot_by_key(ts->input, id);
drivers/input/touchscreen/cy8ctma140.c
82
dev_dbg(ts->dev, "finger %d: ID %02x (%d, %d) w: %d\n",
drivers/input/touchscreen/cy8ctma140.c
85
input_mt_slot(ts->input, slot);
drivers/input/touchscreen/cy8ctma140.c
86
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
drivers/input/touchscreen/cy8ctma140.c
87
touchscreen_report_pos(ts->input, &ts->props, x, y, true);
drivers/input/touchscreen/cy8ctma140.c
88
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, w);
drivers/input/touchscreen/cy8ctma140.c
91
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/cy8ctma140.c
92
input_sync(ts->input);
drivers/input/touchscreen/cy8ctma140.c
97
struct cy8ctma140 *ts = d;
drivers/input/touchscreen/cy8ctmg110_ts.c
137
static int cy8ctmg110_set_sleepmode(struct cy8ctmg110 *ts, bool sleep)
drivers/input/touchscreen/cy8ctmg110_ts.c
151
return cy8ctmg110_write_regs(ts, CY8CTMG110_TOUCH_WAKEUP_TIME, 3, reg_p);
drivers/input/touchscreen/cy8ctmg110_ts.c
165
struct cy8ctmg110 *ts = _ts;
drivers/input/touchscreen/cy8ctmg110_ts.c
167
cy8ctmg110_set_sleepmode(ts, true);
drivers/input/touchscreen/cy8ctmg110_ts.c
168
cy8ctmg110_power(ts, false);
drivers/input/touchscreen/cy8ctmg110_ts.c
173
struct cy8ctmg110 *ts;
drivers/input/touchscreen/cy8ctmg110_ts.c
181
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/cy8ctmg110_ts.c
182
if (!ts)
drivers/input/touchscreen/cy8ctmg110_ts.c
189
ts->client = client;
drivers/input/touchscreen/cy8ctmg110_ts.c
190
ts->input = input_dev;
drivers/input/touchscreen/cy8ctmg110_ts.c
192
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/cy8ctmg110_ts.c
196
input_dev->phys = ts->phys;
drivers/input/touchscreen/cy8ctmg110_ts.c
206
ts->reset_gpio = devm_gpiod_get_optional(&client->dev, NULL,
drivers/input/touchscreen/cy8ctmg110_ts.c
208
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/cy8ctmg110_ts.c
209
err = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/cy8ctmg110_ts.c
215
cy8ctmg110_power(ts, true);
drivers/input/touchscreen/cy8ctmg110_ts.c
216
cy8ctmg110_set_sleepmode(ts, false);
drivers/input/touchscreen/cy8ctmg110_ts.c
218
err = devm_add_action_or_reset(&client->dev, cy8ctmg110_shut_off, ts);
drivers/input/touchscreen/cy8ctmg110_ts.c
224
IRQF_ONESHOT, "touch_reset_key", ts);
drivers/input/touchscreen/cy8ctmg110_ts.c
235
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/cy8ctmg110_ts.c
243
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/cy8ctmg110_ts.c
246
cy8ctmg110_set_sleepmode(ts, true);
drivers/input/touchscreen/cy8ctmg110_ts.c
247
cy8ctmg110_power(ts, false);
drivers/input/touchscreen/cy8ctmg110_ts.c
256
struct cy8ctmg110 *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/cy8ctmg110_ts.c
259
cy8ctmg110_power(ts, true);
drivers/input/touchscreen/cy8ctmg110_ts.c
260
cy8ctmg110_set_sleepmode(ts, false);
drivers/input/touchscreen/cy8ctmg110_ts.c
55
static void cy8ctmg110_power(struct cy8ctmg110 *ts, bool poweron)
drivers/input/touchscreen/cy8ctmg110_ts.c
57
if (ts->reset_gpio)
drivers/input/touchscreen/cy8ctmg110_ts.c
58
gpiod_set_value_cansleep(ts->reset_gpio, !poweron);
drivers/input/touchscreen/cyttsp5.c
218
static int cyttsp5_read(struct cyttsp5 *ts, u8 *buf, u32 max)
drivers/input/touchscreen/cyttsp5.c
225
error = regmap_bulk_read(ts->regmap, HID_INPUT_REG, temp, sizeof(temp));
drivers/input/touchscreen/cyttsp5.c
237
return regmap_bulk_read(ts->regmap, HID_INPUT_REG, buf, size);
drivers/input/touchscreen/cyttsp5.c
240
static int cyttsp5_write(struct cyttsp5 *ts, unsigned int reg, u8 *data,
drivers/input/touchscreen/cyttsp5.c
262
return regmap_bulk_write(ts->regmap, reg & 0xFF, cmd, size + 1);
drivers/input/touchscreen/cyttsp5.c
276
static void cyttsp5_get_touch_record(struct cyttsp5 *ts,
drivers/input/touchscreen/cyttsp5.c
279
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
290
static void cyttsp5_get_mt_touches(struct cyttsp5 *ts,
drivers/input/touchscreen/cyttsp5.c
293
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
302
switch (ts->input_buf[2]) {
drivers/input/touchscreen/cyttsp5.c
312
tch_addr = ts->input_buf + offset + (i * TOUCH_REPORT_SIZE);
drivers/input/touchscreen/cyttsp5.c
313
cyttsp5_get_touch_record(ts, tch, tch_addr);
drivers/input/touchscreen/cyttsp5.c
322
input_mt_slot(ts->input, t);
drivers/input/touchscreen/cyttsp5.c
323
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
drivers/input/touchscreen/cyttsp5.c
327
touchscreen_report_pos(ts->input, &ts->prop,
drivers/input/touchscreen/cyttsp5.c
330
input_report_abs(ts->input, ABS_MT_PRESSURE,
drivers/input/touchscreen/cyttsp5.c
334
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR,
drivers/input/touchscreen/cyttsp5.c
336
input_report_abs(ts->input, ABS_MT_TOUCH_MINOR,
drivers/input/touchscreen/cyttsp5.c
340
ts->num_prv_rec = num_cur_tch;
drivers/input/touchscreen/cyttsp5.c
345
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
346
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
353
ts->input_buf + 3 + si->tch_hdr.ofs,
drivers/input/touchscreen/cyttsp5.c
361
if (num_cur_tch == 0 && ts->num_prv_rec == 0)
drivers/input/touchscreen/cyttsp5.c
366
cyttsp5_get_mt_touches(ts, &tch, num_cur_tch);
drivers/input/touchscreen/cyttsp5.c
368
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/cyttsp5.c
369
input_sync(ts->input);
drivers/input/touchscreen/cyttsp5.c
376
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
377
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
388
input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, max_x, 0, 0);
drivers/input/touchscreen/cyttsp5.c
389
input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, max_y, 0, 0);
drivers/input/touchscreen/cyttsp5.c
390
input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, max_p, 0, 0);
drivers/input/touchscreen/cyttsp5.c
392
input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, MAX_AREA, 0, 0);
drivers/input/touchscreen/cyttsp5.c
393
input_set_abs_params(ts->input, ABS_MT_TOUCH_MINOR, 0, MAX_AREA, 0, 0);
drivers/input/touchscreen/cyttsp5.c
395
error = input_mt_init_slots(ts->input, si->tch_abs[CY_TCH_T].max,
drivers/input/touchscreen/cyttsp5.c
400
error = input_register_device(ts->input);
drivers/input/touchscreen/cyttsp5.c
411
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
412
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
426
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
427
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
431
switch (ts->input_buf[2]) {
drivers/input/touchscreen/cyttsp5.c
440
if (ts->input_buf[2] != HID_BTN_REPORT_ID)
drivers/input/touchscreen/cyttsp5.c
446
cur_btn_state = (ts->input_buf[offset] >> (cur_btn * CY_BITS_PER_BTN))
drivers/input/touchscreen/cyttsp5.c
449
input_report_key(ts->input, si->key_code[cur_btn],
drivers/input/touchscreen/cyttsp5.c
451
input_sync(ts->input);
drivers/input/touchscreen/cyttsp5.c
457
static int cyttsp5_validate_cmd_response(struct cyttsp5 *ts, u8 code)
drivers/input/touchscreen/cyttsp5.c
463
size = get_unaligned_le16(&ts->response_buf[0]);
drivers/input/touchscreen/cyttsp5.c
467
report_id = ts->response_buf[HID_OUTPUT_RESPONSE_REPORT_OFFSET];
drivers/input/touchscreen/cyttsp5.c
471
if (ts->response_buf[4] != HID_OUTPUT_BL_SOP) {
drivers/input/touchscreen/cyttsp5.c
472
dev_err(ts->dev, "HID output response, wrong SOP\n");
drivers/input/touchscreen/cyttsp5.c
476
if (ts->response_buf[size - 1] != HID_OUTPUT_BL_EOP) {
drivers/input/touchscreen/cyttsp5.c
477
dev_err(ts->dev, "HID output response, wrong EOP\n");
drivers/input/touchscreen/cyttsp5.c
481
crc = crc_itu_t(0xFFFF, &ts->response_buf[4], size - 7);
drivers/input/touchscreen/cyttsp5.c
482
if (get_unaligned_le16(&ts->response_buf[size - 3]) != crc) {
drivers/input/touchscreen/cyttsp5.c
483
dev_err(ts->dev,
drivers/input/touchscreen/cyttsp5.c
489
status = ts->response_buf[5];
drivers/input/touchscreen/cyttsp5.c
491
dev_err(ts->dev, "HID output response, ERROR:%d\n",
drivers/input/touchscreen/cyttsp5.c
498
command_code = ts->response_buf[HID_OUTPUT_RESPONSE_CMD_OFFSET]
drivers/input/touchscreen/cyttsp5.c
501
dev_err(ts->dev,
drivers/input/touchscreen/cyttsp5.c
512
static void cyttsp5_si_get_btn_data(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
514
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
515
unsigned int btns = ts->response_buf[HID_SYSINFO_BTN_OFFSET] &
drivers/input/touchscreen/cyttsp5.c
521
static int cyttsp5_get_sysinfo_regs(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
523
struct cyttsp5_sensing_conf_data *scd = &ts->sysinfo.sensing_conf_data;
drivers/input/touchscreen/cyttsp5.c
526
&ts->response_buf[HID_SYSINFO_SENSING_OFFSET];
drivers/input/touchscreen/cyttsp5.c
528
cyttsp5_si_get_btn_data(ts);
drivers/input/touchscreen/cyttsp5.c
540
static int cyttsp5_hid_output_get_sysinfo(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
551
rc = cyttsp5_write(ts, HID_OUTPUT_REG, cmd,
drivers/input/touchscreen/cyttsp5.c
554
dev_err(ts->dev, "Failed to write command %d", rc);
drivers/input/touchscreen/cyttsp5.c
558
rc = wait_for_completion_interruptible_timeout(&ts->cmd_done,
drivers/input/touchscreen/cyttsp5.c
561
dev_err(ts->dev, "HID output cmd execution timed out\n");
drivers/input/touchscreen/cyttsp5.c
566
rc = cyttsp5_validate_cmd_response(ts, HID_OUTPUT_GET_SYSINFO);
drivers/input/touchscreen/cyttsp5.c
568
dev_err(ts->dev, "Validation of the response failed\n");
drivers/input/touchscreen/cyttsp5.c
572
return cyttsp5_get_sysinfo_regs(ts);
drivers/input/touchscreen/cyttsp5.c
575
static int cyttsp5_power_control(struct cyttsp5 *ts, bool on)
drivers/input/touchscreen/cyttsp5.c
585
rc = cyttsp5_write(ts, HID_COMMAND_REG, cmd, sizeof(cmd));
drivers/input/touchscreen/cyttsp5.c
587
dev_err(ts->dev, "Failed to write power command %d", rc);
drivers/input/touchscreen/cyttsp5.c
591
rc = wait_for_completion_interruptible_timeout(&ts->cmd_done,
drivers/input/touchscreen/cyttsp5.c
594
dev_err(ts->dev, "HID power cmd execution timed out\n");
drivers/input/touchscreen/cyttsp5.c
598
if (ts->response_buf[2] != HID_RESPONSE_REPORT_ID ||
drivers/input/touchscreen/cyttsp5.c
599
(ts->response_buf[3] & 0x03) != state ||
drivers/input/touchscreen/cyttsp5.c
600
(ts->response_buf[4] & 0x0f) != HID_CMD_SET_POWER) {
drivers/input/touchscreen/cyttsp5.c
601
dev_err(ts->dev, "Validation of the %s response failed\n",
drivers/input/touchscreen/cyttsp5.c
609
static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
625
rc = cyttsp5_write(ts, HID_OUTPUT_REG, cmd,
drivers/input/touchscreen/cyttsp5.c
628
dev_err(ts->dev, "Failed to write command %d", rc);
drivers/input/touchscreen/cyttsp5.c
632
rc = wait_for_completion_interruptible_timeout(&ts->cmd_done,
drivers/input/touchscreen/cyttsp5.c
635
dev_err(ts->dev, "HID output cmd execution timed out\n");
drivers/input/touchscreen/cyttsp5.c
640
rc = cyttsp5_validate_cmd_response(ts, HID_OUTPUT_BL_LAUNCH_APP);
drivers/input/touchscreen/cyttsp5.c
642
dev_err(ts->dev, "Validation of the response failed\n");
drivers/input/touchscreen/cyttsp5.c
649
static int cyttsp5_get_hid_descriptor(struct cyttsp5 *ts,
drivers/input/touchscreen/cyttsp5.c
652
struct device *dev = ts->dev;
drivers/input/touchscreen/cyttsp5.c
655
rc = cyttsp5_write(ts, HID_DESC_REG, NULL, 0);
drivers/input/touchscreen/cyttsp5.c
661
rc = wait_for_completion_interruptible_timeout(&ts->cmd_done,
drivers/input/touchscreen/cyttsp5.c
664
dev_err(ts->dev, "HID get descriptor timed out\n");
drivers/input/touchscreen/cyttsp5.c
669
memcpy(desc, ts->response_buf, sizeof(*desc));
drivers/input/touchscreen/cyttsp5.c
697
struct cyttsp5 *ts = handle;
drivers/input/touchscreen/cyttsp5.c
702
error = cyttsp5_read(ts, ts->input_buf, CY_MAX_INPUT);
drivers/input/touchscreen/cyttsp5.c
706
size = get_unaligned_le16(&ts->input_buf[0]);
drivers/input/touchscreen/cyttsp5.c
712
report_id = ts->input_buf[2];
drivers/input/touchscreen/cyttsp5.c
717
cyttsp5_mt_attention(ts->dev);
drivers/input/touchscreen/cyttsp5.c
720
cyttsp5_btn_attention(ts->dev);
drivers/input/touchscreen/cyttsp5.c
723
memcpy(ts->response_buf, ts->input_buf, size);
drivers/input/touchscreen/cyttsp5.c
724
complete(&ts->cmd_done);
drivers/input/touchscreen/cyttsp5.c
728
memcpy(ts->response_buf, ts->input_buf, size);
drivers/input/touchscreen/cyttsp5.c
729
complete(&ts->cmd_done);
drivers/input/touchscreen/cyttsp5.c
735
static int cyttsp5_deassert_int(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
741
error = regmap_bulk_read(ts->regmap, HID_INPUT_REG, buf, sizeof(buf));
drivers/input/touchscreen/cyttsp5.c
752
static int cyttsp5_fill_all_touch(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
754
struct cyttsp5_sysinfo *si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
774
static int cyttsp5_startup(struct cyttsp5 *ts)
drivers/input/touchscreen/cyttsp5.c
778
error = cyttsp5_deassert_int(ts);
drivers/input/touchscreen/cyttsp5.c
780
dev_err(ts->dev, "Error on deassert int r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
788
error = cyttsp5_hid_output_bl_launch_app(ts);
drivers/input/touchscreen/cyttsp5.c
790
dev_err(ts->dev, "Error on launch app r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
794
error = cyttsp5_get_hid_descriptor(ts, &ts->hid_desc);
drivers/input/touchscreen/cyttsp5.c
796
dev_err(ts->dev, "Error on getting HID descriptor r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
800
error = cyttsp5_fill_all_touch(ts);
drivers/input/touchscreen/cyttsp5.c
802
dev_err(ts->dev, "Error on report descriptor r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
806
error = cyttsp5_hid_output_get_sysinfo(ts);
drivers/input/touchscreen/cyttsp5.c
808
dev_err(ts->dev, "Error on getting sysinfo r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
817
struct cyttsp5 *ts = data;
drivers/input/touchscreen/cyttsp5.c
819
regulator_bulk_disable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/cyttsp5.c
825
struct cyttsp5 *ts;
drivers/input/touchscreen/cyttsp5.c
829
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/cyttsp5.c
830
if (!ts)
drivers/input/touchscreen/cyttsp5.c
834
ts->regmap = regmap;
drivers/input/touchscreen/cyttsp5.c
835
ts->dev = dev;
drivers/input/touchscreen/cyttsp5.c
836
si = &ts->sysinfo;
drivers/input/touchscreen/cyttsp5.c
837
dev_set_drvdata(dev, ts);
drivers/input/touchscreen/cyttsp5.c
839
init_completion(&ts->cmd_done);
drivers/input/touchscreen/cyttsp5.c
842
ts->supplies[0].supply = "vdd";
drivers/input/touchscreen/cyttsp5.c
843
ts->supplies[1].supply = "vddio";
drivers/input/touchscreen/cyttsp5.c
844
error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->supplies),
drivers/input/touchscreen/cyttsp5.c
845
ts->supplies);
drivers/input/touchscreen/cyttsp5.c
847
dev_err(ts->dev, "Failed to get regulators, error %d\n", error);
drivers/input/touchscreen/cyttsp5.c
851
error = devm_add_action_or_reset(dev, cyttsp5_cleanup, ts);
drivers/input/touchscreen/cyttsp5.c
855
error = regulator_bulk_enable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/cyttsp5.c
857
dev_err(ts->dev, "Failed to enable regulators, error %d\n", error);
drivers/input/touchscreen/cyttsp5.c
861
ts->input = devm_input_allocate_device(dev);
drivers/input/touchscreen/cyttsp5.c
862
if (!ts->input) {
drivers/input/touchscreen/cyttsp5.c
867
ts->input->name = "cyttsp5";
drivers/input/touchscreen/cyttsp5.c
868
scnprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(dev));
drivers/input/touchscreen/cyttsp5.c
869
ts->input->phys = ts->phys;
drivers/input/touchscreen/cyttsp5.c
870
input_set_drvdata(ts->input, ts);
drivers/input/touchscreen/cyttsp5.c
873
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
drivers/input/touchscreen/cyttsp5.c
874
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/cyttsp5.c
875
error = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/cyttsp5.c
882
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/cyttsp5.c
888
IRQF_ONESHOT, name, ts);
drivers/input/touchscreen/cyttsp5.c
894
error = cyttsp5_startup(ts);
drivers/input/touchscreen/cyttsp5.c
896
dev_err(ts->dev, "Fail initial startup r=%d\n", error);
drivers/input/touchscreen/cyttsp5.c
902
dev_err(ts->dev, "Error while parsing dts %d\n", error);
drivers/input/touchscreen/cyttsp5.c
906
touchscreen_parse_properties(ts->input, true, &ts->prop);
drivers/input/touchscreen/cyttsp5.c
908
__set_bit(EV_KEY, ts->input->evbit);
drivers/input/touchscreen/cyttsp5.c
910
__set_bit(si->key_code[i], ts->input->keybit);
drivers/input/touchscreen/cyttsp5.c
947
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
950
cyttsp5_power_control(ts, false);
drivers/input/touchscreen/cyttsp5.c
957
struct cyttsp5 *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp5.c
960
cyttsp5_power_control(ts, true);
drivers/input/touchscreen/cyttsp_core.c
103
error = ts->bus_ops->write(ts->dev, ts->xfer_buf, command,
drivers/input/touchscreen/cyttsp_core.c
114
static int ttsp_send_command(struct cyttsp *ts, u8 cmd)
drivers/input/touchscreen/cyttsp_core.c
116
return ttsp_write_block_data(ts, CY_REG_BASE, sizeof(cmd), &cmd);
drivers/input/touchscreen/cyttsp_core.c
119
static int cyttsp_handshake(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
121
if (ts->use_hndshk)
drivers/input/touchscreen/cyttsp_core.c
122
return ttsp_send_command(ts,
drivers/input/touchscreen/cyttsp_core.c
123
ts->xy_data.hst_mode ^ CY_HNDSHK_BIT);
drivers/input/touchscreen/cyttsp_core.c
128
static int cyttsp_load_bl_regs(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
130
memset(&ts->bl_data, 0, sizeof(ts->bl_data));
drivers/input/touchscreen/cyttsp_core.c
131
ts->bl_data.bl_status = 0x10;
drivers/input/touchscreen/cyttsp_core.c
133
return ttsp_read_block_data(ts, CY_REG_BASE,
drivers/input/touchscreen/cyttsp_core.c
134
sizeof(ts->bl_data), &ts->bl_data);
drivers/input/touchscreen/cyttsp_core.c
137
static int cyttsp_exit_bl_mode(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
143
if (ts->bl_keys)
drivers/input/touchscreen/cyttsp_core.c
145
ts->bl_keys, CY_NUM_BL_KEYS);
drivers/input/touchscreen/cyttsp_core.c
147
error = ttsp_write_block_data(ts, CY_REG_BASE,
drivers/input/touchscreen/cyttsp_core.c
155
error = cyttsp_load_bl_regs(ts);
drivers/input/touchscreen/cyttsp_core.c
159
if (GET_BOOTLOADERMODE(ts->bl_data.bl_status))
drivers/input/touchscreen/cyttsp_core.c
165
static int cyttsp_set_operational_mode(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
169
error = ttsp_send_command(ts, CY_OPERATE_MODE);
drivers/input/touchscreen/cyttsp_core.c
174
error = ttsp_read_block_data(ts, CY_REG_BASE,
drivers/input/touchscreen/cyttsp_core.c
175
sizeof(ts->xy_data), &ts->xy_data);
drivers/input/touchscreen/cyttsp_core.c
179
error = cyttsp_handshake(ts);
drivers/input/touchscreen/cyttsp_core.c
183
return ts->xy_data.act_dist == CY_ACT_DIST_DFLT ? -EIO : 0;
drivers/input/touchscreen/cyttsp_core.c
186
static int cyttsp_set_sysinfo_mode(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
190
memset(&ts->sysinfo_data, 0, sizeof(ts->sysinfo_data));
drivers/input/touchscreen/cyttsp_core.c
193
error = ttsp_send_command(ts, CY_SYSINFO_MODE);
drivers/input/touchscreen/cyttsp_core.c
199
error = ttsp_read_block_data(ts, CY_REG_BASE, sizeof(ts->sysinfo_data),
drivers/input/touchscreen/cyttsp_core.c
200
&ts->sysinfo_data);
drivers/input/touchscreen/cyttsp_core.c
204
error = cyttsp_handshake(ts);
drivers/input/touchscreen/cyttsp_core.c
208
if (!ts->sysinfo_data.tts_verh && !ts->sysinfo_data.tts_verl)
drivers/input/touchscreen/cyttsp_core.c
214
static int cyttsp_set_sysinfo_regs(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
218
if (ts->act_intrvl != CY_ACT_INTRVL_DFLT ||
drivers/input/touchscreen/cyttsp_core.c
219
ts->tch_tmout != CY_TCH_TMOUT_DFLT ||
drivers/input/touchscreen/cyttsp_core.c
220
ts->lp_intrvl != CY_LP_INTRVL_DFLT) {
drivers/input/touchscreen/cyttsp_core.c
223
ts->act_intrvl,
drivers/input/touchscreen/cyttsp_core.c
224
ts->tch_tmout,
drivers/input/touchscreen/cyttsp_core.c
225
ts->lp_intrvl
drivers/input/touchscreen/cyttsp_core.c
229
retval = ttsp_write_block_data(ts, CY_REG_ACT_INTRVL,
drivers/input/touchscreen/cyttsp_core.c
237
static void cyttsp_hard_reset(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
239
if (ts->reset_gpio) {
drivers/input/touchscreen/cyttsp_core.c
246
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/cyttsp_core.c
248
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/cyttsp_core.c
253
static int cyttsp_soft_reset(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
258
reinit_completion(&ts->bl_ready);
drivers/input/touchscreen/cyttsp_core.c
259
ts->state = CY_BL_STATE;
drivers/input/touchscreen/cyttsp_core.c
261
enable_irq(ts->irq);
drivers/input/touchscreen/cyttsp_core.c
263
retval = ttsp_send_command(ts, CY_SOFT_RESET_MODE);
drivers/input/touchscreen/cyttsp_core.c
265
dev_err(ts->dev, "failed to send soft reset\n");
drivers/input/touchscreen/cyttsp_core.c
269
if (!wait_for_completion_timeout(&ts->bl_ready,
drivers/input/touchscreen/cyttsp_core.c
271
dev_err(ts->dev, "timeout waiting for soft reset\n");
drivers/input/touchscreen/cyttsp_core.c
276
ts->state = CY_IDLE_STATE;
drivers/input/touchscreen/cyttsp_core.c
277
disable_irq(ts->irq);
drivers/input/touchscreen/cyttsp_core.c
281
static int cyttsp_act_dist_setup(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
283
u8 act_dist_setup = ts->act_dist;
drivers/input/touchscreen/cyttsp_core.c
286
return ttsp_write_block_data(ts, CY_REG_ACT_DIST,
drivers/input/touchscreen/cyttsp_core.c
315
static void cyttsp_report_tchdata(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
317
struct cyttsp_xydata *xy_data = &ts->xy_data;
drivers/input/touchscreen/cyttsp_core.c
318
struct input_dev *input = ts->input;
drivers/input/touchscreen/cyttsp_core.c
328
dev_dbg(ts->dev, "%s: Large area detected\n", __func__);
drivers/input/touchscreen/cyttsp_core.c
332
dev_dbg(ts->dev, "%s: Num touch error detected\n", __func__);
drivers/input/touchscreen/cyttsp_core.c
336
dev_dbg(ts->dev, "%s: Invalid buffer detected\n", __func__);
drivers/input/touchscreen/cyttsp_core.c
368
struct cyttsp *ts = handle;
drivers/input/touchscreen/cyttsp_core.c
371
if (unlikely(ts->state == CY_BL_STATE)) {
drivers/input/touchscreen/cyttsp_core.c
372
complete(&ts->bl_ready);
drivers/input/touchscreen/cyttsp_core.c
377
error = ttsp_read_block_data(ts, CY_REG_BASE,
drivers/input/touchscreen/cyttsp_core.c
378
sizeof(struct cyttsp_xydata), &ts->xy_data);
drivers/input/touchscreen/cyttsp_core.c
383
error = cyttsp_handshake(ts);
drivers/input/touchscreen/cyttsp_core.c
387
if (unlikely(ts->state == CY_IDLE_STATE))
drivers/input/touchscreen/cyttsp_core.c
390
if (GET_BOOTLOADERMODE(ts->xy_data.tt_mode)) {
drivers/input/touchscreen/cyttsp_core.c
395
error = cyttsp_exit_bl_mode(ts);
drivers/input/touchscreen/cyttsp_core.c
397
dev_err(ts->dev,
drivers/input/touchscreen/cyttsp_core.c
400
ts->state = CY_IDLE_STATE;
drivers/input/touchscreen/cyttsp_core.c
403
cyttsp_report_tchdata(ts);
drivers/input/touchscreen/cyttsp_core.c
410
static int cyttsp_power_on(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
414
error = cyttsp_soft_reset(ts);
drivers/input/touchscreen/cyttsp_core.c
418
error = cyttsp_load_bl_regs(ts);
drivers/input/touchscreen/cyttsp_core.c
422
if (GET_BOOTLOADERMODE(ts->bl_data.bl_status) &&
drivers/input/touchscreen/cyttsp_core.c
423
IS_VALID_APP(ts->bl_data.bl_status)) {
drivers/input/touchscreen/cyttsp_core.c
424
error = cyttsp_exit_bl_mode(ts);
drivers/input/touchscreen/cyttsp_core.c
426
dev_err(ts->dev, "failed to exit bootloader mode\n");
drivers/input/touchscreen/cyttsp_core.c
431
if (GET_HSTMODE(ts->bl_data.bl_file) != CY_OPERATE_MODE ||
drivers/input/touchscreen/cyttsp_core.c
432
IS_OPERATIONAL_ERR(ts->bl_data.bl_status)) {
drivers/input/touchscreen/cyttsp_core.c
436
error = cyttsp_set_sysinfo_mode(ts);
drivers/input/touchscreen/cyttsp_core.c
440
error = cyttsp_set_sysinfo_regs(ts);
drivers/input/touchscreen/cyttsp_core.c
444
error = cyttsp_set_operational_mode(ts);
drivers/input/touchscreen/cyttsp_core.c
449
error = cyttsp_act_dist_setup(ts);
drivers/input/touchscreen/cyttsp_core.c
453
ts->state = CY_ACTIVE_STATE;
drivers/input/touchscreen/cyttsp_core.c
458
static int cyttsp_enable(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
468
error = ttsp_read_block_data(ts, CY_REG_BASE,
drivers/input/touchscreen/cyttsp_core.c
469
sizeof(ts->xy_data), &ts->xy_data);
drivers/input/touchscreen/cyttsp_core.c
473
if (GET_HSTMODE(ts->xy_data.hst_mode))
drivers/input/touchscreen/cyttsp_core.c
476
enable_irq(ts->irq);
drivers/input/touchscreen/cyttsp_core.c
481
static int cyttsp_disable(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
485
error = ttsp_send_command(ts, CY_LOW_POWER_MODE);
drivers/input/touchscreen/cyttsp_core.c
489
disable_irq(ts->irq);
drivers/input/touchscreen/cyttsp_core.c
496
struct cyttsp *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp_core.c
499
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/cyttsp_core.c
501
if (input_device_enabled(ts->input)) {
drivers/input/touchscreen/cyttsp_core.c
502
error = cyttsp_disable(ts);
drivers/input/touchscreen/cyttsp_core.c
507
ts->suspended = true;
drivers/input/touchscreen/cyttsp_core.c
513
struct cyttsp *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/cyttsp_core.c
515
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/cyttsp_core.c
517
if (input_device_enabled(ts->input))
drivers/input/touchscreen/cyttsp_core.c
518
cyttsp_enable(ts);
drivers/input/touchscreen/cyttsp_core.c
520
ts->suspended = false;
drivers/input/touchscreen/cyttsp_core.c
528
struct cyttsp *ts = input_get_drvdata(dev);
drivers/input/touchscreen/cyttsp_core.c
531
if (!ts->suspended)
drivers/input/touchscreen/cyttsp_core.c
532
retval = cyttsp_enable(ts);
drivers/input/touchscreen/cyttsp_core.c
539
struct cyttsp *ts = input_get_drvdata(dev);
drivers/input/touchscreen/cyttsp_core.c
541
if (!ts->suspended)
drivers/input/touchscreen/cyttsp_core.c
542
cyttsp_disable(ts);
drivers/input/touchscreen/cyttsp_core.c
545
static int cyttsp_parse_properties(struct cyttsp *ts)
drivers/input/touchscreen/cyttsp_core.c
547
struct device *dev = ts->dev;
drivers/input/touchscreen/cyttsp_core.c
551
ts->bl_keys = devm_kzalloc(dev, CY_NUM_BL_KEYS, GFP_KERNEL);
drivers/input/touchscreen/cyttsp_core.c
552
if (!ts->bl_keys)
drivers/input/touchscreen/cyttsp_core.c
556
ts->use_hndshk = false;
drivers/input/touchscreen/cyttsp_core.c
557
ts->act_dist = CY_ACT_DIST_DFLT;
drivers/input/touchscreen/cyttsp_core.c
558
ts->act_intrvl = CY_ACT_INTRVL_DFLT;
drivers/input/touchscreen/cyttsp_core.c
559
ts->tch_tmout = CY_TCH_TMOUT_DFLT;
drivers/input/touchscreen/cyttsp_core.c
560
ts->lp_intrvl = CY_LP_INTRVL_DFLT;
drivers/input/touchscreen/cyttsp_core.c
563
ts->bl_keys, CY_NUM_BL_KEYS);
drivers/input/touchscreen/cyttsp_core.c
570
ts->use_hndshk = device_property_present(dev, "use-handshake");
drivers/input/touchscreen/cyttsp_core.c
578
ts->act_dist &= ~CY_ACT_DIST_MASK;
drivers/input/touchscreen/cyttsp_core.c
579
ts->act_dist |= dt_value;
drivers/input/touchscreen/cyttsp_core.c
588
ts->act_intrvl = dt_value;
drivers/input/touchscreen/cyttsp_core.c
598
ts->lp_intrvl = dt_value / 10;
drivers/input/touchscreen/cyttsp_core.c
608
ts->tch_tmout = dt_value / 10;
drivers/input/touchscreen/cyttsp_core.c
622
struct cyttsp *ts;
drivers/input/touchscreen/cyttsp_core.c
626
ts = devm_kzalloc(dev, sizeof(*ts) + xfer_buf_size, GFP_KERNEL);
drivers/input/touchscreen/cyttsp_core.c
627
if (!ts)
drivers/input/touchscreen/cyttsp_core.c
634
ts->dev = dev;
drivers/input/touchscreen/cyttsp_core.c
635
ts->input = input_dev;
drivers/input/touchscreen/cyttsp_core.c
636
ts->bus_ops = bus_ops;
drivers/input/touchscreen/cyttsp_core.c
637
ts->irq = irq;
drivers/input/touchscreen/cyttsp_core.c
646
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
drivers/input/touchscreen/cyttsp_core.c
647
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/cyttsp_core.c
648
error = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/cyttsp_core.c
653
error = cyttsp_parse_properties(ts);
drivers/input/touchscreen/cyttsp_core.c
657
init_completion(&ts->bl_ready);
drivers/input/touchscreen/cyttsp_core.c
661
input_dev->dev.parent = ts->dev;
drivers/input/touchscreen/cyttsp_core.c
666
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/cyttsp_core.c
681
error = devm_request_threaded_irq(dev, ts->irq, NULL, cyttsp_irq,
drivers/input/touchscreen/cyttsp_core.c
683
"cyttsp", ts);
drivers/input/touchscreen/cyttsp_core.c
685
dev_err(ts->dev, "failed to request IRQ %d, err: %d\n",
drivers/input/touchscreen/cyttsp_core.c
686
ts->irq, error);
drivers/input/touchscreen/cyttsp_core.c
690
cyttsp_hard_reset(ts);
drivers/input/touchscreen/cyttsp_core.c
692
error = cyttsp_power_on(ts);
drivers/input/touchscreen/cyttsp_core.c
698
dev_err(ts->dev, "failed to register input device: %d\n",
drivers/input/touchscreen/cyttsp_core.c
703
return ts;
drivers/input/touchscreen/cyttsp_core.c
78
static int ttsp_read_block_data(struct cyttsp *ts, u8 command,
drivers/input/touchscreen/cyttsp_core.c
85
error = ts->bus_ops->read(ts->dev, ts->xfer_buf, command,
drivers/input/touchscreen/cyttsp_core.c
96
static int ttsp_write_block_data(struct cyttsp *ts, u8 command,
drivers/input/touchscreen/cyttsp_i2c.c
101
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/cyttsp_i2c.c
88
struct cyttsp *ts;
drivers/input/touchscreen/cyttsp_i2c.c
95
ts = cyttsp_probe(&cyttsp_i2c_bus_ops, &client->dev, client->irq,
drivers/input/touchscreen/cyttsp_i2c.c
98
if (IS_ERR(ts))
drivers/input/touchscreen/cyttsp_i2c.c
99
return PTR_ERR(ts);
drivers/input/touchscreen/cyttsp_spi.c
142
struct cyttsp *ts;
drivers/input/touchscreen/cyttsp_spi.c
155
ts = cyttsp_probe(&cyttsp_spi_bus_ops, &spi->dev, spi->irq,
drivers/input/touchscreen/cyttsp_spi.c
157
if (IS_ERR(ts))
drivers/input/touchscreen/cyttsp_spi.c
158
return PTR_ERR(ts);
drivers/input/touchscreen/cyttsp_spi.c
160
spi_set_drvdata(spi, ts);
drivers/input/touchscreen/egalax_ts.c
161
struct egalax_ts *ts;
drivers/input/touchscreen/egalax_ts.c
165
ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL);
drivers/input/touchscreen/egalax_ts.c
166
if (!ts) {
drivers/input/touchscreen/egalax_ts.c
177
ts->client = client;
drivers/input/touchscreen/egalax_ts.c
178
ts->input_dev = input_dev;
drivers/input/touchscreen/egalax_ts.c
208
IRQF_ONESHOT, "egalax_ts", ts);
drivers/input/touchscreen/egalax_ts.c
214
error = input_register_device(ts->input_dev);
drivers/input/touchscreen/egalax_ts.c
67
struct egalax_ts *ts = dev_id;
drivers/input/touchscreen/egalax_ts.c
68
struct input_dev *input_dev = ts->input_dev;
drivers/input/touchscreen/egalax_ts.c
69
struct i2c_client *client = ts->client;
drivers/input/touchscreen/ektf2127.c
101
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/ektf2127.c
102
input_sync(ts->input);
drivers/input/touchscreen/ektf2127.c
105
static void ektf2127_report2_contact(struct ektf2127_ts *ts, int slot,
drivers/input/touchscreen/ektf2127.c
108
input_mt_slot(ts->input, slot);
drivers/input/touchscreen/ektf2127.c
109
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, active);
drivers/input/touchscreen/ektf2127.c
115
touchscreen_report_pos(ts->input, &ts->prop, x, y, true);
drivers/input/touchscreen/ektf2127.c
119
static void ektf2127_report2_event(struct ektf2127_ts *ts, const u8 *buf)
drivers/input/touchscreen/ektf2127.c
121
ektf2127_report2_contact(ts, 0, &buf[1], !!(buf[7] & BIT(ts->status_shift)));
drivers/input/touchscreen/ektf2127.c
122
ektf2127_report2_contact(ts, 1, &buf[4], !!(buf[7] & BIT(ts->status_shift + 1)));
drivers/input/touchscreen/ektf2127.c
124
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/ektf2127.c
125
input_sync(ts->input);
drivers/input/touchscreen/ektf2127.c
130
struct ektf2127_ts *ts = dev_id;
drivers/input/touchscreen/ektf2127.c
131
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/ektf2127.c
135
ret = i2c_master_recv(ts->client, buf, EKTF2127_TOUCH_REPORT_SIZE);
drivers/input/touchscreen/ektf2127.c
143
ektf2127_report_event(ts, buf);
drivers/input/touchscreen/ektf2127.c
147
ektf2127_report2_event(ts, buf);
drivers/input/touchscreen/ektf2127.c
170
struct ektf2127_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/ektf2127.c
172
enable_irq(ts->client->irq);
drivers/input/touchscreen/ektf2127.c
173
gpiod_set_value_cansleep(ts->power_gpios, 1);
drivers/input/touchscreen/ektf2127.c
180
struct ektf2127_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/ektf2127.c
182
disable_irq(ts->client->irq);
drivers/input/touchscreen/ektf2127.c
183
gpiod_set_value_cansleep(ts->power_gpios, 0);
drivers/input/touchscreen/ektf2127.c
188
struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev));
drivers/input/touchscreen/ektf2127.c
190
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/ektf2127.c
192
if (input_device_enabled(ts->input))
drivers/input/touchscreen/ektf2127.c
193
ektf2127_stop(ts->input);
drivers/input/touchscreen/ektf2127.c
200
struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev));
drivers/input/touchscreen/ektf2127.c
202
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/ektf2127.c
204
if (input_device_enabled(ts->input))
drivers/input/touchscreen/ektf2127.c
205
ektf2127_start(ts->input);
drivers/input/touchscreen/ektf2127.c
257
struct ektf2127_ts *ts;
drivers/input/touchscreen/ektf2127.c
268
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/ektf2127.c
269
if (!ts)
drivers/input/touchscreen/ektf2127.c
273
ts->power_gpios = devm_gpiod_get(dev, "power", GPIOD_OUT_HIGH);
drivers/input/touchscreen/ektf2127.c
274
if (IS_ERR(ts->power_gpios))
drivers/input/touchscreen/ektf2127.c
275
return dev_err_probe(dev, PTR_ERR(ts->power_gpios), "Error getting power gpio\n");
drivers/input/touchscreen/ektf2127.c
286
ts->client = client;
drivers/input/touchscreen/ektf2127.c
290
i2c_master_recv(ts->client, buf, sizeof(buf));
drivers/input/touchscreen/ektf2127.c
303
touchscreen_parse_properties(input, true, &ts->prop);
drivers/input/touchscreen/ektf2127.c
312
ts->input = input;
drivers/input/touchscreen/ektf2127.c
318
ts->status_shift = chip_data->status_shift;
drivers/input/touchscreen/ektf2127.c
320
input_set_drvdata(input, ts);
drivers/input/touchscreen/ektf2127.c
324
IRQF_ONESHOT, client->name, ts);
drivers/input/touchscreen/ektf2127.c
331
ektf2127_stop(ts->input);
drivers/input/touchscreen/ektf2127.c
337
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/ektf2127.c
76
static void ektf2127_report_event(struct ektf2127_ts *ts, const u8 *buf)
drivers/input/touchscreen/ektf2127.c
84
dev_err(&ts->client->dev,
drivers/input/touchscreen/ektf2127.c
91
input_mt_assign_slots(ts->input, slots, touches,
drivers/input/touchscreen/ektf2127.c
95
input_mt_slot(ts->input, slots[i]);
drivers/input/touchscreen/ektf2127.c
96
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
drivers/input/touchscreen/ektf2127.c
97
touchscreen_report_pos(ts->input, &ts->prop,
drivers/input/touchscreen/elants_i2c.c
1007
dev_dbg(&ts->client->dev, "i=%d x=%d y=%d p=%d w=%d\n",
drivers/input/touchscreen/elants_i2c.c
1012
touchscreen_report_pos(input, &ts->prop, x, y, true);
drivers/input/touchscreen/elants_i2c.c
1037
static void elants_i2c_event(struct elants_data *ts, u8 *buf,
drivers/input/touchscreen/elants_i2c.c
1043
dev_warn(&ts->client->dev,
drivers/input/touchscreen/elants_i2c.c
1048
dev_warn(&ts->client->dev,
drivers/input/touchscreen/elants_i2c.c
1052
elants_i2c_mt_event(ts, buf, packet_size);
drivers/input/touchscreen/elants_i2c.c
1058
struct elants_data *ts = _dev;
drivers/input/touchscreen/elants_i2c.c
1059
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
1064
len = i2c_master_recv_dmasafe(client, ts->buf, sizeof(ts->buf));
drivers/input/touchscreen/elants_i2c.c
1072
__func__, HEADER_SIZE, ts->buf);
drivers/input/touchscreen/elants_i2c.c
1074
switch (ts->state) {
drivers/input/touchscreen/elants_i2c.c
1076
if (ts->buf[FW_HDR_TYPE] == CMD_HEADER_REK) {
drivers/input/touchscreen/elants_i2c.c
1077
memcpy(ts->cmd_resp, ts->buf, sizeof(ts->cmd_resp));
drivers/input/touchscreen/elants_i2c.c
1078
complete(&ts->cmd_done);
drivers/input/touchscreen/elants_i2c.c
1079
ts->state = ELAN_STATE_NORMAL;
drivers/input/touchscreen/elants_i2c.c
1084
if (ts->buf[FW_HDR_TYPE] != QUEUE_HEADER_NORMAL)
drivers/input/touchscreen/elants_i2c.c
1087
ts->state = ELAN_STATE_NORMAL;
drivers/input/touchscreen/elants_i2c.c
1092
switch (ts->buf[FW_HDR_TYPE]) {
drivers/input/touchscreen/elants_i2c.c
1098
if (memcmp(ts->buf, wait_packet, sizeof(wait_packet))) {
drivers/input/touchscreen/elants_i2c.c
1101
HEADER_SIZE, ts->buf);
drivers/input/touchscreen/elants_i2c.c
1103
ts->state = ELAN_WAIT_QUEUE_HEADER;
drivers/input/touchscreen/elants_i2c.c
1109
elants_i2c_event(ts, &ts->buf[HEADER_SIZE],
drivers/input/touchscreen/elants_i2c.c
1110
ts->buf[FW_HDR_LENGTH]);
drivers/input/touchscreen/elants_i2c.c
1122
if (ts->chip_id != EKTF3624)
drivers/input/touchscreen/elants_i2c.c
1128
report_count = ts->buf[FW_HDR_COUNT];
drivers/input/touchscreen/elants_i2c.c
1132
HEADER_SIZE, ts->buf);
drivers/input/touchscreen/elants_i2c.c
1136
report_len = ts->buf[FW_HDR_LENGTH] / report_count;
drivers/input/touchscreen/elants_i2c.c
1139
ts->chip_id == EKTF3624) {
drivers/input/touchscreen/elants_i2c.c
1145
HEADER_SIZE, ts->buf);
drivers/input/touchscreen/elants_i2c.c
1150
u8 *buf = ts->buf + HEADER_SIZE +
drivers/input/touchscreen/elants_i2c.c
1152
elants_i2c_event(ts, buf, report_len);
drivers/input/touchscreen/elants_i2c.c
1158
HEADER_SIZE, ts->buf);
drivers/input/touchscreen/elants_i2c.c
1176
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1179
scoped_cond_guard(mutex_intr, return -EINTR, &ts->sysfs_mutex) {
drivers/input/touchscreen/elants_i2c.c
1180
error = elants_i2c_calibrate(ts);
drivers/input/touchscreen/elants_i2c.c
1193
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1196
scoped_cond_guard(mutex_intr, return -EINTR, &ts->sysfs_mutex) {
drivers/input/touchscreen/elants_i2c.c
1197
error = elants_i2c_fw_update(ts);
drivers/input/touchscreen/elants_i2c.c
1209
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1212
ts->iap_mode == ELAN_IAP_OPERATIONAL ?
drivers/input/touchscreen/elants_i2c.c
1264
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1267
u8 *field = (u8 *)((char *)ts + attr->field_offset);
drivers/input/touchscreen/elants_i2c.c
1305
static int elants_i2c_power_on(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
1313
if (IS_ERR_OR_NULL(ts->reset_gpio))
drivers/input/touchscreen/elants_i2c.c
1316
error = regulator_enable(ts->vcc33);
drivers/input/touchscreen/elants_i2c.c
1318
dev_err(&ts->client->dev,
drivers/input/touchscreen/elants_i2c.c
1324
error = regulator_enable(ts->vccio);
drivers/input/touchscreen/elants_i2c.c
1326
dev_err(&ts->client->dev,
drivers/input/touchscreen/elants_i2c.c
1329
regulator_disable(ts->vcc33);
drivers/input/touchscreen/elants_i2c.c
1339
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/elants_i2c.c
1348
struct elants_data *ts = _data;
drivers/input/touchscreen/elants_i2c.c
1350
if (!IS_ERR_OR_NULL(ts->reset_gpio)) {
drivers/input/touchscreen/elants_i2c.c
1355
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/elants_i2c.c
1356
regulator_disable(ts->vccio);
drivers/input/touchscreen/elants_i2c.c
1357
regulator_disable(ts->vcc33);
drivers/input/touchscreen/elants_i2c.c
1398
struct elants_data *ts;
drivers/input/touchscreen/elants_i2c.c
1413
ts = devm_kzalloc(&client->dev, sizeof(struct elants_data), GFP_KERNEL);
drivers/input/touchscreen/elants_i2c.c
1414
if (!ts)
drivers/input/touchscreen/elants_i2c.c
1417
mutex_init(&ts->sysfs_mutex);
drivers/input/touchscreen/elants_i2c.c
1418
init_completion(&ts->cmd_done);
drivers/input/touchscreen/elants_i2c.c
1420
ts->client = client;
drivers/input/touchscreen/elants_i2c.c
1421
ts->chip_id = (enum elants_chip_id)(uintptr_t)device_get_match_data(&client->dev);
drivers/input/touchscreen/elants_i2c.c
1422
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/elants_i2c.c
1424
ts->vcc33 = devm_regulator_get(&client->dev, "vcc33");
drivers/input/touchscreen/elants_i2c.c
1425
if (IS_ERR(ts->vcc33))
drivers/input/touchscreen/elants_i2c.c
1426
return dev_err_probe(&client->dev, PTR_ERR(ts->vcc33),
drivers/input/touchscreen/elants_i2c.c
1429
ts->vccio = devm_regulator_get(&client->dev, "vccio");
drivers/input/touchscreen/elants_i2c.c
1430
if (IS_ERR(ts->vccio))
drivers/input/touchscreen/elants_i2c.c
1431
return dev_err_probe(&client->dev, PTR_ERR(ts->vccio),
drivers/input/touchscreen/elants_i2c.c
1434
ts->reset_gpio = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH);
drivers/input/touchscreen/elants_i2c.c
1435
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/elants_i2c.c
1436
error = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/elants_i2c.c
1448
ts->keep_power_in_suspend = true;
drivers/input/touchscreen/elants_i2c.c
1451
error = elants_i2c_power_on(ts);
drivers/input/touchscreen/elants_i2c.c
1456
elants_i2c_power_off, ts);
drivers/input/touchscreen/elants_i2c.c
1470
error = elants_i2c_initialize(ts);
drivers/input/touchscreen/elants_i2c.c
1476
ts->input = devm_input_allocate_device(&client->dev);
drivers/input/touchscreen/elants_i2c.c
1477
if (!ts->input) {
drivers/input/touchscreen/elants_i2c.c
1482
ts->input->name = "Elan Touchscreen";
drivers/input/touchscreen/elants_i2c.c
1483
ts->input->id.bustype = BUS_I2C;
drivers/input/touchscreen/elants_i2c.c
1487
input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, ts->x_max, 0, 0);
drivers/input/touchscreen/elants_i2c.c
1488
input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, ts->y_max, 0, 0);
drivers/input/touchscreen/elants_i2c.c
1489
input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
drivers/input/touchscreen/elants_i2c.c
1490
input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
drivers/input/touchscreen/elants_i2c.c
1491
input_set_abs_params(ts->input, ABS_MT_TOOL_TYPE,
drivers/input/touchscreen/elants_i2c.c
1494
touchscreen_parse_properties(ts->input, true, &ts->prop);
drivers/input/touchscreen/elants_i2c.c
1496
if (ts->chip_id == EKTF3624 && ts->phy_x && ts->phy_y) {
drivers/input/touchscreen/elants_i2c.c
1498
ts->x_res = DIV_ROUND_CLOSEST(ts->prop.max_x, ts->phy_x);
drivers/input/touchscreen/elants_i2c.c
1499
ts->y_res = DIV_ROUND_CLOSEST(ts->prop.max_y, ts->phy_y);
drivers/input/touchscreen/elants_i2c.c
1502
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
drivers/input/touchscreen/elants_i2c.c
1503
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
drivers/input/touchscreen/elants_i2c.c
1504
input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res);
drivers/input/touchscreen/elants_i2c.c
1506
error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
drivers/input/touchscreen/elants_i2c.c
1514
error = input_register_device(ts->input);
drivers/input/touchscreen/elants_i2c.c
1533
client->name, ts);
drivers/input/touchscreen/elants_i2c.c
1545
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1553
if (ts->iap_mode != ELAN_IAP_OPERATIONAL)
drivers/input/touchscreen/elants_i2c.c
1564
} else if (ts->keep_power_in_suspend) {
drivers/input/touchscreen/elants_i2c.c
1575
elants_i2c_power_off(ts);
drivers/input/touchscreen/elants_i2c.c
1584
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
1593
} else if (ts->keep_power_in_suspend) {
drivers/input/touchscreen/elants_i2c.c
1604
elants_i2c_power_on(ts);
drivers/input/touchscreen/elants_i2c.c
1605
elants_i2c_initialize(ts);
drivers/input/touchscreen/elants_i2c.c
1608
ts->state = ELAN_STATE_NORMAL;
drivers/input/touchscreen/elants_i2c.c
298
static int elants_i2c_calibrate(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
300
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
307
ts->state = ELAN_WAIT_RECALIBRATION;
drivers/input/touchscreen/elants_i2c.c
308
reinit_completion(&ts->cmd_done);
drivers/input/touchscreen/elants_i2c.c
314
ret = wait_for_completion_interruptible_timeout(&ts->cmd_done,
drivers/input/touchscreen/elants_i2c.c
317
ts->state = ELAN_STATE_NORMAL;
drivers/input/touchscreen/elants_i2c.c
327
if (memcmp(rek_resp, ts->cmd_resp, sizeof(rek_resp))) {
drivers/input/touchscreen/elants_i2c.c
330
(int)sizeof(ts->cmd_resp), ts->cmd_resp);
drivers/input/touchscreen/elants_i2c.c
363
static int elants_i2c_query_hw_version(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
365
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
378
ts->hw_version = elants_i2c_parse_version(resp);
drivers/input/touchscreen/elants_i2c.c
379
if (ts->hw_version != 0xffff)
drivers/input/touchscreen/elants_i2c.c
383
dev_err(&client->dev, "Invalid fw id: %#04x\n", ts->hw_version);
drivers/input/touchscreen/elants_i2c.c
388
static int elants_i2c_query_fw_version(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
390
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
403
ts->fw_version = elants_i2c_parse_version(resp);
drivers/input/touchscreen/elants_i2c.c
404
if (ts->fw_version != 0x0000 && ts->fw_version != 0xffff)
drivers/input/touchscreen/elants_i2c.c
411
dev_err(&client->dev, "Invalid fw ver: %#04x\n", ts->fw_version);
drivers/input/touchscreen/elants_i2c.c
416
static int elants_i2c_query_test_version(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
418
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
433
ts->test_version = version >> 8;
drivers/input/touchscreen/elants_i2c.c
434
ts->solution_version = version & 0xff;
drivers/input/touchscreen/elants_i2c.c
439
static int elants_i2c_query_bc_version(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
441
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
454
ts->bc_version = version >> 8;
drivers/input/touchscreen/elants_i2c.c
455
ts->iap_version = version & 0xff;
drivers/input/touchscreen/elants_i2c.c
460
static int elants_i2c_query_ts_info_ektf(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
462
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
494
ts->phy_x = phy_x;
drivers/input/touchscreen/elants_i2c.c
495
ts->phy_y = phy_y;
drivers/input/touchscreen/elants_i2c.c
498
ts->x_max = 2240 - 1;
drivers/input/touchscreen/elants_i2c.c
499
ts->y_max = 1408 - 1;
drivers/input/touchscreen/elants_i2c.c
504
static int elants_i2c_query_ts_info_ekth(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
506
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
536
ts->major_res = resp[16];
drivers/input/touchscreen/elants_i2c.c
575
ts->x_max = ELAN_TS_RESOLUTION(rows, osr);
drivers/input/touchscreen/elants_i2c.c
576
ts->x_res = DIV_ROUND_CLOSEST(ts->x_max, phy_x);
drivers/input/touchscreen/elants_i2c.c
577
ts->y_max = ELAN_TS_RESOLUTION(cols, osr);
drivers/input/touchscreen/elants_i2c.c
578
ts->y_res = DIV_ROUND_CLOSEST(ts->y_max, phy_y);
drivers/input/touchscreen/elants_i2c.c
579
ts->phy_x = phy_x;
drivers/input/touchscreen/elants_i2c.c
580
ts->phy_y = phy_y;
drivers/input/touchscreen/elants_i2c.c
601
static int elants_i2c_initialize(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
603
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
632
ts->iap_mode = ELAN_IAP_OPERATIONAL;
drivers/input/touchscreen/elants_i2c.c
650
error2 = elants_i2c_query_hw_version(ts);
drivers/input/touchscreen/elants_i2c.c
652
error2 = elants_i2c_query_bc_version(ts);
drivers/input/touchscreen/elants_i2c.c
657
error = elants_i2c_query_fw_version(ts);
drivers/input/touchscreen/elants_i2c.c
659
error = elants_i2c_query_test_version(ts);
drivers/input/touchscreen/elants_i2c.c
661
switch (ts->chip_id) {
drivers/input/touchscreen/elants_i2c.c
664
error = elants_i2c_query_ts_info_ekth(ts);
drivers/input/touchscreen/elants_i2c.c
668
error = elants_i2c_query_ts_info_ektf(ts);
drivers/input/touchscreen/elants_i2c.c
675
ts->iap_mode = ELAN_IAP_RECOVERY;
drivers/input/touchscreen/elants_i2c.c
719
static int elants_i2c_validate_remark_id(struct elants_data *ts,
drivers/input/touchscreen/elants_i2c.c
722
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
750
static bool elants_i2c_should_check_remark_id(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
752
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
753
const u8 bootcode_version = ts->iap_version;
drivers/input/touchscreen/elants_i2c.c
785
struct elants_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/elants_i2c.c
794
bool check_remark_id = elants_i2c_should_check_remark_id(ts);
drivers/input/touchscreen/elants_i2c.c
801
error = elants_i2c_validate_remark_id(ts, fw);
drivers/input/touchscreen/elants_i2c.c
826
error = elants_i2c_validate_remark_id(ts, fw);
drivers/input/touchscreen/elants_i2c.c
904
static int elants_i2c_fw_update(struct elants_data *ts)
drivers/input/touchscreen/elants_i2c.c
906
struct i2c_client *client = ts->client;
drivers/input/touchscreen/elants_i2c.c
910
kasprintf(GFP_KERNEL, "elants_i2c_%04x.bin", ts->hw_version);
drivers/input/touchscreen/elants_i2c.c
931
bool force_update = ts->iap_mode == ELAN_IAP_RECOVERY;
drivers/input/touchscreen/elants_i2c.c
938
error = elants_i2c_initialize(ts);
drivers/input/touchscreen/elants_i2c.c
945
ts->iap_mode = error ? ELAN_IAP_RECOVERY : ELAN_IAP_OPERATIONAL;
drivers/input/touchscreen/elants_i2c.c
946
ts->state = ELAN_STATE_NORMAL;
drivers/input/touchscreen/elants_i2c.c
951
elants_i2c_calibrate(ts);
drivers/input/touchscreen/elants_i2c.c
960
static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf,
drivers/input/touchscreen/elants_i2c.c
963
struct input_dev *input = ts->input;
drivers/input/touchscreen/elants_i2c.c
973
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/elants_i2c.c
996
ts->chip_id == EKTF3624) {
drivers/input/touchscreen/goodix.c
1002
ts->gpiod_rst = gpiod;
drivers/input/touchscreen/goodix.c
1004
switch (ts->irq_pin_access_method) {
drivers/input/touchscreen/goodix.c
1014
if (!ts->gpiod_int || !ts->gpiod_rst)
drivers/input/touchscreen/goodix.c
1015
ts->irq_pin_access_method = IRQ_PIN_ACCESS_NONE;
drivers/input/touchscreen/goodix.c
1018
if (!ts->gpiod_rst)
drivers/input/touchscreen/goodix.c
1019
ts->irq_pin_access_method = IRQ_PIN_ACCESS_NONE;
drivers/input/touchscreen/goodix.c
1022
if (ts->gpiod_int && ts->gpiod_rst) {
drivers/input/touchscreen/goodix.c
1023
ts->reset_controller_at_probe = true;
drivers/input/touchscreen/goodix.c
1024
ts->load_cfg_from_disk = true;
drivers/input/touchscreen/goodix.c
1025
ts->irq_pin_access_method = IRQ_PIN_ACCESS_GPIO;
drivers/input/touchscreen/goodix.c
1039
static void goodix_read_config(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
1049
if (!ts->firmware_name) {
drivers/input/touchscreen/goodix.c
1050
error = goodix_i2c_read(ts->client, ts->chip->config_addr,
drivers/input/touchscreen/goodix.c
1051
ts->config, ts->chip->config_len);
drivers/input/touchscreen/goodix.c
1053
ts->int_trigger_type = GOODIX_INT_TRIGGER;
drivers/input/touchscreen/goodix.c
1054
ts->max_touch_num = GOODIX_MAX_CONTACTS;
drivers/input/touchscreen/goodix.c
1059
ts->int_trigger_type = ts->config[TRIGGER_LOC] & 0x03;
drivers/input/touchscreen/goodix.c
1060
ts->max_touch_num = min(ts->config[MAX_CONTACTS_LOC] & 0x0f,
drivers/input/touchscreen/goodix.c
1063
x_max = get_unaligned_le16(&ts->config[RESOLUTION_LOC]);
drivers/input/touchscreen/goodix.c
1064
y_max = get_unaligned_le16(&ts->config[RESOLUTION_LOC + 2]);
drivers/input/touchscreen/goodix.c
1066
input_abs_set_max(ts->input_dev, ABS_MT_POSITION_X, x_max - 1);
drivers/input/touchscreen/goodix.c
1067
input_abs_set_max(ts->input_dev, ABS_MT_POSITION_Y, y_max - 1);
drivers/input/touchscreen/goodix.c
1070
ts->chip->calc_config_checksum(ts);
drivers/input/touchscreen/goodix.c
1078
static int goodix_read_version(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
1084
error = goodix_i2c_read(ts->client, GOODIX_REG_ID, buf, sizeof(buf));
drivers/input/touchscreen/goodix.c
1090
strscpy(ts->id, id_str, GOODIX_ID_MAX_LEN + 1);
drivers/input/touchscreen/goodix.c
1092
ts->version = get_unaligned_le16(&buf[4]);
drivers/input/touchscreen/goodix.c
1094
dev_info(&ts->client->dev, "ID %s, version: %04x\n", ts->id,
drivers/input/touchscreen/goodix.c
1095
ts->version);
drivers/input/touchscreen/goodix.c
1132
static int goodix_configure_dev(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
1137
ts->int_trigger_type = GOODIX_INT_TRIGGER;
drivers/input/touchscreen/goodix.c
1138
ts->max_touch_num = GOODIX_MAX_CONTACTS;
drivers/input/touchscreen/goodix.c
1140
ts->input_dev = devm_input_allocate_device(&ts->client->dev);
drivers/input/touchscreen/goodix.c
1141
if (!ts->input_dev) {
drivers/input/touchscreen/goodix.c
1142
dev_err(&ts->client->dev, "Failed to allocate input device.");
drivers/input/touchscreen/goodix.c
1146
ts->input_dev->name = "Goodix Capacitive TouchScreen";
drivers/input/touchscreen/goodix.c
1147
ts->input_dev->phys = "input/ts";
drivers/input/touchscreen/goodix.c
1148
ts->input_dev->id.bustype = BUS_I2C;
drivers/input/touchscreen/goodix.c
1149
ts->input_dev->id.vendor = 0x0416;
drivers/input/touchscreen/goodix.c
1150
if (kstrtou16(ts->id, 10, &ts->input_dev->id.product))
drivers/input/touchscreen/goodix.c
1151
ts->input_dev->id.product = 0x1001;
drivers/input/touchscreen/goodix.c
1152
ts->input_dev->id.version = ts->version;
drivers/input/touchscreen/goodix.c
1154
ts->input_dev->keycode = ts->keymap;
drivers/input/touchscreen/goodix.c
1155
ts->input_dev->keycodesize = sizeof(ts->keymap[0]);
drivers/input/touchscreen/goodix.c
1156
ts->input_dev->keycodemax = GOODIX_MAX_KEYS;
drivers/input/touchscreen/goodix.c
1161
ts->keymap[i] = KEY_LEFTMETA;
drivers/input/touchscreen/goodix.c
1163
ts->keymap[i] = KEY_F1 + (i - 1);
drivers/input/touchscreen/goodix.c
1165
input_set_capability(ts->input_dev, EV_KEY, ts->keymap[i]);
drivers/input/touchscreen/goodix.c
1168
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_X);
drivers/input/touchscreen/goodix.c
1169
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_Y);
drivers/input/touchscreen/goodix.c
1170
input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
drivers/input/touchscreen/goodix.c
1171
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
drivers/input/touchscreen/goodix.c
1175
goodix_read_config(ts);
drivers/input/touchscreen/goodix.c
1178
touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
drivers/input/touchscreen/goodix.c
1180
if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
drivers/input/touchscreen/goodix.c
1181
if (!ts->reset_controller_at_probe &&
drivers/input/touchscreen/goodix.c
1182
ts->irq_pin_access_method != IRQ_PIN_ACCESS_NONE) {
drivers/input/touchscreen/goodix.c
1183
dev_info(&ts->client->dev, "Config not set, resetting controller\n");
drivers/input/touchscreen/goodix.c
1185
ts->reset_controller_at_probe = true;
drivers/input/touchscreen/goodix.c
1186
error = goodix_reset(ts);
drivers/input/touchscreen/goodix.c
1191
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1193
ts->prop.max_x, ts->prop.max_y, ts->max_touch_num);
drivers/input/touchscreen/goodix.c
1194
ts->prop.max_x = GOODIX_MAX_WIDTH - 1;
drivers/input/touchscreen/goodix.c
1195
ts->prop.max_y = GOODIX_MAX_HEIGHT - 1;
drivers/input/touchscreen/goodix.c
1196
ts->max_touch_num = GOODIX_MAX_CONTACTS;
drivers/input/touchscreen/goodix.c
1197
input_abs_set_max(ts->input_dev,
drivers/input/touchscreen/goodix.c
1198
ABS_MT_POSITION_X, ts->prop.max_x);
drivers/input/touchscreen/goodix.c
1199
input_abs_set_max(ts->input_dev,
drivers/input/touchscreen/goodix.c
1200
ABS_MT_POSITION_Y, ts->prop.max_y);
drivers/input/touchscreen/goodix.c
1204
ts->contact_size = 9;
drivers/input/touchscreen/goodix.c
1206
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1211
ts->prop.invert_x = true;
drivers/input/touchscreen/goodix.c
1212
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1216
error = input_mt_init_slots(ts->input_dev, ts->max_touch_num,
drivers/input/touchscreen/goodix.c
1219
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1224
input_set_drvdata(ts->input_dev, ts);
drivers/input/touchscreen/goodix.c
1226
if (!ts->client->irq) {
drivers/input/touchscreen/goodix.c
1227
error = input_setup_polling(ts->input_dev, goodix_ts_work_i2c_poll);
drivers/input/touchscreen/goodix.c
1229
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1233
input_set_poll_interval(ts->input_dev, GOODIX_POLL_INTERVAL_MS);
drivers/input/touchscreen/goodix.c
1236
error = input_register_device(ts->input_dev);
drivers/input/touchscreen/goodix.c
1238
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
1250
error = goodix_create_pen_input(ts);
drivers/input/touchscreen/goodix.c
1254
ts->irq_flags = goodix_irq_flags[ts->int_trigger_type] | IRQF_ONESHOT;
drivers/input/touchscreen/goodix.c
1255
error = goodix_request_irq(ts);
drivers/input/touchscreen/goodix.c
1257
dev_err(&ts->client->dev, "request IRQ failed: %d\n", error);
drivers/input/touchscreen/goodix.c
1275
struct goodix_ts_data *ts = ctx;
drivers/input/touchscreen/goodix.c
1278
if (ts->firmware_name) {
drivers/input/touchscreen/goodix.c
1282
error = goodix_check_cfg(ts, cfg->data, cfg->size);
drivers/input/touchscreen/goodix.c
1286
memcpy(ts->config, cfg->data, cfg->size);
drivers/input/touchscreen/goodix.c
1289
error = goodix_send_cfg(ts, cfg->data, cfg->size);
drivers/input/touchscreen/goodix.c
1294
goodix_configure_dev(ts);
drivers/input/touchscreen/goodix.c
1298
complete_all(&ts->firmware_loading_complete);
drivers/input/touchscreen/goodix.c
1303
struct goodix_ts_data *ts = arg;
drivers/input/touchscreen/goodix.c
1305
regulator_disable(ts->vddio);
drivers/input/touchscreen/goodix.c
1306
regulator_disable(ts->avdd28);
drivers/input/touchscreen/goodix.c
1311
struct goodix_ts_data *ts;
drivers/input/touchscreen/goodix.c
1322
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/goodix.c
1323
if (!ts)
drivers/input/touchscreen/goodix.c
1326
ts->client = client;
drivers/input/touchscreen/goodix.c
1327
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/goodix.c
1328
init_completion(&ts->firmware_loading_complete);
drivers/input/touchscreen/goodix.c
1329
ts->contact_size = GOODIX_CONTACT_SIZE;
drivers/input/touchscreen/goodix.c
1331
error = goodix_get_gpio_config(ts);
drivers/input/touchscreen/goodix.c
1336
error = regulator_enable(ts->avdd28);
drivers/input/touchscreen/goodix.c
1344
error = regulator_enable(ts->vddio);
drivers/input/touchscreen/goodix.c
1349
regulator_disable(ts->avdd28);
drivers/input/touchscreen/goodix.c
1354
goodix_disable_regulators, ts);
drivers/input/touchscreen/goodix.c
1359
if (ts->reset_controller_at_probe) {
drivers/input/touchscreen/goodix.c
1361
error = goodix_reset(ts);
drivers/input/touchscreen/goodix.c
1368
if (!ts->reset_controller_at_probe &&
drivers/input/touchscreen/goodix.c
1369
ts->irq_pin_access_method != IRQ_PIN_ACCESS_NONE) {
drivers/input/touchscreen/goodix.c
1371
ts->reset_controller_at_probe = true;
drivers/input/touchscreen/goodix.c
1378
error = goodix_firmware_check(ts);
drivers/input/touchscreen/goodix.c
1382
error = goodix_read_version(ts);
drivers/input/touchscreen/goodix.c
1386
ts->chip = goodix_get_chip_data(ts->id);
drivers/input/touchscreen/goodix.c
1388
if (ts->load_cfg_from_disk) {
drivers/input/touchscreen/goodix.c
1394
snprintf(ts->cfg_name, sizeof(ts->cfg_name),
drivers/input/touchscreen/goodix.c
1397
snprintf(ts->cfg_name, sizeof(ts->cfg_name),
drivers/input/touchscreen/goodix.c
1398
"goodix_%s_cfg.bin", ts->id);
drivers/input/touchscreen/goodix.c
1400
error = request_firmware_nowait(THIS_MODULE, true, ts->cfg_name,
drivers/input/touchscreen/goodix.c
1401
&client->dev, GFP_KERNEL, ts,
drivers/input/touchscreen/goodix.c
1412
error = goodix_configure_dev(ts);
drivers/input/touchscreen/goodix.c
1422
struct goodix_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/goodix.c
1424
if (ts->load_cfg_from_disk)
drivers/input/touchscreen/goodix.c
1425
wait_for_completion(&ts->firmware_loading_complete);
drivers/input/touchscreen/goodix.c
1431
struct goodix_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/goodix.c
1434
if (ts->load_cfg_from_disk)
drivers/input/touchscreen/goodix.c
1435
wait_for_completion(&ts->firmware_loading_complete);
drivers/input/touchscreen/goodix.c
1438
if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_NONE) {
drivers/input/touchscreen/goodix.c
1439
goodix_disable_irq(ts);
drivers/input/touchscreen/goodix.c
1444
goodix_free_irq(ts);
drivers/input/touchscreen/goodix.c
1447
goodix_save_bak_ref(ts);
drivers/input/touchscreen/goodix.c
1450
error = goodix_irq_direction_output(ts, 0);
drivers/input/touchscreen/goodix.c
1452
goodix_request_irq(ts);
drivers/input/touchscreen/goodix.c
1458
error = goodix_i2c_write_u8(ts->client, GOODIX_REG_COMMAND,
drivers/input/touchscreen/goodix.c
1461
goodix_irq_direction_input(ts);
drivers/input/touchscreen/goodix.c
1462
goodix_request_irq(ts);
drivers/input/touchscreen/goodix.c
1478
struct goodix_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/goodix.c
1482
if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_NONE) {
drivers/input/touchscreen/goodix.c
1483
goodix_enable_irq(ts);
drivers/input/touchscreen/goodix.c
1491
error = goodix_irq_direction_output(ts, 1);
drivers/input/touchscreen/goodix.c
1497
error = goodix_int_sync(ts);
drivers/input/touchscreen/goodix.c
1501
error = goodix_i2c_read(ts->client, ts->chip->config_addr,
drivers/input/touchscreen/goodix.c
1503
if (!error && config_ver != ts->config[0])
drivers/input/touchscreen/goodix.c
1505
config_ver, ts->config[0]);
drivers/input/touchscreen/goodix.c
1507
if (error != 0 || config_ver != ts->config[0]) {
drivers/input/touchscreen/goodix.c
1508
error = goodix_reset(ts);
drivers/input/touchscreen/goodix.c
1512
error = goodix_send_cfg(ts, ts->config, ts->chip->config_len);
drivers/input/touchscreen/goodix.c
1517
error = goodix_request_irq(ts);
drivers/input/touchscreen/goodix.c
253
static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data)
drivers/input/touchscreen/goodix.c
264
const int header_contact_keycode_size = 1 + ts->contact_size + 1;
drivers/input/touchscreen/goodix.c
273
error = goodix_i2c_read(ts->client, addr, data,
drivers/input/touchscreen/goodix.c
280
if (touch_num > ts->max_touch_num)
drivers/input/touchscreen/goodix.c
286
error = goodix_i2c_read(ts->client,
drivers/input/touchscreen/goodix.c
288
ts->contact_size *
drivers/input/touchscreen/goodix.c
297
if (data[0] == 0 && ts->firmware_name) {
drivers/input/touchscreen/goodix.c
298
if (goodix_handle_fw_request(ts))
drivers/input/touchscreen/goodix.c
312
static int goodix_create_pen_input(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
314
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/goodix.c
321
input_copy_abs(input, ABS_X, ts->input_dev, ABS_MT_POSITION_X);
drivers/input/touchscreen/goodix.c
322
input_copy_abs(input, ABS_Y, ts->input_dev, ABS_MT_POSITION_Y);
drivers/input/touchscreen/goodix.c
342
if (kstrtou16(ts->id, 10, &input->id.product))
drivers/input/touchscreen/goodix.c
344
input->id.version = ts->version;
drivers/input/touchscreen/goodix.c
346
ts->input_pen = input;
drivers/input/touchscreen/goodix.c
350
static void goodix_ts_report_pen_down(struct goodix_ts_data *ts, u8 *data)
drivers/input/touchscreen/goodix.c
355
if (!ts->pen_input_registered) {
drivers/input/touchscreen/goodix.c
356
error = input_register_device(ts->input_pen);
drivers/input/touchscreen/goodix.c
357
ts->pen_input_registered = (error == 0) ? 1 : error;
drivers/input/touchscreen/goodix.c
360
if (ts->pen_input_registered < 0)
drivers/input/touchscreen/goodix.c
363
if (ts->contact_size == 9) {
drivers/input/touchscreen/goodix.c
373
touchscreen_report_pos(ts->input_pen, &ts->prop, input_x, input_y, false);
drivers/input/touchscreen/goodix.c
374
input_report_abs(ts->input_pen, ABS_PRESSURE, input_w);
drivers/input/touchscreen/goodix.c
376
input_report_key(ts->input_pen, BTN_TOUCH, 1);
drivers/input/touchscreen/goodix.c
377
input_report_key(ts->input_pen, BTN_TOOL_PEN, 1);
drivers/input/touchscreen/goodix.c
380
key_value = data[1 + ts->contact_size];
drivers/input/touchscreen/goodix.c
381
input_report_key(ts->input_pen, BTN_STYLUS, key_value & 0x10);
drivers/input/touchscreen/goodix.c
382
input_report_key(ts->input_pen, BTN_STYLUS2, key_value & 0x20);
drivers/input/touchscreen/goodix.c
384
input_report_key(ts->input_pen, BTN_STYLUS, 0);
drivers/input/touchscreen/goodix.c
385
input_report_key(ts->input_pen, BTN_STYLUS2, 0);
drivers/input/touchscreen/goodix.c
388
input_sync(ts->input_pen);
drivers/input/touchscreen/goodix.c
391
static void goodix_ts_report_pen_up(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
393
if (!ts->input_pen)
drivers/input/touchscreen/goodix.c
396
input_report_key(ts->input_pen, BTN_TOUCH, 0);
drivers/input/touchscreen/goodix.c
397
input_report_key(ts->input_pen, BTN_TOOL_PEN, 0);
drivers/input/touchscreen/goodix.c
398
input_report_key(ts->input_pen, BTN_STYLUS, 0);
drivers/input/touchscreen/goodix.c
399
input_report_key(ts->input_pen, BTN_STYLUS2, 0);
drivers/input/touchscreen/goodix.c
401
input_sync(ts->input_pen);
drivers/input/touchscreen/goodix.c
404
static void goodix_ts_report_touch_8b(struct goodix_ts_data *ts, u8 *coor_data)
drivers/input/touchscreen/goodix.c
411
input_mt_slot(ts->input_dev, id);
drivers/input/touchscreen/goodix.c
412
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true);
drivers/input/touchscreen/goodix.c
413
touchscreen_report_pos(ts->input_dev, &ts->prop,
drivers/input/touchscreen/goodix.c
415
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, input_w);
drivers/input/touchscreen/goodix.c
416
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, input_w);
drivers/input/touchscreen/goodix.c
419
static void goodix_ts_report_touch_9b(struct goodix_ts_data *ts, u8 *coor_data)
drivers/input/touchscreen/goodix.c
426
input_mt_slot(ts->input_dev, id);
drivers/input/touchscreen/goodix.c
427
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true);
drivers/input/touchscreen/goodix.c
428
touchscreen_report_pos(ts->input_dev, &ts->prop,
drivers/input/touchscreen/goodix.c
430
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, input_w);
drivers/input/touchscreen/goodix.c
431
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, input_w);
drivers/input/touchscreen/goodix.c
434
static void goodix_ts_release_keys(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
439
input_report_key(ts->input_dev, ts->keymap[i], 0);
drivers/input/touchscreen/goodix.c
442
static void goodix_ts_report_key(struct goodix_ts_data *ts, u8 *data)
drivers/input/touchscreen/goodix.c
450
key_value = data[1 + ts->contact_size * touch_num];
drivers/input/touchscreen/goodix.c
453
input_report_key(ts->input_dev,
drivers/input/touchscreen/goodix.c
454
ts->keymap[i], 1);
drivers/input/touchscreen/goodix.c
456
goodix_ts_release_keys(ts);
drivers/input/touchscreen/goodix.c
468
static void goodix_process_events(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
474
touch_num = goodix_ts_read_input_report(ts, point_data);
drivers/input/touchscreen/goodix.c
480
goodix_ts_report_pen_down(ts, point_data);
drivers/input/touchscreen/goodix.c
481
goodix_ts_release_keys(ts);
drivers/input/touchscreen/goodix.c
484
goodix_ts_report_pen_up(ts);
drivers/input/touchscreen/goodix.c
487
goodix_ts_report_key(ts, point_data);
drivers/input/touchscreen/goodix.c
490
if (ts->contact_size == 9)
drivers/input/touchscreen/goodix.c
491
goodix_ts_report_touch_9b(ts,
drivers/input/touchscreen/goodix.c
492
&point_data[1 + ts->contact_size * i]);
drivers/input/touchscreen/goodix.c
494
goodix_ts_report_touch_8b(ts,
drivers/input/touchscreen/goodix.c
495
&point_data[1 + ts->contact_size * i]);
drivers/input/touchscreen/goodix.c
498
input_mt_sync_frame(ts->input_dev);
drivers/input/touchscreen/goodix.c
499
input_sync(ts->input_dev);
drivers/input/touchscreen/goodix.c
504
struct goodix_ts_data *ts = input_get_drvdata(input);
drivers/input/touchscreen/goodix.c
506
goodix_process_events(ts);
drivers/input/touchscreen/goodix.c
507
goodix_i2c_write_u8(ts->client, GOODIX_READ_COOR_ADDR, 0);
drivers/input/touchscreen/goodix.c
518
struct goodix_ts_data *ts = dev_id;
drivers/input/touchscreen/goodix.c
520
goodix_process_events(ts);
drivers/input/touchscreen/goodix.c
521
goodix_i2c_write_u8(ts->client, GOODIX_READ_COOR_ADDR, 0);
drivers/input/touchscreen/goodix.c
526
static void goodix_enable_irq(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
528
if (ts->client->irq)
drivers/input/touchscreen/goodix.c
529
enable_irq(ts->client->irq);
drivers/input/touchscreen/goodix.c
532
static void goodix_disable_irq(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
534
if (ts->client->irq)
drivers/input/touchscreen/goodix.c
535
disable_irq(ts->client->irq);
drivers/input/touchscreen/goodix.c
538
static void goodix_free_irq(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
540
if (ts->client->irq)
drivers/input/touchscreen/goodix.c
541
devm_free_irq(&ts->client->dev, ts->client->irq, ts);
drivers/input/touchscreen/goodix.c
544
static int goodix_request_irq(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
546
if (!ts->client->irq)
drivers/input/touchscreen/goodix.c
549
return devm_request_threaded_irq(&ts->client->dev, ts->client->irq,
drivers/input/touchscreen/goodix.c
551
ts->irq_flags, ts->client->name, ts);
drivers/input/touchscreen/goodix.c
554
static int goodix_check_cfg_8(struct goodix_ts_data *ts, const u8 *cfg, int len)
drivers/input/touchscreen/goodix.c
563
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
569
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
577
static void goodix_calc_cfg_checksum_8(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
579
int i, raw_cfg_len = ts->chip->config_len - 2;
drivers/input/touchscreen/goodix.c
583
check_sum += ts->config[i];
drivers/input/touchscreen/goodix.c
586
ts->config[raw_cfg_len] = check_sum;
drivers/input/touchscreen/goodix.c
587
ts->config[raw_cfg_len + 1] = 1; /* Set "config_fresh" bit */
drivers/input/touchscreen/goodix.c
590
static int goodix_check_cfg_16(struct goodix_ts_data *ts, const u8 *cfg,
drivers/input/touchscreen/goodix.c
600
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
606
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
614
static void goodix_calc_cfg_checksum_16(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
616
int i, raw_cfg_len = ts->chip->config_len - 3;
drivers/input/touchscreen/goodix.c
620
check_sum += get_unaligned_be16(&ts->config[i]);
drivers/input/touchscreen/goodix.c
623
put_unaligned_be16(check_sum, &ts->config[raw_cfg_len]);
drivers/input/touchscreen/goodix.c
624
ts->config[raw_cfg_len + 2] = 1; /* Set "config_fresh" bit */
drivers/input/touchscreen/goodix.c
63
static int goodix_check_cfg_8(struct goodix_ts_data *ts,
drivers/input/touchscreen/goodix.c
634
static int goodix_check_cfg(struct goodix_ts_data *ts, const u8 *cfg, int len)
drivers/input/touchscreen/goodix.c
638
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
643
return ts->chip->check_config(ts, cfg, len);
drivers/input/touchscreen/goodix.c
65
static int goodix_check_cfg_16(struct goodix_ts_data *ts,
drivers/input/touchscreen/goodix.c
653
int goodix_send_cfg(struct goodix_ts_data *ts, const u8 *cfg, int len)
drivers/input/touchscreen/goodix.c
657
error = goodix_check_cfg(ts, cfg, len);
drivers/input/touchscreen/goodix.c
661
error = goodix_i2c_write(ts->client, ts->chip->config_addr, cfg, len);
drivers/input/touchscreen/goodix.c
665
dev_dbg(&ts->client->dev, "Config sent successfully.");
drivers/input/touchscreen/goodix.c
67
static void goodix_calc_cfg_checksum_8(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.c
674
static int goodix_pin_acpi_direction_input(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
676
acpi_handle handle = ACPI_HANDLE(&ts->client->dev);
drivers/input/touchscreen/goodix.c
68
static void goodix_calc_cfg_checksum_16(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.c
683
static int goodix_pin_acpi_output_method(struct goodix_ts_data *ts, int value)
drivers/input/touchscreen/goodix.c
685
acpi_handle handle = ACPI_HANDLE(&ts->client->dev);
drivers/input/touchscreen/goodix.c
692
static int goodix_pin_acpi_direction_input(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
694
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
699
static int goodix_pin_acpi_output_method(struct goodix_ts_data *ts, int value)
drivers/input/touchscreen/goodix.c
701
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
707
static int goodix_irq_direction_output(struct goodix_ts_data *ts, int value)
drivers/input/touchscreen/goodix.c
709
switch (ts->irq_pin_access_method) {
drivers/input/touchscreen/goodix.c
711
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
716
return gpiod_direction_output(ts->gpiod_int, value);
drivers/input/touchscreen/goodix.c
722
return gpiod_direction_output_raw(ts->gpiod_int, value);
drivers/input/touchscreen/goodix.c
724
return goodix_pin_acpi_output_method(ts, value);
drivers/input/touchscreen/goodix.c
730
static int goodix_irq_direction_input(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
732
switch (ts->irq_pin_access_method) {
drivers/input/touchscreen/goodix.c
734
dev_err(&ts->client->dev,
drivers/input/touchscreen/goodix.c
739
return gpiod_direction_input(ts->gpiod_int);
drivers/input/touchscreen/goodix.c
741
return gpiod_direction_input(ts->gpiod_int);
drivers/input/touchscreen/goodix.c
743
return goodix_pin_acpi_direction_input(ts);
drivers/input/touchscreen/goodix.c
749
int goodix_int_sync(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
753
error = goodix_irq_direction_output(ts, 0);
drivers/input/touchscreen/goodix.c
759
error = goodix_irq_direction_input(ts);
drivers/input/touchscreen/goodix.c
766
dev_err(&ts->client->dev, "Controller irq sync failed.\n");
drivers/input/touchscreen/goodix.c
775
int goodix_reset_no_int_sync(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
780
error = gpiod_direction_output(ts->gpiod_rst, 0);
drivers/input/touchscreen/goodix.c
787
error = goodix_irq_direction_output(ts, ts->client->addr == 0x14);
drivers/input/touchscreen/goodix.c
793
error = gpiod_direction_output(ts->gpiod_rst, 1);
drivers/input/touchscreen/goodix.c
802
dev_err(&ts->client->dev, "Controller reset failed.\n");
drivers/input/touchscreen/goodix.c
811
static int goodix_reset(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
815
error = goodix_reset_no_int_sync(ts);
drivers/input/touchscreen/goodix.c
819
return goodix_int_sync(ts);
drivers/input/touchscreen/goodix.c
845
struct goodix_ts_data *ts = data;
drivers/input/touchscreen/goodix.c
846
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/goodix.c
850
if (ts->gpio_int_idx == -1) {
drivers/input/touchscreen/goodix.c
851
ts->gpio_int_idx = ts->gpio_count;
drivers/input/touchscreen/goodix.c
854
ts->gpio_int_idx = -2;
drivers/input/touchscreen/goodix.c
856
ts->gpio_count++;
drivers/input/touchscreen/goodix.c
858
ts->gpio_count++;
drivers/input/touchscreen/goodix.c
870
static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
873
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/goodix.c
877
ts->gpio_count = 0;
drivers/input/touchscreen/goodix.c
878
ts->gpio_int_idx = -1;
drivers/input/touchscreen/goodix.c
880
goodix_resource, ts);
drivers/input/touchscreen/goodix.c
894
if (soc_intel_is_cht() && ts->gpio_count == 2 && ts->gpio_int_idx != -1) {
drivers/input/touchscreen/goodix.c
896
if (irq > 0 && irq != ts->client->irq) {
drivers/input/touchscreen/goodix.c
897
dev_warn(dev, "Overriding IRQ %d -> %d\n", ts->client->irq, irq);
drivers/input/touchscreen/goodix.c
898
ts->client->irq = irq;
drivers/input/touchscreen/goodix.c
903
if ((ts->gpio_count == 2 || ts->gpio_count == 3) && ts->gpio_int_idx == 0) {
drivers/input/touchscreen/goodix.c
904
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
drivers/input/touchscreen/goodix.c
906
} else if (ts->gpio_count == 2 && ts->gpio_int_idx == 1) {
drivers/input/touchscreen/goodix.c
907
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
drivers/input/touchscreen/goodix.c
909
} else if (ts->gpio_count == 1 && ts->gpio_int_idx == -1 &&
drivers/input/touchscreen/goodix.c
913
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_METHOD;
drivers/input/touchscreen/goodix.c
915
} else if (soc_intel_is_byt() && ts->gpio_count == 2 && ts->gpio_int_idx == -1) {
drivers/input/touchscreen/goodix.c
917
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
drivers/input/touchscreen/goodix.c
919
} else if (ts->gpio_count == 1 && ts->gpio_int_idx == 0) {
drivers/input/touchscreen/goodix.c
936
ts->irq_pin_access_method = IRQ_PIN_ACCESS_NONE;
drivers/input/touchscreen/goodix.c
940
ts->gpio_count, ts->gpio_int_idx);
drivers/input/touchscreen/goodix.c
952
static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
963
static int goodix_get_gpio_config(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix.c
969
if (!ts->client)
drivers/input/touchscreen/goodix.c
971
dev = &ts->client->dev;
drivers/input/touchscreen/goodix.c
973
ts->avdd28 = devm_regulator_get(dev, "AVDD28");
drivers/input/touchscreen/goodix.c
974
if (IS_ERR(ts->avdd28))
drivers/input/touchscreen/goodix.c
975
return dev_err_probe(dev, PTR_ERR(ts->avdd28), "Failed to get AVDD28 regulator\n");
drivers/input/touchscreen/goodix.c
977
ts->vddio = devm_regulator_get(dev, "VDDIO");
drivers/input/touchscreen/goodix.c
978
if (IS_ERR(ts->vddio))
drivers/input/touchscreen/goodix.c
979
return dev_err_probe(dev, PTR_ERR(ts->vddio), "Failed to get VDDIO regulator\n");
drivers/input/touchscreen/goodix.c
990
if (goodix_add_acpi_gpio_mappings(ts) == 0)
drivers/input/touchscreen/goodix.c
994
ts->gpiod_int = gpiod;
drivers/input/touchscreen/goodix.h
111
int goodix_send_cfg(struct goodix_ts_data *ts, const u8 *cfg, int len);
drivers/input/touchscreen/goodix.h
112
int goodix_int_sync(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.h
113
int goodix_reset_no_int_sync(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.h
115
int goodix_firmware_check(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.h
116
bool goodix_handle_fw_request(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.h
117
void goodix_save_bak_ref(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix.h
72
int (*check_config)(struct goodix_ts_data *ts, const u8 *cfg, int len);
drivers/input/touchscreen/goodix.h
73
void (*calc_config_checksum)(struct goodix_ts_data *ts);
drivers/input/touchscreen/goodix_fwupload.c
189
static int goodix_firmware_upload(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
195
snprintf(fw_name, sizeof(fw_name), "goodix/%s", ts->firmware_name);
drivers/input/touchscreen/goodix_fwupload.c
198
error = request_firmware(&fw, fw_name, &ts->client->dev);
drivers/input/touchscreen/goodix_fwupload.c
200
dev_err(&ts->client->dev, "Firmware request error %d\n", error);
drivers/input/touchscreen/goodix_fwupload.c
204
error = goodix_firmware_verify(&ts->client->dev, fw);
drivers/input/touchscreen/goodix_fwupload.c
208
error = goodix_reset_no_int_sync(ts);
drivers/input/touchscreen/goodix_fwupload.c
212
error = goodix_enter_upload_mode(ts->client);
drivers/input/touchscreen/goodix_fwupload.c
217
error = goodix_i2c_write_u8(ts->client,
drivers/input/touchscreen/goodix_fwupload.c
223
error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS,
drivers/input/touchscreen/goodix_fwupload.c
229
error = goodix_i2c_write_u8(ts->client,
drivers/input/touchscreen/goodix_fwupload.c
235
error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS,
drivers/input/touchscreen/goodix_fwupload.c
241
error = goodix_i2c_write_u8(ts->client,
drivers/input/touchscreen/goodix_fwupload.c
247
error = goodix_i2c_write(ts->client, GOODIX_FW_UPLOAD_ADDRESS,
drivers/input/touchscreen/goodix_fwupload.c
252
error = goodix_start_firmware(ts->client);
drivers/input/touchscreen/goodix_fwupload.c
256
error = goodix_int_sync(ts);
drivers/input/touchscreen/goodix_fwupload.c
263
static int goodix_prepare_bak_ref(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
267
if (ts->bak_ref)
drivers/input/touchscreen/goodix_fwupload.c
270
have_key = (ts->config[GOODIX_CFG_LOC_HAVE_KEY] & 0x01);
drivers/input/touchscreen/goodix_fwupload.c
272
driver_num = (ts->config[GOODIX_CFG_LOC_DRVA_NUM] & 0x1f) +
drivers/input/touchscreen/goodix_fwupload.c
273
(ts->config[GOODIX_CFG_LOC_DRVB_NUM] & 0x1f);
drivers/input/touchscreen/goodix_fwupload.c
277
sensor_num = (ts->config[GOODIX_CFG_LOC_SENS_NUM] & 0x0f) +
drivers/input/touchscreen/goodix_fwupload.c
278
((ts->config[GOODIX_CFG_LOC_SENS_NUM] >> 4) & 0x0f);
drivers/input/touchscreen/goodix_fwupload.c
280
dev_dbg(&ts->client->dev, "Drv %d Sen %d Key %d\n",
drivers/input/touchscreen/goodix_fwupload.c
283
ts->bak_ref_len = (driver_num * (sensor_num - 2) + 2) * 2;
drivers/input/touchscreen/goodix_fwupload.c
285
ts->bak_ref = devm_kzalloc(&ts->client->dev,
drivers/input/touchscreen/goodix_fwupload.c
286
ts->bak_ref_len, GFP_KERNEL);
drivers/input/touchscreen/goodix_fwupload.c
287
if (!ts->bak_ref)
drivers/input/touchscreen/goodix_fwupload.c
305
ts->bak_ref[ts->bak_ref_len - 1] = 1;
drivers/input/touchscreen/goodix_fwupload.c
310
static int goodix_send_main_clock(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
316
device_property_read_u32(&ts->client->dev,
drivers/input/touchscreen/goodix_fwupload.c
320
ts->main_clk[i] = main_clk;
drivers/input/touchscreen/goodix_fwupload.c
325
ts->main_clk[GOODIX_MAIN_CLK_LEN - 1] = 256 - checksum;
drivers/input/touchscreen/goodix_fwupload.c
327
return goodix_i2c_write(ts->client, GOODIX_REG_MAIN_CLK,
drivers/input/touchscreen/goodix_fwupload.c
328
ts->main_clk, GOODIX_MAIN_CLK_LEN);
drivers/input/touchscreen/goodix_fwupload.c
331
int goodix_firmware_check(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
333
device_property_read_string(&ts->client->dev,
drivers/input/touchscreen/goodix_fwupload.c
334
"firmware-name", &ts->firmware_name);
drivers/input/touchscreen/goodix_fwupload.c
335
if (!ts->firmware_name)
drivers/input/touchscreen/goodix_fwupload.c
338
if (ts->irq_pin_access_method == IRQ_PIN_ACCESS_NONE) {
drivers/input/touchscreen/goodix_fwupload.c
339
dev_err(&ts->client->dev, "Error no IRQ-pin access method, cannot upload fw.\n");
drivers/input/touchscreen/goodix_fwupload.c
343
dev_info(&ts->client->dev, "Touchscreen controller needs fw-upload\n");
drivers/input/touchscreen/goodix_fwupload.c
344
ts->load_cfg_from_disk = true;
drivers/input/touchscreen/goodix_fwupload.c
346
return goodix_firmware_upload(ts);
drivers/input/touchscreen/goodix_fwupload.c
349
bool goodix_handle_fw_request(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
354
error = goodix_i2c_read(ts->client, GOODIX_REG_REQUEST, &val, 1);
drivers/input/touchscreen/goodix_fwupload.c
366
error = goodix_send_cfg(ts, ts->config, ts->chip->config_len);
drivers/input/touchscreen/goodix_fwupload.c
372
error = goodix_prepare_bak_ref(ts);
drivers/input/touchscreen/goodix_fwupload.c
376
error = goodix_i2c_write(ts->client, GOODIX_REG_BAK_REF,
drivers/input/touchscreen/goodix_fwupload.c
377
ts->bak_ref, ts->bak_ref_len);
drivers/input/touchscreen/goodix_fwupload.c
383
error = goodix_firmware_upload(ts);
drivers/input/touchscreen/goodix_fwupload.c
389
error = goodix_send_main_clock(ts);
drivers/input/touchscreen/goodix_fwupload.c
398
dev_err_ratelimited(&ts->client->dev, "Unknown Request: 0x%02x\n", val);
drivers/input/touchscreen/goodix_fwupload.c
402
goodix_i2c_write_u8(ts->client,
drivers/input/touchscreen/goodix_fwupload.c
407
void goodix_save_bak_ref(struct goodix_ts_data *ts)
drivers/input/touchscreen/goodix_fwupload.c
412
if (!ts->firmware_name)
drivers/input/touchscreen/goodix_fwupload.c
415
error = goodix_i2c_read(ts->client, GOODIX_REG_STATUS, &val, 1);
drivers/input/touchscreen/goodix_fwupload.c
422
error = goodix_i2c_read(ts->client, GOODIX_REG_BAK_REF,
drivers/input/touchscreen/goodix_fwupload.c
423
ts->bak_ref, ts->bak_ref_len);
drivers/input/touchscreen/goodix_fwupload.c
425
memset(ts->bak_ref, 0, ts->bak_ref_len);
drivers/input/touchscreen/goodix_fwupload.c
426
ts->bak_ref[ts->bak_ref_len - 1] = 1;
drivers/input/touchscreen/hideep.c
1006
struct hideep_ts *ts;
drivers/input/touchscreen/hideep.c
1020
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/hideep.c
1021
if (!ts)
drivers/input/touchscreen/hideep.c
1024
ts->client = client;
drivers/input/touchscreen/hideep.c
1025
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/hideep.c
1026
mutex_init(&ts->dev_mutex);
drivers/input/touchscreen/hideep.c
1028
ts->reg = devm_regmap_init_i2c(client, &hideep_regmap_config);
drivers/input/touchscreen/hideep.c
1029
if (IS_ERR(ts->reg)) {
drivers/input/touchscreen/hideep.c
1030
error = PTR_ERR(ts->reg);
drivers/input/touchscreen/hideep.c
1036
ts->vcc_vdd = devm_regulator_get(&client->dev, "vdd");
drivers/input/touchscreen/hideep.c
1037
if (IS_ERR(ts->vcc_vdd))
drivers/input/touchscreen/hideep.c
1038
return PTR_ERR(ts->vcc_vdd);
drivers/input/touchscreen/hideep.c
1040
ts->vcc_vid = devm_regulator_get(&client->dev, "vid");
drivers/input/touchscreen/hideep.c
1041
if (IS_ERR(ts->vcc_vid))
drivers/input/touchscreen/hideep.c
1042
return PTR_ERR(ts->vcc_vid);
drivers/input/touchscreen/hideep.c
1044
ts->reset_gpio = devm_gpiod_get_optional(&client->dev,
drivers/input/touchscreen/hideep.c
1046
if (IS_ERR(ts->reset_gpio))
drivers/input/touchscreen/hideep.c
1047
return PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/hideep.c
1049
error = hideep_power_on(ts);
drivers/input/touchscreen/hideep.c
1055
error = devm_add_action_or_reset(&client->dev, hideep_power_off, ts);
drivers/input/touchscreen/hideep.c
1059
error = hideep_load_dwz(ts);
drivers/input/touchscreen/hideep.c
1065
hideep_set_work_mode(ts);
drivers/input/touchscreen/hideep.c
1067
error = hideep_init_input(ts);
drivers/input/touchscreen/hideep.c
1073
client->name, ts);
drivers/input/touchscreen/hideep.c
179
static int hideep_pgm_w_mem(struct hideep_ts *ts, u32 addr,
drivers/input/touchscreen/hideep.c
182
struct pgm_packet *packet = (void *)ts->xfer_buf;
drivers/input/touchscreen/hideep.c
185
.addr = ts->client->addr,
drivers/input/touchscreen/hideep.c
199
ret = i2c_transfer(ts->client->adapter, &msg, 1);
drivers/input/touchscreen/hideep.c
206
static int hideep_pgm_r_mem(struct hideep_ts *ts, u32 addr,
drivers/input/touchscreen/hideep.c
209
struct pgm_packet *packet = (void *)ts->xfer_buf;
drivers/input/touchscreen/hideep.c
213
.addr = ts->client->addr,
drivers/input/touchscreen/hideep.c
219
.addr = ts->client->addr,
drivers/input/touchscreen/hideep.c
233
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/hideep.c
240
static int hideep_pgm_r_reg(struct hideep_ts *ts, u32 addr, u32 *val)
drivers/input/touchscreen/hideep.c
245
error = hideep_pgm_r_mem(ts, addr, &data, 1);
drivers/input/touchscreen/hideep.c
247
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
257
static int hideep_pgm_w_reg(struct hideep_ts *ts, u32 addr, u32 val)
drivers/input/touchscreen/hideep.c
262
error = hideep_pgm_w_mem(ts, addr, &data, 1);
drivers/input/touchscreen/hideep.c
264
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
276
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_WDT_CNT, (clk)); \
drivers/input/touchscreen/hideep.c
277
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_WDT_CON, 0x03); \
drivers/input/touchscreen/hideep.c
282
hideep_pgm_w_mem(ts, HIDEEP_SYSCON_WDT_CON, &data, 1); \
drivers/input/touchscreen/hideep.c
286
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CON, \
drivers/input/touchscreen/hideep.c
290
hideep_pgm_w_reg(ts, HIDEEP_FLASH_PIO_SIG + (x), (y))
drivers/input/touchscreen/hideep.c
293
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CON, 0x00)
drivers/input/touchscreen/hideep.c
302
static void hideep_pgm_set(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
304
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_WDT_CON, 0x00);
drivers/input/touchscreen/hideep.c
305
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_SPC_CON, 0x00);
drivers/input/touchscreen/hideep.c
306
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_CLK_ENA, 0xFF);
drivers/input/touchscreen/hideep.c
307
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_CLK_CON, 0x01);
drivers/input/touchscreen/hideep.c
308
hideep_pgm_w_reg(ts, HIDEEP_SYSCON_PWR_CON, 0x01);
drivers/input/touchscreen/hideep.c
309
hideep_pgm_w_reg(ts, HIDEEP_FLASH_TIM, 0x03);
drivers/input/touchscreen/hideep.c
310
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CACHE_CFG, 0x00);
drivers/input/touchscreen/hideep.c
313
static int hideep_pgm_get_pattern(struct hideep_ts *ts, u32 *pattern)
drivers/input/touchscreen/hideep.c
319
error = regmap_bulk_write(ts->reg, p1, &p2, 1);
drivers/input/touchscreen/hideep.c
321
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
330
error = hideep_pgm_w_reg(ts, HIDEEP_ESI_TX_INVALID, 0x01);
drivers/input/touchscreen/hideep.c
334
error = hideep_pgm_r_reg(ts, HIDEEP_SYSCON_PGM_ID, pattern);
drivers/input/touchscreen/hideep.c
341
static int hideep_enter_pgm(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
348
error = hideep_pgm_get_pattern(ts, &pattern);
drivers/input/touchscreen/hideep.c
350
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
353
dev_err(&ts->client->dev, "%s: bad pattern: %#08x\n",
drivers/input/touchscreen/hideep.c
356
dev_dbg(&ts->client->dev, "found magic code");
drivers/input/touchscreen/hideep.c
358
hideep_pgm_set(ts);
drivers/input/touchscreen/hideep.c
365
dev_err(&ts->client->dev, "failed to enter pgm mode\n");
drivers/input/touchscreen/hideep.c
370
static int hideep_nvm_unlock(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
375
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_SFR_RPAGE);
drivers/input/touchscreen/hideep.c
376
error = hideep_pgm_r_reg(ts, 0x0000000C, &unmask_code);
drivers/input/touchscreen/hideep.c
377
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_DEFAULT_PAGE);
drivers/input/touchscreen/hideep.c
385
if (unmask_code != ts->nvm_mask)
drivers/input/touchscreen/hideep.c
386
dev_warn(&ts->client->dev,
drivers/input/touchscreen/hideep.c
388
unmask_code, ts->nvm_mask);
drivers/input/touchscreen/hideep.c
390
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_SFR_WPAGE);
drivers/input/touchscreen/hideep.c
393
NVM_W_SFR(HIDEEP_NVM_MASK_OFS, ts->nvm_mask);
drivers/input/touchscreen/hideep.c
395
hideep_pgm_w_reg(ts, HIDEEP_FLASH_CFG, HIDEEP_NVM_DEFAULT_PAGE);
drivers/input/touchscreen/hideep.c
400
static int hideep_check_status(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
407
error = hideep_pgm_r_reg(ts, HIDEEP_FLASH_STA, &status);
drivers/input/touchscreen/hideep.c
417
static int hideep_program_page(struct hideep_ts *ts, u32 addr,
drivers/input/touchscreen/hideep.c
423
error = hideep_check_status(ts);
drivers/input/touchscreen/hideep.c
437
error = hideep_check_status(ts);
drivers/input/touchscreen/hideep.c
447
hideep_pgm_w_mem(ts, HIDEEP_FLASH_PIO_SIG | HIDEEP_WRONLY,
drivers/input/touchscreen/hideep.c
457
error = hideep_check_status(ts);
drivers/input/touchscreen/hideep.c
466
static int hideep_program_nvm(struct hideep_ts *ts,
drivers/input/touchscreen/hideep.c
469
struct pgm_packet *packet_r = (void *)ts->xfer_buf;
drivers/input/touchscreen/hideep.c
476
error = hideep_nvm_unlock(ts);
drivers/input/touchscreen/hideep.c
484
error = hideep_pgm_r_mem(ts, 0x00000000 + addr,
drivers/input/touchscreen/hideep.c
487
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
495
error = hideep_program_page(ts, addr,
drivers/input/touchscreen/hideep.c
498
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
515
static int hideep_verify_nvm(struct hideep_ts *ts,
drivers/input/touchscreen/hideep.c
518
struct pgm_packet *packet_r = (void *)ts->xfer_buf;
drivers/input/touchscreen/hideep.c
530
error = hideep_pgm_r_mem(ts, 0x00000000 + addr,
drivers/input/touchscreen/hideep.c
533
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
545
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
562
static int hideep_load_dwz(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
567
error = hideep_enter_pgm(ts);
drivers/input/touchscreen/hideep.c
573
error = hideep_pgm_r_mem(ts, HIDEEP_DWZ_INFO,
drivers/input/touchscreen/hideep.c
574
(void *)&ts->dwz_info,
drivers/input/touchscreen/hideep.c
575
sizeof(ts->dwz_info) / sizeof(__be32));
drivers/input/touchscreen/hideep.c
581
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
586
product_code = be16_to_cpu(ts->dwz_info.product_code);
drivers/input/touchscreen/hideep.c
590
dev_dbg(&ts->client->dev, "used crimson IC");
drivers/input/touchscreen/hideep.c
591
ts->fw_size = 1024 * 48;
drivers/input/touchscreen/hideep.c
592
ts->nvm_mask = 0x00310000;
drivers/input/touchscreen/hideep.c
595
dev_dbg(&ts->client->dev, "used lime IC");
drivers/input/touchscreen/hideep.c
596
ts->fw_size = 1024 * 64;
drivers/input/touchscreen/hideep.c
597
ts->nvm_mask = 0x0030027B;
drivers/input/touchscreen/hideep.c
600
dev_err(&ts->client->dev, "product code is wrong: %#04x",
drivers/input/touchscreen/hideep.c
605
dev_dbg(&ts->client->dev, "firmware release version: %#04x",
drivers/input/touchscreen/hideep.c
606
be16_to_cpu(ts->dwz_info.release_ver));
drivers/input/touchscreen/hideep.c
611
static int hideep_flash_firmware(struct hideep_ts *ts,
drivers/input/touchscreen/hideep.c
618
error = hideep_program_nvm(ts, ucode, ucode_len);
drivers/input/touchscreen/hideep.c
620
error = hideep_verify_nvm(ts, ucode, ucode_len);
drivers/input/touchscreen/hideep.c
629
static int hideep_update_firmware(struct hideep_ts *ts,
drivers/input/touchscreen/hideep.c
634
dev_dbg(&ts->client->dev, "starting firmware update");
drivers/input/touchscreen/hideep.c
637
error = hideep_enter_pgm(ts);
drivers/input/touchscreen/hideep.c
641
error = hideep_flash_firmware(ts, ucode, ucode_len);
drivers/input/touchscreen/hideep.c
643
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
646
dev_dbg(&ts->client->dev, "firmware updated successfully\n");
drivers/input/touchscreen/hideep.c
650
error2 = hideep_load_dwz(ts);
drivers/input/touchscreen/hideep.c
652
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
659
static int hideep_power_on(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
663
error = regulator_enable(ts->vcc_vdd);
drivers/input/touchscreen/hideep.c
665
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
670
error = regulator_enable(ts->vcc_vid);
drivers/input/touchscreen/hideep.c
672
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
678
if (ts->reset_gpio) {
drivers/input/touchscreen/hideep.c
679
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/hideep.c
681
error = regmap_write(ts->reg, HIDEEP_RESET_CMD, 0x01);
drivers/input/touchscreen/hideep.c
683
dev_err(&ts->client->dev,
drivers/input/touchscreen/hideep.c
694
struct hideep_ts *ts = data;
drivers/input/touchscreen/hideep.c
696
if (ts->reset_gpio)
drivers/input/touchscreen/hideep.c
697
gpiod_set_value(ts->reset_gpio, 1);
drivers/input/touchscreen/hideep.c
699
regulator_disable(ts->vcc_vid);
drivers/input/touchscreen/hideep.c
700
regulator_disable(ts->vcc_vdd);
drivers/input/touchscreen/hideep.c
723
static void hideep_parse_and_report(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
726
(void *)&ts->xfer_buf[HIDEEP_TOUCH_EVENT_INDEX];
drivers/input/touchscreen/hideep.c
727
const u8 *keys = &ts->xfer_buf[HIDEEP_KEY_EVENT_INDEX];
drivers/input/touchscreen/hideep.c
728
int touch_count = ts->xfer_buf[0];
drivers/input/touchscreen/hideep.c
729
int key_count = ts->xfer_buf[1] & 0x0f;
drivers/input/touchscreen/hideep.c
730
int lpm_count = ts->xfer_buf[1] & 0xf0;
drivers/input/touchscreen/hideep.c
734
dev_dbg(&ts->client->dev, "mt = %d, key = %d, lpm = %02x",
drivers/input/touchscreen/hideep.c
739
hideep_report_slot(ts->input_dev, events + i);
drivers/input/touchscreen/hideep.c
745
input_report_key(ts->input_dev,
drivers/input/touchscreen/hideep.c
746
ts->key_codes[key_data & HIDEEP_KEY_IDX_MASK],
drivers/input/touchscreen/hideep.c
750
input_mt_sync_frame(ts->input_dev);
drivers/input/touchscreen/hideep.c
751
input_sync(ts->input_dev);
drivers/input/touchscreen/hideep.c
756
struct hideep_ts *ts = handle;
drivers/input/touchscreen/hideep.c
761
error = regmap_bulk_read(ts->reg, HIDEEP_EVENT_ADDR,
drivers/input/touchscreen/hideep.c
762
ts->xfer_buf, HIDEEP_MAX_EVENT / 2);
drivers/input/touchscreen/hideep.c
764
dev_err(&ts->client->dev, "failed to read events: %d\n", error);
drivers/input/touchscreen/hideep.c
768
hideep_parse_and_report(ts);
drivers/input/touchscreen/hideep.c
774
static int hideep_get_axis_info(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
779
error = regmap_bulk_read(ts->reg, 0x28, val, ARRAY_SIZE(val));
drivers/input/touchscreen/hideep.c
783
ts->prop.max_x = le16_to_cpup(val);
drivers/input/touchscreen/hideep.c
784
ts->prop.max_y = le16_to_cpup(val + 1);
drivers/input/touchscreen/hideep.c
786
dev_dbg(&ts->client->dev, "X: %d, Y: %d",
drivers/input/touchscreen/hideep.c
787
ts->prop.max_x, ts->prop.max_y);
drivers/input/touchscreen/hideep.c
792
static int hideep_init_input(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
794
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/hideep.c
798
ts->input_dev = devm_input_allocate_device(dev);
drivers/input/touchscreen/hideep.c
799
if (!ts->input_dev) {
drivers/input/touchscreen/hideep.c
804
ts->input_dev->name = HIDEEP_TS_NAME;
drivers/input/touchscreen/hideep.c
805
ts->input_dev->id.bustype = BUS_I2C;
drivers/input/touchscreen/hideep.c
806
input_set_drvdata(ts->input_dev, ts);
drivers/input/touchscreen/hideep.c
808
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_X);
drivers/input/touchscreen/hideep.c
809
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_Y);
drivers/input/touchscreen/hideep.c
810
input_set_abs_params(ts->input_dev, ABS_MT_PRESSURE, 0, 65535, 0, 0);
drivers/input/touchscreen/hideep.c
811
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
drivers/input/touchscreen/hideep.c
812
input_set_abs_params(ts->input_dev, ABS_MT_TOOL_TYPE,
drivers/input/touchscreen/hideep.c
814
touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
drivers/input/touchscreen/hideep.c
816
if (ts->prop.max_x == 0 || ts->prop.max_y == 0) {
drivers/input/touchscreen/hideep.c
817
error = hideep_get_axis_info(ts);
drivers/input/touchscreen/hideep.c
822
error = input_mt_init_slots(ts->input_dev, HIDEEP_MT_MAX,
drivers/input/touchscreen/hideep.c
827
ts->key_num = device_property_count_u32(dev, "linux,keycodes");
drivers/input/touchscreen/hideep.c
828
if (ts->key_num > HIDEEP_KEY_MAX) {
drivers/input/touchscreen/hideep.c
830
ts->key_num);
drivers/input/touchscreen/hideep.c
834
if (ts->key_num <= 0) {
drivers/input/touchscreen/hideep.c
839
ts->key_codes,
drivers/input/touchscreen/hideep.c
840
ts->key_num);
drivers/input/touchscreen/hideep.c
846
if (ts->key_num) {
drivers/input/touchscreen/hideep.c
847
ts->input_dev->keycode = ts->key_codes;
drivers/input/touchscreen/hideep.c
848
ts->input_dev->keycodesize = sizeof(ts->key_codes[0]);
drivers/input/touchscreen/hideep.c
849
ts->input_dev->keycodemax = ts->key_num;
drivers/input/touchscreen/hideep.c
851
for (i = 0; i < ts->key_num; i++)
drivers/input/touchscreen/hideep.c
852
input_set_capability(ts->input_dev, EV_KEY,
drivers/input/touchscreen/hideep.c
853
ts->key_codes[i]);
drivers/input/touchscreen/hideep.c
857
error = input_register_device(ts->input_dev);
drivers/input/touchscreen/hideep.c
871
struct hideep_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/hideep.c
881
be16_to_cpu(ts->dwz_info.product_id));
drivers/input/touchscreen/hideep.c
898
if (fw_entry->size > ts->fw_size) {
drivers/input/touchscreen/hideep.c
900
fw_entry->size, ts->fw_size);
drivers/input/touchscreen/hideep.c
904
scoped_guard(mutex, &ts->dev_mutex) {
drivers/input/touchscreen/hideep.c
907
error = hideep_update_firmware(ts,
drivers/input/touchscreen/hideep.c
921
struct hideep_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/hideep.c
923
guard(mutex)(&ts->dev_mutex);
drivers/input/touchscreen/hideep.c
924
return sysfs_emit(buf, "%04x\n", be16_to_cpu(ts->dwz_info.release_ver));
drivers/input/touchscreen/hideep.c
931
struct hideep_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/hideep.c
933
guard(mutex)(&ts->dev_mutex);
drivers/input/touchscreen/hideep.c
934
return sysfs_emit(buf, "%04x\n", be16_to_cpu(ts->dwz_info.product_id));
drivers/input/touchscreen/hideep.c
949
static void hideep_set_work_mode(struct hideep_ts *ts)
drivers/input/touchscreen/hideep.c
960
if (device_property_read_bool(&ts->client->dev, "hideep,force-native-protocol"))
drivers/input/touchscreen/hideep.c
961
regmap_write(ts->reg, HIDEEP_WORK_MODE, 0x00);
drivers/input/touchscreen/hideep.c
967
struct hideep_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/hideep.c
970
hideep_power_off(ts);
drivers/input/touchscreen/hideep.c
978
struct hideep_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/hideep.c
981
error = hideep_power_on(ts);
drivers/input/touchscreen/hideep.c
987
hideep_set_work_mode(ts);
drivers/input/touchscreen/himax_hx83112b.c
101
static int himax_bus_read(struct himax_ts_data *ts, u32 address, void *dst,
drivers/input/touchscreen/himax_hx83112b.c
107
error = himax_bus_enable_burst(ts);
drivers/input/touchscreen/himax_hx83112b.c
112
error = regmap_write(ts->regmap, HIMAX_AHB_ADDR_BYTE_0, address);
drivers/input/touchscreen/himax_hx83112b.c
116
error = regmap_write(ts->regmap, HIMAX_AHB_ADDR_ACCESS_DIRECTION,
drivers/input/touchscreen/himax_hx83112b.c
122
error = regmap_noinc_read(ts->regmap, HIMAX_AHB_ADDR_RDATA_BYTE_0,
drivers/input/touchscreen/himax_hx83112b.c
125
error = regmap_read(ts->regmap, HIMAX_AHB_ADDR_RDATA_BYTE_0,
drivers/input/touchscreen/himax_hx83112b.c
133
static void himax_reset(struct himax_ts_data *ts)
drivers/input/touchscreen/himax_hx83112b.c
135
gpiod_set_value_cansleep(ts->gpiod_rst, 1);
drivers/input/touchscreen/himax_hx83112b.c
139
gpiod_set_value_cansleep(ts->gpiod_rst, 0);
drivers/input/touchscreen/himax_hx83112b.c
148
static int himax_read_product_id(struct himax_ts_data *ts, u32 *product_id)
drivers/input/touchscreen/himax_hx83112b.c
152
error = himax_bus_read(ts, HIMAX_REG_ADDR_ICID, product_id,
drivers/input/touchscreen/himax_hx83112b.c
161
static int himax_check_product_id(struct himax_ts_data *ts)
drivers/input/touchscreen/himax_hx83112b.c
166
error = himax_read_product_id(ts, &product_id);
drivers/input/touchscreen/himax_hx83112b.c
170
dev_dbg(&ts->client->dev, "Product id: %x\n", product_id);
drivers/input/touchscreen/himax_hx83112b.c
172
if (product_id == ts->chip->id)
drivers/input/touchscreen/himax_hx83112b.c
175
dev_err(&ts->client->dev, "Unknown product id: %x\n",
drivers/input/touchscreen/himax_hx83112b.c
180
static int himax_input_register(struct himax_ts_data *ts)
drivers/input/touchscreen/himax_hx83112b.c
184
ts->input_dev = devm_input_allocate_device(&ts->client->dev);
drivers/input/touchscreen/himax_hx83112b.c
185
if (!ts->input_dev) {
drivers/input/touchscreen/himax_hx83112b.c
186
dev_err(&ts->client->dev, "Failed to allocate input device\n");
drivers/input/touchscreen/himax_hx83112b.c
190
ts->input_dev->name = "Himax Touchscreen";
drivers/input/touchscreen/himax_hx83112b.c
192
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_X);
drivers/input/touchscreen/himax_hx83112b.c
193
input_set_capability(ts->input_dev, EV_ABS, ABS_MT_POSITION_Y);
drivers/input/touchscreen/himax_hx83112b.c
194
input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 200, 0, 0);
drivers/input/touchscreen/himax_hx83112b.c
195
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 200, 0, 0);
drivers/input/touchscreen/himax_hx83112b.c
197
touchscreen_parse_properties(ts->input_dev, true, &ts->props);
drivers/input/touchscreen/himax_hx83112b.c
199
error = input_mt_init_slots(ts->input_dev, HIMAX_MAX_POINTS,
drivers/input/touchscreen/himax_hx83112b.c
202
dev_err(&ts->client->dev,
drivers/input/touchscreen/himax_hx83112b.c
207
error = input_register_device(ts->input_dev);
drivers/input/touchscreen/himax_hx83112b.c
209
dev_err(&ts->client->dev,
drivers/input/touchscreen/himax_hx83112b.c
225
static bool himax_process_event_point(struct himax_ts_data *ts,
drivers/input/touchscreen/himax_hx83112b.c
237
input_mt_slot(ts->input_dev, point_index);
drivers/input/touchscreen/himax_hx83112b.c
238
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true);
drivers/input/touchscreen/himax_hx83112b.c
239
touchscreen_report_pos(ts->input_dev, &ts->props, x, y, true);
drivers/input/touchscreen/himax_hx83112b.c
240
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w);
drivers/input/touchscreen/himax_hx83112b.c
241
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
drivers/input/touchscreen/himax_hx83112b.c
245
static void himax_process_event(struct himax_ts_data *ts,
drivers/input/touchscreen/himax_hx83112b.c
252
if (himax_process_event_point(ts, event, i))
drivers/input/touchscreen/himax_hx83112b.c
256
input_mt_sync_frame(ts->input_dev);
drivers/input/touchscreen/himax_hx83112b.c
257
input_sync(ts->input_dev);
drivers/input/touchscreen/himax_hx83112b.c
260
static bool himax_verify_checksum(struct himax_ts_data *ts,
drivers/input/touchscreen/himax_hx83112b.c
271
dev_err(&ts->client->dev, "Wrong event checksum: %04x\n",
drivers/input/touchscreen/himax_hx83112b.c
279
static int himax_read_events(struct himax_ts_data *ts,
drivers/input/touchscreen/himax_hx83112b.c
282
return regmap_raw_read(ts->regmap, HIMAX_AHB_ADDR_EVENT_STACK, event,
drivers/input/touchscreen/himax_hx83112b.c
286
static int hx83100a_read_events(struct himax_ts_data *ts,
drivers/input/touchscreen/himax_hx83112b.c
289
return himax_bus_read(ts, HX83100A_REG_FW_EVENT_STACK, event, length);
drivers/input/touchscreen/himax_hx83112b.c
292
static int himax_handle_input(struct himax_ts_data *ts)
drivers/input/touchscreen/himax_hx83112b.c
297
error = ts->chip->read_events(ts, &event, sizeof(event));
drivers/input/touchscreen/himax_hx83112b.c
299
dev_err(&ts->client->dev, "Failed to read input event: %d\n",
drivers/input/touchscreen/himax_hx83112b.c
308
if (himax_verify_checksum(ts, &event))
drivers/input/touchscreen/himax_hx83112b.c
309
himax_process_event(ts, &event);
drivers/input/touchscreen/himax_hx83112b.c
317
struct himax_ts_data *ts = dev_id;
drivers/input/touchscreen/himax_hx83112b.c
319
error = himax_handle_input(ts);
drivers/input/touchscreen/himax_hx83112b.c
330
struct himax_ts_data *ts;
drivers/input/touchscreen/himax_hx83112b.c
337
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/himax_hx83112b.c
338
if (!ts)
drivers/input/touchscreen/himax_hx83112b.c
341
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/himax_hx83112b.c
342
ts->client = client;
drivers/input/touchscreen/himax_hx83112b.c
343
ts->chip = i2c_get_match_data(client);
drivers/input/touchscreen/himax_hx83112b.c
345
ts->regmap = devm_regmap_init_i2c(client, &himax_regmap_config);
drivers/input/touchscreen/himax_hx83112b.c
346
error = PTR_ERR_OR_ZERO(ts->regmap);
drivers/input/touchscreen/himax_hx83112b.c
352
ts->gpiod_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
drivers/input/touchscreen/himax_hx83112b.c
353
error = PTR_ERR_OR_ZERO(ts->gpiod_rst);
drivers/input/touchscreen/himax_hx83112b.c
359
himax_reset(ts);
drivers/input/touchscreen/himax_hx83112b.c
361
if (ts->chip->check_id) {
drivers/input/touchscreen/himax_hx83112b.c
362
error = himax_check_product_id(ts);
drivers/input/touchscreen/himax_hx83112b.c
367
error = himax_input_register(ts);
drivers/input/touchscreen/himax_hx83112b.c
373
client->name, ts);
drivers/input/touchscreen/himax_hx83112b.c
382
struct himax_ts_data *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/himax_hx83112b.c
384
disable_irq(ts->client->irq);
drivers/input/touchscreen/himax_hx83112b.c
390
struct himax_ts_data *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/himax_hx83112b.c
392
enable_irq(ts->client->irq);
drivers/input/touchscreen/himax_hx83112b.c
64
int (*check_id)(struct himax_ts_data *ts);
drivers/input/touchscreen/himax_hx83112b.c
65
int (*read_events)(struct himax_ts_data *ts, struct himax_event *event,
drivers/input/touchscreen/himax_hx83112b.c
84
static int himax_bus_enable_burst(struct himax_ts_data *ts)
drivers/input/touchscreen/himax_hx83112b.c
88
error = regmap_write(ts->regmap, HIMAX_AHB_ADDR_CONTI,
drivers/input/touchscreen/himax_hx83112b.c
93
error = regmap_write(ts->regmap, HIMAX_AHB_ADDR_INCR4,
drivers/input/touchscreen/ilitek_ts_i2c.c
138
static void ilitek_touch_down(struct ilitek_ts_data *ts, unsigned int id,
drivers/input/touchscreen/ilitek_ts_i2c.c
141
struct input_dev *input = ts->input_dev;
drivers/input/touchscreen/ilitek_ts_i2c.c
146
touchscreen_report_pos(input, &ts->prop, x, y, true);
drivers/input/touchscreen/ilitek_ts_i2c.c
149
static int ilitek_process_and_report_v6(struct ilitek_ts_data *ts)
drivers/input/touchscreen/ilitek_ts_i2c.c
157
struct input_dev *input = ts->input_dev;
drivers/input/touchscreen/ilitek_ts_i2c.c
158
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/ilitek_ts_i2c.c
161
error = ilitek_i2c_write_and_read(ts, NULL, 0, 0, buf, 64);
drivers/input/touchscreen/ilitek_ts_i2c.c
173
if (report_max_point > ts->max_tp) {
drivers/input/touchscreen/ilitek_ts_i2c.c
175
report_max_point, ts->max_tp);
drivers/input/touchscreen/ilitek_ts_i2c.c
181
error = ilitek_i2c_write_and_read(ts, NULL, 0, 0,
drivers/input/touchscreen/ilitek_ts_i2c.c
200
if (x > ts->screen_max_x || x < ts->screen_min_x ||
drivers/input/touchscreen/ilitek_ts_i2c.c
201
y > ts->screen_max_y || y < ts->screen_min_y) {
drivers/input/touchscreen/ilitek_ts_i2c.c
203
ts->screen_min_x, x, ts->screen_max_x,
drivers/input/touchscreen/ilitek_ts_i2c.c
204
ts->screen_min_y, y, ts->screen_max_y);
drivers/input/touchscreen/ilitek_ts_i2c.c
208
ilitek_touch_down(ts, id, x, y);
drivers/input/touchscreen/ilitek_ts_i2c.c
218
static int api_protocol_set_cmd(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
227
cmd = ts->ptl_cb_func[idx].cmd;
drivers/input/touchscreen/ilitek_ts_i2c.c
228
error = ts->ptl_cb_func[idx].func(ts, cmd, inbuf, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
235
static int api_protocol_get_ptl_ver(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
242
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 3);
drivers/input/touchscreen/ilitek_ts_i2c.c
246
ts->ptl.ver = get_unaligned_be16(outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
247
ts->ptl.ver_major = outbuf[0];
drivers/input/touchscreen/ilitek_ts_i2c.c
252
static int api_protocol_get_mcu_ver(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
259
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 32);
drivers/input/touchscreen/ilitek_ts_i2c.c
263
ts->mcu_ver = get_unaligned_le16(outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
264
memset(ts->product_id, 0, sizeof(ts->product_id));
drivers/input/touchscreen/ilitek_ts_i2c.c
265
memcpy(ts->product_id, outbuf + 6, 26);
drivers/input/touchscreen/ilitek_ts_i2c.c
270
static int api_protocol_get_fw_ver(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
277
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8);
drivers/input/touchscreen/ilitek_ts_i2c.c
281
memcpy(ts->firmware_ver, outbuf, 8);
drivers/input/touchscreen/ilitek_ts_i2c.c
286
static int api_protocol_get_scrn_res(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
293
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 8);
drivers/input/touchscreen/ilitek_ts_i2c.c
297
ts->screen_min_x = get_unaligned_le16(outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
298
ts->screen_min_y = get_unaligned_le16(outbuf + 2);
drivers/input/touchscreen/ilitek_ts_i2c.c
299
ts->screen_max_x = get_unaligned_le16(outbuf + 4);
drivers/input/touchscreen/ilitek_ts_i2c.c
300
ts->screen_max_y = get_unaligned_le16(outbuf + 6);
drivers/input/touchscreen/ilitek_ts_i2c.c
305
static int api_protocol_get_tp_res(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
312
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 15);
drivers/input/touchscreen/ilitek_ts_i2c.c
316
ts->max_tp = outbuf[8];
drivers/input/touchscreen/ilitek_ts_i2c.c
317
if (ts->max_tp > ILITEK_SUPPORT_MAX_POINT) {
drivers/input/touchscreen/ilitek_ts_i2c.c
318
dev_err(&ts->client->dev, "Invalid MAX_TP:%d from FW\n",
drivers/input/touchscreen/ilitek_ts_i2c.c
319
ts->max_tp);
drivers/input/touchscreen/ilitek_ts_i2c.c
326
static int api_protocol_get_ic_mode(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
333
error = ilitek_i2c_write_and_read(ts, buf, 1, 5, outbuf, 2);
drivers/input/touchscreen/ilitek_ts_i2c.c
337
ts->ic_mode = outbuf[0];
drivers/input/touchscreen/ilitek_ts_i2c.c
341
static int api_protocol_set_ic_sleep(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
347
return ilitek_i2c_write_and_read(ts, buf, 1, 0, NULL, 0);
drivers/input/touchscreen/ilitek_ts_i2c.c
350
static int api_protocol_set_ic_wake(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
356
return ilitek_i2c_write_and_read(ts, buf, 1, 0, NULL, 0);
drivers/input/touchscreen/ilitek_ts_i2c.c
396
static void ilitek_reset(struct ilitek_ts_data *ts, int delay)
drivers/input/touchscreen/ilitek_ts_i2c.c
398
if (ts->reset_gpio) {
drivers/input/touchscreen/ilitek_ts_i2c.c
399
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/ilitek_ts_i2c.c
401
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/ilitek_ts_i2c.c
406
static int ilitek_protocol_init(struct ilitek_ts_data *ts)
drivers/input/touchscreen/ilitek_ts_i2c.c
411
ts->ptl_cb_func = ptl_func_map;
drivers/input/touchscreen/ilitek_ts_i2c.c
412
ts->reset_time = 600;
drivers/input/touchscreen/ilitek_ts_i2c.c
414
error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
419
if (ts->ptl.ver_major == 0x3 ||
drivers/input/touchscreen/ilitek_ts_i2c.c
420
ts->ptl.ver == BL_V1_6 ||
drivers/input/touchscreen/ilitek_ts_i2c.c
421
ts->ptl.ver == BL_V1_7)
drivers/input/touchscreen/ilitek_ts_i2c.c
427
static int ilitek_read_tp_info(struct ilitek_ts_data *ts, bool boot)
drivers/input/touchscreen/ilitek_ts_i2c.c
432
error = api_protocol_set_cmd(ts, GET_PTL_VER, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
436
error = api_protocol_set_cmd(ts, GET_MCU_VER, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
440
error = api_protocol_set_cmd(ts, GET_FW_VER, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
445
error = api_protocol_set_cmd(ts, GET_SCRN_RES, NULL,
drivers/input/touchscreen/ilitek_ts_i2c.c
451
error = api_protocol_set_cmd(ts, GET_TP_RES, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
455
error = api_protocol_set_cmd(ts, GET_IC_MODE, NULL, outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
462
static int ilitek_input_dev_init(struct device *dev, struct ilitek_ts_data *ts)
drivers/input/touchscreen/ilitek_ts_i2c.c
471
ts->input_dev = input;
drivers/input/touchscreen/ilitek_ts_i2c.c
478
ts->screen_min_x, ts->screen_max_x, 0, 0);
drivers/input/touchscreen/ilitek_ts_i2c.c
480
ts->screen_min_y, ts->screen_max_y, 0, 0);
drivers/input/touchscreen/ilitek_ts_i2c.c
482
touchscreen_parse_properties(input, true, &ts->prop);
drivers/input/touchscreen/ilitek_ts_i2c.c
484
error = input_mt_init_slots(input, ts->max_tp,
drivers/input/touchscreen/ilitek_ts_i2c.c
502
struct ilitek_ts_data *ts = dev_id;
drivers/input/touchscreen/ilitek_ts_i2c.c
505
error = ilitek_process_and_report_v6(ts);
drivers/input/touchscreen/ilitek_ts_i2c.c
507
dev_err(&ts->client->dev, "[%s] err:%d\n", __func__, error);
drivers/input/touchscreen/ilitek_ts_i2c.c
518
struct ilitek_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/ilitek_ts_i2c.c
522
ts->firmware_ver[0], ts->firmware_ver[1],
drivers/input/touchscreen/ilitek_ts_i2c.c
523
ts->firmware_ver[2], ts->firmware_ver[3],
drivers/input/touchscreen/ilitek_ts_i2c.c
524
ts->firmware_ver[4], ts->firmware_ver[5],
drivers/input/touchscreen/ilitek_ts_i2c.c
525
ts->firmware_ver[6], ts->firmware_ver[7]);
drivers/input/touchscreen/ilitek_ts_i2c.c
533
struct ilitek_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/ilitek_ts_i2c.c
536
ts->mcu_ver, ts->product_id);
drivers/input/touchscreen/ilitek_ts_i2c.c
549
struct ilitek_ts_data *ts;
drivers/input/touchscreen/ilitek_ts_i2c.c
558
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/ilitek_ts_i2c.c
559
if (!ts)
drivers/input/touchscreen/ilitek_ts_i2c.c
562
ts->client = client;
drivers/input/touchscreen/ilitek_ts_i2c.c
563
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/ilitek_ts_i2c.c
565
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
drivers/input/touchscreen/ilitek_ts_i2c.c
566
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/ilitek_ts_i2c.c
567
error = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/ilitek_ts_i2c.c
572
ilitek_reset(ts, 1000);
drivers/input/touchscreen/ilitek_ts_i2c.c
574
error = ilitek_protocol_init(ts);
drivers/input/touchscreen/ilitek_ts_i2c.c
580
error = ilitek_read_tp_info(ts, true);
drivers/input/touchscreen/ilitek_ts_i2c.c
586
error = ilitek_input_dev_init(dev, ts);
drivers/input/touchscreen/ilitek_ts_i2c.c
592
error = devm_request_threaded_irq(dev, ts->client->irq,
drivers/input/touchscreen/ilitek_ts_i2c.c
594
"ilitek_touch_irq", ts);
drivers/input/touchscreen/ilitek_ts_i2c.c
606
struct ilitek_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/ilitek_ts_i2c.c
612
error = api_protocol_set_cmd(ts, SET_IC_SLEEP, NULL, NULL);
drivers/input/touchscreen/ilitek_ts_i2c.c
623
struct ilitek_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/ilitek_ts_i2c.c
627
error = api_protocol_set_cmd(ts, SET_IC_WAKE, NULL, NULL);
drivers/input/touchscreen/ilitek_ts_i2c.c
631
ilitek_reset(ts, ts->reset_time);
drivers/input/touchscreen/ilitek_ts_i2c.c
74
int (*func)(struct ilitek_ts_data *ts, u16 cmd, u8 *inbuf, u8 *outbuf);
drivers/input/touchscreen/ilitek_ts_i2c.c
93
static int ilitek_i2c_write_and_read(struct ilitek_ts_data *ts,
drivers/input/touchscreen/ilitek_ts_i2c.c
98
struct i2c_client *client = ts->client;
drivers/input/touchscreen/imagis.c
106
struct imagis_ts *ts = dev_id;
drivers/input/touchscreen/imagis.c
112
error = imagis_i2c_read_reg(ts, ts->tdata->interrupt_msg_cmd, &intr_message);
drivers/input/touchscreen/imagis.c
114
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
121
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
130
if (ts->tdata->protocol_b)
drivers/input/touchscreen/imagis.c
131
error = imagis_i2c_read_reg(ts,
drivers/input/touchscreen/imagis.c
132
ts->tdata->touch_coord_cmd + (i * 4),
drivers/input/touchscreen/imagis.c
135
error = imagis_i2c_read_reg(ts,
drivers/input/touchscreen/imagis.c
136
ts->tdata->touch_coord_cmd, &finger_status);
drivers/input/touchscreen/imagis.c
138
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
144
input_mt_slot(ts->input_dev, i);
drivers/input/touchscreen/imagis.c
145
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER,
drivers/input/touchscreen/imagis.c
147
touchscreen_report_pos(ts->input_dev, &ts->prop,
drivers/input/touchscreen/imagis.c
151
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR,
drivers/input/touchscreen/imagis.c
157
for (int i = 0; i < ts->num_keycodes; i++)
drivers/input/touchscreen/imagis.c
158
input_report_key(ts->input_dev, ts->keycodes[i],
drivers/input/touchscreen/imagis.c
161
input_mt_sync_frame(ts->input_dev);
drivers/input/touchscreen/imagis.c
162
input_sync(ts->input_dev);
drivers/input/touchscreen/imagis.c
170
struct imagis_ts *ts = _ts;
drivers/input/touchscreen/imagis.c
172
regulator_bulk_disable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/imagis.c
175
static int imagis_power_on(struct imagis_ts *ts)
drivers/input/touchscreen/imagis.c
179
error = regulator_bulk_enable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/imagis.c
188
static int imagis_start(struct imagis_ts *ts)
drivers/input/touchscreen/imagis.c
192
error = imagis_power_on(ts);
drivers/input/touchscreen/imagis.c
196
enable_irq(ts->client->irq);
drivers/input/touchscreen/imagis.c
201
static int imagis_stop(struct imagis_ts *ts)
drivers/input/touchscreen/imagis.c
203
disable_irq(ts->client->irq);
drivers/input/touchscreen/imagis.c
205
imagis_power_off(ts);
drivers/input/touchscreen/imagis.c
212
struct imagis_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/imagis.c
214
return imagis_start(ts);
drivers/input/touchscreen/imagis.c
219
struct imagis_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/imagis.c
221
imagis_stop(ts);
drivers/input/touchscreen/imagis.c
224
static int imagis_init_input_dev(struct imagis_ts *ts)
drivers/input/touchscreen/imagis.c
229
input_dev = devm_input_allocate_device(&ts->client->dev);
drivers/input/touchscreen/imagis.c
233
ts->input_dev = input_dev;
drivers/input/touchscreen/imagis.c
241
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/imagis.c
246
if (ts->tdata->touch_keys_supported) {
drivers/input/touchscreen/imagis.c
247
ts->num_keycodes = of_property_read_variable_u32_array(
drivers/input/touchscreen/imagis.c
248
ts->client->dev.of_node, "linux,keycodes",
drivers/input/touchscreen/imagis.c
249
ts->keycodes, 0, ARRAY_SIZE(ts->keycodes));
drivers/input/touchscreen/imagis.c
250
if (ts->num_keycodes <= 0) {
drivers/input/touchscreen/imagis.c
251
ts->keycodes[0] = KEY_APPSELECT;
drivers/input/touchscreen/imagis.c
252
ts->keycodes[1] = KEY_BACK;
drivers/input/touchscreen/imagis.c
253
ts->num_keycodes = 2;
drivers/input/touchscreen/imagis.c
256
input_dev->keycodemax = ts->num_keycodes;
drivers/input/touchscreen/imagis.c
257
input_dev->keycodesize = sizeof(ts->keycodes[0]);
drivers/input/touchscreen/imagis.c
258
input_dev->keycode = ts->keycodes;
drivers/input/touchscreen/imagis.c
261
for (int i = 0; i < ts->num_keycodes; i++)
drivers/input/touchscreen/imagis.c
262
input_set_capability(input_dev, EV_KEY, ts->keycodes[i]);
drivers/input/touchscreen/imagis.c
264
touchscreen_parse_properties(input_dev, true, &ts->prop);
drivers/input/touchscreen/imagis.c
265
if (!ts->prop.max_x || !ts->prop.max_y) {
drivers/input/touchscreen/imagis.c
266
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
275
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
282
dev_err(&ts->client->dev,
drivers/input/touchscreen/imagis.c
290
static int imagis_init_regulators(struct imagis_ts *ts)
drivers/input/touchscreen/imagis.c
292
struct i2c_client *client = ts->client;
drivers/input/touchscreen/imagis.c
294
ts->supplies[0].supply = "vdd";
drivers/input/touchscreen/imagis.c
295
ts->supplies[1].supply = "vddio";
drivers/input/touchscreen/imagis.c
297
ARRAY_SIZE(ts->supplies),
drivers/input/touchscreen/imagis.c
298
ts->supplies);
drivers/input/touchscreen/imagis.c
304
struct imagis_ts *ts;
drivers/input/touchscreen/imagis.c
307
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/imagis.c
308
if (!ts)
drivers/input/touchscreen/imagis.c
311
ts->client = i2c;
drivers/input/touchscreen/imagis.c
313
ts->tdata = device_get_match_data(dev);
drivers/input/touchscreen/imagis.c
314
if (!ts->tdata) {
drivers/input/touchscreen/imagis.c
319
error = imagis_init_regulators(ts);
drivers/input/touchscreen/imagis.c
325
error = imagis_power_on(ts);
drivers/input/touchscreen/imagis.c
331
error = devm_add_action_or_reset(dev, imagis_power_off, ts);
drivers/input/touchscreen/imagis.c
337
error = imagis_i2c_read_reg(ts, ts->tdata->whoami_cmd, &chip_id);
drivers/input/touchscreen/imagis.c
343
if (chip_id != ts->tdata->whoami_val) {
drivers/input/touchscreen/imagis.c
351
"imagis-touchscreen", ts);
drivers/input/touchscreen/imagis.c
358
error = imagis_init_input_dev(ts);
drivers/input/touchscreen/imagis.c
368
struct imagis_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/imagis.c
371
guard(mutex)(&ts->input_dev->mutex);
drivers/input/touchscreen/imagis.c
373
if (input_device_enabled(ts->input_dev)) {
drivers/input/touchscreen/imagis.c
374
error = imagis_stop(ts);
drivers/input/touchscreen/imagis.c
385
struct imagis_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/imagis.c
388
guard(mutex)(&ts->input_dev->mutex);
drivers/input/touchscreen/imagis.c
390
if (input_device_enabled(ts->input_dev)) {
drivers/input/touchscreen/imagis.c
391
error = imagis_start(ts);
drivers/input/touchscreen/imagis.c
66
static int imagis_i2c_read_reg(struct imagis_ts *ts,
drivers/input/touchscreen/imagis.c
73
.addr = ts->client->addr,
drivers/input/touchscreen/imagis.c
78
.addr = ts->client->addr,
drivers/input/touchscreen/imagis.c
89
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/imagis.c
96
dev_err(&ts->client->dev,
drivers/input/touchscreen/ipaq-micro-ts.c
101
input_set_capability(ts->input, EV_KEY, BTN_TOUCH);
drivers/input/touchscreen/ipaq-micro-ts.c
102
input_set_capability(ts->input, EV_ABS, ABS_X);
drivers/input/touchscreen/ipaq-micro-ts.c
103
input_set_capability(ts->input, EV_ABS, ABS_Y);
drivers/input/touchscreen/ipaq-micro-ts.c
104
input_set_abs_params(ts->input, ABS_X, 0, 1023, 0, 0);
drivers/input/touchscreen/ipaq-micro-ts.c
105
input_set_abs_params(ts->input, ABS_Y, 0, 1023, 0, 0);
drivers/input/touchscreen/ipaq-micro-ts.c
107
error = input_register_device(ts->input);
drivers/input/touchscreen/ipaq-micro-ts.c
113
platform_set_drvdata(pdev, ts);
drivers/input/touchscreen/ipaq-micro-ts.c
122
struct touchscreen_data *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ipaq-micro-ts.c
124
micro_ts_toggle_receive(ts, false);
drivers/input/touchscreen/ipaq-micro-ts.c
131
struct touchscreen_data *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/ipaq-micro-ts.c
132
struct input_dev *input = ts->input;
drivers/input/touchscreen/ipaq-micro-ts.c
137
micro_ts_toggle_receive(ts, true);
drivers/input/touchscreen/ipaq-micro-ts.c
29
struct touchscreen_data *ts = data;
drivers/input/touchscreen/ipaq-micro-ts.c
32
input_report_abs(ts->input, ABS_X,
drivers/input/touchscreen/ipaq-micro-ts.c
34
input_report_abs(ts->input, ABS_Y,
drivers/input/touchscreen/ipaq-micro-ts.c
36
input_report_key(ts->input, BTN_TOUCH, 1);
drivers/input/touchscreen/ipaq-micro-ts.c
37
input_sync(ts->input);
drivers/input/touchscreen/ipaq-micro-ts.c
39
input_report_abs(ts->input, ABS_X, 0);
drivers/input/touchscreen/ipaq-micro-ts.c
40
input_report_abs(ts->input, ABS_Y, 0);
drivers/input/touchscreen/ipaq-micro-ts.c
41
input_report_key(ts->input, BTN_TOUCH, 0);
drivers/input/touchscreen/ipaq-micro-ts.c
42
input_sync(ts->input);
drivers/input/touchscreen/ipaq-micro-ts.c
46
static void micro_ts_toggle_receive(struct touchscreen_data *ts, bool enable)
drivers/input/touchscreen/ipaq-micro-ts.c
48
struct ipaq_micro *micro = ts->micro;
drivers/input/touchscreen/ipaq-micro-ts.c
53
micro->ts = micro_ts_receive;
drivers/input/touchscreen/ipaq-micro-ts.c
54
micro->ts_data = ts;
drivers/input/touchscreen/ipaq-micro-ts.c
56
micro->ts = NULL;
drivers/input/touchscreen/ipaq-micro-ts.c
63
struct touchscreen_data *ts = input_get_drvdata(input);
drivers/input/touchscreen/ipaq-micro-ts.c
65
micro_ts_toggle_receive(ts, true);
drivers/input/touchscreen/ipaq-micro-ts.c
72
struct touchscreen_data *ts = input_get_drvdata(input);
drivers/input/touchscreen/ipaq-micro-ts.c
74
micro_ts_toggle_receive(ts, false);
drivers/input/touchscreen/ipaq-micro-ts.c
80
struct touchscreen_data *ts;
drivers/input/touchscreen/ipaq-micro-ts.c
83
ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/ipaq-micro-ts.c
84
if (!ts)
drivers/input/touchscreen/ipaq-micro-ts.c
87
ts->micro = micro;
drivers/input/touchscreen/ipaq-micro-ts.c
89
ts->input = devm_input_allocate_device(&pdev->dev);
drivers/input/touchscreen/ipaq-micro-ts.c
90
if (!ts->input) {
drivers/input/touchscreen/ipaq-micro-ts.c
95
ts->input->name = "ipaq micro ts";
drivers/input/touchscreen/ipaq-micro-ts.c
96
ts->input->open = micro_ts_open;
drivers/input/touchscreen/ipaq-micro-ts.c
97
ts->input->close = micro_ts_close;
drivers/input/touchscreen/ipaq-micro-ts.c
99
input_set_drvdata(ts->input, ts);
drivers/input/touchscreen/melfas_mip4.c
1003
ret = i2c_master_send(ts->client, cmd, 3);
drivers/input/touchscreen/melfas_mip4.c
1006
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1012
error = mip4_bl_read_status(ts);
drivers/input/touchscreen/melfas_mip4.c
1023
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
1028
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
1038
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1042
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/melfas_mip4.c
1045
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1052
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1076
static int mip4_flash_fw(struct mip4_ts *ts,
drivers/input/touchscreen/melfas_mip4.c
1079
struct i2c_client *client = ts->client;
drivers/input/touchscreen/melfas_mip4.c
1087
error = mip4_bl_enter(ts);
drivers/input/touchscreen/melfas_mip4.c
1096
error = mip4_bl_get_address(ts, &buf_addr);
drivers/input/touchscreen/melfas_mip4.c
1109
error = mip4_bl_program_page(ts, offset, fw_data + offset,
drivers/input/touchscreen/melfas_mip4.c
1115
error = mip4_bl_verify_page(ts, offset, fw_data + offset,
drivers/input/touchscreen/melfas_mip4.c
1125
error2 = mip4_bl_exit(ts);
drivers/input/touchscreen/melfas_mip4.c
1134
mip4_power_off(ts);
drivers/input/touchscreen/melfas_mip4.c
1135
mip4_power_on(ts);
drivers/input/touchscreen/melfas_mip4.c
1137
mip4_query_device(ts);
drivers/input/touchscreen/melfas_mip4.c
1140
input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1141
input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1142
input_set_abs_params(ts->input, ABS_X, 0, ts->max_x, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1143
input_set_abs_params(ts->input, ABS_Y, 0, ts->max_y, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1144
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->ppm_x);
drivers/input/touchscreen/melfas_mip4.c
1145
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->ppm_y);
drivers/input/touchscreen/melfas_mip4.c
1146
input_abs_set_res(ts->input, ABS_X, ts->ppm_x);
drivers/input/touchscreen/melfas_mip4.c
1147
input_abs_set_res(ts->input, ABS_Y, ts->ppm_y);
drivers/input/touchscreen/melfas_mip4.c
1152
static int mip4_parse_firmware(struct mip4_ts *ts, const struct firmware *fw,
drivers/input/touchscreen/melfas_mip4.c
1161
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1176
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1185
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1195
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1200
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1207
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1215
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1220
dev_dbg(&ts->client->dev, "F/W chip version: %04X %04X %04X %04X\n",
drivers/input/touchscreen/melfas_mip4.c
1221
ts->fw_version.boot, ts->fw_version.core,
drivers/input/touchscreen/melfas_mip4.c
1222
ts->fw_version.app, ts->fw_version.param);
drivers/input/touchscreen/melfas_mip4.c
1229
dev_dbg(&ts->client->dev, "F/W type: Bootloader\n");
drivers/input/touchscreen/melfas_mip4.c
1234
dev_dbg(&ts->client->dev, "F/W type: Main\n");
drivers/input/touchscreen/melfas_mip4.c
1236
dev_err(&ts->client->dev, "Wrong firmware type\n");
drivers/input/touchscreen/melfas_mip4.c
1243
static int mip4_execute_fw_update(struct mip4_ts *ts, const struct firmware *fw)
drivers/input/touchscreen/melfas_mip4.c
1251
error = mip4_parse_firmware(ts, fw,
drivers/input/touchscreen/melfas_mip4.c
1256
if (input_device_enabled(ts->input)) {
drivers/input/touchscreen/melfas_mip4.c
1257
disable_irq(ts->client->irq);
drivers/input/touchscreen/melfas_mip4.c
1259
error = mip4_power_on(ts);
drivers/input/touchscreen/melfas_mip4.c
1266
error = mip4_flash_fw(ts, fw->data, fw_size, fw_start_offset);
drivers/input/touchscreen/melfas_mip4.c
1272
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1276
if (input_device_enabled(ts->input))
drivers/input/touchscreen/melfas_mip4.c
1277
enable_irq(ts->client->irq);
drivers/input/touchscreen/melfas_mip4.c
1279
mip4_power_off(ts);
drivers/input/touchscreen/melfas_mip4.c
1289
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1293
error = request_firmware(&fw, ts->fw_name, dev);
drivers/input/touchscreen/melfas_mip4.c
1295
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1297
ts->fw_name, error);
drivers/input/touchscreen/melfas_mip4.c
1306
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/melfas_mip4.c
1308
error = mip4_execute_fw_update(ts, fw);
drivers/input/touchscreen/melfas_mip4.c
1310
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
1325
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1328
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/melfas_mip4.c
1331
ts->fw_version.boot, ts->fw_version.core,
drivers/input/touchscreen/melfas_mip4.c
1332
ts->fw_version.app, ts->fw_version.param);
drivers/input/touchscreen/melfas_mip4.c
1342
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1345
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/melfas_mip4.c
1352
(int)sizeof(ts->product_name), ts->product_name);
drivers/input/touchscreen/melfas_mip4.c
1362
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1364
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/melfas_mip4.c
1366
return sysfs_emit(buf, "%04X\n", ts->product_id);
drivers/input/touchscreen/melfas_mip4.c
1376
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1378
guard(mutex)(&ts->input->mutex);
drivers/input/touchscreen/melfas_mip4.c
1380
return sysfs_emit(buf, "%.*s\n", (int)sizeof(ts->ic_name), ts->ic_name);
drivers/input/touchscreen/melfas_mip4.c
1397
struct mip4_ts *ts;
drivers/input/touchscreen/melfas_mip4.c
1406
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/melfas_mip4.c
1407
if (!ts)
drivers/input/touchscreen/melfas_mip4.c
1414
ts->client = client;
drivers/input/touchscreen/melfas_mip4.c
1415
ts->input = input;
drivers/input/touchscreen/melfas_mip4.c
1417
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/melfas_mip4.c
1420
ts->gpio_ce = devm_gpiod_get_optional(&client->dev,
drivers/input/touchscreen/melfas_mip4.c
1422
if (IS_ERR(ts->gpio_ce))
drivers/input/touchscreen/melfas_mip4.c
1423
return dev_err_probe(&client->dev, PTR_ERR(ts->gpio_ce), "Failed to get gpio\n");
drivers/input/touchscreen/melfas_mip4.c
1425
error = mip4_power_on(ts);
drivers/input/touchscreen/melfas_mip4.c
1428
error = mip4_query_device(ts);
drivers/input/touchscreen/melfas_mip4.c
1429
mip4_power_off(ts);
drivers/input/touchscreen/melfas_mip4.c
1434
input->phys = ts->phys;
drivers/input/touchscreen/melfas_mip4.c
1438
input->id.product = ts->product_id;
drivers/input/touchscreen/melfas_mip4.c
1443
input_set_drvdata(input, ts);
drivers/input/touchscreen/melfas_mip4.c
1445
input->keycode = ts->key_code;
drivers/input/touchscreen/melfas_mip4.c
1446
input->keycodesize = sizeof(*ts->key_code);
drivers/input/touchscreen/melfas_mip4.c
1447
input->keycodemax = ts->key_num;
drivers/input/touchscreen/melfas_mip4.c
1450
input_set_abs_params(input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1451
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
drivers/input/touchscreen/melfas_mip4.c
1458
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->ppm_x);
drivers/input/touchscreen/melfas_mip4.c
1459
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->ppm_y);
drivers/input/touchscreen/melfas_mip4.c
1465
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/melfas_mip4.c
1470
MIP4_DEVICE_NAME, ts);
drivers/input/touchscreen/melfas_mip4.c
1491
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1492
struct input_dev *input = ts->input;
drivers/input/touchscreen/melfas_mip4.c
1497
ts->wake_irq_enabled = enable_irq_wake(client->irq) == 0;
drivers/input/touchscreen/melfas_mip4.c
1499
mip4_disable(ts);
drivers/input/touchscreen/melfas_mip4.c
1507
struct mip4_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/melfas_mip4.c
1508
struct input_dev *input = ts->input;
drivers/input/touchscreen/melfas_mip4.c
1512
if (ts->wake_irq_enabled)
drivers/input/touchscreen/melfas_mip4.c
1515
mip4_enable(ts);
drivers/input/touchscreen/melfas_mip4.c
179
static int mip4_i2c_xfer(struct mip4_ts *ts,
drivers/input/touchscreen/melfas_mip4.c
185
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
190
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
201
res = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/melfas_mip4.c
206
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
225
static int mip4_get_fw_version(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
228
u8 buf[sizeof(ts->fw_version)];
drivers/input/touchscreen/melfas_mip4.c
231
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), buf, sizeof(buf));
drivers/input/touchscreen/melfas_mip4.c
233
memset(&ts->fw_version, 0xff, sizeof(ts->fw_version));
drivers/input/touchscreen/melfas_mip4.c
237
mip4_parse_fw_version(buf, &ts->fw_version);
drivers/input/touchscreen/melfas_mip4.c
245
static int mip4_query_device(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
256
if (i2c_smbus_xfer(ts->client->adapter, ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
258
dev_err(&ts->client->dev, "nothing at this address\n");
drivers/input/touchscreen/melfas_mip4.c
265
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd),
drivers/input/touchscreen/melfas_mip4.c
266
ts->product_name, sizeof(ts->product_name));
drivers/input/touchscreen/melfas_mip4.c
268
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
271
dev_dbg(&ts->client->dev, "product name: %.*s\n",
drivers/input/touchscreen/melfas_mip4.c
272
(int)sizeof(ts->product_name), ts->product_name);
drivers/input/touchscreen/melfas_mip4.c
277
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), buf, 2);
drivers/input/touchscreen/melfas_mip4.c
279
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
282
ts->product_id = get_unaligned_le16(&buf[0]);
drivers/input/touchscreen/melfas_mip4.c
283
dev_dbg(&ts->client->dev, "product id: %04X\n", ts->product_id);
drivers/input/touchscreen/melfas_mip4.c
287
snprintf(ts->fw_name, sizeof(ts->fw_name),
drivers/input/touchscreen/melfas_mip4.c
288
"melfas_mip4_%04X.fw", ts->product_id);
drivers/input/touchscreen/melfas_mip4.c
289
dev_dbg(&ts->client->dev, "firmware name: %s\n", ts->fw_name);
drivers/input/touchscreen/melfas_mip4.c
294
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd),
drivers/input/touchscreen/melfas_mip4.c
295
ts->ic_name, sizeof(ts->ic_name));
drivers/input/touchscreen/melfas_mip4.c
297
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
300
dev_dbg(&ts->client->dev, "IC name: %.*s\n",
drivers/input/touchscreen/melfas_mip4.c
301
(int)sizeof(ts->ic_name), ts->ic_name);
drivers/input/touchscreen/melfas_mip4.c
304
error = mip4_get_fw_version(ts);
drivers/input/touchscreen/melfas_mip4.c
306
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
309
dev_dbg(&ts->client->dev, "F/W Version: %04X %04X %04X %04X\n",
drivers/input/touchscreen/melfas_mip4.c
310
ts->fw_version.boot, ts->fw_version.core,
drivers/input/touchscreen/melfas_mip4.c
311
ts->fw_version.app, ts->fw_version.param);
drivers/input/touchscreen/melfas_mip4.c
316
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), buf, 14);
drivers/input/touchscreen/melfas_mip4.c
318
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
322
ts->max_x = get_unaligned_le16(&buf[0]);
drivers/input/touchscreen/melfas_mip4.c
323
ts->max_y = get_unaligned_le16(&buf[2]);
drivers/input/touchscreen/melfas_mip4.c
324
dev_dbg(&ts->client->dev, "max_x: %d, max_y: %d\n",
drivers/input/touchscreen/melfas_mip4.c
325
ts->max_x, ts->max_y);
drivers/input/touchscreen/melfas_mip4.c
327
ts->node_x = buf[4];
drivers/input/touchscreen/melfas_mip4.c
328
ts->node_y = buf[5];
drivers/input/touchscreen/melfas_mip4.c
329
ts->node_key = buf[6];
drivers/input/touchscreen/melfas_mip4.c
330
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
332
ts->node_x, ts->node_y, ts->node_key);
drivers/input/touchscreen/melfas_mip4.c
334
ts->ppm_x = buf[12];
drivers/input/touchscreen/melfas_mip4.c
335
ts->ppm_y = buf[13];
drivers/input/touchscreen/melfas_mip4.c
336
dev_dbg(&ts->client->dev, "ppm_x: %d, ppm_y: %d\n",
drivers/input/touchscreen/melfas_mip4.c
337
ts->ppm_x, ts->ppm_y);
drivers/input/touchscreen/melfas_mip4.c
340
if (ts->node_key > 0)
drivers/input/touchscreen/melfas_mip4.c
341
ts->key_num = ts->node_key;
drivers/input/touchscreen/melfas_mip4.c
347
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), buf, 7);
drivers/input/touchscreen/melfas_mip4.c
349
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
351
ts->event_format = 0xff;
drivers/input/touchscreen/melfas_mip4.c
353
ts->event_format = get_unaligned_le16(&buf[4]);
drivers/input/touchscreen/melfas_mip4.c
354
ts->event_size = buf[6];
drivers/input/touchscreen/melfas_mip4.c
355
dev_dbg(&ts->client->dev, "event_format: %d, event_size: %d\n",
drivers/input/touchscreen/melfas_mip4.c
356
ts->event_format, ts->event_size);
drivers/input/touchscreen/melfas_mip4.c
358
if (ts->event_format == 2 || ts->event_format > 3)
drivers/input/touchscreen/melfas_mip4.c
359
dev_warn(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
360
"Unknown event format %d\n", ts->event_format);
drivers/input/touchscreen/melfas_mip4.c
366
static int mip4_power_on(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
368
if (ts->gpio_ce) {
drivers/input/touchscreen/melfas_mip4.c
369
gpiod_set_value_cansleep(ts->gpio_ce, 1);
drivers/input/touchscreen/melfas_mip4.c
378
static void mip4_power_off(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
380
if (ts->gpio_ce)
drivers/input/touchscreen/melfas_mip4.c
381
gpiod_set_value_cansleep(ts->gpio_ce, 0);
drivers/input/touchscreen/melfas_mip4.c
387
static void mip4_clear_input(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
393
input_mt_slot(ts->input, i);
drivers/input/touchscreen/melfas_mip4.c
394
input_mt_report_slot_inactive(ts->input);
drivers/input/touchscreen/melfas_mip4.c
398
for (i = 0; i < ts->key_num; i++)
drivers/input/touchscreen/melfas_mip4.c
399
input_report_key(ts->input, ts->key_code[i], 0);
drivers/input/touchscreen/melfas_mip4.c
401
input_sync(ts->input);
drivers/input/touchscreen/melfas_mip4.c
404
static int mip4_enable(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
408
error = mip4_power_on(ts);
drivers/input/touchscreen/melfas_mip4.c
412
enable_irq(ts->client->irq);
drivers/input/touchscreen/melfas_mip4.c
417
static void mip4_disable(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
419
disable_irq(ts->client->irq);
drivers/input/touchscreen/melfas_mip4.c
421
mip4_power_off(ts);
drivers/input/touchscreen/melfas_mip4.c
423
mip4_clear_input(ts);
drivers/input/touchscreen/melfas_mip4.c
430
static void mip4_report_keys(struct mip4_ts *ts, u8 *packet)
drivers/input/touchscreen/melfas_mip4.c
435
switch (ts->event_format) {
drivers/input/touchscreen/melfas_mip4.c
450
if (key >= 1 && key <= ts->key_num) {
drivers/input/touchscreen/melfas_mip4.c
451
unsigned short keycode = ts->key_code[key - 1];
drivers/input/touchscreen/melfas_mip4.c
453
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
457
input_event(ts->input, EV_MSC, MSC_SCAN, keycode);
drivers/input/touchscreen/melfas_mip4.c
458
input_report_key(ts->input, keycode, down);
drivers/input/touchscreen/melfas_mip4.c
461
dev_err(&ts->client->dev, "Unknown key: %d\n", key);
drivers/input/touchscreen/melfas_mip4.c
465
static void mip4_report_touch(struct mip4_ts *ts, u8 *packet)
drivers/input/touchscreen/melfas_mip4.c
478
switch (ts->event_format) {
drivers/input/touchscreen/melfas_mip4.c
491
if (ts->event_format == 0) {
drivers/input/touchscreen/melfas_mip4.c
519
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
524
dev_err(&ts->client->dev, "Screen - invalid slot ID: %d\n", id);
drivers/input/touchscreen/melfas_mip4.c
528
input_mt_slot(ts->input, id);
drivers/input/touchscreen/melfas_mip4.c
529
if (input_mt_report_slot_state(ts->input,
drivers/input/touchscreen/melfas_mip4.c
532
input_report_abs(ts->input, ABS_MT_POSITION_X, x);
drivers/input/touchscreen/melfas_mip4.c
533
input_report_abs(ts->input, ABS_MT_POSITION_Y, y);
drivers/input/touchscreen/melfas_mip4.c
534
input_report_abs(ts->input, ABS_MT_PRESSURE, pressure);
drivers/input/touchscreen/melfas_mip4.c
535
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, touch_major);
drivers/input/touchscreen/melfas_mip4.c
536
input_report_abs(ts->input, ABS_MT_TOUCH_MINOR, touch_minor);
drivers/input/touchscreen/melfas_mip4.c
540
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/melfas_mip4.c
543
static int mip4_handle_packet(struct mip4_ts *ts, u8 *packet)
drivers/input/touchscreen/melfas_mip4.c
547
switch (ts->event_format) {
drivers/input/touchscreen/melfas_mip4.c
562
dev_dbg(&ts->client->dev, "Type: %d\n", type);
drivers/input/touchscreen/melfas_mip4.c
567
mip4_report_keys(ts, packet);
drivers/input/touchscreen/melfas_mip4.c
571
mip4_report_touch(ts, packet);
drivers/input/touchscreen/melfas_mip4.c
575
dev_err(&ts->client->dev, "Unknown event type: %d\n", type);
drivers/input/touchscreen/melfas_mip4.c
584
struct mip4_ts *ts = dev_id;
drivers/input/touchscreen/melfas_mip4.c
585
struct i2c_client *client = ts->client;
drivers/input/touchscreen/melfas_mip4.c
595
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), ts->buf, 1);
drivers/input/touchscreen/melfas_mip4.c
602
size = ts->buf[0] & 0x7F;
drivers/input/touchscreen/melfas_mip4.c
603
alert = ts->buf[0] & BIT(7);
drivers/input/touchscreen/melfas_mip4.c
615
error = mip4_i2c_xfer(ts, cmd, sizeof(cmd), ts->buf, size);
drivers/input/touchscreen/melfas_mip4.c
623
dev_dbg(&client->dev, "Alert: %d\n", ts->buf[0]);
drivers/input/touchscreen/melfas_mip4.c
625
for (i = 0; i < size; i += ts->event_size) {
drivers/input/touchscreen/melfas_mip4.c
626
error = mip4_handle_packet(ts, &ts->buf[i]);
drivers/input/touchscreen/melfas_mip4.c
631
input_sync(ts->input);
drivers/input/touchscreen/melfas_mip4.c
640
struct mip4_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/melfas_mip4.c
642
return mip4_enable(ts);
drivers/input/touchscreen/melfas_mip4.c
647
struct mip4_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/melfas_mip4.c
649
mip4_disable(ts);
drivers/input/touchscreen/melfas_mip4.c
706
static int mip4_bl_read_status(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
712
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
717
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
728
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/melfas_mip4.c
731
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
739
dev_dbg(&ts->client->dev, "%s - done\n", __func__);
drivers/input/touchscreen/melfas_mip4.c
743
dev_err(&ts->client->dev, "Bootloader failure\n");
drivers/input/touchscreen/melfas_mip4.c
747
dev_dbg(&ts->client->dev, "%s - Busy\n", __func__);
drivers/input/touchscreen/melfas_mip4.c
752
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
768
static int mip4_bl_change_mode(struct mip4_ts *ts, u8 mode)
drivers/input/touchscreen/melfas_mip4.c
775
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
780
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
792
ret = i2c_master_send(ts->client,
drivers/input/touchscreen/melfas_mip4.c
796
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
802
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
809
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/melfas_mip4.c
812
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
817
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
831
static int mip4_bl_enter(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
833
return mip4_bl_change_mode(ts, MIP4_BOOT_MODE_BOOT);
drivers/input/touchscreen/melfas_mip4.c
839
static int mip4_bl_exit(struct mip4_ts *ts)
drivers/input/touchscreen/melfas_mip4.c
841
return mip4_bl_change_mode(ts, MIP4_BOOT_MODE_APP);
drivers/input/touchscreen/melfas_mip4.c
844
static int mip4_bl_get_address(struct mip4_ts *ts, u16 *buf_addr)
drivers/input/touchscreen/melfas_mip4.c
850
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
855
.addr = ts->client->addr,
drivers/input/touchscreen/melfas_mip4.c
864
ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg));
drivers/input/touchscreen/melfas_mip4.c
867
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
874
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
880
static int mip4_bl_program_page(struct mip4_ts *ts, int offset,
drivers/input/touchscreen/melfas_mip4.c
887
dev_dbg(&ts->client->dev, "Writing page @%#06x (%d)\n",
drivers/input/touchscreen/melfas_mip4.c
891
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
905
ret = i2c_master_send(ts->client, cmd, 6);
drivers/input/touchscreen/melfas_mip4.c
908
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
917
ret = i2c_master_send(ts->client, cmd, 6);
drivers/input/touchscreen/melfas_mip4.c
920
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
929
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
934
ret = i2c_master_send(ts->client,
drivers/input/touchscreen/melfas_mip4.c
938
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
949
ret = i2c_master_send(ts->client, cmd, 3);
drivers/input/touchscreen/melfas_mip4.c
952
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
958
error = mip4_bl_read_status(ts);
drivers/input/touchscreen/melfas_mip4.c
965
static int mip4_bl_verify_page(struct mip4_ts *ts, int offset,
drivers/input/touchscreen/melfas_mip4.c
972
dev_dbg(&ts->client->dev, "Validating page @%#06x (%d)\n",
drivers/input/touchscreen/melfas_mip4.c
979
ret = i2c_master_send(ts->client, cmd, 6);
drivers/input/touchscreen/melfas_mip4.c
982
dev_err(&ts->client->dev,
drivers/input/touchscreen/melfas_mip4.c
991
ret = i2c_master_send(ts->client, cmd, 6);
drivers/input/touchscreen/melfas_mip4.c
994
dev_err(&ts->client->dev,
drivers/input/touchscreen/mxs-lradc-ts.c
101
ts->base + LRADC_CTRL4 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
103
ts->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
106
static void mxs_lradc_setup_ts_channel(struct mxs_lradc_ts *ts, unsigned int ch)
drivers/input/touchscreen/mxs-lradc-ts.c
117
LRADC_CH_NUM_SAMPLES(ts->over_sample_cnt - 1),
drivers/input/touchscreen/mxs-lradc-ts.c
118
ts->base + LRADC_CH(ch));
drivers/input/touchscreen/mxs-lradc-ts.c
125
ts->base + LRADC_CH(ch) + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
136
LRADC_DELAY_LOOP(ts->over_sample_cnt - 1) |
drivers/input/touchscreen/mxs-lradc-ts.c
137
LRADC_DELAY_DELAY(ts->over_sample_delay - 1),
drivers/input/touchscreen/mxs-lradc-ts.c
138
ts->base + LRADC_DELAY(3));
drivers/input/touchscreen/mxs-lradc-ts.c
141
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
150
LRADC_DELAY_KICK | LRADC_DELAY_DELAY(ts->settling_delay),
drivers/input/touchscreen/mxs-lradc-ts.c
151
ts->base + LRADC_DELAY(2));
drivers/input/touchscreen/mxs-lradc-ts.c
160
static void mxs_lradc_setup_ts_pressure(struct mxs_lradc_ts *ts,
drivers/input/touchscreen/mxs-lradc-ts.c
174
LRADC_CH_NUM_SAMPLES(ts->over_sample_cnt - 1);
drivers/input/touchscreen/mxs-lradc-ts.c
175
writel(reg, ts->base + LRADC_CH(ch1));
drivers/input/touchscreen/mxs-lradc-ts.c
176
writel(reg, ts->base + LRADC_CH(ch2));
drivers/input/touchscreen/mxs-lradc-ts.c
183
ts->base + LRADC_CH(ch1) + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
185
ts->base + LRADC_CH(ch2) + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
190
LRADC_DELAY_LOOP(ts->over_sample_cnt - 1) |
drivers/input/touchscreen/mxs-lradc-ts.c
191
LRADC_DELAY_DELAY(ts->over_sample_delay - 1),
drivers/input/touchscreen/mxs-lradc-ts.c
192
ts->base + LRADC_DELAY(3));
drivers/input/touchscreen/mxs-lradc-ts.c
195
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
204
LRADC_DELAY_KICK | LRADC_DELAY_DELAY(ts->settling_delay),
drivers/input/touchscreen/mxs-lradc-ts.c
205
ts->base + LRADC_DELAY(2));
drivers/input/touchscreen/mxs-lradc-ts.c
208
static unsigned int mxs_lradc_ts_read_raw_channel(struct mxs_lradc_ts *ts,
drivers/input/touchscreen/mxs-lradc-ts.c
214
reg = readl(ts->base + LRADC_CH(channel));
drivers/input/touchscreen/mxs-lradc-ts.c
216
num_samples = ts->over_sample_cnt;
drivers/input/touchscreen/mxs-lradc-ts.c
224
static unsigned int mxs_lradc_read_ts_pressure(struct mxs_lradc_ts *ts,
drivers/input/touchscreen/mxs-lradc-ts.c
231
reg = readl(ts->base + LRADC_CTRL1) & mask;
drivers/input/touchscreen/mxs-lradc-ts.c
234
reg = readl(ts->base + LRADC_CTRL1) & mask;
drivers/input/touchscreen/mxs-lradc-ts.c
235
dev_dbg(ts->dev, "One channel is still busy: %X\n", reg);
drivers/input/touchscreen/mxs-lradc-ts.c
238
m1 = mxs_lradc_ts_read_raw_channel(ts, ch1);
drivers/input/touchscreen/mxs-lradc-ts.c
239
m2 = mxs_lradc_ts_read_raw_channel(ts, ch2);
drivers/input/touchscreen/mxs-lradc-ts.c
242
dev_warn(ts->dev, "Cannot calculate pressure\n");
drivers/input/touchscreen/mxs-lradc-ts.c
251
dev_dbg(ts->dev, "Pressure = %u\n", pressure);
drivers/input/touchscreen/mxs-lradc-ts.c
272
static void mxs_lradc_setup_touch_detection(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
274
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
283
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
285
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
300
static void mxs_lradc_prepare_x_pos(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
302
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
305
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
307
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
309
ts->cur_plate = LRADC_SAMPLE_X;
drivers/input/touchscreen/mxs-lradc-ts.c
310
mxs_lradc_map_ts_channel(ts, TOUCHSCREEN_VCHANNEL1, TS_CH_YP);
drivers/input/touchscreen/mxs-lradc-ts.c
311
mxs_lradc_setup_ts_channel(ts, TOUCHSCREEN_VCHANNEL1);
drivers/input/touchscreen/mxs-lradc-ts.c
326
static void mxs_lradc_prepare_y_pos(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
328
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
331
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
333
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
335
ts->cur_plate = LRADC_SAMPLE_Y;
drivers/input/touchscreen/mxs-lradc-ts.c
336
mxs_lradc_map_ts_channel(ts, TOUCHSCREEN_VCHANNEL1, TS_CH_XM);
drivers/input/touchscreen/mxs-lradc-ts.c
337
mxs_lradc_setup_ts_channel(ts, TOUCHSCREEN_VCHANNEL1);
drivers/input/touchscreen/mxs-lradc-ts.c
352
static void mxs_lradc_prepare_pressure(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
354
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
357
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
359
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
361
ts->cur_plate = LRADC_SAMPLE_PRESSURE;
drivers/input/touchscreen/mxs-lradc-ts.c
362
mxs_lradc_map_ts_channel(ts, TOUCHSCREEN_VCHANNEL1, TS_CH_YM);
drivers/input/touchscreen/mxs-lradc-ts.c
363
mxs_lradc_map_ts_channel(ts, TOUCHSCREEN_VCHANNEL2, TS_CH_XP);
drivers/input/touchscreen/mxs-lradc-ts.c
364
mxs_lradc_setup_ts_pressure(ts, TOUCHSCREEN_VCHANNEL2,
drivers/input/touchscreen/mxs-lradc-ts.c
368
static void mxs_lradc_enable_touch_detection(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
370
mxs_lradc_setup_touch_detection(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
372
ts->cur_plate = LRADC_TOUCH;
drivers/input/touchscreen/mxs-lradc-ts.c
374
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
376
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
379
static void mxs_lradc_start_touch_event(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
382
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
384
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
389
mxs_lradc_prepare_y_pos(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
392
static void mxs_lradc_report_ts_event(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
394
input_report_abs(ts->ts_input, ABS_X, ts->ts_x_pos);
drivers/input/touchscreen/mxs-lradc-ts.c
395
input_report_abs(ts->ts_input, ABS_Y, ts->ts_y_pos);
drivers/input/touchscreen/mxs-lradc-ts.c
396
input_report_abs(ts->ts_input, ABS_PRESSURE, ts->ts_pressure);
drivers/input/touchscreen/mxs-lradc-ts.c
397
input_report_key(ts->ts_input, BTN_TOUCH, 1);
drivers/input/touchscreen/mxs-lradc-ts.c
398
input_sync(ts->ts_input);
drivers/input/touchscreen/mxs-lradc-ts.c
401
static void mxs_lradc_complete_touch_event(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
403
mxs_lradc_setup_touch_detection(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
404
ts->cur_plate = LRADC_SAMPLE_VALID;
drivers/input/touchscreen/mxs-lradc-ts.c
409
writel(0, ts->base + LRADC_CH(TOUCHSCREEN_VCHANNEL1));
drivers/input/touchscreen/mxs-lradc-ts.c
412
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
415
ts->base + LRADC_DELAY(2));
drivers/input/touchscreen/mxs-lradc-ts.c
422
static void mxs_lradc_finish_touch_event(struct mxs_lradc_ts *ts, bool valid)
drivers/input/touchscreen/mxs-lradc-ts.c
425
if (valid && mxs_lradc_check_touch_event(ts)) {
drivers/input/touchscreen/mxs-lradc-ts.c
426
ts->ts_valid = true;
drivers/input/touchscreen/mxs-lradc-ts.c
427
mxs_lradc_report_ts_event(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
431
if (mxs_lradc_check_touch_event(ts)) {
drivers/input/touchscreen/mxs-lradc-ts.c
432
mxs_lradc_prepare_y_pos(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
436
if (ts->ts_valid) {
drivers/input/touchscreen/mxs-lradc-ts.c
438
ts->ts_valid = false;
drivers/input/touchscreen/mxs-lradc-ts.c
439
input_report_key(ts->ts_input, BTN_TOUCH, 0);
drivers/input/touchscreen/mxs-lradc-ts.c
440
input_sync(ts->ts_input);
drivers/input/touchscreen/mxs-lradc-ts.c
444
ts->cur_plate = LRADC_TOUCH;
drivers/input/touchscreen/mxs-lradc-ts.c
445
writel(0, ts->base + LRADC_DELAY(2));
drivers/input/touchscreen/mxs-lradc-ts.c
446
writel(0, ts->base + LRADC_DELAY(3));
drivers/input/touchscreen/mxs-lradc-ts.c
450
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
452
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
456
static void mxs_lradc_handle_touch(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
458
switch (ts->cur_plate) {
drivers/input/touchscreen/mxs-lradc-ts.c
460
if (mxs_lradc_check_touch_event(ts))
drivers/input/touchscreen/mxs-lradc-ts.c
461
mxs_lradc_start_touch_event(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
463
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
467
ts->ts_y_pos =
drivers/input/touchscreen/mxs-lradc-ts.c
468
mxs_lradc_ts_read_raw_channel(ts, TOUCHSCREEN_VCHANNEL1);
drivers/input/touchscreen/mxs-lradc-ts.c
469
mxs_lradc_prepare_x_pos(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
473
ts->ts_x_pos =
drivers/input/touchscreen/mxs-lradc-ts.c
474
mxs_lradc_ts_read_raw_channel(ts, TOUCHSCREEN_VCHANNEL1);
drivers/input/touchscreen/mxs-lradc-ts.c
475
mxs_lradc_prepare_pressure(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
479
ts->ts_pressure =
drivers/input/touchscreen/mxs-lradc-ts.c
480
mxs_lradc_read_ts_pressure(ts,
drivers/input/touchscreen/mxs-lradc-ts.c
483
mxs_lradc_complete_touch_event(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
487
mxs_lradc_finish_touch_event(ts, 1);
drivers/input/touchscreen/mxs-lradc-ts.c
495
struct mxs_lradc_ts *ts = data;
drivers/input/touchscreen/mxs-lradc-ts.c
496
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
497
unsigned long reg = readl(ts->base + LRADC_CTRL1);
drivers/input/touchscreen/mxs-lradc-ts.c
508
scoped_guard(spinlock_irqsave, &ts->lock) {
drivers/input/touchscreen/mxs-lradc-ts.c
509
mxs_lradc_handle_touch(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
515
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
523
struct mxs_lradc_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/mxs-lradc-ts.c
526
mxs_lradc_enable_touch_detection(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
531
static void mxs_lradc_ts_stop(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
534
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
540
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
544
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
547
ts->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
550
writel(0, ts->base + LRADC_DELAY(i));
drivers/input/touchscreen/mxs-lradc-ts.c
555
struct mxs_lradc_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/mxs-lradc-ts.c
557
mxs_lradc_ts_stop(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
560
static void mxs_lradc_ts_hw_init(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
562
struct mxs_lradc *lradc = ts->lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
567
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
drivers/input/touchscreen/mxs-lradc-ts.c
571
ts->base + LRADC_CTRL0 + STMP_OFFSET_REG_SET);
drivers/input/touchscreen/mxs-lradc-ts.c
575
static int mxs_lradc_ts_register(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
578
struct device *dev = ts->dev;
drivers/input/touchscreen/mxs-lradc-ts.c
596
ts->ts_input = input;
drivers/input/touchscreen/mxs-lradc-ts.c
597
input_set_drvdata(input, ts);
drivers/input/touchscreen/mxs-lradc-ts.c
607
struct mxs_lradc_ts *ts;
drivers/input/touchscreen/mxs-lradc-ts.c
611
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/mxs-lradc-ts.c
612
if (!ts)
drivers/input/touchscreen/mxs-lradc-ts.c
615
platform_set_drvdata(pdev, ts);
drivers/input/touchscreen/mxs-lradc-ts.c
617
ts->lradc = lradc;
drivers/input/touchscreen/mxs-lradc-ts.c
618
ts->dev = dev;
drivers/input/touchscreen/mxs-lradc-ts.c
619
spin_lock_init(&ts->lock);
drivers/input/touchscreen/mxs-lradc-ts.c
621
ts->base = devm_platform_ioremap_resource(pdev, 0);
drivers/input/touchscreen/mxs-lradc-ts.c
622
if (IS_ERR(ts->base))
drivers/input/touchscreen/mxs-lradc-ts.c
623
return PTR_ERR(ts->base);
drivers/input/touchscreen/mxs-lradc-ts.c
631
ts->over_sample_cnt = 4;
drivers/input/touchscreen/mxs-lradc-ts.c
634
ts->over_sample_cnt = adapt;
drivers/input/touchscreen/mxs-lradc-ts.c
636
dev_err(ts->dev, "Invalid sample count (%u)\n",
drivers/input/touchscreen/mxs-lradc-ts.c
643
ts->over_sample_delay = 2;
drivers/input/touchscreen/mxs-lradc-ts.c
646
ts->over_sample_delay = adapt;
drivers/input/touchscreen/mxs-lradc-ts.c
648
dev_err(ts->dev, "Invalid sample delay (%u)\n",
drivers/input/touchscreen/mxs-lradc-ts.c
655
ts->settling_delay = 10;
drivers/input/touchscreen/mxs-lradc-ts.c
658
ts->settling_delay = adapt;
drivers/input/touchscreen/mxs-lradc-ts.c
660
dev_err(ts->dev, "Invalid settling delay (%u)\n",
drivers/input/touchscreen/mxs-lradc-ts.c
666
ret = stmp_reset_block(ts->base);
drivers/input/touchscreen/mxs-lradc-ts.c
670
mxs_lradc_ts_hw_init(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
679
mxs_lradc_ts_stop(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
683
0, mxs_lradc_ts_irq_names[i], ts);
drivers/input/touchscreen/mxs-lradc-ts.c
688
return mxs_lradc_ts_register(ts);
drivers/input/touchscreen/mxs-lradc-ts.c
91
static bool mxs_lradc_check_touch_event(struct mxs_lradc_ts *ts)
drivers/input/touchscreen/mxs-lradc-ts.c
93
return !!(readl(ts->base + LRADC_STATUS) &
drivers/input/touchscreen/mxs-lradc-ts.c
97
static void mxs_lradc_map_ts_channel(struct mxs_lradc_ts *ts, unsigned int vch,
drivers/input/touchscreen/pixcir_i2c_ts.c
147
static void pixcir_ts_report(struct pixcir_i2c_ts_data *ts,
drivers/input/touchscreen/pixcir_i2c_ts.c
152
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/pixcir_i2c_ts.c
153
const struct pixcir_i2c_chip_data *chip = ts->chip;
drivers/input/touchscreen/pixcir_i2c_ts.c
159
if (!ts->chip->has_hw_ids)
drivers/input/touchscreen/pixcir_i2c_ts.c
160
input_mt_assign_slots(ts->input, slots, report->pos, n, 0);
drivers/input/touchscreen/pixcir_i2c_ts.c
164
slot = input_mt_get_slot_by_key(ts->input,
drivers/input/touchscreen/pixcir_i2c_ts.c
175
input_mt_slot(ts->input, slot);
drivers/input/touchscreen/pixcir_i2c_ts.c
176
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
drivers/input/touchscreen/pixcir_i2c_ts.c
178
input_report_abs(ts->input, ABS_MT_POSITION_X,
drivers/input/touchscreen/pixcir_i2c_ts.c
180
input_report_abs(ts->input, ABS_MT_POSITION_Y,
drivers/input/touchscreen/pixcir_i2c_ts.c
187
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/pixcir_i2c_ts.c
188
input_sync(ts->input);
drivers/input/touchscreen/pixcir_i2c_ts.c
232
static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts,
drivers/input/touchscreen/pixcir_i2c_ts.c
235
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/pixcir_i2c_ts.c
239
if (ts->gpio_wake)
drivers/input/touchscreen/pixcir_i2c_ts.c
240
gpiod_set_value_cansleep(ts->gpio_wake, 1);
drivers/input/touchscreen/pixcir_i2c_ts.c
243
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_POWER_MODE);
drivers/input/touchscreen/pixcir_i2c_ts.c
256
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_POWER_MODE, ret);
drivers/input/touchscreen/pixcir_i2c_ts.c
264
if (ts->gpio_wake)
drivers/input/touchscreen/pixcir_i2c_ts.c
265
gpiod_set_value_cansleep(ts->gpio_wake, 0);
drivers/input/touchscreen/pixcir_i2c_ts.c
276
static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts,
drivers/input/touchscreen/pixcir_i2c_ts.c
279
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/pixcir_i2c_ts.c
282
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE);
drivers/input/touchscreen/pixcir_i2c_ts.c
297
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret);
drivers/input/touchscreen/pixcir_i2c_ts.c
310
static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable)
drivers/input/touchscreen/pixcir_i2c_ts.c
312
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/pixcir_i2c_ts.c
315
ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE);
drivers/input/touchscreen/pixcir_i2c_ts.c
327
ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret);
drivers/input/touchscreen/pixcir_i2c_ts.c
337
static int pixcir_start(struct pixcir_i2c_ts_data *ts)
drivers/input/touchscreen/pixcir_i2c_ts.c
339
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/pixcir_i2c_ts.c
342
if (ts->gpio_enable) {
drivers/input/touchscreen/pixcir_i2c_ts.c
343
gpiod_set_value_cansleep(ts->gpio_enable, 1);
drivers/input/touchscreen/pixcir_i2c_ts.c
348
error = pixcir_set_int_mode(ts, PIXCIR_INT_LEVEL_TOUCH, 0);
drivers/input/touchscreen/pixcir_i2c_ts.c
354
ts->running = true;
drivers/input/touchscreen/pixcir_i2c_ts.c
358
error = pixcir_int_enable(ts, true);
drivers/input/touchscreen/pixcir_i2c_ts.c
368
static int pixcir_stop(struct pixcir_i2c_ts_data *ts)
drivers/input/touchscreen/pixcir_i2c_ts.c
373
error = pixcir_int_enable(ts, false);
drivers/input/touchscreen/pixcir_i2c_ts.c
375
dev_err(&ts->client->dev,
drivers/input/touchscreen/pixcir_i2c_ts.c
382
ts->running = false;
drivers/input/touchscreen/pixcir_i2c_ts.c
386
synchronize_irq(ts->client->irq);
drivers/input/touchscreen/pixcir_i2c_ts.c
388
if (ts->gpio_enable)
drivers/input/touchscreen/pixcir_i2c_ts.c
389
gpiod_set_value_cansleep(ts->gpio_enable, 0);
drivers/input/touchscreen/pixcir_i2c_ts.c
396
struct pixcir_i2c_ts_data *ts = input_get_drvdata(dev);
drivers/input/touchscreen/pixcir_i2c_ts.c
398
return pixcir_start(ts);
drivers/input/touchscreen/pixcir_i2c_ts.c
403
struct pixcir_i2c_ts_data *ts = input_get_drvdata(dev);
drivers/input/touchscreen/pixcir_i2c_ts.c
405
pixcir_stop(ts);
drivers/input/touchscreen/pixcir_i2c_ts.c
411
struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/pixcir_i2c_ts.c
412
struct input_dev *input = ts->input;
drivers/input/touchscreen/pixcir_i2c_ts.c
419
error = pixcir_start(ts);
drivers/input/touchscreen/pixcir_i2c_ts.c
426
error = pixcir_stop(ts);
drivers/input/touchscreen/pixcir_i2c_ts.c
437
struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/pixcir_i2c_ts.c
438
struct input_dev *input = ts->input;
drivers/input/touchscreen/pixcir_i2c_ts.c
445
error = pixcir_stop(ts);
drivers/input/touchscreen/pixcir_i2c_ts.c
452
error = pixcir_start(ts);
drivers/input/touchscreen/raspberrypi-ts.c
100
released_ids = ts->known_ids & ~modified_ids;
drivers/input/touchscreen/raspberrypi-ts.c
106
ts->known_ids = modified_ids;
drivers/input/touchscreen/raspberrypi-ts.c
114
struct rpi_ts *ts = data;
drivers/input/touchscreen/raspberrypi-ts.c
115
struct device *dev = &ts->pdev->dev;
drivers/input/touchscreen/raspberrypi-ts.c
117
dma_free_coherent(dev, PAGE_SIZE, ts->fw_regs_va, ts->fw_regs_phys);
drivers/input/touchscreen/raspberrypi-ts.c
126
struct rpi_ts *ts;
drivers/input/touchscreen/raspberrypi-ts.c
140
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/raspberrypi-ts.c
141
if (!ts)
drivers/input/touchscreen/raspberrypi-ts.c
143
ts->pdev = pdev;
drivers/input/touchscreen/raspberrypi-ts.c
145
ts->fw_regs_va = dma_alloc_coherent(dev, PAGE_SIZE, &ts->fw_regs_phys,
drivers/input/touchscreen/raspberrypi-ts.c
147
if (!ts->fw_regs_va) {
drivers/input/touchscreen/raspberrypi-ts.c
152
error = devm_add_action_or_reset(dev, rpi_ts_dma_cleanup, ts);
drivers/input/touchscreen/raspberrypi-ts.c
158
touchbuf = (u32)ts->fw_regs_phys;
drivers/input/touchscreen/raspberrypi-ts.c
172
ts->input = input;
drivers/input/touchscreen/raspberrypi-ts.c
173
input_set_drvdata(input, ts);
drivers/input/touchscreen/raspberrypi-ts.c
182
touchscreen_parse_properties(input, true, &ts->prop);
drivers/input/touchscreen/raspberrypi-ts.c
61
struct rpi_ts *ts = input_get_drvdata(input);
drivers/input/touchscreen/raspberrypi-ts.c
70
memcpy_fromio(&regs, ts->fw_regs_va, sizeof(regs));
drivers/input/touchscreen/raspberrypi-ts.c
78
ts->fw_regs_va + offsetof(struct rpi_ts_regs, num_points));
drivers/input/touchscreen/raspberrypi-ts.c
81
(regs.num_points == 0 && ts->known_ids == 0))
drivers/input/touchscreen/raspberrypi-ts.c
96
touchscreen_report_pos(input, &ts->prop, x, y, true);
drivers/input/touchscreen/raydium_i2c_ts.c
1009
static int raydium_i2c_power_on(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
1013
if (!ts->reset_gpio)
drivers/input/touchscreen/raydium_i2c_ts.c
1016
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/raydium_i2c_ts.c
1018
error = regulator_enable(ts->avdd);
drivers/input/touchscreen/raydium_i2c_ts.c
1020
dev_err(&ts->client->dev,
drivers/input/touchscreen/raydium_i2c_ts.c
1025
error = regulator_enable(ts->vccio);
drivers/input/touchscreen/raydium_i2c_ts.c
1027
regulator_disable(ts->avdd);
drivers/input/touchscreen/raydium_i2c_ts.c
1028
dev_err(&ts->client->dev,
drivers/input/touchscreen/raydium_i2c_ts.c
1036
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/raydium_i2c_ts.c
1048
struct raydium_data *ts = _data;
drivers/input/touchscreen/raydium_i2c_ts.c
1050
if (ts->reset_gpio) {
drivers/input/touchscreen/raydium_i2c_ts.c
1051
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/raydium_i2c_ts.c
1052
regulator_disable(ts->vccio);
drivers/input/touchscreen/raydium_i2c_ts.c
1053
regulator_disable(ts->avdd);
drivers/input/touchscreen/raydium_i2c_ts.c
1060
struct raydium_data *ts;
drivers/input/touchscreen/raydium_i2c_ts.c
1069
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/raydium_i2c_ts.c
1070
if (!ts)
drivers/input/touchscreen/raydium_i2c_ts.c
1073
mutex_init(&ts->sysfs_mutex);
drivers/input/touchscreen/raydium_i2c_ts.c
1075
ts->client = client;
drivers/input/touchscreen/raydium_i2c_ts.c
1076
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1078
ts->avdd = devm_regulator_get(&client->dev, "avdd");
drivers/input/touchscreen/raydium_i2c_ts.c
1079
if (IS_ERR(ts->avdd))
drivers/input/touchscreen/raydium_i2c_ts.c
1080
return dev_err_probe(&client->dev, PTR_ERR(ts->avdd),
drivers/input/touchscreen/raydium_i2c_ts.c
1083
ts->vccio = devm_regulator_get(&client->dev, "vccio");
drivers/input/touchscreen/raydium_i2c_ts.c
1084
if (IS_ERR(ts->vccio))
drivers/input/touchscreen/raydium_i2c_ts.c
1085
return dev_err_probe(&client->dev, PTR_ERR(ts->vccio),
drivers/input/touchscreen/raydium_i2c_ts.c
1088
ts->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
drivers/input/touchscreen/raydium_i2c_ts.c
1090
if (IS_ERR(ts->reset_gpio))
drivers/input/touchscreen/raydium_i2c_ts.c
1091
return dev_err_probe(&client->dev, PTR_ERR(ts->reset_gpio),
drivers/input/touchscreen/raydium_i2c_ts.c
1094
error = raydium_i2c_power_on(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1099
raydium_i2c_power_off, ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1113
error = raydium_i2c_initialize(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1119
ts->report_data = devm_kmalloc(&client->dev,
drivers/input/touchscreen/raydium_i2c_ts.c
1120
ts->pkg_size, GFP_KERNEL);
drivers/input/touchscreen/raydium_i2c_ts.c
1121
if (!ts->report_data)
drivers/input/touchscreen/raydium_i2c_ts.c
1124
ts->input = devm_input_allocate_device(&client->dev);
drivers/input/touchscreen/raydium_i2c_ts.c
1125
if (!ts->input) {
drivers/input/touchscreen/raydium_i2c_ts.c
1130
ts->input->name = "Raydium Touchscreen";
drivers/input/touchscreen/raydium_i2c_ts.c
1131
ts->input->id.bustype = BUS_I2C;
drivers/input/touchscreen/raydium_i2c_ts.c
1133
input_set_abs_params(ts->input, ABS_MT_POSITION_X,
drivers/input/touchscreen/raydium_i2c_ts.c
1134
0, le16_to_cpu(ts->info.x_max), 0, 0);
drivers/input/touchscreen/raydium_i2c_ts.c
1135
input_set_abs_params(ts->input, ABS_MT_POSITION_Y,
drivers/input/touchscreen/raydium_i2c_ts.c
1136
0, le16_to_cpu(ts->info.y_max), 0, 0);
drivers/input/touchscreen/raydium_i2c_ts.c
1137
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->info.x_res);
drivers/input/touchscreen/raydium_i2c_ts.c
1138
input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->info.y_res);
drivers/input/touchscreen/raydium_i2c_ts.c
1140
input_set_abs_params(ts->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
drivers/input/touchscreen/raydium_i2c_ts.c
1141
input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
drivers/input/touchscreen/raydium_i2c_ts.c
1143
error = input_mt_init_slots(ts->input, RM_MAX_TOUCH_NUM,
drivers/input/touchscreen/raydium_i2c_ts.c
1151
error = input_register_device(ts->input);
drivers/input/touchscreen/raydium_i2c_ts.c
1160
IRQF_ONESHOT, client->name, ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1184
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
1187
if (ts->boot_mode != RAYDIUM_TS_MAIN)
drivers/input/touchscreen/raydium_i2c_ts.c
1195
raydium_i2c_power_off(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1204
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
1209
raydium_i2c_power_on(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
1210
raydium_i2c_initialize(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
292
static int raydium_i2c_query_ts_bootloader_info(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
294
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
323
ts->info.hw_ver = cpu_to_le32(hw_ver);
drivers/input/touchscreen/raydium_i2c_ts.c
324
ts->info.main_ver = 0xff;
drivers/input/touchscreen/raydium_i2c_ts.c
325
ts->info.sub_ver = 0xff;
drivers/input/touchscreen/raydium_i2c_ts.c
330
static int raydium_i2c_query_ts_info(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
332
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
349
if (ts->report_data && ts->pkg_size != data_info.pkg_size) {
drivers/input/touchscreen/raydium_i2c_ts.c
352
ts->pkg_size, data_info.pkg_size);
drivers/input/touchscreen/raydium_i2c_ts.c
354
ts->pkg_size = data_info.pkg_size;
drivers/input/touchscreen/raydium_i2c_ts.c
355
ts->report_size = ts->pkg_size - RM_PACKET_CRC_SIZE;
drivers/input/touchscreen/raydium_i2c_ts.c
358
ts->contact_size = data_info.tp_info_size;
drivers/input/touchscreen/raydium_i2c_ts.c
359
ts->data_bank_addr = le32_to_cpu(data_info.data_bank_addr);
drivers/input/touchscreen/raydium_i2c_ts.c
363
ts->data_bank_addr, ts->report_size, ts->contact_size);
drivers/input/touchscreen/raydium_i2c_ts.c
372
&ts->info, sizeof(ts->info));
drivers/input/touchscreen/raydium_i2c_ts.c
383
static int raydium_i2c_check_fw_status(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
385
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
394
ts->boot_mode = RAYDIUM_TS_BLDR;
drivers/input/touchscreen/raydium_i2c_ts.c
396
ts->boot_mode = RAYDIUM_TS_MAIN;
drivers/input/touchscreen/raydium_i2c_ts.c
403
static int raydium_i2c_initialize(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
405
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
412
error = raydium_i2c_check_fw_status(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
419
if (ts->boot_mode == RAYDIUM_TS_BLDR ||
drivers/input/touchscreen/raydium_i2c_ts.c
420
ts->boot_mode == RAYDIUM_TS_MAIN) {
drivers/input/touchscreen/raydium_i2c_ts.c
426
ts->boot_mode = RAYDIUM_TS_BLDR;
drivers/input/touchscreen/raydium_i2c_ts.c
428
if (ts->boot_mode == RAYDIUM_TS_BLDR)
drivers/input/touchscreen/raydium_i2c_ts.c
429
raydium_i2c_query_ts_bootloader_info(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
431
raydium_i2c_query_ts_info(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
691
static int raydium_i2c_do_update_firmware(struct raydium_data *ts,
drivers/input/touchscreen/raydium_i2c_ts.c
694
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
708
error = raydium_i2c_check_fw_status(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
714
if (ts->boot_mode == RAYDIUM_TS_MAIN) {
drivers/input/touchscreen/raydium_i2c_ts.c
718
error = raydium_i2c_check_fw_status(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
726
if (ts->boot_mode == RAYDIUM_TS_BLDR)
drivers/input/touchscreen/raydium_i2c_ts.c
731
if (ts->boot_mode == RAYDIUM_TS_MAIN) {
drivers/input/touchscreen/raydium_i2c_ts.c
782
error = raydium_i2c_check_fw_status(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
790
if (ts->boot_mode != RAYDIUM_TS_MAIN) {
drivers/input/touchscreen/raydium_i2c_ts.c
812
static int raydium_i2c_fw_update(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
814
struct i2c_client *client = ts->client;
drivers/input/touchscreen/raydium_i2c_ts.c
819
le32_to_cpu(ts->info.hw_ver));
drivers/input/touchscreen/raydium_i2c_ts.c
834
error = raydium_i2c_do_update_firmware(ts, fw);
drivers/input/touchscreen/raydium_i2c_ts.c
837
ts->boot_mode = RAYDIUM_TS_BLDR;
drivers/input/touchscreen/raydium_i2c_ts.c
841
error = raydium_i2c_initialize(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
846
ts->boot_mode = RAYDIUM_TS_BLDR;
drivers/input/touchscreen/raydium_i2c_ts.c
850
ts->boot_mode = RAYDIUM_TS_MAIN;
drivers/input/touchscreen/raydium_i2c_ts.c
859
static void raydium_mt_event(struct raydium_data *ts)
drivers/input/touchscreen/raydium_i2c_ts.c
863
for (i = 0; i < ts->report_size / ts->contact_size; i++) {
drivers/input/touchscreen/raydium_i2c_ts.c
864
u8 *contact = &ts->report_data[ts->contact_size * i];
drivers/input/touchscreen/raydium_i2c_ts.c
868
input_mt_slot(ts->input, i);
drivers/input/touchscreen/raydium_i2c_ts.c
869
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, state);
drivers/input/touchscreen/raydium_i2c_ts.c
874
input_report_abs(ts->input, ABS_MT_POSITION_X,
drivers/input/touchscreen/raydium_i2c_ts.c
876
input_report_abs(ts->input, ABS_MT_POSITION_Y,
drivers/input/touchscreen/raydium_i2c_ts.c
878
input_report_abs(ts->input, ABS_MT_PRESSURE,
drivers/input/touchscreen/raydium_i2c_ts.c
884
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, max(wx, wy));
drivers/input/touchscreen/raydium_i2c_ts.c
885
input_report_abs(ts->input, ABS_MT_TOUCH_MINOR, min(wx, wy));
drivers/input/touchscreen/raydium_i2c_ts.c
888
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/raydium_i2c_ts.c
889
input_sync(ts->input);
drivers/input/touchscreen/raydium_i2c_ts.c
894
struct raydium_data *ts = _dev;
drivers/input/touchscreen/raydium_i2c_ts.c
899
if (ts->boot_mode != RAYDIUM_TS_MAIN)
drivers/input/touchscreen/raydium_i2c_ts.c
902
error = raydium_i2c_read(ts->client, ts->data_bank_addr,
drivers/input/touchscreen/raydium_i2c_ts.c
903
ts->report_data, ts->pkg_size);
drivers/input/touchscreen/raydium_i2c_ts.c
907
fw_crc = get_unaligned_le16(&ts->report_data[ts->report_size]);
drivers/input/touchscreen/raydium_i2c_ts.c
908
calc_crc = raydium_calc_chksum(ts->report_data, ts->report_size);
drivers/input/touchscreen/raydium_i2c_ts.c
910
dev_warn(&ts->client->dev,
drivers/input/touchscreen/raydium_i2c_ts.c
916
raydium_mt_event(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
926
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
928
return sprintf(buf, "%d.%d\n", ts->info.main_ver, ts->info.sub_ver);
drivers/input/touchscreen/raydium_i2c_ts.c
935
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
937
return sprintf(buf, "%#04x\n", le32_to_cpu(ts->info.hw_ver));
drivers/input/touchscreen/raydium_i2c_ts.c
945
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
948
ts->boot_mode == RAYDIUM_TS_MAIN ?
drivers/input/touchscreen/raydium_i2c_ts.c
957
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
960
scoped_guard(mutex_intr, &ts->sysfs_mutex) {
drivers/input/touchscreen/raydium_i2c_ts.c
961
error = raydium_i2c_fw_update(ts);
drivers/input/touchscreen/raydium_i2c_ts.c
973
struct raydium_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/raydium_i2c_ts.c
977
scoped_guard(mutex_intr, &ts->sysfs_mutex) {
drivers/input/touchscreen/rohm_bu21023.c
1047
struct rohm_ts_data *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/rohm_bu21023.c
1048
struct i2c_client *client = ts->client;
drivers/input/touchscreen/rohm_bu21023.c
1051
if (!ts->initialized) {
drivers/input/touchscreen/rohm_bu21023.c
1052
error = rohm_ts_device_init(client, ts->setup2);
drivers/input/touchscreen/rohm_bu21023.c
1059
ts->initialized = true;
drivers/input/touchscreen/rohm_bu21023.c
1067
struct rohm_ts_data *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/rohm_bu21023.c
1069
rohm_ts_power_off(ts->client);
drivers/input/touchscreen/rohm_bu21023.c
1071
ts->initialized = false;
drivers/input/touchscreen/rohm_bu21023.c
1077
struct rohm_ts_data *ts;
drivers/input/touchscreen/rohm_bu21023.c
1096
ts = devm_kzalloc(dev, sizeof(struct rohm_ts_data), GFP_KERNEL);
drivers/input/touchscreen/rohm_bu21023.c
1097
if (!ts)
drivers/input/touchscreen/rohm_bu21023.c
1100
ts->client = client;
drivers/input/touchscreen/rohm_bu21023.c
1101
ts->setup2 = MAF_1SAMPLE;
drivers/input/touchscreen/rohm_bu21023.c
1102
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/rohm_bu21023.c
1113
ts->input = input;
drivers/input/touchscreen/rohm_bu21023.c
1114
input_set_drvdata(input, ts);
drivers/input/touchscreen/rohm_bu21023.c
1131
IRQF_ONESHOT, client->name, ts);
drivers/input/touchscreen/rohm_bu21023.c
313
static int rohm_ts_manual_calibration(struct rohm_ts_data *ts)
drivers/input/touchscreen/rohm_bu21023.c
315
struct i2c_client *client = ts->client;
drivers/input/touchscreen/rohm_bu21023.c
522
struct rohm_ts_data *ts = dev_id;
drivers/input/touchscreen/rohm_bu21023.c
523
struct i2c_client *client = ts->client;
drivers/input/touchscreen/rohm_bu21023.c
524
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/rohm_bu21023.c
534
int prev_finger_count = ts->finger_count;
drivers/input/touchscreen/rohm_bu21023.c
570
if (++ts->contact_count[0] >= threshold)
drivers/input/touchscreen/rohm_bu21023.c
576
if (++ts->contact_count[1] >= threshold)
drivers/input/touchscreen/rohm_bu21023.c
591
if (++ts->contact_count[2] >= threshold)
drivers/input/touchscreen/rohm_bu21023.c
603
count = ts->contact_count[finger_count];
drivers/input/touchscreen/rohm_bu21023.c
604
memset(ts->contact_count, 0, sizeof(ts->contact_count));
drivers/input/touchscreen/rohm_bu21023.c
605
ts->contact_count[finger_count] = count;
drivers/input/touchscreen/rohm_bu21023.c
625
ts->finger_count = finger_count;
drivers/input/touchscreen/rohm_bu21023.c
629
error = rohm_ts_manual_calibration(ts);
drivers/input/touchscreen/rohm_bu21023.c
728
static int rohm_ts_update_setting(struct rohm_ts_data *ts,
drivers/input/touchscreen/rohm_bu21023.c
733
scoped_cond_guard(mutex_intr, return -EINTR, &ts->input->mutex) {
drivers/input/touchscreen/rohm_bu21023.c
735
ts->setup2 |= setting_bit;
drivers/input/touchscreen/rohm_bu21023.c
737
ts->setup2 &= ~setting_bit;
drivers/input/touchscreen/rohm_bu21023.c
739
if (ts->initialized) {
drivers/input/touchscreen/rohm_bu21023.c
740
error = i2c_smbus_write_byte_data(ts->client,
drivers/input/touchscreen/rohm_bu21023.c
742
ts->setup2);
drivers/input/touchscreen/rohm_bu21023.c
755
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
757
return sysfs_emit(buf, "%d\n", !!(ts->setup2 & SWAP_XY));
drivers/input/touchscreen/rohm_bu21023.c
764
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
772
error = rohm_ts_update_setting(ts, SWAP_XY, val);
drivers/input/touchscreen/rohm_bu21023.c
780
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
782
return sysfs_emit(buf, "%d\n", !!(ts->setup2 & INV_X));
drivers/input/touchscreen/rohm_bu21023.c
789
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
797
error = rohm_ts_update_setting(ts, INV_X, val);
drivers/input/touchscreen/rohm_bu21023.c
805
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
807
return sysfs_emit(buf, "%d\n", !!(ts->setup2 & INV_Y));
drivers/input/touchscreen/rohm_bu21023.c
814
struct rohm_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/rohm_bu21023.c
822
error = rohm_ts_update_setting(ts, INV_Y, val);
drivers/input/touchscreen/sis_i2c.c
172
static int sis_ts_report_contact(struct sis_ts_data *ts, const u8 *data, u8 id)
drivers/input/touchscreen/sis_i2c.c
174
struct input_dev *input = ts->input;
drivers/input/touchscreen/sis_i2c.c
182
dev_err(&ts->client->dev, "Unexpected touch status: %#02x\n",
drivers/input/touchscreen/sis_i2c.c
223
static void sis_ts_handle_packet(struct sis_ts_data *ts)
drivers/input/touchscreen/sis_i2c.c
234
error = sis_read_packet(ts->client, ts->packet,
drivers/input/touchscreen/sis_i2c.c
242
dev_err(&ts->client->dev,
drivers/input/touchscreen/sis_i2c.c
248
report_id = ts->packet[SIS_PKT_REPORT_OFFSET];
drivers/input/touchscreen/sis_i2c.c
249
contact = &ts->packet[SIS_PKT_CONTACT_OFFSET];
drivers/input/touchscreen/sis_i2c.c
253
error = sis_ts_report_contact(ts, contact, report_id);
drivers/input/touchscreen/sis_i2c.c
272
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/sis_i2c.c
273
input_sync(ts->input);
drivers/input/touchscreen/sis_i2c.c
278
struct sis_ts_data *ts = dev_id;
drivers/input/touchscreen/sis_i2c.c
281
sis_ts_handle_packet(ts);
drivers/input/touchscreen/sis_i2c.c
282
} while (ts->attn_gpio && gpiod_get_value_cansleep(ts->attn_gpio));
drivers/input/touchscreen/sis_i2c.c
287
static void sis_ts_reset(struct sis_ts_data *ts)
drivers/input/touchscreen/sis_i2c.c
289
if (ts->reset_gpio) {
drivers/input/touchscreen/sis_i2c.c
292
gpiod_set_value(ts->reset_gpio, 1);
drivers/input/touchscreen/sis_i2c.c
294
gpiod_set_value(ts->reset_gpio, 0);
drivers/input/touchscreen/sis_i2c.c
301
struct sis_ts_data *ts;
drivers/input/touchscreen/sis_i2c.c
305
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/sis_i2c.c
306
if (!ts)
drivers/input/touchscreen/sis_i2c.c
309
ts->client = client;
drivers/input/touchscreen/sis_i2c.c
311
ts->attn_gpio = devm_gpiod_get_optional(&client->dev,
drivers/input/touchscreen/sis_i2c.c
313
if (IS_ERR(ts->attn_gpio))
drivers/input/touchscreen/sis_i2c.c
314
return dev_err_probe(&client->dev, PTR_ERR(ts->attn_gpio),
drivers/input/touchscreen/sis_i2c.c
317
ts->reset_gpio = devm_gpiod_get_optional(&client->dev,
drivers/input/touchscreen/sis_i2c.c
319
if (IS_ERR(ts->reset_gpio))
drivers/input/touchscreen/sis_i2c.c
320
return dev_err_probe(&client->dev, PTR_ERR(ts->reset_gpio),
drivers/input/touchscreen/sis_i2c.c
323
sis_ts_reset(ts);
drivers/input/touchscreen/sis_i2c.c
325
ts->input = input = devm_input_allocate_device(&client->dev);
drivers/input/touchscreen/sis_i2c.c
352
client->name, ts);
drivers/input/touchscreen/sis_i2c.c
358
error = input_register_device(ts->input);
drivers/input/touchscreen/st1232.c
100
static int st1232_ts_read_data(struct st1232_ts_data *ts, u8 reg,
drivers/input/touchscreen/st1232.c
103
struct i2c_client *client = ts->client;
drivers/input/touchscreen/st1232.c
114
.buf = ts->read_buf,
drivers/input/touchscreen/st1232.c
126
static int st1232_ts_wait_ready(struct st1232_ts_data *ts)
drivers/input/touchscreen/st1232.c
132
error = st1232_ts_read_data(ts, REG_STATUS, 1);
drivers/input/touchscreen/st1232.c
134
switch (ts->read_buf[0]) {
drivers/input/touchscreen/st1232.c
147
static int st1232_ts_read_fw_version(struct st1232_ts_data *ts,
drivers/input/touchscreen/st1232.c
153
error = st1232_ts_read_data(ts, REG_FIRMWARE_VERSION, 1);
drivers/input/touchscreen/st1232.c
156
*fw_version = ts->read_buf[0];
drivers/input/touchscreen/st1232.c
159
error = st1232_ts_read_data(ts, REG_FIRMWARE_REVISION_3, 4);
drivers/input/touchscreen/st1232.c
162
*fw_revision = le32_to_cpup((__le32 *)ts->read_buf);
drivers/input/touchscreen/st1232.c
167
static int st1232_ts_read_resolution(struct st1232_ts_data *ts, u16 *max_x,
drivers/input/touchscreen/st1232.c
174
error = st1232_ts_read_data(ts, REG_XY_RESOLUTION, 3);
drivers/input/touchscreen/st1232.c
178
buf = ts->read_buf;
drivers/input/touchscreen/st1232.c
186
static int st1232_ts_parse_and_report(struct st1232_ts_data *ts)
drivers/input/touchscreen/st1232.c
188
struct input_dev *input = ts->input_dev;
drivers/input/touchscreen/st1232.c
195
for (i = 0; i < ts->chip_info->max_fingers; i++) {
drivers/input/touchscreen/st1232.c
196
u8 *buf = &ts->read_buf[i * 4];
drivers/input/touchscreen/st1232.c
203
&ts->prop, x, y);
drivers/input/touchscreen/st1232.c
206
if (ts->chip_info->have_z)
drivers/input/touchscreen/st1232.c
207
z[n_contacts] = ts->read_buf[i + 6];
drivers/input/touchscreen/st1232.c
215
if (touch_overlay_process_contact(&ts->touch_overlay_list,
drivers/input/touchscreen/st1232.c
223
if (ts->chip_info->have_z)
drivers/input/touchscreen/st1232.c
227
touch_overlay_sync_frame(&ts->touch_overlay_list, input);
drivers/input/touchscreen/st1232.c
236
struct st1232_ts_data *ts = dev_id;
drivers/input/touchscreen/st1232.c
240
error = st1232_ts_read_data(ts, REG_XY_COORDINATES, ts->read_buf_len);
drivers/input/touchscreen/st1232.c
244
count = st1232_ts_parse_and_report(ts);
drivers/input/touchscreen/st1232.c
246
if (ts->low_latency_req.dev) {
drivers/input/touchscreen/st1232.c
247
dev_pm_qos_remove_request(&ts->low_latency_req);
drivers/input/touchscreen/st1232.c
248
ts->low_latency_req.dev = NULL;
drivers/input/touchscreen/st1232.c
250
} else if (!ts->low_latency_req.dev) {
drivers/input/touchscreen/st1232.c
252
dev_pm_qos_add_ancestor_request(&ts->client->dev,
drivers/input/touchscreen/st1232.c
253
&ts->low_latency_req,
drivers/input/touchscreen/st1232.c
261
static void st1232_ts_power(struct st1232_ts_data *ts, bool poweron)
drivers/input/touchscreen/st1232.c
263
if (ts->reset_gpio)
drivers/input/touchscreen/st1232.c
264
gpiod_set_value_cansleep(ts->reset_gpio, !poweron);
drivers/input/touchscreen/st1232.c
288
struct st1232_ts_data *ts;
drivers/input/touchscreen/st1232.c
311
ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/st1232.c
312
if (!ts)
drivers/input/touchscreen/st1232.c
315
ts->chip_info = match;
drivers/input/touchscreen/st1232.c
318
ts->read_buf_len = ts->chip_info->max_fingers * 4;
drivers/input/touchscreen/st1232.c
319
ts->read_buf = devm_kzalloc(&client->dev, ts->read_buf_len, GFP_KERNEL);
drivers/input/touchscreen/st1232.c
320
if (!ts->read_buf)
drivers/input/touchscreen/st1232.c
327
ts->client = client;
drivers/input/touchscreen/st1232.c
328
ts->input_dev = input_dev;
drivers/input/touchscreen/st1232.c
330
ts->reset_gpio = devm_gpiod_get_optional(&client->dev, NULL,
drivers/input/touchscreen/st1232.c
332
if (IS_ERR(ts->reset_gpio)) {
drivers/input/touchscreen/st1232.c
333
error = PTR_ERR(ts->reset_gpio);
drivers/input/touchscreen/st1232.c
339
st1232_ts_power(ts, true);
drivers/input/touchscreen/st1232.c
341
error = devm_add_action_or_reset(&client->dev, st1232_ts_power_off, ts);
drivers/input/touchscreen/st1232.c
352
error = st1232_ts_wait_ready(ts);
drivers/input/touchscreen/st1232.c
357
error = st1232_ts_read_fw_version(ts, &ts->fw_version, &ts->fw_revision);
drivers/input/touchscreen/st1232.c
364
ts->fw_version, ts->fw_revision);
drivers/input/touchscreen/st1232.c
366
if (ts->chip_info->have_z)
drivers/input/touchscreen/st1232.c
368
ts->chip_info->max_area, 0, 0);
drivers/input/touchscreen/st1232.c
371
INIT_LIST_HEAD(&ts->touch_overlay_list);
drivers/input/touchscreen/st1232.c
372
error = touch_overlay_map(&ts->touch_overlay_list, input_dev);
drivers/input/touchscreen/st1232.c
376
if (touch_overlay_mapped_touchscreen(&ts->touch_overlay_list)) {
drivers/input/touchscreen/st1232.c
378
touch_overlay_get_touchscreen_abs(&ts->touch_overlay_list,
drivers/input/touchscreen/st1232.c
382
error = st1232_ts_read_resolution(ts, &max_x, &max_y);
drivers/input/touchscreen/st1232.c
395
touchscreen_parse_properties(input_dev, true, &ts->prop);
drivers/input/touchscreen/st1232.c
397
error = input_mt_init_slots(input_dev, ts->chip_info->max_fingers,
drivers/input/touchscreen/st1232.c
408
client->name, ts);
drivers/input/touchscreen/st1232.c
414
error = input_register_device(ts->input_dev);
drivers/input/touchscreen/st1232.c
421
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/st1232.c
429
struct st1232_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/st1232.c
434
st1232_ts_power(ts, false);
drivers/input/touchscreen/st1232.c
442
struct st1232_ts_data *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/st1232.c
445
st1232_ts_power(ts, true);
drivers/input/touchscreen/stmpe-ts.c
103
struct stmpe_touch *ts =
drivers/input/touchscreen/stmpe-ts.c
106
int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA);
drivers/input/touchscreen/stmpe-ts.c
117
int_sta = stmpe_reg_read(ts->stmpe, STMPE_REG_INT_STA);
drivers/input/touchscreen/stmpe-ts.c
122
__stmpe_reset_fifo(ts->stmpe);
drivers/input/touchscreen/stmpe-ts.c
124
input_report_abs(ts->idev, ABS_PRESSURE, 0);
drivers/input/touchscreen/stmpe-ts.c
125
input_report_key(ts->idev, BTN_TOUCH, 0);
drivers/input/touchscreen/stmpe-ts.c
126
input_sync(ts->idev);
drivers/input/touchscreen/stmpe-ts.c
133
struct stmpe_touch *ts = data;
drivers/input/touchscreen/stmpe-ts.c
139
cancel_delayed_work_sync(&ts->work);
drivers/input/touchscreen/stmpe-ts.c
147
stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL,
drivers/input/touchscreen/stmpe-ts.c
150
stmpe_block_read(ts->stmpe, STMPE_REG_TSC_DATA_XYZ, 4, data_set);
drivers/input/touchscreen/stmpe-ts.c
156
touchscreen_report_pos(ts->idev, &ts->prop, x, y, false);
drivers/input/touchscreen/stmpe-ts.c
157
input_report_abs(ts->idev, ABS_PRESSURE, z);
drivers/input/touchscreen/stmpe-ts.c
158
input_report_key(ts->idev, BTN_TOUCH, 1);
drivers/input/touchscreen/stmpe-ts.c
159
input_sync(ts->idev);
drivers/input/touchscreen/stmpe-ts.c
162
__stmpe_reset_fifo(ts->stmpe);
drivers/input/touchscreen/stmpe-ts.c
165
stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL,
drivers/input/touchscreen/stmpe-ts.c
169
schedule_delayed_work(&ts->work, msecs_to_jiffies(50));
drivers/input/touchscreen/stmpe-ts.c
174
static int stmpe_init_hw(struct stmpe_touch *ts)
drivers/input/touchscreen/stmpe-ts.c
178
struct stmpe *stmpe = ts->stmpe;
drivers/input/touchscreen/stmpe-ts.c
179
struct device *dev = ts->dev;
drivers/input/touchscreen/stmpe-ts.c
193
tsc_cfg = STMPE_AVE_CTRL(ts->ave_ctrl) |
drivers/input/touchscreen/stmpe-ts.c
194
STMPE_DET_DELAY(ts->touch_det_delay) |
drivers/input/touchscreen/stmpe-ts.c
195
STMPE_SETTLING(ts->settling);
drivers/input/touchscreen/stmpe-ts.c
206
STMPE_FRACTION_Z(0xff), STMPE_FRACTION_Z(ts->fraction_z));
drivers/input/touchscreen/stmpe-ts.c
213
STMPE_I_DRIVE(0xff), STMPE_I_DRIVE(ts->i_drive));
drivers/input/touchscreen/stmpe-ts.c
238
struct stmpe_touch *ts = input_get_drvdata(dev);
drivers/input/touchscreen/stmpe-ts.c
241
ret = __stmpe_reset_fifo(ts->stmpe);
drivers/input/touchscreen/stmpe-ts.c
245
return stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL,
drivers/input/touchscreen/stmpe-ts.c
251
struct stmpe_touch *ts = input_get_drvdata(dev);
drivers/input/touchscreen/stmpe-ts.c
253
cancel_delayed_work_sync(&ts->work);
drivers/input/touchscreen/stmpe-ts.c
255
stmpe_set_bits(ts->stmpe, STMPE_REG_TSC_CTRL,
drivers/input/touchscreen/stmpe-ts.c
260
struct stmpe_touch *ts)
drivers/input/touchscreen/stmpe-ts.c
267
ts->stmpe->sample_time = val;
drivers/input/touchscreen/stmpe-ts.c
269
ts->stmpe->mod_12b = val;
drivers/input/touchscreen/stmpe-ts.c
271
ts->stmpe->ref_sel = val;
drivers/input/touchscreen/stmpe-ts.c
273
ts->stmpe->adc_freq = val;
drivers/input/touchscreen/stmpe-ts.c
275
ts->ave_ctrl = val;
drivers/input/touchscreen/stmpe-ts.c
277
ts->touch_det_delay = val;
drivers/input/touchscreen/stmpe-ts.c
279
ts->settling = val;
drivers/input/touchscreen/stmpe-ts.c
281
ts->fraction_z = val;
drivers/input/touchscreen/stmpe-ts.c
283
ts->i_drive = val;
drivers/input/touchscreen/stmpe-ts.c
290
struct stmpe_touch *ts;
drivers/input/touchscreen/stmpe-ts.c
299
ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/stmpe-ts.c
300
if (!ts)
drivers/input/touchscreen/stmpe-ts.c
307
platform_set_drvdata(pdev, ts);
drivers/input/touchscreen/stmpe-ts.c
308
ts->stmpe = stmpe;
drivers/input/touchscreen/stmpe-ts.c
309
ts->idev = idev;
drivers/input/touchscreen/stmpe-ts.c
310
ts->dev = &pdev->dev;
drivers/input/touchscreen/stmpe-ts.c
312
stmpe_ts_get_platform_info(pdev, ts);
drivers/input/touchscreen/stmpe-ts.c
314
INIT_DELAYED_WORK(&ts->work, stmpe_work);
drivers/input/touchscreen/stmpe-ts.c
318
IRQF_ONESHOT, STMPE_TS_NAME, ts);
drivers/input/touchscreen/stmpe-ts.c
324
error = stmpe_init_hw(ts);
drivers/input/touchscreen/stmpe-ts.c
335
input_set_drvdata(idev, ts);
drivers/input/touchscreen/stmpe-ts.c
342
touchscreen_parse_properties(idev, false, &ts->prop);
drivers/input/touchscreen/stmpe-ts.c
355
struct stmpe_touch *ts = platform_get_drvdata(pdev);
drivers/input/touchscreen/stmpe-ts.c
357
stmpe_disable(ts->stmpe, STMPE_BLOCK_TOUCHSCREEN);
drivers/input/touchscreen/sun4i-ts.c
117
static void sun4i_ts_irq_handle_input(struct sun4i_ts_data *ts, u32 reg_val)
drivers/input/touchscreen/sun4i-ts.c
122
x = readl(ts->base + TP_DATA);
drivers/input/touchscreen/sun4i-ts.c
123
y = readl(ts->base + TP_DATA);
drivers/input/touchscreen/sun4i-ts.c
125
if (!ts->ignore_fifo_data) {
drivers/input/touchscreen/sun4i-ts.c
126
input_report_abs(ts->input, ABS_X, x);
drivers/input/touchscreen/sun4i-ts.c
127
input_report_abs(ts->input, ABS_Y, y);
drivers/input/touchscreen/sun4i-ts.c
133
input_report_key(ts->input, BTN_TOUCH, 1);
drivers/input/touchscreen/sun4i-ts.c
134
input_sync(ts->input);
drivers/input/touchscreen/sun4i-ts.c
136
ts->ignore_fifo_data = false;
drivers/input/touchscreen/sun4i-ts.c
141
ts->ignore_fifo_data = true;
drivers/input/touchscreen/sun4i-ts.c
142
input_report_key(ts->input, BTN_TOUCH, 0);
drivers/input/touchscreen/sun4i-ts.c
143
input_sync(ts->input);
drivers/input/touchscreen/sun4i-ts.c
149
struct sun4i_ts_data *ts = dev_id;
drivers/input/touchscreen/sun4i-ts.c
152
reg_val = readl(ts->base + TP_INT_FIFOS);
drivers/input/touchscreen/sun4i-ts.c
155
ts->temp_data = readl(ts->base + TEMP_DATA);
drivers/input/touchscreen/sun4i-ts.c
157
if (ts->input)
drivers/input/touchscreen/sun4i-ts.c
158
sun4i_ts_irq_handle_input(ts, reg_val);
drivers/input/touchscreen/sun4i-ts.c
160
writel(reg_val, ts->base + TP_INT_FIFOS);
drivers/input/touchscreen/sun4i-ts.c
167
struct sun4i_ts_data *ts = input_get_drvdata(dev);
drivers/input/touchscreen/sun4i-ts.c
171
TP_UP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
drivers/input/touchscreen/sun4i-ts.c
178
struct sun4i_ts_data *ts = input_get_drvdata(dev);
drivers/input/touchscreen/sun4i-ts.c
181
writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
drivers/input/touchscreen/sun4i-ts.c
184
static int sun4i_get_temp(const struct sun4i_ts_data *ts, int *temp)
drivers/input/touchscreen/sun4i-ts.c
187
if (ts->temp_data == -1)
drivers/input/touchscreen/sun4i-ts.c
190
*temp = ts->temp_data * ts->temp_step - ts->temp_offset;
drivers/input/touchscreen/sun4i-ts.c
207
struct sun4i_ts_data *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/sun4i-ts.c
211
error = sun4i_get_temp(ts, &temp);
drivers/input/touchscreen/sun4i-ts.c
236
struct sun4i_ts_data *ts;
drivers/input/touchscreen/sun4i-ts.c
247
ts = devm_kzalloc(dev, sizeof(struct sun4i_ts_data), GFP_KERNEL);
drivers/input/touchscreen/sun4i-ts.c
248
if (!ts)
drivers/input/touchscreen/sun4i-ts.c
251
ts->dev = dev;
drivers/input/touchscreen/sun4i-ts.c
252
ts->ignore_fifo_data = true;
drivers/input/touchscreen/sun4i-ts.c
253
ts->temp_data = -1;
drivers/input/touchscreen/sun4i-ts.c
256
ts->temp_offset = 271000;
drivers/input/touchscreen/sun4i-ts.c
257
ts->temp_step = 167;
drivers/input/touchscreen/sun4i-ts.c
265
ts->temp_offset = 257000;
drivers/input/touchscreen/sun4i-ts.c
266
ts->temp_step = 133;
drivers/input/touchscreen/sun4i-ts.c
279
ts->temp_offset = 144700;
drivers/input/touchscreen/sun4i-ts.c
280
ts->temp_step = 100;
drivers/input/touchscreen/sun4i-ts.c
285
ts->input = devm_input_allocate_device(dev);
drivers/input/touchscreen/sun4i-ts.c
286
if (!ts->input)
drivers/input/touchscreen/sun4i-ts.c
289
ts->input->name = pdev->name;
drivers/input/touchscreen/sun4i-ts.c
290
ts->input->phys = "sun4i_ts/input0";
drivers/input/touchscreen/sun4i-ts.c
291
ts->input->open = sun4i_ts_open;
drivers/input/touchscreen/sun4i-ts.c
292
ts->input->close = sun4i_ts_close;
drivers/input/touchscreen/sun4i-ts.c
293
ts->input->id.bustype = BUS_HOST;
drivers/input/touchscreen/sun4i-ts.c
294
ts->input->id.vendor = 0x0001;
drivers/input/touchscreen/sun4i-ts.c
295
ts->input->id.product = 0x0001;
drivers/input/touchscreen/sun4i-ts.c
296
ts->input->id.version = 0x0100;
drivers/input/touchscreen/sun4i-ts.c
297
ts->input->evbit[0] = BIT(EV_SYN) | BIT(EV_KEY) | BIT(EV_ABS);
drivers/input/touchscreen/sun4i-ts.c
298
__set_bit(BTN_TOUCH, ts->input->keybit);
drivers/input/touchscreen/sun4i-ts.c
299
input_set_abs_params(ts->input, ABS_X, 0, 4095, 0, 0);
drivers/input/touchscreen/sun4i-ts.c
300
input_set_abs_params(ts->input, ABS_Y, 0, 4095, 0, 0);
drivers/input/touchscreen/sun4i-ts.c
301
input_set_drvdata(ts->input, ts);
drivers/input/touchscreen/sun4i-ts.c
304
ts->base = devm_platform_ioremap_resource(pdev, 0);
drivers/input/touchscreen/sun4i-ts.c
305
if (IS_ERR(ts->base))
drivers/input/touchscreen/sun4i-ts.c
306
return PTR_ERR(ts->base);
drivers/input/touchscreen/sun4i-ts.c
308
ts->irq = platform_get_irq(pdev, 0);
drivers/input/touchscreen/sun4i-ts.c
309
error = devm_request_irq(dev, ts->irq, sun4i_ts_irq, 0, "sun4i-ts", ts);
drivers/input/touchscreen/sun4i-ts.c
318
ts->base + TP_CTRL0);
drivers/input/touchscreen/sun4i-ts.c
327
ts->base + TP_CTRL2);
drivers/input/touchscreen/sun4i-ts.c
334
writel(FILTER_EN(1) | FILTER_TYPE(filter_type), ts->base + TP_CTRL3);
drivers/input/touchscreen/sun4i-ts.c
337
writel(TEMP_ENABLE(1) | TEMP_PERIOD(1953), ts->base + TP_TPR);
drivers/input/touchscreen/sun4i-ts.c
348
writel(reg, ts->base + TP_CTRL1);
drivers/input/touchscreen/sun4i-ts.c
354
hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
drivers/input/touchscreen/sun4i-ts.c
355
ts, sun4i_ts_groups);
drivers/input/touchscreen/sun4i-ts.c
359
thermal = devm_thermal_of_zone_register(ts->dev, 0, ts,
drivers/input/touchscreen/sun4i-ts.c
364
writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
drivers/input/touchscreen/sun4i-ts.c
367
error = input_register_device(ts->input);
drivers/input/touchscreen/sun4i-ts.c
369
writel(0, ts->base + TP_INT_FIFOC);
drivers/input/touchscreen/sun4i-ts.c
374
platform_set_drvdata(pdev, ts);
drivers/input/touchscreen/sun4i-ts.c
380
struct sun4i_ts_data *ts = platform_get_drvdata(pdev);
drivers/input/touchscreen/sun4i-ts.c
383
if (ts->input)
drivers/input/touchscreen/sun4i-ts.c
384
input_unregister_device(ts->input);
drivers/input/touchscreen/sun4i-ts.c
387
writel(0, ts->base + TP_INT_FIFOC);
drivers/input/touchscreen/sx8654.c
109
static inline void sx865x_penrelease(struct sx8654 *ts)
drivers/input/touchscreen/sx8654.c
111
struct input_dev *input_dev = ts->input;
drivers/input/touchscreen/sx8654.c
119
struct sx8654 *ts = timer_container_of(ts, t, timer);
drivers/input/touchscreen/sx8654.c
121
dev_dbg(&ts->client->dev, "penrelease by timer\n");
drivers/input/touchscreen/sx8654.c
123
guard(spinlock_irqsave)(&ts->lock);
drivers/input/touchscreen/sx8654.c
124
sx865x_penrelease(ts);
drivers/input/touchscreen/sx8654.c
129
struct sx8654 *ts = handle;
drivers/input/touchscreen/sx8654.c
130
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/sx8654.c
137
u8 nchan = hweight32(ts->data->chan_mask);
drivers/input/touchscreen/sx8654.c
140
stat = i2c_smbus_read_byte_data(ts->client, CMD_READ_REGISTER
drivers/input/touchscreen/sx8654.c
148
len = i2c_master_recv(ts->client, (u8 *)data, readlen);
drivers/input/touchscreen/sx8654.c
154
guard(spinlock_irqsave)(&ts->lock);
drivers/input/touchscreen/sx8654.c
179
touchscreen_report_pos(ts->input, &ts->props, x, y, false);
drivers/input/touchscreen/sx8654.c
180
input_report_key(ts->input, BTN_TOUCH, 1);
drivers/input/touchscreen/sx8654.c
181
input_sync(ts->input);
drivers/input/touchscreen/sx8654.c
184
mod_timer(&ts->timer, jiffies + SX8650_PENIRQ_TIMEOUT);
drivers/input/touchscreen/sx8654.c
237
static int sx8654_reset(struct sx8654 *ts)
drivers/input/touchscreen/sx8654.c
241
if (ts->gpio_reset) {
drivers/input/touchscreen/sx8654.c
242
gpiod_set_value_cansleep(ts->gpio_reset, 1);
drivers/input/touchscreen/sx8654.c
244
gpiod_set_value_cansleep(ts->gpio_reset, 0);
drivers/input/touchscreen/sx8654.c
246
dev_dbg(&ts->client->dev, "NRST unavailable, try softreset\n");
drivers/input/touchscreen/sx8654.c
247
err = i2c_smbus_write_byte_data(ts->client, I2C_REG_SOFTRESET,
drivers/input/touchscreen/ti_am335x_tsc.c
62
static unsigned int titsc_readl(struct titsc *ts, unsigned int reg)
drivers/input/touchscreen/ti_am335x_tsc.c
64
return readl(ts->mfd_tscadc->tscadc_base + reg);
drivers/input/touchscreen/ts4800-ts.c
100
} else if (ts->pendown) {
drivers/input/touchscreen/ts4800-ts.c
101
ts->pendown = false;
drivers/input/touchscreen/ts4800-ts.c
102
ts->debounce = DEBOUNCE_COUNT;
drivers/input/touchscreen/ts4800-ts.c
109
struct ts4800_ts *ts)
drivers/input/touchscreen/ts4800-ts.c
123
ts->regmap = syscon_node_to_regmap(syscon_np);
drivers/input/touchscreen/ts4800-ts.c
124
if (IS_ERR(ts->regmap)) {
drivers/input/touchscreen/ts4800-ts.c
126
return PTR_ERR(ts->regmap);
drivers/input/touchscreen/ts4800-ts.c
135
ts->reg = reg;
drivers/input/touchscreen/ts4800-ts.c
143
ts->bit = BIT(bit);
drivers/input/touchscreen/ts4800-ts.c
151
struct ts4800_ts *ts;
drivers/input/touchscreen/ts4800-ts.c
154
ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/ts4800-ts.c
155
if (!ts)
drivers/input/touchscreen/ts4800-ts.c
158
error = ts4800_parse_dt(pdev, ts);
drivers/input/touchscreen/ts4800-ts.c
162
ts->base = devm_platform_ioremap_resource(pdev, 0);
drivers/input/touchscreen/ts4800-ts.c
163
if (IS_ERR(ts->base))
drivers/input/touchscreen/ts4800-ts.c
164
return PTR_ERR(ts->base);
drivers/input/touchscreen/ts4800-ts.c
170
snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&pdev->dev));
drivers/input/touchscreen/ts4800-ts.c
171
ts->input = input_dev;
drivers/input/touchscreen/ts4800-ts.c
172
ts->dev = &pdev->dev;
drivers/input/touchscreen/ts4800-ts.c
174
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/ts4800-ts.c
177
input_dev->phys = ts->phys;
drivers/input/touchscreen/ts4800-ts.c
50
struct ts4800_ts *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/ts4800-ts.c
53
ts->pendown = false;
drivers/input/touchscreen/ts4800-ts.c
54
ts->debounce = DEBOUNCE_COUNT;
drivers/input/touchscreen/ts4800-ts.c
56
error = regmap_update_bits(ts->regmap, ts->reg, ts->bit, ts->bit);
drivers/input/touchscreen/ts4800-ts.c
58
dev_warn(ts->dev, "Failed to enable touchscreen: %d\n", error);
drivers/input/touchscreen/ts4800-ts.c
67
struct ts4800_ts *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/ts4800-ts.c
70
ret = regmap_update_bits(ts->regmap, ts->reg, ts->bit, 0);
drivers/input/touchscreen/ts4800-ts.c
72
dev_warn(ts->dev, "Failed to disable touchscreen\n");
drivers/input/touchscreen/ts4800-ts.c
78
struct ts4800_ts *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/ts4800-ts.c
79
u16 last_x = readw(ts->base + X_OFFSET);
drivers/input/touchscreen/ts4800-ts.c
80
u16 last_y = readw(ts->base + Y_OFFSET);
drivers/input/touchscreen/ts4800-ts.c
84
if (ts->debounce) {
drivers/input/touchscreen/ts4800-ts.c
85
ts->debounce--;
drivers/input/touchscreen/ts4800-ts.c
89
if (!ts->pendown) {
drivers/input/touchscreen/ts4800-ts.c
91
ts->pendown = true;
drivers/input/touchscreen/tsc2007.h
90
bool tsc2007_is_pen_down(struct tsc2007 *ts);
drivers/input/touchscreen/tsc2007.h
94
int tsc2007_iio_configure(struct tsc2007 *ts);
drivers/input/touchscreen/tsc2007.h
96
static inline int tsc2007_iio_configure(struct tsc2007 *ts)
drivers/input/touchscreen/tsc2007_core.c
105
if (!ts->get_pendown_state)
drivers/input/touchscreen/tsc2007_core.c
108
return ts->get_pendown_state(&ts->client->dev);
drivers/input/touchscreen/tsc2007_core.c
113
struct tsc2007 *ts = handle;
drivers/input/touchscreen/tsc2007_core.c
114
struct input_dev *input = ts->input;
drivers/input/touchscreen/tsc2007_core.c
118
while (!ts->stopped && tsc2007_is_pen_down(ts)) {
drivers/input/touchscreen/tsc2007_core.c
123
scoped_guard(mutex, &ts->mlock) {
drivers/input/touchscreen/tsc2007_core.c
124
tsc2007_read_values(ts, &tc);
drivers/input/touchscreen/tsc2007_core.c
127
rt = tsc2007_calculate_resistance(ts, &tc);
drivers/input/touchscreen/tsc2007_core.c
129
if (!rt && !ts->get_pendown_state) {
drivers/input/touchscreen/tsc2007_core.c
138
if (rt <= ts->max_rt) {
drivers/input/touchscreen/tsc2007_core.c
139
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/tsc2007_core.c
143
rt = ts->max_rt - rt;
drivers/input/touchscreen/tsc2007_core.c
146
touchscreen_report_pos(input, &ts->prop, tc.x, tc.y, false);
drivers/input/touchscreen/tsc2007_core.c
157
dev_dbg(&ts->client->dev, "ignored pressure %d\n", rt);
drivers/input/touchscreen/tsc2007_core.c
160
wait_event_timeout(ts->wait, ts->stopped, ts->poll_period);
drivers/input/touchscreen/tsc2007_core.c
163
dev_dbg(&ts->client->dev, "UP\n");
drivers/input/touchscreen/tsc2007_core.c
169
if (ts->clear_penirq)
drivers/input/touchscreen/tsc2007_core.c
170
ts->clear_penirq();
drivers/input/touchscreen/tsc2007_core.c
175
static void tsc2007_stop(struct tsc2007 *ts)
drivers/input/touchscreen/tsc2007_core.c
177
ts->stopped = true;
drivers/input/touchscreen/tsc2007_core.c
179
wake_up(&ts->wait);
drivers/input/touchscreen/tsc2007_core.c
181
if (ts->irq)
drivers/input/touchscreen/tsc2007_core.c
182
disable_irq(ts->irq);
drivers/input/touchscreen/tsc2007_core.c
187
struct tsc2007 *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/tsc2007_core.c
190
ts->stopped = false;
drivers/input/touchscreen/tsc2007_core.c
193
if (ts->irq)
drivers/input/touchscreen/tsc2007_core.c
194
enable_irq(ts->irq);
drivers/input/touchscreen/tsc2007_core.c
197
err = tsc2007_xfer(ts, PWRDOWN);
drivers/input/touchscreen/tsc2007_core.c
199
tsc2007_stop(ts);
drivers/input/touchscreen/tsc2007_core.c
208
struct tsc2007 *ts = input_get_drvdata(input_dev);
drivers/input/touchscreen/tsc2007_core.c
210
tsc2007_stop(ts);
drivers/input/touchscreen/tsc2007_core.c
216
struct tsc2007 *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/tsc2007_core.c
218
return gpiod_get_value_cansleep(ts->gpiod);
drivers/input/touchscreen/tsc2007_core.c
221
static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
drivers/input/touchscreen/tsc2007_core.c
227
ts->max_rt = val32;
drivers/input/touchscreen/tsc2007_core.c
229
ts->max_rt = MAX_12BIT;
drivers/input/touchscreen/tsc2007_core.c
232
ts->fuzzx = val32;
drivers/input/touchscreen/tsc2007_core.c
235
ts->fuzzy = val32;
drivers/input/touchscreen/tsc2007_core.c
238
ts->fuzzz = val32;
drivers/input/touchscreen/tsc2007_core.c
241
ts->poll_period = msecs_to_jiffies(val64);
drivers/input/touchscreen/tsc2007_core.c
243
ts->poll_period = msecs_to_jiffies(1);
drivers/input/touchscreen/tsc2007_core.c
246
ts->x_plate_ohms = val32;
drivers/input/touchscreen/tsc2007_core.c
252
ts->gpiod = devm_gpiod_get_optional(dev, NULL, GPIOD_IN);
drivers/input/touchscreen/tsc2007_core.c
253
if (IS_ERR(ts->gpiod))
drivers/input/touchscreen/tsc2007_core.c
254
return PTR_ERR(ts->gpiod);
drivers/input/touchscreen/tsc2007_core.c
256
if (ts->gpiod)
drivers/input/touchscreen/tsc2007_core.c
257
ts->get_pendown_state = tsc2007_get_pendown_state_gpio;
drivers/input/touchscreen/tsc2007_core.c
264
static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
drivers/input/touchscreen/tsc2007_core.c
268
ts->model = pdata->model;
drivers/input/touchscreen/tsc2007_core.c
269
ts->x_plate_ohms = pdata->x_plate_ohms;
drivers/input/touchscreen/tsc2007_core.c
270
ts->max_rt = pdata->max_rt ? : MAX_12BIT;
drivers/input/touchscreen/tsc2007_core.c
271
ts->poll_period = msecs_to_jiffies(pdata->poll_period ? : 1);
drivers/input/touchscreen/tsc2007_core.c
272
ts->get_pendown_state = pdata->get_pendown_state;
drivers/input/touchscreen/tsc2007_core.c
273
ts->clear_penirq = pdata->clear_penirq;
drivers/input/touchscreen/tsc2007_core.c
274
ts->fuzzx = pdata->fuzzx;
drivers/input/touchscreen/tsc2007_core.c
275
ts->fuzzy = pdata->fuzzy;
drivers/input/touchscreen/tsc2007_core.c
276
ts->fuzzz = pdata->fuzzz;
drivers/input/touchscreen/tsc2007_core.c
299
struct tsc2007 *ts;
drivers/input/touchscreen/tsc2007_core.c
307
ts = devm_kzalloc(&client->dev, sizeof(struct tsc2007), GFP_KERNEL);
drivers/input/touchscreen/tsc2007_core.c
308
if (!ts)
drivers/input/touchscreen/tsc2007_core.c
312
err = tsc2007_probe_pdev(&client->dev, ts, pdata, id);
drivers/input/touchscreen/tsc2007_core.c
314
err = tsc2007_probe_properties(&client->dev, ts);
drivers/input/touchscreen/tsc2007_core.c
322
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/tsc2007_core.c
324
ts->client = client;
drivers/input/touchscreen/tsc2007_core.c
325
ts->irq = client->irq;
drivers/input/touchscreen/tsc2007_core.c
326
ts->input = input_dev;
drivers/input/touchscreen/tsc2007_core.c
328
init_waitqueue_head(&ts->wait);
drivers/input/touchscreen/tsc2007_core.c
329
mutex_init(&ts->mlock);
drivers/input/touchscreen/tsc2007_core.c
331
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/tsc2007_core.c
335
input_dev->phys = ts->phys;
drivers/input/touchscreen/tsc2007_core.c
341
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/tsc2007_core.c
344
input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, ts->fuzzx, 0);
drivers/input/touchscreen/tsc2007_core.c
345
input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, ts->fuzzy, 0);
drivers/input/touchscreen/tsc2007_core.c
346
touchscreen_parse_properties(input_dev, false, &ts->prop);
drivers/input/touchscreen/tsc2007_core.c
348
ts->fuzzz, 0);
drivers/input/touchscreen/tsc2007_core.c
367
if (ts->irq) {
drivers/input/touchscreen/tsc2007_core.c
368
err = devm_request_threaded_irq(&client->dev, ts->irq,
drivers/input/touchscreen/tsc2007_core.c
371
client->dev.driver->name, ts);
drivers/input/touchscreen/tsc2007_core.c
374
ts->irq, err);
drivers/input/touchscreen/tsc2007_core.c
378
tsc2007_stop(ts);
drivers/input/touchscreen/tsc2007_core.c
382
err = tsc2007_xfer(ts, PWRDOWN);
drivers/input/touchscreen/tsc2007_core.c
396
err = tsc2007_iio_configure(ts);
drivers/input/touchscreen/tsc2007_core.c
89
bool tsc2007_is_pen_down(struct tsc2007 *ts)
drivers/input/touchscreen/tsc2007_iio.c
101
int tsc2007_iio_configure(struct tsc2007 *ts)
drivers/input/touchscreen/tsc2007_iio.c
107
indio_dev = devm_iio_device_alloc(&ts->client->dev, sizeof(*iio));
drivers/input/touchscreen/tsc2007_iio.c
109
dev_err(&ts->client->dev, "iio_device_alloc failed\n");
drivers/input/touchscreen/tsc2007_iio.c
114
iio->ts = ts;
drivers/input/touchscreen/tsc2007_iio.c
12
struct tsc2007 *ts;
drivers/input/touchscreen/tsc2007_iio.c
122
error = devm_iio_device_register(&ts->client->dev, indio_dev);
drivers/input/touchscreen/tsc2007_iio.c
124
dev_err(&ts->client->dev,
drivers/input/touchscreen/tsc2007_iio.c
42
struct tsc2007 *tsc = iio->ts;
drivers/input/touchscreen/tsc200x-core.c
115
static void tsc200x_update_pen_state(struct tsc200x *ts,
drivers/input/touchscreen/tsc200x-core.c
119
touchscreen_report_pos(ts->idev, &ts->prop, x, y, false);
drivers/input/touchscreen/tsc200x-core.c
120
input_report_abs(ts->idev, ABS_PRESSURE, pressure);
drivers/input/touchscreen/tsc200x-core.c
121
if (!ts->pen_down) {
drivers/input/touchscreen/tsc200x-core.c
122
input_report_key(ts->idev, BTN_TOUCH, !!pressure);
drivers/input/touchscreen/tsc200x-core.c
123
ts->pen_down = true;
drivers/input/touchscreen/tsc200x-core.c
126
input_report_abs(ts->idev, ABS_PRESSURE, 0);
drivers/input/touchscreen/tsc200x-core.c
127
if (ts->pen_down) {
drivers/input/touchscreen/tsc200x-core.c
128
input_report_key(ts->idev, BTN_TOUCH, 0);
drivers/input/touchscreen/tsc200x-core.c
129
ts->pen_down = false;
drivers/input/touchscreen/tsc200x-core.c
132
input_sync(ts->idev);
drivers/input/touchscreen/tsc200x-core.c
133
dev_dbg(ts->dev, "point(%4d,%4d), pressure (%4d)\n", x, y,
drivers/input/touchscreen/tsc200x-core.c
139
struct tsc200x *ts = _ts;
drivers/input/touchscreen/tsc200x-core.c
145
error = regmap_bulk_read(ts->regmap, TSC200X_REG_X, &tsdata,
drivers/input/touchscreen/tsc200x-core.c
164
if (!ts->pen_down &&
drivers/input/touchscreen/tsc200x-core.c
165
ts->in_x == tsdata.x && ts->in_y == tsdata.y &&
drivers/input/touchscreen/tsc200x-core.c
166
ts->in_z1 == tsdata.z1 && ts->in_z2 == tsdata.z2) {
drivers/input/touchscreen/tsc200x-core.c
174
ts->in_x = tsdata.x;
drivers/input/touchscreen/tsc200x-core.c
175
ts->in_y = tsdata.y;
drivers/input/touchscreen/tsc200x-core.c
176
ts->in_z1 = tsdata.z1;
drivers/input/touchscreen/tsc200x-core.c
177
ts->in_z2 = tsdata.z2;
drivers/input/touchscreen/tsc200x-core.c
181
pressure = pressure * ts->x_plate_ohm / 4096;
drivers/input/touchscreen/tsc200x-core.c
185
scoped_guard(spinlock_irqsave, &ts->lock) {
drivers/input/touchscreen/tsc200x-core.c
186
tsc200x_update_pen_state(ts, tsdata.x, tsdata.y, pressure);
drivers/input/touchscreen/tsc200x-core.c
187
mod_timer(&ts->penup_timer,
drivers/input/touchscreen/tsc200x-core.c
191
ts->last_valid_interrupt = jiffies;
drivers/input/touchscreen/tsc200x-core.c
198
struct tsc200x *ts = timer_container_of(ts, t, penup_timer);
drivers/input/touchscreen/tsc200x-core.c
200
guard(spinlock_irqsave)(&ts->lock);
drivers/input/touchscreen/tsc200x-core.c
201
tsc200x_update_pen_state(ts, 0, 0, 0);
drivers/input/touchscreen/tsc200x-core.c
204
static void tsc200x_start_scan(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
206
regmap_write(ts->regmap, TSC200X_REG_CFR0, TSC200X_CFR0_INITVALUE);
drivers/input/touchscreen/tsc200x-core.c
207
regmap_write(ts->regmap, TSC200X_REG_CFR1, TSC200X_CFR1_INITVALUE);
drivers/input/touchscreen/tsc200x-core.c
208
regmap_write(ts->regmap, TSC200X_REG_CFR2, TSC200X_CFR2_INITVALUE);
drivers/input/touchscreen/tsc200x-core.c
209
ts->tsc200x_cmd(ts->dev, TSC200X_CMD_NORMAL);
drivers/input/touchscreen/tsc200x-core.c
212
static void tsc200x_stop_scan(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
214
ts->tsc200x_cmd(ts->dev, TSC200X_CMD_STOP);
drivers/input/touchscreen/tsc200x-core.c
217
static void tsc200x_reset(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
219
if (ts->reset_gpio) {
drivers/input/touchscreen/tsc200x-core.c
220
gpiod_set_value_cansleep(ts->reset_gpio, 1);
drivers/input/touchscreen/tsc200x-core.c
222
gpiod_set_value_cansleep(ts->reset_gpio, 0);
drivers/input/touchscreen/tsc200x-core.c
227
static void __tsc200x_disable(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
229
tsc200x_stop_scan(ts);
drivers/input/touchscreen/tsc200x-core.c
231
guard(disable_irq)(&ts->irq);
drivers/input/touchscreen/tsc200x-core.c
233
timer_delete_sync(&ts->penup_timer);
drivers/input/touchscreen/tsc200x-core.c
234
cancel_delayed_work_sync(&ts->esd_work);
drivers/input/touchscreen/tsc200x-core.c
238
static void __tsc200x_enable(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
240
tsc200x_start_scan(ts);
drivers/input/touchscreen/tsc200x-core.c
242
if (ts->esd_timeout && ts->reset_gpio) {
drivers/input/touchscreen/tsc200x-core.c
243
ts->last_valid_interrupt = jiffies;
drivers/input/touchscreen/tsc200x-core.c
244
schedule_delayed_work(&ts->esd_work,
drivers/input/touchscreen/tsc200x-core.c
246
msecs_to_jiffies(ts->esd_timeout)));
drivers/input/touchscreen/tsc200x-core.c
253
static int tsc200x_do_selftest(struct tsc200x *ts)
drivers/input/touchscreen/tsc200x-core.c
260
error = regmap_read(ts->regmap, TSC200X_REG_TEMP_HIGH, &temp_high_orig);
drivers/input/touchscreen/tsc200x-core.c
262
dev_warn(ts->dev, "selftest failed: read error %d\n", error);
drivers/input/touchscreen/tsc200x-core.c
268
error = regmap_write(ts->regmap, TSC200X_REG_TEMP_HIGH, temp_high_test);
drivers/input/touchscreen/tsc200x-core.c
270
dev_warn(ts->dev, "selftest failed: write error %d\n", error);
drivers/input/touchscreen/tsc200x-core.c
274
error = regmap_read(ts->regmap, TSC200X_REG_TEMP_HIGH, &temp_high);
drivers/input/touchscreen/tsc200x-core.c
276
dev_warn(ts->dev,
drivers/input/touchscreen/tsc200x-core.c
282
tsc200x_reset(ts);
drivers/input/touchscreen/tsc200x-core.c
285
dev_warn(ts->dev, "selftest failed: %d != %d\n",
drivers/input/touchscreen/tsc200x-core.c
291
error = regmap_read(ts->regmap, TSC200X_REG_TEMP_HIGH, &temp_high);
drivers/input/touchscreen/tsc200x-core.c
293
dev_warn(ts->dev,
drivers/input/touchscreen/tsc200x-core.c
299
dev_warn(ts->dev, "selftest failed after reset: %d != %d\n",
drivers/input/touchscreen/tsc200x-core.c
311
struct tsc200x *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/tsc200x-core.c
314
scoped_guard(mutex, &ts->mutex) {
drivers/input/touchscreen/tsc200x-core.c
315
__tsc200x_disable(ts);
drivers/input/touchscreen/tsc200x-core.c
317
error = tsc200x_do_selftest(ts);
drivers/input/touchscreen/tsc200x-core.c
319
__tsc200x_enable(ts);
drivers/input/touchscreen/tsc200x-core.c
336
struct tsc200x *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/tsc200x-core.c
340
if (!ts->reset_gpio)
drivers/input/touchscreen/tsc200x-core.c
360
struct tsc200x *ts = container_of(work, struct tsc200x, esd_work.work);
drivers/input/touchscreen/tsc200x-core.c
369
scoped_guard(mutex_try, &ts->mutex) {
drivers/input/touchscreen/tsc200x-core.c
370
if (time_is_after_jiffies(ts->last_valid_interrupt +
drivers/input/touchscreen/tsc200x-core.c
371
msecs_to_jiffies(ts->esd_timeout)))
drivers/input/touchscreen/tsc200x-core.c
378
error = regmap_read(ts->regmap, TSC200X_REG_CFR0, &r);
drivers/input/touchscreen/tsc200x-core.c
389
dev_info(ts->dev, "TSC200X not responding - resetting\n");
drivers/input/touchscreen/tsc200x-core.c
391
scoped_guard(disable_irq, &ts->irq) {
drivers/input/touchscreen/tsc200x-core.c
392
timer_delete_sync(&ts->penup_timer);
drivers/input/touchscreen/tsc200x-core.c
393
tsc200x_update_pen_state(ts, 0, 0, 0);
drivers/input/touchscreen/tsc200x-core.c
394
tsc200x_reset(ts);
drivers/input/touchscreen/tsc200x-core.c
397
tsc200x_start_scan(ts);
drivers/input/touchscreen/tsc200x-core.c
401
schedule_delayed_work(&ts->esd_work,
drivers/input/touchscreen/tsc200x-core.c
403
msecs_to_jiffies(ts->esd_timeout)));
drivers/input/touchscreen/tsc200x-core.c
408
struct tsc200x *ts = input_get_drvdata(input);
drivers/input/touchscreen/tsc200x-core.c
410
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/tsc200x-core.c
412
if (!ts->suspended)
drivers/input/touchscreen/tsc200x-core.c
413
__tsc200x_enable(ts);
drivers/input/touchscreen/tsc200x-core.c
415
ts->opened = true;
drivers/input/touchscreen/tsc200x-core.c
422
struct tsc200x *ts = input_get_drvdata(input);
drivers/input/touchscreen/tsc200x-core.c
424
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/tsc200x-core.c
426
if (!ts->suspended)
drivers/input/touchscreen/tsc200x-core.c
427
__tsc200x_disable(ts);
drivers/input/touchscreen/tsc200x-core.c
429
ts->opened = false;
drivers/input/touchscreen/tsc200x-core.c
436
struct tsc200x *ts;
drivers/input/touchscreen/tsc200x-core.c
455
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/tsc200x-core.c
456
if (!ts)
drivers/input/touchscreen/tsc200x-core.c
463
ts->irq = irq;
drivers/input/touchscreen/tsc200x-core.c
464
ts->dev = dev;
drivers/input/touchscreen/tsc200x-core.c
465
ts->idev = input_dev;
drivers/input/touchscreen/tsc200x-core.c
466
ts->regmap = regmap;
drivers/input/touchscreen/tsc200x-core.c
467
ts->tsc200x_cmd = tsc200x_cmd;
drivers/input/touchscreen/tsc200x-core.c
470
ts->x_plate_ohm = error ? TSC200X_DEF_RESISTOR : x_plate_ohm;
drivers/input/touchscreen/tsc200x-core.c
474
ts->esd_timeout = error ? 0 : esd_timeout;
drivers/input/touchscreen/tsc200x-core.c
476
mutex_init(&ts->mutex);
drivers/input/touchscreen/tsc200x-core.c
478
spin_lock_init(&ts->lock);
drivers/input/touchscreen/tsc200x-core.c
479
timer_setup(&ts->penup_timer, tsc200x_penup_timer, 0);
drivers/input/touchscreen/tsc200x-core.c
481
INIT_DELAYED_WORK(&ts->esd_work, tsc200x_esd_work);
drivers/input/touchscreen/tsc200x-core.c
483
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/tsc200x-core.c
496
input_dev->phys = ts->phys;
drivers/input/touchscreen/tsc200x-core.c
502
input_set_drvdata(input_dev, ts);
drivers/input/touchscreen/tsc200x-core.c
514
touchscreen_parse_properties(input_dev, false, &ts->prop);
drivers/input/touchscreen/tsc200x-core.c
516
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
drivers/input/touchscreen/tsc200x-core.c
517
error = PTR_ERR_OR_ZERO(ts->reset_gpio);
drivers/input/touchscreen/tsc200x-core.c
529
tsc200x_reset(ts);
drivers/input/touchscreen/tsc200x-core.c
532
tsc200x_stop_scan(ts);
drivers/input/touchscreen/tsc200x-core.c
535
IRQF_ONESHOT, "tsc200x", ts);
drivers/input/touchscreen/tsc200x-core.c
541
dev_set_drvdata(dev, ts);
drivers/input/touchscreen/tsc200x-core.c
543
error = input_register_device(ts->idev);
drivers/input/touchscreen/tsc200x-core.c
559
struct tsc200x *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/tsc200x-core.c
561
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/tsc200x-core.c
563
if (!ts->suspended && ts->opened)
drivers/input/touchscreen/tsc200x-core.c
564
__tsc200x_disable(ts);
drivers/input/touchscreen/tsc200x-core.c
566
ts->suspended = true;
drivers/input/touchscreen/tsc200x-core.c
569
ts->wake_irq_enabled = enable_irq_wake(ts->irq) == 0;
drivers/input/touchscreen/tsc200x-core.c
576
struct tsc200x *ts = dev_get_drvdata(dev);
drivers/input/touchscreen/tsc200x-core.c
578
guard(mutex)(&ts->mutex);
drivers/input/touchscreen/tsc200x-core.c
580
if (ts->wake_irq_enabled) {
drivers/input/touchscreen/tsc200x-core.c
581
disable_irq_wake(ts->irq);
drivers/input/touchscreen/tsc200x-core.c
582
ts->wake_irq_enabled = false;
drivers/input/touchscreen/tsc200x-core.c
585
if (ts->suspended && ts->opened)
drivers/input/touchscreen/tsc200x-core.c
586
__tsc200x_enable(ts);
drivers/input/touchscreen/tsc200x-core.c
588
ts->suspended = false;
drivers/input/touchscreen/zet6223.c
100
regulator_bulk_disable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/zet6223.c
103
static int zet6223_power_on(struct zet6223_ts *ts)
drivers/input/touchscreen/zet6223.c
105
struct device *dev = &ts->client->dev;
drivers/input/touchscreen/zet6223.c
108
ts->supplies[0].supply = "vio";
drivers/input/touchscreen/zet6223.c
109
ts->supplies[1].supply = "vcc";
drivers/input/touchscreen/zet6223.c
111
error = devm_regulator_bulk_get(dev, ARRAY_SIZE(ts->supplies),
drivers/input/touchscreen/zet6223.c
112
ts->supplies);
drivers/input/touchscreen/zet6223.c
116
error = regulator_bulk_enable(ARRAY_SIZE(ts->supplies), ts->supplies);
drivers/input/touchscreen/zet6223.c
122
error = devm_add_action_or_reset(dev, zet6223_power_off, ts);
drivers/input/touchscreen/zet6223.c
131
static int zet6223_query_device(struct zet6223_ts *ts)
drivers/input/touchscreen/zet6223.c
138
ret = i2c_master_send(ts->client, &cmd, sizeof(cmd));
drivers/input/touchscreen/zet6223.c
141
dev_err(&ts->client->dev,
drivers/input/touchscreen/zet6223.c
146
ret = i2c_master_recv(ts->client, buf, sizeof(buf));
drivers/input/touchscreen/zet6223.c
149
dev_err(&ts->client->dev,
drivers/input/touchscreen/zet6223.c
154
ts->fingernum = buf[15] & 0x7F;
drivers/input/touchscreen/zet6223.c
155
if (ts->fingernum > ZET6223_MAX_FINGERS) {
drivers/input/touchscreen/zet6223.c
156
dev_warn(&ts->client->dev,
drivers/input/touchscreen/zet6223.c
158
ts->fingernum, ZET6223_MAX_FINGERS);
drivers/input/touchscreen/zet6223.c
159
ts->fingernum = ZET6223_MAX_FINGERS;
drivers/input/touchscreen/zet6223.c
162
ts->max_x = get_unaligned_le16(&buf[8]);
drivers/input/touchscreen/zet6223.c
163
ts->max_y = get_unaligned_le16(&buf[10]);
drivers/input/touchscreen/zet6223.c
171
struct zet6223_ts *ts;
drivers/input/touchscreen/zet6223.c
180
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/input/touchscreen/zet6223.c
181
if (!ts)
drivers/input/touchscreen/zet6223.c
184
ts->client = client;
drivers/input/touchscreen/zet6223.c
186
error = zet6223_power_on(ts);
drivers/input/touchscreen/zet6223.c
190
error = zet6223_query_device(ts);
drivers/input/touchscreen/zet6223.c
194
ts->input = input = devm_input_allocate_device(dev);
drivers/input/touchscreen/zet6223.c
198
input_set_drvdata(input, ts);
drivers/input/touchscreen/zet6223.c
205
input_set_abs_params(input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
drivers/input/touchscreen/zet6223.c
206
input_set_abs_params(input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
drivers/input/touchscreen/zet6223.c
208
touchscreen_parse_properties(input, true, &ts->prop);
drivers/input/touchscreen/zet6223.c
210
error = input_mt_init_slots(input, ts->fingernum,
drivers/input/touchscreen/zet6223.c
216
IRQF_ONESHOT, client->name, ts);
drivers/input/touchscreen/zet6223.c
37
struct zet6223_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/zet6223.c
39
enable_irq(ts->client->irq);
drivers/input/touchscreen/zet6223.c
46
struct zet6223_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/zet6223.c
48
disable_irq(ts->client->irq);
drivers/input/touchscreen/zet6223.c
53
struct zet6223_ts *ts = dev_id;
drivers/input/touchscreen/zet6223.c
60
u8 bufsize = 3 + 4 * ts->fingernum;
drivers/input/touchscreen/zet6223.c
66
ret = i2c_master_recv(ts->client, buf, bufsize);
drivers/input/touchscreen/zet6223.c
69
dev_err_ratelimited(&ts->client->dev,
drivers/input/touchscreen/zet6223.c
78
for (i = 0; i < ts->fingernum; i++) {
drivers/input/touchscreen/zet6223.c
82
input_mt_slot(ts->input, i);
drivers/input/touchscreen/zet6223.c
83
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
drivers/input/touchscreen/zet6223.c
84
input_event(ts->input, EV_ABS, ABS_MT_POSITION_X,
drivers/input/touchscreen/zet6223.c
86
input_event(ts->input, EV_ABS, ABS_MT_POSITION_Y,
drivers/input/touchscreen/zet6223.c
90
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/zet6223.c
91
input_sync(ts->input);
drivers/input/touchscreen/zet6223.c
98
struct zet6223_ts *ts = _ts;
drivers/input/touchscreen/zforce_ts.c
128
static int zforce_command(struct zforce_ts *ts, u8 cmd)
drivers/input/touchscreen/zforce_ts.c
130
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
149
static int zforce_send_wait(struct zforce_ts *ts, const char *buf, int len)
drivers/input/touchscreen/zforce_ts.c
151
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
157
ts->command_waiting = buf[2];
drivers/input/touchscreen/zforce_ts.c
167
if (wait_for_completion_timeout(&ts->command_done, WAIT_TIMEOUT) == 0)
drivers/input/touchscreen/zforce_ts.c
170
ret = ts->command_result;
drivers/input/touchscreen/zforce_ts.c
174
static int zforce_command_wait(struct zforce_ts *ts, u8 cmd)
drivers/input/touchscreen/zforce_ts.c
176
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
186
error = zforce_send_wait(ts, &buf[0], ARRAY_SIZE(buf));
drivers/input/touchscreen/zforce_ts.c
196
static int zforce_resolution(struct zforce_ts *ts, u16 x, u16 y)
drivers/input/touchscreen/zforce_ts.c
198
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
205
return zforce_send_wait(ts, &buf[0], ARRAY_SIZE(buf));
drivers/input/touchscreen/zforce_ts.c
208
static int zforce_scan_frequency(struct zforce_ts *ts, u16 idle, u16 finger,
drivers/input/touchscreen/zforce_ts.c
211
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
221
return zforce_send_wait(ts, &buf[0], ARRAY_SIZE(buf));
drivers/input/touchscreen/zforce_ts.c
224
static int zforce_setconfig(struct zforce_ts *ts, char b1)
drivers/input/touchscreen/zforce_ts.c
226
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
232
return zforce_send_wait(ts, &buf[0], ARRAY_SIZE(buf));
drivers/input/touchscreen/zforce_ts.c
235
static int zforce_start(struct zforce_ts *ts)
drivers/input/touchscreen/zforce_ts.c
237
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
242
error = zforce_command_wait(ts, COMMAND_INITIALIZE);
drivers/input/touchscreen/zforce_ts.c
248
error = zforce_resolution(ts, ts->prop.max_x, ts->prop.max_y);
drivers/input/touchscreen/zforce_ts.c
254
error = zforce_scan_frequency(ts, 10, 50, 50);
drivers/input/touchscreen/zforce_ts.c
261
error = zforce_setconfig(ts, SETCONFIG_DUALTOUCH);
drivers/input/touchscreen/zforce_ts.c
268
error = zforce_command(ts, COMMAND_DATAREQUEST);
drivers/input/touchscreen/zforce_ts.c
283
zforce_command_wait(ts, COMMAND_DEACTIVATE);
drivers/input/touchscreen/zforce_ts.c
287
static int zforce_stop(struct zforce_ts *ts)
drivers/input/touchscreen/zforce_ts.c
289
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
295
error = zforce_command_wait(ts, COMMAND_DEACTIVATE);
drivers/input/touchscreen/zforce_ts.c
305
static int zforce_touch_event(struct zforce_ts *ts, u8 *payload)
drivers/input/touchscreen/zforce_ts.c
307
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
326
if (point.coord_x > ts->prop.max_x ||
drivers/input/touchscreen/zforce_ts.c
327
point.coord_y > ts->prop.max_y) {
drivers/input/touchscreen/zforce_ts.c
353
input_mt_slot(ts->input, point.id - 1);
drivers/input/touchscreen/zforce_ts.c
355
if (input_mt_report_slot_state(ts->input, MT_TOOL_FINGER,
drivers/input/touchscreen/zforce_ts.c
357
touchscreen_report_pos(ts->input, &ts->prop,
drivers/input/touchscreen/zforce_ts.c
360
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR,
drivers/input/touchscreen/zforce_ts.c
362
input_report_abs(ts->input, ABS_MT_TOUCH_MINOR,
drivers/input/touchscreen/zforce_ts.c
364
input_report_abs(ts->input, ABS_MT_ORIENTATION,
drivers/input/touchscreen/zforce_ts.c
370
input_mt_sync_frame(ts->input);
drivers/input/touchscreen/zforce_ts.c
372
input_mt_report_finger_count(ts->input, num);
drivers/input/touchscreen/zforce_ts.c
374
input_sync(ts->input);
drivers/input/touchscreen/zforce_ts.c
379
static int zforce_read_packet(struct zforce_ts *ts, u8 *buf)
drivers/input/touchscreen/zforce_ts.c
381
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
415
static void zforce_complete(struct zforce_ts *ts, int cmd, int result)
drivers/input/touchscreen/zforce_ts.c
417
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
419
if (ts->command_waiting == cmd) {
drivers/input/touchscreen/zforce_ts.c
421
ts->command_result = result;
drivers/input/touchscreen/zforce_ts.c
422
complete(&ts->command_done);
drivers/input/touchscreen/zforce_ts.c
430
struct zforce_ts *ts = dev_id;
drivers/input/touchscreen/zforce_ts.c
431
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
433
if (ts->suspended && device_may_wakeup(&client->dev))
drivers/input/touchscreen/zforce_ts.c
441
struct zforce_ts *ts = dev_id;
drivers/input/touchscreen/zforce_ts.c
442
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
452
if (ts->suspended) {
drivers/input/touchscreen/zforce_ts.c
460
suspending = READ_ONCE(ts->suspending);
drivers/input/touchscreen/zforce_ts.c
474
error = zforce_read_packet(ts, payload_buffer);
drivers/input/touchscreen/zforce_ts.c
491
zforce_touch_event(ts, &payload[RESPONSE_DATA]);
drivers/input/touchscreen/zforce_ts.c
495
ts->boot_complete = payload[RESPONSE_DATA];
drivers/input/touchscreen/zforce_ts.c
496
zforce_complete(ts, payload[RESPONSE_ID], 0);
drivers/input/touchscreen/zforce_ts.c
504
zforce_complete(ts, payload[RESPONSE_ID],
drivers/input/touchscreen/zforce_ts.c
513
ts->version_major =
drivers/input/touchscreen/zforce_ts.c
515
ts->version_minor =
drivers/input/touchscreen/zforce_ts.c
517
ts->version_build =
drivers/input/touchscreen/zforce_ts.c
519
ts->version_rev =
drivers/input/touchscreen/zforce_ts.c
522
dev_dbg(&ts->client->dev,
drivers/input/touchscreen/zforce_ts.c
524
ts->version_major, ts->version_minor,
drivers/input/touchscreen/zforce_ts.c
525
ts->version_build, ts->version_rev);
drivers/input/touchscreen/zforce_ts.c
527
zforce_complete(ts, payload[RESPONSE_ID], 0);
drivers/input/touchscreen/zforce_ts.c
531
dev_err(&ts->client->dev, "invalid command: 0x%x\n",
drivers/input/touchscreen/zforce_ts.c
536
dev_err(&ts->client->dev,
drivers/input/touchscreen/zforce_ts.c
541
} while (gpiod_get_value_cansleep(ts->gpio_int));
drivers/input/touchscreen/zforce_ts.c
553
struct zforce_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/zforce_ts.c
555
return zforce_start(ts);
drivers/input/touchscreen/zforce_ts.c
560
struct zforce_ts *ts = input_get_drvdata(dev);
drivers/input/touchscreen/zforce_ts.c
561
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
564
error = zforce_stop(ts);
drivers/input/touchscreen/zforce_ts.c
569
static int __zforce_suspend(struct zforce_ts *ts)
drivers/input/touchscreen/zforce_ts.c
571
struct i2c_client *client = ts->client;
drivers/input/touchscreen/zforce_ts.c
572
struct input_dev *input = ts->input;
drivers/input/touchscreen/zforce_ts.c
586
error = zforce_start(ts);
drivers/input/touchscreen/zforce_ts.c
596
error = zforce_stop(ts);
drivers/input/touchscreen/zforce_ts.c
603
ts->suspended = true;
drivers/input/touchscreen/zforce_ts.c
610
struct zforce_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/zforce_ts.c
613
WRITE_ONCE(ts->suspending, true);
drivers/input/touchscreen/zforce_ts.c
616
ret = __zforce_suspend(ts);
drivers/input/touchscreen/zforce_ts.c
619
WRITE_ONCE(ts->suspending, false);
drivers/input/touchscreen/zforce_ts.c
627
struct zforce_ts *ts = i2c_get_clientdata(client);
drivers/input/touchscreen/zforce_ts.c
628
struct input_dev *input = ts->input;
drivers/input/touchscreen/zforce_ts.c
633
ts->suspended = false;
drivers/input/touchscreen/zforce_ts.c
642
error = zforce_stop(ts);
drivers/input/touchscreen/zforce_ts.c
651
error = zforce_start(ts);
drivers/input/touchscreen/zforce_ts.c
663
struct zforce_ts *ts = data;
drivers/input/touchscreen/zforce_ts.c
665
gpiod_set_value_cansleep(ts->gpio_rst, 1);
drivers/input/touchscreen/zforce_ts.c
669
static void zforce_ts_parse_legacy_properties(struct zforce_ts *ts)
drivers/input/touchscreen/zforce_ts.c
674
device_property_read_u32(&ts->client->dev, "x-size", &x_max);
drivers/input/touchscreen/zforce_ts.c
675
input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, x_max, 0, 0);
drivers/input/touchscreen/zforce_ts.c
677
device_property_read_u32(&ts->client->dev, "y-size", &y_max);
drivers/input/touchscreen/zforce_ts.c
678
input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, y_max, 0, 0);
drivers/input/touchscreen/zforce_ts.c
683
struct zforce_ts *ts;
drivers/input/touchscreen/zforce_ts.c
687
ts = devm_kzalloc(&client->dev, sizeof(struct zforce_ts), GFP_KERNEL);
drivers/input/touchscreen/zforce_ts.c
688
if (!ts)
drivers/input/touchscreen/zforce_ts.c
691
ts->gpio_rst = devm_gpiod_get_optional(&client->dev, "reset",
drivers/input/touchscreen/zforce_ts.c
693
error = PTR_ERR_OR_ZERO(ts->gpio_rst);
drivers/input/touchscreen/zforce_ts.c
698
if (ts->gpio_rst) {
drivers/input/touchscreen/zforce_ts.c
699
ts->gpio_int = devm_gpiod_get_optional(&client->dev, "irq",
drivers/input/touchscreen/zforce_ts.c
701
error = PTR_ERR_OR_ZERO(ts->gpio_int);
drivers/input/touchscreen/zforce_ts.c
712
ts->gpio_int = devm_gpiod_get_index(&client->dev, NULL, 0,
drivers/input/touchscreen/zforce_ts.c
715
error = PTR_ERR_OR_ZERO(ts->gpio_int);
drivers/input/touchscreen/zforce_ts.c
721
ts->gpio_rst = devm_gpiod_get_index(&client->dev, NULL, 1,
drivers/input/touchscreen/zforce_ts.c
723
error = PTR_ERR_OR_ZERO(ts->gpio_rst);
drivers/input/touchscreen/zforce_ts.c
740
error = devm_add_action_or_reset(&client->dev, zforce_reset, ts);
drivers/input/touchscreen/zforce_ts.c
745
snprintf(ts->phys, sizeof(ts->phys),
drivers/input/touchscreen/zforce_ts.c
752
ts->client = client;
drivers/input/touchscreen/zforce_ts.c
753
ts->input = input_dev;
drivers/input/touchscreen/zforce_ts.c
756
input_dev->phys = ts->phys;
drivers/input/touchscreen/zforce_ts.c
762
zforce_ts_parse_legacy_properties(ts);
drivers/input/touchscreen/zforce_ts.c
763
touchscreen_parse_properties(input_dev, true, &ts->prop);
drivers/input/touchscreen/zforce_ts.c
764
if (ts->prop.max_x == 0 || ts->prop.max_y == 0)
drivers/input/touchscreen/zforce_ts.c
778
input_set_drvdata(ts->input, ts);
drivers/input/touchscreen/zforce_ts.c
780
init_completion(&ts->command_done);
drivers/input/touchscreen/zforce_ts.c
791
IRQF_ONESHOT, input_dev->name, ts);
drivers/input/touchscreen/zforce_ts.c
796
i2c_set_clientdata(client, ts);
drivers/input/touchscreen/zforce_ts.c
799
gpiod_set_value_cansleep(ts->gpio_rst, 0);
drivers/input/touchscreen/zforce_ts.c
801
ts->command_waiting = NOTIFICATION_BOOTCOMPLETE;
drivers/input/touchscreen/zforce_ts.c
802
if (wait_for_completion_timeout(&ts->command_done, WAIT_TIMEOUT) == 0)
drivers/input/touchscreen/zforce_ts.c
806
error = zforce_command_wait(ts, COMMAND_INITIALIZE);
drivers/input/touchscreen/zforce_ts.c
811
error = zforce_command_wait(ts, COMMAND_STATUS);
drivers/input/touchscreen/zforce_ts.c
814
zforce_stop(ts);
drivers/input/touchscreen/zforce_ts.c
819
error = zforce_stop(ts);
drivers/md/dm-integrity.c
1449
unsigned int i, ts;
drivers/md/dm-integrity.c
1451
ts = total_size;
drivers/md/dm-integrity.c
1453
for (i = 0; i < to_copy; i++, ts--) {
drivers/md/dm-integrity.c
1465
return ts;
drivers/media/cec/core/cec-adap.c
107
entry->ev.ts = ts;
drivers/media/cec/core/cec-adap.c
1114
struct cec_msg *msg, ktime_t ts)
drivers/media/cec/core/cec-adap.c
1146
msg->rx_ts = ktime_to_ns(ts);
drivers/media/cec/core/cec-adap.c
141
u64 ts = ktime_get_ns();
drivers/media/cec/core/cec-adap.c
146
cec_queue_event_fh(fh, ev, ts);
drivers/media/cec/core/cec-adap.c
152
bool dropped_events, ktime_t ts)
drivers/media/cec/core/cec-adap.c
164
cec_queue_event_fh(fh, &ev, ktime_to_ns(ts));
drivers/media/cec/core/cec-adap.c
171
void cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts)
drivers/media/cec/core/cec-adap.c
181
cec_queue_event_fh(fh, &ev, ktime_to_ns(ts));
drivers/media/cec/core/cec-adap.c
187
void cec_queue_pin_5v_event(struct cec_adapter *adap, bool is_high, ktime_t ts)
drivers/media/cec/core/cec-adap.c
197
cec_queue_event_fh(fh, &ev, ktime_to_ns(ts));
drivers/media/cec/core/cec-adap.c
597
u8 error_cnt, ktime_t ts)
drivers/media/cec/core/cec-adap.c
631
msg->tx_ts = ktime_to_ns(ts);
drivers/media/cec/core/cec-adap.c
725
u8 status, ktime_t ts)
drivers/media/cec/core/cec-adap.c
729
cec_transmit_done_ts(adap, status, 0, 0, 0, 0, ts);
drivers/media/cec/core/cec-adap.c
732
cec_transmit_done_ts(adap, status, 1, 0, 0, 0, ts);
drivers/media/cec/core/cec-adap.c
735
cec_transmit_done_ts(adap, status, 0, 1, 0, 0, ts);
drivers/media/cec/core/cec-adap.c
738
cec_transmit_done_ts(adap, status, 0, 0, 1, 0, ts);
drivers/media/cec/core/cec-adap.c
741
cec_transmit_done_ts(adap, status, 0, 0, 0, 1, ts);
drivers/media/cec/core/cec-adap.c
80
const struct cec_event *new_ev, u64 ts)
drivers/media/cec/core/cec-adap.c
91
if (ts == 0)
drivers/media/cec/core/cec-adap.c
92
ts = ktime_get_ns();
drivers/media/cec/core/cec-api.c
312
u64 ts = ~0ULL;
drivers/media/cec/core/cec-api.c
333
if (entry && entry->ev.ts <= ts) {
drivers/media/cec/core/cec-api.c
336
ts = ev->ev.ts;
drivers/media/cec/core/cec-pin-priv.h
184
ktime_t ts;
drivers/media/cec/core/cec-pin.c
1049
pin->timer_ts = ktime_add_us(ts, usecs);
drivers/media/cec/core/cec-pin.c
1054
pin->timer_ts = ktime_add_us(ts, 100);
drivers/media/cec/core/cec-pin.c
360
pin->ts = ns_to_ktime(0);
drivers/media/cec/core/cec-pin.c
398
static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts)
drivers/media/cec/core/cec-pin.c
443
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
470
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
484
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
502
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
513
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
606
pin->work_tx_ts = ts;
drivers/media/cec/core/cec-pin.c
615
pin->ts = ktime_sub_us(ts, CEC_TIM_DATA_BIT_SAMPLE);
drivers/media/cec/core/cec-pin.c
680
static void cec_pin_rx_states(struct cec_pin *pin, ktime_t ts)
drivers/media/cec/core/cec-pin.c
696
delta = ktime_us_delta(ts, pin->ts);
drivers/media/cec/core/cec-pin.c
700
pin->rx_start_bit_low_too_short_ts = ktime_to_ns(pin->ts);
drivers/media/cec/core/cec-pin.c
711
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
717
delta = ktime_us_delta(ts, pin->ts);
drivers/media/cec/core/cec-pin.c
732
pin->rx_start_bit_too_short_ts = ktime_to_ns(pin->ts);
drivers/media/cec/core/cec-pin.c
746
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
775
delta = ktime_us_delta(ts, pin->ts);
drivers/media/cec/core/cec-pin.c
802
pin->rx_data_bit_too_short_ts = ktime_to_ns(pin->ts);
drivers/media/cec/core/cec-pin.c
810
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
847
pin->work_rx_msg.rx_ts = ktime_to_ns(ts);
drivers/media/cec/core/cec-pin.c
849
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
874
ktime_t ts;
drivers/media/cec/core/cec-pin.c
878
ts = ktime_get();
drivers/media/cec/core/cec-pin.c
880
delta = ktime_us_delta(ts, pin->timer_ts);
drivers/media/cec/core/cec-pin.c
902
pin->timer_ts = ktime_add_us(ts, 100);
drivers/media/cec/core/cec-pin.c
908
pin->timer_ts = ktime_add_us(ts, pin->wait_usecs);
drivers/media/cec/core/cec-pin.c
913
pin->timer_ts = ktime_add_us(ts, pin->wait_usecs);
drivers/media/cec/core/cec-pin.c
945
cec_pin_tx_states(pin, ts);
drivers/media/cec/core/cec-pin.c
958
cec_pin_rx_states(pin, ts);
drivers/media/cec/core/cec-pin.c
965
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
980
if (ktime_to_ns(pin->ts) == 0)
drivers/media/cec/core/cec-pin.c
981
pin->ts = ts;
drivers/media/cec/core/cec-pin.c
987
delta = ktime_us_delta(ts, pin->ts);
drivers/media/cec/core/cec-priv.h
55
const struct cec_event *new_ev, u64 ts);
drivers/media/dvb-core/dmxdev.c
493
list_for_each_entry(feed, &dmxdevfilter->feed.ts, next)
drivers/media/dvb-core/dmxdev.c
494
feed->ts->stop_filtering(feed->ts);
drivers/media/dvb-core/dmxdev.c
514
list_for_each_entry(feed, &filter->feed.ts, next) {
drivers/media/dvb-core/dmxdev.c
515
ret = feed->ts->start_filtering(feed->ts);
drivers/media/dvb-core/dmxdev.c
574
list_for_each_entry(feed, &dmxdevfilter->feed.ts, next) {
drivers/media/dvb-core/dmxdev.c
575
demux->release_ts_feed(demux, feed->ts);
drivers/media/dvb-core/dmxdev.c
576
feed->ts = NULL;
drivers/media/dvb-core/dmxdev.c
594
list_for_each_entry_safe(feed, tmp, &dmxdevfilter->feed.ts, next) {
drivers/media/dvb-core/dmxdev.c
599
BUG_ON(!list_empty(&dmxdevfilter->feed.ts));
drivers/media/dvb-core/dmxdev.c
627
feed->ts = NULL;
drivers/media/dvb-core/dmxdev.c
644
ret = dmxdev->demux->allocate_ts_feed(dmxdev->demux, &feed->ts,
drivers/media/dvb-core/dmxdev.c
649
tsfeed = feed->ts;
drivers/media/dvb-core/dmxdev.c
768
list_for_each_entry(feed, &filter->feed.ts, next) {
drivers/media/dvb-core/dmxdev.c
894
(!list_empty(&filter->feed.ts)))
drivers/media/dvb-core/dmxdev.c
902
list_add(&feed->next, &filter->feed.ts);
drivers/media/dvb-core/dmxdev.c
919
list_for_each_entry_safe(feed, tmp, &filter->feed.ts, next) {
drivers/media/dvb-core/dmxdev.c
920
if ((feed->pid == pid) && (feed->ts != NULL)) {
drivers/media/dvb-core/dmxdev.c
921
feed->ts->stop_filtering(feed->ts);
drivers/media/dvb-core/dmxdev.c
923
feed->ts);
drivers/media/dvb-core/dmxdev.c
968
INIT_LIST_HEAD(&dmxdevfilter->feed.ts);
drivers/media/dvb-core/dvb_demux.c
130
return feed->cb.ts(&buf[p], count, NULL, 0, &feed->feed.ts,
drivers/media/dvb-core/dvb_demux.c
373
if (!feed->feed.ts.is_filtering)
drivers/media/dvb-core/dvb_demux.c
379
feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts,
drivers/media/dvb-core/dvb_demux.c
402
((f)->feed.ts.is_filtering) && \
drivers/media/dvb-core/dvb_demux.c
489
feed->cb.ts(buf, 188, NULL, 0, &feed->feed.ts,
drivers/media/dvb-core/dvb_demux.c
609
demux->feed->cb.ts(buf, count, NULL, 0, &demux->feed->feed.ts,
drivers/media/dvb-core/dvb_demux.c
808
feed->cb.ts = callback;
drivers/media/dvb-core/dvb_demux.c
814
(*ts_feed) = &feed->feed.ts;
drivers/media/dvb-core/dvb_net.c
314
const u8 *ts, *ts_end, *from_where;
drivers/media/dvb-core/dvb_net.c
326
memcpy(ule_where, h->ts, TS_SZ);
drivers/media/dvb-core/dvb_net.c
338
if ((h->ts[0] != TS_SYNC) || (h->ts[1] & TS_TEI) ||
drivers/media/dvb-core/dvb_net.c
339
((h->ts[3] & TS_SC) != 0)) {
drivers/media/dvb-core/dvb_net.c
341
h->priv->ts_count, h->ts[0],
drivers/media/dvb-core/dvb_net.c
342
(h->ts[1] & TS_TEI) >> 7,
drivers/media/dvb-core/dvb_net.c
343
(h->ts[3] & TS_SC) >> 6);
drivers/media/dvb-core/dvb_net.c
356
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
362
h->from_where = h->ts + 4;
drivers/media/dvb-core/dvb_net.c
369
if (h->ts[1] & TS_PUSI) {
drivers/media/dvb-core/dvb_net.c
372
h->priv->tscc = h->ts[3] & 0x0F;
drivers/media/dvb-core/dvb_net.c
374
if (h->ts[4] > h->ts_remain) {
drivers/media/dvb-core/dvb_net.c
376
h->priv->ts_count, h->ts[4]);
drivers/media/dvb-core/dvb_net.c
377
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
382
h->from_where = &h->ts[5] + h->ts[4];
drivers/media/dvb-core/dvb_net.c
383
h->ts_remain -= 1 + h->ts[4];
drivers/media/dvb-core/dvb_net.c
387
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
398
if ((h->ts[3] & 0x0F) == h->priv->tscc)
drivers/media/dvb-core/dvb_net.c
403
h->priv->ts_count, h->ts[3] & 0x0F,
drivers/media/dvb-core/dvb_net.c
424
if (h->ts[1] & TS_PUSI) {
drivers/media/dvb-core/dvb_net.c
474
h->ts[4], h->ts_remain);
drivers/media/dvb-core/dvb_net.c
482
h->from_where += h->ts[4];
drivers/media/dvb-core/dvb_net.c
483
h->ts_remain -= h->ts[4];
drivers/media/dvb-core/dvb_net.c
504
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
528
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
556
h->ts += TS_SZ;
drivers/media/dvb-core/dvb_net.c
772
.ts = NULL,
drivers/media/dvb-core/dvb_net.c
785
for (h.ts = h.buf, h.ts_end = h.buf + h.buf_len;
drivers/media/dvb-core/dvb_net.c
786
h.ts < h.ts_end; /* no incr. */) {
drivers/media/dvb-core/dvb_net.c
866
h.ts += TS_SZ;
drivers/media/dvb-frontends/dib9000.c
648
u32 ts = data[1] << 16 | data[0];
drivers/media/dvb-frontends/dib9000.c
658
ts / 10000, ts % 10000, *b ? b : "<empty>");
drivers/media/pci/bt8xx/bttv-driver.c
2728
u64 ts = ktime_get_ns();
drivers/media/pci/bt8xx/bttv-driver.c
2735
wakeup->top->vbuf.vb2_buf.timestamp = ts;
drivers/media/pci/bt8xx/bttv-driver.c
2746
wakeup->top->vbuf.vb2_buf.timestamp = ts;
drivers/media/pci/bt8xx/bttv-driver.c
2756
wakeup->bottom->vbuf.vb2_buf.timestamp = ts;
drivers/media/pci/intel/ipu6/ipu6-isys.c
1212
u64 ts;
drivers/media/pci/intel/ipu6/ipu6-isys.c
1221
ts = (u64)resp->timestamp[1] << 32 | resp->timestamp[0];
drivers/media/pci/intel/ipu6/ipu6-isys.c
1227
fw_msg[index].valid_ts ? ts : 0, resp->pin_id);
drivers/media/pci/intel/ipu6/ipu6-isys.c
1301
stream->seq[stream->seq_index].timestamp = ts;
drivers/media/pci/intel/ipu6/ipu6-isys.c
1305
stream->seq[stream->seq_index].sequence, ts);
drivers/media/pci/intel/ipu6/ipu6-isys.c
1314
stream->seq[stream->seq_index].sequence, ts);
drivers/media/pci/mgb4/mgb4_trigger.c
94
aligned_s64 ts;
drivers/media/pci/saa7134/saa7134-dvb.c
1237
dev->ts.nr_bufs = 32;
drivers/media/pci/saa7134/saa7134-dvb.c
1238
dev->ts.nr_packets = 32*4;
drivers/media/pci/saa7134/saa7134-empress.c
110
f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
drivers/media/pci/saa7134/saa7134-empress.c
129
f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
drivers/media/pci/saa7134/saa7134-empress.c
152
f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
drivers/media/pci/saa7134/saa7134-ts.c
112
int size = TS_PACKET_SIZE * dev->ts.nr_packets;
drivers/media/pci/saa7134/saa7134-ts.c
115
*nbuffers = dev->ts.nr_bufs;
drivers/media/pci/saa7134/saa7134-ts.c
191
saa_writeb(SAA7134_TS_DMA0, ((dev->ts.nr_packets-1)&0xff));
drivers/media/pci/saa7134/saa7134-ts.c
192
saa_writeb(SAA7134_TS_DMA1, (((dev->ts.nr_packets-1)>>8)&0xff));
drivers/media/pci/saa7134/saa7134-ts.c
195
((((dev->ts.nr_packets-1)>>16)&0x3f) | 0x00));
drivers/media/pci/saa7134/saa7134-ts.c
211
dev->ts.nr_bufs = tsbufs;
drivers/media/pci/saa7134/saa7134-ts.c
212
dev->ts.nr_packets = ts_nr_packets;
drivers/media/pci/saa7134/saa7134-ts.c
258
saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff);
drivers/media/pci/saa7134/saa7134-ts.c
260
((dev->ts.nr_packets - 1) >> 8) & 0xff);
drivers/media/pci/saa7134/saa7134-ts.c
263
(((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00);
drivers/media/pci/saa7134/saa7134-ts.c
92
lines = dev->ts.nr_packets;
drivers/media/pci/saa7134/saa7134.h
603
struct saa7134_ts ts;
drivers/media/pci/solo6x10/solo6x10-core.c
41
struct timespec64 ts;
drivers/media/pci/solo6x10/solo6x10-core.c
43
ktime_get_ts64(&ts);
drivers/media/pci/solo6x10/solo6x10-core.c
46
solo_reg_write(solo_dev, SOLO_TIMER_SEC, (u32)ts.tv_sec);
drivers/media/pci/solo6x10/solo6x10-core.c
47
solo_reg_write(solo_dev, SOLO_TIMER_USEC, (u32)ts.tv_nsec / NSEC_PER_USEC);
drivers/media/pci/solo6x10/solo6x10-core.c
53
struct timespec64 ts;
drivers/media/pci/solo6x10/solo6x10-core.c
67
ktime_get_ts64(&ts);
drivers/media/pci/solo6x10/solo6x10-core.c
69
diff = (s32)ts.tv_sec - (s32)sec;
drivers/media/pci/solo6x10/solo6x10-core.c
71
+ ((s32)(ts.tv_nsec / NSEC_PER_USEC) - (s32)usec);
drivers/media/platform/amphion/vpu_malone.c
809
struct timespec64 ts = ns_to_timespec64(info->timestamp);
drivers/media/platform/amphion/vpu_malone.c
813
pkt->data[0] = ts.tv_sec;
drivers/media/platform/amphion/vpu_malone.c
814
pkt->data[1] = ts.tv_nsec;
drivers/media/platform/amphion/vpu_malone.c
978
struct timespec64 ts = { pkt->data[9], pkt->data[10] };
drivers/media/platform/amphion/vpu_malone.c
988
info->timestamp = timespec64_to_ns(&ts);
drivers/media/platform/amphion/vpu_windsor.c
695
struct timespec64 ts = ns_to_timespec64(timestamp);
drivers/media/platform/amphion/vpu_windsor.c
698
pkt->data[0] = ts.tv_sec;
drivers/media/platform/amphion/vpu_windsor.c
699
pkt->data[1] = ts.tv_nsec;
drivers/media/platform/amphion/vpu_windsor.c
714
struct timespec64 ts = { windsor->tv_s, windsor->tv_ns };
drivers/media/platform/amphion/vpu_windsor.c
737
info->timestamp = timespec64_to_ns(&ts);
drivers/media/platform/broadcom/bcm2835-unicam.c
721
u64 ts;
drivers/media/platform/broadcom/bcm2835-unicam.c
796
ts = ktime_get_ns();
drivers/media/platform/broadcom/bcm2835-unicam.c
804
node->cur_frm->vb.vb2_buf.timestamp = ts;
drivers/media/platform/qcom/camss/camss-vfe-17x.c
515
u64 ts = ktime_get_ns();
drivers/media/platform/qcom/camss/camss-vfe-17x.c
533
ready_buf->vb.vb2_buf.timestamp = ts;
drivers/media/platform/qcom/camss/camss-vfe-gen1.c
616
u64 ts = ktime_get_ns();
drivers/media/platform/qcom/camss/camss-vfe-gen1.c
645
ready_buf->vb.vb2_buf.timestamp = ts;
drivers/media/platform/qcom/camss/camss-vfe.c
458
u64 ts = ktime_get_ns();
drivers/media/platform/qcom/camss/camss-vfe.c
476
ready_buf->vb.vb2_buf.timestamp = ts;
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
613
u64 ts = ktime_get_ns();
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
617
buf[i]->vb.vb2_buf.timestamp = ts;
drivers/media/platform/raspberrypi/rp1-cfe/cfe-trace.h
83
__field(u64, ts)
drivers/media/platform/raspberrypi/rp1-cfe/cfe-trace.h
89
__entry->ts = buf->vb2_buf.timestamp;
drivers/media/platform/raspberrypi/rp1-cfe/cfe-trace.h
92
__entry->buf_idx, __entry->seq, __entry->ts)
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
267
u64 ts;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
651
node->ts = ktime_get_ns();
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
660
node->ts = cfe->node[i].ts;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
673
node->cur_frm->vb.vb2_buf.timestamp = node->ts;
drivers/media/platform/ti/omap/omap_vout.c
440
unsigned int irqstatus, u64 ts)
drivers/media/platform/ti/omap/omap_vout.c
464
vout->cur_frm->vbuf.vb2_buf.timestamp = ts;
drivers/media/platform/ti/omap/omap_vout.c
485
u64 ts;
drivers/media/platform/ti/omap/omap_vout.c
502
ts = ktime_get_ns();
drivers/media/platform/ti/omap/omap_vout.c
520
ts);
drivers/media/platform/ti/omap/omap_vout.c
533
vout->cur_frm->vbuf.vb2_buf.timestamp = ts;
drivers/media/platform/ti/omap3isp/ispstat.c
236
ktime_get_ts64(&stat->active_buf->ts);
drivers/media/platform/ti/omap3isp/ispstat.c
497
data->ts.tv_sec = buf->ts.tv_sec;
drivers/media/platform/ti/omap3isp/ispstat.c
498
data->ts.tv_usec = buf->ts.tv_nsec / NSEC_PER_USEC;
drivers/media/platform/ti/omap3isp/ispstat.c
520
data->ts.tv_sec = data64.ts.tv_sec;
drivers/media/platform/ti/omap3isp/ispstat.c
521
data->ts.tv_usec = data64.ts.tv_usec;
drivers/media/platform/ti/omap3isp/ispstat.h
39
struct timespec64 ts;
drivers/media/platform/verisilicon/hantro.h
469
dma_addr_t hantro_get_ref(struct hantro_ctx *ctx, u64 ts);
drivers/media/platform/verisilicon/hantro_drv.c
47
dma_addr_t hantro_get_ref(struct hantro_ctx *ctx, u64 ts)
drivers/media/platform/verisilicon/hantro_drv.c
52
buf = vb2_find_buffer(q, ts);
drivers/media/test-drivers/vidtv/vidtv_psi.c
1923
struct timespec64 ts;
drivers/media/test-drivers/vidtv/vidtv_psi.c
1934
ts = ktime_to_timespec64(ktime_get_real());
drivers/media/test-drivers/vidtv/vidtv_psi.c
1935
time64_to_tm(ts.tv_sec, 0, &time);
drivers/media/test-drivers/visl/visl-dec.c
46
u64 ts, struct vb2_buffer *vb2_buf)
drivers/media/test-drivers/visl/visl-dec.c
52
ts, vb2_buf->index);
drivers/media/test-drivers/visl/visl-dec.c
54
len = scnprintf(*buf, *buflen, "%s: %lld\n", name, ts);
drivers/media/usb/em28xx/em28xx-cards.c
3741
if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-cards.c
3766
if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-cards.c
4214
dev->ts = PRIMARY_TS;
drivers/media/usb/em28xx/em28xx-cards.c
4311
dev->dev_next->ts = SECONDARY_TS;
drivers/media/usb/em28xx/em28xx-core.c
694
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
700
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
705
if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-core.c
745
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
751
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
757
if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-core.c
788
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
794
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
drivers/media/usb/em28xx/em28xx-core.c
800
if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-core.c
823
else if (dev->ts == PRIMARY_TS)
drivers/media/usb/em28xx/em28xx-dvb.c
1422
addr = (dev->ts == PRIMARY_TS) ? 0x64 : 0x67;
drivers/media/usb/em28xx/em28xx-dvb.c
1437
addr = (dev->ts == PRIMARY_TS) ? 0x60 : 0x63;
drivers/media/usb/em28xx/em28xx-dvb.c
1462
addr = (dev->ts == PRIMARY_TS) ? 0x59 : 0x0e;
drivers/media/usb/em28xx/em28xx-dvb.c
1477
addr = (dev->ts == PRIMARY_TS) ? 0x60 : 0x62;
drivers/media/usb/em28xx/em28xx-dvb.c
1497
mxl692_config.id = (dev->ts == PRIMARY_TS) ? 0 : 1;
drivers/media/usb/em28xx/em28xx-dvb.c
1499
addr = (dev->ts == PRIMARY_TS) ? 0x60 : 0x63;
drivers/media/usb/em28xx/em28xx.h
796
int ts;
drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
846
dvbdmxfeed->cb.ts(data, len, 0, 0, &dvbdmxfeed->feed.ts, 0);
drivers/media/usb/ttusb-dec/ttusb_dec.c
419
dec->audio_filter->feed->cb.ts(data, 188, NULL, 0,
drivers/media/usb/ttusb-dec/ttusb_dec.c
420
&dec->audio_filter->feed->feed.ts, NULL);
drivers/media/usb/ttusb-dec/ttusb_dec.c
429
dec->video_filter->feed->cb.ts(data, 188, NULL, 0,
drivers/media/usb/ttusb-dec/ttusb_dec.c
430
&dec->video_filter->feed->feed.ts, NULL);
drivers/media/usb/ttusb-dec/ttusb_dec.c
481
dec->video_filter->feed->cb.ts(pva, length, NULL, 0,
drivers/media/usb/ttusb-dec/ttusb_dec.c
482
&dec->video_filter->feed->feed.ts, NULL);
drivers/media/usb/ttusb-dec/ttusb_dec.c
542
dec->audio_filter->feed->cb.ts(pva, length, NULL, 0,
drivers/media/usb/ttusb-dec/ttusb_dec.c
543
&dec->audio_filter->feed->feed.ts, NULL);
drivers/media/v4l2-core/v4l2-event.c
103
const struct v4l2_event *ev, u64 ts)
drivers/media/v4l2-core/v4l2-event.c
143
kev->ts = ts;
drivers/media/v4l2-core/v4l2-event.c
157
u64 ts;
drivers/media/v4l2-core/v4l2-event.c
162
ts = ktime_get_ns();
drivers/media/v4l2-core/v4l2-event.c
167
__v4l2_event_queue_fh(fh, ev, ts);
drivers/media/v4l2-core/v4l2-event.c
176
u64 ts = ktime_get_ns();
drivers/media/v4l2-core/v4l2-event.c
179
__v4l2_event_queue_fh(fh, ev, ts);
drivers/media/v4l2-core/v4l2-event.c
30
struct timespec64 ts;
drivers/media/v4l2-core/v4l2-event.c
48
ts = ns_to_timespec64(kev->ts);
drivers/media/v4l2-core/v4l2-event.c
49
event->timestamp.tv_sec = ts.tv_sec;
drivers/media/v4l2-core/v4l2-event.c
50
event->timestamp.tv_nsec = ts.tv_nsec;
drivers/memory/samsung/exynos5422-dmc.c
845
u64 diff_ts, ts;
drivers/memory/samsung/exynos5422-dmc.c
847
ts = ktime_get_ns();
drivers/memory/samsung/exynos5422-dmc.c
856
diff_ts = ts - dmc->last_overflow_ts[0];
drivers/memory/samsung/exynos5422-dmc.c
857
dmc->last_overflow_ts[0] = ts;
drivers/memory/samsung/exynos5422-dmc.c
861
diff_ts = ts - dmc->last_overflow_ts[1];
drivers/memory/samsung/exynos5422-dmc.c
862
dmc->last_overflow_ts[1] = ts;
drivers/memory/samsung/exynos5422-dmc.c
879
u64 ts;
drivers/memory/samsung/exynos5422-dmc.c
889
ts = ktime_get_ns();
drivers/memory/samsung/exynos5422-dmc.c
890
dmc->last_overflow_ts[0] = ts;
drivers/memory/samsung/exynos5422-dmc.c
891
dmc->last_overflow_ts[1] = ts;
drivers/mfd/ipaq-micro.c
126
if (micro->ts)
drivers/mfd/ipaq-micro.c
127
micro->ts(micro->ts_data, len, data);
drivers/mfd/ucb1x00-ts.c
101
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
106
return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync);
drivers/mfd/ucb1x00-ts.c
116
static inline unsigned int ucb1x00_ts_read_xpos(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
119
ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
drivers/mfd/ucb1x00-ts.c
121
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
124
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
128
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
134
return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPY, ts->adcsync);
drivers/mfd/ucb1x00-ts.c
143
static inline unsigned int ucb1x00_ts_read_ypos(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
146
ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
drivers/mfd/ucb1x00-ts.c
148
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
151
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
156
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
162
return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_TSPX, ts->adcsync);
drivers/mfd/ucb1x00-ts.c
169
static inline unsigned int ucb1x00_ts_read_xres(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
171
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
174
return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
drivers/mfd/ucb1x00-ts.c
181
static inline unsigned int ucb1x00_ts_read_yres(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
183
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
186
return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
drivers/mfd/ucb1x00-ts.c
189
static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
191
unsigned int val = ucb1x00_reg_read(ts->ucb, UCB_TS_CR);
drivers/mfd/ucb1x00-ts.c
206
struct ucb1x00_ts *ts = _ts;
drivers/mfd/ucb1x00-ts.c
212
add_wait_queue(&ts->irq_wait, &wait);
drivers/mfd/ucb1x00-ts.c
220
ucb1x00_adc_enable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
222
x = ucb1x00_ts_read_xpos(ts);
drivers/mfd/ucb1x00-ts.c
223
y = ucb1x00_ts_read_ypos(ts);
drivers/mfd/ucb1x00-ts.c
224
p = ucb1x00_ts_read_pressure(ts);
drivers/mfd/ucb1x00-ts.c
229
ucb1x00_ts_mode_int(ts);
drivers/mfd/ucb1x00-ts.c
230
ucb1x00_adc_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
234
ucb1x00_enable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
237
if (ucb1x00_ts_pen_down(ts)) {
drivers/mfd/ucb1x00-ts.c
240
spin_lock_irq(&ts->irq_lock);
drivers/mfd/ucb1x00-ts.c
241
if (ts->irq_disabled) {
drivers/mfd/ucb1x00-ts.c
242
ts->irq_disabled = 0;
drivers/mfd/ucb1x00-ts.c
243
enable_irq(ts->ucb->irq_base + UCB_IRQ_TSPX);
drivers/mfd/ucb1x00-ts.c
245
spin_unlock_irq(&ts->irq_lock);
drivers/mfd/ucb1x00-ts.c
246
ucb1x00_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
253
ucb1x00_ts_event_release(ts);
drivers/mfd/ucb1x00-ts.c
259
ucb1x00_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
267
ucb1x00_ts_evt_add(ts, p, x, y);
drivers/mfd/ucb1x00-ts.c
278
remove_wait_queue(&ts->irq_wait, &wait);
drivers/mfd/ucb1x00-ts.c
280
ts->rtask = NULL;
drivers/mfd/ucb1x00-ts.c
290
struct ucb1x00_ts *ts = id;
drivers/mfd/ucb1x00-ts.c
292
spin_lock(&ts->irq_lock);
drivers/mfd/ucb1x00-ts.c
293
ts->irq_disabled = 1;
drivers/mfd/ucb1x00-ts.c
294
disable_irq_nosync(ts->ucb->irq_base + UCB_IRQ_TSPX);
drivers/mfd/ucb1x00-ts.c
295
spin_unlock(&ts->irq_lock);
drivers/mfd/ucb1x00-ts.c
296
wake_up(&ts->irq_wait);
drivers/mfd/ucb1x00-ts.c
303
struct ucb1x00_ts *ts = input_get_drvdata(idev);
drivers/mfd/ucb1x00-ts.c
307
BUG_ON(ts->rtask);
drivers/mfd/ucb1x00-ts.c
314
ts->irq_disabled = 0;
drivers/mfd/ucb1x00-ts.c
316
init_waitqueue_head(&ts->irq_wait);
drivers/mfd/ucb1x00-ts.c
317
ret = request_irq(ts->ucb->irq_base + UCB_IRQ_TSPX, ucb1x00_ts_irq,
drivers/mfd/ucb1x00-ts.c
318
flags, "ucb1x00-ts", ts);
drivers/mfd/ucb1x00-ts.c
326
ucb1x00_adc_enable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
327
ts->x_res = ucb1x00_ts_read_xres(ts);
drivers/mfd/ucb1x00-ts.c
328
ts->y_res = ucb1x00_ts_read_yres(ts);
drivers/mfd/ucb1x00-ts.c
329
ucb1x00_adc_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
331
ts->rtask = kthread_run(ucb1x00_thread, ts, "ktsd");
drivers/mfd/ucb1x00-ts.c
332
if (!IS_ERR(ts->rtask)) {
drivers/mfd/ucb1x00-ts.c
335
free_irq(ts->ucb->irq_base + UCB_IRQ_TSPX, ts);
drivers/mfd/ucb1x00-ts.c
336
ts->rtask = NULL;
drivers/mfd/ucb1x00-ts.c
349
struct ucb1x00_ts *ts = input_get_drvdata(idev);
drivers/mfd/ucb1x00-ts.c
351
if (ts->rtask)
drivers/mfd/ucb1x00-ts.c
352
kthread_stop(ts->rtask);
drivers/mfd/ucb1x00-ts.c
354
ucb1x00_enable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
355
free_irq(ts->ucb->irq_base + UCB_IRQ_TSPX, ts);
drivers/mfd/ucb1x00-ts.c
356
ucb1x00_reg_write(ts->ucb, UCB_TS_CR, 0);
drivers/mfd/ucb1x00-ts.c
357
ucb1x00_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
366
struct ucb1x00_ts *ts;
drivers/mfd/ucb1x00-ts.c
370
ts = kzalloc_obj(struct ucb1x00_ts);
drivers/mfd/ucb1x00-ts.c
372
if (!ts || !idev) {
drivers/mfd/ucb1x00-ts.c
377
ts->ucb = dev->ucb;
drivers/mfd/ucb1x00-ts.c
378
ts->idev = idev;
drivers/mfd/ucb1x00-ts.c
379
ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
drivers/mfd/ucb1x00-ts.c
380
spin_lock_init(&ts->irq_lock);
drivers/mfd/ucb1x00-ts.c
383
idev->id.product = ts->ucb->id;
drivers/mfd/ucb1x00-ts.c
386
idev->dev.parent = &ts->ucb->dev;
drivers/mfd/ucb1x00-ts.c
391
input_set_drvdata(idev, ts);
drivers/mfd/ucb1x00-ts.c
393
ucb1x00_adc_enable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
394
ts->x_res = ucb1x00_ts_read_xres(ts);
drivers/mfd/ucb1x00-ts.c
395
ts->y_res = ucb1x00_ts_read_yres(ts);
drivers/mfd/ucb1x00-ts.c
396
ucb1x00_adc_disable(ts->ucb);
drivers/mfd/ucb1x00-ts.c
398
input_set_abs_params(idev, ABS_X, 0, ts->x_res, 0, 0);
drivers/mfd/ucb1x00-ts.c
399
input_set_abs_params(idev, ABS_Y, 0, ts->y_res, 0, 0);
drivers/mfd/ucb1x00-ts.c
406
dev->priv = ts;
drivers/mfd/ucb1x00-ts.c
412
kfree(ts);
drivers/mfd/ucb1x00-ts.c
418
struct ucb1x00_ts *ts = dev->priv;
drivers/mfd/ucb1x00-ts.c
420
input_unregister_device(ts->idev);
drivers/mfd/ucb1x00-ts.c
421
kfree(ts);
drivers/mfd/ucb1x00-ts.c
54
static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
drivers/mfd/ucb1x00-ts.c
56
struct input_dev *idev = ts->idev;
drivers/mfd/ucb1x00-ts.c
65
static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
67
struct input_dev *idev = ts->idev;
drivers/mfd/ucb1x00-ts.c
77
static inline void ucb1x00_ts_mode_int(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
79
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
89
static inline unsigned int ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts)
drivers/mfd/ucb1x00-ts.c
92
ucb1x00_io_write(ts->ucb, COLLIE_TC35143_GPIO_TBL_CHK, 0);
drivers/mfd/ucb1x00-ts.c
93
ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
drivers/mfd/ucb1x00-ts.c
99
return ucb1x00_adc_read(ts->ucb, UCB_ADC_INP_AD2, ts->adcsync);
drivers/misc/kgdbts.c
1123
if (ts.run_test)
drivers/misc/kgdbts.c
1124
val = ts.run_test(1, 0);
drivers/misc/kgdbts.c
1131
if (ts.run_test)
drivers/misc/kgdbts.c
1132
ts.run_test(0, chr);
drivers/misc/kgdbts.c
180
static struct test_state ts;
drivers/misc/kgdbts.c
370
ts.idx -= 2;
drivers/misc/kgdbts.c
375
ts.idx -= 4;
drivers/misc/kgdbts.c
404
ts.idx++;
drivers/misc/kgdbts.c
409
ts.idx -= go_back;
drivers/misc/kgdbts.c
411
fill_get_buf(ts.tst[ts.idx].get);
drivers/misc/kgdbts.c
435
ts.idx--;
drivers/misc/kgdbts.c
445
ts.idx = -1;
drivers/misc/kgdbts.c
533
ts.idx--;
drivers/misc/kgdbts.c
719
v2printk("get%i: %s\n", ts.idx, get_buf);
drivers/misc/kgdbts.c
726
if (ts.tst[ts.idx].put_handler)
drivers/misc/kgdbts.c
727
return ts.tst[ts.idx].put_handler(put_str,
drivers/misc/kgdbts.c
728
ts.tst[ts.idx].put);
drivers/misc/kgdbts.c
730
chk_str = ts.tst[ts.idx].put;
drivers/misc/kgdbts.c
767
if (ts.tst[ts.idx].get_handler)
drivers/misc/kgdbts.c
768
ts.tst[ts.idx].get_handler(ts.tst[ts.idx].get);
drivers/misc/kgdbts.c
770
fill_get_buf(ts.tst[ts.idx].get);
drivers/misc/kgdbts.c
775
ts.name, ts.idx);
drivers/misc/kgdbts.c
787
if (ts.tst[ts.idx].get[0] == '\0' && ts.tst[ts.idx].put[0] == '\0' &&
drivers/misc/kgdbts.c
788
!ts.tst[ts.idx].get_handler) {
drivers/misc/kgdbts.c
790
" '%s' line %i\n", ts.name, ts.idx);
drivers/misc/kgdbts.c
796
" '%s' line %i\n", ts.name, ts.idx);
drivers/misc/kgdbts.c
811
" '%s' line %i\n", ts.name, ts.idx);
drivers/misc/kgdbts.c
816
v2printk("put%i: %s\n", ts.idx, put_buf);
drivers/misc/kgdbts.c
818
if (ts.validate_put && ts.validate_put(put_buf)) {
drivers/misc/kgdbts.c
821
ts.name, ts.idx, ts.tst[ts.idx].put, put_buf);
drivers/misc/kgdbts.c
823
ts.idx++;
drivers/misc/kgdbts.c
833
memset(&ts, 0, sizeof(ts));
drivers/misc/kgdbts.c
834
ts.run_test = run_simple_test;
drivers/misc/kgdbts.c
835
ts.validate_put = validate_simple_test;
drivers/misc/kgdbts.c
846
ts.tst = plant_and_detach_test;
drivers/misc/kgdbts.c
847
ts.name = "plant_and_detach_test";
drivers/misc/kgdbts.c
868
ts.tst = hw_breakpoint_test;
drivers/misc/kgdbts.c
869
ts.name = "hw_breakpoint_test";
drivers/misc/kgdbts.c
871
ts.tst = sw_breakpoint_test;
drivers/misc/kgdbts.c
872
ts.name = "sw_breakpoint_test";
drivers/misc/kgdbts.c
883
eprintk("kgdbts: ERROR %s test failed\n", ts.name);
drivers/misc/kgdbts.c
893
ts.tst = hw_write_break_test;
drivers/misc/kgdbts.c
894
ts.name = "hw_write_break_test";
drivers/misc/kgdbts.c
896
ts.tst = hw_access_break_test;
drivers/misc/kgdbts.c
897
ts.name = "hw_access_break_test";
drivers/misc/kgdbts.c
905
ts.name);
drivers/misc/kgdbts.c
915
eprintk("kgdbts: ERROR %s test failed\n", ts.name);
drivers/misc/kgdbts.c
924
ts.tst = nmi_sleep_test;
drivers/misc/kgdbts.c
925
ts.name = "nmi_sleep_test";
drivers/misc/kgdbts.c
938
eprintk("kgdbts: ERROR %s test failed\n", ts.name);
drivers/misc/kgdbts.c
944
ts.tst = bad_read_test;
drivers/misc/kgdbts.c
945
ts.name = "bad_read_test";
drivers/misc/kgdbts.c
953
ts.tst = do_kernel_clone_test;
drivers/misc/kgdbts.c
954
ts.name = "do_kernel_clone_test";
drivers/misc/kgdbts.c
962
ts.tst = sys_open_test;
drivers/misc/kgdbts.c
963
ts.name = "sys_open_test";
drivers/misc/kgdbts.c
971
ts.tst = singlestep_break_test;
drivers/misc/kgdbts.c
972
ts.name = "singlestep_breakpoint_test";
drivers/misc/mei/platform-vsc.c
61
struct mei_vsc_host_timestamp ts = {
drivers/misc/mei/platform-vsc.c
66
return vsc_tp_xfer(hw->tp, VSC_TP_CMD_READ, &ts, sizeof(ts),
drivers/misc/sgi-gru/gruprocfs.c
164
struct gru_thread_state *ts;
drivers/misc/sgi-gru/gruprocfs.c
171
ts = gru->gs_gts[i];
drivers/misc/sgi-gru/gruprocfs.c
172
if (!ts)
drivers/misc/sgi-gru/gruprocfs.c
176
is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid,
drivers/misc/sgi-gru/gruprocfs.c
177
is_kernel_context(ts) ? 0 : ts->ts_tgid_owner,
drivers/misc/sgi-gru/gruprocfs.c
178
ts->ts_cbr_au_count * GRU_CBR_AU_SIZE,
drivers/misc/sgi-gru/gruprocfs.c
179
ts->ts_cbr_au_count * GRU_DSR_AU_BYTES,
drivers/misc/sgi-gru/gruprocfs.c
180
mode[ts->ts_user_options &
drivers/mmc/core/mmc_test.c
101
struct timespec64 ts;
drivers/mmc/core/mmc_test.c
1906
struct timespec64 ts1, ts2, ts;
drivers/mmc/core/mmc_test.c
1918
ts = timespec64_sub(ts2, ts1);
drivers/mmc/core/mmc_test.c
1919
if (ts.tv_sec >= secs)
drivers/mmc/core/mmc_test.c
3063
tr->count, tr->sectors, &tr->ts, tr->rate,
drivers/mmc/core/mmc_test.c
509
static unsigned int mmc_test_rate(uint64_t bytes, struct timespec64 *ts)
drivers/mmc/core/mmc_test.c
513
ns = timespec64_to_ns(ts);
drivers/mmc/core/mmc_test.c
533
unsigned int count, unsigned int sectors, struct timespec64 ts,
drivers/mmc/core/mmc_test.c
547
tr->ts = ts;
drivers/mmc/core/mmc_test.c
561
struct timespec64 ts;
drivers/mmc/core/mmc_test.c
563
ts = timespec64_sub(*ts2, *ts1);
drivers/mmc/core/mmc_test.c
565
rate = mmc_test_rate(bytes, &ts);
drivers/mmc/core/mmc_test.c
566
iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */
drivers/mmc/core/mmc_test.c
571
(sectors & 1 ? ".5" : ""), (u64)ts.tv_sec,
drivers/mmc/core/mmc_test.c
572
(u32)ts.tv_nsec, rate / 1000, rate / 1024,
drivers/mmc/core/mmc_test.c
575
mmc_test_save_transfer_result(test, 1, sectors, ts, rate, iops);
drivers/mmc/core/mmc_test.c
587
struct timespec64 ts;
drivers/mmc/core/mmc_test.c
589
ts = timespec64_sub(*ts2, *ts1);
drivers/mmc/core/mmc_test.c
591
rate = mmc_test_rate(tot, &ts);
drivers/mmc/core/mmc_test.c
592
iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */
drivers/mmc/core/mmc_test.c
596
sectors >> 1, (sectors & 1 ? ".5" : ""), &ts,
drivers/mmc/core/mmc_test.c
600
mmc_test_save_transfer_result(test, count, sectors, ts, rate, iops);
drivers/mmc/host/vub300.c
1204
u16 ts = 0;
drivers/mmc/host/vub300.c
1267
ts += *data++;
drivers/mmc/host/vub300.c
1269
ts <<= 8;
drivers/mmc/host/vub300.c
1270
ts += *data++;
drivers/mmc/host/vub300.c
1272
if (ts < size) {
drivers/mmc/host/vub300.c
1273
u16 xfer_length = roundup_to_multiple_of_64(ts);
drivers/mmc/host/vub300.c
1277
memcpy(xfer_buffer, data, ts);
drivers/mmc/host/vub300.c
1278
memset(xfer_buffer + ts, 0,
drivers/mmc/host/vub300.c
1279
xfer_length - ts);
drivers/mmc/host/vub300.c
1280
size -= ts;
drivers/mmc/host/vub300.c
1281
data += ts;
drivers/net/can/esd/esdacc.c
100
static ktime_t acc_ts2ktime(struct acc_ov *ov, u64 ts)
drivers/net/can/esd/esdacc.c
104
ns = (ts * ACC_TS_FACTOR) + (ts >> ACC_TS_80MHZ_SHIFT);
drivers/net/can/esd/esdacc.c
425
acc_ts2ktime(priv->ov, msg->ts);
drivers/net/can/esd/esdacc.c
460
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
drivers/net/can/esd/esdacc.c
519
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
drivers/net/can/esd/esdacc.c
576
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
drivers/net/can/esd/esdacc.c
629
skb_hwtstamps(skb)->hwtstamp = acc_ts2ktime(priv->ov, msg->ts);
drivers/net/can/esd/esdacc.h
144
u64 ts;
drivers/net/can/esd/esdacc.h
154
u64 ts;
drivers/net/can/esd/esdacc.h
165
u64 ts;
drivers/net/can/esd/esdacc.h
176
u64 ts;
drivers/net/can/esd/esdacc.h
188
u64 ts;
drivers/net/can/esd/esdacc.h
199
u64 ts;
drivers/net/can/rockchip/rockchip_canfd-rx.c
123
rkcanfd_handle_tx_done_one(priv, ts, &frame_len);
drivers/net/can/rockchip/rockchip_canfd-rx.c
198
header->frameinfo == header->ts;
drivers/net/can/rockchip/rockchip_canfd-rx.c
243
err = rkcanfd_rxstx_filter(priv, cfd, header->ts, &tx_done);
drivers/net/can/rockchip/rockchip_canfd-rx.c
270
rkcanfd_skb_set_timestamp(priv, skb, header->ts);
drivers/net/can/rockchip/rockchip_canfd-rx.c
272
err = can_rx_offload_queue_timestamp(&priv->offload, skb, header->ts);
drivers/net/can/rockchip/rockchip_canfd-rx.c
95
const struct canfd_frame *cfd_rx, const u32 ts,
drivers/net/can/rockchip/rockchip_canfd-tx.c
143
void rkcanfd_handle_tx_done_one(struct rkcanfd_priv *priv, const u32 ts,
drivers/net/can/rockchip/rockchip_canfd-tx.c
161
rkcanfd_skb_set_timestamp(priv, skb, ts);
drivers/net/can/rockchip/rockchip_canfd-tx.c
164
tx_tail, ts,
drivers/net/can/rockchip/rockchip_canfd.h
447
u32 ts;
drivers/net/can/rockchip/rockchip_canfd.h
550
void rkcanfd_handle_tx_done_one(struct rkcanfd_priv *priv, const u32 ts,
drivers/net/can/spi/mcp251xfd/mcp251xfd-rx.c
184
timestamp = timecounter_cyc2time(&priv->tc, hw_rx_obj->ts);
drivers/net/can/spi/mcp251xfd/mcp251xfd-rx.c
204
err = can_rx_offload_queue_timestamp(&priv->offload, skb, hw_rx_obj->ts);
drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
105
mcp251xfd_skb_set_timestamp_raw(priv, skb, hw_tef_obj->ts);
drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
108
tef_tail, hw_tef_obj->ts,
drivers/net/can/spi/mcp251xfd/mcp251xfd.h
446
u32 ts;
drivers/net/can/spi/mcp251xfd/mcp251xfd.h
473
u32 ts;
drivers/net/can/spi/mcp251xfd/mcp251xfd.h
480
u32 ts;
drivers/net/can/usb/esd_usb.c
137
__le32 ts;
drivers/net/can/usb/esd_usb.c
145
__le32 ts;
drivers/net/can/usb/esd_usb.c
178
__le32 ts;
drivers/net/can/usb/gs_usb.c
546
const u32 ts = gs_usb_set_timestamp(dev, skb, hf);
drivers/net/can/usb/gs_usb.c
548
rc = can_rx_offload_queue_timestamp(offload, skb, ts);
drivers/net/can/usb/gs_usb.c
566
const u32 ts = gs_usb_set_timestamp(dev, skb, hf);
drivers/net/can/usb/gs_usb.c
569
ts, NULL);
drivers/net/can/usb/peak_usb/pcan_usb_core.c
155
void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *time)
drivers/net/can/usb/peak_usb/pcan_usb_core.c
185
if (ts < time_ref->ts_dev_1)
drivers/net/can/usb/peak_usb/pcan_usb_core.c
197
} else if (time_ref->ts_dev_1 < ts) {
drivers/net/can/usb/peak_usb/pcan_usb_core.c
202
delta_ts += (signed int)(ts - time_ref->ts_dev_2);
drivers/net/can/usb/peak_usb/pcan_usb_core.h
144
void peak_usb_get_ts_time(struct peak_time_ref *time_ref, u32 ts, ktime_t *tv);
drivers/net/can/usb/peak_usb/pcan_usb_fd.c
715
struct pcan_ufd_ts_msg *ts = (struct pcan_ufd_ts_msg *)rx_msg;
drivers/net/can/usb/peak_usb/pcan_usb_fd.c
721
peak_usb_set_ts_now(&usb_if->time_ref, le32_to_cpu(ts->ts_low));
drivers/net/can/usb/peak_usb/pcan_usb_pro.c
697
struct pcan_usb_pro_rxts *ts)
drivers/net/can/usb/peak_usb/pcan_usb_pro.c
704
le32_to_cpu(ts->ts64[1]));
drivers/net/can/usb/peak_usb/pcan_usb_pro.h
177
struct pcan_usb_pro_setts ts;
drivers/net/dsa/hirschmann/hellcreek.c
1638
struct timespec64 ts = ktime_to_timespec64(start_time);
drivers/net/dsa/hirschmann/hellcreek.c
1641
hellcreek_write(hellcreek, ts.tv_nsec & 0x0000ffff, TR_ESTWRL);
drivers/net/dsa/hirschmann/hellcreek.c
1642
hellcreek_write(hellcreek, (ts.tv_nsec & 0xffff0000) >> 16, TR_ESTWRH);
drivers/net/dsa/hirschmann/hellcreek.c
1646
((ts.tv_sec & TR_ESTCMD_ESTSEC_MASK) <<
drivers/net/dsa/hirschmann/hellcreek_ptp.c
105
const struct timespec64 *ts)
drivers/net/dsa/hirschmann/hellcreek_ptp.c
110
secl = ts->tv_sec & 0xffff;
drivers/net/dsa/hirschmann/hellcreek_ptp.c
111
nsh = ((u32)ts->tv_nsec & 0xffff0000) >> 16;
drivers/net/dsa/hirschmann/hellcreek_ptp.c
112
nsl = ts->tv_nsec & 0xffff;
drivers/net/dsa/hirschmann/hellcreek_ptp.c
117
hellcreek->seconds = ts->tv_sec;
drivers/net/dsa/hirschmann/hellcreek_ptp.c
118
hellcreek->last_ts = ts->tv_nsec;
drivers/net/dsa/hirschmann/hellcreek_ptp.c
89
struct timespec64 *ts,
drivers/net/dsa/hirschmann/hellcreek_ptp.c
99
*ts = ns_to_timespec64(ns);
drivers/net/dsa/microchip/ksz_ptp.c
100
if ((ts->tv_sec & 0xffffffff) != ts->tv_sec)
drivers/net/dsa/microchip/ksz_ptp.c
103
ret = ksz_write32(dev, REG_TRIG_TARGET_NANOSEC, ts->tv_nsec);
drivers/net/dsa/microchip/ksz_ptp.c
107
ret = ksz_write32(dev, REG_TRIG_TARGET_SEC, ts->tv_sec);
drivers/net/dsa/microchip/ksz_ptp.c
294
int ksz_get_ts_info(struct dsa_switch *ds, int port, struct kernel_ethtool_ts_info *ts)
drivers/net/dsa/microchip/ksz_ptp.c
304
ts->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
drivers/net/dsa/microchip/ksz_ptp.c
308
ts->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ONESTEP_P2P);
drivers/net/dsa/microchip/ksz_ptp.c
311
ts->tx_types |= BIT(HWTSTAMP_TX_ON);
drivers/net/dsa/microchip/ksz_ptp.c
313
ts->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
drivers/net/dsa/microchip/ksz_ptp.c
318
ts->phc_index = ptp_clock_index(ptp_data->clock);
drivers/net/dsa/microchip/ksz_ptp.c
432
struct timespec64 ts;
drivers/net/dsa/microchip/ksz_ptp.c
435
ts = ktime_to_timespec64(tstamp);
drivers/net/dsa/microchip/ksz_ptp.c
442
ts.tv_sec = (ptp_clock_time.tv_sec & ~3) | ts.tv_sec;
drivers/net/dsa/microchip/ksz_ptp.c
445
diff = timespec64_sub(ts, ptp_clock_time);
drivers/net/dsa/microchip/ksz_ptp.c
447
ts.tv_sec -= 4;
drivers/net/dsa/microchip/ksz_ptp.c
449
ts.tv_sec += 4;
drivers/net/dsa/microchip/ksz_ptp.c
451
return timespec64_to_ktime(ts);
drivers/net/dsa/microchip/ksz_ptp.c
588
static int _ksz_ptp_gettime(struct ksz_device *dev, struct timespec64 *ts)
drivers/net/dsa/microchip/ksz_ptp.c
613
ts->tv_sec = seconds;
drivers/net/dsa/microchip/ksz_ptp.c
614
ts->tv_nsec = nanoseconds + phase * 8;
drivers/net/dsa/microchip/ksz_ptp.c
619
static int ksz_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/dsa/microchip/ksz_ptp.c
626
ret = _ksz_ptp_gettime(dev, ts);
drivers/net/dsa/microchip/ksz_ptp.c
678
const struct timespec64 *ts)
drivers/net/dsa/microchip/ksz_ptp.c
692
ret = ksz_write32(dev, regs[PTP_RTC_NANOSEC], ts->tv_nsec);
drivers/net/dsa/microchip/ksz_ptp.c
696
ret = ksz_write32(dev, regs[PTP_RTC_SEC], ts->tv_sec);
drivers/net/dsa/microchip/ksz_ptp.c
717
ptp_data->clock_time = *ts;
drivers/net/dsa/microchip/ksz_ptp.c
870
struct timespec64 ts;
drivers/net/dsa/microchip/ksz_ptp.c
874
ret = _ksz_ptp_gettime(dev, &ts);
drivers/net/dsa/microchip/ksz_ptp.c
879
ptp_data->clock_time = ts;
drivers/net/dsa/microchip/ksz_ptp.c
95
struct timespec64 const *ts)
drivers/net/dsa/microchip/ksz_ptp.c
970
static int ksz_read_ts(struct ksz_port *port, u16 reg, u32 *ts)
drivers/net/dsa/microchip/ksz_ptp.c
972
return ksz_read32(port->ksz_dev, reg, ts);
drivers/net/dsa/microchip/ksz_ptp.h
41
struct kernel_ethtool_ts_info *ts);
drivers/net/dsa/mv88e6xxx/ptp.c
282
struct timespec64 *ts)
drivers/net/dsa/mv88e6xxx/ptp.c
291
*ts = ns_to_timespec64(ns);
drivers/net/dsa/mv88e6xxx/ptp.c
297
const struct timespec64 *ts)
drivers/net/dsa/mv88e6xxx/ptp.c
302
ns = timespec64_to_ns(ts);
drivers/net/dsa/mv88e6xxx/ptp.c
465
struct timespec64 ts;
drivers/net/dsa/mv88e6xxx/ptp.c
467
mv88e6xxx_ptp_gettime(&chip->ptp_clock_info, &ts);
drivers/net/dsa/ocelot/felix.c
1885
struct timespec64 ts;
drivers/net/dsa/ocelot/felix.c
1911
ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
drivers/net/dsa/ocelot/felix.c
1912
tstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/dsa/ocelot/felix_vsc9959.c
1390
struct timespec64 ts;
drivers/net/dsa/ocelot/felix_vsc9959.c
1394
ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
drivers/net/dsa/ocelot/felix_vsc9959.c
1395
current_time = timespec64_to_ktime(ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
251
static int sja1105_ptpegr_ts_poll(struct dsa_switch *ds, int port, u64 *ts)
drivers/net/dsa/sja1105/sja1105_ptp.c
288
*ts = 0;
drivers/net/dsa/sja1105/sja1105_ptp.c
290
sja1105_unpack(packed_buf, ts, tstamp_bit_start, tstamp_bit_end,
drivers/net/dsa/sja1105/sja1105_ptp.c
351
u64 ticks, ts;
drivers/net/dsa/sja1105/sja1105_ptp.c
363
ts = SJA1105_SKB_CB(skb)->tstamp;
drivers/net/dsa/sja1105/sja1105_ptp.c
364
ts = sja1105_tstamp_reconstruct(ds, ticks, ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
366
shwt->hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts));
drivers/net/dsa/sja1105/sja1105_ptp.c
398
u64 ts = SJA1105_SKB_CB(skb)->tstamp;
drivers/net/dsa/sja1105/sja1105_ptp.c
402
shwt->hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts));
drivers/net/dsa/sja1105/sja1105_ptp.c
539
struct timespec64 *ts,
drivers/net/dsa/sja1105/sja1105_ptp.c
550
*ts = ns_to_timespec64(now);
drivers/net/dsa/sja1105/sja1105_ptp.c
593
const struct timespec64 *ts)
drivers/net/dsa/sja1105/sja1105_ptp.c
597
u64 ns = timespec64_to_ns(ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
942
u64 ticks, ts;
drivers/net/dsa/sja1105/sja1105_ptp.c
949
rc = sja1105_ptpegr_ts_poll(ds, port, &ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
963
ts = sja1105_tstamp_reconstruct(ds, ticks, ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
965
shwt.hwtstamp = ns_to_ktime(sja1105_ticks_to_ns(ts));
drivers/net/dsa/sja1105/sja1105_ptp.h
104
struct kernel_ethtool_ts_info *ts);
drivers/net/ethernet/airoha/airoha_ppe.c
762
u32 ts = airoha_ppe_get_timestamp(ppe);
drivers/net/ethernet/airoha/airoha_ppe.c
771
e->ib1 |= FIELD_PREP(AIROHA_FOE_IB1_BIND_TIMESTAMP, ts);
drivers/net/ethernet/airoha/airoha_ppe.c
983
u32 ts, ts_mask, now = airoha_ppe_get_timestamp(ppe);
drivers/net/ethernet/airoha/airoha_ppe.c
987
ts = FIELD_GET(AIROHA_FOE_IB1_BIND_TIMESTAMP, ib1);
drivers/net/ethernet/airoha/airoha_ppe.c
990
ts = FIELD_GET(AIROHA_FOE_IB1_UNBIND_TIMESTAMP, ib1);
drivers/net/ethernet/airoha/airoha_ppe.c
994
idle = now - ts;
drivers/net/ethernet/alibaba/eea/eea_desc.h
12
#define EEA_DESC_TS(desc) (le64_to_cpu((desc)->ts) & EEA_DESC_TS_MASK)
drivers/net/ethernet/alibaba/eea/eea_desc.h
127
__le64 ts;
drivers/net/ethernet/alibaba/eea/eea_desc.h
83
__le64 ts;
drivers/net/ethernet/alibaba/eea/eea_net.c
718
u64 ts;
drivers/net/ethernet/alibaba/eea/eea_net.c
720
ts = eea_pci_device_ts(edev);
drivers/net/ethernet/alibaba/eea/eea_net.c
722
enet->hw_ts_offset = ktime_get_real() - ts;
drivers/net/ethernet/alibaba/eea/eea_tx.c
89
struct skb_shared_hwtstamps ts = {};
drivers/net/ethernet/alibaba/eea/eea_tx.c
91
ts.hwtstamp = EEA_DESC_TS(desc) + tx->enet->hw_ts_offset;
drivers/net/ethernet/alibaba/eea/eea_tx.c
92
skb_tstamp_tx(skb, &ts);
drivers/net/ethernet/amazon/ena/ena_phc.c
29
struct timespec64 *ts,
drivers/net/ethernet/amazon/ena/ena_phc.c
52
*ts = ns_to_timespec64(timestamp_nsec);
drivers/net/ethernet/amazon/ena/ena_phc.c
58
const struct timespec64 *ts)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
711
hw_feat->ts = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TSSEL);
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
824
hw_feat->ts ? "yes" : "no");
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
100
xgbe_set_tstamp_time(pdata, ts->tv_sec, ts->tv_nsec);
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
71
static int xgbe_gettimex(struct ptp_clock_info *info, struct timespec64 *ts,
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
86
*ts = ns_to_timespec64(nsec);
drivers/net/ethernet/amd/xgbe/xgbe-ptp.c
92
const struct timespec64 *ts)
drivers/net/ethernet/amd/xgbe/xgbe.h
944
unsigned int ts; /* IEEE 1588-2008 Advanced Timestamp */
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
339
int (*hw_set_sys_clock)(struct aq_hw_s *self, u64 time, u64 ts);
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
341
int (*hw_ts_to_sys_clock)(struct aq_hw_s *self, u64 ts, u64 *time);
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
353
int (*hw_get_sync_ts)(struct aq_hw_s *self, u64 *ts);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1378
struct timespec64 ts;
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1380
ktime_get_real_ts64(&ts);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1381
aq_ptp_settime(&aq_ptp->ptp_info, &ts);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1585
u64 ts = 0;
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1588
aq_nic->aq_hw_ops->hw_get_sync_ts(aq_nic->aq_hw, &ts);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
1590
return ts;
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
345
static int aq_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
356
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
369
const struct timespec64 *ts)
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
374
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
316
u64 ts = self->aq_nic->aq_hw_ops->hw_ring_tx_ptp_get_ts(self);
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
318
if (!ts) {
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
336
aq_ptp_tx_hwtstamp(self->aq_nic, ts);
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1300
static int hw_atl_b0_set_sys_clock(struct aq_hw_s *self, u64 time, u64 ts)
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1302
s64 delta = time - (self->ptp_clk_offset + ts);
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1307
static int hw_atl_b0_ts_to_sys_clock(struct aq_hw_s *self, u64 ts, u64 *time)
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1309
*time = self->ptp_clk_offset + ts;
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1362
static int hw_atl_b0_get_sync_ts(struct aq_hw_s *self, u64 *ts)
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1369
if (!ts)
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1381
*ts = (nsec_h << 16) + nsec_l + ((sec_h << 16) + sec_l) * NSEC_PER_SEC;
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1620
u32 ts;
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1638
ts = hw_atl_ts_data_get(self);
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1639
*temp = ts * ts * 16 / 100000 + 60 * ts - 83410;
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
957
return le64_to_cpu(txts->ts);
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
967
__le64 ts;
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
974
memcpy(&ts, ptr, sizeof(ts));
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
975
*timestamp = le64_to_cpu(ts);
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
293
u64 ts, u32 period, u32 hightime)
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
301
if (ts != 0) {
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
305
ts);
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.c
324
(!ts ? 0 : val));
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_llh.h
144
u64 ts, u32 period, u32 hightime);
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.h
13
__le64 ts;
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13745
static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13760
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13766
const struct timespec64 *ts)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
13777
ns = timespec64_to_ns(ts);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2062
u32 ts = le32_to_cpu(rxcmp1->rx_cmp_timestamp);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2066
if (!bp->ptp_all_rx_tstamp || !ts || !BNXT_ALL_RX_TS_VALID(flags))
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2070
*cmpl_ts = ts;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2375
u64 ns, ts;
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2377
if (!bnxt_get_rx_ts_p5(bp, &ts, cmpl_ts)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2380
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
147
static int bnxt_hwrm_port_ts_query(struct bnxt *bp, u32 flags, u64 *ts,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
176
*ts = le64_to_cpu(resp->ptp_msg_ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
182
struct timespec64 *ts,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
197
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
427
struct timespec64 ts;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
432
ts.tv_sec = rq->perout.start.sec;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
433
ts.tv_nsec = rq->perout.start.nsec;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
434
target_ns = timespec64_to_ns(&ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
60
const struct timespec64 *ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
64
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
698
u64 ts = 0, ns = 0;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
707
rc = bnxt_hwrm_port_ts_query(bp, PORT_TS_QUERY_REQ_FLAGS_PATH_TX, &ts,
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
711
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
824
int bnxt_get_rx_ts_p5(struct bnxt *bp, u64 *ts, u32 pkt_ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
831
*ts = bnxt_extend_cycles_32b_to_48b(ptp, pkt_ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
844
u64 ts, ns;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
848
ts = BNXT_GET_TX_TS_48B_NS(tscmp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
858
ns = bnxt_timecounter_cyc2time(ptp, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
171
int bnxt_get_rx_ts_p5(struct bnxt *bp, u64 *ts, u32 pkt_ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
178
static inline u64 bnxt_timecounter_cyc2time(struct bnxt_ptp_cfg *ptp, u64 ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
185
ns = timecounter_cyc2time(&ptp->tc, ts);
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
191
static inline u64 bnxt_extend_cycles_32b_to_48b(struct bnxt_ptp_cfg *ptp, u32 ts)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
196
cycles = (time & BNXT_HI_TIMER_MASK) | ts;
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h
197
if (ts < (time & BNXT_LO_TIMER_MASK))
drivers/net/ethernet/broadcom/tg3.c
6205
static int tg3_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/broadcom/tg3.c
6216
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/broadcom/tg3.c
6222
const struct timespec64 *ts)
drivers/net/ethernet/broadcom/tg3.c
6227
ns = timespec64_to_ns(ts);
drivers/net/ethernet/cadence/macb_ptp.c
224
struct timespec64 ts;
drivers/net/ethernet/cadence/macb_ptp.c
227
ts = ns_to_timespec64(ktime_to_ns(ktime_get_real()));
drivers/net/ethernet/cadence/macb_ptp.c
230
gem_tsu_set_time(&bp->ptp_clock_info, &ts);
drivers/net/ethernet/cadence/macb_ptp.c
249
u32 dma_desc_ts_2, struct timespec64 *ts)
drivers/net/ethernet/cadence/macb_ptp.c
253
ts->tv_sec = (GEM_BFEXT(DMA_SECH, dma_desc_ts_2) << GEM_DMA_SECL_SIZE) |
drivers/net/ethernet/cadence/macb_ptp.c
255
ts->tv_nsec = GEM_BFEXT(DMA_NSEC, dma_desc_ts_1);
drivers/net/ethernet/cadence/macb_ptp.c
263
ts->tv_sec |= ((~GEM_DMA_SEC_MASK) & tsu.tv_sec);
drivers/net/ethernet/cadence/macb_ptp.c
269
if ((ts->tv_sec & (GEM_DMA_SEC_TOP >> 1)) &&
drivers/net/ethernet/cadence/macb_ptp.c
271
ts->tv_sec -= GEM_DMA_SEC_TOP;
drivers/net/ethernet/cadence/macb_ptp.c
281
struct timespec64 ts;
drivers/net/ethernet/cadence/macb_ptp.c
291
gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts);
drivers/net/ethernet/cadence/macb_ptp.c
293
shhwtstamps->hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/cadence/macb_ptp.c
302
struct timespec64 ts;
drivers/net/ethernet/cadence/macb_ptp.c
320
gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts);
drivers/net/ethernet/cadence/macb_ptp.c
323
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/cadence/macb_ptp.c
43
static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/cadence/macb_ptp.c
65
ts->tv_nsec = gem_readl(bp, TN);
drivers/net/ethernet/cadence/macb_ptp.c
70
ts->tv_nsec = first;
drivers/net/ethernet/cadence/macb_ptp.c
74
ts->tv_sec = (((u64)sech << GEM_TSL_SIZE) | secl)
drivers/net/ethernet/cadence/macb_ptp.c
80
const struct timespec64 *ts)
drivers/net/ethernet/cadence/macb_ptp.c
86
secl = (u32)ts->tv_sec;
drivers/net/ethernet/cadence/macb_ptp.c
87
sech = (ts->tv_sec >> GEM_TSL_SIZE) & ((1 << GEM_TSH_SIZE) - 1);
drivers/net/ethernet/cadence/macb_ptp.c
88
ns = ts->tv_nsec;
drivers/net/ethernet/cavium/common/cavium_ptp.c
162
struct timespec64 *ts)
drivers/net/ethernet/cavium/common/cavium_ptp.c
173
*ts = ns_to_timespec64(nsec);
drivers/net/ethernet/cavium/common/cavium_ptp.c
184
const struct timespec64 *ts)
drivers/net/ethernet/cavium/common/cavium_ptp.c
191
nsec = timespec64_to_ns(ts);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1567
struct timespec64 *ts)
drivers/net/ethernet/cavium/liquidio/lio_main.c
1579
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/cavium/liquidio/lio_main.c
1590
const struct timespec64 *ts)
drivers/net/ethernet/cavium/liquidio/lio_main.c
1597
ns = timespec64_to_ns(ts);
drivers/net/ethernet/cavium/liquidio/lio_main.c
2202
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/cavium/liquidio/lio_main.c
2208
ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust);
drivers/net/ethernet/cavium/liquidio/lio_main.c
2209
skb_tstamp_tx(skb, &ts);
drivers/net/ethernet/cavium/liquidio/lio_main.c
610
struct timespec64 ts;
drivers/net/ethernet/cavium/liquidio/lio_main.c
624
ktime_get_real_ts64(&ts);
drivers/net/ethernet/cavium/liquidio/lio_main.c
625
lt->sec = ts.tv_sec;
drivers/net/ethernet/cavium/liquidio/lio_main.c
626
lt->nsec = ts.tv_nsec;
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
1318
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
1324
ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust);
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
1325
skb_tstamp_tx(skb, &ts);
drivers/net/ethernet/cavium/liquidio/octeon_console.c
812
struct timespec64 ts;
drivers/net/ethernet/cavium/liquidio/octeon_console.c
898
ktime_get_real_ts64(&ts);
drivers/net/ethernet/cavium/liquidio/octeon_console.c
901
(s64)ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
295
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
298
memset(&ts, 0, sizeof(ts));
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
304
ts.hwtstamp = ns_to_ktime(ns);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
305
skb_tstamp_tx(skb, &ts);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
412
struct skb_shared_hwtstamps *ts;
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
413
ts = skb_hwtstamps(skb);
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
414
ts->hwtstamp = ns_to_ktime(ns);
drivers/net/ethernet/cavium/thunder/nicvf_main.c
621
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/cavium/thunder/nicvf_main.c
642
memset(&ts, 0, sizeof(ts));
drivers/net/ethernet/cavium/thunder/nicvf_main.c
644
ts.hwtstamp = ns_to_ktime(ns);
drivers/net/ethernet/cavium/thunder/nicvf_main.c
645
skb_tstamp_tx(nic->ptp_skb, &ts);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
220
c.u.ts.sc = FW_PTP_SC_ADJ_FREQ;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
221
c.u.ts.sign = (ppb < 0) ? 1 : 0;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
224
c.u.ts.ppb = cpu_to_be32(ppb);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
252
c.u.ts.sc = FW_PTP_SC_ADJ_FTIME;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
253
c.u.ts.sign = (delta < 0) ? 1 : 0;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
256
c.u.ts.tm = cpu_to_be64(delta);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
291
c.u.ts.sc = FW_PTP_SC_ADJ_TIME;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
292
c.u.ts.sign = (delta < 0) ? 1 : 0;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
295
c.u.ts.tm = cpu_to_be64(delta);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
316
static int cxgb4_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
327
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
340
const struct timespec64 *ts)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
354
c.u.ts.sc = FW_PTP_SC_SET_TIME;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
356
ns = timespec64_to_ns(ts);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
357
c.u.ts.tm = cpu_to_be64(ns);
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
3375
} ts;
drivers/net/ethernet/engleder/tsnep_ptp.c
126
struct timespec64 *ts,
drivers/net/ethernet/engleder/tsnep_ptp.c
147
*ts = ns_to_timespec64(system_time);
drivers/net/ethernet/engleder/tsnep_ptp.c
153
const struct timespec64 *ts)
drivers/net/ethernet/engleder/tsnep_ptp.c
157
u64 system_time = timespec64_to_ns(ts);
drivers/net/ethernet/engleder/tsnep_ptp.c
175
struct timespec64 *ts,
drivers/net/ethernet/engleder/tsnep_ptp.c
196
*ts = ns_to_timespec64(counter);
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
1679
const struct qm_fd *fd, bool ts)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
1732
if (ts && priv->tx_tstamp &&
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
1229
__le64 *ts = dpaa2_get_ts(buffer_start, true);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
1234
ns = DPAA2_PTP_CLK_PERIOD_NS * le64_to_cpup(ts);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
552
__le64 *ts = dpaa2_get_ts(vaddr, false);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
557
ns = DPAA2_PTP_CLK_PERIOD_NS * le64_to_cpup(ts);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
805
struct timespec64 ts;
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
842
dpaa2_ptp->caps.gettime64(&dpaa2_ptp->caps, &ts);
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
844
*ns = cpu_to_le64(timespec64_to_ns(&ts) /
drivers/net/ethernet/freescale/fec.h
239
__fec32 ts;
drivers/net/ethernet/freescale/fec_main.c
1468
fec_enet_hwtstamp(struct fec_enet_private *fep, unsigned ts,
drivers/net/ethernet/freescale/fec_main.c
1475
ns = timecounter_cyc2time(&fep->tc, ts);
drivers/net/ethernet/freescale/fec_main.c
1617
fec_enet_hwtstamp(fep, fec32_to_cpu(ebdp->ts), &shhwtstamps);
drivers/net/ethernet/freescale/fec_main.c
1870
fec_enet_hwtstamp(fep, fec32_to_cpu(ebdp->ts),
drivers/net/ethernet/freescale/fec_ptp.c
126
struct timespec64 ts;
drivers/net/ethernet/freescale/fec_ptp.c
170
ts = ns_to_timespec64(ns);
drivers/net/ethernet/freescale/fec_ptp.c
175
val = NSEC_PER_SEC - (u32)ts.tv_nsec + tempval;
drivers/net/ethernet/freescale/fec_ptp.c
441
static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/freescale/fec_ptp.c
459
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/freescale/fec_ptp.c
473
const struct timespec64 *ts)
drivers/net/ethernet/freescale/fec_ptp.c
489
ns = timespec64_to_ns(ts);
drivers/net/ethernet/google/gve/gve_desc_dqo.h
252
__le32 ts; /* timestamp in nanosecs */
drivers/net/ethernet/google/gve/gve_ptp.c
30
struct timespec64 *ts,
drivers/net/ethernet/google/gve/gve_ptp.c
37
const struct timespec64 *ts)
drivers/net/ethernet/google/gve/gve_rx_dqo.c
516
gve_rx_get_hwtstamp(rx->gve, le32_to_cpu(desc->ts));
drivers/net/ethernet/google/gve/gve_rx_dqo.c
530
le32_to_cpu(ctx->compl_desc->ts));
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
132
static int hclge_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
147
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
153
const struct timespec64 *ts)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
159
writel(ts->tv_nsec, hdev->ptp->io_base + HCLGE_PTP_TIME_NSEC_REG);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
160
writel(ts->tv_sec >> HCLGE_PTP_SEC_H_OFFSET,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
162
writel(ts->tv_sec & HCLGE_PTP_SEC_L_MASK,
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
186
struct timespec64 ts;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
189
hclge_ptp_gettimex(ptp, &ts, NULL);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
190
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
192
ts = ns_to_timespec64(ns);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
193
return hclge_ptp_settime(ptp, &ts);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
479
struct timespec64 ts;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
514
ktime_get_real_ts64(&ts);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
515
ret = hclge_ptp_settime(&hdev->ptp->info, &ts);
drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c
482
struct timespec64 ts = {};
drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c
486
ktime_get_real_ts64(&ts);
drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c
487
time = (u64)(ts.tv_sec * MSEC_PER_SEC + ts.tv_nsec / NSEC_PER_MSEC);
drivers/net/ethernet/intel/e1000e/ptp.c
163
struct timespec64 *ts,
drivers/net/ethernet/intel/e1000e/ptp.c
179
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/e1000e/ptp.c
193
const struct timespec64 *ts)
drivers/net/ethernet/intel/e1000e/ptp.c
200
ns = timespec64_to_ns(ts);
drivers/net/ethernet/intel/e1000e/ptp.c
231
struct timespec64 ts;
drivers/net/ethernet/intel/e1000e/ptp.c
234
ts = ns_to_timespec64(timecounter_read(&adapter->tc));
drivers/net/ethernet/intel/e1000e/ptp.c
236
e_dbg("SYSTIM overflow check at %ptSp\n", &ts);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
278
static void i40e_ptp_read(struct i40e_pf *pf, struct timespec64 *ts,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
293
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
305
static void i40e_ptp_write(struct i40e_pf *pf, const struct timespec64 *ts)
drivers/net/ethernet/intel/i40e/i40e_ptp.c
308
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
446
static int i40e_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/intel/i40e/i40e_ptp.c
452
i40e_ptp_read(pf, ts, sts);
drivers/net/ethernet/intel/i40e/i40e_ptp.c
467
const struct timespec64 *ts)
drivers/net/ethernet/intel/i40e/i40e_ptp.c
472
i40e_ptp_write(pf, ts);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
213
struct timespec64 *ts,
drivers/net/ethernet/intel/iavf/iavf_ptp.c
238
*ts = ns_to_timespec64(adapter->ptp.cached_phc_time);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
244
struct timespec64 *ts,
drivers/net/ethernet/intel/iavf/iavf_ptp.c
252
return iavf_read_phc_indirect(adapter, ts, sts);
drivers/net/ethernet/intel/iavf/iavf_ptp.c
256
const struct timespec64 *ts)
drivers/net/ethernet/intel/ice/ice_ptp.c
1013
static int ice_ptp_write_init(struct ice_pf *pf, struct timespec64 *ts)
drivers/net/ethernet/intel/ice/ice_ptp.c
1015
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/intel/ice/ice_ptp.c
1877
ice_ptp_gettimex64(struct ptp_clock_info *info, struct timespec64 *ts,
drivers/net/ethernet/intel/ice/ice_ptp.c
1884
*ts = ns_to_timespec64(time_ns);
drivers/net/ethernet/intel/ice/ice_ptp.c
1897
ice_ptp_settime64(struct ptp_clock_info *info, const struct timespec64 *ts)
drivers/net/ethernet/intel/ice/ice_ptp.c
1900
struct timespec64 ts64 = *ts;
drivers/net/ethernet/intel/ice/ice_ptp.c
2099
u64 ts;
drivers/net/ethernet/intel/ice/ice_ptp.c
2138
ts = ((u64)ts_hi << 32) | ts_lo;
drivers/net/ethernet/intel/ice/ice_ptp.c
2139
system->cycles = ts;
drivers/net/ethernet/intel/ice/ice_ptp.c
2146
ts = ((u64)ts_hi << 32) | ts_lo;
drivers/net/ethernet/intel/ice/ice_ptp.c
2147
*device = ns_to_ktime(ts);
drivers/net/ethernet/intel/ice/ice_ptp.c
2967
struct timespec64 ts;
drivers/net/ethernet/intel/ice/ice_ptp.c
2996
ts = ns_to_timespec64(ptp->cached_phc_time + time_diff);
drivers/net/ethernet/intel/ice/ice_ptp.c
2998
ts = ktime_to_timespec64(ktime_get_real());
drivers/net/ethernet/intel/ice/ice_ptp.c
3000
err = ice_ptp_write_init(pf, &ts);
drivers/net/ethernet/intel/ice/ice_ptp.c
3154
struct timespec64 ts;
drivers/net/ethernet/intel/ice/ice_ptp.c
3182
ts = ktime_to_timespec64(ktime_get_real());
drivers/net/ethernet/intel/ice/ice_ptp.c
3184
err = ice_ptp_write_init(pf, &ts);
drivers/net/ethernet/intel/ice/ice_txrx.c
1528
struct timespec64 ts;
drivers/net/ethernet/intel/ice/ice_txrx.c
1539
ts = ktime_to_timespec64(first->skb->tstamp);
drivers/net/ethernet/intel/ice/ice_txrx.c
1540
tstamp = ts.tv_nsec >> ICE_TXTIME_CTX_RESOLUTION_128NS;
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1780
u64 ts;
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1789
ts = u64_stats_read(&stats->tstamp_skipped);
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
1793
ts_stats->lost += ts;
drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h
200
u8 ts[3];
drivers/net/ethernet/intel/idpf/idpf_lan_txrx.h
255
u8 ts[3];
drivers/net/ethernet/intel/idpf/idpf_ptp.c
313
struct timespec64 *ts,
drivers/net/ethernet/intel/idpf/idpf_ptp.c
324
*ts = ns_to_timespec64(time_ns);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
417
const struct timespec64 *ts)
drivers/net/ethernet/intel/idpf/idpf_ptp.c
428
ns = timespec64_to_ns(ts);
drivers/net/ethernet/intel/idpf/idpf_ptp.c
931
struct timespec64 ts;
drivers/net/ethernet/intel/idpf/idpf_ptp.c
976
ts = ktime_to_timespec64(ktime_get_real());
drivers/net/ethernet/intel/idpf/idpf_ptp.c
977
err = idpf_ptp_settime64(&adapter->ptp->info, &ts);
drivers/net/ethernet/intel/idpf/idpf_txrx.c
1007
ts = bufqs[j - 1]->truesize >> 1;
drivers/net/ethernet/intel/idpf/idpf_txrx.c
1010
ts = 0;
drivers/net/ethernet/intel/idpf/idpf_txrx.c
1013
bufq->truesize = ts;
drivers/net/ethernet/intel/idpf/idpf_txrx.c
999
u32 ts;
drivers/net/ethernet/intel/igb/igb_main.c
6017
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_main.c
6039
ts = ktime_to_timespec64(first->skb->tstamp);
drivers/net/ethernet/intel/igb/igb_main.c
6041
context_desc->seqnum_seed = cpu_to_le32(ts.tv_nsec / 32);
drivers/net/ethernet/intel/igb/igb_main.c
6946
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_main.c
7002
ts.tv_nsec = (u32)systim;
drivers/net/ethernet/intel/igb/igb_main.c
7003
ts.tv_sec = ((u32)(systim >> 32)) & 0xFF;
drivers/net/ethernet/intel/igb/igb_main.c
7005
ts = timespec64_add(adapter->perout[tsintr_tt].start,
drivers/net/ethernet/intel/igb/igb_main.c
7010
wr32((tsintr_tt == 1) ? E1000_TRGTTIML1 : E1000_TRGTTIML0, ts.tv_nsec);
drivers/net/ethernet/intel/igb/igb_main.c
7011
wr32((tsintr_tt == 1) ? E1000_TRGTTIMH1 : E1000_TRGTTIMH0, (u32)ts.tv_sec);
drivers/net/ethernet/intel/igb/igb_main.c
7015
adapter->perout[tsintr_tt].start = ts;
drivers/net/ethernet/intel/igb/igb_main.c
7027
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_main.c
7042
ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igb/igb_main.c
7044
ts.tv_nsec = rd32(auxstmpl);
drivers/net/ethernet/intel/igb/igb_main.c
7045
ts.tv_sec = rd32(auxstmph);
drivers/net/ethernet/intel/igb/igb_main.c
7050
event.timestamp = ts.tv_sec * 1000000000ULL + ts.tv_nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
1012
igb_ptp_systim_to_hwtstamp(adapter, &ts, le64_to_cpu(regval[1]));
drivers/net/ethernet/intel/igb/igb_ptp.c
1029
*timestamp = ktime_sub_ns(ts.hwtstamp, adjust);
drivers/net/ethernet/intel/igb/igb_ptp.c
116
struct timespec64 *ts)
drivers/net/ethernet/intel/igb/igb_ptp.c
129
ts->tv_sec = sec;
drivers/net/ethernet/intel/igb/igb_ptp.c
130
ts->tv_nsec = nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
134
const struct timespec64 *ts)
drivers/net/ethernet/intel/igb/igb_ptp.c
141
wr32(E1000_SYSTIML, ts->tv_nsec);
drivers/net/ethernet/intel/igb/igb_ptp.c
142
wr32(E1000_SYSTIMH, (u32)ts->tv_sec);
drivers/net/ethernet/intel/igb/igb_ptp.c
1503
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_ptp.c
1505
ktime_get_real_ts64(&ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
1506
igb_ptp_write_i210(adapter, &ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
260
struct timespec64 *ts,
drivers/net/ethernet/intel/igb/igb_ptp.c
281
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igb/igb_ptp.c
287
struct timespec64 *ts,
drivers/net/ethernet/intel/igb/igb_ptp.c
309
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igb/igb_ptp.c
315
struct timespec64 *ts,
drivers/net/ethernet/intel/igb/igb_ptp.c
328
ts->tv_nsec = rd32(E1000_SYSTIML);
drivers/net/ethernet/intel/igb/igb_ptp.c
329
ts->tv_sec = rd32(E1000_SYSTIMH);
drivers/net/ethernet/intel/igb/igb_ptp.c
337
const struct timespec64 *ts)
drivers/net/ethernet/intel/igb/igb_ptp.c
344
ns = timespec64_to_ns(ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
356
const struct timespec64 *ts)
drivers/net/ethernet/intel/igb/igb_ptp.c
364
igb_ptp_write_i210(igb, ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
497
struct timespec64 ts, start;
drivers/net/ethernet/intel/igb/igb_ptp.c
551
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/intel/igb/igb_ptp.c
552
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
553
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
557
ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igb/igb_ptp.c
620
igb->perout[i].period.tv_sec = ts.tv_sec;
drivers/net/ethernet/intel/igb/igb_ptp.c
621
igb->perout[i].period.tv_nsec = ts.tv_nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
648
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_ptp.c
700
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/intel/igb/igb_ptp.c
701
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
702
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
710
ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igb/igb_ptp.c
749
igb->perout[i].period.tv_sec = ts.tv_sec;
drivers/net/ethernet/intel/igb/igb_ptp.c
750
igb->perout[i].period.tv_nsec = ts.tv_nsec;
drivers/net/ethernet/intel/igb/igb_ptp.c
842
struct timespec64 ts;
drivers/net/ethernet/intel/igb/igb_ptp.c
845
ts = ns_to_timespec64(timecounter_read(&igb->tc));
drivers/net/ethernet/intel/igb/igb_ptp.c
847
pr_debug("igb overflow check at %ptSp\n", &ts);
drivers/net/ethernet/intel/igb/igb_ptp.c
996
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/intel/igc/igc.h
787
void igc_ptp_read(struct igc_adapter *adapter, struct timespec64 *ts);
drivers/net/ethernet/intel/igc/igc_main.c
5572
struct timespec64 ts;
drivers/net/ethernet/intel/igc/igc_main.c
5589
ts = timespec64_add(adapter->perout[0].start,
drivers/net/ethernet/intel/igc/igc_main.c
5591
wr32(IGC_TRGTTIML0, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
drivers/net/ethernet/intel/igc/igc_main.c
5592
wr32(IGC_TRGTTIMH0, (u32)ts.tv_sec);
drivers/net/ethernet/intel/igc/igc_main.c
5596
adapter->perout[0].start = ts;
drivers/net/ethernet/intel/igc/igc_main.c
5602
ts = timespec64_add(adapter->perout[1].start,
drivers/net/ethernet/intel/igc/igc_main.c
5604
wr32(IGC_TRGTTIML1, ts.tv_nsec | IGC_TT_IO_TIMER_SEL_SYSTIM0);
drivers/net/ethernet/intel/igc/igc_main.c
5605
wr32(IGC_TRGTTIMH1, (u32)ts.tv_sec);
drivers/net/ethernet/intel/igc/igc_main.c
5609
adapter->perout[1].start = ts;
drivers/net/ethernet/intel/igc/igc_ptp.c
103
ts->tv_nsec = rd32(IGC_SYSTIML);
drivers/net/ethernet/intel/igc/igc_ptp.c
104
ts->tv_sec = rd32(IGC_SYSTIMH);
drivers/net/ethernet/intel/igc/igc_ptp.c
1116
struct timespec64 *ts,
drivers/net/ethernet/intel/igc/igc_ptp.c
1126
ts->tv_nsec = rd32(IGC_SYSTIML_1);
drivers/net/ethernet/intel/igc/igc_ptp.c
1127
ts->tv_sec = rd32(IGC_SYSTIMH_1);
drivers/net/ethernet/intel/igc/igc_ptp.c
113
const struct timespec64 *ts)
drivers/net/ethernet/intel/igc/igc_ptp.c
121
igc_ptp_write_i225(igc, ts);
drivers/net/ethernet/intel/igc/igc_ptp.c
1242
struct timespec64 ts = adapter->prev_ptp_time;
drivers/net/ethernet/intel/igc/igc_ptp.c
1247
timespec64_add_ns(&ts, ktime_to_ns(delta));
drivers/net/ethernet/intel/igc/igc_ptp.c
1249
igc_ptp_write_i225(adapter, &ts);
drivers/net/ethernet/intel/igc/igc_ptp.c
25
void igc_ptp_read(struct igc_adapter *adapter, struct timespec64 *ts)
drivers/net/ethernet/intel/igc/igc_ptp.c
253
struct timespec64 ts;
drivers/net/ethernet/intel/igc/igc_ptp.c
302
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/intel/igc/igc_ptp.c
303
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/intel/igc/igc_ptp.c
304
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/intel/igc/igc_ptp.c
312
ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/igc/igc_ptp.c
34
ts->tv_sec = sec;
drivers/net/ethernet/intel/igc/igc_ptp.c
35
ts->tv_nsec = nsec;
drivers/net/ethernet/intel/igc/igc_ptp.c
372
igc->perout[i].period.tv_sec = ts.tv_sec;
drivers/net/ethernet/intel/igc/igc_ptp.c
373
igc->perout[i].period.tv_nsec = ts.tv_nsec;
drivers/net/ethernet/intel/igc/igc_ptp.c
39
const struct timespec64 *ts)
drivers/net/ethernet/intel/igc/igc_ptp.c
43
wr32(IGC_SYSTIML, ts->tv_nsec);
drivers/net/ethernet/intel/igc/igc_ptp.c
44
wr32(IGC_SYSTIMH, ts->tv_sec);
drivers/net/ethernet/intel/igc/igc_ptp.c
92
struct timespec64 *ts,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
246
struct timespec64 ts;
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
305
ts = ns_to_timespec64(clock_edge);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
306
trgttiml = (u32)ts.tv_nsec;
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
307
trgttimh = (u32)ts.tv_sec;
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
335
struct timespec64 ts;
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
353
ts.tv_nsec = IXGBE_READ_REG(hw, IXGBE_SYSTIML);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
354
ts.tv_sec = IXGBE_READ_REG(hw, IXGBE_SYSTIMH);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
356
return (u64)timespec64_to_ns(&ts);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
551
struct timespec64 *ts,
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
575
ts->tv_nsec = IXGBE_READ_REG(hw, IXGBE_SYSTIML);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
576
ts->tv_sec = IXGBE_READ_REG(hw, IXGBE_SYSTIMH);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
577
stamp = timespec64_to_ns(ts);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
591
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
605
const struct timespec64 *ts)
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
610
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/marvell/mvneta.c
4306
u32 ts, tw, lpi0, lpi1, status;
drivers/net/ethernet/marvell/mvneta.c
4314
ts = timer;
drivers/net/ethernet/marvell/mvneta.c
4320
ts = DIV_ROUND_UP(timer, 10);
drivers/net/ethernet/marvell/mvneta.c
4323
if (ts > 255)
drivers/net/ethernet/marvell/mvneta.c
4324
ts = 255;
drivers/net/ethernet/marvell/mvneta.c
4328
lpi0 = u32_replace_bits(lpi0, ts, MVNETA_LPI_CTRL_0_TS);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3400
u32 ts = r2 << 19 | r1 << 3 | r0 >> 13;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3402
mvpp22_tai_tstamp(port->priv->tai, ts, &shhwtstamps);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6751
u32 ts, tw, lpi1, status;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6759
ts = timer;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6765
ts = DIV_ROUND_UP(timer, 10);
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6768
if (ts > 255)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6769
ts = 255;
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
6774
FIELD_PREP(MVPP2_GMAC_LPI_CTRL0_TS_MASK, ts));
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
104
static void mvpp2_tai_write_tlv(const struct timespec64 *ts, u32 frac,
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
107
mvpp2_tai_write(ts->tv_sec >> 32, base + MVPP22_TAI_TLV_SEC_HIGH);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
108
mvpp2_tai_write(ts->tv_sec >> 16, base + MVPP22_TAI_TLV_SEC_MED);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
109
mvpp2_tai_write(ts->tv_sec, base + MVPP22_TAI_TLV_SEC_LOW);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
110
mvpp2_tai_write(ts->tv_nsec >> 16, base + MVPP22_TAI_TLV_NANO_HIGH);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
111
mvpp2_tai_write(ts->tv_nsec, base + MVPP22_TAI_TLV_NANO_LOW);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
208
struct timespec64 ts;
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
224
ts = ns_to_timespec64(delta);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
228
mvpp2_tai_write_tlv(&ts, 0, base);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
236
struct timespec64 *ts,
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
262
mvpp22_tai_read_ts(ts, base + MVPP22_TAI_TCV1_SEC_HIGH);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
265
mvpp22_tai_read_ts(ts, base + MVPP22_TAI_TCV0_SEC_HIGH);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
277
const struct timespec64 *ts)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
285
mvpp2_tai_write_tlv(ts, 0, base);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
348
struct timespec64 ts;
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
355
ts.tv_sec = READ_ONCE(tai->stamp.tv_sec);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
356
ts.tv_nsec = tstamp & 0x3fffffff;
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
362
delta = ((tstamp >> 30) - (ts.tv_sec & 3)) & 3;
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
365
ts.tv_sec += delta;
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
368
hwtstamp->hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
90
static void mvpp22_tai_read_ts(struct timespec64 *ts, void __iomem *base)
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
92
ts->tv_sec = (u64)mvpp2_tai_read(base + 0) << 32 |
drivers/net/ethernet/marvell/mvpp2/mvpp2_tai.c
96
ts->tv_nsec = mvpp2_tai_read(base + 12) << 16 |
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
2638
seq_printf(m, "W2: ts\t\t\t%lld\n", (u64)prof->ts);
drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h
765
uint64_t ts : 48; /* W2 */
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
100
struct timespec64 *ts)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
108
*ts = ns_to_timespec64(tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
113
const struct timespec64 *ts)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
125
nsec = timespec64_to_ns(ts);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
244
struct timespec64 *ts)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
253
*ts = ns_to_timespec64(tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
259
const struct timespec64 *ts)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
265
nsec = timespec64_to_ns(ts);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1133
struct timespec64 ts;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1145
ts = ns_to_timespec64(pfvf->ptp->tstamp);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1146
origin_tstamp->seconds_msb = htons((ts.tv_sec >> 32) & 0xffff);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1147
origin_tstamp->seconds_lsb = htonl(ts.tv_sec & 0xffffffff);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1148
origin_tstamp->nanoseconds = htonl(ts.tv_nsec);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
132
struct skb_shared_hwtstamps ts;
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
154
memset(&ts, 0, sizeof(ts));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
155
ts.hwtstamp = ns_to_ktime(tsns);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
156
skb_tstamp_tx(skb, &ts);
drivers/net/ethernet/mellanox/mlx4/en_clock.c
174
struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx4/en_clock.c
185
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/mellanox/mlx4/en_clock.c
199
const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx4/en_clock.c
203
u64 ns = timespec64_to_ns(ts);
drivers/net/ethernet/mellanox/mlx4/fw.c
1528
int ts = 0, tc = 0;
drivers/net/ethernet/mellanox/mlx4/fw.c
1562
ts += 1 << (lg - 10);
drivers/net/ethernet/mellanox/mlx4/fw.c
1584
mlx4_dbg(dev, "Mapped %d chunks/%d KB for FW\n", tc, ts);
drivers/net/ethernet/mellanox/mlx4/fw.c
1587
mlx4_dbg(dev, "Mapped %d chunks/%d KB for ICM aux\n", tc, ts);
drivers/net/ethernet/mellanox/mlx4/fw.c
1591
tc, ts, (unsigned long long) virt - (ts << 10));
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
2719
u32 ts = (be32_to_cpu(qpc->flags) >> 16) & 0xff;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
2720
int xrc = (ts == MLX4_QP_ST_XRC) ? 1 : 0;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
3800
u32 ts = (be32_to_cpu(qpc->flags) >> 16) & 0xff;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
3805
if (mlx4_is_eth(dev, port) && (ts != MLX4_QP_ST_MLX)) {
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
705
u32 ts = (be32_to_cpu(qp_ctx->flags) >> 16) & 0xff;
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
708
if (MLX4_QP_ST_UD == ts) {
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
716
} else if (MLX4_QP_ST_RC == ts || MLX4_QP_ST_XRC == ts || MLX4_QP_ST_UC == ts) {
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
294
u64 ts;
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
296
ts = get_cqe_ts(priv->cqe);
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
299
return mlx5_real_time_cyc2time(priv->cq->mdev->clock, ts);
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
301
return mlx5_timecounter_cyc2time(priv->cq->mdev->clock, ts);
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
722
u64 ts = get_cqe_ts(cqe);
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
724
hwts.hwtstamp = mlx5e_cqe_ts_to_ns(sq->ptp_cyc2time, sq->clock, ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1142
static void ts_next_sec(struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1144
ts->tv_sec += 1;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1145
ts->tv_nsec = 0;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1151
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1154
mlx5_ptp_gettimex(&clock->ptp_info, &ts, NULL);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1155
ts_next_sec(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1156
target_ns = timespec64_to_ns(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1348
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1350
ktime_get_real_ts64(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
1351
mlx5_clock_settime(mdev, clock, &ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
491
const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
495
if (ts->tv_sec < 0 || ts->tv_sec > U32_MAX ||
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
496
ts->tv_nsec < 0 || ts->tv_nsec > NSEC_PER_SEC)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
500
MLX5_SET(mtutc_reg, in, utc_sec, ts->tv_sec);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
501
MLX5_SET(mtutc_reg, in, utc_nsec, ts->tv_nsec);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
507
const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
513
int err = mlx5_ptp_settime_real_time(mdev, ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
520
timecounter_init(&timer->tc, &timer->cycles, timespec64_to_ns(ts));
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
527
static int mlx5_ptp_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
535
err = mlx5_clock_settime(mdev, clock, ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
545
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
549
ts = ns_to_timespec64(time);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
550
return ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
553
static int mlx5_ptp_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
563
*ts = mlx5_ptp_gettimex_real_time(mdev, sts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
569
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
576
struct timespec64 *ts,
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
588
*ts = ns_to_timespec64(cycles);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
599
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
602
ts = mlx5_ptp_gettimex_real_time(mdev, NULL);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
603
ns = timespec64_to_ns(&ts) + delta;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
604
ts = ns_to_timespec64(ns);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
605
return mlx5_ptp_settime_real_time(mdev, &ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
799
struct timespec64 ts = {};
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
802
ts.tv_sec = sec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
803
target_ns = timespec64_to_ns(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
816
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
819
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
820
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
821
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
839
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
842
ts.tv_sec = rq->perout.on.sec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
843
ts.tv_nsec = rq->perout.on.nsec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
844
out_pulse_duration = (u32)timespec64_to_ns(&ts);
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
849
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
850
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
851
out_pulse_duration = (u32)timespec64_to_ns(&ts) >> 1;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
872
struct timespec64 ts;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
874
ts.tv_sec = rq->perout.period.sec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
875
ts.tv_nsec = rq->perout.period.nsec;
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
876
if (timespec64_to_ns(&ts) < pps_info->min_npps_period) {
drivers/net/ethernet/mellanox/mlxsw/reg.h
3858
enum mlxsw_reg_qpts_trust_state ts)
drivers/net/ethernet/mellanox/mlxsw/reg.h
3863
mlxsw_reg_qpts_trust_state_set(payload, ts);
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
251
enum mlxsw_reg_qpts_trust_state ts)
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
256
mlxsw_reg_qpts_pack(qpts_pl, mlxsw_sp_port->local_port, ts);
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
274
enum mlxsw_reg_qpts_trust_state ts)
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
276
bool rewrite_dscp = ts == MLXSW_REG_QPTS_TRUST_STATE_DSCP;
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
279
if (mlxsw_sp_port->dcb.trust_state == ts)
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
282
err = mlxsw_sp_port_dcb_app_update_qpts(mlxsw_sp_port, ts);
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
290
mlxsw_sp_port->dcb.trust_state = ts;
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
220
struct timespec64 *ts,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
231
*ts = ns_to_timespec64(nsec);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
237
const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
240
u64 nsec = timespec64_to_ns(ts);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
410
struct timespec64 *ts,
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
418
*ts = ns_to_timespec64(nsec);
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
424
const struct timespec64 *ts)
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
428
u64 nsec = timespec64_to_ns(ts);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
146
fbnic_ptp_gettimex64(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/net/ethernet/meta/fbnic/fbnic_time.c
175
*ts = ns_to_timespec64(time_ns);
drivers/net/ethernet/meta/fbnic/fbnic_time.c
181
fbnic_ptp_settime64(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/net/ethernet/meta/fbnic/fbnic_time.c
191
host_ns = timespec64_to_ns(ts);
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
1194
u64 ns, ts;
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
1200
ts = FIELD_GET(FBNIC_RCD_OPT_META_TS_MASK, rcd);
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
1201
ns = fbnic_ts40_to_ns(fbn, ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1027
struct timespec64 *ts)
drivers/net/ethernet/microchip/lan743x_ptp.c
1046
extts->ts.tv_sec = sec;
drivers/net/ethernet/microchip/lan743x_ptp.c
1047
extts->ts.tv_nsec = nsec;
drivers/net/ethernet/microchip/lan743x_ptp.c
1048
ts->tv_sec = sec;
drivers/net/ethernet/microchip/lan743x_ptp.c
1049
ts->tv_nsec = nsec;
drivers/net/ethernet/microchip/lan743x_ptp.c
1061
struct timespec64 ts;
drivers/net/ethernet/microchip/lan743x_ptp.c
1118
&ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1120
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1151
&ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1153
ns = timespec64_to_ns(&ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1424
struct timespec64 ts;
drivers/net/ethernet/microchip/lan743x_ptp.c
1426
ktime_get_clocktai_ts64(&ts);
drivers/net/ethernet/microchip/lan743x_ptp.c
1428
lan743x_ptp_clock_set(adapter, ts.tv_sec, ts.tv_nsec, 0);
drivers/net/ethernet/microchip/lan743x_ptp.c
374
struct timespec64 *ts)
drivers/net/ethernet/microchip/lan743x_ptp.c
388
ts->tv_sec = seconds;
drivers/net/ethernet/microchip/lan743x_ptp.c
389
ts->tv_nsec = nano_seconds;
drivers/net/ethernet/microchip/lan743x_ptp.c
395
const struct timespec64 *ts)
drivers/net/ethernet/microchip/lan743x_ptp.c
404
if (ts->tv_sec > 0xFFFFFFFFLL) {
drivers/net/ethernet/microchip/lan743x_ptp.c
407
ts->tv_sec);
drivers/net/ethernet/microchip/lan743x_ptp.c
410
if (ts->tv_nsec < 0) {
drivers/net/ethernet/microchip/lan743x_ptp.c
413
ts->tv_nsec);
drivers/net/ethernet/microchip/lan743x_ptp.c
416
seconds = ts->tv_sec;
drivers/net/ethernet/microchip/lan743x_ptp.c
417
nano_seconds = ts->tv_nsec;
drivers/net/ethernet/microchip/lan743x_ptp.c
881
memset(&extts->ts, 0, sizeof(struct timespec64));
drivers/net/ethernet/microchip/lan743x_ptp.h
72
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_main.h
550
int lan966x_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1108
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1116
lan966x_ptp_gettime64(&phc->info, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1120
if (ts.tv_nsec < timestamp)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1121
ts.tv_sec--;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1122
ts.tv_nsec = timestamp;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
1123
full_ts_in_ns = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
449
struct timespec64 *ts,
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
466
ts->tv_sec = lan_rd(lan966x, PTP_TOD_SEC_LSB(TOD_ACC_PIN));
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
469
ts->tv_nsec = nsec;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
473
ts->tv_sec--;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
487
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
553
lan966x_get_hwtimestamp(lan966x, &ts, delay);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
556
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
670
const struct timespec64 *ts)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
688
lan_wr(PTP_TOD_SEC_MSB_TOD_SEC_MSB_SET(upper_32_bits(ts->tv_sec)),
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
690
lan_wr(lower_32_bits(ts->tv_sec),
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
692
lan_wr(ts->tv_nsec, lan966x, PTP_TOD_NSEC(TOD_ACC_PIN));
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
708
int lan966x_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
741
set_normalized_timespec64(ts, s, ns);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
779
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
782
lan966x_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
784
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
785
ts = ns_to_timespec64(now + delta);
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c
787
lan966x_ptp_settime64(ptp, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
378
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
381
lan966x_ptp_gettime64(&lan966x->phc[LAN966X_PHC_PORT].info, &ts);
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
382
current_time = timespec64_to_ktime(ts);
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
446
struct timespec64 ts;
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
464
ts = ktime_to_timespec64(base_time);
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
465
lan_wr(QSYS_TAS_BT_NSEC_NSEC_SET(ts.tv_nsec),
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
468
lan_wr(lower_32_bits(ts.tv_sec),
drivers/net/ethernet/microchip/lan966x/lan966x_taprio.c
471
lan_wr(QSYS_TAS_BT_SEC_MSB_SEC_MSB_SET(upper_32_bits(ts.tv_sec)),
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
216
struct timespec64 ts;
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
284
sparx5_get_hwtimestamp(sparx5, &ts, delay);
drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c
287
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
390
u32 slot, jdx, kdx, ts;
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
416
ts = 0;
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
439
data->temp_sched[ts] =
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
441
ts++;
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
447
data->temp_sched[ts] =
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
449
ts++;
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
559
int sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
561
struct timespec64 *ts,
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
277
struct timespec64 *ts,
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
295
ts->tv_sec = spx5_rd(sparx5, PTP_PTP_TOD_SEC_LSB(consts->tod_pin));
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
298
ts->tv_nsec = nsec;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
302
ts->tv_sec--;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
316
struct timespec64 ts;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
384
sparx5_get_hwtimestamp(sparx5, &ts, delay);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
387
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
444
const struct timespec64 *ts)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
465
spx5_wr(PTP_PTP_TOD_SEC_MSB_PTP_TOD_SEC_MSB_SET(upper_32_bits(ts->tv_sec)),
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
467
spx5_wr(lower_32_bits(ts->tv_sec),
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
469
spx5_wr(ts->tv_nsec, sparx5, PTP_PTP_TOD_NSEC(consts->tod_pin));
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
485
int sparx5_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
521
set_normalized_timespec64(ts, s, ns);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
562
struct timespec64 ts;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
565
sparx5_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
567
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
568
ts = ns_to_timespec64(now + delta);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
570
sparx5_ptp_settime64(ptp, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
698
struct timespec64 ts;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
705
sparx5_ptp_gettime64(&phc->info, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
707
if (ts.tv_nsec < timestamp)
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
708
ts.tv_sec--;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
709
ts.tv_nsec = timestamp;
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c
710
full_ts_in_ns = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/microchip/sparx5/sparx5_qos.c
28
struct timespec64 ts;
drivers/net/ethernet/microchip/sparx5/sparx5_qos.c
35
sparx5_ptp_gettime64(&sparx5->phc[SPARX5_PHC_PORT].info, &ts);
drivers/net/ethernet/microchip/sparx5/sparx5_qos.c
36
current_time = timespec64_to_ktime(ts);
drivers/net/ethernet/mscc/ocelot.c
1256
struct timespec64 ts;
drivers/net/ethernet/mscc/ocelot.c
1258
ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
drivers/net/ethernet/mscc/ocelot.c
1260
tod_in_ns = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/mscc/ocelot_ptp.c
123
struct timespec64 ts;
drivers/net/ethernet/mscc/ocelot_ptp.c
126
ocelot_ptp_gettime64(ptp, &ts);
drivers/net/ethernet/mscc/ocelot_ptp.c
128
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/ethernet/mscc/ocelot_ptp.c
129
ts = ns_to_timespec64(now + delta);
drivers/net/ethernet/mscc/ocelot_ptp.c
131
ocelot_ptp_settime64(ptp, &ts);
drivers/net/ethernet/mscc/ocelot_ptp.c
19
int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/mscc/ocelot_ptp.c
48
set_normalized_timespec64(ts, s, ns);
drivers/net/ethernet/mscc/ocelot_ptp.c
54
const struct timespec64 *ts)
drivers/net/ethernet/mscc/ocelot_ptp.c
68
ocelot_write_rix(ocelot, lower_32_bits(ts->tv_sec), PTP_PIN_TOD_SEC_LSB,
drivers/net/ethernet/mscc/ocelot_ptp.c
70
ocelot_write_rix(ocelot, upper_32_bits(ts->tv_sec), PTP_PIN_TOD_SEC_MSB,
drivers/net/ethernet/mscc/ocelot_ptp.c
72
ocelot_write_rix(ocelot, ts->tv_nsec, PTP_PIN_TOD_NSEC, TOD_ACC_PIN);
drivers/net/ethernet/mscc/ocelot_ptp.c
785
struct timespec64 *ts)
drivers/net/ethernet/mscc/ocelot_ptp.c
798
ts->tv_sec = ocelot_read_rix(ocelot, PTP_PIN_TOD_SEC_LSB, TOD_ACC_PIN);
drivers/net/ethernet/mscc/ocelot_ptp.c
802
ts->tv_nsec = SYS_PTP_TXSTAMP_PTP_TXSTAMP(val);
drivers/net/ethernet/mscc/ocelot_ptp.c
805
if ((ts->tv_sec & 0x1) != !!(val & SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC))
drivers/net/ethernet/mscc/ocelot_ptp.c
806
ts->tv_sec--;
drivers/net/ethernet/mscc/ocelot_ptp.c
820
struct timespec64 ts;
drivers/net/ethernet/mscc/ocelot_ptp.c
856
ocelot_get_hwtimestamp(ocelot, &ts);
drivers/net/ethernet/mscc/ocelot_ptp.c
860
shhwtstamps.hwtstamp = ktime_set(ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
395
const struct timespec64 *ts)
drivers/net/ethernet/pensando/ionic/ionic_phc.c
407
ns = timespec64_to_ns(ts);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
424
struct timespec64 *ts,
drivers/net/ethernet/pensando/ionic/ionic_phc.c
444
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/pensando/ionic/ionic_phc.c
72
struct kernel_hwtstamp_config ts = {};
drivers/net/ethernet/pensando/ionic/ionic_phc.c
94
config = &ts;
drivers/net/ethernet/qlogic/qede/qede_ptp.c
100
const struct timespec64 *ts)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
109
ns = timespec64_to_ns(ts);
drivers/net/ethernet/qlogic/qede/qede_ptp.c
79
static int qede_ptp_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/net/ethernet/qlogic/qede/qede_ptp.c
94
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/qlogic/qede/qede_ptp.h
24
int qede_ptp_get_ts_info(struct qede_dev *edev, struct kernel_ethtool_ts_info *ts);
drivers/net/ethernet/renesas/ravb_main.c
719
struct timespec64 ts;
drivers/net/ethernet/renesas/ravb_main.c
728
ts.tv_nsec = (u64)ravb_read(ndev, TFA0);
drivers/net/ethernet/renesas/ravb_main.c
729
ts.tv_sec = ((u64)(tfa2 & TFA2_TSV) << 32) |
drivers/net/ethernet/renesas/ravb_main.c
732
shhwtstamps.hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/renesas/ravb_main.c
956
struct timespec64 ts;
drivers/net/ethernet/renesas/ravb_main.c
969
ts.tv_sec = ((u64)le16_to_cpu(desc->ts_sh) << 32)
drivers/net/ethernet/renesas/ravb_main.c
971
ts.tv_nsec = le32_to_cpu(desc->ts_n);
drivers/net/ethernet/renesas/ravb_main.c
972
shhwtstamps->hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/renesas/ravb_ptp.c
124
struct timespec64 ts;
drivers/net/ethernet/renesas/ravb_ptp.c
129
error = ravb_ptp_time_read(priv, &ts);
drivers/net/ethernet/renesas/ravb_ptp.c
131
u64 now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/ethernet/renesas/ravb_ptp.c
133
ts = ns_to_timespec64(now + delta);
drivers/net/ethernet/renesas/ravb_ptp.c
134
error = ravb_ptp_time_write(priv, &ts);
drivers/net/ethernet/renesas/ravb_ptp.c
141
static int ravb_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/renesas/ravb_ptp.c
149
error = ravb_ptp_time_read(priv, ts);
drivers/net/ethernet/renesas/ravb_ptp.c
156
const struct timespec64 *ts)
drivers/net/ethernet/renesas/ravb_ptp.c
164
error = ravb_ptp_time_write(priv, ts);
drivers/net/ethernet/renesas/ravb_ptp.c
25
static int ravb_ptp_time_read(struct ravb_private *priv, struct timespec64 *ts)
drivers/net/ethernet/renesas/ravb_ptp.c
34
ts->tv_nsec = ravb_read(ndev, GCT0);
drivers/net/ethernet/renesas/ravb_ptp.c
35
ts->tv_sec = ravb_read(ndev, GCT1) |
drivers/net/ethernet/renesas/ravb_ptp.c
43
const struct timespec64 *ts)
drivers/net/ethernet/renesas/ravb_ptp.c
56
ravb_write(ndev, ts->tv_nsec, GTO0);
drivers/net/ethernet/renesas/ravb_ptp.c
57
ravb_write(ndev, ts->tv_sec, GTO1);
drivers/net/ethernet/renesas/ravb_ptp.c
58
ravb_write(ndev, (ts->tv_sec >> 32) & 0xffff, GTO2);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
103
_rcar_gen4_ptp_settime(ptp, ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
112
struct timespec64 ts;
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
117
_rcar_gen4_ptp_gettime(ptp, &ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
118
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
119
ts = ns_to_timespec64(now + delta);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
120
_rcar_gen4_ptp_settime(ptp, &ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
208
struct timespec64 *ts)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
213
priv->info.gettime64(&priv->info, ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
56
struct timespec64 *ts)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
62
ts->tv_nsec = ioread32(ptp_priv->addr + PTPGPTPTM00_REG);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
63
ts->tv_sec = ioread32(ptp_priv->addr + PTPGPTPTM10_REG) |
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
68
struct timespec64 *ts)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
74
_rcar_gen4_ptp_gettime(ptp, ts);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
82
const struct timespec64 *ts)
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
91
iowrite32(ts->tv_sec >> 32, ptp_priv->addr + PTPTOVC20_REG);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
92
iowrite32(ts->tv_sec, ptp_priv->addr + PTPTOVC10_REG);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
93
iowrite32(ts->tv_nsec, ptp_priv->addr + PTPTOVC00_REG);
drivers/net/ethernet/renesas/rcar_gen4_ptp.c
97
const struct timespec64 *ts)
drivers/net/ethernet/renesas/rcar_gen4_ptp.h
19
struct timespec64 *ts);
drivers/net/ethernet/renesas/rswitch_main.c
1044
struct timespec64 ts;
drivers/net/ethernet/renesas/rswitch_main.c
1068
ts.tv_sec = __le32_to_cpu(desc->ts_sec);
drivers/net/ethernet/renesas/rswitch_main.c
1069
ts.tv_nsec = __le32_to_cpu(desc->ts_nsec & cpu_to_le32(0x3fffffff));
drivers/net/ethernet/renesas/rswitch_main.c
1070
shhwtstamps.hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/renesas/rswitch_main.c
851
struct timespec64 ts;
drivers/net/ethernet/renesas/rswitch_main.c
855
ts.tv_sec = __le32_to_cpu(desc->ts_sec);
drivers/net/ethernet/renesas/rswitch_main.c
856
ts.tv_nsec = __le32_to_cpu(desc->ts_nsec & cpu_to_le32(0x3fffffff));
drivers/net/ethernet/renesas/rswitch_main.c
857
shhwtstamps->hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/renesas/rtsn.c
127
struct timespec64 ts;
drivers/net/ethernet/renesas/rtsn.c
129
rcar_gen4_ptp_gettime64(priv->ptp_priv, &ts);
drivers/net/ethernet/renesas/rtsn.c
131
shhwtstamps.hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/renesas/rtsn.c
192
struct timespec64 ts;
drivers/net/ethernet/renesas/rtsn.c
197
ts.tv_sec = (u64)le32_to_cpu(desc->ts_sec);
drivers/net/ethernet/renesas/rtsn.c
198
ts.tv_nsec = le32_to_cpu(desc->ts_nsec & cpu_to_le32(0x3fffffff));
drivers/net/ethernet/renesas/rtsn.c
200
shhwtstamps->hwtstamp = timespec64_to_ktime(ts);
drivers/net/ethernet/sfc/ptp.c
2138
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/sfc/ptp.c
2160
*ts = ktime_to_timespec64(kt);
drivers/net/ethernet/sfc/ptp.c
356
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/sfc/ptp.c
460
struct timespec64 ts = ns_to_timespec64(ns);
drivers/net/ethernet/sfc/ptp.c
461
u32 maj = (u32)ts.tv_sec;
drivers/net/ethernet/sfc/ptp.c
462
u32 min = (u32)(((u64)ts.tv_nsec * NS_TO_S27_MULT +
drivers/net/ethernet/sfc/ptp.c
503
struct timespec64 ts = ns_to_timespec64(ns);
drivers/net/ethernet/sfc/ptp.c
505
*nic_major = (u32)ts.tv_sec;
drivers/net/ethernet/sfc/ptp.c
506
*nic_minor = ts.tv_nsec * 4;
drivers/net/ethernet/sfc/siena/ptp.c
2096
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/sfc/siena/ptp.c
2118
*ts = ktime_to_timespec64(kt);
drivers/net/ethernet/sfc/siena/ptp.c
352
static int efx_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
drivers/net/ethernet/sfc/siena/ptp.c
443
struct timespec64 ts = ns_to_timespec64(ns);
drivers/net/ethernet/sfc/siena/ptp.c
444
*nic_major = (u32)ts.tv_sec;
drivers/net/ethernet/sfc/siena/ptp.c
445
*nic_minor = ts.tv_nsec;
drivers/net/ethernet/sfc/siena/ptp.c
473
struct timespec64 ts = ns_to_timespec64(ns);
drivers/net/ethernet/sfc/siena/ptp.c
474
u32 maj = (u32)ts.tv_sec;
drivers/net/ethernet/sfc/siena/ptp.c
475
u32 min = (u32)(((u64)ts.tv_nsec * NS_TO_S27_MULT +
drivers/net/ethernet/sfc/siena/ptp.c
516
struct timespec64 ts = ns_to_timespec64(ns);
drivers/net/ethernet/sfc/siena/ptp.c
518
*nic_major = (u32)ts.tv_sec;
drivers/net/ethernet/sfc/siena/ptp.c
519
*nic_minor = ts.tv_nsec * 4;
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
223
static inline void dwmac4_get_timestamp(void *desc, u32 ats, u64 *ts)
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
232
*ts = ns;
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
1143
static int dwxgmac2_get_mac_tx_timestamp(struct mac_device_info *hw, u64 *ts)
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
1152
*ts = readl(ioaddr + XGMAC_TXTIMESTAMP_NSEC) & XGMAC_TXTSSTSLO;
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
1153
*ts += readl(ioaddr + XGMAC_TXTIMESTAMP_SEC) * 1000000000ULL;
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
102
*ts = ns;
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
94
static inline void dwxgmac2_get_timestamp(void *desc, u32 ats, u64 *ts)
drivers/net/ethernet/stmicro/stmmac/enh_desc.c
364
static void enh_desc_get_timestamp(void *desc, u32 ats, u64 *ts)
drivers/net/ethernet/stmicro/stmmac/enh_desc.c
379
*ts = ns;
drivers/net/ethernet/stmicro/stmmac/hwif.h
400
int (*get_mac_tx_timestamp)(struct mac_device_info *hw, u64 *ts);
drivers/net/ethernet/stmicro/stmmac/hwif.h
80
void (*get_timestamp)(void *desc, u32 ats, u64 *ts);
drivers/net/ethernet/stmicro/stmmac/norm_desc.c
220
static void ndesc_get_timestamp(void *desc, u32 ats, u64 *ts)
drivers/net/ethernet/stmicro/stmmac/norm_desc.c
229
*ts = ns;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
2663
struct timespec64 ts = ns_to_timespec64(launch_time);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
2667
stmmac_set_desc_tbs(meta_req->priv, meta_req->edesc, ts.tv_sec,
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
2668
ts.tv_nsec);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
4852
struct timespec64 ts = ns_to_timespec64(skb->tstamp);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
4855
ts.tv_sec, ts.tv_nsec);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
125
static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
136
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
151
const struct timespec64 *ts)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
158
stmmac_init_systime(priv, priv->ptpaddr, ts->tv_sec, ts->tv_nsec);
drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
392
hw_feat->ts = XLGMAC_GET_REG_BITS(mac_hfr0,
drivers/net/ethernet/synopsys/dwc-xlgmac-common.c
535
pdata->hw_feat.ts ? "YES" : "NO");
drivers/net/ethernet/synopsys/dwc-xlgmac.h
507
unsigned int ts; /* IEEE 1588-2008 Advanced Timestamp */
drivers/net/ethernet/ti/am65-cpts.c
539
struct timespec64 *ts,
drivers/net/ethernet/ti/am65-cpts.c
548
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/ti/am65-cpts.c
567
const struct timespec64 *ts)
drivers/net/ethernet/ti/am65-cpts.c
572
ns = timespec64_to_ns(ts);
drivers/net/ethernet/ti/am65-cpts.c
661
struct timespec64 ts;
drivers/net/ethernet/ti/am65-cpts.c
665
ts.tv_sec = req->period.sec;
drivers/net/ethernet/ti/am65-cpts.c
666
ts.tv_nsec = req->period.nsec;
drivers/net/ethernet/ti/am65-cpts.c
667
ns_period = timespec64_to_ns(&ts);
drivers/net/ethernet/ti/am65-cpts.c
671
ts.tv_sec = req->start.sec;
drivers/net/ethernet/ti/am65-cpts.c
672
ts.tv_nsec = req->start.nsec;
drivers/net/ethernet/ti/am65-cpts.c
673
ns_start = timespec64_to_ns(&ts);
drivers/net/ethernet/ti/am65-cpts.c
719
struct timespec64 ts;
drivers/net/ethernet/ti/am65-cpts.c
735
ts = ns_to_timespec64(ns);
drivers/net/ethernet/ti/am65-cpts.c
738
rq.perout.start.sec = ts.tv_sec + 2;
drivers/net/ethernet/ti/cpts.c
242
struct timespec64 *ts,
drivers/net/ethernet/ti/cpts.c
255
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/ti/cpts.c
261
const struct timespec64 *ts)
drivers/net/ethernet/ti/cpts.c
266
ns = timespec64_to_ns(ts);
drivers/net/ethernet/ti/icssg/icss_iep.c
356
struct timespec64 *ts,
drivers/net/ethernet/ti/icssg/icss_iep.c
364
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/ti/icssg/icss_iep.c
371
const struct timespec64 *ts)
drivers/net/ethernet/ti/icssg/icss_iep.c
377
ns = timespec64_to_ns(ts);
drivers/net/ethernet/ti/icssg/icss_iep.c
409
struct timespec64 ts;
drivers/net/ethernet/ti/icssg/icss_iep.c
432
ts.tv_sec = req->on.sec;
drivers/net/ethernet/ti/icssg/icss_iep.c
433
ts.tv_nsec = req->on.nsec;
drivers/net/ethernet/ti/icssg/icss_iep.c
434
ns_width = timespec64_to_ns(&ts);
drivers/net/ethernet/ti/icssg/icss_iep.c
437
ts.tv_sec = req->phase.sec;
drivers/net/ethernet/ti/icssg/icss_iep.c
438
ts.tv_nsec = req->phase.nsec;
drivers/net/ethernet/ti/icssg/icss_iep.c
439
ns_start = timespec64_to_ns(&ts);
drivers/net/ethernet/ti/icssg/icss_iep.c
581
struct timespec64 ts;
drivers/net/ethernet/ti/icssg/icss_iep.c
598
ts = ns_to_timespec64(ns);
drivers/net/ethernet/ti/icssg/icss_iep.c
602
rq.perout.start.sec = ts.tv_sec + 2;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
461
u64 ts = 0;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
482
ts = ((u64)hi_rollover_count) << 23 | iepcount_hi;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
483
ts = ts * (u64)IEP_DEFAULT_CYCLE_TIME_NS + iepcount_lo;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
485
return ts;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
531
struct timespec64 ts;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
540
ts.tv_sec = req->period.sec;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
541
ts.tv_nsec = req->period.nsec;
drivers/net/ethernet/ti/icssg/icssg_prueth.c
542
ns_period = timespec64_to_ns(&ts);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
100
struct timespec64 *ts,
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
108
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
114
const struct timespec64 *ts)
drivers/net/ethernet/wangxun/libwx/wx_ptp.c
120
ns = timespec64_to_ns(ts);
drivers/net/ethernet/xscale/ptp_ixp46x.c
153
static int ptp_ixp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/net/ethernet/xscale/ptp_ixp46x.c
166
*ts = ns_to_timespec64(ns);
drivers/net/ethernet/xscale/ptp_ixp46x.c
171
const struct timespec64 *ts)
drivers/net/ethernet/xscale/ptp_ixp46x.c
178
ns = timespec64_to_ns(ts);
drivers/net/fddi/skfp/h/smt.h
739
struct smt_p_timestamp ts ; /* time stamp */
drivers/net/fddi/skfp/h/smt.h
757
struct smt_p_timestamp ts ; /* time stamp */
drivers/net/fddi/skfp/smt.c
1029
smt_fill_timestamp(smc,&sif->ts) ; /* set time stamp */
drivers/net/fddi/skfp/smt.c
1069
smt_fill_timestamp(smc,&sif->ts) ; /* set time stamp */
drivers/net/fddi/skfp/smt.c
1213
static void smt_fill_timestamp(struct s_smc *smc, struct smt_p_timestamp *ts)
drivers/net/fddi/skfp/smt.c
1216
SMTSETPARA(ts,SMT_P_TIMESTAMP) ;
drivers/net/fddi/skfp/smt.c
1217
smt_set_timestamp(smc,ts->ts_time) ;
drivers/net/fddi/skfp/smt.c
76
static void smt_fill_timestamp(struct s_smc *smc, struct smt_p_timestamp *ts);
drivers/net/phy/bcm-phy-ptp.c
178
struct timespec64 *ts)
drivers/net/phy/bcm-phy-ptp.c
192
ts->tv_sec = (hb[3] << 16) | hb[2];
drivers/net/phy/bcm-phy-ptp.c
193
ts->tv_nsec = (hb[1] << 16) | hb[0];
drivers/net/phy/bcm-phy-ptp.c
219
struct timespec64 *ts,
drivers/net/phy/bcm-phy-ptp.c
238
bcm_ptp_get_framesync_ts(phydev, ts);
drivers/net/phy/bcm-phy-ptp.c
249
struct timespec64 *ts,
drivers/net/phy/bcm-phy-ptp.c
256
err = bcm_ptp_framesync_ts(priv->phydev, sts, ts, priv->nse_ctrl);
drivers/net/phy/bcm-phy-ptp.c
263
const struct timespec64 *ts)
drivers/net/phy/bcm-phy-ptp.c
272
bcm_phy_write_exp(phydev, TIME_CODE_0, ts->tv_nsec);
drivers/net/phy/bcm-phy-ptp.c
273
bcm_phy_write_exp(phydev, TIME_CODE_1, ts->tv_nsec >> 16);
drivers/net/phy/bcm-phy-ptp.c
274
bcm_phy_write_exp(phydev, TIME_CODE_2, ts->tv_sec);
drivers/net/phy/bcm-phy-ptp.c
275
bcm_phy_write_exp(phydev, TIME_CODE_3, ts->tv_sec >> 16);
drivers/net/phy/bcm-phy-ptp.c
276
bcm_phy_write_exp(phydev, TIME_CODE_4, ts->tv_sec >> 32);
drivers/net/phy/bcm-phy-ptp.c
279
ns = timespec64_to_ns(ts);
drivers/net/phy/bcm-phy-ptp.c
296
const struct timespec64 *ts)
drivers/net/phy/bcm-phy-ptp.c
302
err = bcm_ptp_settime_locked(priv, ts);
drivers/net/phy/bcm-phy-ptp.c
311
struct timespec64 ts;
drivers/net/phy/bcm-phy-ptp.c
315
err = bcm_ptp_framesync_ts(priv->phydev, NULL, &ts, priv->nse_ctrl);
drivers/net/phy/bcm-phy-ptp.c
317
ns = timespec64_to_ns(&ts) + delta_ns;
drivers/net/phy/bcm-phy-ptp.c
318
ts = ns_to_timespec64(ns);
drivers/net/phy/bcm-phy-ptp.c
319
err = bcm_ptp_settime_locked(priv, &ts);
drivers/net/phy/bcm-phy-ptp.c
422
u16 ts[4], reg;
drivers/net/phy/bcm-phy-ptp.c
435
ts[0] = bcm_phy_read_exp(phydev, TS_REG_0);
drivers/net/phy/bcm-phy-ptp.c
436
ts[1] = bcm_phy_read_exp(phydev, TS_REG_1);
drivers/net/phy/bcm-phy-ptp.c
437
ts[2] = bcm_phy_read_exp(phydev, TS_REG_2);
drivers/net/phy/bcm-phy-ptp.c
438
ts[3] = bcm_phy_read_exp(phydev, TS_REG_3);
drivers/net/phy/bcm-phy-ptp.c
452
sec = (ts[3] << 16) | ts[2];
drivers/net/phy/bcm-phy-ptp.c
453
nsec = (ts[1] << 16) | ts[0];
drivers/net/phy/bcm-phy-ptp.c
541
struct timespec64 ts;
drivers/net/phy/bcm-phy-ptp.c
553
bcm_ptp_framesync_ts(phydev, NULL, &ts, priv->nse_ctrl);
drivers/net/phy/bcm-phy-ptp.c
556
next = NSEC_PER_SEC - ts.tv_nsec;
drivers/net/phy/bcm-phy-ptp.c
557
ts.tv_sec += next < NSEC_PER_MSEC ? 2 : 1;
drivers/net/phy/bcm-phy-ptp.c
558
ts.tv_nsec = 0;
drivers/net/phy/bcm-phy-ptp.c
560
ns = timespec64_to_ns(&ts);
drivers/net/phy/bcm-phy-ptp.c
635
struct timespec64 ts;
drivers/net/phy/bcm-phy-ptp.c
650
bcm_ptp_get_framesync_ts(phydev, &ts);
drivers/net/phy/bcm-phy-ptp.c
654
event.timestamp = timespec64_to_ns(&ts);
drivers/net/phy/dp83640.c
258
const struct timespec64 *ts, u16 cmd)
drivers/net/phy/dp83640.c
260
ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec & 0xffff);/* ns[15:0] */
drivers/net/phy/dp83640.c
261
ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_nsec >> 16); /* ns[31:16] */
drivers/net/phy/dp83640.c
262
ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec & 0xffff); /* sec[15:0] */
drivers/net/phy/dp83640.c
263
ext_write(bc, dev, PAGE4, PTP_TDR, ts->tv_sec >> 16); /* sec[31:16]*/
drivers/net/phy/dp83640.c
412
struct timespec64 ts;
drivers/net/phy/dp83640.c
417
ts = ns_to_timespec64(delta);
drivers/net/phy/dp83640.c
421
err = tdr_write(1, phydev, &ts, PTP_STEP_CLK);
drivers/net/phy/dp83640.c
429
struct timespec64 *ts)
drivers/net/phy/dp83640.c
447
ts->tv_nsec = val[0] | (val[1] << 16);
drivers/net/phy/dp83640.c
448
ts->tv_sec = val[2] | (val[3] << 16);
drivers/net/phy/dp83640.c
454
const struct timespec64 *ts)
drivers/net/phy/dp83640.c
463
err = tdr_write(1, phydev, ts, PTP_LOAD_CLK);
drivers/net/phy/dp83640.c
623
struct timespec64 ts;
drivers/net/phy/dp83640.c
711
ts = ns_to_timespec64(diff);
drivers/net/phy/dp83640.c
712
tdr_write(0, tmp->phydev, &ts, PTP_STEP_CLK);
drivers/net/phy/micrel.c
3479
struct timespec64 *ts)
drivers/net/phy/micrel.c
3490
ts->tv_sec = seconds;
drivers/net/phy/micrel.c
3491
ts->tv_nsec = nano_seconds;
drivers/net/phy/micrel.c
3497
const struct timespec64 *ts)
drivers/net/phy/micrel.c
3504
lan8814_ptp_clock_set(phydev, ts->tv_sec, ts->tv_nsec);
drivers/net/phy/micrel.c
5239
struct timespec64 ts;
drivers/net/phy/micrel.c
5254
ts.tv_sec = ptp_priv->seconds;
drivers/net/phy/micrel.c
5262
if ((ts.tv_sec & GENMASK(1, 0)) == 0 && (ts_header >> 30) == 3)
drivers/net/phy/micrel.c
5263
ts.tv_sec -= GENMASK(1, 0) + 1;
drivers/net/phy/micrel.c
5264
else if ((ts.tv_sec & GENMASK(1, 0)) == 3 && (ts_header >> 30) == 0)
drivers/net/phy/micrel.c
5265
ts.tv_sec += 1;
drivers/net/phy/micrel.c
5268
ktime_set((ts.tv_sec & ~(GENMASK(1, 0))) | ts_header >> 30,
drivers/net/phy/micrel.c
5312
const struct timespec64 *ts)
drivers/net/phy/micrel.c
5315
ts->tv_sec + LAN8841_BUFFER_TIME, 0);
drivers/net/phy/micrel.c
5356
const struct timespec64 *ts)
drivers/net/phy/micrel.c
5366
phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_SET_SEC_LO, lower_16_bits(ts->tv_sec));
drivers/net/phy/micrel.c
5367
phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_SET_SEC_MID, upper_16_bits(ts->tv_sec));
drivers/net/phy/micrel.c
5368
phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_SET_SEC_HI, upper_32_bits(ts->tv_sec) & 0xffff);
drivers/net/phy/micrel.c
5369
phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_SET_NS_LO, lower_16_bits(ts->tv_nsec));
drivers/net/phy/micrel.c
5370
phy_write_mmd(phydev, 2, LAN8841_PTP_LTC_SET_NS_HI, upper_16_bits(ts->tv_nsec) & 0x3fff);
drivers/net/phy/micrel.c
5375
ret = lan8841_ptp_update_target(ptp_priv, ts);
drivers/net/phy/micrel.c
5379
ptp_priv->seconds = ts->tv_sec;
drivers/net/phy/micrel.c
5393
struct timespec64 *ts)
drivers/net/phy/micrel.c
5418
set_normalized_timespec64(ts, s, ns);
drivers/net/phy/micrel.c
5423
struct timespec64 *ts)
drivers/net/phy/micrel.c
5443
set_normalized_timespec64(ts, s, 0);
drivers/net/phy/micrel.c
5457
struct timespec64 ts;
drivers/net/phy/micrel.c
5473
ptp->gettime64(ptp, &ts);
drivers/net/phy/micrel.c
5475
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/phy/micrel.c
5476
ts = ns_to_timespec64(now + delta);
drivers/net/phy/micrel.c
5478
ptp->settime64(ptp, &ts);
drivers/net/phy/micrel.c
5526
ptp->gettime64(ptp, &ts);
drivers/net/phy/micrel.c
5528
ret = lan8841_ptp_update_target(ptp_priv, &ts);
drivers/net/phy/micrel.c
5949
struct timespec64 ts;
drivers/net/phy/micrel.c
5952
lan8841_ptp_getseconds(&ptp_priv->ptp_clock_info, &ts);
drivers/net/phy/micrel.c
5955
ptp_priv->seconds = ts.tv_sec;
drivers/net/phy/microchip_rds_ptp.c
646
struct timespec64 ts;
drivers/net/phy/microchip_rds_ptp.c
662
info->gettime64(info, &ts);
drivers/net/phy/microchip_rds_ptp.c
664
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/phy/microchip_rds_ptp.c
665
ts = ns_to_timespec64(now + delta);
drivers/net/phy/microchip_rds_ptp.c
667
info->settime64(info, &ts);
drivers/net/phy/microchip_rds_ptp.c
739
info->gettime64(info, &ts);
drivers/net/phy/microchip_rds_ptp.c
747
ts.tv_sec + MCHP_RDS_PTP_BUFFER_TIME, 0);
drivers/net/phy/microchip_rds_ptp.c
799
struct timespec64 *ts)
drivers/net/phy/microchip_rds_ptp.c
851
set_normalized_timespec64(ts, secs, nsecs);
drivers/net/phy/microchip_rds_ptp.c
862
const struct timespec64 *ts)
drivers/net/phy/microchip_rds_ptp.c
872
lower_16_bits(ts->tv_sec));
drivers/net/phy/microchip_rds_ptp.c
878
upper_16_bits(ts->tv_sec));
drivers/net/phy/microchip_rds_ptp.c
884
upper_32_bits(ts->tv_sec) & GENMASK(15, 0));
drivers/net/phy/microchip_rds_ptp.c
890
lower_16_bits(ts->tv_nsec));
drivers/net/phy/microchip_rds_ptp.c
896
upper_16_bits(ts->tv_nsec) & GENMASK(13, 0));
drivers/net/phy/mscc/mscc_ptp.c
1237
struct timespec64 ts;
drivers/net/phy/mscc/mscc_ptp.c
1245
vsc85xx_gettime(info, &ts);
drivers/net/phy/mscc/mscc_ptp.c
1250
if (ts.tv_nsec < VSC8531_SKB_CB(rx_skb)->ns)
drivers/net/phy/mscc/mscc_ptp.c
1251
ts.tv_sec--;
drivers/net/phy/mscc/mscc_ptp.c
1253
shhwtstamps->hwtstamp = ktime_set(ts.tv_sec,
drivers/net/phy/mscc/mscc_ptp.c
645
static int __vsc85xx_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/net/phy/mscc/mscc_ptp.c
668
ts->tv_sec = ((time64_t)val) << 32;
drivers/net/phy/mscc/mscc_ptp.c
672
ts->tv_sec += val;
drivers/net/phy/mscc/mscc_ptp.c
674
ts->tv_nsec = vsc85xx_ts_read_csr(phydev, PROCESSOR,
drivers/net/phy/mscc/mscc_ptp.c
683
static int vsc85xx_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/net/phy/mscc/mscc_ptp.c
690
__vsc85xx_gettime(info, ts);
drivers/net/phy/mscc/mscc_ptp.c
697
const struct timespec64 *ts)
drivers/net/phy/mscc/mscc_ptp.c
708
PTP_LTC_LOAD_SEC_MSB(ts->tv_sec));
drivers/net/phy/mscc/mscc_ptp.c
710
PTP_LTC_LOAD_SEC_LSB(ts->tv_sec));
drivers/net/phy/mscc/mscc_ptp.c
712
PTP_LTC_LOAD_NS(ts->tv_nsec));
drivers/net/phy/mscc/mscc_ptp.c
734
const struct timespec64 *ts)
drivers/net/phy/mscc/mscc_ptp.c
741
__vsc85xx_settime(info, ts);
drivers/net/phy/mscc/mscc_ptp.c
756
struct timespec64 ts;
drivers/net/phy/mscc/mscc_ptp.c
761
__vsc85xx_gettime(info, &ts);
drivers/net/phy/mscc/mscc_ptp.c
762
now = ktime_to_ns(timespec64_to_ktime(ts));
drivers/net/phy/mscc/mscc_ptp.c
763
ts = ns_to_timespec64(now + delta);
drivers/net/phy/mscc/mscc_ptp.c
764
__vsc85xx_settime(info, &ts);
drivers/net/phy/nxp-c45-tja11xx.c
386
struct timespec64 *ts,
drivers/net/phy/nxp-c45-tja11xx.c
393
ts->tv_nsec = phy_read_mmd(priv->phydev, MDIO_MMD_VEND1,
drivers/net/phy/nxp-c45-tja11xx.c
395
ts->tv_nsec |= phy_read_mmd(priv->phydev, MDIO_MMD_VEND1,
drivers/net/phy/nxp-c45-tja11xx.c
397
ts->tv_sec = phy_read_mmd(priv->phydev, MDIO_MMD_VEND1,
drivers/net/phy/nxp-c45-tja11xx.c
399
ts->tv_sec |= phy_read_mmd(priv->phydev, MDIO_MMD_VEND1,
drivers/net/phy/nxp-c45-tja11xx.c
406
struct timespec64 *ts,
drivers/net/phy/nxp-c45-tja11xx.c
412
_nxp_c45_ptp_gettimex64(ptp, ts, sts);
drivers/net/phy/nxp-c45-tja11xx.c
419
const struct timespec64 *ts)
drivers/net/phy/nxp-c45-tja11xx.c
425
ts->tv_nsec);
drivers/net/phy/nxp-c45-tja11xx.c
427
ts->tv_nsec >> 16);
drivers/net/phy/nxp-c45-tja11xx.c
429
ts->tv_sec);
drivers/net/phy/nxp-c45-tja11xx.c
431
ts->tv_sec >> 16);
drivers/net/phy/nxp-c45-tja11xx.c
438
const struct timespec64 *ts)
drivers/net/phy/nxp-c45-tja11xx.c
443
_nxp_c45_ptp_settime64(ptp, ts);
drivers/net/phy/nxp-c45-tja11xx.c
495
static void nxp_c45_reconstruct_ts(struct timespec64 *ts,
drivers/net/phy/nxp-c45-tja11xx.c
498
ts->tv_nsec = hwts->nsec;
drivers/net/phy/nxp-c45-tja11xx.c
499
if ((ts->tv_sec & TS_SEC_MASK) < (hwts->sec & TS_SEC_MASK))
drivers/net/phy/nxp-c45-tja11xx.c
500
ts->tv_sec -= TS_SEC_MASK + 1;
drivers/net/phy/nxp-c45-tja11xx.c
501
ts->tv_sec &= ~TS_SEC_MASK;
drivers/net/phy/nxp-c45-tja11xx.c
502
ts->tv_sec |= hwts->sec & TS_SEC_MASK;
drivers/net/phy/nxp-c45-tja11xx.c
667
struct timespec64 ts;
drivers/net/phy/nxp-c45-tja11xx.c
685
nxp_c45_ptp_gettimex64(&priv->caps, &ts, NULL);
drivers/net/phy/nxp-c45-tja11xx.c
686
nxp_c45_reconstruct_ts(&ts, txts);
drivers/net/phy/nxp-c45-tja11xx.c
688
ts_ns = timespec64_to_ns(&ts);
drivers/net/phy/nxp-c45-tja11xx.c
706
struct timespec64 ts;
drivers/net/phy/nxp-c45-tja11xx.c
723
nxp_c45_ptp_gettimex64(&priv->caps, &ts, NULL);
drivers/net/phy/nxp-c45-tja11xx.c
727
nxp_c45_reconstruct_ts(&ts, &hwts);
drivers/net/phy/nxp-c45-tja11xx.c
729
shhwtstamps_rx->hwtstamp = ns_to_ktime(timespec64_to_ns(&ts));
drivers/net/phy/nxp-c45-tja11xx.c
735
ts_valid = data->get_extts(priv, &ts);
drivers/net/phy/nxp-c45-tja11xx.c
736
if (ts_valid && timespec64_compare(&ts, &priv->extts_ts) != 0) {
drivers/net/phy/nxp-c45-tja11xx.c
737
priv->extts_ts = ts;
drivers/net/phy/nxp-c45-tja11xx.c
740
event.timestamp = ns_to_ktime(timespec64_to_ns(&ts));
drivers/net/slip/slhc.c
133
ts = comp->tstate;
drivers/net/slip/slhc.c
135
ts[i].cs_this = i;
drivers/net/slip/slhc.c
136
ts[i].next = &(ts[i - 1]);
drivers/net/slip/slhc.c
138
ts[0].next = &(ts[comp->tslot_limit]);
drivers/net/slip/slhc.c
139
ts[0].cs_this = 0;
drivers/net/slip/slhc.c
95
struct cstate *ts;
drivers/net/vmxnet3/vmxnet3_defs.h
270
struct Vmxnet3TSInfo ts;
drivers/net/vmxnet3/vmxnet3_defs.h
275
struct Vmxnet3TSInfo ts;
drivers/net/vmxnet3/vmxnet3_defs.h
306
u32 ts:1; /* Tag is stripped */
drivers/net/vmxnet3/vmxnet3_defs.h
312
u32 ts:1; /* Tag is stripped */
drivers/net/vmxnet3/vmxnet3_drv.c
1330
ctx.ts_txd->ts.tsData = vmxnet3_get_cycles(VMXNET3_PMC_PSEUDO_TSC);
drivers/net/vmxnet3/vmxnet3_drv.c
1331
ctx.ts_txd->ts.tsi = 1;
drivers/net/vmxnet3/vmxnet3_drv.c
1723
ts_rxd->ts.tsData = vmxnet3_get_cycles(VMXNET3_PMC_PSEUDO_TSC);
drivers/net/vmxnet3/vmxnet3_drv.c
1724
ts_rxd->ts.tsi = 1;
drivers/net/vmxnet3/vmxnet3_drv.c
1946
if (unlikely(rcd->ts))
drivers/net/vmxnet3/vmxnet3_drv.c
927
ctx->ts_txd->ts.tsi = 0;
drivers/net/wireless/ath/ath10k/wmi.c
4116
pe.ts = tsf64;
drivers/net/wireless/ath/ath10k/wmi.c
4123
pe.freq, pe.width, pe.rssi, pe.ts);
drivers/net/wireless/ath/ath11k/debugfs_sta.c
130
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/debugfs_sta.c
132
ath11k_dp_tx_update_txcompl(ar, ts);
drivers/net/wireless/ath/ath11k/debugfs_sta.h
23
struct hal_tx_status *ts);
drivers/net/wireless/ath/ath11k/debugfs_sta.h
37
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp.h
52
unsigned long ts;
drivers/net/wireless/ath/ath11k/dp_rx.c
779
elem->ts = jiffies;
drivers/net/wireless/ath/ath11k/dp_rx.c
790
time_after(jiffies, elem->ts +
drivers/net/wireless/ath/ath11k/dp_tx.c
318
struct ath11k_dp_htt_wbm_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp_tx.c
328
msdu = idr_remove(&tx_ring->txbuf_idr, ts->msdu_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
333
ts->msdu_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
354
if (ts->acked) {
drivers/net/wireless/ath/ath11k/dp_tx.c
357
info->status.ack_signal = ts->ack_rssi;
drivers/net/wireless/ath/ath11k/dp_tx.c
371
peer = ath11k_peer_find_by_id(ab, ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
375
ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
395
struct ath11k_dp_htt_wbm_tx_status ts = {};
drivers/net/wireless/ath/ath11k/dp_tx.c
406
ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK);
drivers/net/wireless/ath/ath11k/dp_tx.c
407
ts.msdu_id = msdu_id;
drivers/net/wireless/ath/ath11k/dp_tx.c
408
ts.ack_rssi = FIELD_GET(HTT_TX_WBM_COMP_INFO1_ACK_RSSI,
drivers/net/wireless/ath/ath11k/dp_tx.c
412
ts.peer_id = FIELD_GET(HTT_TX_WBM_COMP_INFO2_SW_PEER_ID,
drivers/net/wireless/ath/ath11k/dp_tx.c
415
ts.peer_id = HTT_INVALID_PEER_ID;
drivers/net/wireless/ath/ath11k/dp_tx.c
417
ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts);
drivers/net/wireless/ath/ath11k/dp_tx.c
437
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp_tx.c
441
if (ts->try_cnt > 1) {
drivers/net/wireless/ath/ath11k/dp_tx.c
442
peer_stats->retry_pkts += ts->try_cnt - 1;
drivers/net/wireless/ath/ath11k/dp_tx.c
443
peer_stats->retry_bytes += (ts->try_cnt - 1) * msdu->len;
drivers/net/wireless/ath/ath11k/dp_tx.c
445
if (ts->status != HAL_WBM_TQM_REL_REASON_FRAME_ACKED) {
drivers/net/wireless/ath/ath11k/dp_tx.c
452
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp_tx.c
467
peer = ath11k_peer_find_by_id(ab, ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
470
"failed to find the peer by id %u\n", ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
479
ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
481
ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
483
ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
484
bw = FIELD_GET(HAL_TX_RATE_STATS_INFO0_BW, ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
485
ru_tones = FIELD_GET(HAL_TX_RATE_STATS_INFO0_TONES_IN_RU, ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
486
ofdma = FIELD_GET(HAL_TX_RATE_STATS_INFO0_OFDMA_TX, ts->rate_stats);
drivers/net/wireless/ath/ath11k/dp_tx.c
553
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp_tx.c
564
if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) {
drivers/net/wireless/ath/ath11k/dp_tx.c
589
if (ts->status == HAL_WBM_TQM_REL_REASON_FRAME_ACKED &&
drivers/net/wireless/ath/ath11k/dp_tx.c
592
info->status.ack_signal = ts->ack_rssi;
drivers/net/wireless/ath/ath11k/dp_tx.c
601
if (ts->status == HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX &&
drivers/net/wireless/ath/ath11k/dp_tx.c
607
if (ts->flags & HAL_TX_STATUS_FLAGS_FIRST_MSDU) {
drivers/net/wireless/ath/ath11k/dp_tx.c
609
ar->last_ppdu_id = ts->ppdu_id;
drivers/net/wireless/ath/ath11k/dp_tx.c
610
} else if (ar->last_ppdu_id == ts->ppdu_id ||
drivers/net/wireless/ath/ath11k/dp_tx.c
614
ath11k_dp_tx_update_txcompl(ar, ts);
drivers/net/wireless/ath/ath11k/dp_tx.c
619
ath11k_dp_tx_update_txcompl(ar, ts);
drivers/net/wireless/ath/ath11k/dp_tx.c
623
ar->last_ppdu_id = ts->ppdu_id;
drivers/net/wireless/ath/ath11k/dp_tx.c
626
ath11k_dp_tx_cache_peer_stats(ar, msdu, ts);
drivers/net/wireless/ath/ath11k/dp_tx.c
630
peer = ath11k_peer_find_by_id(ab, ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
634
ts->peer_id);
drivers/net/wireless/ath/ath11k/dp_tx.c
658
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath11k/dp_tx.c
660
ts->buf_rel_source =
drivers/net/wireless/ath/ath11k/dp_tx.c
662
if (unlikely(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_FW &&
drivers/net/wireless/ath/ath11k/dp_tx.c
663
ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM))
drivers/net/wireless/ath/ath11k/dp_tx.c
666
if (unlikely(ts->buf_rel_source == HAL_WBM_REL_SRC_MODULE_FW))
drivers/net/wireless/ath/ath11k/dp_tx.c
669
ts->status = FIELD_GET(HAL_WBM_RELEASE_INFO0_TQM_RELEASE_REASON,
drivers/net/wireless/ath/ath11k/dp_tx.c
671
ts->ppdu_id = FIELD_GET(HAL_WBM_RELEASE_INFO1_TQM_STATUS_NUMBER,
drivers/net/wireless/ath/ath11k/dp_tx.c
673
ts->try_cnt = FIELD_GET(HAL_WBM_RELEASE_INFO1_TRANSMIT_COUNT,
drivers/net/wireless/ath/ath11k/dp_tx.c
675
ts->ack_rssi = FIELD_GET(HAL_WBM_RELEASE_INFO2_ACK_FRAME_RSSI,
drivers/net/wireless/ath/ath11k/dp_tx.c
678
ts->flags |= HAL_TX_STATUS_FLAGS_FIRST_MSDU;
drivers/net/wireless/ath/ath11k/dp_tx.c
679
ts->peer_id = FIELD_GET(HAL_WBM_RELEASE_INFO3_PEER_ID, desc->info3);
drivers/net/wireless/ath/ath11k/dp_tx.c
680
ts->tid = FIELD_GET(HAL_WBM_RELEASE_INFO3_TID, desc->info3);
drivers/net/wireless/ath/ath11k/dp_tx.c
682
ts->rate_stats = desc->rate_stats.info0;
drivers/net/wireless/ath/ath11k/dp_tx.c
684
ts->rate_stats = 0;
drivers/net/wireless/ath/ath11k/dp_tx.c
694
struct hal_tx_status ts = {};
drivers/net/wireless/ath/ath11k/dp_tx.c
731
ath11k_dp_tx_status_parse(ab, tx_status, &ts);
drivers/net/wireless/ath/ath11k/dp_tx.c
738
if (unlikely(ts.buf_rel_source == HAL_WBM_REL_SRC_MODULE_FW)) {
drivers/net/wireless/ath/ath11k/dp_tx.c
762
ath11k_dp_tx_complete_msdu(ar, msdu, &ts);
drivers/net/wireless/ath/ath11k/dp_tx.h
20
void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts);
drivers/net/wireless/ath/ath12k/dp_rx.c
476
elem->ts = jiffies;
drivers/net/wireless/ath/ath12k/dp_rx.c
487
time_after(jiffies, elem->ts +
drivers/net/wireless/ath/ath12k/dp_rx.h
47
unsigned long ts;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
417
struct ath12k_dp_htt_wbm_tx_status *ts,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
470
if (ts->acked) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
473
info->status.ack_signal = ts->ack_rssi;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
515
struct ath12k_dp_htt_wbm_tx_status ts = {};
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
527
ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
528
ts.ack_rssi = le32_get_bits(status_desc->info2,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
534
ath12k_dp_tx_htt_tx_complete_buf(dp, desc_params, tx_ring, &ts, peer_id);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
555
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
567
peer = ath12k_dp_link_peer_find_by_peerid(dp_pdev, ts->peer_id);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
570
"failed to find the peer by id %u\n", ts->peer_id);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
590
switch (ts->pkt_type) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
593
ret = ath12k_mac_hw_ratecode_to_legacy_rate(ts->mcs,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
594
ts->pkt_type,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
605
if (ts->mcs > ATH12K_HT_MCS_MAX) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
606
ath12k_warn(dp->ab, "Invalid HT mcs index %d\n", ts->mcs);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
611
txrate.mcs = ts->mcs + 8 * (txrate.nss - 1);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
615
if (ts->sgi)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
619
if (ts->mcs > ATH12K_VHT_MCS_MAX) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
620
ath12k_warn(dp->ab, "Invalid VHT mcs index %d\n", ts->mcs);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
624
txrate.mcs = ts->mcs;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
627
if (ts->sgi)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
631
if (ts->mcs > ATH12K_HE_MCS_MAX) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
632
ath12k_warn(dp->ab, "Invalid HE mcs index %d\n", ts->mcs);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
636
txrate.mcs = ts->mcs;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
638
txrate.he_gi = ath12k_he_gi_to_nl80211_he_gi(ts->sgi);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
641
if (ts->mcs > ATH12K_EHT_MCS_MAX) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
642
ath12k_warn(dp->ab, "Invalid EHT mcs index %d\n", ts->mcs);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
646
txrate.mcs = ts->mcs;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
648
txrate.eht_gi = ath12k_mac_eht_gi_to_nl80211_eht_gi(ts->sgi);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
651
ath12k_warn(dp->ab, "Invalid tx pkt type: %d\n", ts->pkt_type);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
655
txrate.bw = ath12k_mac_bw_to_mac80211_bw(ts->bw);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
657
if (ts->ofdma && ts->pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11AX) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
659
ru_tones = ath12k_mac_he_convert_tones_to_ru_tones(ts->tones);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
664
if (ts->ofdma && ts->pkt_type == HAL_TX_RATE_STATS_PKT_TYPE_11BE) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
667
ath12k_mac_eht_ru_tones_to_nl80211_eht_ru_alloc(ts->tones);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
677
struct hal_tx_status *ts,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
694
if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
738
switch (ts->status) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
742
info->status.ack_signal = ts->ack_rssi;
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
775
ts->status);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
784
ath12k_wifi7_dp_tx_update_txcompl(dp_pdev, ts);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
786
peer = ath12k_dp_link_peer_find_by_peerid(dp_pdev, ts->peer_id);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
790
ts->peer_id);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
814
struct hal_tx_status *ts)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
818
ts->buf_rel_source =
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
820
if (ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_FW &&
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
821
ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
824
if (ts->buf_rel_source == HAL_WBM_REL_SRC_MODULE_FW)
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
827
ts->status = le32_get_bits(desc->info0,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
830
ts->ppdu_id = le32_get_bits(desc->info1,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
833
ts->peer_id = le32_get_bits(desc->info3, HAL_WBM_COMPL_TX_INFO3_PEER_ID);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
835
ts->ack_rssi = le32_get_bits(desc->info2,
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
839
ts->pkt_type = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_PKT_TYPE);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
840
ts->mcs = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_MCS);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
841
ts->sgi = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_SGI);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
842
ts->bw = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_BW);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
843
ts->tones = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_TONES_IN_RU);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
844
ts->ofdma = u32_get_bits(info0, HAL_TX_RATE_STATS_INFO0_OFDMA_TX);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
855
struct hal_tx_status ts = {};
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
899
ath12k_wifi7_dp_tx_status_parse(dp, tx_status, &ts);
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
935
if (ts.buf_rel_source == HAL_WBM_REL_SRC_MODULE_FW) {
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c
954
ath12k_wifi7_dp_tx_complete_msdu(dp_pdev, &desc_params, &ts,
drivers/net/wireless/ath/ath5k/base.c
1712
struct ath5k_txq *txq, struct ath5k_tx_status *ts,
drivers/net/wireless/ath/ath5k/base.c
1733
for (i = 0; i < ts->ts_final_idx; i++) {
drivers/net/wireless/ath/ath5k/base.c
1740
info->status.rates[ts->ts_final_idx].count = ts->ts_final_retry;
drivers/net/wireless/ath/ath5k/base.c
1741
if (ts->ts_final_idx + 1 < IEEE80211_TX_MAX_RATES)
drivers/net/wireless/ath/ath5k/base.c
1742
info->status.rates[ts->ts_final_idx + 1].idx = -1;
drivers/net/wireless/ath/ath5k/base.c
1744
if (unlikely(ts->ts_status)) {
drivers/net/wireless/ath/ath5k/base.c
1746
if (ts->ts_status & AR5K_TXERR_FILT) {
drivers/net/wireless/ath/ath5k/base.c
1750
if (ts->ts_status & AR5K_TXERR_XRETRY)
drivers/net/wireless/ath/ath5k/base.c
1752
if (ts->ts_status & AR5K_TXERR_FIFO)
drivers/net/wireless/ath/ath5k/base.c
1756
info->status.ack_signal = ts->ts_rssi;
drivers/net/wireless/ath/ath5k/base.c
1759
info->status.rates[ts->ts_final_idx].count++;
drivers/net/wireless/ath/ath5k/base.c
1768
if (ts->ts_antenna > 0 && ts->ts_antenna < 5)
drivers/net/wireless/ath/ath5k/base.c
1769
ah->stats.antenna_tx[ts->ts_antenna]++;
drivers/net/wireless/ath/ath5k/base.c
1773
trace_ath5k_tx_complete(ah, skb, txq, ts);
drivers/net/wireless/ath/ath5k/base.c
1780
struct ath5k_tx_status ts = {};
drivers/net/wireless/ath/ath5k/base.c
1795
ret = ah->ah_proc_tx_desc(ah, ds, &ts);
drivers/net/wireless/ath/ath5k/base.c
1810
ath5k_tx_frame_completed(ah, skb, txq, &ts, bf);
drivers/net/wireless/ath/ath5k/debug.c
1089
struct ath5k_tx_status ts = {};
drivers/net/wireless/ath/ath5k/debug.c
1095
done = ah->ah_proc_tx_desc(ah, bf->desc, &ts);
drivers/net/wireless/ath/ath5k/debug.c
1102
done ? ' ' : (ts.ts_status == 0) ? '*' : '!');
drivers/net/wireless/ath/ath5k/desc.c
444
struct ath5k_tx_status *ts)
drivers/net/wireless/ath/ath5k/desc.c
457
ts->ts_tstamp = AR5K_REG_MS(tx_status->tx_status_0,
drivers/net/wireless/ath/ath5k/desc.c
459
ts->ts_shortretry = AR5K_REG_MS(tx_status->tx_status_0,
drivers/net/wireless/ath/ath5k/desc.c
461
ts->ts_final_retry = AR5K_REG_MS(tx_status->tx_status_0,
drivers/net/wireless/ath/ath5k/desc.c
464
ts->ts_seqnum = AR5K_REG_MS(tx_status->tx_status_1,
drivers/net/wireless/ath/ath5k/desc.c
466
ts->ts_rssi = AR5K_REG_MS(tx_status->tx_status_1,
drivers/net/wireless/ath/ath5k/desc.c
468
ts->ts_antenna = 1;
drivers/net/wireless/ath/ath5k/desc.c
469
ts->ts_status = 0;
drivers/net/wireless/ath/ath5k/desc.c
470
ts->ts_final_idx = 0;
drivers/net/wireless/ath/ath5k/desc.c
475
ts->ts_status |= AR5K_TXERR_XRETRY;
drivers/net/wireless/ath/ath5k/desc.c
478
ts->ts_status |= AR5K_TXERR_FIFO;
drivers/net/wireless/ath/ath5k/desc.c
481
ts->ts_status |= AR5K_TXERR_FILT;
drivers/net/wireless/ath/ath5k/desc.c
496
struct ath5k_tx_status *ts)
drivers/net/wireless/ath/ath5k/desc.c
514
ts->ts_tstamp = AR5K_REG_MS(txstat0,
drivers/net/wireless/ath/ath5k/desc.c
516
ts->ts_shortretry = AR5K_REG_MS(txstat0,
drivers/net/wireless/ath/ath5k/desc.c
518
ts->ts_final_retry = AR5K_REG_MS(txstat0,
drivers/net/wireless/ath/ath5k/desc.c
520
ts->ts_seqnum = AR5K_REG_MS(txstat1,
drivers/net/wireless/ath/ath5k/desc.c
522
ts->ts_rssi = AR5K_REG_MS(txstat1,
drivers/net/wireless/ath/ath5k/desc.c
524
ts->ts_antenna = (txstat1 &
drivers/net/wireless/ath/ath5k/desc.c
526
ts->ts_status = 0;
drivers/net/wireless/ath/ath5k/desc.c
528
ts->ts_final_idx = AR5K_REG_MS(txstat1,
drivers/net/wireless/ath/ath5k/desc.c
534
ts->ts_status |= AR5K_TXERR_XRETRY;
drivers/net/wireless/ath/ath5k/desc.c
537
ts->ts_status |= AR5K_TXERR_FIFO;
drivers/net/wireless/ath/ath5k/desc.c
540
ts->ts_status |= AR5K_TXERR_FILT;
drivers/net/wireless/ath/ath5k/trace.h
67
struct ath5k_txq *q, struct ath5k_tx_status *ts),
drivers/net/wireless/ath/ath5k/trace.h
69
TP_ARGS(priv, skb, q, ts),
drivers/net/wireless/ath/ath5k/trace.h
84
__entry->ts_status = ts->ts_status;
drivers/net/wireless/ath/ath5k/trace.h
85
__entry->ts_rssi = ts->ts_rssi;
drivers/net/wireless/ath/ath5k/trace.h
86
__entry->ts_antenna = ts->ts_antenna;
drivers/net/wireless/ath/ath6kl/wmi.c
1528
struct ieee80211_tspec_ie *ts;
drivers/net/wireless/ath/ath6kl/wmi.c
1544
ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion);
drivers/net/wireless/ath/ath6kl/wmi.c
1545
tsinfo = le16_to_cpu(ts->tsinfo);
drivers/net/wireless/ath/ath6kl/wmi.c
1574
ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion);
drivers/net/wireless/ath/ath6kl/wmi.c
1575
tsinfo = le16_to_cpu(ts->tsinfo);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
317
struct ath_tx_status *ts)
drivers/net/wireless/ath/ath9k/ar9002_mac.c
326
ts->ts_tstamp = ads->AR_SendTimestamp;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
327
ts->ts_status = 0;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
328
ts->ts_flags = 0;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
331
ts->ts_status |= ATH9K_TXERR_XTXOP;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
332
ts->tid = MS(status, AR_TxTid);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
333
ts->ts_rateindex = MS(status, AR_FinalTxIdx);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
334
ts->ts_seqnum = MS(status, AR_SeqNum);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
337
ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
338
ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
339
ts->ts_rssi_ctl2 = MS(status, AR_TxRSSIAnt02);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
341
ts->ts_flags |= ATH9K_TX_BA;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
342
ts->ba_low = ads->AR_BaBitmapLow;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
343
ts->ba_high = ads->AR_BaBitmapHigh;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
348
ts->ts_status |= ATH9K_TX_ACKED;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
351
ts->ts_status |= ATH9K_TXERR_XRETRY;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
353
ts->ts_status |= ATH9K_TXERR_FILT;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
355
ts->ts_status |= ATH9K_TXERR_FIFO;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
360
ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
362
ts->ts_flags |= ATH9K_TX_DESC_CFG_ERR;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
364
ts->ts_flags |= ATH9K_TX_DATA_UNDERRUN;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
368
ts->ts_flags |= ATH9K_TX_DELIM_UNDERRUN;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
371
ts->ts_shortretry = MS(status, AR_RTSFailCnt);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
372
ts->ts_longretry = MS(status, AR_DataFailCnt);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
373
ts->ts_virtcol = MS(status, AR_VirtRetryCnt);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
376
ts->ts_rssi = MS(status, AR_TxRSSICombined);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
377
ts->ts_rssi_ext0 = MS(status, AR_TxRSSIAnt10);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
378
ts->ts_rssi_ext1 = MS(status, AR_TxRSSIAnt11);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
379
ts->ts_rssi_ext2 = MS(status, AR_TxRSSIAnt12);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
381
ts->evm0 = ads->AR_TxEVM0;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
382
ts->evm1 = ads->AR_TxEVM1;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
383
ts->evm2 = ads->AR_TxEVM2;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
369
struct ath_tx_status *ts)
drivers/net/wireless/ath/ath9k/ar9003_mac.c
390
ts->ts_rateindex = MS(status, AR_FinalTxIdx);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
391
ts->ts_seqnum = MS(status, AR_SeqNum);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
392
ts->tid = MS(status, AR_TxTid);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
394
ts->qid = MS(ads->ds_info, AR_TxQcuNum);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
395
ts->desc_id = MS(ads->status1, AR_TxDescId);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
396
ts->ts_tstamp = ads->status4;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
397
ts->ts_status = 0;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
398
ts->ts_flags = 0;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
401
ts->ts_status |= ATH9K_TXERR_XTXOP;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
403
ts->ts_rssi_ctl0 = MS(status, AR_TxRSSIAnt00);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
404
ts->ts_rssi_ctl1 = MS(status, AR_TxRSSIAnt01);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
405
ts->ts_rssi_ctl2 = MS(status, AR_TxRSSIAnt02);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
407
ts->ts_flags |= ATH9K_TX_BA;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
408
ts->ba_low = ads->status5;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
409
ts->ba_high = ads->status6;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
414
ts->ts_status |= ATH9K_TXERR_XRETRY;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
416
ts->ts_status |= ATH9K_TXERR_FILT;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
418
ts->ts_status |= ATH9K_TXERR_FIFO;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
422
ts->ts_status |= ATH9K_TXERR_TIMER_EXPIRED;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
424
ts->ts_flags |= ATH9K_TX_DESC_CFG_ERR;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
426
ts->ts_flags |= ATH9K_TX_DATA_UNDERRUN;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
430
ts->ts_flags |= ATH9K_TX_DELIM_UNDERRUN;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
433
ts->ts_shortretry = MS(status, AR_RTSFailCnt);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
434
ts->ts_longretry = MS(status, AR_DataFailCnt);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
435
ts->ts_virtcol = MS(status, AR_VirtRetryCnt);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
438
ts->ts_rssi = MS(status, AR_TxRSSICombined);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
439
ts->ts_rssi_ext0 = MS(status, AR_TxRSSIAnt10);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
440
ts->ts_rssi_ext1 = MS(status, AR_TxRSSIAnt11);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
441
ts->ts_rssi_ext2 = MS(status, AR_TxRSSIAnt12);
drivers/net/wireless/ath/ath9k/channel.c
1229
ktime_t ts;
drivers/net/wireless/ath/ath9k/channel.c
1256
ts = ktime_get_raw();
drivers/net/wireless/ath/ath9k/channel.c
1299
ath9k_hw_get_tsf_offset(ts, 0);
drivers/net/wireless/ath/ath9k/channel.c
235
ktime_t ts = ktime_get_raw();
drivers/net/wireless/ath/ath9k/channel.c
236
s64 ms = ktime_ms_delta(ts, sc->last_event_time);
drivers/net/wireless/ath/ath9k/channel.c
238
sc->last_event_time = ts;
drivers/net/wireless/ath/ath9k/channel.c
333
ktime_t ts;
drivers/net/wireless/ath/ath9k/channel.c
344
ts = ktime_get_raw();
drivers/net/wireless/ath/ath9k/channel.c
346
ath9k_hw_get_tsf_offset(cur->tsf_ts, ts);
drivers/net/wireless/ath/ath9k/channel.c
349
prev_tsf -= ath9k_hw_get_tsf_offset(prev->tsf_ts, ts);
drivers/net/wireless/ath/ath9k/debug.c
813
struct ath_tx_status *ts, struct ath_txq *txq,
drivers/net/wireless/ath/ath9k/debug.c
827
if (ts->ts_status & ATH9K_TXERR_XRETRY)
drivers/net/wireless/ath/ath9k/debug.c
833
if (ts->ts_status & ATH9K_TXERR_FILT)
drivers/net/wireless/ath/ath9k/debug.c
835
if (ts->ts_status & ATH9K_TXERR_FIFO)
drivers/net/wireless/ath/ath9k/debug.c
837
if (ts->ts_status & ATH9K_TXERR_XTXOP)
drivers/net/wireless/ath/ath9k/debug.c
839
if (ts->ts_status & ATH9K_TXERR_TIMER_EXPIRED)
drivers/net/wireless/ath/ath9k/debug.c
841
if (ts->ts_flags & ATH9K_TX_DESC_CFG_ERR)
drivers/net/wireless/ath/ath9k/debug.c
843
if (ts->ts_flags & ATH9K_TX_DATA_UNDERRUN)
drivers/net/wireless/ath/ath9k/debug.c
845
if (ts->ts_flags & ATH9K_TX_DELIM_UNDERRUN)
drivers/net/wireless/ath/ath9k/debug.h
262
struct ath_tx_status *ts, struct ath_txq *txq,
drivers/net/wireless/ath/ath9k/debug.h
298
struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/dfs.c
332
pe.ts = mactime;
drivers/net/wireless/ath/ath9k/dfs.c
349
ard.pulse_bw_info, pe.freq, pe.ts, pe.width, pe.rssi,
drivers/net/wireless/ath/ath9k/dfs.c
350
pe.ts - sc->dfs_prev_pulse_ts);
drivers/net/wireless/ath/ath9k/dfs.c
351
sc->dfs_prev_pulse_ts = pe.ts;
drivers/net/wireless/ath/ath9k/dynack.c
161
st_ts = &da->st_rbf.ts[da->st_rbf.h_rb];
drivers/net/wireless/ath/ath9k/dynack.c
208
struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/dynack.c
215
u32 dur = ts->duration;
drivers/net/wireless/ath/ath9k/dynack.c
226
if (ts->ts_status & ATH9K_TXERR_XRETRY) {
drivers/net/wireless/ath/ath9k/dynack.c
247
ridx = ts->ts_rateindex;
drivers/net/wireless/ath/ath9k/dynack.c
249
da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp;
drivers/net/wireless/ath/ath9k/dynack.c
271
da->st_rbf.ts[da->st_rbf.t_rb].dur = dur;
drivers/net/wireless/ath/ath9k/dynack.c
278
hdr->addr1, ts->ts_tstamp, dur, da->st_rbf.h_rb,
drivers/net/wireless/ath/ath9k/dynack.c
295
u32 ts)
drivers/net/wireless/ath/ath9k/dynack.c
305
da->ack_rbf.tstamp[da->ack_rbf.t_rb] = ts;
drivers/net/wireless/ath/ath9k/dynack.c
312
ts, da->ack_rbf.h_rb, da->ack_rbf.t_rb);
drivers/net/wireless/ath/ath9k/dynack.h
101
struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/dynack.h
56
struct ts_info ts[ATH_DYN_BUF];
drivers/net/wireless/ath/ath9k/dynack.h
87
void ath_dynack_sample_ack_ts(struct ath_hw *ah, struct sk_buff *skb, u32 ts);
drivers/net/wireless/ath/ath9k/dynack.h
89
struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/dynack.h
98
struct sk_buff *skb, u32 ts) {}
drivers/net/wireless/ath/ath9k/hw-ops.h
64
struct ath_tx_status *ts)
drivers/net/wireless/ath/ath9k/hw-ops.h
66
return ath9k_hw_ops(ah)->proc_txdesc(ah, ds, ts);
drivers/net/wireless/ath/ath9k/hw.h
735
struct ath_tx_status *ts);
drivers/net/wireless/ath/ath9k/main.c
2259
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/main.c
2279
status = ath9k_hw_txprocdesc(ah, bf->bf_desc, &ts);
drivers/net/wireless/ath/ath9k/main.c
2284
sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_MASK);
drivers/net/wireless/ath/ath9k/xmit.c
1006
struct ath_tx_status ts = {};
drivers/net/wireless/ath/ath9k/xmit.c
1012
ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
drivers/net/wireless/ath/ath9k/xmit.c
1877
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/xmit.c
1879
memset(&ts, 0, sizeof(ts));
drivers/net/wireless/ath/ath9k/xmit.c
1880
ts.ts_status = ATH9K_TX_FLUSH;
drivers/net/wireless/ath/ath9k/xmit.c
1895
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
drivers/net/wireless/ath/ath9k/xmit.c
2510
struct ath_tx_status *ts, int txok)
drivers/net/wireless/ath/ath9k/xmit.c
2520
if (ts->ts_status & ATH9K_TXERR_FILT)
drivers/net/wireless/ath/ath9k/xmit.c
2536
ath_debug_stat_tx(sc, bf, ts, txq, tx_flags);
drivers/net/wireless/ath/ath9k/xmit.c
2564
struct ath_tx_status *ts, int nframes, int nbad,
drivers/net/wireless/ath/ath9k/xmit.c
2577
tx_info->status.ack_signal = ts->ts_rssi;
drivers/net/wireless/ath/ath9k/xmit.c
2579
tx_rateindex = ts->ts_rateindex;
drivers/net/wireless/ath/ath9k/xmit.c
2590
tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
drivers/net/wireless/ath/ath9k/xmit.c
2597
if ((ts->ts_status & ATH9K_TXERR_FILT) == 0 &&
drivers/net/wireless/ath/ath9k/xmit.c
2611
if (unlikely(ts->ts_flags & (ATH9K_TX_DATA_UNDERRUN |
drivers/net/wireless/ath/ath9k/xmit.c
2627
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/xmit.c
2667
memset(&ts, 0, sizeof(ts));
drivers/net/wireless/ath/ath9k/xmit.c
2668
status = ath9k_hw_txprocdesc(ah, ds, &ts);
drivers/net/wireless/ath/ath9k/xmit.c
2690
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
drivers/net/wireless/ath/ath9k/xmit.c
2711
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/xmit.c
2725
status = ath9k_hw_txprocdesc(ah, NULL, (void *)&ts);
drivers/net/wireless/ath/ath9k/xmit.c
2734
if (ts.qid == sc->beacon.beaconq) {
drivers/net/wireless/ath/ath9k/xmit.c
2736
sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_MASK);
drivers/net/wireless/ath/ath9k/xmit.c
2747
if (ts.qid >= ATH9K_NUM_TX_QUEUES) {
drivers/net/wireless/ath/ath9k/xmit.c
2748
ath_dbg(common, XMIT, "invalid qid %d\n", ts.qid);
drivers/net/wireless/ath/ath9k/xmit.c
2752
txq = &sc->tx.txq[ts.qid];
drivers/net/wireless/ath/ath9k/xmit.c
2793
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
drivers/net/wireless/ath/ath9k/xmit.c
284
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/xmit.c
290
memset(&ts, 0, sizeof(ts));
drivers/net/wireless/ath/ath9k/xmit.c
307
ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
drivers/net/wireless/ath/ath9k/xmit.c
367
struct ath_tx_status ts;
drivers/net/wireless/ath/ath9k/xmit.c
370
memset(&ts, 0, sizeof(ts));
drivers/net/wireless/ath/ath9k/xmit.c
383
ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
drivers/net/wireless/ath/ath9k/xmit.c
452
static void ath_tx_count_frames(struct ath_buf *bf, struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/xmit.c
467
seq_st = ts->ts_seqnum;
drivers/net/wireless/ath/ath9k/xmit.c
468
memcpy(ba, &ts->ba, WME_BA_BMP_SIZE >> 3);
drivers/net/wireless/ath/ath9k/xmit.c
487
struct ath_tx_status *ts, int txok)
drivers/net/wireless/ath/ath9k/xmit.c
502
bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
drivers/net/wireless/ath/ath9k/xmit.c
511
retries = ts->ts_longretry + 1;
drivers/net/wireless/ath/ath9k/xmit.c
512
for (i = 0; i < ts->ts_rateindex; i++)
drivers/net/wireless/ath/ath9k/xmit.c
523
ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, ts, 0);
drivers/net/wireless/ath/ath9k/xmit.c
532
isba = ts->ts_flags & ATH9K_TX_BA;
drivers/net/wireless/ath/ath9k/xmit.c
542
if (isba && tid->tidno != ts->tid)
drivers/net/wireless/ath/ath9k/xmit.c
549
if (ts->ts_flags & ATH9K_TX_BA) {
drivers/net/wireless/ath/ath9k/xmit.c
550
seq_st = ts->ts_seqnum;
drivers/net/wireless/ath/ath9k/xmit.c
551
memcpy(ba, &ts->ba, WME_BA_BMP_SIZE >> 3);
drivers/net/wireless/ath/ath9k/xmit.c
567
ath_tx_count_frames(bf, ts, txok, &nframes, &nbad);
drivers/net/wireless/ath/ath9k/xmit.c
624
ath_tx_rc_status(sc, bf, ts, nframes, nbad, txok);
drivers/net/wireless/ath/ath9k/xmit.c
629
ts, sta);
drivers/net/wireless/ath/ath9k/xmit.c
632
ath_tx_complete_buf(sc, bf, txq, &bf_head, sta, ts,
drivers/net/wireless/ath/ath9k/xmit.c
64
struct ath_tx_status *ts, int txok);
drivers/net/wireless/ath/ath9k/xmit.c
653
&bf_head, NULL, ts,
drivers/net/wireless/ath/ath9k/xmit.c
68
struct ath_tx_status *ts, int nframes, int nbad,
drivers/net/wireless/ath/ath9k/xmit.c
681
if (ts->ts_status & (ATH9K_TXERR_FILT | ATH9K_TXERR_XRETRY))
drivers/net/wireless/ath/ath9k/xmit.c
710
struct ath_tx_status *ts,
drivers/net/wireless/ath/ath9k/xmit.c
716
airtime += ts->duration * (ts->ts_longretry + 1);
drivers/net/wireless/ath/ath9k/xmit.c
717
for(i = 0; i < ts->ts_rateindex; i++) {
drivers/net/wireless/ath/ath9k/xmit.c
726
struct ath_tx_status *ts, struct ath_buf *bf,
drivers/net/wireless/ath/ath9k/xmit.c
736
txok = !(ts->ts_status & ATH9K_TXERR_MASK);
drivers/net/wireless/ath/ath9k/xmit.c
737
flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
drivers/net/wireless/ath/ath9k/xmit.c
744
ts->duration = ath9k_hw_get_duration(sc->sc_ah, bf->bf_desc,
drivers/net/wireless/ath/ath9k/xmit.c
745
ts->ts_rateindex);
drivers/net/wireless/ath/ath9k/xmit.c
752
ath_tx_count_airtime(sc, sta, bf, ts, tid->tidno);
drivers/net/wireless/ath/ath9k/xmit.c
753
if (ts->ts_status & (ATH9K_TXERR_FILT | ATH9K_TXERR_XRETRY))
drivers/net/wireless/ath/ath9k/xmit.c
762
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
drivers/net/wireless/ath/ath9k/xmit.c
763
ath_dynack_sample_tx_ts(sc->sc_ah, bf->bf_mpdu, ts,
drivers/net/wireless/ath/ath9k/xmit.c
766
ath_tx_complete_buf(sc, bf, txq, bf_head, sta, ts, txok);
drivers/net/wireless/ath/ath9k/xmit.c
768
ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, tid, ts, txok);
drivers/net/wireless/ath/dfs_pattern_detector.c
286
if (event->ts < dpd->last_pulse_ts)
drivers/net/wireless/ath/dfs_pattern_detector.c
288
dpd->last_pulse_ts = event->ts;
drivers/net/wireless/ath/dfs_pattern_detector.h
51
u64 ts;
drivers/net/wireless/ath/dfs_pri_detector.c
195
if (p->ts >= min_valid_ts)
drivers/net/wireless/ath/dfs_pri_detector.c
201
static bool pulse_queue_enqueue(struct pri_detector *pde, u64 ts)
drivers/net/wireless/ath/dfs_pri_detector.c
214
p->ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
217
pde->last_ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
225
u64 ts, u32 min_count)
drivers/net/wireless/ath/dfs_pri_detector.c
233
u32 delta_ts = ts - p->ts;
drivers/net/wireless/ath/dfs_pri_detector.c
246
ps.first_ts = p->ts;
drivers/net/wireless/ath/dfs_pri_detector.c
247
ps.last_ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
249
pde->rs->pri_max, ts - p->ts);
drivers/net/wireless/ath/dfs_pri_detector.c
255
min_valid_ts = ts - ps.dur;
drivers/net/wireless/ath/dfs_pri_detector.c
259
if (p2->ts < min_valid_ts)
drivers/net/wireless/ath/dfs_pri_detector.c
263
factor = pde_get_multiple(ps.last_ts - p2->ts, ps.pri,
drivers/net/wireless/ath/dfs_pri_detector.c
267
ps.first_ts = p2->ts;
drivers/net/wireless/ath/dfs_pri_detector.c
304
pseq_handler_add_to_existing_seqs(struct pri_detector *pde, u64 ts)
drivers/net/wireless/ath/dfs_pri_detector.c
313
if (ts > ps->deadline_ts) {
drivers/net/wireless/ath/dfs_pri_detector.c
319
delta_ts = ts - ps->last_ts;
drivers/net/wireless/ath/dfs_pri_detector.c
323
ps->last_ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
358
static void pri_detector_reset(struct pri_detector *pde, u64 ts)
drivers/net/wireless/ath/dfs_pri_detector.c
37
u64 ts;
drivers/net/wireless/ath/dfs_pri_detector.c
371
pde->last_ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
386
u64 ts = event->ts;
drivers/net/wireless/ath/dfs_pri_detector.c
393
if ((ts - de->last_ts) < rs->max_pri_tolerance)
drivers/net/wireless/ath/dfs_pri_detector.c
400
de->last_ts = ts;
drivers/net/wireless/ath/dfs_pri_detector.c
402
max_updated_seq = pseq_handler_add_to_existing_seqs(de, ts);
drivers/net/wireless/ath/dfs_pri_detector.c
404
if (!pseq_handler_create_sequences(de, ts, max_updated_seq)) {
drivers/net/wireless/ath/dfs_pri_detector.c
405
pri_detector_reset(de, ts);
drivers/net/wireless/ath/dfs_pri_detector.c
412
pulse_queue_enqueue(de, ts);
drivers/net/wireless/ath/dfs_pri_detector.h
63
void (*reset) (struct pri_detector *de, u64 ts);
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
135
unsigned long ts = jiffies;
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
147
ll->timestamp = ts;
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
271
unsigned long ts = jiffies ? jiffies : 1;
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
298
mld->low_latency.window_start[fw_id] = ts;
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
318
unsigned long ts = jiffies;
drivers/net/wireless/intel/iwlwifi/mld/low_latency.c
322
ll->timestamp = ts;
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
103
struct timespec64 *ts)
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
120
*ts = ns_to_timespec64(ns);
drivers/net/wireless/intel/iwlwifi/mld/ptp.c
125
const struct timespec64 *ts)
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
677
unsigned long ts; /* timestamp when period ends */
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
1372
mvm->tcm.ts = jiffies;
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
210
struct timespec64 *ts)
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
222
*ts = ns_to_timespec64(ns);
drivers/net/wireless/intel/iwlwifi/mvm/ptp.c
227
const struct timespec64 *ts)
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
226
if (time_after(jiffies, mvm->tcm.ts + MVM_TCM_PERIOD))
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
2291
time_after(jiffies, mvm->tcm.ts + MVM_TCM_PERIOD))
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
1044
if (time_after(jiffies, mvm->tcm.ts + MVM_TCM_PERIOD))
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1086
unsigned long ts = jiffies;
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1088
time_after(ts, mvm->tcm.uapsd_nonagg_ts +
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1092
if (mvm->tcm.paused || !time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) {
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1106
if (!mvm->tcm.paused && time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) {
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1108
unsigned long work_delay = iwl_mvm_calc_tcm_stats(mvm, ts,
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1113
mvm->tcm.ts = ts;
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
1146
mvm->tcm.ts = jiffies;
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
981
unsigned long ts,
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
984
unsigned int elapsed = jiffies_to_msecs(ts - mvm->tcm.ts);
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
986
jiffies_to_msecs(ts - mvm->tcm.uapsd_nonagg_ts);
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
993
bool handle_ll = time_after(ts, mvm->tcm.ll_ts + MVM_LL_PERIOD);
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
996
mvm->tcm.ll_ts = ts;
drivers/net/wireless/intel/iwlwifi/mvm/utils.c
998
mvm->tcm.uapsd_nonagg_ts = ts;
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
1996
u32 ts = start_time + i * dev->radar_pattern.period;
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
2000
req.pattern[i].start_time = cpu_to_le32(ts);
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
382
event->ts = MT_DFS_EVENT_TIMESTAMP(data);
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
400
delta_ts = event->ts - event_buff->data[last_event_idx].ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
470
pri = event->ts - cur_event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
478
seq.pri = event->ts - cur_event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
479
seq.first_ts = cur_event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
480
seq.last_ts = event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
487
cur_pri = event->ts - cur_event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
491
seq.first_ts = cur_event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
524
if (event->ts > seq->first_ts + MT_DFS_SEQUENCE_WINDOW) {
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
533
pri = event->ts - seq->last_ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
537
seq->last_ts = event->ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
574
if (dfs_pd->last_event_ts > event.ts)
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
576
dfs_pd->last_event_ts = event.ts;
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h
64
u32 ts;
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
514
__le32 ts;
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
521
__le32 ts;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1003
static int qtnf_topaz_fw_upload(struct qtnf_pcie_topaz_state *ts,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1007
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1010
if (qtnf_poll_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1025
ret = qtnf_ep_fw_load(ts, fw->data, fw->size);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
103
static void qtnf_deassert_intx(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1037
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1038
int bootloader_needed = readl(&ts->bda->bda_flags) & QTN_BDA_XMIT_UBOOT;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1039
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1042
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_TARGET_BOOT);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1045
ret = qtnf_topaz_fw_upload(ts, QTN_PCI_TOPAZ_BOOTLD_NAME);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
105
void __iomem *reg = ts->base.sysctl_bar + TOPAZ_PCIE_CFG0_OFFSET;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1053
qtnf_set_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1057
if (ts->base.flashboot) {
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1060
ret = qtnf_poll_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1066
ret = qtnf_topaz_fw_upload(ts, QTN_PCI_TOPAZ_FW_NAME);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1070
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_START);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1071
ret = qtnf_poll_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1079
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_RUN);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1080
ret = qtnf_poll_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1089
ret = qtnf_post_init_ep(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1110
struct qtnf_pcie_topaz_state *ts = from_tasklet(ts, t, base.reclaim_tq);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1112
qtnf_topaz_data_tx_reclaim(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1123
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1124
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
113
static inline int qtnf_topaz_intx_asserted(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1131
ts->bda = ts->base.epmem_bar;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1134
if (ts->base.msi_enabled)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
115
void __iomem *reg = ts->base.sysctl_bar + TOPAZ_PCIE_CFG0_OFFSET;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1153
ret = qtnf_pcie_topaz_init_xfer(ts, tx_bd_num, rx_bd_num);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1159
tasklet_setup(&ts->base.reclaim_tq, qtnf_reclaim_tasklet_fn);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1164
ipc_int.arg = ts;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1165
qtnf_pcie_init_shm_ipc(&ts->base, &ts->bda->bda_shm_reg1,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1166
&ts->bda->bda_shm_reg2, &ipc_int);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1173
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1175
qtnf_topaz_reset_ep(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1176
qtnf_topaz_free_xfer_buffers(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1182
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1183
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1185
writel((u32 __force)PCI_D3hot, ts->ep_pmstate);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1188
TOPAZ_LH_IPC4_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1199
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1200
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1206
writel((u32 __force)PCI_D0, ts->ep_pmstate);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1209
TOPAZ_LH_IPC4_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
121
static void qtnf_topaz_reset_ep(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1218
struct qtnf_pcie_topaz_state *ts;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1220
bus = devm_kzalloc(&pdev->dev, sizeof(*bus) + sizeof(*ts), GFP_KERNEL);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1224
ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1225
ts->base.probe_cb = qtnf_pcie_topaz_probe;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1226
ts->base.remove_cb = qtnf_pcie_topaz_remove;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1227
ts->base.dma_mask_get_cb = qtnf_topaz_dma_mask_get;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1229
ts->base.resume_cb = qtnf_pcie_topaz_resume;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
1230
ts->base.suspend_cb = qtnf_pcie_topaz_suspend;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
124
TOPAZ_LH_IPC4_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
126
pci_restore_state(ts->base.pdev);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
129
static void setup_rx_irqs(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
131
void __iomem *reg = PCIE_DMA_WR_DONE_IMWR_ADDR_LOW(ts->base.dmareg_bar);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
133
ts->dma_msi_imwr = readl(reg);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
136
static void enable_rx_irqs(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
138
void __iomem *reg = PCIE_DMA_WR_DONE_IMWR_ADDR_LOW(ts->base.dmareg_bar);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
140
qtnf_non_posted_write(ts->dma_msi_imwr, reg);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
143
static void disable_rx_irqs(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
145
void __iomem *reg = PCIE_DMA_WR_DONE_IMWR_ADDR_LOW(ts->base.dmareg_bar);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
147
qtnf_non_posted_write(QTN_HOST_LO32(ts->dma_msi_dummy), reg);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
152
struct qtnf_pcie_topaz_state *ts = arg;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
155
TOPAZ_CTL_M2L_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
183
static int topaz_alloc_bd_table(struct qtnf_pcie_topaz_state *ts,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
187
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
205
ts->tx_bd_vbase = vaddr;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
209
ts->tx_bd_vbase[i].info |= cpu_to_le32(QTN_BD_EMPTY);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
221
ts->rx_bd_vbase = vaddr;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
233
ts->ep_next_rx_pkt = &extra_params->param1;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
236
ts->txqueue_wake = &extra_params->param2;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
237
ts->ep_pmstate = &extra_params->param3;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
238
ts->dma_msi_dummy = paddr + QTNF_BD_PARAM_OFFSET(4);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
244
topaz_skb2rbd_attach(struct qtnf_pcie_topaz_state *ts, u16 index, u32 wrap)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
246
struct qtnf_topaz_rx_bd *rxbd = &ts->rx_bd_vbase[index];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
252
ts->base.rx_skb[index] = NULL;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
256
ts->base.rx_skb[index] = skb;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
258
paddr = dma_map_single(&ts->base.pdev->dev, skb->data, SKB_BUF_SIZE,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
260
if (dma_mapping_error(&ts->base.pdev->dev, paddr)) {
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
268
ts->base.rx_bd_w_index = index;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
273
static int topaz_alloc_rx_buffers(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
278
memset(ts->rx_bd_vbase, 0x0,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
279
ts->base.rx_bd_num * sizeof(struct qtnf_topaz_rx_bd));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
281
for (i = 0; i < ts->base.rx_bd_num; i++) {
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
282
ret = topaz_skb2rbd_attach(ts, i, 0);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
287
ts->rx_bd_vbase[ts->base.rx_bd_num - 1].info |=
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
294
static void qtnf_topaz_free_xfer_buffers(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
296
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
306
rxbd = &ts->rx_bd_vbase[i];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
321
txbd = &ts->tx_bd_vbase[i];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
334
static int qtnf_pcie_topaz_init_xfer(struct qtnf_pcie_topaz_state *ts,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
338
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
339
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
376
ret = topaz_alloc_bd_table(ts, bda);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
382
ret = topaz_alloc_rx_buffers(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
391
static void qtnf_topaz_data_tx_reclaim(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
393
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
404
tx_done_index = readl(ts->ep_next_rx_pkt);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
415
txbd = &ts->tx_bd_vbase[i];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
447
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
451
ts->base.tx_stopped = 1;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
454
writel(0x0, ts->txqueue_wake);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
461
TOPAZ_LH_IPC4_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
464
tasklet_hi_schedule(&ts->base.reclaim_tq);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
469
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
472
ready = readl(ts->txqueue_wake);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
478
TOPAZ_LH_IPC4_INT(ts->base.sysctl_bar));
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
482
static int qtnf_tx_queue_ready(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
484
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
488
qtnf_topaz_data_tx_reclaim(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
503
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
504
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
505
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
515
if (!qtnf_tx_queue_ready(ts)) {
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
532
txbd = &ts->tx_bd_vbase[i];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
560
qtnf_topaz_data_tx_reclaim(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
568
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
569
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
571
if (!priv->msi_enabled && !qtnf_topaz_intx_asserted(ts))
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
575
qtnf_deassert_intx(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
583
disable_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
592
static int qtnf_rx_data_ready(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
594
u16 index = ts->base.rx_bd_r_index;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
598
rxbd = &ts->rx_bd_vbase[index];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
610
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
611
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
626
if (!qtnf_rx_data_ready(ts))
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
630
rxbd = &ts->rx_bd_vbase[r_idx];
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
681
if (((++ts->rx_pkt_count) & RX_DONE_INTR_MSK) == 0)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
698
ret = topaz_skb2rbd_attach(ts, w_idx,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
713
enable_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
722
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
725
tasklet_hi_schedule(&ts->base.reclaim_tq);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
730
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
733
enable_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
738
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
740
disable_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
758
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
760
seq_printf(s, "pcie_irq_count(%u)\n", ts->base.pcie_irq_count);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
768
struct qtnf_pcie_topaz_state *ts = get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
769
struct qtnf_pcie_bus_priv *priv = &ts->base;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
770
u32 tx_done_index = readl(ts->ep_next_rx_pkt);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
800
static void qtnf_reset_dma_offset(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
802
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
811
static int qtnf_pcie_endian_detect(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
813
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
852
struct qtnf_pcie_topaz_state *ts = (void *)get_bus_priv(bus);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
853
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
857
ret = qtnf_pcie_endian_detect(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
863
writeb(ts->base.msi_enabled, &ts->bda->bda_rc_msi_enabled);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
864
qtnf_reset_dma_offset(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
869
if (ts->base.flashboot)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
876
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_HOST_RDY);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
877
if (qtnf_poll_state(&ts->bda->bda_bootstate, QTN_BDA_FW_TARGET_RDY,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
886
static int qtnf_post_init_ep(struct qtnf_pcie_topaz_state *ts)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
888
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
890
setup_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
891
disable_rx_irqs(ts);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
893
if (qtnf_poll_state(&ts->bda->bda_bootstate, QTN_BDA_FW_QLINK_DONE,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
902
qtnf_ep_fw_load(struct qtnf_pcie_topaz_state *ts, const u8 *fw, u32 fw_size)
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
904
struct qtnf_topaz_bda __iomem *bda = ts->bda;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
905
struct pci_dev *pdev = ts->base.pdev;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
919
blksize = ts->base.fw_blksize;
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
942
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_HOST_LOAD);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
943
if (qtnf_poll_state(&ts->bda->bda_bootstate, QTN_BDA_FW_EP_RDY,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
960
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_BLOCK_RDY);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
961
if (qtnf_poll_state(&ts->bda->bda_bootstate,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
977
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_BLOCK_RDY);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
978
if (qtnf_poll_state(&ts->bda->bda_bootstate, QTN_BDA_FW_BLOCK_DONE,
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
986
qtnf_set_state(&ts->bda->bda_bootstate, QTN_BDA_FW_BLOCK_END);
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c
987
if (qtnf_poll_state(&ts->bda->bda_bootstate, QTN_BDA_FW_LOAD_DONE,
drivers/net/wireless/virtual/mac80211_hwsim_i.h
156
ktime_t ts);
drivers/net/wireless/virtual/mac80211_hwsim_main.c
1279
ktime_t ts)
drivers/net/wireless/virtual/mac80211_hwsim_main.c
1282
return ktime_to_us(ts) + data->tsf_offset;
drivers/nvme/host/core.c
2825
__le64 ts;
drivers/nvme/host/core.c
2831
ts = cpu_to_le64(ktime_to_ms(ktime_get_real()));
drivers/nvme/host/core.c
2832
ret = nvme_set_features(ctrl, NVME_FEAT_TIMESTAMP, 0, &ts, sizeof(ts),
drivers/pci/endpoint/functions/pci-epf-test.c
346
struct timespec64 ts = timespec64_sub(*end, *start);
drivers/pci/endpoint/functions/pci-epf-test.c
350
ns = timespec64_to_ns(&ts);
drivers/pci/endpoint/functions/pci-epf-test.c
356
op, size, dma ? "YES" : "NO", &ts, rate);
drivers/pinctrl/actions/pinctrl-s500.c
1376
[S500_MUX_TS] = FUNCTION(ts),
drivers/platform/chrome/cros_ec_sensorhub_ring.c
378
cros_ec_sensor_ring_fix_overflow(s64 *ts,
drivers/platform/chrome/cros_ec_sensorhub_ring.c
385
*ts += state->offset;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
386
if (abs(state->last - *ts) > (overflow_period / 2)) {
drivers/platform/chrome/cros_ec_sensorhub_ring.c
387
adjust = state->last > *ts ? overflow_period : -overflow_period;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
389
*ts += adjust;
drivers/platform/chrome/cros_ec_sensorhub_ring.c
391
state->last = *ts;
drivers/platform/x86/amd/pmf/cnqf.c
103
ts = &config_store.mode_set[src][CNQF_MODE_BALANCE];
drivers/platform/x86/amd/pmf/cnqf.c
104
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
107
ts = &config_store.mode_set[src][CNQF_MODE_PERFORMANCE];
drivers/platform/x86/amd/pmf/cnqf.c
108
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
111
ts = &config_store.mode_set[src][CNQF_MODE_BALANCE];
drivers/platform/x86/amd/pmf/cnqf.c
112
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
115
ts = &config_store.mode_set[src][CNQF_MODE_PERFORMANCE];
drivers/platform/x86/amd/pmf/cnqf.c
116
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
119
ts = &config_store.mode_set[src][CNQF_MODE_QUIET];
drivers/platform/x86/amd/pmf/cnqf.c
120
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
123
ts = &config_store.mode_set[src][CNQF_MODE_TURBO];
drivers/platform/x86/amd/pmf/cnqf.c
124
tp->power_threshold = ts->power_floor;
drivers/platform/x86/amd/pmf/cnqf.c
99
struct cnqf_mode_settings *ts;
drivers/pps/clients/pps-gpio.c
46
struct pps_event_time ts;
drivers/pps/clients/pps-gpio.c
50
pps_get_ts(&ts);
drivers/pps/clients/pps-gpio.c
59
pps_event(info->pps, &ts, PPS_CAPTUREASSERT, data);
drivers/pps/clients/pps-gpio.c
63
pps_event(info->pps, &ts, PPS_CAPTURECLEAR, data);
drivers/pps/clients/pps-ktimer.c
30
struct pps_event_time ts;
drivers/pps/clients/pps-ktimer.c
33
pps_get_ts(&ts);
drivers/pps/clients/pps-ktimer.c
35
pps_event(pps, &ts, PPS_CAPTUREASSERT, NULL);
drivers/pps/clients/pps-ldisc.c
19
struct pps_event_time ts;
drivers/pps/clients/pps-ldisc.c
21
pps_get_ts(&ts);
drivers/pps/clients/pps-ldisc.c
32
pps_event(pps, &ts, active ? PPS_CAPTUREASSERT :
drivers/pps/kapi.c
156
void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
drivers/pps/kapi.c
166
dev_dbg(&pps->dev, "PPS event at %ptSp\n", &ts->ts_real);
drivers/pps/kapi.c
168
timespec_to_pps_ktime(&ts_real, ts->ts_real);
drivers/pps/kapi.c
207
pps_kc_event(pps, ts, event);
drivers/pps/kapi.c
27
static void pps_add_offset(struct pps_ktime *ts, struct pps_ktime *offset)
drivers/pps/kapi.c
29
ts->nsec += offset->nsec;
drivers/pps/kapi.c
30
while (ts->nsec >= NSEC_PER_SEC) {
drivers/pps/kapi.c
31
ts->nsec -= NSEC_PER_SEC;
drivers/pps/kapi.c
32
ts->sec++;
drivers/pps/kapi.c
34
while (ts->nsec < 0) {
drivers/pps/kapi.c
35
ts->nsec += NSEC_PER_SEC;
drivers/pps/kapi.c
36
ts->sec--;
drivers/pps/kapi.c
38
ts->sec += offset->sec;
drivers/pps/kc.c
107
hardpps(&ts->ts_real, &ts->ts_raw);
drivers/pps/kc.c
99
void pps_kc_event(struct pps_device *pps, struct pps_event_time *ts,
drivers/pps/kc.h
20
struct pps_event_time *ts, int event);
drivers/pps/kc.h
29
struct pps_event_time *ts, int event) {}
drivers/ptp/ptp_chardev.c
322
struct timespec64 ts;
drivers/ptp/ptp_chardev.c
333
ts = ktime_to_timespec64(xtstamp.device);
drivers/ptp/ptp_chardev.c
334
precise_offset.device.sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
335
precise_offset.device.nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
336
ts = ktime_to_timespec64(xtstamp.sys_systime);
drivers/ptp/ptp_chardev.c
337
precise_offset.sys_realtime.sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
338
precise_offset.sys_realtime.nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
339
ts = ktime_to_timespec64(xtstamp.sys_monoraw);
drivers/ptp/ptp_chardev.c
340
precise_offset.sys_monoraw.sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
341
precise_offset.sys_monoraw.nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
381
struct timespec64 ts;
drivers/ptp/ptp_chardev.c
384
err = gettimex_fn(ptp->info, &ts, &sts);
drivers/ptp/ptp_chardev.c
392
extoff->ts[i][1].sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
393
extoff->ts[i][1].nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
395
ts = ktime_to_timespec64(sts.pre_sts.systime);
drivers/ptp/ptp_chardev.c
396
extoff->ts[i][0].sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
397
extoff->ts[i][0].nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
399
ts = ktime_to_timespec64(sts.post_sts.systime);
drivers/ptp/ptp_chardev.c
400
extoff->ts[i][2].sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
401
extoff->ts[i][2].nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
411
struct timespec64 ts;
drivers/ptp/ptp_chardev.c
420
pct = &sysoff->ts[0];
drivers/ptp/ptp_chardev.c
425
ktime_get_real_ts64(&ts);
drivers/ptp/ptp_chardev.c
426
pct->sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
427
pct->nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
430
err = ops->gettimex64(ops, &ts, NULL);
drivers/ptp/ptp_chardev.c
432
err = ops->gettime64(ops, &ts);
drivers/ptp/ptp_chardev.c
435
pct->sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
436
pct->nsec = ts.tv_nsec;
drivers/ptp/ptp_chardev.c
439
ktime_get_real_ts64(&ts);
drivers/ptp/ptp_chardev.c
440
pct->sec = ts.tv_sec;
drivers/ptp/ptp_chardev.c
441
pct->nsec = ts.tv_nsec;
drivers/ptp/ptp_clock.c
137
struct timespec64 ts, ts2;
drivers/ptp/ptp_clock.c
141
ts.tv_sec = tx->time.tv_sec;
drivers/ptp/ptp_clock.c
142
ts.tv_nsec = tx->time.tv_usec;
drivers/ptp/ptp_clock.c
145
ts.tv_nsec *= 1000;
drivers/ptp/ptp_clock.c
147
if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC)
drivers/ptp/ptp_clock.c
154
ts2 = timespec64_add(ts2, ts);
drivers/ptp/ptp_clock.c
158
kt = timespec64_to_ktime(ts);
drivers/ptp/ptp_clock.c
225
static int ptp_getcycles64(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/ptp/ptp_clock.c
228
return info->getcyclesx64(info, ts, NULL);
drivers/ptp/ptp_clock.c
230
return info->gettime64(info, ts);
drivers/ptp/ptp_clockmatrix.c
1024
struct timespec64 ts;
drivers/ptp/ptp_clockmatrix.c
1036
err = _idtcm_gettime_immediate(channel, &ts);
drivers/ptp/ptp_clockmatrix.c
1040
now = timespec64_to_ns(&ts);
drivers/ptp/ptp_clockmatrix.c
1043
ts = ns_to_timespec64(now);
drivers/ptp/ptp_clockmatrix.c
1045
err = _idtcm_settime_deprecated(channel, &ts);
drivers/ptp/ptp_clockmatrix.c
106
struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
128
ts->tv_sec = sec;
drivers/ptp/ptp_clockmatrix.c
129
ts->tv_nsec = nsec;
drivers/ptp/ptp_clockmatrix.c
134
static int timespec_to_char_array(struct timespec64 const *ts,
drivers/ptp/ptp_clockmatrix.c
1348
struct timespec64 ts = {0, 0};
drivers/ptp/ptp_clockmatrix.c
1359
return _idtcm_settime(channel, &ts, SCSR_TOD_WR_TYPE_SEL_DELTA_PLUS);
drivers/ptp/ptp_clockmatrix.c
145
nsec = ts->tv_nsec;
drivers/ptp/ptp_clockmatrix.c
146
sec = ts->tv_sec;
drivers/ptp/ptp_clockmatrix.c
1772
static int idtcm_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
1779
err = _idtcm_gettime_immediate(channel, ts);
drivers/ptp/ptp_clockmatrix.c
1790
const struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
1797
err = _idtcm_settime_deprecated(channel, ts);
drivers/ptp/ptp_clockmatrix.c
1808
const struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
1815
err = _idtcm_settime(channel, ts, SCSR_TOD_WR_TYPE_SEL_ABSOLUTE);
drivers/ptp/ptp_clockmatrix.c
1846
struct timespec64 ts;
drivers/ptp/ptp_clockmatrix.c
1859
ts = ns_to_timespec64(delta);
drivers/ptp/ptp_clockmatrix.c
1862
ts = ns_to_timespec64(-delta);
drivers/ptp/ptp_clockmatrix.c
1865
err = _idtcm_settime(channel, &ts, type);
drivers/ptp/ptp_clockmatrix.c
1958
struct timespec64 ts = {0, 0};
drivers/ptp/ptp_clockmatrix.c
1977
return _idtcm_settime_deprecated(channel, &ts);
drivers/ptp/ptp_clockmatrix.c
1979
return _idtcm_settime(channel, &ts,
drivers/ptp/ptp_clockmatrix.c
387
struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
408
return char_array_to_timespec(buf, sizeof(buf), ts);
drivers/ptp/ptp_clockmatrix.c
412
struct timespec64 *ts, u8 timeout)
drivers/ptp/ptp_clockmatrix.c
440
err = char_array_to_timespec(buf, sizeof(buf), ts);
drivers/ptp/ptp_clockmatrix.c
449
struct timespec64 ts;
drivers/ptp/ptp_clockmatrix.c
459
err = _idtcm_gettime_triggered(extts_channel, &ts);
drivers/ptp/ptp_clockmatrix.c
466
event.timestamp = timespec64_to_ns(&ts) - dco_delay;
drivers/ptp/ptp_clockmatrix.c
473
struct timespec64 *ts)
drivers/ptp/ptp_clockmatrix.c
486
return _idtcm_gettime(channel, ts, 10);
drivers/ptp/ptp_clockmatrix.c
694
struct timespec64 const *ts,
drivers/ptp/ptp_clockmatrix.c
701
struct timespec64 local_ts = *ts;
drivers/ptp/ptp_clockmatrix.c
761
struct timespec64 const *ts,
drivers/ptp/ptp_clockmatrix.c
767
struct timespec64 local_ts = *ts;
drivers/ptp/ptp_clockmatrix.c
870
struct timespec64 const *ts)
drivers/ptp/ptp_clockmatrix.c
875
err = _idtcm_set_dpll_hw_tod(channel, ts, HW_TOD_WR_TRIG_SEL_MSB);
drivers/ptp/ptp_clockmatrix.c
886
struct timespec64 const *ts,
drivers/ptp/ptp_clockmatrix.c
889
return _idtcm_set_dpll_scsr_tod(channel, ts,
drivers/ptp/ptp_dfl_tod.c
226
static int dfl_tod_get_timex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/ptp/ptp_dfl_tod.c
245
ts->tv_nsec = nanosec;
drivers/ptp/ptp_dfl_tod.c
246
ts->tv_sec = seconds;
drivers/ptp/ptp_dfl_tod.c
252
const struct timespec64 *ts)
drivers/ptp/ptp_dfl_tod.c
255
u32 seconds_msb = FIELD_GET(SECONDS_MSB, ts->tv_sec);
drivers/ptp/ptp_dfl_tod.c
256
u32 seconds_lsb = FIELD_GET(SECONDS_LSB, ts->tv_sec);
drivers/ptp/ptp_dfl_tod.c
257
u32 nanosec = FIELD_GET(SECONDS_LSB, ts->tv_nsec);
drivers/ptp/ptp_dte.c
172
static int ptp_dte_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_dte.c
178
*ts = ns_to_timespec64(dte_read_nco_with_ovf(ptp_dte));
drivers/ptp/ptp_dte.c
185
const struct timespec64 *ts)
drivers/ptp/ptp_dte.c
195
dte_write_nco(ptp_dte->regs, timespec64_to_ns(ts));
drivers/ptp/ptp_fc3.c
360
static int _idtfc3_gettime(struct idtfc3 *idtfc3, struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
368
*ts = ns_to_timespec64(idtfc3->ns);
drivers/ptp/ptp_fc3.c
373
static int idtfc3_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
379
err = _idtfc3_gettime(idtfc3, ts);
drivers/ptp/ptp_fc3.c
385
static int _idtfc3_settime(struct idtfc3 *idtfc3, const struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
391
if (timespec64_valid(ts) == false) {
drivers/ptp/ptp_fc3.c
401
now_ns = timespec64_to_ns(ts);
drivers/ptp/ptp_fc3.c
408
static int idtfc3_settime(struct ptp_clock_info *ptp, const struct timespec64 *ts)
drivers/ptp/ptp_fc3.c
414
err = _idtfc3_settime(idtfc3, ts);
drivers/ptp/ptp_idt82p33.c
1067
static int idt82p33_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_idt82p33.c
1075
err = _idt82p33_gettime(channel, ts);
drivers/ptp/ptp_idt82p33.c
1085
const struct timespec64 *ts)
drivers/ptp/ptp_idt82p33.c
1093
err = _idt82p33_settime(channel, ts);
drivers/ptp/ptp_idt82p33.c
156
struct timespec64 *ts)
drivers/ptp/ptp_idt82p33.c
173
idt82p33_byte_array_to_timespec(ts, buf);
drivers/ptp/ptp_idt82p33.c
303
struct timespec64 ts;
drivers/ptp/ptp_idt82p33.c
306
err = idt82p33_get_extts(&idt82p33->channel[todn], &ts);
drivers/ptp/ptp_idt82p33.c
311
event.timestamp = timespec64_to_ns(&ts);
drivers/ptp/ptp_idt82p33.c
361
struct timespec64 *ts)
drivers/ptp/ptp_idt82p33.c
392
idt82p33_byte_array_to_timespec(ts, buf);
drivers/ptp/ptp_idt82p33.c
404
struct timespec64 const *ts)
drivers/ptp/ptp_idt82p33.c
407
struct timespec64 local_ts = *ts;
drivers/ptp/ptp_idt82p33.c
448
struct timespec64 ts;
drivers/ptp/ptp_idt82p33.c
454
err = _idt82p33_gettime(channel, &ts);
drivers/ptp/ptp_idt82p33.c
459
now_ns = timespec64_to_ns(&ts);
drivers/ptp/ptp_idt82p33.c
462
ts = ns_to_timespec64(now_ns);
drivers/ptp/ptp_idt82p33.c
464
err = _idt82p33_settime(channel, &ts);
drivers/ptp/ptp_idt82p33.c
474
struct timespec64 ts;
drivers/ptp/ptp_idt82p33.c
480
err = _idt82p33_gettime(channel, &ts);
drivers/ptp/ptp_idt82p33.c
485
if (ts.tv_nsec > (NSEC_PER_SEC - 5 * NSEC_PER_MSEC)) {
drivers/ptp/ptp_idt82p33.c
488
ns = (ts.tv_sec + 2) * NSEC_PER_SEC + delta_ns + delay_ns;
drivers/ptp/ptp_idt82p33.c
490
ns = (ts.tv_sec + 1) * NSEC_PER_SEC + delta_ns + delay_ns;
drivers/ptp/ptp_idt82p33.c
492
ts = ns_to_timespec64(ns);
drivers/ptp/ptp_idt82p33.c
493
idt82p33_timespec_to_byte_array(&ts, buf);
drivers/ptp/ptp_idt82p33.c
55
static void idt82p33_byte_array_to_timespec(struct timespec64 *ts,
drivers/ptp/ptp_idt82p33.c
74
ts->tv_sec = sec;
drivers/ptp/ptp_idt82p33.c
75
ts->tv_nsec = nsec;
drivers/ptp/ptp_idt82p33.c
78
static void idt82p33_timespec_to_byte_array(struct timespec64 const *ts,
drivers/ptp/ptp_idt82p33.c
85
nsec = ts->tv_nsec;
drivers/ptp/ptp_idt82p33.c
86
sec = ts->tv_sec;
drivers/ptp/ptp_idt82p33.c
897
struct timespec64 ts = {0, 0};
drivers/ptp/ptp_idt82p33.c
908
err = _idt82p33_settime(channel, &ts);
drivers/ptp/ptp_ines.c
171
struct ines_timestamp *ts, struct device *dev);
drivers/ptp/ptp_ines.c
174
static bool ines_timestamp_expired(struct ines_timestamp *ts);
drivers/ptp/ptp_ines.c
257
struct ines_timestamp *ts;
drivers/ptp/ptp_ines.c
267
ts = list_entry(this, struct ines_timestamp, list);
drivers/ptp/ptp_ines.c
268
if (ines_timestamp_expired(ts)) {
drivers/ptp/ptp_ines.c
269
list_del_init(&ts->list);
drivers/ptp/ptp_ines.c
270
list_add(&ts->list, &port->pool);
drivers/ptp/ptp_ines.c
273
if (ines_match(skb, type, ts, port->clock->dev)) {
drivers/ptp/ptp_ines.c
274
ns = ts->sec * 1000000000ULL + ts->nsec;
drivers/ptp/ptp_ines.c
275
list_del_init(&ts->list);
drivers/ptp/ptp_ines.c
276
list_add(&ts->list, &port->pool);
drivers/ptp/ptp_ines.c
289
struct ines_timestamp ts;
drivers/ptp/ptp_ines.c
314
ts.tag = ines_read32(port, ts_tx);
drivers/ptp/ptp_ines.c
315
ts.sec = ines_txts64(port, 3);
drivers/ptp/ptp_ines.c
316
ts.nsec = ines_txts64(port, 2);
drivers/ptp/ptp_ines.c
317
ts.clkid = ines_txts64(port, 4);
drivers/ptp/ptp_ines.c
318
ts.portnum = ines_read32(port, ts_tx);
drivers/ptp/ptp_ines.c
319
ts.seqid = ines_read32(port, ts_tx);
drivers/ptp/ptp_ines.c
321
if (ines_match(skb, class, &ts, port->clock->dev)) {
drivers/ptp/ptp_ines.c
322
ns = ts.sec * 1000000000ULL + ts.nsec;
drivers/ptp/ptp_ines.c
452
struct ines_timestamp *ts, struct device *dev)
drivers/ptp/ptp_ines.c
471
if (tag_to_msgtype(ts->tag & 0x7) != msgtype) {
drivers/ptp/ptp_ines.c
473
tag_to_msgtype(ts->tag & 0x7), msgtype);
drivers/ptp/ptp_ines.c
476
if (ts->clkid != clkid) {
drivers/ptp/ptp_ines.c
478
ts->clkid, clkid);
drivers/ptp/ptp_ines.c
481
if (ts->portnum != portn) {
drivers/ptp/ptp_ines.c
483
ts->portnum, portn);
drivers/ptp/ptp_ines.c
486
if (ts->seqid != seqid) {
drivers/ptp/ptp_ines.c
488
ts->seqid, seqid);
drivers/ptp/ptp_ines.c
519
struct ines_timestamp *ts;
drivers/ptp/ptp_ines.c
542
ts = list_first_entry(&port->pool, struct ines_timestamp, list);
drivers/ptp/ptp_ines.c
543
ts->tmo = jiffies + HZ;
drivers/ptp/ptp_ines.c
544
ts->tag = ines_read32(port, ts_rx);
drivers/ptp/ptp_ines.c
545
ts->sec = ines_rxts64(port, 3);
drivers/ptp/ptp_ines.c
546
ts->nsec = ines_rxts64(port, 2);
drivers/ptp/ptp_ines.c
547
ts->clkid = ines_rxts64(port, 4);
drivers/ptp/ptp_ines.c
548
ts->portnum = ines_read32(port, ts_rx);
drivers/ptp/ptp_ines.c
549
ts->seqid = ines_read32(port, ts_rx);
drivers/ptp/ptp_ines.c
551
list_del_init(&ts->list);
drivers/ptp/ptp_ines.c
552
list_add_tail(&ts->list, &port->events);
drivers/ptp/ptp_ines.c
575
static bool ines_timestamp_expired(struct ines_timestamp *ts)
drivers/ptp/ptp_ines.c
577
return time_after(jiffies, ts->tmo);
drivers/ptp/ptp_kvm_arm.c
29
int kvm_arch_ptp_get_clock(struct timespec64 *ts)
drivers/ptp/ptp_kvm_arm.c
31
return kvm_arch_ptp_get_crosststamp(NULL, ts, NULL);
drivers/ptp/ptp_kvm_common.c
100
memcpy(ts, &tspec, sizeof(struct timespec64));
drivers/ptp/ptp_kvm_common.c
80
const struct timespec64 *ts)
drivers/ptp/ptp_kvm_common.c
85
static int ptp_kvm_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_kvm_x86.c
77
int kvm_arch_ptp_get_clock(struct timespec64 *ts)
drivers/ptp/ptp_kvm_x86.c
89
ts->tv_sec = clock_pair->sec;
drivers/ptp/ptp_kvm_x86.c
90
ts->tv_nsec = clock_pair->nsec;
drivers/ptp/ptp_mock.c
105
struct timespec64 ts;
drivers/ptp/ptp_mock.c
107
mock_phc_gettime64(info, &ts);
drivers/ptp/ptp_mock.c
77
const struct timespec64 *ts)
drivers/ptp/ptp_mock.c
80
u64 ns = timespec64_to_ns(ts);
drivers/ptp/ptp_mock.c
89
static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/ptp/ptp_mock.c
98
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_netc.c
696
struct timespec64 *ts,
drivers/ptp/ptp_netc.c
711
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_netc.c
717
const struct timespec64 *ts)
drivers/ptp/ptp_netc.c
720
u64 ns = timespec64_to_ns(ts);
drivers/ptp/ptp_ocp.c
1476
__ptp_ocp_gettime_locked(struct ptp_ocp *bp, struct timespec64 *ts,
drivers/ptp/ptp_ocp.c
1500
ts->tv_sec = time_sec;
drivers/ptp/ptp_ocp.c
1501
ts->tv_nsec = time_ns;
drivers/ptp/ptp_ocp.c
1507
ptp_ocp_gettimex(struct ptp_clock_info *ptp_info, struct timespec64 *ts,
drivers/ptp/ptp_ocp.c
1515
err = __ptp_ocp_gettime_locked(bp, ts, sts);
drivers/ptp/ptp_ocp.c
1522
__ptp_ocp_settime_locked(struct ptp_ocp *bp, const struct timespec64 *ts)
drivers/ptp/ptp_ocp.c
1527
time_ns = ts->tv_nsec;
drivers/ptp/ptp_ocp.c
1528
time_sec = ts->tv_sec;
drivers/ptp/ptp_ocp.c
1544
ptp_ocp_settime(struct ptp_clock_info *ptp_info, const struct timespec64 *ts)
drivers/ptp/ptp_ocp.c
1550
__ptp_ocp_settime_locked(bp, ts);
drivers/ptp/ptp_ocp.c
1577
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
1582
err = __ptp_ocp_gettime_locked(bp, &ts, NULL);
drivers/ptp/ptp_ocp.c
1584
set_normalized_timespec64(&ts, ts.tv_sec,
drivers/ptp/ptp_ocp.c
1585
ts.tv_nsec + delta_ns);
drivers/ptp/ptp_ocp.c
1586
__ptp_ocp_settime_locked(bp, &ts);
drivers/ptp/ptp_ocp.c
1852
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
1877
ktime_get_clocktai_ts64(&ts);
drivers/ptp/ptp_ocp.c
1878
ptp_ocp_settime(&bp->ptp_info, &ts);
drivers/ptp/ptp_ocp.c
2319
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
2329
err = ptp_ocp_gettimex(&bp->ptp_info, &ts, &sts);
drivers/ptp/ptp_ocp.c
2333
start_ns = ktime_set(ts.tv_sec, ts.tv_nsec) + NSEC_PER_MSEC;
drivers/ptp/ptp_ocp.c
2385
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
2396
ts = ktime_to_timespec64(bp->signal[gen].start);
drivers/ptp/ptp_ocp.c
2397
iowrite32(ts.tv_sec, &reg->start_sec);
drivers/ptp/ptp_ocp.c
2398
iowrite32(ts.tv_nsec, &reg->start_ns);
drivers/ptp/ptp_ocp.c
2400
ts = ktime_to_timespec64(bp->signal[gen].period);
drivers/ptp/ptp_ocp.c
2401
iowrite32(ts.tv_sec, &reg->period_sec);
drivers/ptp/ptp_ocp.c
2402
iowrite32(ts.tv_nsec, &reg->period_ns);
drivers/ptp/ptp_ocp.c
2404
ts = ktime_to_timespec64(bp->signal[gen].pulse);
drivers/ptp/ptp_ocp.c
2405
iowrite32(ts.tv_sec, &reg->pulse_sec);
drivers/ptp/ptp_ocp.c
2406
iowrite32(ts.tv_nsec, &reg->pulse_ns);
drivers/ptp/ptp_ocp.c
3531
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
3535
ts = ktime_to_timespec64(signal->start);
drivers/ptp/ptp_ocp.c
3539
&ts.tv_sec);
drivers/ptp/ptp_ocp.c
3623
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
3625
ts = ktime_to_timespec64(bp->signal[i].start);
drivers/ptp/ptp_ocp.c
3626
return sysfs_emit(buf, "%llu.%lu\n", ts.tv_sec, ts.tv_nsec);
drivers/ptp/ptp_ocp.c
4391
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
4596
if (!ptp_ocp_gettimex(&bp->ptp_info, &ts, &sts)) {
drivers/ptp/ptp_ocp.c
4606
seq_printf(s, "%7s: %ptSp == %ptS TAI\n", "PHC", &ts, &ts);
drivers/ptp/ptp_ocp.c
4610
timespec64_to_ns(&ts) - ns,
drivers/ptp/ptp_ocp.c
4805
struct timespec64 ts;
drivers/ptp/ptp_ocp.c
4815
if (!ptp_ocp_gettimex(&bp->ptp_info, &ts, NULL))
drivers/ptp/ptp_ocp.c
4817
&ts, bp->sync ? "in-sync" : "UNSYNCED");
drivers/ptp/ptp_pch.c
369
static int ptp_pch_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_pch.c
380
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_pch.c
385
const struct timespec64 *ts)
drivers/ptp/ptp_pch.c
392
ns = timespec64_to_ns(ts);
drivers/ptp/ptp_qoriq.c
261
int ptp_qoriq_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
drivers/ptp/ptp_qoriq.c
273
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_qoriq.c
280
const struct timespec64 *ts)
drivers/ptp/ptp_qoriq.c
286
ns = timespec64_to_ns(ts);
drivers/ptp/ptp_s390.c
34
struct timespec64 *ts)
drivers/ptp/ptp_s390.c
42
*ts = eitod_to_timespec64(&tod);
drivers/ptp/ptp_s390.c
47
struct timespec64 *ts)
drivers/ptp/ptp_s390.c
52
*ts = tod_to_timespec64(tod);
drivers/ptp/ptp_s390.c
57
const struct timespec64 *ts)
drivers/ptp/ptp_vclock.c
108
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_vclock.c
114
const struct timespec64 *ts)
drivers/ptp/ptp_vclock.c
117
u64 ns = timespec64_to_ns(ts);
drivers/ptp/ptp_vclock.c
152
struct timespec64 ts;
drivers/ptp/ptp_vclock.c
154
ptp_vclock_gettime(&vclock->info, &ts);
drivers/ptp/ptp_vclock.c
178
struct timespec64 ts = {};
drivers/ptp/ptp_vclock.c
180
ptp->info->getcycles64(ptp->info, &ts);
drivers/ptp/ptp_vclock.c
182
return timespec64_to_ns(&ts);
drivers/ptp/ptp_vclock.c
75
struct timespec64 *ts)
drivers/ptp/ptp_vclock.c
84
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_vclock.c
90
struct timespec64 *ts,
drivers/ptp/ptp_vmclock.c
298
const struct timespec64 *ts)
drivers/ptp/ptp_vmclock.c
303
static int ptp_vmclock_gettimex(struct ptp_clock_info *ptp, struct timespec64 *ts,
drivers/ptp/ptp_vmclock.c
309
return vmclock_get_crosststamp(st, sts, NULL, ts);
drivers/ptp/ptp_vmw.c
49
static int ptp_vmw_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
drivers/ptp/ptp_vmw.c
55
*ts = ns_to_timespec64(ns);
drivers/ptp/ptp_vmw.c
60
const struct timespec64 *ts)
drivers/rtc/lib.c
201
struct timespec64 ts;
drivers/rtc/lib.c
204
ts = ktime_to_timespec64(kt);
drivers/rtc/lib.c
206
if (ts.tv_nsec)
drivers/rtc/lib.c
207
ts.tv_sec++;
drivers/rtc/lib.c
208
rtc_time64_to_tm(ts.tv_sec, &ret);
drivers/rtc/rtc-pcf2127.c
1036
.ts[0] = {
drivers/rtc/rtc-pcf2127.c
1064
.ts[0] = {
drivers/rtc/rtc-pcf2127.c
1092
.ts[0] = {
drivers/rtc/rtc-pcf2127.c
1100
.ts[1] = {
drivers/rtc/rtc-pcf2127.c
1108
.ts[2] = {
drivers/rtc/rtc-pcf2127.c
1116
.ts[3] = {
drivers/rtc/rtc-pcf2127.c
1146
pcf2127->cfg->ts[ts_id].reg_base,
drivers/rtc/rtc-pcf2127.c
1161
ret = regmap_update_bits(pcf2127->regmap, pcf2127->cfg->ts[ts_id].ie_reg,
drivers/rtc/rtc-pcf2127.c
1162
pcf2127->cfg->ts[ts_id].ie_bit,
drivers/rtc/rtc-pcf2127.c
1163
pcf2127->cfg->ts[ts_id].ie_bit);
drivers/rtc/rtc-pcf2127.c
202
struct pcf21xx_ts_config ts[PCF2127_MAX_TS_SUPPORTED];
drivers/rtc/rtc-pcf2127.c
212
time64_t ts[PCF2127_MAX_TS_SUPPORTED]; /* Timestamp values. */
drivers/rtc/rtc-pcf2127.c
708
static int pcf2127_rtc_ts_read(struct device *dev, time64_t *ts,
drivers/rtc/rtc-pcf2127.c
716
ret = regmap_bulk_read(pcf2127->regmap, pcf2127->cfg->ts[ts_id].reg_base,
drivers/rtc/rtc-pcf2127.c
743
*ts = rtc_tm_to_time64(&tm);
drivers/rtc/rtc-pcf2127.c
759
ret = pcf2127_rtc_ts_read(dev, &pcf2127->ts[ts_id], ts_id);
drivers/rtc/rtc-pcf2127.c
862
pcf2127->cfg->ts[ts_id].gnd_detect_reg,
drivers/rtc/rtc-pcf2127.c
863
pcf2127->cfg->ts[ts_id].gnd_detect_bit,
drivers/rtc/rtc-pcf2127.c
871
if (pcf2127->cfg->ts[ts_id].inter_detect_bit) {
drivers/rtc/rtc-pcf2127.c
874
pcf2127->cfg->ts[ts_id].inter_detect_reg,
drivers/rtc/rtc-pcf2127.c
875
pcf2127->cfg->ts[ts_id].inter_detect_bit,
drivers/rtc/rtc-pcf2127.c
926
time64_t ts;
drivers/rtc/rtc-pcf2127.c
934
ts = pcf2127->ts[ts_id];
drivers/rtc/rtc-pcf2127.c
944
pcf2127->cfg->ts[ts_id].gnd_detect_reg,
drivers/rtc/rtc-pcf2127.c
949
valid_low = ctrl & pcf2127->cfg->ts[ts_id].gnd_detect_bit;
drivers/rtc/rtc-pcf2127.c
951
if (pcf2127->cfg->ts[ts_id].inter_detect_bit) {
drivers/rtc/rtc-pcf2127.c
956
pcf2127->cfg->ts[ts_id].inter_detect_reg,
drivers/rtc/rtc-pcf2127.c
961
valid_inter = ctrl & pcf2127->cfg->ts[ts_id].inter_detect_bit;
drivers/rtc/rtc-pcf2127.c
967
ret = pcf2127_rtc_ts_read(dev->parent, &ts, ts_id);
drivers/rtc/rtc-pcf2127.c
975
return sprintf(buf, "%llu\n", (unsigned long long)ts);
drivers/s390/block/dasd_eer.c
293
struct timespec64 ts;
drivers/s390/block/dasd_eer.c
307
ktime_get_real_ts64(&ts);
drivers/s390/block/dasd_eer.c
308
header.tv_sec = ts.tv_sec;
drivers/s390/block/dasd_eer.c
309
header.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/s390/block/dasd_eer.c
337
struct timespec64 ts;
drivers/s390/block/dasd_eer.c
350
ktime_get_real_ts64(&ts);
drivers/s390/block/dasd_eer.c
351
header.tv_sec = ts.tv_sec;
drivers/s390/block/dasd_eer.c
352
header.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/s390/net/qeth_core_main.c
1571
struct task_struct *ts;
drivers/s390/net/qeth_core_main.c
1580
ts = kthread_run(qeth_do_reset, card, "qeth_recover");
drivers/s390/net/qeth_core_main.c
1581
if (IS_ERR(ts)) {
drivers/s390/scsi/zfcp_fc.c
1012
return &adapter->gs->ts;
drivers/s390/scsi/zfcp_fc.c
1125
zfcp_fc_wka_port_init(&wka_ports->ts, FC_FID_TIME_SERV, adapter);
drivers/s390/scsi/zfcp_fc.c
236
zfcp_fc_wka_port_force_offline(&gs->ts);
drivers/s390/scsi/zfcp_fc.h
218
struct zfcp_fc_wka_port ts;
drivers/scsi/aic94xx/aic94xx_task.c
148
struct task_status_struct *ts = &task->task_status;
drivers/scsi/aic94xx/aic94xx_task.c
172
ts->buf_valid_size = 0;
drivers/scsi/aic94xx/aic94xx_task.c
179
ts->residual = le32_to_cpu(*(__le32 *)r);
drivers/scsi/aic94xx/aic94xx_task.c
183
struct ata_task_resp *resp = (void *) &ts->buf[0];
drivers/scsi/aic94xx/aic94xx_task.c
185
ts->residual = le32_to_cpu(*(__le32 *)r);
drivers/scsi/aic94xx/aic94xx_task.c
190
ts->buf_valid_size = sizeof(*resp);
drivers/scsi/aic94xx/aic94xx_task.c
201
struct task_status_struct *ts = &task->task_status;
drivers/scsi/aic94xx/aic94xx_task.c
210
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
211
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/aic94xx/aic94xx_task.c
214
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
215
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/aic94xx/aic94xx_task.c
216
ts->residual = le32_to_cpu(*(__le32 *)dl->status_block);
drivers/scsi/aic94xx/aic94xx_task.c
219
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
220
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/aic94xx/aic94xx_task.c
221
ts->residual = 0;
drivers/scsi/aic94xx/aic94xx_task.c
225
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
226
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/aic94xx/aic94xx_task.c
230
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
231
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/aic94xx/aic94xx_task.c
233
ts->open_rej_reason = 1 + dl->status_block[2];
drivers/scsi/aic94xx/aic94xx_task.c
235
ts->open_rej_reason = (dl->status_block[2] >> 4)+10;
drivers/scsi/aic94xx/aic94xx_task.c
237
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/aic94xx/aic94xx_task.c
240
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
241
ts->stat = SAS_OPEN_TO;
drivers/scsi/aic94xx/aic94xx_task.c
245
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
246
ts->stat = SAS_PHY_DOWN;
drivers/scsi/aic94xx/aic94xx_task.c
249
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
250
ts->stat = SAS_PHY_DOWN;
drivers/scsi/aic94xx/aic94xx_task.c
258
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
259
ts->stat = SAS_INTERRUPTED;
drivers/scsi/aic94xx/aic94xx_task.c
265
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
266
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/aic94xx/aic94xx_task.c
269
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
270
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/aic94xx/aic94xx_task.c
276
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
277
ts->stat = SAS_DEVICE_UNKNOWN;
drivers/scsi/aic94xx/aic94xx_task.c
280
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
281
ts->stat = SAS_PENDING;
drivers/scsi/aic94xx/aic94xx_task.c
285
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/aic94xx/aic94xx_task.c
286
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/aic94xx/aic94xx_task.c
298
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/aic94xx/aic94xx_task.c
299
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/aic94xx/aic94xx_task.c
334
task, opcode, ts->resp, ts->stat);
drivers/scsi/bfa/bfa_cs.h
30
struct timespec64 ts; \
drivers/scsi/bfa/bfa_cs.h
32
ktime_get_ts64(&ts); \
drivers/scsi/bfa/bfa_cs.h
33
(ts.tv_sec*1000000+ts.tv_nsec / 1000); \
drivers/scsi/bfa/bfad_im.h
155
struct timespec64 ts;
drivers/scsi/bfa/bfad_im.h
157
ktime_get_real_ts64(&ts);
drivers/scsi/bfa/bfad_im.h
163
entry->aen_tv_sec = ts.tv_sec;
drivers/scsi/bfa/bfad_im.h
164
entry->aen_tv_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/scsi/hisi_sas/hisi_sas_main.c
1137
struct task_status_struct *ts;
drivers/scsi/hisi_sas/hisi_sas_main.c
1139
ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_main.c
1141
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_main.c
1142
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/hisi_sas/hisi_sas_main.c
137
struct task_status_struct *ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_main.c
138
struct ata_task_resp *resp = (struct ata_task_resp *)ts->buf;
drivers/scsi/hisi_sas/hisi_sas_main.c
147
ts->buf_valid_size = sizeof(*resp);
drivers/scsi/hisi_sas/hisi_sas_main.c
509
struct task_status_struct *ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_main.c
511
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/hisi_sas/hisi_sas_main.c
512
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1049
struct task_status_struct *ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1092
ts->residual = 0;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1093
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1103
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1104
ts->residual = 0;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1109
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1125
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1126
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1131
ts->stat = SAS_OPEN_TO;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1137
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1144
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1150
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1157
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1179
struct task_status_struct *ts;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1193
ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1202
memset(ts, 0, sizeof(*ts));
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1203
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1207
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1246
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1247
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1282
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1297
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1304
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2019
struct task_status_struct *ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2058
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2059
ts->open_rej_reason = SAS_OREJ_NO_DEST;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2064
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2065
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2070
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2071
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2076
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2077
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2082
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2083
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2090
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2091
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2097
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2102
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2103
ts->residual = 0;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2108
ts->residual = trans_tx_fail_type;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2109
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2164
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2174
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2184
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2185
ts->open_rej_reason = SAS_OREJ_NO_DEST;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2190
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2191
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2196
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2197
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2202
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2203
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2208
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2209
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2214
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2215
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2222
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2223
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2228
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2229
ts->residual = 0;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2234
ts->residual = trans_tx_fail_type;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2235
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2307
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2312
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2331
struct task_status_struct *ts;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2345
ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2354
memset(ts, 0, sizeof(*ts));
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2355
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2359
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2369
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2373
ts->stat = TMF_RESP_FUNC_SUCC;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2377
ts->stat = TMF_RESP_FUNC_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2384
ts->stat = TMF_RESP_FUNC_FAILED;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2402
if (ts->stat != SAS_DATA_UNDERRUN)
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2437
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2449
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2455
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
2462
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2265
struct task_status_struct *ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2290
ts->residual = trans_tx_fail_type;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2291
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2293
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2296
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2297
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2312
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2315
ts->residual = trans_tx_fail_type;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2316
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2319
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2322
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2323
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2329
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2343
struct task_status_struct *ts;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2357
ts = &task->task_status;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2366
memset(ts, 0, sizeof(*ts));
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2367
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2371
ts->stat = SAS_PHY_DOWN;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2385
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2389
ts->stat = TMF_RESP_FUNC_SUCC;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2392
ts->stat = TMF_RESP_FUNC_COMPLETE;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2398
ts->stat = TMF_RESP_FUNC_FAILED;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2409
if (ts->stat != SAS_DATA_UNDERRUN)
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2441
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2452
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2457
ts->stat = SAS_SAM_STAT_CHECK_CONDITION;
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
2464
ts->stat = SAS_PHY_DOWN;
drivers/scsi/isci/request.c
2709
struct task_status_struct *ts = &task->task_status;
drivers/scsi/isci/request.c
2710
struct ata_task_resp *resp = (void *)&ts->buf[0];
drivers/scsi/isci/request.c
2714
ts->buf_valid_size = sizeof(*resp);
drivers/scsi/isci/request.c
2718
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/isci/request.c
2720
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/isci/request.c
2722
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/libsas/sas_ata.c
27
static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts)
drivers/scsi/libsas/sas_ata.c
32
if (ts->resp == SAS_TASK_UNDELIVERED)
drivers/scsi/libsas/sas_ata.c
37
switch (ts->stat) {
drivers/scsi/libsas/sas_ata.c
58
__func__, ts->stat);
drivers/scsi/libsas/sas_scsi_host.c
40
struct task_status_struct *ts = &task->task_status;
drivers/scsi/libsas/sas_scsi_host.c
44
if (ts->resp == SAS_TASK_UNDELIVERED) {
drivers/scsi/libsas/sas_scsi_host.c
49
switch (ts->stat) {
drivers/scsi/libsas/sas_scsi_host.c
58
scsi_set_resid(sc, ts->residual);
drivers/scsi/libsas/sas_scsi_host.c
72
if (ts->open_rej_reason == SAS_OREJ_RSVD_RETRY)
drivers/scsi/libsas/sas_scsi_host.c
85
memcpy(sc->sense_buffer, ts->buf,
drivers/scsi/libsas/sas_scsi_host.c
86
min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size));
drivers/scsi/libsas/sas_scsi_host.c
90
stat = ts->stat;
drivers/scsi/lpfc/lpfc_init.c
106
static void lpfc_cgn_update_tstamp(struct lpfc_hba *phba, struct lpfc_cgn_ts *ts);
drivers/scsi/lpfc/lpfc_init.c
5655
lpfc_cgn_update_tstamp(struct lpfc_hba *phba, struct lpfc_cgn_ts *ts)
drivers/scsi/lpfc/lpfc_init.c
5663
ts->month = tm_val.tm_mon + 1;
drivers/scsi/lpfc/lpfc_init.c
5664
ts->day = tm_val.tm_mday;
drivers/scsi/lpfc/lpfc_init.c
5665
ts->year = tm_val.tm_year - 100;
drivers/scsi/lpfc/lpfc_init.c
5666
ts->hour = tm_val.tm_hour;
drivers/scsi/lpfc/lpfc_init.c
5667
ts->minute = tm_val.tm_min;
drivers/scsi/lpfc/lpfc_init.c
5668
ts->second = tm_val.tm_sec;
drivers/scsi/lpfc/lpfc_init.c
5673
ts->day, ts->month,
drivers/scsi/lpfc/lpfc_init.c
5674
ts->year, ts->hour,
drivers/scsi/lpfc/lpfc_init.c
5675
ts->minute, ts->second);
drivers/scsi/mvsas/mv_sas.c
718
struct task_status_struct *ts = &task->task_status;
drivers/scsi/mvsas/mv_sas.c
721
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/mvsas/mv_sas.c
722
ts->stat = SAS_PHY_DOWN;
drivers/scsi/mvsas/mv_sas.c
727
struct task_status_struct *ts = &task->task_status;
drivers/scsi/mvsas/mv_sas.c
730
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/mvsas/mv_sas.c
731
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_hwi.c
1475
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
1501
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
1502
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1504
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
1514
t, pw->handler, ts->resp, ts->stat);
drivers/scsi/pm8001/pm8001_hwi.c
1630
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
1638
ts = &task->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
1649
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1723
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
1744
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
1761
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1762
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm8001_hwi.c
1764
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1765
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
1766
ts->residual = param;
drivers/scsi/pm8001/pm8001_hwi.c
1775
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1776
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm8001_hwi.c
1782
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1783
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
1784
ts->residual = param;
drivers/scsi/pm8001/pm8001_hwi.c
1790
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
1791
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_hwi.c
1795
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1796
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1798
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1802
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1803
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1804
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1809
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1810
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1811
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm8001_hwi.c
1816
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1817
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1818
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
1822
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1823
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1824
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1828
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1829
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1830
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
1839
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1840
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1841
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
1845
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1846
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1847
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm8001_hwi.c
1852
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
1853
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1854
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
1858
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1859
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1860
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1864
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1865
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
1869
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1870
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1874
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1875
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1876
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1880
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1881
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1885
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1886
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1890
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1891
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1899
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1900
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1904
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1905
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1909
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1910
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1915
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1916
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1917
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1922
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1923
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1934
t, status, ts->resp, ts->stat);
drivers/scsi/pm8001/pm8001_hwi.c
1949
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
1966
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
1972
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1973
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
1974
ts->residual = 0;
drivers/scsi/pm8001/pm8001_hwi.c
1984
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1985
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1986
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
1990
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1991
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1992
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm8001_hwi.c
1997
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
1998
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
1999
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2003
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2004
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2005
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2009
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2010
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2011
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2020
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2021
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2022
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2026
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2027
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2028
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm8001_hwi.c
2033
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2034
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2035
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2039
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2040
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2041
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2045
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2046
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
2054
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2055
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2059
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2060
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2065
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2066
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2071
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2072
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2076
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2077
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2082
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2083
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2091
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2092
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2101
t, event, ts->resp, ts->stat);
drivers/scsi/pm8001/pm8001_hwi.c
2126
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
2156
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
2206
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2207
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm8001_hwi.c
2210
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2211
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2212
ts->residual = param;
drivers/scsi/pm8001/pm8001_hwi.c
2217
resp = (struct ata_task_resp *)ts->buf;
drivers/scsi/pm8001/pm8001_hwi.c
2236
ts->buf_valid_size = sizeof(*resp);
drivers/scsi/pm8001/pm8001_hwi.c
2246
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2247
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm8001_hwi.c
2255
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2256
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2257
ts->residual = param;
drivers/scsi/pm8001/pm8001_hwi.c
2263
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2264
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2270
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2271
ts->stat = SAS_INTERRUPTED;
drivers/scsi/pm8001/pm8001_hwi.c
2277
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2278
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2279
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2285
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2286
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2287
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm8001_hwi.c
2294
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2295
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2296
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2302
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2303
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2304
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm8001_hwi.c
2310
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2311
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2316
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2317
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2325
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2326
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2327
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2332
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2333
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2340
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2341
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2342
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm8001_hwi.c
2348
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2349
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2354
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2355
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2363
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2364
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2365
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2371
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2372
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
2378
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2379
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
2385
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2386
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm8001_hwi.c
2392
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2393
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2399
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2400
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2406
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2407
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2413
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2414
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2420
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2421
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2425
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2426
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2433
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2434
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2440
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2441
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2445
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2446
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2454
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2455
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2456
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2463
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2464
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2476
t, status, ts->resp, ts->stat);
drivers/scsi/pm8001/pm8001_hwi.c
2488
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
2528
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
2535
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2536
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2537
ts->residual = 0;
drivers/scsi/pm8001/pm8001_hwi.c
2541
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2542
ts->stat = SAS_INTERRUPTED;
drivers/scsi/pm8001/pm8001_hwi.c
2546
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2547
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2548
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2552
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2553
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2554
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm8001_hwi.c
2559
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2560
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2561
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2565
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2566
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2567
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm8001_hwi.c
2571
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2572
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2577
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2578
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2585
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_hwi.c
2586
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2587
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2591
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2592
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2593
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm8001_hwi.c
2598
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2599
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2600
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2604
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2605
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
2609
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2610
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm8001_hwi.c
2614
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2615
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2619
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2620
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2624
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2625
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2629
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2630
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2635
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2636
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2640
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2641
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2646
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2647
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2654
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2655
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2660
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2661
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm8001_hwi.c
2676
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
2685
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
2699
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2700
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm8001_hwi.c
2706
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2707
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm8001_hwi.c
2713
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2714
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm8001_hwi.c
2715
ts->residual = 0;
drivers/scsi/pm8001/pm8001_hwi.c
2721
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2722
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2726
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2727
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm8001_hwi.c
2731
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2732
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm8001_hwi.c
2736
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2737
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm8001_hwi.c
2742
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2743
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2744
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2749
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2750
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2751
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2755
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2756
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2757
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm8001_hwi.c
2761
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2762
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2763
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm8001_hwi.c
2771
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2772
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2773
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2777
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2778
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2779
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm8001_hwi.c
2784
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2785
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2786
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm8001_hwi.c
2790
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2791
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2795
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2796
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2797
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2801
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2802
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm8001_hwi.c
2806
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2807
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2808
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2812
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2813
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2817
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2818
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2819
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2824
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2825
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_hwi.c
2826
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm8001_hwi.c
2830
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
2831
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm8001_hwi.c
2841
t, status, ts->resp, ts->stat);
drivers/scsi/pm8001/pm8001_hwi.c
3446
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_hwi.c
3468
ts = &t->task_status;
drivers/scsi/pm8001/pm8001_hwi.c
3476
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_hwi.c
3477
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm8001_hwi.c
3481
ts->resp = TMF_RESP_FUNC_FAILED;
drivers/scsi/pm8001/pm8001_sas.c
484
struct task_status_struct *ts = &task->task_status;
drivers/scsi/pm8001/pm8001_sas.c
497
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_sas.c
498
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_sas.c
506
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_sas.c
519
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm8001_sas.c
520
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm8001_sas.c
818
struct task_status_struct *ts;
drivers/scsi/pm8001/pm8001_sas.c
842
ts = &task->task_status;
drivers/scsi/pm8001/pm8001_sas.c
843
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm8001_sas.c
845
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm8001_sas.c
846
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
1837
struct task_status_struct *ts;
drivers/scsi/pm8001/pm80xx_hwi.c
1857
ts = &t->task_status;
drivers/scsi/pm8001/pm80xx_hwi.c
1873
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1874
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm80xx_hwi.c
1876
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1877
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
1878
ts->residual = param;
drivers/scsi/pm8001/pm80xx_hwi.c
1887
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1888
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm80xx_hwi.c
1896
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1897
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
1898
ts->residual = param;
drivers/scsi/pm8001/pm80xx_hwi.c
1904
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
1905
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
1911
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1912
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1914
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
1920
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1921
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1922
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
1929
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1930
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1931
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
1938
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1939
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1940
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm80xx_hwi.c
1947
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1948
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1949
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
1955
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1956
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1957
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
1968
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1969
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1970
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
1979
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1980
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1981
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
1988
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
1989
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1990
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm80xx_hwi.c
1997
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
1998
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
1999
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2005
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2006
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2007
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2013
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2014
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2020
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2021
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2027
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2028
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2029
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2035
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2036
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2042
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2043
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2049
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2050
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2058
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2059
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2065
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2066
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2072
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2073
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2080
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2081
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2082
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2089
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2090
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2104
t, status, ts->resp, ts->stat);
drivers/scsi/pm8001/pm80xx_hwi.c
2119
struct task_status_struct *ts;
drivers/scsi/pm8001/pm80xx_hwi.c
2135
ts = &t->task_status;
drivers/scsi/pm8001/pm80xx_hwi.c
2141
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2142
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2143
ts->residual = 0;
drivers/scsi/pm8001/pm80xx_hwi.c
2153
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2154
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2155
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2160
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2161
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2162
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm80xx_hwi.c
2167
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2168
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2169
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2173
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2174
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2175
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2184
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2185
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2186
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2195
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2196
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2197
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2202
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2203
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2204
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm80xx_hwi.c
2209
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2210
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2211
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2215
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2216
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2217
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2221
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2222
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2230
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2231
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2235
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2236
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2241
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2242
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2247
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2248
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2252
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2253
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2258
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2259
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2265
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2266
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2274
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2275
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2285
t, event, ts->resp, ts->stat);
drivers/scsi/pm8001/pm80xx_hwi.c
2308
struct task_status_struct *ts;
drivers/scsi/pm8001/pm80xx_hwi.c
2340
ts = &t->task_status;
drivers/scsi/pm8001/pm80xx_hwi.c
2391
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2392
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm80xx_hwi.c
2395
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2396
ts->stat = SAS_PROTO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2397
ts->residual = param;
drivers/scsi/pm8001/pm80xx_hwi.c
2402
resp = (struct ata_task_resp *)ts->buf;
drivers/scsi/pm8001/pm80xx_hwi.c
2421
ts->buf_valid_size = sizeof(*resp);
drivers/scsi/pm8001/pm80xx_hwi.c
2431
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2432
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm80xx_hwi.c
2440
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2441
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2442
ts->residual = param;
drivers/scsi/pm8001/pm80xx_hwi.c
2448
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2449
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2455
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2456
ts->stat = SAS_INTERRUPTED;
drivers/scsi/pm8001/pm80xx_hwi.c
2462
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2463
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2464
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2471
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2472
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2473
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm80xx_hwi.c
2480
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2481
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2482
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2488
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2489
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2490
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm80xx_hwi.c
2501
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2502
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2507
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2508
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2520
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2521
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2522
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2527
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2528
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2540
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2541
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2542
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm80xx_hwi.c
2549
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2550
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2555
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2556
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2568
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2569
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2570
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2576
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2577
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2583
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2584
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2590
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2591
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm80xx_hwi.c
2597
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2598
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2604
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2605
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2611
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2612
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2618
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2619
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2625
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2626
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2630
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2631
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2642
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2643
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2649
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2650
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2654
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2655
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2667
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2668
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2669
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2678
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2679
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2691
t, status, ts->resp, ts->stat);
drivers/scsi/pm8001/pm80xx_hwi.c
2710
struct task_status_struct *ts;
drivers/scsi/pm8001/pm80xx_hwi.c
2754
ts = &t->task_status;
drivers/scsi/pm8001/pm80xx_hwi.c
2760
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2761
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2762
ts->residual = 0;
drivers/scsi/pm8001/pm80xx_hwi.c
2766
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2767
ts->stat = SAS_INTERRUPTED;
drivers/scsi/pm8001/pm80xx_hwi.c
2771
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2772
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2773
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
2778
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2779
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2780
ts->open_rej_reason = SAS_OREJ_EPROTO;
drivers/scsi/pm8001/pm80xx_hwi.c
2785
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2786
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2787
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2791
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2792
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2793
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm80xx_hwi.c
2803
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2804
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
2809
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2810
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
2817
ts->resp = SAS_TASK_UNDELIVERED;
drivers/scsi/pm8001/pm80xx_hwi.c
2818
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2819
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2824
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2825
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2826
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm80xx_hwi.c
2831
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2832
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
2833
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
2837
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2838
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2842
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2843
ts->stat = SAS_NAK_R_ERR;
drivers/scsi/pm8001/pm80xx_hwi.c
2847
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2848
ts->stat = SAS_DATA_UNDERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2852
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2853
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2857
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2858
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2862
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2863
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2868
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2869
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2873
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2874
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2879
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2880
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2887
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2888
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2894
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2895
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2900
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2901
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2906
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2907
ts->stat = SAS_OPEN_TO;
drivers/scsi/pm8001/pm80xx_hwi.c
2923
struct task_status_struct *ts;
drivers/scsi/pm8001/pm80xx_hwi.c
2933
ts = &t->task_status;
drivers/scsi/pm8001/pm80xx_hwi.c
2946
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2947
ts->stat = SAS_SAM_STAT_GOOD;
drivers/scsi/pm8001/pm80xx_hwi.c
2972
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2973
ts->stat = SAS_ABORTED_TASK;
drivers/scsi/pm8001/pm80xx_hwi.c
2979
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2980
ts->stat = SAS_DATA_OVERRUN;
drivers/scsi/pm8001/pm80xx_hwi.c
2981
ts->residual = 0;
drivers/scsi/pm8001/pm80xx_hwi.c
2987
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2988
ts->stat = SAS_PHY_DOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
2992
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2993
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm80xx_hwi.c
2997
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
2998
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm80xx_hwi.c
3002
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3003
ts->stat = SAS_SAM_STAT_BUSY;
drivers/scsi/pm8001/pm80xx_hwi.c
3008
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3009
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3010
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
3015
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3016
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3017
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
3021
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3022
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3023
ts->open_rej_reason = SAS_OREJ_RSVD_CONT0;
drivers/scsi/pm8001/pm80xx_hwi.c
3032
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3033
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3034
ts->open_rej_reason = SAS_OREJ_UNKNOWN;
drivers/scsi/pm8001/pm80xx_hwi.c
3042
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3043
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3044
ts->open_rej_reason = SAS_OREJ_BAD_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
3049
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3050
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3051
ts->open_rej_reason = SAS_OREJ_CONN_RATE;
drivers/scsi/pm8001/pm80xx_hwi.c
3056
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3057
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3058
ts->open_rej_reason = SAS_OREJ_WRONG_DEST;
drivers/scsi/pm8001/pm80xx_hwi.c
3062
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3063
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
3067
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3068
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3069
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
3073
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3074
ts->stat = SAS_QUEUE_FULL;
drivers/scsi/pm8001/pm80xx_hwi.c
3078
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3079
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3080
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
3084
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3085
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
3089
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3090
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3091
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
3096
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3097
ts->stat = SAS_OPEN_REJECT;
drivers/scsi/pm8001/pm80xx_hwi.c
3098
ts->open_rej_reason = SAS_OREJ_RSVD_RETRY;
drivers/scsi/pm8001/pm80xx_hwi.c
3102
ts->resp = SAS_TASK_COMPLETE;
drivers/scsi/pm8001/pm80xx_hwi.c
3103
ts->stat = SAS_DEV_NO_RESPONSE;
drivers/scsi/pm8001/pm80xx_hwi.c
3114
t, status, ts->resp, ts->stat);
drivers/scsi/snic/snic_trc.c
39
td->ts = 0; /* Marker for checking the record, for complete data*/
drivers/scsi/snic/snic_trc.c
56
jiffies_to_timespec64(td->ts, &tmspec);
drivers/scsi/snic/snic_trc.c
88
if (td->ts == 0) {
drivers/scsi/snic/snic_trc.h
19
u64 ts; /* Time Stamp */
drivers/scsi/snic/snic_trc.h
63
tr_rec->ts = jiffies; /* Update time stamp at last */
drivers/soc/fsl/qe/tsa.c
607
u32 ts;
drivers/soc/fsl/qe/tsa.c
622
ts = 0;
drivers/soc/fsl/qe/tsa.c
641
tdm_id, route_name, ts, ts + count - 1, serial_name);
drivers/soc/fsl/qe/tsa.c
642
ts += count;
drivers/spi/spi-slave-time.c
67
u64 ts;
drivers/spi/spi-slave-time.c
69
ts = local_clock();
drivers/spi/spi-slave-time.c
70
rem_us = do_div(ts, 1000000000) / 1000;
drivers/spi/spi-slave-time.c
72
priv->buf[0] = cpu_to_be32(ts);
drivers/staging/greybus/loopback.c
365
static u64 gb_loopback_calc_latency(ktime_t ts, ktime_t te)
drivers/staging/greybus/loopback.c
367
return __gb_loopback_calc_latency(ktime_to_ns(ts), ktime_to_ns(te));
drivers/staging/greybus/loopback.c
375
ktime_t ts, te;
drivers/staging/greybus/loopback.c
378
ts = ktime_get();
drivers/staging/greybus/loopback.c
409
gb->elapsed_nsecs = gb_loopback_calc_latency(ts, te);
drivers/staging/greybus/loopback.c
441
gb->elapsed_nsecs = gb_loopback_calc_latency(op_async->ts, te);
drivers/staging/greybus/loopback.c
494
op_async->ts = ktime_get();
drivers/staging/greybus/loopback.c
55
ktime_t ts;
drivers/staging/greybus/loopback.c
719
gb->ts = ktime_set(0, 0);
drivers/staging/greybus/loopback.c
72
ktime_t ts;
drivers/staging/greybus/loopback.c
810
nlat = gb_loopback_calc_latency(gb->ts, te);
drivers/staging/greybus/loopback.c
818
gb->ts = te;
drivers/staging/greybus/loopback.c
894
if (ktime_to_ns(gb->ts) == 0)
drivers/staging/greybus/loopback.c
895
gb->ts = ktime_get();
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
781
int ts = state->trace[t][i].time_stamp;
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
783
if (ts) {
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
786
ts,
drivers/staging/media/av7110/av7110.c
306
return dvbdmxfilter->feed->cb.ts(buffer1, buffer1_len,
drivers/staging/media/av7110/av7110.c
308
&dvbdmxfilter->feed->feed.ts,
drivers/staging/media/av7110/av7110_av.c
100
&dvbdmxfeed->feed.ts, NULL);
drivers/staging/media/av7110/av7110_av.c
830
feed->cb.ts(obuf, 188, NULL, 0, &feed->feed.ts, NULL);
drivers/staging/media/av7110/av7110_av.c
89
return dvbdmxfeed->cb.ts(buf, len, NULL, 0,
drivers/staging/media/av7110/av7110_av.c
90
&dvbdmxfeed->feed.ts, NULL);
drivers/staging/media/av7110/av7110_av.c
99
dvbdmxfeed->cb.ts(data, 188, NULL, 0,
drivers/staging/media/ipu7/ipu7-isys.c
1003
stream->seq[stream->seq_index].sequence, ts);
drivers/staging/media/ipu7/ipu7-isys.c
1013
stream->seq[stream->seq_index].sequence, ts);
drivers/staging/media/ipu7/ipu7-isys.c
895
u64 ts;
drivers/staging/media/ipu7/ipu7-isys.c
911
ts = ((u64)resp->timestamp[1] << 32) | resp->timestamp[0];
drivers/staging/media/ipu7/ipu7-isys.c
934
dev_dbg(dev, "\tts %llu\n", ts);
drivers/staging/media/ipu7/ipu7-isys.c
999
stream->seq[stream->seq_index].timestamp = ts;
drivers/staging/media/meson/vdec/vdec.h
41
u64 ts;
drivers/staging/media/meson/vdec/vdec_helpers.c
230
int amvdec_add_ts(struct amvdec_session *sess, u64 ts,
drivers/staging/media/meson/vdec/vdec_helpers.c
240
new_ts->ts = ts;
drivers/staging/media/meson/vdec/vdec_helpers.c
252
void amvdec_remove_ts(struct amvdec_session *sess, u64 ts)
drivers/staging/media/meson/vdec/vdec_helpers.c
259
if (tmp->ts == ts) {
drivers/staging/media/meson/vdec/vdec_helpers.c
266
"Couldn't remove buffer with timestamp %llu from list\n", ts);
drivers/staging/media/meson/vdec/vdec_helpers.c
345
timestamp = tmp->ts;
drivers/staging/media/meson/vdec/vdec_helpers.c
392
timestamp = match->ts;
drivers/staging/media/meson/vdec/vdec_helpers.h
59
int amvdec_add_ts(struct amvdec_session *sess, u64 ts,
drivers/staging/media/meson/vdec/vdec_helpers.h
61
void amvdec_remove_ts(struct amvdec_session *sess, u64 ts);
drivers/target/target_core_transport.c
3165
static char *target_ts_to_str(u32 ts)
drivers/target/target_core_transport.c
3169
if (ts & CMD_T_ABORTED)
drivers/target/target_core_transport.c
3171
if (ts & CMD_T_ACTIVE)
drivers/target/target_core_transport.c
3173
if (ts & CMD_T_COMPLETE)
drivers/target/target_core_transport.c
3175
if (ts & CMD_T_SENT)
drivers/target/target_core_transport.c
3177
if (ts & CMD_T_STOP)
drivers/target/target_core_transport.c
3179
if (ts & CMD_T_FABRIC_STOP)
drivers/tee/optee/rpc.c
18
struct timespec64 ts;
drivers/tee/optee/rpc.c
26
ktime_get_real_ts64(&ts);
drivers/tee/optee/rpc.c
27
arg->params[0].u.value.a = ts.tv_sec;
drivers/tee/optee/rpc.c
28
arg->params[0].u.value.b = ts.tv_nsec;
drivers/thermal/spacemit/k1_tsensor.c
102
val = readl(ts->base + K1_TSENSOR_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
104
writel(val, ts->base + K1_TSENSOR_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
109
struct k1_tsensor *ts = ch->ts;
drivers/thermal/spacemit/k1_tsensor.c
112
val = readl(ts->base + K1_TSENSOR_INT_CLR_REG);
drivers/thermal/spacemit/k1_tsensor.c
114
writel(val, ts->base + K1_TSENSOR_INT_CLR_REG);
drivers/thermal/spacemit/k1_tsensor.c
116
val = readl(ts->base + K1_TSENSOR_INT_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
118
writel(val, ts->base + K1_TSENSOR_INT_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
121
val = readl(ts->base + K1_TSENSOR_INT_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
123
writel(val, ts->base + K1_TSENSOR_INT_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
133
struct k1_tsensor *ts = ch->ts;
drivers/thermal/spacemit/k1_tsensor.c
136
val = readl(ts->base + K1_TSENSOR_DATA_REG(ch->id));
drivers/thermal/spacemit/k1_tsensor.c
156
struct k1_tsensor *ts = ch->ts;
drivers/thermal/spacemit/k1_tsensor.c
167
val = readl(ts->base + K1_TSENSOR_THRSH_REG(ch->id));
drivers/thermal/spacemit/k1_tsensor.c
173
writel(val, ts->base + K1_TSENSOR_THRSH_REG(ch->id));
drivers/thermal/spacemit/k1_tsensor.c
185
struct k1_tsensor *ts = (struct k1_tsensor *)data;
drivers/thermal/spacemit/k1_tsensor.c
188
status = readl(ts->base + K1_TSENSOR_INT_STA_REG);
drivers/thermal/spacemit/k1_tsensor.c
192
mask = readl(ts->base + K1_TSENSOR_INT_CLR_REG);
drivers/thermal/spacemit/k1_tsensor.c
194
writel(mask, ts->base + K1_TSENSOR_INT_CLR_REG);
drivers/thermal/spacemit/k1_tsensor.c
195
thermal_zone_device_update(ts->ch[i].tzd, THERMAL_EVENT_UNSPECIFIED);
drivers/thermal/spacemit/k1_tsensor.c
205
struct k1_tsensor *ts;
drivers/thermal/spacemit/k1_tsensor.c
210
ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
drivers/thermal/spacemit/k1_tsensor.c
211
if (!ts)
drivers/thermal/spacemit/k1_tsensor.c
214
ts->base = devm_platform_ioremap_resource(pdev, 0);
drivers/thermal/spacemit/k1_tsensor.c
215
if (IS_ERR(ts->base))
drivers/thermal/spacemit/k1_tsensor.c
216
return dev_err_probe(dev, PTR_ERR(ts->base), "Failed to get reg\n");
drivers/thermal/spacemit/k1_tsensor.c
230
k1_tsensor_init(ts);
drivers/thermal/spacemit/k1_tsensor.c
238
IRQF_ONESHOT, "k1_tsensor", ts);
drivers/thermal/spacemit/k1_tsensor.c
243
ts->ch[i].id = i;
drivers/thermal/spacemit/k1_tsensor.c
244
ts->ch[i].ts = ts;
drivers/thermal/spacemit/k1_tsensor.c
245
ts->ch[i].tzd = devm_thermal_of_zone_register(dev, i, ts->ch + i, &k1_tsensor_ops);
drivers/thermal/spacemit/k1_tsensor.c
246
if (IS_ERR(ts->ch[i].tzd))
drivers/thermal/spacemit/k1_tsensor.c
247
return PTR_ERR(ts->ch[i].tzd);
drivers/thermal/spacemit/k1_tsensor.c
250
ret = devm_thermal_add_hwmon_sysfs(dev, ts->ch[i].tzd);
drivers/thermal/spacemit/k1_tsensor.c
254
k1_tsensor_enable_irq(ts->ch + i);
drivers/thermal/spacemit/k1_tsensor.c
257
platform_set_drvdata(pdev, ts);
drivers/thermal/spacemit/k1_tsensor.c
63
struct k1_tsensor *ts;
drivers/thermal/spacemit/k1_tsensor.c
73
static void k1_tsensor_init(struct k1_tsensor *ts)
drivers/thermal/spacemit/k1_tsensor.c
78
writel(0xffffffff, ts->base + K1_TSENSOR_INT_EN_REG);
drivers/thermal/spacemit/k1_tsensor.c
81
val = readl(ts->base + K1_TSENSOR_TIME_REG);
drivers/thermal/spacemit/k1_tsensor.c
86
writel(val, ts->base + K1_TSENSOR_TIME_REG);
drivers/thermal/spacemit/k1_tsensor.c
92
val = readl(ts->base + K1_TSENSOR_PCTRL_REG);
drivers/thermal/spacemit/k1_tsensor.c
99
writel(val, ts->base + K1_TSENSOR_PCTRL_REG);
drivers/thermal/tegra/soctherm.c
1001
struct tegra_soctherm *ts = arg;
drivers/thermal/tegra/soctherm.c
1004
st = readl(ts->regs + OC_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
1015
writel(st, ts->regs + OC_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
1019
soctherm_oc_intr_enable(ts, THROTTLE_OC1, true);
drivers/thermal/tegra/soctherm.c
1022
soctherm_oc_intr_enable(ts, THROTTLE_OC2, true);
drivers/thermal/tegra/soctherm.c
1025
soctherm_oc_intr_enable(ts, THROTTLE_OC3, true);
drivers/thermal/tegra/soctherm.c
1028
soctherm_oc_intr_enable(ts, THROTTLE_OC4, true);
drivers/thermal/tegra/soctherm.c
1049
writel(st, ts->regs + OC_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
1072
struct tegra_soctherm *ts = arg;
drivers/thermal/tegra/soctherm.c
1075
if (!ts)
drivers/thermal/tegra/soctherm.c
1078
r = readl(ts->regs + OC_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
1079
writel(r, ts->regs + OC_INTR_DISABLE);
drivers/thermal/tegra/soctherm.c
1259
struct tegra_soctherm *ts = platform_get_drvdata(pdev);
drivers/thermal/tegra/soctherm.c
1260
const struct tegra_tsensor *tsensors = ts->soc->tsensors;
drivers/thermal/tegra/soctherm.c
1261
const struct tegra_tsensor_group **ttgs = ts->soc->ttgs;
drivers/thermal/tegra/soctherm.c
1267
for (i = 0; i < ts->soc->num_tsensors; i++) {
drivers/thermal/tegra/soctherm.c
1268
r = readl(ts->regs + tsensors[i].base + SENSOR_CONFIG1);
drivers/thermal/tegra/soctherm.c
1286
r = readl(ts->regs + tsensors[i].base + SENSOR_STATUS1);
drivers/thermal/tegra/soctherm.c
1292
r = readl(ts->regs + tsensors[i].base + SENSOR_STATUS0);
drivers/thermal/tegra/soctherm.c
1298
r = readl(ts->regs + tsensors[i].base + SENSOR_CONFIG0);
drivers/thermal/tegra/soctherm.c
1310
r = readl(ts->regs + tsensors[i].base + SENSOR_CONFIG2);
drivers/thermal/tegra/soctherm.c
1317
r = readl(ts->regs + SENSOR_PDIV);
drivers/thermal/tegra/soctherm.c
1320
r = readl(ts->regs + SENSOR_HOTSPOT_OFF);
drivers/thermal/tegra/soctherm.c
1326
r = readl(ts->regs + SENSOR_TEMP1);
drivers/thermal/tegra/soctherm.c
1331
r = readl(ts->regs + SENSOR_TEMP2);
drivers/thermal/tegra/soctherm.c
1337
for (i = 0; i < ts->soc->num_ttgs; i++) {
drivers/thermal/tegra/soctherm.c
1344
r = readl(ts->regs + THERMCTL_LVL_REG(off, level));
drivers/thermal/tegra/soctherm.c
1348
v = sign_extend32(state, ts->soc->bptt - 1);
drivers/thermal/tegra/soctherm.c
1349
v *= ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
1354
v = sign_extend32(state, ts->soc->bptt - 1);
drivers/thermal/tegra/soctherm.c
1355
v *= ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
1395
r = readl(ts->regs + THERMCTL_STATS_CTL);
drivers/thermal/tegra/soctherm.c
1404
r = readl(ts->regs + THERMCTL_LVL_REG(off, level));
drivers/thermal/tegra/soctherm.c
1408
r = readl(ts->regs + THERMCTL_LVL_REG(off, level));
drivers/thermal/tegra/soctherm.c
1412
r = readl(ts->regs + THERMCTL_THERMTRIP_CTL);
drivers/thermal/tegra/soctherm.c
1415
for (i = 0; i < ts->soc->num_ttgs; i++) {
drivers/thermal/tegra/soctherm.c
1419
state *= ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
1423
r = readl(ts->regs + THROT_GLOBAL_CFG);
drivers/thermal/tegra/soctherm.c
1428
r = readl(ts->regs + THROT_STATUS);
drivers/thermal/tegra/soctherm.c
1436
r = readl(ts->regs + CPU_PSKIP_STATUS);
drivers/thermal/tegra/soctherm.c
1437
if (ts->soc->use_ccroc) {
drivers/thermal/tegra/soctherm.c
1519
struct tegra_soctherm *ts = cdev->devdata;
drivers/thermal/tegra/soctherm.c
1522
r = readl(ts->regs + THROT_STATUS);
drivers/thermal/tegra/soctherm.c
1546
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
1547
struct tsensor_group_thermtrips *tt = ts->soc->thermtrips;
drivers/thermal/tegra/soctherm.c
1548
const int max_num_prop = ts->soc->num_ttgs * 2;
drivers/thermal/tegra/soctherm.c
1617
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
1628
ret = of_property_read_u32(np, ts->soc->use_ccroc ?
drivers/thermal/tegra/soctherm.c
1632
if (ts->soc->use_ccroc &&
drivers/thermal/tegra/soctherm.c
1635
else if (!ts->soc->use_ccroc && val <= 100)
drivers/thermal/tegra/soctherm.c
1665
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
1671
ts->throt_cfgs[i].name = throt_names[i];
drivers/thermal/tegra/soctherm.c
1672
ts->throt_cfgs[i].id = i;
drivers/thermal/tegra/soctherm.c
1673
ts->throt_cfgs[i].init = false;
drivers/thermal/tegra/soctherm.c
1689
stc = find_throttle_cfg_by_name(ts, name);
drivers/thermal/tegra/soctherm.c
1711
(char *)name, ts,
drivers/thermal/tegra/soctherm.c
1740
static void throttlectl_cpu_level_cfg(struct tegra_soctherm *ts, int level)
drivers/thermal/tegra/soctherm.c
1764
r = ccroc_readl(ts, CCROC_THROT_PSKIP_RAMP_CPU_REG(level));
drivers/thermal/tegra/soctherm.c
1767
ccroc_writel(ts, r, CCROC_THROT_PSKIP_RAMP_CPU_REG(level));
drivers/thermal/tegra/soctherm.c
1769
r = ccroc_readl(ts, CCROC_THROT_PSKIP_CTRL_CPU_REG(level));
drivers/thermal/tegra/soctherm.c
1773
ccroc_writel(ts, r, CCROC_THROT_PSKIP_CTRL_CPU_REG(level));
drivers/thermal/tegra/soctherm.c
1788
static void throttlectl_cpu_level_select(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
1794
switch (ts->throt_cfgs[throt].cpu_throt_level) {
drivers/thermal/tegra/soctherm.c
1809
r = readl(ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1813
writel(r, ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1817
writel(r, ts->regs + THROT_PSKIP_RAMP(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1832
static void throttlectl_cpu_mn(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
1839
depth = ts->throt_cfgs[throt].cpu_throt_depth;
drivers/thermal/tegra/soctherm.c
1842
r = readl(ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1846
writel(r, ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1848
r = readl(ts->regs + THROT_PSKIP_RAMP(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1851
writel(r, ts->regs + THROT_PSKIP_RAMP(throt, THROTTLE_DEV_CPU));
drivers/thermal/tegra/soctherm.c
1864
static void throttlectl_gpu_level_select(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
1869
level = ts->throt_cfgs[throt].gpu_throt_level;
drivers/thermal/tegra/soctherm.c
1871
r = readl(ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_GPU));
drivers/thermal/tegra/soctherm.c
1874
writel(r, ts->regs + THROT_PSKIP_CTRL(throt, THROTTLE_DEV_GPU));
drivers/thermal/tegra/soctherm.c
1877
static int soctherm_oc_cfg_program(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
1881
struct soctherm_oc_cfg *oc = &ts->throt_cfgs[throt].oc_cfg;
drivers/thermal/tegra/soctherm.c
1890
writel(r, ts->regs + ALARM_CFG(throt));
drivers/thermal/tegra/soctherm.c
1891
writel(oc->throt_period, ts->regs + ALARM_THROTTLE_PERIOD(throt));
drivers/thermal/tegra/soctherm.c
1892
writel(oc->alarm_cnt_thresh, ts->regs + ALARM_CNT_THRESHOLD(throt));
drivers/thermal/tegra/soctherm.c
1893
writel(oc->alarm_filter, ts->regs + ALARM_FILTER(throt));
drivers/thermal/tegra/soctherm.c
1894
soctherm_oc_intr_enable(ts, throt, oc->intr_en);
drivers/thermal/tegra/soctherm.c
1907
static void soctherm_throttle_program(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
1911
struct soctherm_throt_cfg stc = ts->throt_cfgs[throt];
drivers/thermal/tegra/soctherm.c
1916
if ((throt >= THROTTLE_OC1) && (soctherm_oc_cfg_program(ts, throt)))
drivers/thermal/tegra/soctherm.c
1920
if (ts->soc->use_ccroc)
drivers/thermal/tegra/soctherm.c
1921
throttlectl_cpu_level_select(ts, throt);
drivers/thermal/tegra/soctherm.c
1923
throttlectl_cpu_mn(ts, throt);
drivers/thermal/tegra/soctherm.c
1925
throttlectl_gpu_level_select(ts, throt);
drivers/thermal/tegra/soctherm.c
1928
writel(r, ts->regs + THROT_PRIORITY_CTRL(throt));
drivers/thermal/tegra/soctherm.c
1931
writel(r, ts->regs + THROT_DELAY_CTRL(throt));
drivers/thermal/tegra/soctherm.c
1933
r = readl(ts->regs + THROT_PRIORITY_LOCK);
drivers/thermal/tegra/soctherm.c
1939
writel(r, ts->regs + THROT_PRIORITY_LOCK);
drivers/thermal/tegra/soctherm.c
1944
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
1949
if (ts->soc->use_ccroc) {
drivers/thermal/tegra/soctherm.c
1950
throttlectl_cpu_level_cfg(ts, TEGRA_SOCTHERM_THROT_LEVEL_LOW);
drivers/thermal/tegra/soctherm.c
1951
throttlectl_cpu_level_cfg(ts, TEGRA_SOCTHERM_THROT_LEVEL_MED);
drivers/thermal/tegra/soctherm.c
1952
throttlectl_cpu_level_cfg(ts, TEGRA_SOCTHERM_THROT_LEVEL_HIGH);
drivers/thermal/tegra/soctherm.c
1957
soctherm_throttle_program(ts, i);
drivers/thermal/tegra/soctherm.c
1960
if (ts->soc->use_ccroc) {
drivers/thermal/tegra/soctherm.c
1961
ccroc_writel(ts, v, CCROC_GLOBAL_CFG);
drivers/thermal/tegra/soctherm.c
1963
v = ccroc_readl(ts, CCROC_SUPER_CCLKG_DIVIDER);
drivers/thermal/tegra/soctherm.c
1965
ccroc_writel(ts, v, CCROC_SUPER_CCLKG_DIVIDER);
drivers/thermal/tegra/soctherm.c
1967
writel(v, ts->regs + THROT_GLOBAL_CFG);
drivers/thermal/tegra/soctherm.c
1969
v = readl(ts->clk_regs + CAR_SUPER_CCLKG_DIVIDER);
drivers/thermal/tegra/soctherm.c
1971
writel(v, ts->clk_regs + CAR_SUPER_CCLKG_DIVIDER);
drivers/thermal/tegra/soctherm.c
1977
writel(v, ts->regs + THERMCTL_STATS_CTL);
drivers/thermal/tegra/soctherm.c
2204
zone->ts = tegra;
drivers/thermal/tegra/soctherm.c
304
struct tegra_soctherm *ts;
drivers/thermal/tegra/soctherm.c
375
static inline void ccroc_writel(struct tegra_soctherm *ts, u32 value, u32 reg)
drivers/thermal/tegra/soctherm.c
377
writel(value, (ts->ccroc_regs + reg));
drivers/thermal/tegra/soctherm.c
387
static inline u32 ccroc_readl(struct tegra_soctherm *ts, u32 reg)
drivers/thermal/tegra/soctherm.c
389
return readl(ts->ccroc_regs + reg);
drivers/thermal/tegra/soctherm.c
485
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
492
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
494
r = readl(ts->regs + THERMCTL_THERMTRIP_CTL);
drivers/thermal/tegra/soctherm.c
498
writel(r, ts->regs + THERMCTL_THERMTRIP_CTL);
drivers/thermal/tegra/soctherm.c
525
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
533
temp = enforce_temp_range(dev, trip_temp) / ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
551
r = readl(ts->regs + reg_off);
drivers/thermal/tegra/soctherm.c
557
writel(r, ts->regs + reg_off);
drivers/thermal/tegra/soctherm.c
563
find_throttle_cfg_by_name(struct tegra_soctherm *ts, const char *name)
drivers/thermal/tegra/soctherm.c
567
for (i = 0; ts->throt_cfgs[i].name; i++)
drivers/thermal/tegra/soctherm.c
568
if (!strcmp(ts->throt_cfgs[i].name, name))
drivers/thermal/tegra/soctherm.c
569
return &ts->throt_cfgs[i];
drivers/thermal/tegra/soctherm.c
574
static int tsensor_group_thermtrip_get(struct tegra_soctherm *ts, int id)
drivers/thermal/tegra/soctherm.c
577
struct tsensor_group_thermtrips *tt = ts->soc->thermtrips;
drivers/thermal/tegra/soctherm.c
583
for (i = 0; i < ts->soc->num_ttgs; i++) {
drivers/thermal/tegra/soctherm.c
596
struct tegra_soctherm *ts = zone->ts;
drivers/thermal/tegra/soctherm.c
609
if (min_low_temp == tsensor_group_thermtrip_get(ts, sg->id))
drivers/thermal/tegra/soctherm.c
621
if (!ts->throt_cfgs[i].init)
drivers/thermal/tegra/soctherm.c
624
cdev = ts->throt_cfgs[i].cdev;
drivers/thermal/tegra/soctherm.c
626
stc = find_throttle_cfg_by_name(ts, cdev->type);
drivers/thermal/tegra/soctherm.c
642
mutex_lock(&zn->ts->thermctl_lock);
drivers/thermal/tegra/soctherm.c
643
r = readl(zn->ts->regs + THERMCTL_INTR_ENABLE);
drivers/thermal/tegra/soctherm.c
645
writel(r, zn->ts->regs + THERMCTL_INTR_ENABLE);
drivers/thermal/tegra/soctherm.c
646
mutex_unlock(&zn->ts->thermctl_lock);
drivers/thermal/tegra/soctherm.c
654
mutex_lock(&zn->ts->thermctl_lock);
drivers/thermal/tegra/soctherm.c
655
r = readl(zn->ts->regs + THERMCTL_INTR_DISABLE);
drivers/thermal/tegra/soctherm.c
657
writel(r, zn->ts->regs + THERMCTL_INTR_DISABLE);
drivers/thermal/tegra/soctherm.c
658
mutex_unlock(&zn->ts->thermctl_lock);
drivers/thermal/tegra/soctherm.c
668
r = readl(zone->ts->regs + zone->sg->thermctl_lvl0_offset);
drivers/thermal/tegra/soctherm.c
670
writel(r, zone->ts->regs + zone->sg->thermctl_lvl0_offset);
drivers/thermal/tegra/soctherm.c
672
lo = enforce_temp_range(zone->dev, lo) / zone->ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
673
hi = enforce_temp_range(zone->dev, hi) / zone->ts->soc->thresh_grain;
drivers/thermal/tegra/soctherm.c
679
writel(r, zone->ts->regs + zone->sg->thermctl_lvl0_offset);
drivers/thermal/tegra/soctherm.c
741
struct tegra_soctherm *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/soctherm.c
747
temperature = tsensor_group_thermtrip_get(ts, sg->id);
drivers/thermal/tegra/soctherm.c
771
if (!ts->throt_cfgs[i].init)
drivers/thermal/tegra/soctherm.c
774
cdev = ts->throt_cfgs[i].cdev;
drivers/thermal/tegra/soctherm.c
776
stc = find_throttle_cfg_by_name(ts, cdev->type);
drivers/thermal/tegra/soctherm.c
802
struct tegra_soctherm *ts = dev_id;
drivers/thermal/tegra/soctherm.c
814
r = readl(ts->regs + THERMCTL_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
815
writel(r, ts->regs + THERMCTL_INTR_DISABLE);
drivers/thermal/tegra/soctherm.c
839
struct tegra_soctherm *ts = dev_id;
drivers/thermal/tegra/soctherm.c
843
st = readl(ts->regs + THERMCTL_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
860
writel(ex, ts->regs + THERMCTL_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
864
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_CPU];
drivers/thermal/tegra/soctherm.c
870
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_GPU];
drivers/thermal/tegra/soctherm.c
876
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_PLLX];
drivers/thermal/tegra/soctherm.c
882
tz = ts->thermctl_tzs[TEGRA124_SOCTHERM_SENSOR_MEM];
drivers/thermal/tegra/soctherm.c
895
writel(st, ts->regs + THERMCTL_INTR_STATUS);
drivers/thermal/tegra/soctherm.c
911
static void soctherm_oc_intr_enable(struct tegra_soctherm *ts,
drivers/thermal/tegra/soctherm.c
920
r = readl(ts->regs + OC_INTR_ENABLE);
drivers/thermal/tegra/soctherm.c
938
writel(r, ts->regs + OC_INTR_ENABLE);
drivers/thermal/tegra/tegra30-tsensor.c
101
err = clk_prepare_enable(ts->clk);
drivers/thermal/tegra/tegra30-tsensor.c
103
dev_err(ts->dev, "failed to enable clock: %d\n", err);
drivers/thermal/tegra/tegra30-tsensor.c
109
err = reset_control_deassert(ts->rst);
drivers/thermal/tegra/tegra30-tsensor.c
111
dev_err(ts->dev, "failed to deassert hardware reset: %d\n", err);
drivers/thermal/tegra/tegra30-tsensor.c
128
writel_relaxed(val, ts->regs + 0x40 + TSENSOR_SENSOR0_CONFIG0);
drivers/thermal/tegra/tegra30-tsensor.c
129
writel_relaxed(val, ts->regs + 0x80 + TSENSOR_SENSOR0_CONFIG0);
drivers/thermal/tegra/tegra30-tsensor.c
134
clk_disable_unprepare(ts->clk);
drivers/thermal/tegra/tegra30-tsensor.c
139
static int tegra_tsensor_hw_disable(const struct tegra_tsensor *ts)
drivers/thermal/tegra/tegra30-tsensor.c
143
err = reset_control_assert(ts->rst);
drivers/thermal/tegra/tegra30-tsensor.c
145
dev_err(ts->dev, "failed to assert hardware reset: %d\n", err);
drivers/thermal/tegra/tegra30-tsensor.c
149
clk_disable_unprepare(ts->clk);
drivers/thermal/tegra/tegra30-tsensor.c
156
const struct tegra_tsensor *ts = data;
drivers/thermal/tegra/tegra30-tsensor.c
158
tegra_tsensor_hw_disable(ts);
drivers/thermal/tegra/tegra30-tsensor.c
164
const struct tegra_tsensor *ts = tsc->ts;
drivers/thermal/tegra/tegra30-tsensor.c
177
dev_err_once(ts->dev, "ch%u: counter invalid\n", tsc->id);
drivers/thermal/tegra/tegra30-tsensor.c
190
dev_err_once(ts->dev, "ch%u: counter overflow\n", tsc->id);
drivers/thermal/tegra/tegra30-tsensor.c
198
c1 = DIV_ROUND_CLOSEST(ts->calib.a * counter + ts->calib.b, 1000000);
drivers/thermal/tegra/tegra30-tsensor.c
200
c2 = DIV_ROUND_CLOSEST(ts->calib.p, c1);
drivers/thermal/tegra/tegra30-tsensor.c
201
c3 = c1 * ts->calib.m;
drivers/thermal/tegra/tegra30-tsensor.c
202
c4 = ts->calib.n;
drivers/thermal/tegra/tegra30-tsensor.c
209
static int tegra_tsensor_temp_to_counter(const struct tegra_tsensor *ts, int temp)
drivers/thermal/tegra/tegra30-tsensor.c
213
c1 = DIV_ROUND_CLOSEST(ts->calib.p - temp * 1000, ts->calib.m);
drivers/thermal/tegra/tegra30-tsensor.c
214
c2 = -ts->calib.r - int_sqrt(ts->calib.r * ts->calib.r - c1);
drivers/thermal/tegra/tegra30-tsensor.c
216
return DIV_ROUND_CLOSEST(c2 * 1000000 - ts->calib.b, ts->calib.a);
drivers/thermal/tegra/tegra30-tsensor.c
222
const struct tegra_tsensor *ts = tsc->ts;
drivers/thermal/tegra/tegra30-tsensor.c
235
high = tegra_tsensor_temp_to_counter(ts, high);
drivers/thermal/tegra/tegra30-tsensor.c
248
tegra_tsensor_handle_channel_interrupt(const struct tegra_tsensor *ts,
drivers/thermal/tegra/tegra30-tsensor.c
251
const struct tegra_tsensor_channel *tsc = &ts->ch[id];
drivers/thermal/tegra/tegra30-tsensor.c
258
dev_err_ratelimited(ts->dev, "ch%u: counter overflowed\n", id);
drivers/thermal/tegra/tegra30-tsensor.c
270
const struct tegra_tsensor *ts = data;
drivers/thermal/tegra/tegra30-tsensor.c
274
for (i = 0; i < ARRAY_SIZE(ts->ch); i++)
drivers/thermal/tegra/tegra30-tsensor.c
275
handled |= tegra_tsensor_handle_channel_interrupt(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
280
static int tegra_tsensor_disable_hw_channel(const struct tegra_tsensor *ts,
drivers/thermal/tegra/tegra30-tsensor.c
283
const struct tegra_tsensor_channel *tsc = &ts->ch[id];
drivers/thermal/tegra/tegra30-tsensor.c
293
dev_err(ts->dev, "ch%u: failed to disable zone: %d\n", id, err);
drivers/thermal/tegra/tegra30-tsensor.c
348
static int tegra_tsensor_enable_hw_channel(const struct tegra_tsensor *ts,
drivers/thermal/tegra/tegra30-tsensor.c
351
const struct tegra_tsensor_channel *tsc = &ts->ch[id];
drivers/thermal/tegra/tegra30-tsensor.c
367
dev_info_once(ts->dev, "ch%u: PMC emergency shutdown trip set to %dC\n",
drivers/thermal/tegra/tegra30-tsensor.c
370
temps.hot_trip = tegra_tsensor_temp_to_counter(ts, temps.hot_trip);
drivers/thermal/tegra/tegra30-tsensor.c
371
temps.crit_trip = tegra_tsensor_temp_to_counter(ts, temps.crit_trip);
drivers/thermal/tegra/tegra30-tsensor.c
411
dev_err(ts->dev, "ch%u: failed to enable zone: %d\n", id, err);
drivers/thermal/tegra/tegra30-tsensor.c
427
static int tegra_tsensor_nvmem_setup(struct tegra_tsensor *ts)
drivers/thermal/tegra/tegra30-tsensor.c
434
dev_err_probe(ts->dev, err, "failed to get ATE version\n");
drivers/thermal/tegra/tegra30-tsensor.c
439
dev_info(ts->dev, "unsupported ATE version: %u\n", ate_ver);
drivers/thermal/tegra/tegra30-tsensor.c
449
dev_info_once(ts->dev,
drivers/thermal/tegra/tegra30-tsensor.c
451
ts->swap_channels = true;
drivers/thermal/tegra/tegra30-tsensor.c
456
dev_err(ts->dev, "failed to get calibration data: %d\n", err);
drivers/thermal/tegra/tegra30-tsensor.c
474
dev_err(ts->dev, "invalid calibration data: %d %d %u %u\n",
drivers/thermal/tegra/tegra30-tsensor.c
481
ts->calib.a = DIV_ROUND_CLOSEST((t2_90C - t1_25C) * 1000000,
drivers/thermal/tegra/tegra30-tsensor.c
484
ts->calib.b = t1_25C * 1000000 - ts->calib.a * c1_25C;
drivers/thermal/tegra/tegra30-tsensor.c
487
ts->calib.m = -2775;
drivers/thermal/tegra/tegra30-tsensor.c
488
ts->calib.n = 1338811;
drivers/thermal/tegra/tegra30-tsensor.c
489
ts->calib.p = -7300000;
drivers/thermal/tegra/tegra30-tsensor.c
491
ts->calib.m = -3512;
drivers/thermal/tegra/tegra30-tsensor.c
492
ts->calib.n = 1528943;
drivers/thermal/tegra/tegra30-tsensor.c
493
ts->calib.p = -11100000;
drivers/thermal/tegra/tegra30-tsensor.c
497
ts->calib.r = DIV_ROUND_CLOSEST(ts->calib.n, ts->calib.m * 2);
drivers/thermal/tegra/tegra30-tsensor.c
499
dev_info_once(ts->dev,
drivers/thermal/tegra/tegra30-tsensor.c
507
static int tegra_tsensor_register_channel(struct tegra_tsensor *ts,
drivers/thermal/tegra/tegra30-tsensor.c
510
struct tegra_tsensor_channel *tsc = &ts->ch[id];
drivers/thermal/tegra/tegra30-tsensor.c
511
unsigned int hw_id = ts->swap_channels ? !id : id;
drivers/thermal/tegra/tegra30-tsensor.c
513
tsc->ts = ts;
drivers/thermal/tegra/tegra30-tsensor.c
515
tsc->regs = ts->regs + 0x40 * (hw_id + 1);
drivers/thermal/tegra/tegra30-tsensor.c
517
tsc->tzd = devm_thermal_of_zone_register(ts->dev, id, tsc, &ops);
drivers/thermal/tegra/tegra30-tsensor.c
520
return dev_err_probe(ts->dev, PTR_ERR(tsc->tzd),
drivers/thermal/tegra/tegra30-tsensor.c
531
devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd);
drivers/thermal/tegra/tegra30-tsensor.c
538
struct tegra_tsensor *ts;
drivers/thermal/tegra/tegra30-tsensor.c
542
ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
drivers/thermal/tegra/tegra30-tsensor.c
543
if (!ts)
drivers/thermal/tegra/tegra30-tsensor.c
550
ts->dev = &pdev->dev;
drivers/thermal/tegra/tegra30-tsensor.c
551
platform_set_drvdata(pdev, ts);
drivers/thermal/tegra/tegra30-tsensor.c
553
ts->regs = devm_platform_ioremap_resource(pdev, 0);
drivers/thermal/tegra/tegra30-tsensor.c
554
if (IS_ERR(ts->regs))
drivers/thermal/tegra/tegra30-tsensor.c
555
return PTR_ERR(ts->regs);
drivers/thermal/tegra/tegra30-tsensor.c
557
ts->clk = devm_clk_get(&pdev->dev, NULL);
drivers/thermal/tegra/tegra30-tsensor.c
558
if (IS_ERR(ts->clk))
drivers/thermal/tegra/tegra30-tsensor.c
559
return dev_err_probe(&pdev->dev, PTR_ERR(ts->clk),
drivers/thermal/tegra/tegra30-tsensor.c
562
ts->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
drivers/thermal/tegra/tegra30-tsensor.c
563
if (IS_ERR(ts->rst))
drivers/thermal/tegra/tegra30-tsensor.c
564
return dev_err_probe(&pdev->dev, PTR_ERR(ts->rst),
drivers/thermal/tegra/tegra30-tsensor.c
567
err = tegra_tsensor_nvmem_setup(ts);
drivers/thermal/tegra/tegra30-tsensor.c
571
err = tegra_tsensor_hw_enable(ts);
drivers/thermal/tegra/tegra30-tsensor.c
577
ts);
drivers/thermal/tegra/tegra30-tsensor.c
581
for (i = 0; i < ARRAY_SIZE(ts->ch); i++) {
drivers/thermal/tegra/tegra30-tsensor.c
582
err = tegra_tsensor_register_channel(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
595
for (i = 0; i < ARRAY_SIZE(ts->ch); i++) {
drivers/thermal/tegra/tegra30-tsensor.c
596
err = tegra_tsensor_enable_hw_channel(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
603
"tegra_tsensor", ts);
drivers/thermal/tegra/tegra30-tsensor.c
613
struct tegra_tsensor *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/tegra30-tsensor.c
617
for (i = 0; i < ARRAY_SIZE(ts->ch); i++) {
drivers/thermal/tegra/tegra30-tsensor.c
618
err = tegra_tsensor_disable_hw_channel(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
623
err = tegra_tsensor_hw_disable(ts);
drivers/thermal/tegra/tegra30-tsensor.c
631
tegra_tsensor_enable_hw_channel(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
638
struct tegra_tsensor *ts = dev_get_drvdata(dev);
drivers/thermal/tegra/tegra30-tsensor.c
642
err = tegra_tsensor_hw_enable(ts);
drivers/thermal/tegra/tegra30-tsensor.c
646
for (i = 0; i < ARRAY_SIZE(ts->ch); i++) {
drivers/thermal/tegra/tegra30-tsensor.c
647
err = tegra_tsensor_enable_hw_channel(ts, i);
drivers/thermal/tegra/tegra30-tsensor.c
76
struct tegra_tsensor *ts;
drivers/thermal/tegra/tegra30-tsensor.c
90
static int tegra_tsensor_hw_enable(const struct tegra_tsensor *ts)
drivers/thermal/tegra/tegra30-tsensor.c
95
err = reset_control_assert(ts->rst);
drivers/thermal/tegra/tegra30-tsensor.c
97
dev_err(ts->dev, "failed to assert hardware reset: %d\n", err);
drivers/tty/moxa.c
1516
register struct ktermios *ts = &tty->termios;
drivers/tty/moxa.c
1521
if (ts->c_cflag & CRTSCTS)
drivers/tty/moxa.c
1523
if (ts->c_iflag & IXON)
drivers/tty/moxa.c
1525
if (ts->c_iflag & IXOFF)
drivers/tty/moxa.c
1527
if (ts->c_iflag & IXANY)
drivers/tty/moxa.c
1531
baud = MoxaPortSetTermio(ch, ts, tty_get_baud_rate(tty));
drivers/usb/gadget/function/f_fs.c
1885
struct timespec64 ts = inode_set_ctime_current(inode);
drivers/usb/gadget/function/f_fs.c
1891
inode_set_atime_to_ts(inode, ts);
drivers/usb/gadget/function/f_fs.c
1892
inode_set_mtime_to_ts(inode, ts);
drivers/usb/gadget/function/uvc_video.c
34
struct timespec64 ts = ns_to_timespec64(buf->buf.vb2_buf.timestamp);
drivers/usb/gadget/function/uvc_video.c
42
if (video->queue.buf_used == 0 && ts.tv_sec) {
drivers/usb/gadget/function/uvc_video.c
44
u32 pts = ((u64)ts.tv_sec * USEC_PER_SEC + ts.tv_nsec / NSEC_PER_USEC) * 48;
drivers/usb/gadget/function/uvc_video.c
55
ktime_get_ts64(&ts);
drivers/usb/gadget/function/uvc_video.c
56
stc = ((u64)ts.tv_sec * USEC_PER_SEC + ts.tv_nsec / NSEC_PER_USEC) * 48;
drivers/usb/gadget/udc/lpc32xx_udc.c
1444
u32 tsend, ts = 0;
drivers/usb/gadget/udc/lpc32xx_udc.c
1453
tsend = ts = req->req.length - req->req.actual;
drivers/usb/gadget/udc/lpc32xx_udc.c
1454
if (ts == 0) {
drivers/usb/gadget/udc/lpc32xx_udc.c
1459
} else if (ts > ep0->ep.maxpacket)
drivers/usb/gadget/udc/lpc32xx_udc.c
1460
ts = ep0->ep.maxpacket; /* Just send what we can */
drivers/usb/gadget/udc/lpc32xx_udc.c
1463
udc_write_hwep(udc, EP_IN, (req->req.buf + req->req.actual), ts);
drivers/usb/gadget/udc/lpc32xx_udc.c
1466
req->req.actual += ts;
drivers/usb/mon/mon_bin.c
494
struct timespec64 ts;
drivers/usb/mon/mon_bin.c
505
ktime_get_real_ts64(&ts);
drivers/usb/mon/mon_bin.c
578
ep->ts_sec = ts.tv_sec;
drivers/usb/mon/mon_bin.c
579
ep->ts_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/usb/mon/mon_bin.c
640
struct timespec64 ts;
drivers/usb/mon/mon_bin.c
645
ktime_get_real_ts64(&ts);
drivers/usb/mon/mon_bin.c
666
ep->ts_sec = ts.tv_sec;
drivers/usb/mon/mon_bin.c
667
ep->ts_usec = ts.tv_nsec / NSEC_PER_USEC;
drivers/video/fbdev/pxa3xx-gcu.c
117
struct timespec64 ts; \
drivers/video/fbdev/pxa3xx-gcu.c
121
ktime_get_ts64(&ts); \
drivers/video/fbdev/pxa3xx-gcu.c
122
ts = timespec64_sub(ts, priv->base_time); \
drivers/video/fbdev/pxa3xx-gcu.c
128
(s64)(ts.tv_sec), \
drivers/video/fbdev/pxa3xx-gcu.c
129
ts.tv_nsec / NSEC_PER_MSEC, \
drivers/video/fbdev/pxa3xx-gcu.c
130
(ts.tv_nsec % NSEC_PER_MSEC) / USEC_PER_MSEC, \
drivers/virtio/virtio_rtc_ptp.c
181
const struct timespec64 *ts)
drivers/virtio/virtio_rtc_ptp.c
192
struct timespec64 *ts,
drivers/virtio/virtio_rtc_ptp.c
210
*ts = ns_to_timespec64((s64)ns);
fs/adfs/inode.c
215
const struct timespec64 *ts)
fs/adfs/inode.c
217
s64 cs, nsec = timespec64_to_ns(ts);
fs/adfs/inode.c
248
struct timespec64 ts;
fs/adfs/inode.c
275
adfs_adfs2unix_time(&ts, inode);
fs/adfs/inode.c
276
inode_set_atime_to_ts(inode, ts);
fs/adfs/inode.c
277
inode_set_mtime_to_ts(inode, ts);
fs/adfs/inode.c
278
inode_set_ctime_to_ts(inode, ts);
fs/afs/yfsclient.c
109
struct timespec64 ts;
fs/afs/yfsclient.c
119
ts.tv_nsec = (time64_t)(do_div(abs_t, 10000000) * 100);
fs/afs/yfsclient.c
120
ts.tv_nsec = -ts.tv_nsec;
fs/afs/yfsclient.c
121
ts.tv_sec = -abs_t;
fs/afs/yfsclient.c
124
ts.tv_nsec = (time64_t)do_div(abs_t, 10000000) * 100;
fs/afs/yfsclient.c
125
ts.tv_sec = abs_t;
fs/afs/yfsclient.c
128
return ts;
fs/aio.c
2275
struct timespec64 *ts)
fs/aio.c
2277
ktime_t until = ts ? timespec64_to_ktime(*ts) : KTIME_MAX;
fs/aio.c
2310
struct timespec64 ts;
fs/aio.c
2313
if (timeout && unlikely(get_timespec64(&ts, timeout)))
fs/aio.c
2316
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL);
fs/aio.c
2338
struct timespec64 ts;
fs/aio.c
2342
if (timeout && unlikely(get_timespec64(&ts, timeout)))
fs/aio.c
2352
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL);
fs/aio.c
2373
struct timespec64 ts;
fs/aio.c
2377
if (timeout && unlikely(get_old_timespec32(&ts, timeout)))
fs/aio.c
2388
ret = do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL);
fs/btrfs/inode.c
5828
struct timespec64 ts;
fs/btrfs/inode.c
5852
ts = inode_set_ctime_current(vfs_inode);
fs/btrfs/inode.c
5853
inode_set_mtime_to_ts(vfs_inode, ts);
fs/btrfs/inode.c
5855
inode->i_otime_sec = ts.tv_sec;
fs/btrfs/inode.c
5856
inode->i_otime_nsec = ts.tv_nsec;
fs/btrfs/inode.c
6428
struct timespec64 ts;
fs/btrfs/inode.c
6580
ts = simple_inode_init_ts(inode);
fs/btrfs/inode.c
6581
BTRFS_I(inode)->i_otime_sec = ts.tv_sec;
fs/btrfs/inode.c
6582
BTRFS_I(inode)->i_otime_nsec = ts.tv_nsec;
fs/btrfs/send.c
712
struct btrfs_timespec *ts)
fs/btrfs/send.c
715
read_extent_buffer(eb, &bts, (unsigned long)ts, sizeof(bts));
fs/btrfs/send.c
757
#define TLV_PUT_BTRFS_TIMESPEC(sctx, attrtype, eb, ts) \
fs/btrfs/send.c
759
ret = tlv_put_btrfs_timespec(sctx, attrtype, eb, ts); \
fs/ceph/mds_client.c
1782
struct ceph_mds_session *ts;
fs/ceph/mds_client.c
1794
ts = __open_export_target_session(mdsc, mi->export_targets[i]);
fs/ceph/mds_client.c
1795
ceph_put_mds_session(ts);
fs/ceph/mds_client.c
3076
struct ceph_timespec ts;
fs/ceph/mds_client.c
3079
ceph_encode_timespec64(&ts, &req->r_stamp);
fs/ceph/mds_client.c
3080
ceph_encode_copy(p, &ts, sizeof(ts));
fs/ceph/mds_client.c
4889
struct timespec64 ts;
fs/ceph/mds_client.c
4895
ts = inode_get_mtime(inode);
fs/ceph/mds_client.c
4896
ceph_encode_timespec64(&rec.v1.mtime, &ts);
fs/ceph/mds_client.c
4897
ts = inode_get_atime(inode);
fs/ceph/mds_client.c
4898
ceph_encode_timespec64(&rec.v1.atime, &ts);
fs/ceph/metric.c
85
static void ktime_to_ceph_timespec(struct ceph_timespec *ts, ktime_t val)
fs/ceph/metric.c
88
ceph_encode_timespec64(ts, &t);
fs/coda/coda_linux.c
69
static struct timespec64 coda_to_timespec64(struct coda_timespec ts)
fs/coda/coda_linux.c
72
.tv_sec = ts.tv_sec,
fs/coda/coda_linux.c
73
.tv_nsec = ts.tv_nsec,
fs/coda/coda_linux.c
81
struct coda_timespec ts = {
fs/coda/coda_linux.c
86
return ts;
fs/eventpoll.c
2879
struct timespec64 ts, *to = NULL;
fs/eventpoll.c
2882
if (get_timespec64(&ts, timeout))
fs/eventpoll.c
2884
to = &ts;
fs/eventpoll.c
2885
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/eventpoll.c
2980
struct timespec64 ts, *to = NULL;
fs/eventpoll.c
2983
if (get_timespec64(&ts, timeout))
fs/eventpoll.c
2985
to = &ts;
fs/eventpoll.c
2986
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/exfat/dir.c
425
unsigned long long size, struct timespec64 *ts)
fs/exfat/dir.c
434
exfat_set_entry_time(sbi, ts,
fs/exfat/dir.c
439
exfat_set_entry_time(sbi, ts,
fs/exfat/dir.c
444
exfat_set_entry_time(sbi, ts,
fs/exfat/exfat_fs.h
593
unsigned long long size, struct timespec64 *ts);
fs/exfat/exfat_fs.h
692
void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
fs/exfat/exfat_fs.h
694
void exfat_truncate_atime(struct timespec64 *ts);
fs/exfat/exfat_fs.h
696
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
fs/exfat/inode.c
32
struct timespec64 ts;
fs/exfat/inode.c
62
ts = inode_get_mtime(inode);
fs/exfat/inode.c
63
exfat_set_entry_time(sbi, &ts,
fs/exfat/inode.c
68
ts = inode_get_atime(inode);
fs/exfat/inode.c
69
exfat_set_entry_time(sbi, &ts,
fs/exfat/misc.c
109
ts->tv_nsec / (10 * NSEC_PER_MSEC);
fs/exfat/misc.c
123
void exfat_truncate_atime(struct timespec64 *ts)
fs/exfat/misc.c
125
ts->tv_sec = round_down(ts->tv_sec, 2);
fs/exfat/misc.c
126
ts->tv_nsec = 0;
fs/exfat/misc.c
52
static void exfat_adjust_tz(struct timespec64 *ts, u8 tz_off)
fs/exfat/misc.c
55
ts->tv_sec -= TIMEZONE_SEC(tz_off);
fs/exfat/misc.c
57
ts->tv_sec += TIMEZONE_SEC(0x80 - tz_off);
fs/exfat/misc.c
68
void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
fs/exfat/misc.c
74
ts->tv_sec = mktime64(1980 + (d >> 9), d >> 5 & 0x000F, d & 0x001F,
fs/exfat/misc.c
80
ts->tv_sec += time_cs / 100;
fs/exfat/misc.c
81
ts->tv_nsec = (time_cs % 100) * 10 * NSEC_PER_MSEC;
fs/exfat/misc.c
83
ts->tv_nsec = 0;
fs/exfat/misc.c
87
exfat_adjust_tz(ts, tz & ~EXFAT_TZ_VALID);
fs/exfat/misc.c
89
ts->tv_sec -= exfat_tz_offset(sbi) * SECS_PER_MIN;
fs/exfat/misc.c
93
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
fs/exfat/misc.c
99
time64_to_tm(ts->tv_sec, 0, &tm);
fs/exfat/namei.c
470
struct timespec64 ts = current_time(inode);
fs/exfat/namei.c
506
exfat_init_dir_entry(&es, type, start_clu, clu_size, &ts);
fs/ext4/ext4.h
896
static inline __le32 ext4_encode_extra_time(struct timespec64 ts)
fs/ext4/ext4.h
898
u32 extra = ((ts.tv_sec - (s32)ts.tv_sec) >> 32) & EXT4_EPOCH_MASK;
fs/ext4/ext4.h
899
return cpu_to_le32(extra | (ts.tv_nsec << EXT4_EPOCH_BITS));
fs/ext4/ext4.h
905
struct timespec64 ts = { .tv_sec = (signed)le32_to_cpu(base) };
fs/ext4/ext4.h
908
ts.tv_sec += (u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK) << 32;
fs/ext4/ext4.h
909
ts.tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS;
fs/ext4/ext4.h
910
return ts;
fs/ext4/ext4.h
913
#define EXT4_INODE_SET_XTIME_VAL(xtime, inode, raw_inode, ts) \
fs/ext4/ext4.h
916
(raw_inode)->xtime = cpu_to_le32((ts).tv_sec); \
fs/ext4/ext4.h
917
(raw_inode)->xtime ## _extra = ext4_encode_extra_time(ts); \
fs/ext4/ext4.h
919
(raw_inode)->xtime = cpu_to_le32(clamp_t(int32_t, (ts).tv_sec, S32_MIN, S32_MAX)); \
fs/f2fs/checkpoint.c
27
static inline void get_lock_elapsed_time(struct f2fs_time_stat *ts)
fs/f2fs/checkpoint.c
29
ts->total_time = ktime_get();
fs/f2fs/checkpoint.c
31
ts->running_time = current->se.sum_exec_runtime;
fs/f2fs/checkpoint.c
34
ts->runnable_time = current->sched_info.run_delay;
fs/f2fs/checkpoint.c
38
ts->io_sleep_time = current->delays->blkio_delay;
fs/f2fs/checkpoint.c
49
get_lock_elapsed_time(&lc->ts);
fs/f2fs/checkpoint.c
71
total_time = div_u64(tts.total_time - lc->ts.total_time, npm);
fs/f2fs/checkpoint.c
76
running_time = div_u64(tts.running_time - lc->ts.running_time, npm);
fs/f2fs/checkpoint.c
79
runnable_time = div_u64(tts.runnable_time - lc->ts.runnable_time, npm);
fs/f2fs/checkpoint.c
82
io_sleep_time = div_u64(tts.io_sleep_time - lc->ts.io_sleep_time, npm);
fs/f2fs/f2fs.h
1455
struct f2fs_time_stat ts;
fs/f2fs/f2fs.h
3647
struct timespec64 ts = inode_get_atime(inode);
fs/f2fs/f2fs.h
3649
if (!timespec64_equal(F2FS_I(inode)->i_disk_time, &ts))
fs/f2fs/f2fs.h
3651
ts = inode_get_ctime(inode);
fs/f2fs/f2fs.h
3652
if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 1, &ts))
fs/f2fs/f2fs.h
3654
ts = inode_get_mtime(inode);
fs/f2fs/f2fs.h
3655
if (!timespec64_equal(F2FS_I(inode)->i_disk_time + 2, &ts))
fs/fat/dir.c
1173
int fat_alloc_new_dir(struct inode *dir, struct timespec64 *ts)
fs/fat/dir.c
1195
fat_time_unix2fat(sbi, ts, &time, &date, &time_cs);
fs/fat/fat.h
342
extern int fat_alloc_new_dir(struct inode *dir, struct timespec64 *ts);
fs/fat/fat.h
469
extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec64 *ts,
fs/fat/fat.h
471
extern void fat_time_unix2fat(struct msdos_sb_info *sbi, struct timespec64 *ts,
fs/fat/fat.h
474
const struct timespec64 *ts);
fs/fat/fat_test.c
106
.ts = {.tv_sec = 4354858798LL, .tv_nsec = 0L},
fs/fat/fat_test.c
114
.ts = {.tv_sec = 825552000LL, .tv_nsec = 0L},
fs/fat/fat_test.c
122
.ts = {.tv_sec = 951782400LL, .tv_nsec = 0L},
fs/fat/fat_test.c
130
.ts = {.tv_sec = 4107542400LL, .tv_nsec = 0L},
fs/fat/fat_test.c
138
.ts = {.tv_sec = 1078014600LL, .tv_nsec = 0L},
fs/fat/fat_test.c
146
.ts = {.tv_sec = 1078097400LL, .tv_nsec = 0L},
fs/fat/fat_test.c
154
.ts = {.tv_sec = 946684799LL, .tv_nsec = 0L},
fs/fat/fat_test.c
162
.ts = {.tv_sec = 315532800LL, .tv_nsec = 10000000L},
fs/fat/fat_test.c
173
.ts = {.tv_sec = 315532799LL, .tv_nsec = 0L},
fs/fat/fat_test.c
181
.ts = {.tv_sec = 315534600LL, .tv_nsec = 0L},
fs/fat/fat_test.c
189
.ts = {.tv_sec = 4354819200LL, .tv_nsec = 0L},
fs/fat/fat_test.c
197
.ts = {.tv_sec = 4354817400LL, .tv_nsec = 0L},
fs/fat/fat_test.c
208
.ts = {.tv_sec = 1078058096LL, .tv_nsec = 789000000L},
fs/fat/fat_test.c
214
.ts = {.tv_sec = 1078014645LL, .tv_nsec = 123000000L},
fs/fat/fat_test.c
220
.ts = {.tv_sec = 1078097445LL, .tv_nsec = 123000000L},
fs/fat/fat_test.c
260
struct timespec64 ts;
fs/fat/fat_test.c
266
fat_time_fat2unix(&fake_sb, &ts,
fs/fat/fat_test.c
271
testcase->ts.tv_sec,
fs/fat/fat_test.c
272
ts.tv_sec,
fs/fat/fat_test.c
275
testcase->ts.tv_nsec,
fs/fat/fat_test.c
276
ts.tv_nsec,
fs/fat/fat_test.c
290
fat_time_unix2fat(&fake_sb, &testcase->ts,
fs/fat/fat_test.c
316
fat_time_unix2fat(&fake_sb, &testcase->ts, &time, &date, &cs);
fs/fat/fat_test.c
334
struct timespec64 ts = {
fs/fat/fat_test.c
342
fat_time_unix2fat(&fake_sb, &ts, &time, &date, NULL);
fs/fat/fat_test.c
362
actual = fat_truncate_atime(&fake_sb, &testcase->ts);
fs/fat/fat_test.c
56
struct timespec64 ts;
fs/fat/fat_test.c
65
struct timespec64 ts;
fs/fat/fat_test.c
74
struct timespec64 ts;
fs/fat/fat_test.c
82
.ts = {.tv_sec = 315532800LL, .tv_nsec = 0L},
fs/fat/fat_test.c
90
.ts = {.tv_sec = 4354819198LL, .tv_nsec = 0L},
fs/fat/fat_test.c
98
.ts = {.tv_sec = 315493200LL, .tv_nsec = 0L},
fs/fat/inode.c
1552
struct timespec64 ts;
fs/fat/inode.c
1668
fat_time_fat2unix(sbi, &ts, 0, cpu_to_le16(FAT_DATE_MIN), 0);
fs/fat/inode.c
1669
sb->s_time_min = ts.tv_sec;
fs/fat/inode.c
1671
fat_time_fat2unix(sbi, &ts, cpu_to_le16(FAT_TIME_MAX),
fs/fat/inode.c
1673
sb->s_time_max = ts.tv_sec;
fs/fat/inode.c
901
struct timespec64 ts = inode_get_atime(inode);
fs/fat/inode.c
904
fat_time_unix2fat(sbi, &ts, &atime, &raw_entry->adate, NULL);
fs/fat/misc.c
204
void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec64 *ts,
fs/fat/misc.c
231
ts->tv_sec = second + (time_cs / 100);
fs/fat/misc.c
232
ts->tv_nsec = (time_cs % 100) * 10000000;
fs/fat/misc.c
234
ts->tv_sec = second;
fs/fat/misc.c
235
ts->tv_nsec = 0;
fs/fat/misc.c
243
void fat_time_unix2fat(struct msdos_sb_info *sbi, struct timespec64 *ts,
fs/fat/misc.c
247
time64_to_tm(ts->tv_sec, -fat_tz_offset(sbi), &tm);
fs/fat/misc.c
275
*time_cs = (ts->tv_sec & 1) * 100 + ts->tv_nsec / 10000000;
fs/fat/misc.c
279
static inline struct timespec64 fat_timespec64_trunc_2secs(struct timespec64 ts)
fs/fat/misc.c
281
return (struct timespec64){ ts.tv_sec & ~1ULL, 0 };
fs/fat/misc.c
288
const struct timespec64 *ts)
fs/fat/misc.c
291
time64_t seconds = ts->tv_sec - fat_tz_offset(sbi);
fs/fat/misc.c
315
struct timespec64 ts;
fs/fat/misc.c
321
now = &ts;
fs/fat/misc.c
322
ts = current_time(inode);
fs/fat/namei_msdos.c
229
struct timespec64 *ts, struct fat_slot_info *sinfo)
fs/fat/namei_msdos.c
241
fat_time_unix2fat(sbi, ts, &time, &date, NULL);
fs/fat/namei_msdos.c
254
fat_truncate_time(dir, ts, FAT_UPDATE_CMTIME);
fs/fat/namei_msdos.c
270
struct timespec64 ts;
fs/fat/namei_msdos.c
288
ts = current_time(dir);
fs/fat/namei_msdos.c
289
err = msdos_add_entry(dir, msdos_name, 0, is_hid, 0, &ts, &sinfo);
fs/fat/namei_msdos.c
298
fat_truncate_time(inode, &ts, FAT_UPDATE_ATIME | FAT_UPDATE_CMTIME);
fs/fat/namei_msdos.c
353
struct timespec64 ts;
fs/fat/namei_msdos.c
370
ts = current_time(dir);
fs/fat/namei_msdos.c
371
cluster = fat_alloc_new_dir(dir, &ts);
fs/fat/namei_msdos.c
376
err = msdos_add_entry(dir, msdos_name, 1, is_hid, cluster, &ts, &sinfo);
fs/fat/namei_msdos.c
389
fat_truncate_time(inode, &ts, FAT_UPDATE_ATIME | FAT_UPDATE_CMTIME);
fs/fat/namei_msdos.c
440
struct timespec64 ts;
fs/fat/namei_msdos.c
495
ts = current_time(old_inode);
fs/fat/namei_msdos.c
508
&ts, &sinfo);
fs/fat/namei_msdos.c
547
fat_truncate_time(old_dir, &ts, FAT_UPDATE_CMTIME);
fs/fat/namei_vfat.c
1068
struct timespec64 ts = current_time(old_dir);
fs/fat/namei_vfat.c
1126
vfat_update_dir_metadata(old_dir, &ts);
fs/fat/namei_vfat.c
1129
vfat_update_dir_metadata(new_dir, &ts);
fs/fat/namei_vfat.c
579
struct timespec64 *ts,
fs/fat/namei_vfat.c
643
fat_time_unix2fat(sbi, ts, &time, &date, &time_cs);
fs/fat/namei_vfat.c
655
int is_dir, int cluster, struct timespec64 *ts,
fs/fat/namei_vfat.c
670
err = vfat_build_slots(dir, qname->name, len, is_dir, cluster, ts,
fs/fat/namei_vfat.c
680
fat_truncate_time(dir, ts, FAT_UPDATE_CMTIME);
fs/fat/namei_vfat.c
763
struct timespec64 ts;
fs/fat/namei_vfat.c
768
ts = current_time(dir);
fs/fat/namei_vfat.c
769
err = vfat_add_entry(dir, &dentry->d_name, 0, 0, &ts, &sinfo);
fs/fat/namei_vfat.c
856
struct timespec64 ts;
fs/fat/namei_vfat.c
861
ts = current_time(dir);
fs/fat/namei_vfat.c
862
cluster = fat_alloc_new_dir(dir, &ts);
fs/fat/namei_vfat.c
867
err = vfat_add_entry(dir, &dentry->d_name, 1, cluster, &ts, &sinfo);
fs/fat/namei_vfat.c
924
static void vfat_update_dir_metadata(struct inode *dir, struct timespec64 *ts)
fs/fat/namei_vfat.c
927
fat_truncate_time(dir, ts, FAT_UPDATE_CMTIME);
fs/fat/namei_vfat.c
941
struct timespec64 ts;
fs/fat/namei_vfat.c
961
ts = current_time(old_dir);
fs/fat/namei_vfat.c
972
&ts, &sinfo);
fs/fat/namei_vfat.c
999
vfat_update_dir_metadata(old_dir, &ts);
fs/fuse/dir.c
283
struct timespec64 ts = {
fs/fuse/dir.c
288
return get_jiffies_64() + timespec64_to_jiffies(&ts);
fs/hfs/sysdep.c
32
struct timespec64 ts = inode_get_ctime(inode);
fs/hfs/sysdep.c
34
inode_set_ctime(inode, ts.tv_sec + diff, ts.tv_nsec);
fs/hfs/sysdep.c
35
ts = inode_get_atime(inode);
fs/hfs/sysdep.c
36
inode_set_atime(inode, ts.tv_sec + diff, ts.tv_nsec);
fs/hfs/sysdep.c
37
ts = inode_get_mtime(inode);
fs/hfs/sysdep.c
38
inode_set_mtime(inode, ts.tv_sec + diff, ts.tv_nsec);
fs/init.c
196
int __init init_utimes(char *filename, struct timespec64 *ts)
fs/init.c
204
error = vfs_utimes(&path, ts);
fs/inode.c
2457
struct timespec64 now = current_time(inode), ts;
fs/inode.c
2459
ts = inode_get_mtime(inode);
fs/inode.c
2460
if (!timespec64_equal(&ts, &now))
fs/inode.c
2462
ts = inode_get_ctime(inode);
fs/inode.c
2463
if (!timespec64_equal(&ts, &now))
fs/inode.c
2832
struct timespec64 inode_set_ctime_to_ts(struct inode *inode, struct timespec64 ts)
fs/inode.c
2834
trace_inode_set_ctime_to_ts(inode, &ts);
fs/inode.c
2835
set_normalized_timespec64(&ts, ts.tv_sec, ts.tv_nsec);
fs/inode.c
2836
inode->i_ctime_sec = ts.tv_sec;
fs/inode.c
2837
inode->i_ctime_nsec = ts.tv_nsec;
fs/inode.c
2838
return ts;
fs/isofs/inode.c
1284
struct timespec64 ts;
fs/isofs/inode.c
1397
ts = iso_date(de->date, high_sierra ? ISO_DATE_HIGH_SIERRA : 0);
fs/isofs/inode.c
1398
inode_set_ctime_to_ts(inode, ts);
fs/isofs/inode.c
1399
inode_set_atime_to_ts(inode, ts);
fs/isofs/inode.c
1400
inode_set_mtime_to_ts(inode, ts);
fs/isofs/util.c
22
struct timespec64 ts;
fs/isofs/util.c
34
ts.tv_nsec = ((p[14] - '0') * 10 + (p[15] - '0')) * 10000000;
fs/isofs/util.c
43
ts.tv_nsec = 0;
fs/isofs/util.c
49
ts.tv_sec = 0;
fs/isofs/util.c
51
ts.tv_sec = mktime64(year+1900, month, day, hour, minute, second);
fs/isofs/util.c
83
ts.tv_sec -= tz * 15 * 60;
fs/isofs/util.c
85
return ts;
fs/jbd2/transaction.c
121
unsigned long ts)
fs/jbd2/transaction.c
125
if (time_after(transaction->t_start, ts)) {
fs/jbd2/transaction.c
126
newts = jbd2_time_diff(ts, transaction->t_start);
fs/jbd2/transaction.c
318
unsigned long ts = jiffies;
fs/jbd2/transaction.c
430
update_t_max_wait(transaction, ts);
fs/libfs.c
2124
struct timespec64 ts = inode_set_ctime_current(inode);
fs/libfs.c
2126
inode_set_atime_to_ts(inode, ts);
fs/libfs.c
2127
inode_set_mtime_to_ts(inode, ts);
fs/libfs.c
2128
return ts;
fs/nfs/flexfilelayout/flexfilelayout.c
2828
struct timespec64 ts;
fs/nfs/flexfilelayout/flexfilelayout.c
2832
ts = ktime_to_timespec64(t);
fs/nfs/flexfilelayout/flexfilelayout.c
2833
p = xdr_encode_hyper(p, ts.tv_sec);
fs/nfs/flexfilelayout/flexfilelayout.c
2834
*p++ = cpu_to_be32(ts.tv_nsec);
fs/nfs/inode.c
1606
struct timespec64 ts;
fs/nfs/inode.c
1618
ts = inode_get_ctime(inode);
fs/nfs/inode.c
1621
&& timespec64_equal(&ts, &fattr->pre_ctime)) {
fs/nfs/inode.c
1625
ts = inode_get_mtime(inode);
fs/nfs/inode.c
1628
&& timespec64_equal(&ts, &fattr->pre_mtime)) {
fs/nfs/inode.c
1654
struct timespec64 ts;
fs/nfs/inode.c
1680
ts = inode_get_mtime(inode);
fs/nfs/inode.c
1681
if ((fattr->valid & NFS_ATTR_FATTR_MTIME) && !timespec64_equal(&ts, &fattr->mtime))
fs/nfs/inode.c
1684
ts = inode_get_ctime(inode);
fs/nfs/inode.c
1685
if ((fattr->valid & NFS_ATTR_FATTR_CTIME) && !timespec64_equal(&ts, &fattr->ctime))
fs/nfs/inode.c
1708
ts = inode_get_atime(inode);
fs/nfs/inode.c
1709
if ((fattr->valid & NFS_ATTR_FATTR_ATIME) && !timespec64_equal(&ts, &fattr->atime))
fs/nfs/internal.h
920
u64 nfs_timespec_to_change_attr(const struct timespec64 *ts)
fs/nfs/internal.h
922
return ((u64)ts->tv_sec << 30) + ts->tv_nsec;
fs/nfs/nfs4xdr.c
2013
struct timespec64 ts = { 0, 0 };
fs/nfs/nfs4xdr.c
2027
p = xdr_encode_nfstime4(p, &ts);
fs/nfs/nfs4xdr.c
2028
xdr_encode_nfstime4(p, &ts);
fs/nfsd/nfs4xdr.c
3546
struct timespec64 ts = ns_to_timespec64(ns);
fs/nfsd/nfs4xdr.c
3548
return nfsd4_encode_nfstime4(xdr, &ts);
fs/nfsd/nfs4xdr.c
579
struct timespec64 ts;
fs/nfsd/nfs4xdr.c
583
status = nfsd4_decode_nfstime4(argp, &ts);
fs/ntfs/time.h
32
static inline __le64 utc2ntfs(const struct timespec64 ts)
fs/ntfs/time.h
38
return cpu_to_le64((u64)(ts.tv_sec + NTFS_TIME_OFFSET) * 10000000 +
fs/ntfs/time.h
39
ts.tv_nsec / 100);
fs/ntfs/time.h
50
struct timespec64 ts;
fs/ntfs/time.h
52
ktime_get_coarse_real_ts64(&ts);
fs/ntfs/time.h
53
return utc2ntfs(ts);
fs/ntfs/time.h
74
struct timespec64 ts;
fs/ntfs/time.h
83
ts.tv_sec = div_s64_rem(t, 10000000, &t32);
fs/ntfs/time.h
84
ts.tv_nsec = t32 * 100;
fs/ntfs/time.h
85
return ts;
fs/ntfs3/frecord.c
3143
struct timespec64 ts;
fs/ntfs3/frecord.c
3153
ts = inode_get_mtime(inode);
fs/ntfs3/frecord.c
3154
dup.m_time = kernel2nt(&ts);
fs/ntfs3/frecord.c
3160
ts = inode_get_ctime(inode);
fs/ntfs3/frecord.c
3161
dup.c_time = kernel2nt(&ts);
fs/ntfs3/frecord.c
3167
ts = inode_get_atime(inode);
fs/ntfs3/frecord.c
3168
dup.a_time = kernel2nt(&ts);
fs/ntfs3/fslog.c
731
u32 ts;
fs/ntfs3/fslog.c
738
ts = rsize * ne + sizeof(struct RESTART_TABLE);
fs/ntfs3/fslog.c
741
rsize + sizeof(struct RESTART_TABLE) > bytes || bytes < ts ||
fs/ntfs3/fslog.c
742
le16_to_cpu(rt->total) > ne || ff > ts - sizeof(__le32) ||
fs/ntfs3/fslog.c
743
lf > ts - sizeof(__le32) ||
fs/ntfs3/fslog.c
785
if (off > ts - sizeof(__le32))
fs/ntfs3/inode.c
171
nt2kernel(std5->a_time, &ts);
fs/ntfs3/inode.c
172
inode_set_atime_to_ts(inode, ts);
fs/ntfs3/inode.c
173
nt2kernel(std5->c_time, &ts);
fs/ntfs3/inode.c
174
inode_set_ctime_to_ts(inode, ts);
fs/ntfs3/inode.c
175
nt2kernel(std5->m_time, &ts);
fs/ntfs3/inode.c
176
inode_set_mtime_to_ts(inode, ts);
fs/ntfs3/inode.c
48
struct timespec64 ts;
fs/ntfs3/ntfs_fs.h
1040
static inline __le64 kernel2nt(const struct timespec64 *ts)
fs/ntfs3/ntfs_fs.h
1044
(ts->tv_sec + SecondsToStartOf1970) +
fs/ntfs3/ntfs_fs.h
1045
ts->tv_nsec / NTFS_TIME_GRAN);
fs/ntfs3/ntfs_fs.h
1051
static inline void nt2kernel(const __le64 tm, struct timespec64 *ts)
fs/ntfs3/ntfs_fs.h
1057
ts->tv_sec = div_s64_rem(t, _100ns2seconds, &t32);
fs/ntfs3/ntfs_fs.h
1058
ts->tv_nsec = t32 * 100;
fs/ocfs2/dlmglue.c
2166
struct timespec64 ts;
fs/ocfs2/dlmglue.c
2187
ts = inode_get_atime(inode);
fs/ocfs2/dlmglue.c
2188
lvb->lvb_iatime_packed = cpu_to_be64(ocfs2_pack_timespec(&ts));
fs/ocfs2/dlmglue.c
2189
ts = inode_get_ctime(inode);
fs/ocfs2/dlmglue.c
2190
lvb->lvb_ictime_packed = cpu_to_be64(ocfs2_pack_timespec(&ts));
fs/ocfs2/dlmglue.c
2191
ts = inode_get_mtime(inode);
fs/ocfs2/dlmglue.c
2192
lvb->lvb_imtime_packed = cpu_to_be64(ocfs2_pack_timespec(&ts));
fs/ocfs2/dlmglue.c
2213
struct timespec64 ts;
fs/ocfs2/dlmglue.c
2240
ocfs2_unpack_timespec(&ts, be64_to_cpu(lvb->lvb_iatime_packed));
fs/ocfs2/dlmglue.c
2241
inode_set_atime_to_ts(inode, ts);
fs/ocfs2/dlmglue.c
2242
ocfs2_unpack_timespec(&ts, be64_to_cpu(lvb->lvb_imtime_packed));
fs/ocfs2/dlmglue.c
2243
inode_set_mtime_to_ts(inode, ts);
fs/ocfs2/dlmglue.c
2244
ocfs2_unpack_timespec(&ts, be64_to_cpu(lvb->lvb_ictime_packed));
fs/ocfs2/dlmglue.c
2245
inode_set_ctime_to_ts(inode, ts);
fs/ocfs2/namei.c
525
struct timespec64 ts;
fs/ocfs2/namei.c
574
ktime_get_coarse_real_ts64(&ts);
fs/ocfs2/namei.c
576
cpu_to_le64(ts.tv_sec);
fs/ocfs2/namei.c
578
cpu_to_le32(ts.tv_nsec);
fs/select.c
1096
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
1100
if (get_timespec64(&ts, tsp))
fs/select.c
1104
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/select.c
1122
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
1126
if (get_old_timespec32(&ts, tsp))
fs/select.c
1130
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/select.c
1309
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
1315
if (get_old_timespec32(&ts, tsp))
fs/select.c
1319
if (get_timespec64(&ts, tsp))
fs/select.c
1327
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/select.c
1392
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
1396
if (get_old_timespec32(&ts, tsp))
fs/select.c
1400
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/select.c
1418
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
1422
if (get_timespec64(&ts, tsp))
fs/select.c
1426
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/select.c
273
struct timespec64 ts = {.tv_sec = sec, .tv_nsec = nsec};
fs/select.c
275
if (!timespec64_valid(&ts))
fs/select.c
283
*to = timespec64_add_safe(*to, ts);
fs/select.c
744
struct timespec64 ts, end_time, *to = NULL;
fs/select.c
750
if (get_timespec64(&ts, tsp))
fs/select.c
754
if (get_old_timespec32(&ts, tsp))
fs/select.c
762
if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
fs/smb/client/cifsencrypt.c
227
struct timespec64 ts;
fs/smb/client/cifsencrypt.c
234
ktime_get_real_ts64(&ts);
fs/smb/client/cifsencrypt.c
235
return cpu_to_le64(cifs_UnixTimeToNT(ts));
fs/smb/client/cifsfs.c
200
struct timespec64 ts;
fs/smb/client/cifsfs.c
231
ts = cnvrtDosUnixTm(cpu_to_le16(SMB_DATE_MIN), 0, 0);
fs/smb/client/cifsfs.c
232
sb->s_time_min = ts.tv_sec;
fs/smb/client/cifsfs.c
233
ts = cnvrtDosUnixTm(cpu_to_le16(SMB_DATE_MAX),
fs/smb/client/cifsfs.c
235
sb->s_time_max = ts.tv_sec;
fs/smb/client/cifsfs.c
242
ts = cifs_NTtimeToUnix(0);
fs/smb/client/cifsfs.c
243
sb->s_time_min = ts.tv_sec;
fs/smb/client/cifsfs.c
244
ts = cifs_NTtimeToUnix(cpu_to_le64(S64_MAX));
fs/smb/client/cifsfs.c
245
sb->s_time_max = ts.tv_sec;
fs/smb/client/cifssmb.c
4011
struct timespec64 ts;
fs/smb/client/cifssmb.c
4017
ts.tv_nsec = 0;
fs/smb/client/cifssmb.c
4018
ts.tv_sec = time;
fs/smb/client/cifssmb.c
4020
data->ChangeTime = cpu_to_le64(cifs_UnixTimeToNT(ts));
fs/smb/client/cifssmb.c
5659
struct timespec64 ts;
fs/smb/client/cifssmb.c
5689
ts = cifs_NTtimeToUnix(write_time);
fs/smb/client/cifssmb.c
5690
pSMB->last_write_time = cpu_to_le32(ts.tv_sec);
fs/smb/client/dfs_cache.c
110
struct timespec64 ts;
fs/smb/client/dfs_cache.c
112
ktime_get_coarse_real_ts64(&ts);
fs/smb/client/dfs_cache.c
113
return timespec64_compare(&ts, &ce->etime) >= 0;
fs/smb/client/dfs_cache.c
351
struct timespec64 ts = {
fs/smb/client/dfs_cache.c
358
return timespec64_add(now, ts);
fs/smb/client/netmisc.c
121
struct timespec64 ts;
fs/smb/client/netmisc.c
135
ts.tv_nsec = (time64_t)(do_div(abs_t, 10000000) * 100);
fs/smb/client/netmisc.c
136
ts.tv_nsec = -ts.tv_nsec;
fs/smb/client/netmisc.c
137
ts.tv_sec = -abs_t;
fs/smb/client/netmisc.c
140
ts.tv_nsec = (time64_t)do_div(abs_t, 10000000) * 100;
fs/smb/client/netmisc.c
141
ts.tv_sec = abs_t;
fs/smb/client/netmisc.c
144
return ts;
fs/smb/client/netmisc.c
161
struct timespec64 ts;
fs/smb/client/netmisc.c
206
ts.tv_sec = sec + offset;
fs/smb/client/netmisc.c
210
ts.tv_nsec = 0;
fs/smb/client/netmisc.c
211
return ts;
fs/smb/client/smb2ops.c
2201
struct timespec64 ts;
fs/smb/client/smb2ops.c
2247
ts = cifs_NTtimeToUnix(file_inf.LastWriteTime);
fs/smb/client/smb2ops.c
2248
inode_set_mtime_to_ts(inode, ts);
fs/smb/client/smb2ops.c
2251
ts = cifs_NTtimeToUnix(file_inf.ChangeTime);
fs/smb/client/smb2ops.c
2252
inode_set_ctime_to_ts(inode, ts);
fs/smb/client/smb2ops.c
2255
ts = cifs_NTtimeToUnix(file_inf.LastAccessTime);
fs/smb/client/smb2ops.c
2256
inode_set_atime_to_ts(inode, ts);
fs/smb/server/misc.c
325
struct timespec64 ts;
fs/smb/server/misc.c
338
ts.tv_nsec = do_div(abs_t, 10000000) * 100;
fs/smb/server/misc.c
339
ts.tv_nsec = -ts.tv_nsec;
fs/smb/server/misc.c
340
ts.tv_sec = -abs_t;
fs/smb/server/misc.c
343
ts.tv_nsec = do_div(abs_t, 10000000) * 100;
fs/smb/server/misc.c
344
ts.tv_sec = abs_t;
fs/smb/server/misc.c
347
return ts;
fs/smb/server/misc.c
359
struct timespec64 ts;
fs/smb/server/misc.c
361
ktime_get_real_ts64(&ts);
fs/smb/server/misc.c
362
return ksmbd_UnixTimeToNT(ts);
fs/ubifs/sb.c
297
ktime_get_coarse_real_ts64(&ts);
fs/ubifs/sb.c
298
tmp_le64 = cpu_to_le64(ts.tv_sec);
fs/ubifs/sb.c
90
struct timespec64 ts;
fs/udf/inode.c
1357
struct timespec64 ts;
fs/udf/inode.c
1534
udf_disk_stamp_to_time(&ts, fe->accessTime);
fs/udf/inode.c
1535
inode_set_atime_to_ts(inode, ts);
fs/udf/inode.c
1536
udf_disk_stamp_to_time(&ts, fe->modificationTime);
fs/udf/inode.c
1537
inode_set_mtime_to_ts(inode, ts);
fs/udf/inode.c
1538
udf_disk_stamp_to_time(&ts, fe->attrTime);
fs/udf/inode.c
1539
inode_set_ctime_to_ts(inode, ts);
fs/udf/inode.c
1551
udf_disk_stamp_to_time(&ts, efe->accessTime);
fs/udf/inode.c
1552
inode_set_atime_to_ts(inode, ts);
fs/udf/inode.c
1553
udf_disk_stamp_to_time(&ts, efe->modificationTime);
fs/udf/inode.c
1554
inode_set_mtime_to_ts(inode, ts);
fs/udf/inode.c
1555
udf_disk_stamp_to_time(&ts, efe->attrTime);
fs/udf/inode.c
1556
inode_set_ctime_to_ts(inode, ts);
fs/udf/super.c
2059
struct timespec64 ts;
fs/udf/super.c
2061
ktime_get_real_ts64(&ts);
fs/udf/super.c
2062
udf_time_to_disk_stamp(&lvid->recordingDateAndTime, ts);
fs/udf/super.c
2302
struct timestamp ts;
fs/udf/super.c
2303
udf_time_to_disk_stamp(&ts, sbi->s_record_time);
fs/udf/super.c
2306
le16_to_cpu(ts.year), ts.month, ts.day,
fs/udf/super.c
2307
ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone));
fs/udf/super.c
898
struct timestamp *ts;
fs/udf/super.c
919
ts = &pvoldesc->recordingDateAndTime;
fs/udf/super.c
921
le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
fs/udf/super.c
922
ts->minute, le16_to_cpu(ts->typeAndTimezone));
fs/udf/udftime.c
64
udf_time_to_disk_stamp(struct timestamp *dest, struct timespec64 ts)
fs/udf/udftime.c
74
seconds = ts.tv_sec + offset * 60;
fs/udf/udftime.c
82
dest->centiseconds = ts.tv_nsec / 10000000;
fs/udf/udftime.c
83
dest->hundredsOfMicroseconds = (ts.tv_nsec / 1000 -
fs/udf/udftime.c
85
dest->microseconds = (ts.tv_nsec / 1000 - dest->centiseconds * 10000 -
fs/ufs/ialloc.c
180
struct timespec64 ts;
fs/ufs/ialloc.c
328
ktime_get_real_ts64(&ts);
fs/ufs/ialloc.c
329
ufs2_inode->ui_birthtime = cpu_to_fs64(sb, ts.tv_sec);
fs/ufs/ialloc.c
330
ufs2_inode->ui_birthnsec = cpu_to_fs32(sb, ts.tv_nsec);
fs/xfs/libxfs/xfs_inode_buf.c
147
static inline struct timespec64 xfs_inode_decode_bigtime(uint64_t ts)
fs/xfs/libxfs/xfs_inode_buf.c
152
tv.tv_sec = xfs_bigtime_to_unix(div_u64_rem(ts, NSEC_PER_SEC, &n));
fs/xfs/libxfs/xfs_inode_buf.c
162
const xfs_timestamp_t ts)
fs/xfs/libxfs/xfs_inode_buf.c
168
return xfs_inode_decode_bigtime(be64_to_cpu(ts));
fs/xfs/libxfs/xfs_inode_buf.c
170
lts = (struct xfs_legacy_timestamp *)&ts;
fs/xfs/libxfs/xfs_inode_buf.c
289
xfs_timestamp_t ts;
fs/xfs/libxfs/xfs_inode_buf.c
294
lts = (struct xfs_legacy_timestamp *)&ts;
fs/xfs/libxfs/xfs_inode_buf.c
298
return ts;
fs/xfs/libxfs/xfs_inode_buf.h
45
const xfs_timestamp_t ts);
fs/xfs/scrub/inode.c
401
const xfs_timestamp_t ts)
fs/xfs/scrub/inode.c
405
tv = xfs_inode_from_disk_ts(dip, ts);
fs/xfs/scrub/inode_repair.c
1758
struct timespec64 *ts)
fs/xfs/scrub/inode_repair.c
1760
ts->tv_nsec = clamp_t(long, ts->tv_nsec, 0, NSEC_PER_SEC - 1);
fs/xfs/scrub/inode_repair.c
1761
*ts = timestamp_truncate(*ts, VFS_I(ip));
fs/xfs/xfs_inode_item_recover.c
134
xfs_timestamp_t ts;
fs/xfs/xfs_inode_item_recover.c
139
lts = (struct xfs_legacy_timestamp *)&ts;
fs/xfs/xfs_inode_item_recover.c
144
return ts;
fs/xfs/xfs_rtalloc.c
1764
struct timespec64 ts; /* timespec in inode */
fs/xfs/xfs_rtalloc.c
1768
ts = inode_get_atime(VFS_I(rbmip));
fs/xfs/xfs_rtalloc.c
1773
seq = ts.tv_sec;
fs/xfs/xfs_rtalloc.c
1785
ts.tv_sec = seq + 1;
fs/xfs/xfs_rtalloc.c
1786
inode_set_atime_to_ts(VFS_I(rbmip), ts);
include/linux/ceph/decode.h
199
static inline void ceph_decode_timespec64(struct timespec64 *ts,
include/linux/ceph/decode.h
208
ts->tv_sec = (time64_t)le32_to_cpu(tv->tv_sec);
include/linux/ceph/decode.h
209
ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec);
include/linux/ceph/decode.h
212
const struct timespec64 *ts)
include/linux/ceph/decode.h
214
tv->tv_sec = cpu_to_le32((u32)ts->tv_sec);
include/linux/ceph/decode.h
215
tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec);
include/linux/fs.h
1611
struct timespec64 ts = { .tv_sec = inode_get_atime_sec(inode),
include/linux/fs.h
1614
return ts;
include/linux/fs.h
1618
struct timespec64 ts)
include/linux/fs.h
1620
inode->i_atime_sec = ts.tv_sec;
include/linux/fs.h
1621
inode->i_atime_nsec = ts.tv_nsec;
include/linux/fs.h
1622
return ts;
include/linux/fs.h
1628
struct timespec64 ts = { .tv_sec = sec,
include/linux/fs.h
1631
return inode_set_atime_to_ts(inode, ts);
include/linux/fs.h
1646
struct timespec64 ts = { .tv_sec = inode_get_mtime_sec(inode),
include/linux/fs.h
1648
return ts;
include/linux/fs.h
1652
struct timespec64 ts)
include/linux/fs.h
1654
inode->i_mtime_sec = ts.tv_sec;
include/linux/fs.h
1655
inode->i_mtime_nsec = ts.tv_nsec;
include/linux/fs.h
1656
return ts;
include/linux/fs.h
1662
struct timespec64 ts = { .tv_sec = sec,
include/linux/fs.h
1664
return inode_set_mtime_to_ts(inode, ts);
include/linux/fs.h
1690
struct timespec64 ts = { .tv_sec = inode_get_ctime_sec(inode),
include/linux/fs.h
1693
return ts;
include/linux/fs.h
1696
struct timespec64 inode_set_ctime_to_ts(struct inode *inode, struct timespec64 ts);
include/linux/fs.h
1709
struct timespec64 ts = { .tv_sec = sec,
include/linux/fs.h
1712
return inode_set_ctime_to_ts(inode, ts);
include/linux/fsl/ptp_qoriq.h
191
int ptp_qoriq_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/fsl/ptp_qoriq.h
193
const struct timespec64 *ts);
include/linux/iio/common/inv_sensors_timestamp.h
67
void inv_sensors_timestamp_init(struct inv_sensors_timestamp *ts,
include/linux/iio/common/inv_sensors_timestamp.h
70
int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts,
include/linux/iio/common/inv_sensors_timestamp.h
73
void inv_sensors_timestamp_interrupt(struct inv_sensors_timestamp *ts,
include/linux/iio/common/inv_sensors_timestamp.h
76
static inline int64_t inv_sensors_timestamp_pop(struct inv_sensors_timestamp *ts)
include/linux/iio/common/inv_sensors_timestamp.h
78
ts->timestamp += ts->period;
include/linux/iio/common/inv_sensors_timestamp.h
79
return ts->timestamp;
include/linux/iio/common/inv_sensors_timestamp.h
82
void inv_sensors_timestamp_apply_odr(struct inv_sensors_timestamp *ts,
include/linux/iio/common/inv_sensors_timestamp.h
86
static inline void inv_sensors_timestamp_reset(struct inv_sensors_timestamp *ts)
include/linux/iio/common/inv_sensors_timestamp.h
90
ts->it = interval_init;
include/linux/iio/common/inv_sensors_timestamp.h
91
ts->timestamp = 0;
include/linux/init_syscalls.h
18
int __init init_utimes(char *filename, struct timespec64 *ts);
include/linux/ktime.h
208
struct timespec64 *ts)
include/linux/ktime.h
211
*ts = ktime_to_timespec64(kt);
include/linux/ktime.h
69
static inline ktime_t timespec64_to_ktime(struct timespec64 ts)
include/linux/ktime.h
71
return ktime_set(ts.tv_sec, ts.tv_nsec);
include/linux/lsm_hook_defs.h
49
LSM_HOOK(int, 0, settime, const struct timespec64 *ts,
include/linux/mfd/ipaq-micro.h
121
void (*ts) (void *data, int len, unsigned char *rxdata);
include/linux/nvme.h
1644
__u8 ts[24];
include/linux/posix-clock.h
44
int (*clock_gettime)(struct posix_clock *pc, struct timespec64 *ts);
include/linux/posix-clock.h
46
int (*clock_getres) (struct posix_clock *pc, struct timespec64 *ts);
include/linux/posix-clock.h
49
const struct timespec64 *ts);
include/linux/pps_kernel.h
100
static inline void pps_get_ts(struct pps_event_time *ts)
include/linux/pps_kernel.h
106
ts->ts_real = ktime_to_timespec64(snap.systime);
include/linux/pps_kernel.h
107
ts->ts_raw = ktime_to_timespec64(snap.monoraw);
include/linux/pps_kernel.h
109
ktime_get_real_ts64(&ts->ts_real);
include/linux/pps_kernel.h
114
static inline void pps_sub_ts(struct pps_event_time *ts, struct timespec64 delta)
include/linux/pps_kernel.h
116
ts->ts_real = timespec64_sub(ts->ts_real, delta);
include/linux/pps_kernel.h
118
ts->ts_raw = timespec64_sub(ts->ts_raw, delta);
include/linux/pps_kernel.h
89
struct pps_event_time *ts, int event, void *data);
include/linux/pps_kernel.h
94
struct timespec64 ts)
include/linux/pps_kernel.h
96
kt->sec = ts.tv_sec;
include/linux/pps_kernel.h
97
kt->nsec = ts.tv_nsec;
include/linux/pstore.h
216
u64 ts;
include/linux/pstore.h
254
return rec->ts;
include/linux/pstore.h
260
rec->ts = val;
include/linux/pstore.h
266
rec->ts &= ~(TS_CPU_MASK);
include/linux/pstore.h
267
rec->ts |= cpu;
include/linux/pstore.h
273
return rec->ts & TS_CPU_MASK;
include/linux/pstore.h
279
return rec->ts >> TS_CPU_SHIFT;
include/linux/pstore.h
285
rec->ts = (rec->ts & TS_CPU_MASK) | (val << TS_CPU_SHIFT);
include/linux/ptp_clock_kernel.h
209
int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/ptp_clock_kernel.h
210
int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/ptp_clock_kernel.h
214
int (*settime64)(struct ptp_clock_info *p, const struct timespec64 *ts);
include/linux/ptp_clock_kernel.h
215
int (*getcycles64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/linux/ptp_clock_kernel.h
216
int (*getcyclesx64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/ptp_kvm.h
18
int kvm_arch_ptp_get_clock(struct timespec64 *ts);
include/linux/ring_buffer.h
151
ring_buffer_peek(struct trace_buffer *buffer, int cpu, u64 *ts,
include/linux/ring_buffer.h
154
ring_buffer_consume(struct trace_buffer *buffer, int cpu, u64 *ts,
include/linux/ring_buffer.h
162
ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts);
include/linux/ring_buffer.h
212
int cpu, u64 *ts);
include/linux/security.h
176
extern int cap_settime(const struct timespec64 *ts, const struct timezone *tz);
include/linux/security.h
356
int security_settime64(const struct timespec64 *ts, const struct timezone *tz);
include/linux/security.h
720
static inline int security_settime64(const struct timespec64 *ts,
include/linux/security.h
723
return cap_settime(ts, tz);
include/linux/skbuff.h
4423
struct timespec64 ts = ktime_to_timespec64(skb->tstamp);
include/linux/skbuff.h
4425
stamp->tv_sec = ts.tv_sec;
include/linux/skbuff.h
4426
stamp->tv_usec = ts.tv_nsec / 1000;
include/linux/skbuff.h
4432
struct timespec64 ts = ktime_to_timespec64(skb->tstamp);
include/linux/skbuff.h
4434
stamp->tv_sec = ts.tv_sec;
include/linux/skbuff.h
4435
stamp->tv_nsec = ts.tv_nsec;
include/linux/skbuff.h
4441
struct timespec64 ts = ktime_to_timespec64(skb->tstamp);
include/linux/skbuff.h
4443
stamp->tv_sec = ts.tv_sec;
include/linux/skbuff.h
4444
stamp->tv_nsec = ts.tv_nsec;
include/linux/socket.h
417
ktime_t ts[3];
include/linux/spi/max7301.h
35
extern int __max730x_probe(struct max7301 *ts);
include/linux/time.h
11
int get_timespec64(struct timespec64 *ts,
include/linux/time.h
13
int put_timespec64(const struct timespec64 *ts,
include/linux/time64.h
100
if (ts->tv_sec < 0)
include/linux/time64.h
103
if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC)
include/linux/time64.h
108
static inline bool timespec64_valid_strict(const struct timespec64 *ts)
include/linux/time64.h
110
if (!timespec64_valid(ts))
include/linux/time64.h
113
if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
include/linux/time64.h
118
static inline bool timespec64_valid_settod(const struct timespec64 *ts)
include/linux/time64.h
120
if (!timespec64_valid(ts))
include/linux/time64.h
123
if ((unsigned long long)ts->tv_sec >= TIME_SETTOD_SEC_MAX)
include/linux/time64.h
135
static inline s64 timespec64_to_ns(const struct timespec64 *ts)
include/linux/time64.h
138
if (ts->tv_sec >= KTIME_SEC_MAX)
include/linux/time64.h
141
if (ts->tv_sec <= KTIME_SEC_MIN)
include/linux/time64.h
144
return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
include/linux/time64.h
52
static inline bool timespec64_is_epoch(const struct timespec64 *ts)
include/linux/time64.h
54
return ts->tv_sec == 0 && ts->tv_nsec == 0;
include/linux/time64.h
71
extern void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec);
include/linux/time64.h
97
static inline bool timespec64_valid(const struct timespec64 *ts)
include/linux/time_namespace.h
145
static inline void timens_add_monotonic(struct timespec64 *ts) { }
include/linux/time_namespace.h
146
static inline void timens_add_boottime(struct timespec64 *ts) { }
include/linux/time_namespace.h
153
static inline void timens_sub_boottime(struct timespec64 *ts) { }
include/linux/time_namespace.h
73
static inline void timens_add_monotonic(struct timespec64 *ts)
include/linux/time_namespace.h
77
*ts = timespec64_add(*ts, ns_offsets->monotonic);
include/linux/time_namespace.h
80
static inline void timens_add_boottime(struct timespec64 *ts)
include/linux/time_namespace.h
84
*ts = timespec64_add(*ts, ns_offsets->boottime);
include/linux/time_namespace.h
94
static inline void timens_sub_boottime(struct timespec64 *ts)
include/linux/time_namespace.h
98
*ts = timespec64_sub(*ts, ns_offsets->boottime);
include/linux/timekeeping.h
131
struct timespec64 ts;
include/linux/timekeeping.h
133
ktime_get_coarse_ts64(&ts);
include/linux/timekeeping.h
134
return timespec64_to_ktime(ts);
include/linux/timekeeping.h
20
extern int do_settimeofday64(const struct timespec64 *ts);
include/linux/timekeeping.h
229
static inline void ktime_get_boottime_ts64(struct timespec64 *ts)
include/linux/timekeeping.h
231
*ts = ktime_to_timespec64(ktime_get_boottime());
include/linux/timekeeping.h
234
static inline void ktime_get_coarse_boottime_ts64(struct timespec64 *ts)
include/linux/timekeeping.h
236
*ts = ktime_to_timespec64(ktime_get_coarse_boottime());
include/linux/timekeeping.h
244
static inline void ktime_get_clocktai_ts64(struct timespec64 *ts)
include/linux/timekeeping.h
246
*ts = ktime_to_timespec64(ktime_get_clocktai());
include/linux/timekeeping.h
249
static inline void ktime_get_coarse_clocktai_ts64(struct timespec64 *ts)
include/linux/timekeeping.h
251
*ts = ktime_to_timespec64(ktime_get_coarse_clocktai());
include/linux/timekeeping.h
364
extern void read_persistent_clock64(struct timespec64 *ts);
include/linux/timekeeping.h
42
extern void ktime_get_raw_ts64(struct timespec64 *ts);
include/linux/timekeeping.h
43
extern void ktime_get_ts64(struct timespec64 *ts);
include/linux/timekeeping.h
45
extern void ktime_get_coarse_ts64(struct timespec64 *ts);
include/linux/timekeeping.h
46
extern void ktime_get_coarse_real_ts64(struct timespec64 *ts);
include/linux/timekeeping.h
47
extern void ktime_get_clock_ts64(clockid_t id, struct timespec64 *ts);
include/linux/timekeeping.h
50
extern void ktime_get_coarse_real_ts64_mg(struct timespec64 *ts);
include/linux/timekeeping.h
51
extern void ktime_get_real_ts64_mg(struct timespec64 *ts);
include/linux/timekeeping.h
54
void getboottime64(struct timespec64 *ts);
include/linux/trace_events.h
132
u64 ts;
include/media/cec.h
385
u8 error_cnt, ktime_t ts);
include/media/cec.h
400
u8 status, ktime_t ts);
include/media/cec.h
409
struct cec_msg *msg, ktime_t ts);
include/media/cec.h
427
bool dropped_events, ktime_t ts);
include/media/cec.h
437
void cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts);
include/media/cec.h
447
void cec_queue_pin_5v_event(struct cec_adapter *adap, bool is_high, ktime_t ts);
include/media/dmxdev.h
131
struct list_head ts;
include/media/dmxdev.h
85
struct dmx_ts_feed *ts;
include/media/dvb_demux.h
132
struct dmx_ts_feed ts;
include/media/dvb_demux.h
137
dmx_ts_cb ts;
include/media/v4l2-common.h
728
struct timespec64 ts = ns_to_timespec64(timestamp);
include/media/v4l2-common.h
730
buf->timestamp.tv_sec = ts.tv_sec;
include/media/v4l2-common.h
731
buf->timestamp.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
include/media/v4l2-event.h
35
u64 ts;
include/net/bluetooth/hci.h
3375
__le32 ts;
include/net/bluetooth/hci.h
3413
#define hci_iso_flags_pack(pb, ts) ((pb & 0x03) | ((ts & 0x01) << 2))
include/net/dsa.h
951
struct kernel_ethtool_ts_info *ts);
include/net/inet_sock.h
48
unsigned char ts;
include/net/lwtunnel.h
42
struct lwtunnel_state **ts,
include/net/secure_seq.h
28
union tcp_seq_and_ts_off ts;
include/net/secure_seq.h
30
ts = secure_tcp_seq_and_ts_off(&init_net, saddr, daddr,
include/net/secure_seq.h
33
return ts.seq;
include/net/secure_seq.h
44
union tcp_seq_and_ts_off ts;
include/net/secure_seq.h
46
ts = secure_tcpv6_seq_and_ts_off(&init_net, saddr, daddr,
include/net/secure_seq.h
49
return ts.seq;
include/net/sock.h
2865
struct timespec64 *ts);
include/net/tcp.h
523
tss->ts[0] = skb->tstamp;
include/net/tcp.h
524
tss->ts[2] = skb_hwtstamps(skb)->hwtstamp;
include/soc/mscc/ocelot_ptp.h
48
int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
include/soc/mscc/ocelot_ptp.h
50
const struct timespec64 *ts);
include/uapi/drm/asahi_drm.h
1146
struct drm_asahi_timestamps ts;
include/uapi/linux/cec.h
490
__u64 ts;
include/uapi/linux/errqueue.h
58
struct __kernel_old_timespec ts[3];
include/uapi/linux/errqueue.h
60
struct timespec ts[3];
include/uapi/linux/errqueue.h
65
struct __kernel_timespec ts[3];
include/uapi/linux/io_uring.h
1001
__u64 ts;
include/uapi/linux/io_uring.h
985
struct __kernel_timespec ts;
include/uapi/linux/omap3isp.h
175
} ts;
include/uapi/linux/omap3isp.h
177
struct timeval ts;
include/uapi/linux/omap3isp.h
193
} ts;
include/uapi/linux/ptp_clock.h
158
struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
include/uapi/linux/ptp_clock.h
180
struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
include/vdso/gettime.h
14
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts);
include/vdso/gettime.h
17
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
include/vdso/gettime.h
22
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts);
include/vdso/gettime.h
23
int __vdso_clock_getres_time64(clockid_t clock, struct __kernel_timespec *ts);
io_uring/cancel.c
312
struct timespec64 ts = {
io_uring/cancel.c
317
timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns());
io_uring/cmd_net.c
100
iots->tv_nsec = ts.tv_nsec;
io_uring/cmd_net.c
78
struct timespec64 ts;
io_uring/cmd_net.c
84
ret = skb_get_tx_timestamp(skb, sk, &ts);
io_uring/cmd_net.c
99
iots->tv_sec = ts.tv_sec;
io_uring/io_uring.c
2519
ext_arg->ts.tv_sec = READ_ONCE(w->ts.tv_sec);
io_uring/io_uring.c
2520
ext_arg->ts.tv_nsec = READ_ONCE(w->ts.tv_nsec);
io_uring/io_uring.c
2538
unsafe_get_user(arg.ts, &uarg->ts, uaccess_end);
io_uring/io_uring.c
2547
if (arg.ts) {
io_uring/io_uring.c
2548
if (get_timespec64(&ext_arg->ts, u64_to_user_ptr(arg.ts)))
io_uring/timeout.c
440
ktime_t ts, enum hrtimer_mode mode)
io_uring/timeout.c
462
hrtimer_start(&io->timer, ts, mode);
io_uring/timeout.c
57
struct timespec64 ts;
io_uring/timeout.c
66
if (get_timespec64(&ts, u64_to_user_ptr(arg)))
io_uring/timeout.c
68
if (ts.tv_sec < 0 || ts.tv_nsec < 0)
io_uring/timeout.c
70
*time = timespec64_to_ktime(ts);
io_uring/tw.c
108
ctx_flush_and_put(ctx, ts);
io_uring/tw.c
113
ctx_flush_and_put(ctx, ts);
io_uring/tw.c
245
struct io_tw_state ts = { .cancel = true };
io_uring/tw.c
268
req->io_task_work.func((struct io_tw_req){req}, ts);
io_uring/tw.c
343
struct io_tw_state ts = {};
io_uring/tw.c
347
return __io_run_local_work(ctx, ts, min_events,
io_uring/tw.c
353
struct io_tw_state ts = {};
io_uring/tw.c
357
ret = __io_run_local_work(ctx, ts, min_events, max_events);
io_uring/tw.c
67
struct io_tw_state ts = { };
io_uring/tw.c
83
ctx_flush_and_put(ctx, ts);
io_uring/tw.c
90
ctx_flush_and_put(ctx, ts);
io_uring/tw.c
94
ts.cancel = io_should_terminate_tw(ctx);
io_uring/tw.c
98
(struct io_tw_req){req}, ts);
io_uring/wait.c
232
iowq.timeout = timespec64_to_ktime(ext_arg->ts);
io_uring/wait.h
19
struct timespec64 ts;
ipc/mqueue.c
1039
struct timespec64 *ts)
ipc/mqueue.c
1054
if (ts) {
ipc/mqueue.c
1055
expires = timespec64_to_ktime(*ts);
ipc/mqueue.c
1059
audit_mq_sendrecv(mqdes, msg_len, msg_prio, ts);
ipc/mqueue.c
1144
struct timespec64 *ts)
ipc/mqueue.c
1154
if (ts) {
ipc/mqueue.c
1155
expires = timespec64_to_ktime(*ts);
ipc/mqueue.c
1159
audit_mq_sendrecv(mqdes, msg_len, 0, ts);
ipc/mqueue.c
1237
struct timespec64 ts, *p = NULL;
ipc/mqueue.c
1239
int res = prepare_timeout(u_abs_timeout, &ts);
ipc/mqueue.c
1242
p = &ts;
ipc/mqueue.c
1251
struct timespec64 ts, *p = NULL;
ipc/mqueue.c
1253
int res = prepare_timeout(u_abs_timeout, &ts);
ipc/mqueue.c
1256
p = &ts;
ipc/mqueue.c
1548
struct timespec64 *ts)
ipc/mqueue.c
1550
if (get_old_timespec32(ts, p))
ipc/mqueue.c
1552
if (!timespec64_valid(ts))
ipc/mqueue.c
1562
struct timespec64 ts, *p = NULL;
ipc/mqueue.c
1564
int res = compat_prepare_timeout(u_abs_timeout, &ts);
ipc/mqueue.c
1567
p = &ts;
ipc/mqueue.c
1577
struct timespec64 ts, *p = NULL;
ipc/mqueue.c
1579
int res = compat_prepare_timeout(u_abs_timeout, &ts);
ipc/mqueue.c
1582
p = &ts;
ipc/mqueue.c
839
struct timespec64 *ts)
ipc/mqueue.c
841
if (get_timespec64(ts, u_abs_timeout))
ipc/mqueue.c
843
if (!timespec64_valid(ts))
ipc/sem.c
2260
struct timespec64 ts;
ipc/sem.c
2261
if (get_timespec64(&ts, timeout))
ipc/sem.c
2263
return do_semtimedop(semid, tsops, nsops, &ts);
ipc/sem.c
2280
struct timespec64 ts;
ipc/sem.c
2281
if (get_old_timespec32(&ts, timeout))
ipc/sem.c
2283
return do_semtimedop(semid, tsems, nsops, &ts);
kernel/bpf/rqspinlock.c
200
struct rqspinlock_timeout *ts)
kernel/bpf/rqspinlock.c
202
u64 prev = ts->cur;
kernel/bpf/rqspinlock.c
205
if (!ts->timeout_end) {
kernel/bpf/rqspinlock.c
208
ts->cur = ktime_get_mono_fast_ns();
kernel/bpf/rqspinlock.c
209
ts->timeout_end = ts->cur + ts->duration;
kernel/bpf/rqspinlock.c
214
if (time > ts->timeout_end)
kernel/bpf/rqspinlock.c
222
ts->cur = time;
kernel/bpf/rqspinlock.c
234
#define RES_CHECK_TIMEOUT(ts, ret, mask) \
kernel/bpf/rqspinlock.c
236
if (!(ts).spin++) \
kernel/bpf/rqspinlock.c
237
(ret) = check_timeout((lock), (mask), &(ts)); \
kernel/bpf/rqspinlock.c
241
#define RES_CHECK_TIMEOUT(ts, ret, mask) \
kernel/bpf/rqspinlock.c
242
({ (ret) = check_timeout((lock), (mask), &(ts)); })
kernel/bpf/rqspinlock.c
249
#define RES_INIT_TIMEOUT(ts) ({ (ts).spin = 0; })
kernel/bpf/rqspinlock.c
255
#define RES_RESET_TIMEOUT(ts, _duration) ({ (ts).timeout_end = 0; (ts).duration = _duration; })
kernel/bpf/rqspinlock.c
263
struct rqspinlock_timeout ts;
kernel/bpf/rqspinlock.c
266
RES_INIT_TIMEOUT(ts);
kernel/bpf/rqspinlock.c
279
RES_RESET_TIMEOUT(ts, NSEC_PER_SEC);
kernel/bpf/rqspinlock.c
284
if (RES_CHECK_TIMEOUT(ts, ret, ~0u))
kernel/bpf/rqspinlock.c
342
struct rqspinlock_timeout ts;
kernel/bpf/rqspinlock.c
351
RES_INIT_TIMEOUT(ts);
kernel/bpf/rqspinlock.c
408
RES_RESET_TIMEOUT(ts, RES_DEF_TIMEOUT);
kernel/bpf/rqspinlock.c
409
res_smp_cond_load_acquire(&lock->locked, !VAL || RES_CHECK_TIMEOUT(ts, ret, _Q_LOCKED_MASK));
kernel/bpf/rqspinlock.c
569
RES_RESET_TIMEOUT(ts, RES_DEF_TIMEOUT * 2);
kernel/bpf/rqspinlock.c
571
RES_CHECK_TIMEOUT(ts, ret, _Q_LOCKED_PENDING_MASK));
kernel/delayacct.c
110
u64 *max, u64 *min, struct timespec64 *ts)
kernel/delayacct.c
121
ktime_get_real_ts64(ts);
kernel/futex/syscalls.c
178
futex_init_timeout(u32 cmd, u32 op, struct timespec64 *ts, ktime_t *t)
kernel/futex/syscalls.c
180
if (!timespec64_valid(ts))
kernel/futex/syscalls.c
183
*t = timespec64_to_ktime(*ts);
kernel/futex/syscalls.c
197
struct timespec64 ts;
kernel/futex/syscalls.c
202
if (get_timespec64(&ts, utime))
kernel/futex/syscalls.c
204
ret = futex_init_timeout(cmd, op, &ts, &t);
kernel/futex/syscalls.c
262
struct timespec64 ts;
kernel/futex/syscalls.c
277
if (get_timespec64(&ts, timeout))
kernel/futex/syscalls.c
284
ret = futex_init_timeout(FUTEX_WAIT_BITSET, flag_init, &ts, &time);
kernel/futex/syscalls.c
513
struct timespec64 ts;
kernel/futex/syscalls.c
516
if (get_old_timespec32(&ts, utime))
kernel/futex/syscalls.c
518
ret = futex_init_timeout(cmd, op, &ts, &t);
kernel/printk/printk.c
1355
static size_t print_time(u64 ts, char *buf)
kernel/printk/printk.c
1357
unsigned long rem_nsec = do_div(ts, 1000000000);
kernel/printk/printk.c
1360
(unsigned long)ts, rem_nsec / 1000);
kernel/rcu/rcutorture.c
2401
unsigned long long ts;
kernel/rcu/rcutorture.c
2427
rtorsp->ts = rcu_trace_clock_local();
kernel/rcu/rcutorture.c
2465
rtorsp->ts, rtorsp->started, completed);
kernel/rcu/rcutorture.c
306
u64 ts = trace_clock_local();
kernel/rcu/rcutorture.c
308
(void)do_div(ts, NSEC_PER_USEC);
kernel/rcu/rcutorture.c
309
return ts;
kernel/rcu/rcutorture.c
465
unsigned long long ts;
kernel/rcu/rcutorture.c
474
ts = rcu_trace_clock_local();
kernel/rcu/rcutorture.c
480
do_trace_rcu_torture_read(cur_ops->name, NULL, ts,
kernel/rcu/tree_stall.h
331
struct task_struct *ts[8];
kernel/rcu/tree_stall.h
344
ts[i++] = t;
kernel/rcu/tree_stall.h
345
if (i >= ARRAY_SIZE(ts))
kernel/rcu/tree_stall.h
350
t = ts[--i];
kernel/signal.c
3756
const struct timespec64 *ts)
kernel/signal.c
3764
if (ts) {
kernel/signal.c
3765
if (!timespec64_valid(ts))
kernel/signal.c
3767
timeout = timespec64_to_ktime(*ts);
kernel/signal.c
3820
struct timespec64 ts;
kernel/signal.c
3832
if (get_timespec64(&ts, uts))
kernel/signal.c
3836
ret = do_sigtimedwait(&these, &info, uts ? &ts : NULL);
kernel/signal.c
3853
struct timespec64 ts;
kernel/signal.c
3864
if (get_old_timespec32(&ts, uts))
kernel/signal.c
3868
ret = do_sigtimedwait(&these, &info, uts ? &ts : NULL);
kernel/time/hrtimer.c
2371
int nanosleep_copyout(struct restart_block *restart, struct timespec64 *ts)
kernel/time/hrtimer.c
2376
if (put_old_timespec32(ts, restart->nanosleep.compat_rmtp))
kernel/time/hrtimer.c
2381
if (put_timespec64(ts, restart->nanosleep.rmtp))
kernel/time/namespace.c
234
static void show_offset(struct seq_file *m, int clockid, struct timespec64 *ts)
kernel/time/namespace.c
249
seq_printf(m, "%-10s %10lld %9ld\n", clock, ts->tv_sec, ts->tv_nsec);
kernel/time/ntp.c
770
int ntp_adjtimex(unsigned int tkid, struct __kernel_timex *txc, const struct timespec64 *ts,
kernel/time/ntp.c
829
txc->time.tv_sec = ts->tv_sec;
kernel/time/ntp.c
830
txc->time.tv_usec = ts->tv_nsec;
kernel/time/ntp.c
832
txc->time.tv_usec = ts->tv_nsec / NSEC_PER_USEC;
kernel/time/ntp.c
835
if (unlikely(ts->tv_sec >= ntpdata->ntp_next_leap_sec)) {
kernel/time/ntp.c
846
if ((ntpdata->time_state == TIME_OOP) && (ts->tv_sec == ntpdata->ntp_next_leap_sec))
kernel/time/ntp.c
870
static inline struct pps_normtime pps_normalize_ts(struct timespec64 ts)
kernel/time/ntp.c
873
.sec = ts.tv_sec,
kernel/time/ntp.c
874
.nsec = ts.tv_nsec
kernel/time/ntp_internal.h
11
extern int ntp_adjtimex(unsigned int tkid, struct __kernel_timex *txc, const struct timespec64 *ts,
kernel/time/posix-clock.c
248
static int pc_clock_gettime(clockid_t id, struct timespec64 *ts)
kernel/time/posix-clock.c
258
err = cd.clk->ops.clock_gettime(cd.clk, ts);
kernel/time/posix-clock.c
267
static int pc_clock_getres(clockid_t id, struct timespec64 *ts)
kernel/time/posix-clock.c
277
err = cd.clk->ops.clock_getres(cd.clk, ts);
kernel/time/posix-clock.c
286
static int pc_clock_settime(clockid_t id, const struct timespec64 *ts)
kernel/time/posix-clock.c
291
if (!timespec64_valid_strict(ts))
kernel/time/posix-clock.c
304
err = cd.clk->ops.clock_settime(cd.clk, ts);
kernel/time/posix-timers.c
1286
struct timespec64 ts;
kernel/time/posix-timers.c
1291
if (get_old_timespec32(&ts, tp))
kernel/time/posix-timers.c
1294
return kc->clock_set(which_clock, &ts);
kernel/time/posix-timers.c
1301
struct timespec64 ts;
kernel/time/posix-timers.c
1307
err = kc->clock_get_timespec(which_clock, &ts);
kernel/time/posix-timers.c
1309
if (!err && put_old_timespec32(&ts, tp))
kernel/time/posix-timers.c
1337
struct timespec64 ts;
kernel/time/posix-timers.c
1343
err = kc->clock_getres(which_clock, &ts);
kernel/time/posix-timers.c
1344
if (!err && tp && put_old_timespec32(&ts, tp))
kernel/time/test_udelay.c
81
struct timespec64 ts;
kernel/time/test_udelay.c
83
ktime_get_ts64(&ts);
kernel/time/test_udelay.c
85
loops_per_jiffy, (s64)ts.tv_sec, ts.tv_nsec);
kernel/time/tick-sched.c
1001
static void tick_nohz_retain_tick(struct tick_sched *ts)
kernel/time/tick-sched.c
1003
ts->timer_expires_base = 0;
kernel/time/tick-sched.c
1007
static void tick_nohz_full_stop_tick(struct tick_sched *ts, int cpu)
kernel/time/tick-sched.c
1009
if (tick_nohz_next_event(ts, cpu))
kernel/time/tick-sched.c
1010
tick_nohz_stop_tick(ts, cpu);
kernel/time/tick-sched.c
1012
tick_nohz_retain_tick(ts);
kernel/time/tick-sched.c
1016
static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
kernel/time/tick-sched.c
1031
tick_sched_flag_clear(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
1032
tick_nohz_restart(ts, now);
kernel/time/tick-sched.c
1035
static void __tick_nohz_full_update_tick(struct tick_sched *ts,
kernel/time/tick-sched.c
1041
if (can_stop_full_tick(cpu, ts))
kernel/time/tick-sched.c
1042
tick_nohz_full_stop_tick(ts, cpu);
kernel/time/tick-sched.c
1043
else if (tick_sched_flag_test(ts, TS_FLAG_STOPPED))
kernel/time/tick-sched.c
1044
tick_nohz_restart_sched_tick(ts, now);
kernel/time/tick-sched.c
1048
static void tick_nohz_full_update_tick(struct tick_sched *ts)
kernel/time/tick-sched.c
1053
if (!tick_sched_flag_test(ts, TS_FLAG_NOHZ))
kernel/time/tick-sched.c
1056
__tick_nohz_full_update_tick(ts, ktime_get());
kernel/time/tick-sched.c
1097
static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
kernel/time/tick-sched.c
1101
if (unlikely(!tick_sched_flag_test(ts, TS_FLAG_NOHZ)))
kernel/time/tick-sched.c
1135
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1143
if (ts->timer_expires_base)
kernel/time/tick-sched.c
1144
expires = ts->timer_expires;
kernel/time/tick-sched.c
1145
else if (can_stop_idle_tick(cpu, ts))
kernel/time/tick-sched.c
1146
expires = tick_nohz_next_event(ts, cpu);
kernel/time/tick-sched.c
1150
ts->idle_calls++;
kernel/time/tick-sched.c
1153
int was_stopped = tick_sched_flag_test(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
1155
tick_nohz_stop_tick(ts, cpu);
kernel/time/tick-sched.c
1157
ts->idle_sleeps++;
kernel/time/tick-sched.c
1158
ts->idle_expires = expires;
kernel/time/tick-sched.c
1160
if (!was_stopped && tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
1161
kcpustat_dyntick_start(ts->idle_entrytime);
kernel/time/tick-sched.c
1165
tick_nohz_retain_tick(ts);
kernel/time/tick-sched.c
1174
static void tick_nohz_clock_sleep(struct tick_sched *ts)
kernel/time/tick-sched.c
1176
tick_sched_flag_set(ts, TS_FLAG_IDLE_ACTIVE);
kernel/time/tick-sched.c
1180
static void tick_nohz_clock_wakeup(struct tick_sched *ts)
kernel/time/tick-sched.c
1182
if (tick_sched_flag_test(ts, TS_FLAG_IDLE_ACTIVE)) {
kernel/time/tick-sched.c
1183
tick_sched_flag_clear(ts, TS_FLAG_IDLE_ACTIVE);
kernel/time/tick-sched.c
1195
struct tick_sched *ts;
kernel/time/tick-sched.c
1201
ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1202
WARN_ON_ONCE(ts->timer_expires_base);
kernel/time/tick-sched.c
1203
tick_sched_flag_set(ts, TS_FLAG_INIDLE);
kernel/time/tick-sched.c
1204
ts->idle_entrytime = ktime_get();
kernel/time/tick-sched.c
1205
tick_nohz_clock_sleep(ts);
kernel/time/tick-sched.c
1231
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1233
if (tick_sched_flag_test(ts, TS_FLAG_INIDLE)) {
kernel/time/tick-sched.c
1234
tick_nohz_clock_sleep(ts);
kernel/time/tick-sched.c
1235
ts->idle_entrytime = ktime_get();
kernel/time/tick-sched.c
1236
if (tick_sched_flag_test(ts, TS_FLAG_STOPPED))
kernel/time/tick-sched.c
1237
kcpustat_irq_exit(ts->idle_entrytime);
kernel/time/tick-sched.c
1239
tick_nohz_full_update_tick(ts);
kernel/time/tick-sched.c
1250
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1252
if (ts->got_idle_tick) {
kernel/time/tick-sched.c
1253
ts->got_idle_tick = 0;
kernel/time/tick-sched.c
1288
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1294
ktime_t now = ts->idle_entrytime;
kernel/time/tick-sched.c
1297
WARN_ON_ONCE(!tick_sched_flag_test(ts, TS_FLAG_INIDLE));
kernel/time/tick-sched.c
1301
if (!can_stop_idle_tick(cpu, ts))
kernel/time/tick-sched.c
1304
next_event = tick_nohz_next_event(ts, cpu);
kernel/time/tick-sched.c
1312
next_event = min(next_event, hrtimer_next_event_without(&ts->sched_timer));
kernel/time/tick-sched.c
1328
struct tick_sched *ts = tick_get_tick_sched(cpu);
kernel/time/tick-sched.c
1330
return ts->idle_calls;
kernel/time/tick-sched.c
1335
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1337
if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
1344
ts->idle_entrytime = ktime_get();
kernel/time/tick-sched.c
1345
kcpustat_dyntick_stop(ts->idle_entrytime);
kernel/time/tick-sched.c
1346
tick_nohz_restart_sched_tick(ts, ts->idle_entrytime);
kernel/time/tick-sched.c
1350
static void tick_nohz_idle_update_tick(struct tick_sched *ts, ktime_t now)
kernel/time/tick-sched.c
1353
__tick_nohz_full_update_tick(ts, now);
kernel/time/tick-sched.c
1355
tick_nohz_restart_sched_tick(ts, now);
kernel/time/tick-sched.c
1376
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1381
WARN_ON_ONCE(!tick_sched_flag_test(ts, TS_FLAG_INIDLE));
kernel/time/tick-sched.c
1382
WARN_ON_ONCE(ts->timer_expires_base);
kernel/time/tick-sched.c
1384
tick_sched_flag_clear(ts, TS_FLAG_INIDLE);
kernel/time/tick-sched.c
1385
tick_nohz_clock_wakeup(ts);
kernel/time/tick-sched.c
1387
if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
1390
tick_nohz_idle_update_tick(ts, now);
kernel/time/tick-sched.c
1404
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1409
if (likely(tick_nohz_handler(&ts->sched_timer) == HRTIMER_RESTART))
kernel/time/tick-sched.c
1410
tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1);
kernel/time/tick-sched.c
1413
static inline void tick_nohz_activate(struct tick_sched *ts)
kernel/time/tick-sched.c
1417
tick_sched_flag_set(ts, TS_FLAG_NOHZ);
kernel/time/tick-sched.c
1443
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1446
tick_nohz_clock_wakeup(ts);
kernel/time/tick-sched.c
1448
if (!tick_sched_flag_test(ts, TS_FLAG_STOPPED))
kernel/time/tick-sched.c
1468
static inline void tick_nohz_activate(struct tick_sched *ts) { }
kernel/time/tick-sched.c
1497
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1500
hrtimer_setup(&ts->sched_timer, tick_nohz_handler, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
kernel/time/tick-sched.c
1503
tick_sched_flag_set(ts, TS_FLAG_HIGHRES);
kernel/time/tick-sched.c
1506
hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update());
kernel/time/tick-sched.c
1513
hrtimer_add_expires_ns(&ts->sched_timer, offset);
kernel/time/tick-sched.c
1516
hrtimer_forward_now(&ts->sched_timer, TICK_NSEC);
kernel/time/tick-sched.c
1518
hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS_PINNED_HARD);
kernel/time/tick-sched.c
1520
tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1);
kernel/time/tick-sched.c
1521
tick_nohz_activate(ts);
kernel/time/tick-sched.c
1530
struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
kernel/time/tick-sched.c
1534
if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES))
kernel/time/tick-sched.c
1535
hrtimer_cancel(&ts->sched_timer);
kernel/time/tick-sched.c
1537
idle_calls = ts->idle_calls;
kernel/time/tick-sched.c
1538
idle_sleeps = ts->idle_sleeps;
kernel/time/tick-sched.c
1539
memset(ts, 0, sizeof(*ts));
kernel/time/tick-sched.c
1540
ts->idle_calls = idle_calls;
kernel/time/tick-sched.c
1541
ts->idle_sleeps = idle_sleeps;
kernel/time/tick-sched.c
1560
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1562
set_bit(0, &ts->check_clocks);
kernel/time/tick-sched.c
1575
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
1577
if (!test_and_clear_bit(0, &ts->check_clocks))
kernel/time/tick-sched.c
1580
if (tick_sched_flag_test(ts, TS_FLAG_NOHZ))
kernel/time/tick-sched.c
184
static inline int tick_sched_flag_test(struct tick_sched *ts,
kernel/time/tick-sched.c
187
return !!(ts->flags & flag);
kernel/time/tick-sched.c
190
static inline void tick_sched_flag_set(struct tick_sched *ts,
kernel/time/tick-sched.c
194
ts->flags |= flag;
kernel/time/tick-sched.c
197
static inline void tick_sched_flag_clear(struct tick_sched *ts,
kernel/time/tick-sched.c
201
ts->flags &= ~flag;
kernel/time/tick-sched.c
210
static bool tick_limited_update_jiffies64(struct tick_sched *ts, ktime_t now)
kernel/time/tick-sched.c
219
if (ts->last_tick_jiffies == jiffies)
kernel/time/tick-sched.c
227
static void tick_sched_do_timer(struct tick_sched *ts, ktime_t now)
kernel/time/tick-sched.c
259
if (ts->last_tick_jiffies != jiffies) {
kernel/time/tick-sched.c
260
ts->stalled_jiffies = 0;
kernel/time/tick-sched.c
261
ts->last_tick_jiffies = READ_ONCE(jiffies);
kernel/time/tick-sched.c
263
if (++ts->stalled_jiffies >= MAX_STALLED_JIFFIES) {
kernel/time/tick-sched.c
264
if (tick_limited_update_jiffies64(ts, now)) {
kernel/time/tick-sched.c
265
ts->stalled_jiffies = 0;
kernel/time/tick-sched.c
266
ts->last_tick_jiffies = READ_ONCE(jiffies);
kernel/time/tick-sched.c
271
if (tick_sched_flag_test(ts, TS_FLAG_INIDLE))
kernel/time/tick-sched.c
272
ts->got_idle_tick = 1;
kernel/time/tick-sched.c
275
static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
kernel/time/tick-sched.c
286
tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
293
ts->next_tick = 0;
kernel/time/tick-sched.c
306
struct tick_sched *ts = container_of(timer, struct tick_sched, sched_timer);
kernel/time/tick-sched.c
310
tick_sched_do_timer(ts, now);
kernel/time/tick-sched.c
317
tick_sched_handle(ts, regs);
kernel/time/tick-sched.c
319
ts->next_tick = 0;
kernel/time/tick-sched.c
326
if (unlikely(tick_sched_flag_test(ts, TS_FLAG_STOPPED)))
kernel/time/tick-sched.c
381
static bool can_stop_full_tick(int cpu, struct tick_sched *ts)
kernel/time/tick-sched.c
391
if (check_tick_dependency(&ts->tick_dep_mask))
kernel/time/tick-sched.c
531
struct tick_sched *ts;
kernel/time/tick-sched.c
533
ts = per_cpu_ptr(&tick_cpu_sched, cpu);
kernel/time/tick-sched.c
535
prev = atomic_fetch_or(BIT(bit), &ts->tick_dep_mask);
kernel/time/tick-sched.c
553
struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu);
kernel/time/tick-sched.c
555
atomic_andnot(BIT(bit), &ts->tick_dep_mask);
kernel/time/tick-sched.c
608
struct tick_sched *ts;
kernel/time/tick-sched.c
613
ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
615
if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
716
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
kernel/time/tick-sched.c
718
return tick_sched_flag_test(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
723
struct tick_sched *ts = per_cpu_ptr(&tick_cpu_sched, cpu);
kernel/time/tick-sched.c
725
return tick_sched_flag_test(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
766
static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
kernel/time/tick-sched.c
768
ktime_t expires = ts->last_tick;
kernel/time/tick-sched.c
773
if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES)) {
kernel/time/tick-sched.c
774
hrtimer_start(&ts->sched_timer, expires, HRTIMER_MODE_ABS_PINNED_HARD);
kernel/time/tick-sched.c
776
hrtimer_set_expires(&ts->sched_timer, expires);
kernel/time/tick-sched.c
784
ts->next_tick = 0;
kernel/time/tick-sched.c
820
static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
kernel/time/tick-sched.c
827
ts->last_jiffies = basejiff;
kernel/time/tick-sched.c
828
ts->timer_expires_base = basemono;
kernel/time/tick-sched.c
852
ts->next_timer = next_tick;
kernel/time/tick-sched.c
869
if (!tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
870
ts->timer_expires = 0;
kernel/time/tick-sched.c
883
(tick_cpu != TICK_DO_TIMER_NONE || !tick_sched_flag_test(ts, TS_FLAG_DO_TIMER_LAST)))
kernel/time/tick-sched.c
892
ts->timer_expires = min_t(u64, expires, next_tick);
kernel/time/tick-sched.c
895
return ts->timer_expires;
kernel/time/tick-sched.c
898
static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
kernel/time/tick-sched.c
901
unsigned long basejiff = ts->last_jiffies;
kernel/time/tick-sched.c
902
u64 basemono = ts->timer_expires_base;
kernel/time/tick-sched.c
903
bool timer_idle = tick_sched_flag_test(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
908
ts->timer_expires_base = 0;
kernel/time/tick-sched.c
915
if (expires > ts->timer_expires) {
kernel/time/tick-sched.c
927
expires = ts->timer_expires;
kernel/time/tick-sched.c
945
tick_sched_flag_set(ts, TS_FLAG_DO_TIMER_LAST);
kernel/time/tick-sched.c
947
tick_sched_flag_clear(ts, TS_FLAG_DO_TIMER_LAST);
kernel/time/tick-sched.c
951
if (tick_sched_flag_test(ts, TS_FLAG_STOPPED) && (expires == ts->next_tick)) {
kernel/time/tick-sched.c
953
if (expires == KTIME_MAX || ts->next_tick == hrtimer_get_expires(&ts->sched_timer))
kernel/time/tick-sched.c
957
"timer->active: %d timer->expires: %llu\n", basemono, ts->next_tick,
kernel/time/tick-sched.c
958
dev->next_event, hrtimer_active(&ts->sched_timer),
kernel/time/tick-sched.c
959
hrtimer_get_expires(&ts->sched_timer));
kernel/time/tick-sched.c
969
if (!tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
kernel/time/tick-sched.c
973
ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
kernel/time/tick-sched.c
974
tick_sched_flag_set(ts, TS_FLAG_STOPPED);
kernel/time/tick-sched.c
978
ts->next_tick = expires;
kernel/time/tick-sched.c
985
if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES))
kernel/time/tick-sched.c
986
hrtimer_cancel(&ts->sched_timer);
kernel/time/tick-sched.c
992
if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES)) {
kernel/time/tick-sched.c
993
hrtimer_start(&ts->sched_timer, expires,
kernel/time/tick-sched.c
996
hrtimer_set_expires(&ts->sched_timer, expires);
kernel/time/time.c
144
struct timespec64 ts;
kernel/time/time.c
146
ktime_get_real_ts64(&ts);
kernel/time/time.c
147
if (put_user(ts.tv_sec, &tv->tv_sec) ||
kernel/time/time.c
148
put_user(ts.tv_nsec / 1000, &tv->tv_usec))
kernel/time/time.c
228
struct timespec64 ts;
kernel/time/time.c
230
ktime_get_real_ts64(&ts);
kernel/time/time.c
231
if (put_user(ts.tv_sec, &tv->tv_sec) ||
kernel/time/time.c
232
put_user(ts.tv_nsec / 1000, &tv->tv_usec))
kernel/time/time.c
467
struct timespec64 ts = ns_to_timespec64(nsec);
kernel/time/time.c
470
tv.tv_sec = ts.tv_sec;
kernel/time/time.c
471
tv.tv_usec = (suseconds_t)ts.tv_nsec / 1000;
kernel/time/time.c
490
void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec)
kernel/time/time.c
507
ts->tv_sec = sec;
kernel/time/time.c
508
ts->tv_nsec = nsec;
kernel/time/time.c
520
struct timespec64 ts = { 0, 0 };
kernel/time/time.c
524
ts.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
kernel/time/time.c
525
ts.tv_nsec = rem;
kernel/time/time.c
532
ts.tv_sec = -div_u64_rem(-nsec - 1, NSEC_PER_SEC, &rem) - 1;
kernel/time/time.c
533
ts.tv_nsec = NSEC_PER_SEC - rem - 1;
kernel/time/time.c
536
return ts;
kernel/time/time.c
867
int get_timespec64(struct timespec64 *ts,
kernel/time/time.c
877
ts->tv_sec = kts.tv_sec;
kernel/time/time.c
884
ts->tv_nsec = kts.tv_nsec;
kernel/time/time.c
898
int put_timespec64(const struct timespec64 *ts,
kernel/time/time.c
902
.tv_sec = ts->tv_sec,
kernel/time/time.c
903
.tv_nsec = ts->tv_nsec
kernel/time/time.c
913
struct old_timespec32 ts;
kernel/time/time.c
916
ret = copy_from_user(&ts, cts, sizeof(ts));
kernel/time/time.c
920
ts64->tv_sec = ts.tv_sec;
kernel/time/time.c
921
ts64->tv_nsec = ts.tv_nsec;
kernel/time/time.c
929
struct old_timespec32 ts = {
kernel/time/time.c
933
return copy_to_user(cts, &ts, sizeof(ts)) ? -EFAULT : 0;
kernel/time/time.c
945
int get_old_timespec32(struct timespec64 *ts, const void __user *uts)
kernel/time/time.c
948
return copy_from_user(ts, uts, sizeof(*ts)) ? -EFAULT : 0;
kernel/time/time.c
950
return __get_old_timespec32(ts, uts);
kernel/time/time.c
964
int put_old_timespec32(const struct timespec64 *ts, void __user *uts)
kernel/time/time.c
967
return copy_to_user(uts, ts, sizeof(*ts)) ? -EFAULT : 0;
kernel/time/time.c
969
return __put_old_timespec32(ts, uts);
kernel/time/timekeeping.c
1104
void ktime_get_ts64(struct timespec64 *ts)
kernel/time/timekeeping.c
1115
ts->tv_sec = tk->xtime_sec;
kernel/time/timekeeping.c
1121
ts->tv_sec += tomono.tv_sec;
kernel/time/timekeeping.c
1122
ts->tv_nsec = 0;
kernel/time/timekeeping.c
1123
timespec64_add_ns(ts, nsec + tomono.tv_nsec);
kernel/time/timekeeping.c
1331
struct system_device_crosststamp *ts)
kernel/time/timekeeping.c
1351
corr_raw = (u64)ktime_to_ns(ktime_sub(ts->sys_monoraw, history->monoraw));
kernel/time/timekeeping.c
1368
corr_sys = (u64)ktime_to_ns(ktime_sub(ts->sys_systime, history->systime));
kernel/time/timekeeping.c
1377
ts->sys_monoraw = ktime_add_ns(history->monoraw, corr_raw);
kernel/time/timekeeping.c
1378
ts->sys_systime = ktime_add_ns(history->systime, corr_sys);
kernel/time/timekeeping.c
1380
ts->sys_monoraw = ktime_sub_ns(ts->sys_monoraw, corr_raw);
kernel/time/timekeeping.c
1381
ts->sys_systime = ktime_sub_ns(ts->sys_systime, corr_sys);
kernel/time/timekeeping.c
1392
static bool timestamp_in_interval(u64 start, u64 end, u64 ts)
kernel/time/timekeeping.c
1394
if (ts >= start && ts <= end)
kernel/time/timekeeping.c
1396
if (start > end && (ts >= start || ts <= end))
kernel/time/timekeeping.c
1658
int do_settimeofday64(const struct timespec64 *ts)
kernel/time/timekeeping.c
1662
if (!timespec64_valid_settod(ts))
kernel/time/timekeeping.c
1671
ts_delta = timespec64_sub(*ts, xt);
kernel/time/timekeeping.c
1679
tk_set_xtime(tks, ts);
kernel/time/timekeeping.c
1687
add_device_randomness(ts, sizeof(*ts));
kernel/time/timekeeping.c
1704
static int __timekeeping_inject_offset(struct tk_data *tkd, const struct timespec64 *ts)
kernel/time/timekeeping.c
1709
if (ts->tv_nsec < 0 || ts->tv_nsec >= NSEC_PER_SEC)
kernel/time/timekeeping.c
1716
tmp = timespec64_add(tk_xtime(tks), *ts);
kernel/time/timekeeping.c
1717
if (timespec64_compare(&tks->wall_to_monotonic, ts) > 0 ||
kernel/time/timekeeping.c
1723
tk_xtime_add(tks, ts);
kernel/time/timekeeping.c
1724
tk_set_wall_to_mono(tks, timespec64_sub(tks->wall_to_monotonic, *ts));
kernel/time/timekeeping.c
1732
offs = ktime_add(tks->offs_aux, timespec64_to_ktime(*ts));
kernel/time/timekeeping.c
1746
static int timekeeping_inject_offset(const struct timespec64 *ts)
kernel/time/timekeeping.c
1751
ret = __timekeeping_inject_offset(&tk_core, ts);
kernel/time/timekeeping.c
1881
void ktime_get_raw_ts64(struct timespec64 *ts)
kernel/time/timekeeping.c
1889
ts->tv_sec = tk->raw_sec;
kernel/time/timekeeping.c
1894
ts->tv_nsec = 0;
kernel/time/timekeeping.c
1895
timespec64_add_ns(ts, nsecs);
kernel/time/timekeeping.c
1907
void ktime_get_clock_ts64(clockid_t id, struct timespec64 *ts)
kernel/time/timekeeping.c
1910
ts->tv_sec = -1;
kernel/time/timekeeping.c
1911
ts->tv_nsec = 0;
kernel/time/timekeeping.c
1915
ktime_get_real_ts64(ts);
kernel/time/timekeeping.c
1918
ktime_get_ts64(ts);
kernel/time/timekeeping.c
1921
ktime_get_raw_ts64(ts);
kernel/time/timekeeping.c
1925
ktime_get_aux_ts64(id, ts);
kernel/time/timekeeping.c
1981
void __weak read_persistent_clock64(struct timespec64 *ts)
kernel/time/timekeeping.c
1983
ts->tv_sec = 0;
kernel/time/timekeeping.c
1984
ts->tv_nsec = 0;
kernel/time/timekeeping.c
205
struct timespec64 ts;
kernel/time/timekeeping.c
207
ts.tv_sec = tk->xtime_sec;
kernel/time/timekeeping.c
208
ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift);
kernel/time/timekeeping.c
209
return ts;
kernel/time/timekeeping.c
214
struct timespec64 ts;
kernel/time/timekeeping.c
216
ts.tv_sec = tk->xtime_sec;
kernel/time/timekeeping.c
217
ts.tv_nsec = tk->coarse_nsec;
kernel/time/timekeeping.c
218
return ts;
kernel/time/timekeeping.c
235
static void tk_set_xtime(struct timekeeper *tk, const struct timespec64 *ts)
kernel/time/timekeeping.c
237
tk->xtime_sec = ts->tv_sec;
kernel/time/timekeeping.c
238
tk->tkr_mono.xtime_nsec = (u64)ts->tv_nsec << tk->tkr_mono.shift;
kernel/time/timekeeping.c
242
static void tk_xtime_add(struct timekeeper *tk, const struct timespec64 *ts)
kernel/time/timekeeping.c
244
tk->xtime_sec += ts->tv_sec;
kernel/time/timekeeping.c
245
tk->tkr_mono.xtime_nsec += (u64)ts->tv_nsec << tk->tkr_mono.shift;
kernel/time/timekeeping.c
2494
struct timespec64 ts;
kernel/time/timekeeping.c
2498
ts.tv_sec = leap;
kernel/time/timekeeping.c
2499
ts.tv_nsec = 0;
kernel/time/timekeeping.c
2501
timespec64_sub(tk->wall_to_monotonic, ts));
kernel/time/timekeeping.c
2648
void getboottime64(struct timespec64 *ts)
kernel/time/timekeeping.c
2653
*ts = ktime_to_timespec64(t);
kernel/time/timekeeping.c
2657
void ktime_get_coarse_real_ts64(struct timespec64 *ts)
kernel/time/timekeeping.c
2665
*ts = tk_xtime_coarse(tk);
kernel/time/timekeeping.c
2679
void ktime_get_coarse_real_ts64_mg(struct timespec64 *ts)
kernel/time/timekeeping.c
2688
*ts = tk_xtime_coarse(tk);
kernel/time/timekeeping.c
2692
coarse = timespec64_to_ktime(*ts);
kernel/time/timekeeping.c
2695
*ts = ktime_to_timespec64(f_real);
kernel/time/timekeeping.c
2717
void ktime_get_real_ts64_mg(struct timespec64 *ts)
kernel/time/timekeeping.c
2728
ts->tv_sec = tk->xtime_sec;
kernel/time/timekeeping.c
2744
ts->tv_nsec = 0;
kernel/time/timekeeping.c
2745
timespec64_add_ns(ts, nsecs);
kernel/time/timekeeping.c
2754
*ts = ktime_to_timespec64(ktime_add(old, offset));
kernel/time/timekeeping.c
2758
void ktime_get_coarse_ts64(struct timespec64 *ts)
kernel/time/timekeeping.c
2771
set_normalized_timespec64(ts, now.tv_sec + mono.tv_sec,
kernel/time/timekeeping.c
2936
struct timespec64 ts;
kernel/time/timekeeping.c
2947
ktime_get_real_ts64(&ts);
kernel/time/timekeeping.c
2949
tk_get_aux_ts64(tkd->timekeeper.id, &ts);
kernel/time/timekeeping.c
2951
add_device_randomness(&ts, sizeof(ts));
kernel/time/timekeeping.c
2970
ret = ntp_adjtimex(tks->id, txc, &ts, &tai, &result->ad);
kernel/time/timekeeping.c
3136
bool ktime_get_aux_ts64(clockid_t id, struct timespec64 *ts)
kernel/time/timekeeping.c
3142
*ts = ktime_to_timespec64(now);
kernel/time/timekeeping.c
61
static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts)
kernel/time/timekeeping.c
63
return ktime_get_aux_ts64(CLOCK_AUX + tkid - TIMEKEEPER_AUX_FIRST, ts);
kernel/time/timekeeping.c
72
static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts)
kernel/time/timekeeping.c
940
void ktime_get_real_ts64(struct timespec64 *ts)
kernel/time/timekeeping.c
951
ts->tv_sec = tk->xtime_sec;
kernel/time/timekeeping.c
956
ts->tv_nsec = 0;
kernel/time/timekeeping.c
957
timespec64_add_ns(ts, nsecs);
kernel/time/timer_list.c
142
(unsigned long long)(ts->x))
kernel/time/timer_list.c
145
(unsigned long long)(ktime_to_ns(ts->x)))
kernel/time/timer_list.c
147
SEQ_printf(m, " .%-15s: %d\n", #x, !!(ts->flags & (f)))
kernel/time/timer_list.c
150
struct tick_sched *ts = tick_get_tick_sched(cpu);
kernel/trace/blktrace.c
1497
unsigned long long ts = iter->ts;
kernel/trace/blktrace.c
1498
unsigned long nsec_rem = do_div(ts, NSEC_PER_SEC);
kernel/trace/blktrace.c
1499
unsigned secs = (unsigned long)ts;
kernel/trace/blktrace.c
1776
.time = iter->ts,
kernel/trace/ring_buffer.c
1123
u64 ts;
kernel/trace/ring_buffer.c
1127
ts = trace_clock_local();
kernel/trace/ring_buffer.c
1129
ts = buffer->clock();
kernel/trace/ring_buffer.c
1132
return ts << DEBUG_SHIFT;
kernel/trace/ring_buffer.c
1148
int cpu, u64 *ts)
kernel/trace/ring_buffer.c
1151
*ts >>= DEBUG_SHIFT;
kernel/trace/ring_buffer.c
1844
u64 ts, delta;
kernel/trace/ring_buffer.c
1852
ts = dpage->time_stamp;
kernel/trace/ring_buffer.c
1865
ts += delta;
kernel/trace/ring_buffer.c
1870
delta = rb_fix_abs_ts(delta, ts);
kernel/trace/ring_buffer.c
1871
if (delta < ts) {
kernel/trace/ring_buffer.c
1873
*timestamp = ts;
kernel/trace/ring_buffer.c
1876
ts = delta;
kernel/trace/ring_buffer.c
1885
ts += event->time_delta;
kernel/trace/ring_buffer.c
1892
*timestamp = ts;
kernel/trace/ring_buffer.c
1900
u64 ts;
kernel/trace/ring_buffer.c
1908
unsigned long long ts;
kernel/trace/ring_buffer.c
1921
ret = rb_read_data_buffer(dpage, tail, cpu, &ts, &delta);
kernel/trace/ring_buffer.c
1931
if (ret < 0 || (prev_ts && prev_ts > ts) || (next_ts && ts > next_ts)) {
kernel/trace/ring_buffer.c
1982
state->ts = bpage->page->time_stamp;
kernel/trace/ring_buffer.c
2053
state.ts = 0;
kernel/trace/ring_buffer.c
2055
state.ts = head_page->page->time_stamp;
kernel/trace/ring_buffer.c
2059
rb_validate_buffer(orig_reader, cpu_buffer, meta, &state, 0, state.ts);
kernel/trace/ring_buffer.c
2086
rb_validate_buffer(head_page, cpu_buffer, meta, &state, 0, state.ts);
kernel/trace/ring_buffer.c
2112
state.ts = head_page->page->time_stamp;
kernel/trace/ring_buffer.c
2121
rb_validate_buffer(head_page, cpu_buffer, meta, &state, state.ts, 0);
kernel/trace/ring_buffer.c
312
u64 ts;
kernel/trace/ring_buffer.c
314
ts = event->array[0];
kernel/trace/ring_buffer.c
315
ts <<= TS_SHIFT;
kernel/trace/ring_buffer.c
316
ts += event->time_delta;
kernel/trace/ring_buffer.c
318
return ts;
kernel/trace/ring_buffer.c
3968
(unsigned long long)info->ts,
kernel/trace/ring_buffer.c
3993
if (abs && (info->ts & TS_MSB)) {
kernel/trace/ring_buffer.c
3997
} else if (info->before == info->after && info->before > info->ts) {
kernel/trace/ring_buffer.c
4008
info->before, info->ts);
kernel/trace/ring_buffer.c
4041
cpu_buffer->event_stamp[nest] = info->ts;
kernel/trace/ring_buffer.c
451
u64 ts;
kernel/trace/ring_buffer.c
4584
u64 ts, delta;
kernel/trace/ring_buffer.c
4587
ts = dpage->time_stamp;
kernel/trace/ring_buffer.c
4588
pr_warn(" [%lld] PAGE TIME STAMP\n", ts);
kernel/trace/ring_buffer.c
4598
ts += delta;
kernel/trace/ring_buffer.c
4600
e, ts, delta);
kernel/trace/ring_buffer.c
4605
ts = rb_fix_abs_ts(delta, ts);
kernel/trace/ring_buffer.c
4607
e, ts, delta);
kernel/trace/ring_buffer.c
4611
ts += event->time_delta;
kernel/trace/ring_buffer.c
4613
e, ts, event->time_delta);
kernel/trace/ring_buffer.c
4617
ts += event->time_delta;
kernel/trace/ring_buffer.c
4619
e, ts, event->time_delta,
kernel/trace/ring_buffer.c
4659
u64 ts, delta;
kernel/trace/ring_buffer.c
4687
ret = rb_read_data_buffer(dpage, tail, cpu_buffer->cpu, &ts, &delta);
kernel/trace/ring_buffer.c
4689
if (delta < ts) {
kernel/trace/ring_buffer.c
4691
cpu_buffer->cpu, ts, delta,
kernel/trace/ring_buffer.c
4696
if ((full && ts > info->ts) ||
kernel/trace/ring_buffer.c
4697
(!full && ts + info->delta != info->ts)) {
kernel/trace/ring_buffer.c
4700
ts + info->delta, info->ts, info->delta,
kernel/trace/ring_buffer.c
4732
info->ts = rb_time_stamp(cpu_buffer->buffer);
kernel/trace/ring_buffer.c
4735
info->delta = info->ts;
kernel/trace/ring_buffer.c
4749
info->delta = info->ts - info->after;
kernel/trace/ring_buffer.c
4757
/*B*/ rb_time_set(&cpu_buffer->before_stamp, info->ts);
kernel/trace/ring_buffer.c
4774
/*D*/ rb_time_set(&cpu_buffer->write_stamp, info->ts);
kernel/trace/ring_buffer.c
4784
info->delta = info->ts - info->after;
kernel/trace/ring_buffer.c
4787
info->delta = info->ts;
kernel/trace/ring_buffer.c
4790
u64 ts;
kernel/trace/ring_buffer.c
4802
ts = rb_time_stamp(cpu_buffer->buffer);
kernel/trace/ring_buffer.c
4803
rb_time_set(&cpu_buffer->before_stamp, ts);
kernel/trace/ring_buffer.c
4809
info->after == info->before && info->after < ts) {
kernel/trace/ring_buffer.c
4815
info->delta = ts - info->after;
kernel/trace/ring_buffer.c
4827
info->ts = ts;
kernel/trace/ring_buffer.c
4851
tail_page->page->time_stamp = info->ts;
kernel/trace/ring_buffer.c
6043
rb_buffer_peek(struct ring_buffer_per_cpu *cpu_buffer, u64 *ts,
kernel/trace/ring_buffer.c
6050
if (ts)
kernel/trace/ring_buffer.c
6051
*ts = 0;
kernel/trace/ring_buffer.c
6088
if (ts) {
kernel/trace/ring_buffer.c
6089
*ts = rb_event_time_stamp(event);
kernel/trace/ring_buffer.c
6090
*ts = rb_fix_abs_ts(*ts, reader->page->time_stamp);
kernel/trace/ring_buffer.c
6092
cpu_buffer->cpu, ts);
kernel/trace/ring_buffer.c
6099
if (ts && !(*ts)) {
kernel/trace/ring_buffer.c
6100
*ts = cpu_buffer->read_stamp + event->time_delta;
kernel/trace/ring_buffer.c
6102
cpu_buffer->cpu, ts);
kernel/trace/ring_buffer.c
6117
rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
kernel/trace/ring_buffer.c
6125
if (ts)
kernel/trace/ring_buffer.c
6126
*ts = 0;
kernel/trace/ring_buffer.c
6183
if (ts) {
kernel/trace/ring_buffer.c
6184
*ts = rb_event_time_stamp(event);
kernel/trace/ring_buffer.c
6185
*ts = rb_fix_abs_ts(*ts, iter->head_page->page->time_stamp);
kernel/trace/ring_buffer.c
6187
cpu_buffer->cpu, ts);
kernel/trace/ring_buffer.c
6194
if (ts && !(*ts)) {
kernel/trace/ring_buffer.c
6195
*ts = iter->read_stamp + event->time_delta;
kernel/trace/ring_buffer.c
6197
cpu_buffer->cpu, ts);
kernel/trace/ring_buffer.c
6251
ring_buffer_peek(struct trace_buffer *buffer, int cpu, u64 *ts,
kernel/trace/ring_buffer.c
6265
event = rb_buffer_peek(cpu_buffer, ts, lost_events);
kernel/trace/ring_buffer.c
6297
ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
kernel/trace/ring_buffer.c
6305
event = rb_iter_peek(iter, ts);
kernel/trace/ring_buffer.c
6326
ring_buffer_consume(struct trace_buffer *buffer, int cpu, u64 *ts,
kernel/trace/ring_buffer.c
6345
event = rb_buffer_peek(cpu_buffer, ts, lost_events);
kernel/trace/ring_buffer.c
733
u64 ts;
kernel/trace/ring_buffer.c
737
ts = rb_event_time_stamp(event);
kernel/trace/ring_buffer.c
738
return rb_fix_abs_ts(ts, cpu_buffer->tail_page->page->time_stamp);
kernel/trace/ring_buffer.c
754
rb_time_read(&cpu_buffer->write_stamp, &ts);
kernel/trace/ring_buffer.c
756
return ts;
kernel/trace/ring_buffer_benchmark.c
16
u64 ts;
kernel/trace/ring_buffer_benchmark.c
89
u64 ts;
kernel/trace/ring_buffer_benchmark.c
91
event = ring_buffer_consume(buffer, cpu, &ts, NULL);
kernel/trace/trace.c
2342
peek_next_entry(struct trace_iterator *iter, int cpu, u64 *ts,
kernel/trace/trace.c
2349
event = ring_buffer_iter_peek(buf_iter, ts);
kernel/trace/trace.c
2354
event = ring_buffer_peek(iter->array_buffer->buffer, cpu, ts,
kernel/trace/trace.c
2374
u64 next_ts = 0, ts;
kernel/trace/trace.c
2398
ent = peek_next_entry(iter, cpu, &ts, &lost_events);
kernel/trace/trace.c
2403
if (ent && (!next || ts < next_ts)) {
kernel/trace/trace.c
2406
next_ts = ts;
kernel/trace/trace.c
2673
&iter->lost_events, &iter->ts);
kernel/trace/trace.c
2687
ring_buffer_consume(iter->array_buffer->buffer, iter->cpu, &iter->ts,
kernel/trace/trace.c
2722
u64 ts;
kernel/trace/trace.c
2737
while (ring_buffer_iter_peek(buf_iter, &ts)) {
kernel/trace/trace.c
2738
if (ts >= iter->array_buffer->time_start)
kernel/trace/trace.c
3090
entry->pid, iter->cpu, iter->ts);
kernel/trace/trace.c
3117
SEQ_PUT_HEX_FIELD(s, iter->ts);
kernel/trace/trace.c
3146
SEQ_PUT_FIELD(s, iter->ts);
kernel/trace/trace.c
6765
u64 ts;
kernel/trace/trace.c
688
u64 ts;
kernel/trace/trace.c
6901
err->info.ts = local_clock();
kernel/trace/trace.c
694
ts = ring_buffer_time_stamp(buf->buffer);
kernel/trace/trace.c
695
ring_buffer_normalize_time_stamp(buf->buffer, cpu, &ts);
kernel/trace/trace.c
6958
u64 sec = err->info.ts;
kernel/trace/trace.c
697
return ts;
kernel/trace/trace_events_hist.c
878
u64 ts = ring_buffer_event_time_stamp(buffer, rbe);
kernel/trace/trace_events_hist.c
881
ts = ns2usecs(ts);
kernel/trace/trace_events_hist.c
883
return ts;
kernel/trace/trace_functions_graph.c
1101
print_graph_abs_time(iter->ts, s);
kernel/trace/trace_functions_graph.c
725
usecs = iter->ts - iter->array_buffer->time_start;
kernel/trace/trace_functions_graph.c
748
print_graph_abs_time(iter->ts, s);
kernel/trace/trace_mmiotrace.c
171
unsigned long long t = ns2usecs(iter->ts);
kernel/trace/trace_mmiotrace.c
216
unsigned long long t = ns2usecs(iter->ts);
kernel/trace/trace_mmiotrace.c
250
unsigned long long t = ns2usecs(iter->ts);
kernel/trace/trace_output.c
1889
iter->ts - FUNC_REPEATS_GET_DELTA_TS(field));
kernel/trace/trace_output.c
602
unsigned long long abs_ts = iter->ts - iter->array_buffer->time_start;
kernel/trace/trace_output.c
603
unsigned long long rel_ts = next_ts - iter->ts;
kernel/trace/trace_output.c
619
ns2usecs(iter->ts),
kernel/trace/trace_output.c
626
iter->ts, abs_ts, rel_ts);
kernel/trace/trace_output.c
642
unsigned long long ts)
kernel/trace/trace_output.c
648
t = ns2usecs(ts);
kernel/trace/trace_output.c
653
trace_seq_printf(s, " %12llu", ts);
kernel/trace/trace_output.c
681
trace_print_time(s, iter, iter->ts);
kernel/trace/trace_output.c
697
next_ts = iter->ts;
kernel/trace/trace_remote.c
31
u64 ts;
kernel/trace/trace_remote.c
482
__peek_event(struct trace_remote_iterator *iter, int cpu, u64 *ts, unsigned long *lost_events)
kernel/trace/trace_remote.c
489
return ring_buffer_peek(iter->remote->trace_buffer, cpu, ts, lost_events);
kernel/trace/trace_remote.c
495
rb_evt = ring_buffer_iter_peek(rb_iter, ts);
kernel/trace/trace_remote.c
517
rb_evt = __peek_event(iter, cpu, &iter->ts, &iter->lost_events);
kernel/trace/trace_remote.c
526
iter->ts = U64_MAX;
kernel/trace/trace_remote.c
529
u64 ts;
kernel/trace/trace_remote.c
534
rb_evt = __peek_event(iter, cpu, &ts, &lost_events);
kernel/trace/trace_remote.c
538
if (ts >= iter->ts)
kernel/trace/trace_remote.c
541
iter->ts = ts;
kernel/trace/trace_remote.c
547
return iter->ts != U64_MAX;
kernel/trace/trace_remote.c
570
u64 ts = iter->ts;
kernel/trace/trace_remote.c
576
do_div(ts, 1000);
kernel/trace/trace_remote.c
577
usecs_rem = do_div(ts, USEC_PER_SEC);
kernel/trace/trace_remote.c
580
ts, usecs_rem);
kernel/trace/trace_stat.c
125
struct tracer_stat *ts = session->ts;
kernel/trace/trace_stat.c
134
if (!ts->stat_cmp)
kernel/trace/trace_stat.c
135
ts->stat_cmp = dummy_cmp;
kernel/trace/trace_stat.c
137
stat = ts->stat_start(ts);
kernel/trace/trace_stat.c
141
ret = insert_stat(root, stat, ts->stat_cmp);
kernel/trace/trace_stat.c
149
stat = ts->stat_next(stat, i);
kernel/trace/trace_stat.c
155
ret = insert_stat(root, stat, ts->stat_cmp);
kernel/trace/trace_stat.c
179
if (session->ts->stat_headers) {
kernel/trace/trace_stat.c
217
return session->ts->stat_headers(s);
kernel/trace/trace_stat.c
219
return session->ts->stat_show(s, l->stat);
kernel/trace/trace_stat.c
297
session->file = tracefs_create_file(session->ts->name, TRACE_MODE_WRITE,
kernel/trace/trace_stat.c
320
if (node->ts == trace)
kernel/trace/trace_stat.c
329
session->ts = trace;
kernel/trace/trace_stat.c
34
struct tracer_stat *ts;
kernel/trace/trace_stat.c
351
if (node->ts == trace) {
kernel/trace/trace_stat.c
52
if (session->ts->stat_release)
kernel/trace/trace_stat.c
53
session->ts->stat_release(snode->stat);
kernel/workqueue.c
7785
unsigned long pool_ts, touched, ts;
kernel/workqueue.c
7805
ts = pool_ts;
kernel/workqueue.c
7807
ts = touched;
kernel/workqueue.c
7821
if (time_after(now, ts + thresh)) {
kernel/workqueue.c
7825
ts = pool_ts;
kernel/workqueue.c
7827
ts = touched;
kernel/workqueue.c
7829
if (!time_after(now, ts + thresh))
lib/math/test_div64.c
303
struct timespec64 ts, ts0, ts1;
lib/math/test_div64.c
314
ts = timespec64_sub(ts1, ts0);
lib/math/test_div64.c
316
"%llu.%09lus elapsed\n", ts.tv_sec, ts.tv_nsec);
lib/tests/printf_kunit.c
553
struct timespec64 ts = { .tv_sec = t, .tv_nsec = 11235813 };
lib/tests/printf_kunit.c
573
test("2019-01-04T15:32:23.011235813", "%ptS", &ts);
lib/tests/printf_kunit.c
574
test("1546615943.011235813", "%ptSp", &ts);
lib/vdso/gettimeofday.c
102
static __always_inline void vdso_set_timespec(struct __kernel_timespec *ts, u64 sec, u64 ns)
lib/vdso/gettimeofday.c
104
ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
lib/vdso/gettimeofday.c
105
ts->tv_nsec = ns;
lib/vdso/gettimeofday.c
136
clockid_t clk, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
161
vdso_set_timespec(ts, sec, ns);
lib/vdso/gettimeofday.c
168
clockid_t clk, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
179
return do_hres_timens(vd, vc, clk, ts);
lib/vdso/gettimeofday.c
185
vdso_set_timespec(ts, sec, ns);
lib/vdso/gettimeofday.c
192
clockid_t clk, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
214
vdso_set_timespec(ts, sec, nsec);
lib/vdso/gettimeofday.c
221
clockid_t clk, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
228
return do_coarse_timens(vd, vc, clk, ts);
lib/vdso/gettimeofday.c
230
ts->tv_sec = vdso_ts->sec;
lib/vdso/gettimeofday.c
231
ts->tv_nsec = vdso_ts->nsec;
lib/vdso/gettimeofday.c
238
bool do_aux(const struct vdso_time_data *vd, clockid_t clock, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
265
vdso_set_timespec(ts, sec, ns);
lib/vdso/gettimeofday.c
272
struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
288
return do_coarse(vd, &vc[CS_HRES_COARSE], clock, ts);
lib/vdso/gettimeofday.c
292
return do_aux(vd, clock, ts);
lib/vdso/gettimeofday.c
296
return do_hres(vd, vc, clock, ts);
lib/vdso/gettimeofday.c
301
struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
305
ok = __cvdso_clock_gettime_common(vd, clock, ts);
lib/vdso/gettimeofday.c
308
return clock_gettime_fallback(clock, ts);
lib/vdso/gettimeofday.c
313
__cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
lib/vdso/gettimeofday.c
315
return __cvdso_clock_gettime_data(__arch_get_vdso_u_time_data(), clock, ts);
lib/vdso/gettimeofday.c
323
struct __kernel_timespec ts;
lib/vdso/gettimeofday.c
326
ok = __cvdso_clock_gettime_common(vd, clock, &ts);
lib/vdso/gettimeofday.c
332
res->tv_sec = ts.tv_sec;
lib/vdso/gettimeofday.c
333
res->tv_nsec = ts.tv_nsec;
lib/vdso/gettimeofday.c
352
struct __kernel_timespec ts;
lib/vdso/gettimeofday.c
354
if (!do_hres(vd, &vc[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
lib/vdso/gettimeofday.c
357
tv->tv_sec = ts.tv_sec;
lib/vdso/gettimeofday.c
358
tv->tv_usec = (u32)ts.tv_nsec / NSEC_PER_USEC;
lib/vdso/gettimeofday.c
471
struct __kernel_timespec ts;
lib/vdso/gettimeofday.c
474
ok = __cvdso_clock_getres_common(vd, clock, &ts);
lib/vdso/gettimeofday.c
480
res->tv_sec = ts.tv_sec;
lib/vdso/gettimeofday.c
481
res->tv_nsec = ts.tv_nsec;
lib/vsprintf.c
1990
char *timespec64_str(char *buf, char *end, const struct timespec64 *ts,
lib/vsprintf.c
2001
buf = number(buf, end, ts->tv_sec, default_dec_spec);
lib/vsprintf.c
2003
buf = time64_str(buf, end, ts->tv_sec, spec, fmt);
lib/vsprintf.c
2008
return number(buf, end, ts->tv_nsec, default_dec09_spec);
net/9p/trans_fd.c
191
struct p9_trans_fd *ts = NULL;
net/9p/trans_fd.c
194
ts = client->trans;
net/9p/trans_fd.c
196
if (!ts) {
net/9p/trans_fd.c
202
ret = vfs_poll(ts->rd, pt);
net/9p/trans_fd.c
203
if (ts->rd != ts->wr)
net/9p/trans_fd.c
204
ret = (ret & ~EPOLLOUT) | (vfs_poll(ts->wr, pt) & ~EPOLLIN);
net/9p/trans_fd.c
219
struct p9_trans_fd *ts = NULL;
net/9p/trans_fd.c
223
ts = client->trans;
net/9p/trans_fd.c
225
if (!ts)
net/9p/trans_fd.c
228
if (!(ts->rd->f_flags & O_NONBLOCK))
net/9p/trans_fd.c
231
pos = ts->rd->f_pos;
net/9p/trans_fd.c
232
ret = kernel_read(ts->rd, v, len, &pos);
net/9p/trans_fd.c
387
struct p9_trans_fd *ts = NULL;
net/9p/trans_fd.c
390
ts = client->trans;
net/9p/trans_fd.c
392
if (!ts)
net/9p/trans_fd.c
395
if (!(ts->wr->f_flags & O_NONBLOCK))
net/9p/trans_fd.c
398
ret = kernel_write(ts->wr, v, len, &ts->wr->f_pos);
net/9p/trans_fd.c
552
struct p9_trans_fd *ts = client->trans;
net/9p/trans_fd.c
553
struct p9_conn *m = &ts->conn;
net/9p/trans_fd.c
634
struct p9_trans_fd *ts = client->trans;
net/9p/trans_fd.c
635
struct p9_conn *m = &ts->conn;
net/9p/trans_fd.c
659
struct p9_trans_fd *ts = client->trans;
net/9p/trans_fd.c
660
struct p9_conn *m = &ts->conn;
net/9p/trans_fd.c
680
struct p9_trans_fd *ts = client->trans;
net/9p/trans_fd.c
681
struct p9_conn *m = &ts->conn;
net/9p/trans_fd.c
722
struct p9_trans_fd *ts = kzalloc_obj(struct p9_trans_fd);
net/9p/trans_fd.c
723
if (!ts)
net/9p/trans_fd.c
726
ts->rd = fget(rfd);
net/9p/trans_fd.c
727
if (!ts->rd)
net/9p/trans_fd.c
729
if (!(ts->rd->f_mode & FMODE_READ))
net/9p/trans_fd.c
739
data_race(ts->rd->f_flags |= O_NONBLOCK);
net/9p/trans_fd.c
740
ts->wr = fget(wfd);
net/9p/trans_fd.c
741
if (!ts->wr)
net/9p/trans_fd.c
743
if (!(ts->wr->f_mode & FMODE_WRITE))
net/9p/trans_fd.c
745
data_race(ts->wr->f_flags |= O_NONBLOCK);
net/9p/trans_fd.c
747
client->trans = ts;
net/9p/trans_fd.c
753
fput(ts->wr);
net/9p/trans_fd.c
755
fput(ts->rd);
net/9p/trans_fd.c
757
kfree(ts);
net/9p/trans_fd.c
829
struct p9_trans_fd *ts;
net/9p/trans_fd.c
834
ts = client->trans;
net/9p/trans_fd.c
835
if (!ts)
net/9p/trans_fd.c
840
p9_conn_destroy(&ts->conn);
net/9p/trans_fd.c
842
if (ts->rd)
net/9p/trans_fd.c
843
fput(ts->rd);
net/9p/trans_fd.c
844
if (ts->wr)
net/9p/trans_fd.c
845
fput(ts->wr);
net/9p/trans_fd.c
847
kfree(ts);
net/bluetooth/iso.c
2622
__u16 pb, ts, len, sn;
net/bluetooth/iso.c
2647
ts = hci_iso_flags_ts(flags);
net/bluetooth/iso.c
2649
BT_DBG("conn %p len %d pb 0x%x ts 0x%x", conn, skb->len, pb, ts);
net/bluetooth/iso.c
2661
if (ts) {
net/bluetooth/iso.c
2672
hwts->hwtstamp = us_to_ktime(le32_to_cpu(hdr->ts));
net/bluetooth/iso.c
2727
if (ts) {
net/ceph/messenger.c
1860
struct timespec64 ts;
net/ceph/messenger.c
1862
jiffies_to_timespec64(interval, &ts);
net/ceph/messenger.c
1863
ts = timespec64_add(con->last_keepalive_ack, ts);
net/ceph/messenger.c
1864
return timespec64_compare(&now, &ts) >= 0;
net/ceph/messenger_v2.c
1535
struct ceph_timespec *ts = CTRL_BODY(con->v2.out_buf);
net/ceph/messenger_v2.c
1541
ceph_encode_timespec64(ts, &now);
net/compat.c
251
struct __kernel_old_timespec *ts = data;
net/compat.c
253
cts[i].tv_sec = ts[i].tv_sec;
net/compat.c
254
cts[i].tv_nsec = ts[i].tv_nsec;
net/core/lwt_bpf.c
382
struct lwtunnel_state **ts,
net/core/lwt_bpf.c
444
*ts = newts;
net/core/scm.c
320
for (i = 0; i < ARRAY_SIZE(tss.ts); i++) {
net/core/scm.c
321
struct timespec64 tv = ktime_to_timespec64(tss_internal->ts[i]);
net/core/scm.c
323
tss.ts[i].tv_sec = tv.tv_sec;
net/core/scm.c
324
tss.ts[i].tv_nsec = tv.tv_nsec;
net/core/scm.c
336
for (i = 0; i < ARRAY_SIZE(tss.ts); i++) {
net/core/scm.c
337
struct timespec64 tv = ktime_to_timespec64(tss_internal->ts[i]);
net/core/scm.c
339
tss.ts[i].tv_sec = tv.tv_sec;
net/core/scm.c
340
tss.ts[i].tv_nsec = tv.tv_nsec;
net/core/sock.c
3910
struct timespec64 ts;
net/core/sock.c
3913
ts = ktime_to_timespec64(sock_read_timestamp(sk));
net/core/sock.c
3914
if (ts.tv_sec == -1)
net/core/sock.c
3916
if (ts.tv_sec == 0) {
net/core/sock.c
3919
ts = ktime_to_timespec64(kt);
net/core/sock.c
3923
ts.tv_nsec /= 1000;
net/core/sock.c
3927
return put_old_timespec32(&ts, userstamp);
net/core/sock.c
3933
.tv_sec = ts.tv_sec,
net/core/sock.c
3934
.tv_usec = ts.tv_nsec,
net/core/sock.c
3941
return put_timespec64(&ts, userstamp);
net/devlink/region.c
1164
struct devlink_snapshot *snapshot, *ts;
net/devlink/region.c
1170
list_for_each_entry_safe(snapshot, ts, &region->snapshot_list, list)
net/dsa/tag_ksz.c
237
struct timespec64 ts;
net/dsa/tag_ksz.c
239
ts = ns_to_timespec64(-correction >> 16);
net/dsa/tag_ksz.c
240
tstamp_raw = ((ts.tv_sec & 3) << 30) | ts.tv_nsec;
net/dsa/user.c
1777
struct kernel_ethtool_ts_info *ts)
net/dsa/user.c
1785
return ds->ops->get_ts_info(ds, p->dp->index, ts);
net/ipv4/af_inet.c
1565
struct timespec64 ts;
net/ipv4/af_inet.c
1567
ktime_get_real_ts64(&ts);
net/ipv4/af_inet.c
1570
(void)div_u64_rem(ts.tv_sec, SECONDS_PER_DAY, &secs);
net/ipv4/af_inet.c
1574
msecs += (u32)ts.tv_nsec / NSEC_PER_MSEC;
net/ipv4/cipso_ipv4.c
2006
if (opt->opt.srr || opt->opt.rr || opt->opt.ts || opt->opt.router_alert) {
net/ipv4/cipso_ipv4.c
2020
if (opt->opt.ts > opt->opt.cipso)
net/ipv4/cipso_ipv4.c
2021
opt->opt.ts -= cipso_len;
net/ipv4/ip_options.c
106
if (sopt->ts) {
net/ipv4/ip_options.c
107
optlen = sptr[sopt->ts+1];
net/ipv4/ip_options.c
108
soffset = sptr[sopt->ts+2];
net/ipv4/ip_options.c
109
dopt->ts = dopt->optlen + sizeof(struct iphdr);
net/ipv4/ip_options.c
110
memcpy(dptr, sptr+sopt->ts, optlen);
net/ipv4/ip_options.c
219
opt->ts = 0;
net/ipv4/ip_options.c
340
if (opt->ts) {
net/ipv4/ip_options.c
420
opt->ts = optptr - iph;
net/ipv4/ip_options.c
496
if (opt->ts) {
net/ipv4/ip_options.c
497
unsigned char *optptr = opt->__data + opt->ts - sizeof(struct iphdr);
net/ipv4/ip_options.c
578
optptr = raw + opt->ts;
net/ipv4/ip_options.c
59
ip_rt_get_source(iph + opt->ts + iph[opt->ts + 2] - 9, skb, rt);
net/ipv4/ip_options.c
64
memcpy(iph + opt->ts + iph[opt->ts + 2] - 5, &midtime, 4);
net/ipv4/ip_tunnel_core.c
1039
*ts = new_state;
net/ipv4/ip_tunnel_core.c
684
struct lwtunnel_state **ts,
net/ipv4/ip_tunnel_core.c
752
*ts = new_state;
net/ipv4/ip_tunnel_core.c
978
struct lwtunnel_state **ts,
net/ipv4/syncookies.c
65
u64 ts, ts_now = tcp_ns_to_ts(false, now);
net/ipv4/syncookies.c
74
ts = (ts_now >> TSBITS) << TSBITS;
net/ipv4/syncookies.c
75
ts |= options;
net/ipv4/syncookies.c
76
if (ts > ts_now)
net/ipv4/syncookies.c
77
ts -= (1UL << TSBITS);
net/ipv4/syncookies.c
80
return ts * NSEC_PER_USEC;
net/ipv4/syncookies.c
81
return ts * NSEC_PER_MSEC;
net/ipv4/tcp.c
2352
if (tss->ts[0]) {
net/ipv4/tcp.c
2354
struct timespec64 tv = ktime_to_timespec64(tss->ts[0]);
net/ipv4/tcp.c
2394
tss->ts[0] = 0;
net/ipv4/tcp.c
2397
if (tss->ts[2]) {
net/ipv4/tcp.c
2401
tss->ts[2] = 0;
net/ipv4/tcp.c
2404
if (tss->ts[0] | tss->ts[2]) {
net/ipv4/tcp.c
2405
tss->ts[1] = 0;
net/ipv4/tcp_input.c
1276
const int ts)
net/ipv4/tcp_input.c
1304
ts ? LINUX_MIB_TCPTSREORDER : LINUX_MIB_TCPSACKREORDER);
net/ipv4/tcp_minisocks.c
173
u64 ts = tcp_clock_ms();
net/ipv4/tcp_minisocks.c
175
WRITE_ONCE(tw->tw_entry_stamp, ts);
net/ipv4/tcp_minisocks.c
177
div_u64(ts, MSEC_PER_SEC));
net/ipv6/ila/ila_lwt.c
137
struct lwtunnel_state **ts,
net/ipv6/ila/ila_lwt.c
259
*ts = newts;
net/ipv6/ioam6.c
716
struct timespec64 ts;
net/ipv6/ioam6.c
766
ts = ktime_to_timespec64(tstamp);
net/ipv6/ioam6.c
768
*(__be32 *)data = cpu_to_be32((u32)ts.tv_sec);
net/ipv6/ioam6.c
780
ts = ktime_to_timespec64(tstamp);
net/ipv6/ioam6.c
783
*(__be32 *)data = cpu_to_be32((u32)(ts.tv_nsec / NSEC_PER_USEC));
net/ipv6/ioam6_iptunnel.c
101
struct lwtunnel_state **ts,
net/ipv6/ioam6_iptunnel.c
230
*ts = lwt;
net/ipv6/rpl_iptunnel.c
117
*ts = newts;
net/ipv6/rpl_iptunnel.c
69
struct lwtunnel_state **ts,
net/ipv6/seg6_iptunnel.c
668
struct lwtunnel_state **ts,
net/ipv6/seg6_iptunnel.c
764
*ts = newts;
net/ipv6/seg6_local.c
2503
struct lwtunnel_state **ts,
net/ipv6/seg6_local.c
2542
*ts = newts;
net/mac80211/rx.c
606
u64 ts;
net/mac80211/rx.c
617
ts = status->mactime;
net/mac80211/rx.c
620
ts = status->device_timestamp;
net/mac80211/rx.c
623
put_unaligned_le64(ts, pos);
net/mac80211/util.c
3512
u64 ts = status->mactime;
net/mac80211/util.c
3540
ts += 36;
net/mac80211/util.c
3557
ts += 36;
net/mac80211/util.c
3582
ts += 24;
net/mac80211/util.c
3584
ts += 32;
net/mac80211/util.c
3592
ts += n_ltf * 4;
net/mac80211/util.c
3609
ts += 36;
net/mac80211/util.c
3616
ts += 4 * n_ltf;
net/mac80211/util.c
3631
ts += 20;
net/mac80211/util.c
3634
ts += 96;
net/mac80211/util.c
3636
ts += 192;
net/mac80211/util.c
3652
ts -= mpdu_len * 8 * 10 / rate;
net/mac80211/util.c
3654
ts += mpdu_offset * 8 * 10 / rate;
net/mac80211/util.c
3656
return ts;
net/mpls/mpls_iptunnel.c
165
struct lwtunnel_state **ts,
net/mpls/mpls_iptunnel.c
215
*ts = newts;
net/mpls/mpls_iptunnel.c
221
*ts = NULL;
net/netfilter/nf_conntrack_amanda.c
113
search[SEARCH_CONNECT].ts);
net/netfilter/nf_conntrack_amanda.c
119
search[SEARCH_NEWLINE].ts);
net/netfilter/nf_conntrack_amanda.c
125
off = skb_find_text(skb, start, stop, search[i].ts);
net/netfilter/nf_conntrack_amanda.c
182
textsearch_destroy(search[i].ts);
net/netfilter/nf_conntrack_amanda.c
192
search[i].ts = textsearch_prepare(ts_algo, search[i].string,
net/netfilter/nf_conntrack_amanda.c
195
if (IS_ERR(search[i].ts)) {
net/netfilter/nf_conntrack_amanda.c
196
ret = PTR_ERR(search[i].ts);
net/netfilter/nf_conntrack_amanda.c
217
textsearch_destroy(search[i].ts);
net/netfilter/nf_conntrack_amanda.c
55
struct ts_config *ts;
net/netfilter/nf_conntrack_ecache.c
315
u64 ts = 0;
net/netfilter/nf_conntrack_ecache.c
318
ts = ktime_get_real_ns();
net/netfilter/nf_conntrack_ecache.c
320
local64_set(&e->timestamp, ts);
net/netfilter/nf_conntrack_netlink.c
393
u64 ts = local64_read(&e->timestamp);
net/netfilter/nf_conntrack_netlink.c
395
if (ts)
net/netfilter/nf_conntrack_netlink.c
397
cpu_to_be64(ts), CTA_TIMESTAMP_PAD);
net/netfilter/nfnetlink_log.c
619
struct nfulnl_msg_packet_timestamp ts;
net/netfilter/nfnetlink_log.c
620
ts.sec = cpu_to_be64(kts.tv_sec);
net/netfilter/nfnetlink_log.c
621
ts.usec = cpu_to_be64(kts.tv_nsec / NSEC_PER_USEC);
net/netfilter/nfnetlink_log.c
623
if (nla_put(inst->skb, NFULA_TIMESTAMP, sizeof(ts), &ts))
net/netfilter/nfnetlink_queue.c
914
struct nfqnl_msg_packet_timestamp ts;
net/netfilter/nfnetlink_queue.c
917
ts.sec = cpu_to_be64(kts.tv_sec);
net/netfilter/nfnetlink_queue.c
918
ts.usec = cpu_to_be64(kts.tv_nsec / NSEC_PER_USEC);
net/netfilter/nfnetlink_queue.c
920
if (nla_put(skb, NFQA_TIMESTAMP, sizeof(ts), &ts))
net/packet/af_packet.c
2243
struct timespec64 ts;
net/packet/af_packet.c
2396
ts_status = tpacket_get_timestamp(skb, &ts,
net/packet/af_packet.c
2400
ktime_get_real_ts64(&ts);
net/packet/af_packet.c
2410
h.h1->tp_sec = ts.tv_sec;
net/packet/af_packet.c
2411
h.h1->tp_usec = ts.tv_nsec / NSEC_PER_USEC;
net/packet/af_packet.c
2419
h.h2->tp_sec = ts.tv_sec;
net/packet/af_packet.c
2420
h.h2->tp_nsec = ts.tv_nsec;
net/packet/af_packet.c
2445
h.h3->tp_sec = ts.tv_sec;
net/packet/af_packet.c
2446
h.h3->tp_nsec = ts.tv_nsec;
net/packet/af_packet.c
2516
__u32 ts;
net/packet/af_packet.c
2521
ts = __packet_set_timestamp(po, ph, skb);
net/packet/af_packet.c
2522
__packet_set_status(po, ph, TP_STATUS_AVAILABLE | ts);
net/packet/af_packet.c
454
static __u32 tpacket_get_timestamp(struct sk_buff *skb, struct timespec64 *ts,
net/packet/af_packet.c
461
ktime_to_timespec64_cond(shhwtstamps->hwtstamp, ts))
net/packet/af_packet.c
465
ktime_to_timespec64_cond(skb_tstamp(skb), ts))
net/packet/af_packet.c
475
struct timespec64 ts;
net/packet/af_packet.c
478
if (!(ts_status = tpacket_get_timestamp(skb, &ts, READ_ONCE(po->tp_tstamp))))
net/packet/af_packet.c
491
h.h1->tp_sec = ts.tv_sec;
net/packet/af_packet.c
492
h.h1->tp_usec = ts.tv_nsec / NSEC_PER_USEC;
net/packet/af_packet.c
495
h.h2->tp_sec = ts.tv_sec;
net/packet/af_packet.c
496
h.h2->tp_nsec = ts.tv_nsec;
net/packet/af_packet.c
499
h.h3->tp_sec = ts.tv_sec;
net/packet/af_packet.c
500
h.h3->tp_nsec = ts.tv_nsec;
net/packet/af_packet.c
806
struct timespec64 ts;
net/packet/af_packet.c
807
ktime_get_real_ts64(&ts);
net/packet/af_packet.c
808
h1->ts_last_pkt.ts_sec = ts.tv_sec;
net/packet/af_packet.c
809
h1->ts_last_pkt.ts_nsec = ts.tv_nsec;
net/packet/af_packet.c
844
struct timespec64 ts;
net/packet/af_packet.c
857
ktime_get_real_ts64(&ts);
net/packet/af_packet.c
859
h1->ts_first_pkt.ts_sec = ts.tv_sec;
net/packet/af_packet.c
860
h1->ts_first_pkt.ts_nsec = ts.tv_nsec;
net/sched/sch_cake.c
2997
struct nlattr *tstats, *ts;
net/sched/sch_cake.c
3043
ts = nla_nest_start_noflag(d->skb, i + 1);
net/sched/sch_cake.c
3044
if (!ts)
net/sched/sch_cake.c
3079
nla_nest_end(d->skb, ts);
net/sched/sch_dualpi2.c
123
u64 ts; /* Timestamp at enqueue */
net/sched/sch_dualpi2.c
144
return reference - dualpi2_skb_cb(skb)->ts;
net/sched/sch_dualpi2.c
151
return skb ? dualpi2_skb_cb(skb)->ts : 0;
net/sched/sch_dualpi2.c
405
cb->ts = ktime_get_ns();
net/sched/sch_dualpi2.c
422
WRITE_ONCE(q->l_head_ts, cb->ts);
net/sched/sch_dualpi2.c
427
WRITE_ONCE(q->c_head_ts, cb->ts);
net/sched/sch_qfq.c
741
static inline u64 qfq_round_down(u64 ts, unsigned int shift)
net/sched/sch_qfq.c
743
return ts & ~((1ULL << shift) - 1);
net/socket.c
1001
struct __kernel_old_timespec ts;
net/socket.c
1003
skb_get_timestampns(skb, &ts);
net/socket.c
1005
sizeof(ts), &ts);
net/socket.c
1016
tss.ts[0] = skb->tstamp;
net/socket.c
1035
tss.ts[2] = hwtstamp;
net/socket.c
1042
if (tss.ts[0] | tss.ts[2]) {
net/socket.c
928
struct timespec64 *ts)
net/socket.c
935
ktime_to_timespec64_cond(skb->tstamp, ts))
net/socket.c
950
if (!ktime_to_timespec64_cond(hwtstamp, ts))
net/socket.c
995
struct __kernel_timespec ts;
net/socket.c
997
skb_get_new_timestampns(skb, &ts);
net/socket.c
999
sizeof(ts), &ts);
net/wireless/core.h
190
unsigned long ts;
net/wireless/core.h
570
bool signal_valid, unsigned long ts);
net/wireless/nl80211.c
12321
jiffies_to_msecs(jiffies - intbss->ts)))
net/wireless/scan.c
1392
bss->ts -= age_jiffies;
net/wireless/scan.c
1643
if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
net/wireless/scan.c
1829
bss->ts = known->ts;
net/wireless/scan.c
1898
known->ts = new->ts;
net/wireless/scan.c
1982
bool signal_valid, unsigned long ts)
net/wireless/scan.c
1990
tmp->ts = ts;
net/wireless/scan.c
2085
bool signal_valid, unsigned long ts)
net/wireless/scan.c
2090
res = __cfg80211_bss_update(rdev, tmp, signal_valid, ts);
net/wireless/scan.c
2274
unsigned long ts;
net/wireless/scan.c
2324
ts = bss_from_pub(data->source_bss)->ts;
net/wireless/scan.c
2329
ts = jiffies;
net/wireless/scan.c
2378
res = __cfg80211_bss_update(rdev, &tmp, signal_valid, ts);
net/wireless/scan.c
3955
elapsed_jiffies_msecs(bss->ts));
net/wireless/scan.c
482
if (!time_after(expire_time, bss->ts))
net/wireless/scan.c
508
if (oldest && time_before(oldest->ts, bss->ts))
net/wireless/sme.c
960
ibss->ts);
net/xdp/xsk.c
1010
u32 hr, len, ts, offset, copy, copied;
net/xdp/xsk.c
1050
ts = pool->unaligned ? len : pool->chunk_size;
net/xdp/xsk.c
1075
skb->truesize += ts;
net/xdp/xsk.c
1077
refcount_add(ts, &xs->sk.sk_wmem_alloc);
net/xfrm/xfrm_interface_core.c
107
*ts = new_state;
net/xfrm/xfrm_interface_core.c
75
struct lwtunnel_state **ts,
samples/bpf/lathist_kern.c
32
u64 *ts = bpf_map_lookup_elem(&my_map, &cpu);
samples/bpf/lathist_kern.c
34
if (ts)
samples/bpf/lathist_kern.c
35
*ts = bpf_ktime_get_ns();
samples/bpf/lathist_kern.c
74
u64 *ts, cur_ts, delta;
samples/bpf/lathist_kern.c
79
ts = bpf_map_lookup_elem(&my_map, &cpu);
samples/bpf/lathist_kern.c
80
if (!ts)
samples/bpf/lathist_kern.c
84
delta = log2l(cur_ts - *ts);
samples/bpf/map_perf_test_user.c
27
struct timespec ts;
samples/bpf/map_perf_test_user.c
29
clock_gettime(CLOCK_MONOTONIC, &ts);
samples/bpf/map_perf_test_user.c
30
return ts.tv_sec * 1000000000ull + ts.tv_nsec;
samples/bpf/offwaketime.bpf.c
120
u64 delta, ts, *tsp;
samples/bpf/offwaketime.bpf.c
122
ts = bpf_ktime_get_ns();
samples/bpf/offwaketime.bpf.c
123
bpf_map_update_elem(&start, &pid, &ts, BPF_ANY);
samples/bpf/trace_output_user.c
11
struct timespec ts;
samples/bpf/trace_output_user.c
13
clock_gettime(CLOCK_MONOTONIC, &ts);
samples/bpf/trace_output_user.c
14
return ts.tv_sec * 1000000000ull + ts.tv_nsec;
samples/bpf/tracex4_user.c
22
struct timespec ts;
samples/bpf/tracex4_user.c
24
clock_gettime(CLOCK_MONOTONIC, &ts);
samples/bpf/tracex4_user.c
25
return ts.tv_sec * 1000000000ull + ts.tv_nsec;
samples/bpf/xdp_sample_user.c
1533
struct timespec ts = { interval, 0 };
samples/bpf/xdp_sample_user.c
1534
struct itimerspec its = { ts, ts };
samples/vfs/test-statx.c
54
static void print_time(const char *field, struct statx_timestamp *ts)
samples/vfs/test-statx.c
61
tim = ts->tv_sec;
samples/vfs/test-statx.c
73
printf(".%09u", ts->tv_nsec);
security/commoncap.c
142
int cap_settime(const struct timespec64 *ts, const struct timezone *tz)
security/security.c
717
int security_settime64(const struct timespec64 *ts, const struct timezone *tz)
security/security.c
719
return call_int_hook(settime, ts, tz);
sound/core/timer.c
1142
struct snd_timer_instance *ti, *ts;
sound/core/timer.c
1159
list_for_each_entry(ts, &ti->slave_active_head, active_list)
sound/core/timer.c
1160
if (ts->ccallback)
sound/core/timer.c
1161
ts->ccallback(ts, event, tstamp, resolution);
sound/core/timer.c
577
struct snd_timer_instance *ts;
sound/core/timer.c
600
list_for_each_entry(ts, &ti->slave_active_head, active_list)
sound/core/timer.c
601
if (ts->ccallback)
sound/core/timer.c
602
ts->ccallback(ts, event, &tstamp, resolution);
sound/core/timer.c
894
struct snd_timer_instance *ti, *ts, *tmp;
sound/core/timer.c
946
list_for_each_entry(ts, &ti->slave_active_head, active_list) {
sound/core/timer.c
947
ts->pticks = ti->pticks;
sound/core/timer.c
948
ts->resolution = resolution;
sound/core/timer.c
949
if (list_empty(&ts->ack_list) &&
sound/core/timer.c
950
!(ts->flags & SNDRV_TIMER_IFLG_CALLBACK))
sound/core/timer.c
951
list_add_tail(&ts->ack_list, ack_list_head);
sound/hda/common/controller.c
480
struct snd_pcm_audio_tstamp_config *ts)
sound/hda/common/controller.c
483
if (ts->type_requested == SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED)
sound/soc/codecs/idt821034.c
165
u8 ts;
sound/soc/codecs/idt821034.c
182
ts = idt821034->cache.ch[0].rx_slot;
sound/soc/codecs/idt821034.c
185
ts = idt821034->cache.ch[0].tx_slot;
sound/soc/codecs/idt821034.c
187
ts = 0x00;
sound/soc/codecs/idt821034.c
191
ret = idt821034_2x8bit_write(idt821034, conf, ts);
sound/soc/codecs/rt1320-sdw.h
118
int ts;
sound/soc/codecs/tas2783-sdw.c
568
u32 ts, spk_count, size_calculated;
sound/soc/codecs/tas2783-sdw.c
586
ts = tmp_val[i++];
sound/soc/codecs/tas2783-sdw.c
587
time64_to_tm(ts, 0, &tm);
sound/soc/intel/atom/sst-mfld-dsp.h
405
u32 ts;
sound/soc/intel/atom/sst/sst_stream.c
77
str_info->alloc_param.ts = sst_drv_ctx->info.mailbox_start +
sound/soc/intel/atom/sst/sst_stream.c
80
str_info->alloc_param.ts = sst_drv_ctx->mailbox_add +
sound/soc/intel/atom/sst/sst_stream.c
84
str_info->alloc_param.ts);
sound/soc/mediatek/common/mtk-btcvsd.c
259
struct mtk_btcvsd_snd_time_buffer_info *ts)
sound/soc/mediatek/common/mtk-btcvsd.c
261
ts->time_stamp_us = bt->tx->time_stamp;
sound/soc/mediatek/common/mtk-btcvsd.c
262
ts->data_count_equi_time = bt->tx->buf_data_equivalent_time;
sound/soc/mediatek/common/mtk-btcvsd.c
266
struct mtk_btcvsd_snd_time_buffer_info *ts)
sound/soc/mediatek/common/mtk-btcvsd.c
268
ts->time_stamp_us = bt->rx->time_stamp;
sound/soc/mediatek/common/mtk-btcvsd.c
269
ts->data_count_equi_time = bt->rx->buf_data_equivalent_time;
sound/soc/meson/axg-tdm-formatter.c
113
invert = axg_tdm_sclk_invert(ts->iface->fmt);
sound/soc/meson/axg-tdm-formatter.c
157
struct axg_tdm_stream *ts = formatter->stream;
sound/soc/meson/axg-tdm-formatter.c
160
guard(mutex)(&ts->lock);
sound/soc/meson/axg-tdm-formatter.c
163
if (ts->ready) {
sound/soc/meson/axg-tdm-formatter.c
171
list_add_tail(&formatter->list, &ts->formatter_list);
sound/soc/meson/axg-tdm-formatter.c
178
struct axg_tdm_stream *ts = formatter->stream;
sound/soc/meson/axg-tdm-formatter.c
180
scoped_guard(mutex, &ts->lock)
sound/soc/meson/axg-tdm-formatter.c
189
struct axg_tdm_stream *ts = formatter->drv->ops->get_stream(w);
sound/soc/meson/axg-tdm-formatter.c
197
if (WARN_ON(!ts))
sound/soc/meson/axg-tdm-formatter.c
206
ret = clk_set_parent(formatter->sclk_sel, ts->iface->sclk);
sound/soc/meson/axg-tdm-formatter.c
211
ret = clk_set_parent(formatter->lrclk_sel, ts->iface->lrclk);
sound/soc/meson/axg-tdm-formatter.c
215
formatter->stream = ts;
sound/soc/meson/axg-tdm-formatter.c
30
struct axg_tdm_stream *ts,
sound/soc/meson/axg-tdm-formatter.c
326
int axg_tdm_stream_start(struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdm-formatter.c
33
unsigned int ch = ts->channels;
sound/soc/meson/axg-tdm-formatter.c
331
guard(mutex)(&ts->lock);
sound/soc/meson/axg-tdm-formatter.c
332
ts->ready = true;
sound/soc/meson/axg-tdm-formatter.c
335
list_for_each_entry(formatter, &ts->formatter_list, list) {
sound/soc/meson/axg-tdm-formatter.c
347
void axg_tdm_stream_stop(struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdm-formatter.c
351
guard(mutex)(&ts->lock);
sound/soc/meson/axg-tdm-formatter.c
352
ts->ready = false;
sound/soc/meson/axg-tdm-formatter.c
355
list_for_each_entry(formatter, &ts->formatter_list, list) {
sound/soc/meson/axg-tdm-formatter.c
363
struct axg_tdm_stream *ts;
sound/soc/meson/axg-tdm-formatter.c
365
ts = kzalloc_obj(*ts);
sound/soc/meson/axg-tdm-formatter.c
366
if (ts) {
sound/soc/meson/axg-tdm-formatter.c
367
INIT_LIST_HEAD(&ts->formatter_list);
sound/soc/meson/axg-tdm-formatter.c
368
mutex_init(&ts->lock);
sound/soc/meson/axg-tdm-formatter.c
369
ts->iface = iface;
sound/soc/meson/axg-tdm-formatter.c
372
return ts;
sound/soc/meson/axg-tdm-formatter.c
376
void axg_tdm_stream_free(struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdm-formatter.c
383
WARN_ON(!list_empty(&ts->formatter_list));
sound/soc/meson/axg-tdm-formatter.c
384
mutex_destroy(&ts->lock);
sound/soc/meson/axg-tdm-formatter.c
385
kfree(ts);
sound/soc/meson/axg-tdm-formatter.c
389
int axg_tdm_stream_set_cont_clocks(struct axg_tdm_stream *ts,
sound/soc/meson/axg-tdm-formatter.c
396
if (ts->clk_enabled)
sound/soc/meson/axg-tdm-formatter.c
399
ret = clk_prepare_enable(ts->iface->mclk);
sound/soc/meson/axg-tdm-formatter.c
403
ret = clk_prepare_enable(ts->iface->sclk);
sound/soc/meson/axg-tdm-formatter.c
407
ret = clk_prepare_enable(ts->iface->lrclk);
sound/soc/meson/axg-tdm-formatter.c
411
ts->clk_enabled = true;
sound/soc/meson/axg-tdm-formatter.c
416
if (!ts->clk_enabled)
sound/soc/meson/axg-tdm-formatter.c
419
clk_disable_unprepare(ts->iface->lrclk);
sound/soc/meson/axg-tdm-formatter.c
421
clk_disable_unprepare(ts->iface->sclk);
sound/soc/meson/axg-tdm-formatter.c
423
clk_disable_unprepare(ts->iface->mclk);
sound/soc/meson/axg-tdm-formatter.c
424
ts->clk_enabled = false;
sound/soc/meson/axg-tdm-formatter.c
53
if ((BIT(i + k) & ts->mask[j]) && ch) {
sound/soc/meson/axg-tdm-formatter.c
82
struct axg_tdm_stream *ts = formatter->stream;
sound/soc/meson/axg-tdm-formatter.h
27
struct axg_tdm_stream *ts);
sound/soc/meson/axg-tdm-formatter.h
38
struct axg_tdm_stream *ts,
sound/soc/meson/axg-tdm-interface.c
150
struct axg_tdm_stream *ts =
sound/soc/meson/axg-tdm-interface.c
154
if (!axg_tdm_slots_total(ts->mask)) {
sound/soc/meson/axg-tdm-interface.c
187
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
sound/soc/meson/axg-tdm-interface.c
195
if (axg_tdm_slots_total(ts->mask) < channels) {
sound/soc/meson/axg-tdm-interface.c
206
ts->physical_width = params_physical_width(params);
sound/soc/meson/axg-tdm-interface.c
207
ts->width = params_width(params);
sound/soc/meson/axg-tdm-interface.c
208
ts->channels = params_channels(params);
sound/soc/meson/axg-tdm-interface.c
312
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
sound/soc/meson/axg-tdm-interface.c
350
ret = axg_tdm_stream_set_cont_clocks(ts, iface->fmt);
sound/soc/meson/axg-tdm-interface.c
360
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
sound/soc/meson/axg-tdm-interface.c
362
return axg_tdm_stream_set_cont_clocks(ts, 0);
sound/soc/meson/axg-tdm-interface.c
369
struct axg_tdm_stream *ts =
sound/soc/meson/axg-tdm-interface.c
376
axg_tdm_stream_start(ts);
sound/soc/meson/axg-tdm-interface.c
381
axg_tdm_stream_stop(ts);
sound/soc/meson/axg-tdm-interface.c
395
struct axg_tdm_stream *ts = snd_soc_dai_dma_data_get(dai, stream);
sound/soc/meson/axg-tdm-interface.c
397
if (ts)
sound/soc/meson/axg-tdm-interface.c
398
axg_tdm_stream_free(ts);
sound/soc/meson/axg-tdm-interface.c
410
struct axg_tdm_stream *ts;
sound/soc/meson/axg-tdm-interface.c
415
ts = axg_tdm_stream_alloc(iface);
sound/soc/meson/axg-tdm-interface.c
416
if (!ts) {
sound/soc/meson/axg-tdm-interface.c
420
snd_soc_dai_dma_data_set(dai, stream, ts);
sound/soc/meson/axg-tdm.h
65
void axg_tdm_stream_free(struct axg_tdm_stream *ts);
sound/soc/meson/axg-tdm.h
66
int axg_tdm_stream_start(struct axg_tdm_stream *ts);
sound/soc/meson/axg-tdm.h
67
void axg_tdm_stream_stop(struct axg_tdm_stream *ts);
sound/soc/meson/axg-tdm.h
68
int axg_tdm_stream_set_cont_clocks(struct axg_tdm_stream *ts,
sound/soc/meson/axg-tdm.h
71
static inline int axg_tdm_stream_reset(struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdm.h
73
axg_tdm_stream_stop(ts);
sound/soc/meson/axg-tdm.h
74
return axg_tdm_stream_start(ts);
sound/soc/meson/axg-tdmin.c
113
struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdmin.c
118
switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
sound/soc/meson/axg-tdmin.c
130
ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK);
sound/soc/meson/axg-tdmin.c
137
switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
sound/soc/meson/axg-tdmin.c
146
if (axg_tdm_lrclk_invert(ts->iface->fmt))
sound/soc/meson/axg-tdmin.c
150
val |= TDMIN_CTRL_BITNUM(ts->iface->slot_width - 1);
sound/soc/meson/axg-tdmin.c
164
return axg_tdm_formatter_set_channel_masks(map, ts, TDMIN_MASK0);
sound/soc/meson/axg-tdmout.c
111
struct axg_tdm_stream *ts)
sound/soc/meson/axg-tdmout.c
116
switch (ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
sound/soc/meson/axg-tdmout.c
128
ts->iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK);
sound/soc/meson/axg-tdmout.c
135
val |= TDMOUT_CTRL0_BITNUM(ts->iface->slot_width - 1);
sound/soc/meson/axg-tdmout.c
138
val |= TDMOUT_CTRL0_SLOTNUM(ts->iface->slots - 1);
sound/soc/meson/axg-tdmout.c
146
val = TDMOUT_CTRL1_MSB_POS(ts->width - 1);
sound/soc/meson/axg-tdmout.c
149
switch (ts->physical_width) {
sound/soc/meson/axg-tdmout.c
164
ts->physical_width);
sound/soc/meson/axg-tdmout.c
169
if (axg_tdm_lrclk_invert(ts->iface->fmt))
sound/soc/meson/axg-tdmout.c
179
return axg_tdm_formatter_set_channel_masks(map, ts, TDMOUT_MASK0);
tools/accounting/getdelays.c
228
static const char *format_timespec(struct __kernel_timespec *ts)
tools/accounting/getdelays.c
235
if (ts->tv_sec == 0 && ts->tv_nsec == 0)
tools/accounting/getdelays.c
238
time_sec = ts->tv_sec;
tools/bpf/bpf_dbg.c
117
struct pcap_timeval ts;
tools/include/uapi/linux/io_uring.h
710
__u64 ts;
tools/laptop/dslm/dslm.c
60
char *ts = ctime(&time);
tools/laptop/dslm/dslm.c
61
ts[strlen(ts) - 1] = 0;
tools/laptop/dslm/dslm.c
63
return ts;
tools/leds/led_hw_brightness_mon.c
31
struct timespec ts;
tools/leds/led_hw_brightness_mon.c
67
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/leds/led_hw_brightness_mon.c
79
printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, atoi(buf));
tools/leds/uledmon.c
27
struct timespec ts;
tools/leds/uledmon.c
57
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/leds/uledmon.c
58
printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness);
tools/perf/arch/arm64/util/arm-spe.c
642
struct timespec ts;
tools/perf/arch/arm64/util/arm-spe.c
644
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
tools/perf/arch/arm64/util/arm-spe.c
646
return ts.tv_sec ^ ts.tv_nsec;
tools/perf/arch/x86/util/iostat.c
401
char *prefix, struct timespec *ts)
tools/perf/arch/x86/util/iostat.c
410
if (ts)
tools/perf/arch/x86/util/iostat.c
412
ts->tv_sec, ts->tv_nsec,
tools/perf/arch/x86/util/iostat.c
456
struct perf_stat_config *config, struct timespec *ts,
tools/perf/arch/x86/util/iostat.c
463
iostat_prefix(evlist, config, prefix, ts);
tools/perf/arch/x86/util/iostat.c
469
iostat_prefix(evlist, config, prefix, ts);
tools/perf/bench/epoll-ctl.c
175
struct timespec ts = { .tv_sec = 0,
tools/perf/bench/epoll-ctl.c
198
nanosleep(&ts, NULL);
tools/perf/bench/epoll-wait.c
386
struct timespec ts = { .tv_sec = 0,
tools/perf/bench/epoll-wait.c
411
nanosleep(&ts, NULL);
tools/perf/bench/mem-functions.c
180
static double timeval2double(struct timeval *ts)
tools/perf/bench/mem-functions.c
182
return ((double)ts->tv_sec + (double)ts->tv_usec / (double)USEC_PER_SEC) / nr_threads;
tools/perf/builtin-lock.c
1084
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
1085
if (!ts)
tools/perf/builtin-lock.c
1088
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
1131
struct thread_stat *ts;
tools/perf/builtin-lock.c
1146
ts = thread_stat_find(sample->tid);
tools/perf/builtin-lock.c
1147
if (!ts)
tools/perf/builtin-lock.c
1150
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
496
static struct lock_seq_stat *get_seq(struct thread_stat *ts, u64 addr)
tools/perf/builtin-lock.c
500
list_for_each_entry(seq, &ts->seq_list, list) {
tools/perf/builtin-lock.c
513
list_add(&seq->list, &ts->seq_list);
tools/perf/builtin-lock.c
565
struct thread_stat *ts;
tools/perf/builtin-lock.c
581
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
582
if (!ts)
tools/perf/builtin-lock.c
585
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
639
struct thread_stat *ts;
tools/perf/builtin-lock.c
655
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
656
if (!ts)
tools/perf/builtin-lock.c
659
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
704
struct thread_stat *ts;
tools/perf/builtin-lock.c
719
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
720
if (!ts)
tools/perf/builtin-lock.c
723
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
761
struct thread_stat *ts;
tools/perf/builtin-lock.c
776
ts = thread_stat_findnew(sample->tid);
tools/perf/builtin-lock.c
777
if (!ts)
tools/perf/builtin-lock.c
780
seq = get_seq(ts, addr);
tools/perf/builtin-lock.c
968
struct thread_stat *ts;
tools/perf/builtin-sched.c
302
struct timespec ts;
tools/perf/builtin-sched.c
304
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/builtin-sched.c
306
return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
tools/perf/builtin-sched.c
320
struct timespec ts;
tools/perf/builtin-sched.c
322
ts.tv_nsec = nsecs % 999999999;
tools/perf/builtin-sched.c
323
ts.tv_sec = nsecs / 999999999;
tools/perf/builtin-sched.c
325
nanosleep(&ts, NULL);
tools/perf/builtin-stat.c
1086
static void print_counters(struct timespec *ts, int argc, const char **argv)
tools/perf/builtin-stat.c
1094
evlist__print_counters(evsel_list, &stat_config, &target, ts, argc, argv);
tools/perf/builtin-stat.c
112
static void print_counters(struct timespec *ts, int argc, const char **argv);
tools/perf/builtin-stat.c
2215
struct timespec tsh, *ts = NULL;
tools/perf/builtin-stat.c
2228
ts = &tsh;
tools/perf/builtin-stat.c
2231
print_counters(ts, argc, argv);
tools/perf/builtin-stat.c
466
struct timespec ts, rs;
tools/perf/builtin-stat.c
468
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/builtin-stat.c
469
diff_timespec(&rs, &ts, &ref_time);
tools/perf/builtin-trace.c
1868
double ts = (double)(tstamp - trace->base_time) / NSEC_PER_MSEC;
tools/perf/builtin-trace.c
1870
return fprintf(fp, "%10.3f ", ts);
tools/perf/builtin-trace.c
2747
double ts = (double)sample->time / NSEC_PER_MSEC;
tools/perf/builtin-trace.c
2750
evsel__name(sample->evsel), ts,
tools/perf/jvmti/jvmti_agent.c
108
timespec_to_ns(const struct timespec *ts)
tools/perf/jvmti/jvmti_agent.c
110
return ((uint64_t) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
tools/perf/jvmti/jvmti_agent.c
116
struct timespec ts;
tools/perf/jvmti/jvmti_agent.c
122
ret = clock_gettime(perf_clk_id, &ts);
tools/perf/jvmti/jvmti_agent.c
126
return timespec_to_ns(&ts);
tools/perf/tests/code-reading.c
102
free(ts->path);
tools/perf/tests/code-reading.c
103
free(ts);
tools/perf/tests/code-reading.c
97
struct tested_section *ts = rb_entry(node,
tools/perf/tests/switch-tracking.c
28
struct timespec ts;
tools/perf/tests/switch-tracking.c
52
ts.tv_nsec = 50 * 1000 * 1000;
tools/perf/tests/switch-tracking.c
53
ts.tv_sec = 0;
tools/perf/tests/switch-tracking.c
56
err = nanosleep(&ts, NULL);
tools/perf/tests/workloads/jitdump.c
38
struct timespec ts;
tools/perf/tests/workloads/jitdump.c
41
ret = clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/tests/workloads/jitdump.c
45
return ((uint64_t)ts.tv_sec * 1000000000) + ts.tv_nsec;
tools/perf/trace/beauty/include/linux/socket.h
417
ktime_t ts[3];
tools/perf/trace/beauty/timespec.c
10
struct timespec *ts = (struct timespec *)arg->augmented.args->value;
tools/perf/trace/beauty/timespec.c
12
return scnprintf(bf, size, "{ .tv_sec: %" PRIu64 ", .tv_nsec: %" PRIu64 " }", ts->tv_sec, ts->tv_nsec);
tools/perf/util/arm-spe.c
1350
u64 ts;
tools/perf/util/arm-spe.c
1370
ts = spe->heap.heap_array[0].ordinal + 1;
tools/perf/util/arm-spe.c
1371
if (ts > timestamp)
tools/perf/util/arm-spe.c
1372
ts = timestamp;
tools/perf/util/arm-spe.c
1374
ts = timestamp;
tools/perf/util/arm-spe.c
1384
ret = arm_spe_run_decoder(speq, &ts);
tools/perf/util/arm-spe.c
1386
auxtrace_heap__add(&spe->heap, queue_nr, ts);
tools/perf/util/arm-spe.c
1391
ret = auxtrace_heap__add(&spe->heap, queue_nr, ts);
tools/perf/util/arm-spe.c
1407
u64 ts = 0;
tools/perf/util/arm-spe.c
1416
arm_spe_run_decoder(speq, &ts);
tools/perf/util/bpf_kwork_top.c
64
struct timespec ts;
tools/perf/util/bpf_kwork_top.c
66
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/util/bpf_kwork_top.c
67
skel->bss->from_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
tools/perf/util/bpf_kwork_top.c
74
struct timespec ts;
tools/perf/util/bpf_kwork_top.c
77
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/util/bpf_kwork_top.c
78
skel->bss->to_timestamp = (u64)ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
tools/perf/util/bpf_skel/kwork_top.bpf.c
139
static void on_sched_out(struct task_struct *task, __u64 ts, __u32 cpu)
tools/perf/util/bpf_skel/kwork_top.bpf.c
146
delta = ts - pelem->timestamp;
tools/perf/util/bpf_skel/kwork_top.bpf.c
148
delta = ts - from_timestamp;
tools/perf/util/bpf_skel/kwork_top.bpf.c
160
static void on_sched_in(struct task_struct *task, __u64 ts)
tools/perf/util/bpf_skel/kwork_top.bpf.c
167
pelem->timestamp = ts;
tools/perf/util/bpf_skel/kwork_top.bpf.c
186
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_top.bpf.c
188
on_sched_out(prev, ts, cpu);
tools/perf/util/bpf_skel/kwork_top.bpf.c
189
on_sched_in(next, ts);
tools/perf/util/bpf_skel/kwork_top.bpf.c
207
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_top.bpf.c
220
.timestamp = ts,
tools/perf/util/bpf_skel/kwork_top.bpf.c
243
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_top.bpf.c
257
delta = ts - pelem->timestamp;
tools/perf/util/bpf_skel/kwork_top.bpf.c
259
delta = ts - from_timestamp;
tools/perf/util/bpf_skel/kwork_top.bpf.c
279
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_top.bpf.c
292
.timestamp = ts,
tools/perf/util/bpf_skel/kwork_top.bpf.c
315
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_top.bpf.c
329
delta = ts - pelem->timestamp;
tools/perf/util/bpf_skel/kwork_top.bpf.c
331
delta = ts - from_timestamp;
tools/perf/util/bpf_skel/kwork_trace.bpf.c
148
__u64 ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/kwork_trace.bpf.c
150
bpf_map_update_elem(map, key, &ts, BPF_ANY);
tools/perf/util/bpf_skel/off_cpu.bpf.c
259
__u64 ts;
tools/perf/util/bpf_skel/off_cpu.bpf.c
263
ts = bpf_ktime_get_ns();
tools/perf/util/bpf_skel/off_cpu.bpf.c
276
pelem->timestamp = ts;
tools/perf/util/bpf_skel/off_cpu.bpf.c
301
__u64 delta = ts - pelem->timestamp;
tools/perf/util/intel-bts.c
527
u64 ts = 0;
tools/perf/util/intel-bts.c
531
ret = intel_bts_process_queue(btsq, &ts);
tools/perf/util/intel-bts.c
561
u64 ts = 0;
tools/perf/util/intel-bts.c
576
ret = intel_bts_process_queue(btsq, &ts);
tools/perf/util/intel-bts.c
578
auxtrace_heap__add(&bts->heap, queue_nr, ts);
tools/perf/util/intel-bts.c
583
ret = auxtrace_heap__add(&bts->heap, queue_nr, ts);
tools/perf/util/intel-pt.c
3237
u64 ts;
tools/perf/util/intel-pt.c
3261
ts = pt->heap.heap_array[0].ordinal + 1;
tools/perf/util/intel-pt.c
3262
if (ts > timestamp)
tools/perf/util/intel-pt.c
3263
ts = timestamp;
tools/perf/util/intel-pt.c
3265
ts = timestamp;
tools/perf/util/intel-pt.c
3270
ret = intel_pt_run_decoder(ptq, &ts);
tools/perf/util/intel-pt.c
3273
auxtrace_heap__add(&pt->heap, queue_nr, ts);
tools/perf/util/intel-pt.c
3278
ret = auxtrace_heap__add(&pt->heap, queue_nr, ts);
tools/perf/util/intel-pt.c
3294
u64 ts = 0;
tools/perf/util/intel-pt.c
3303
intel_pt_run_decoder(ptq, &ts);
tools/perf/util/intel-pt.c
3342
u64 ts = 0;
tools/perf/util/intel-pt.c
3355
intel_pt_run_decoder(ptq, &ts);
tools/perf/util/intel-pt.c
4301
u64 ts = p[i].start;
tools/perf/util/intel-pt.c
4308
r->start = ts ? intel_pt_tsc_start(ts, pt) : 0;
tools/perf/util/intel-pt.c
4312
i, ts, te);
tools/perf/util/iostat.c
43
struct timespec *ts __maybe_unused)
tools/perf/util/iostat.c
49
struct timespec *ts __maybe_unused,
tools/perf/util/iostat.h
39
char *prefix, struct timespec *ts);
tools/perf/util/iostat.h
44
struct perf_stat_config *config, struct timespec *ts,
tools/perf/util/powerpc-vpadtl.c
376
u64 ts;
tools/perf/util/powerpc-vpadtl.c
396
ts = vpa->heap.heap_array[0].ordinal + 1;
tools/perf/util/powerpc-vpadtl.c
397
if (ts > timestamp)
tools/perf/util/powerpc-vpadtl.c
398
ts = timestamp;
tools/perf/util/powerpc-vpadtl.c
400
ts = timestamp;
tools/perf/util/powerpc-vpadtl.c
403
ret = powerpc_vpadtl_run_decoder(vpaq, &ts);
tools/perf/util/powerpc-vpadtl.c
405
auxtrace_heap__add(&vpa->heap, queue_nr, ts);
tools/perf/util/powerpc-vpadtl.c
410
ret = auxtrace_heap__add(&vpa->heap, queue_nr, ts);
tools/perf/util/s390-cpumsf.c
316
unsigned long long ts;
tools/perf/util/s390-cpumsf.c
318
memcpy(&ts, &te->timestamp[idx], sizeof(ts));
tools/perf/util/s390-cpumsf.c
319
return be64toh(ts);
tools/perf/util/s390-cpumsf.c
602
static int s390_cpumsf_samples(struct s390_cpumsf_queue *sfq, u64 *ts)
tools/perf/util/s390-cpumsf.c
615
*ts = ~0ULL;
tools/perf/util/s390-cpumsf.c
631
if (aux_ts > *ts) {
tools/perf/util/s390-cpumsf.c
632
*ts = aux_ts;
tools/perf/util/s390-cpumsf.c
660
if (aux_ts > *ts) {
tools/perf/util/s390-cpumsf.c
661
*ts = aux_ts;
tools/perf/util/s390-cpumsf.c
669
*ts = aux_ts;
tools/perf/util/s390-cpumsf.c
696
u64 *ts)
tools/perf/util/s390-cpumsf.c
715
*ts = ~0ULL;
tools/perf/util/s390-cpumsf.c
751
err = s390_cpumsf_samples(sfq, ts);
tools/perf/util/s390-cpumsf.c
803
unsigned int queue_nr, u64 ts)
tools/perf/util/s390-cpumsf.c
819
return auxtrace_heap__add(&sf->heap, queue_nr, ts);
tools/perf/util/s390-cpumsf.c
822
static int s390_cpumsf_setup_queues(struct s390_cpumsf *sf, u64 ts)
tools/perf/util/s390-cpumsf.c
829
i, ts);
tools/perf/util/s390-cpumsf.c
836
static int s390_cpumsf_update_queues(struct s390_cpumsf *sf, u64 ts)
tools/perf/util/s390-cpumsf.c
842
return s390_cpumsf_setup_queues(sf, ts);
tools/perf/util/s390-cpumsf.c
848
u64 ts;
tools/perf/util/s390-cpumsf.c
867
ts = sf->heap.heap_array[0].ordinal + 1;
tools/perf/util/s390-cpumsf.c
868
if (ts > timestamp)
tools/perf/util/s390-cpumsf.c
869
ts = timestamp;
tools/perf/util/s390-cpumsf.c
871
ts = timestamp;
tools/perf/util/s390-cpumsf.c
874
ret = s390_cpumsf_run_decoder(sfq, &ts);
tools/perf/util/s390-cpumsf.c
876
auxtrace_heap__add(&sf->heap, queue_nr, ts);
tools/perf/util/s390-cpumsf.c
880
ret = auxtrace_heap__add(&sf->heap, queue_nr, ts);
tools/perf/util/stat-display.c
1248
struct outstate *os, struct timespec *ts)
tools/perf/util/stat-display.c
1255
(unsigned long) ts->tv_sec, ts->tv_nsec);
tools/perf/util/stat-display.c
1258
(unsigned long) ts->tv_sec, ts->tv_nsec, config->csv_sep);
tools/perf/util/stat-display.c
1261
(unsigned long) ts->tv_sec, ts->tv_nsec);
tools/perf/util/stat-display.c
1533
struct target *_target, struct timespec *ts,
tools/perf/util/stat-display.c
1549
prepare_timestamp(config, &os, ts);
tools/perf/util/stat-display.c
1568
iostat_print_counters(evlist, config, ts, os.timestamp,
tools/perf/util/stat.h
205
struct target *_target, struct timespec *ts, int argc, const char **argv);
tools/perf/util/thread-stack.c
1004
if (!ts->cnt)
tools/perf/util/thread-stack.c
1008
tse = &ts->stack[ts->cnt - 1];
tools/perf/util/thread-stack.c
1010
err = thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
1019
static int thread_stack__trace_end(struct thread_stack *ts,
tools/perf/util/thread-stack.c
1022
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
1027
if (!ts->cnt || (ts->cnt == 1 && ts->stack[0].ref == ref))
tools/perf/util/thread-stack.c
1030
cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp, NULL, 0,
tools/perf/util/thread-stack.c
1031
ts->kernel_start);
tools/perf/util/thread-stack.c
1035
return thread_stack__push_cp(ts, ret_addr, sample->time, ref, cp,
tools/perf/util/thread-stack.c
1049
static int thread_stack__x86_retpoline(struct thread_stack *ts,
tools/perf/util/thread-stack.c
1053
struct thread_stack_entry *tse = &ts->stack[ts->cnt - 1];
tools/perf/util/thread-stack.c
1054
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
1070
ts->cnt -= 1;
tools/perf/util/thread-stack.c
1071
sym = ts->stack[ts->cnt - 2].cp->sym;
tools/perf/util/thread-stack.c
1078
ts->cnt -= 1;
tools/perf/util/thread-stack.c
1086
ts->cnt -= 1;
tools/perf/util/thread-stack.c
1090
cp = call_path__findnew(cpr, ts->stack[ts->cnt - 2].cp, tsym,
tools/perf/util/thread-stack.c
1091
sample->addr, ts->kernel_start);
tools/perf/util/thread-stack.c
1096
ts->stack[ts->cnt - 1].cp = cp;
tools/perf/util/thread-stack.c
1107
struct thread_stack *ts = thread__stack(thread, sample->cpu);
tools/perf/util/thread-stack.c
1111
if (ts && !ts->crp) {
tools/perf/util/thread-stack.c
1113
thread_stack__reset(thread, ts);
tools/perf/util/thread-stack.c
1114
ts = NULL;
tools/perf/util/thread-stack.c
1117
if (!ts) {
tools/perf/util/thread-stack.c
1118
ts = thread_stack__new(thread, sample->cpu, crp, true, 0);
tools/perf/util/thread-stack.c
1119
if (!ts)
tools/perf/util/thread-stack.c
1121
ts->comm = comm;
tools/perf/util/thread-stack.c
1124
rstate = ts->rstate;
tools/perf/util/thread-stack.c
1126
ts->rstate = X86_RETPOLINE_POSSIBLE;
tools/perf/util/thread-stack.c
1129
if (ts->comm != comm && thread__pid(thread) == thread__tid(thread)) {
tools/perf/util/thread-stack.c
1130
err = __thread_stack__flush(thread, ts);
tools/perf/util/thread-stack.c
1133
ts->comm = comm;
tools/perf/util/thread-stack.c
1137
if (!ts->cnt) {
tools/perf/util/thread-stack.c
1138
err = thread_stack__bottom(ts, sample, from_al, to_al, ref);
tools/perf/util/thread-stack.c
1143
ts->branch_count += 1;
tools/perf/util/thread-stack.c
1144
ts->insn_count += sample->insn_cnt;
tools/perf/util/thread-stack.c
1145
ts->cyc_count += sample->cyc_cnt;
tools/perf/util/thread-stack.c
1146
ts->last_time = sample->time;
tools/perf/util/thread-stack.c
1150
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
1161
cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp,
tools/perf/util/thread-stack.c
1163
ts->kernel_start);
tools/perf/util/thread-stack.c
1164
err = thread_stack__push_cp(ts, ret_addr, sample->time, ref,
tools/perf/util/thread-stack.c
1174
ts->rstate = X86_RETPOLINE_DETECTED;
tools/perf/util/thread-stack.c
118
static int thread_stack__grow(struct thread_stack *ts)
tools/perf/util/thread-stack.c
1185
return thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.c
1192
if (rstate == X86_RETPOLINE_DETECTED && ts->cnt > 2 &&
tools/perf/util/thread-stack.c
1193
ts->stack[ts->cnt - 1].ret_addr != sample->addr)
tools/perf/util/thread-stack.c
1194
return thread_stack__x86_retpoline(ts, sample, to_al);
tools/perf/util/thread-stack.c
1196
err = thread_stack__pop_cp(thread, ts, sample->addr,
tools/perf/util/thread-stack.c
1201
err = thread_stack__no_call_return(thread, ts, sample,
tools/perf/util/thread-stack.c
1205
err = thread_stack__trace_begin(thread, ts, sample->time, ref);
tools/perf/util/thread-stack.c
1207
err = thread_stack__trace_end(ts, sample, ref);
tools/perf/util/thread-stack.c
1211
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
1220
cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp,
tools/perf/util/thread-stack.c
1222
ts->kernel_start);
tools/perf/util/thread-stack.c
1223
err = thread_stack__push_cp(ts, 0, sample->time, ref, cp, false,
tools/perf/util/thread-stack.c
1226
ts->stack[ts->cnt - 1].non_call = true;
tools/perf/util/thread-stack.c
123
new_sz = ts->sz + STACK_GROWTH;
tools/perf/util/thread-stack.c
1234
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
1236
if (!ts)
tools/perf/util/thread-stack.c
1238
return ts->cnt;
tools/perf/util/thread-stack.c
126
new_stack = realloc(ts->stack, sz);
tools/perf/util/thread-stack.c
130
ts->stack = new_stack;
tools/perf/util/thread-stack.c
131
ts->sz = new_sz;
tools/perf/util/thread-stack.c
136
static int thread_stack__init(struct thread_stack *ts, struct thread *thread,
tools/perf/util/thread-stack.c
143
err = thread_stack__grow(ts);
tools/perf/util/thread-stack.c
152
ts->br_stack_rb = zalloc(sz);
tools/perf/util/thread-stack.c
153
if (!ts->br_stack_rb)
tools/perf/util/thread-stack.c
155
ts->br_stack_sz = br_stack_sz;
tools/perf/util/thread-stack.c
162
ts->kernel_start = machine__kernel_start(machine);
tools/perf/util/thread-stack.c
164
ts->rstate = X86_RETPOLINE_POSSIBLE;
tools/perf/util/thread-stack.c
166
ts->kernel_start = 1ULL << 63;
tools/perf/util/thread-stack.c
168
ts->crp = crp;
tools/perf/util/thread-stack.c
178
struct thread_stack *ts = thread__ts(thread), *new_ts;
tools/perf/util/thread-stack.c
179
unsigned int old_sz = ts ? ts->arr_sz : 0;
tools/perf/util/thread-stack.c
185
if (!ts || new_sz > old_sz) {
tools/perf/util/thread-stack.c
186
new_ts = calloc(new_sz, sizeof(*ts));
tools/perf/util/thread-stack.c
189
if (ts)
tools/perf/util/thread-stack.c
190
memcpy(new_ts, ts, old_sz * sizeof(*ts));
tools/perf/util/thread-stack.c
194
ts = new_ts;
tools/perf/util/thread-stack.c
198
(unsigned int)cpu < ts->arr_sz)
tools/perf/util/thread-stack.c
199
ts += cpu;
tools/perf/util/thread-stack.c
201
if (!ts->stack &&
tools/perf/util/thread-stack.c
202
thread_stack__init(ts, thread, crp, callstack, br_stack_sz))
tools/perf/util/thread-stack.c
205
return ts;
tools/perf/util/thread-stack.c
210
struct thread_stack *ts = thread__ts(thread);
tools/perf/util/thread-stack.c
215
if (!ts || (unsigned int)cpu >= ts->arr_sz)
tools/perf/util/thread-stack.c
218
ts += cpu;
tools/perf/util/thread-stack.c
220
if (!ts->stack)
tools/perf/util/thread-stack.c
223
return ts;
tools/perf/util/thread-stack.c
238
static int thread_stack__push(struct thread_stack *ts, u64 ret_addr,
tools/perf/util/thread-stack.c
243
if (ts->cnt == ts->sz) {
tools/perf/util/thread-stack.c
244
err = thread_stack__grow(ts);
tools/perf/util/thread-stack.c
247
ts->cnt = 0;
tools/perf/util/thread-stack.c
251
ts->stack[ts->cnt].trace_end = trace_end;
tools/perf/util/thread-stack.c
252
ts->stack[ts->cnt++].ret_addr = ret_addr;
tools/perf/util/thread-stack.c
257
static void thread_stack__pop(struct thread_stack *ts, u64 ret_addr)
tools/perf/util/thread-stack.c
270
for (i = ts->cnt; i; ) {
tools/perf/util/thread-stack.c
271
if (ts->stack[--i].ret_addr == ret_addr) {
tools/perf/util/thread-stack.c
272
ts->cnt = i;
tools/perf/util/thread-stack.c
278
static void thread_stack__pop_trace_end(struct thread_stack *ts)
tools/perf/util/thread-stack.c
282
for (i = ts->cnt; i; ) {
tools/perf/util/thread-stack.c
283
if (ts->stack[--i].trace_end)
tools/perf/util/thread-stack.c
284
ts->cnt = i;
tools/perf/util/thread-stack.c
290
static bool thread_stack__in_kernel(struct thread_stack *ts)
tools/perf/util/thread-stack.c
292
if (!ts->cnt)
tools/perf/util/thread-stack.c
295
return ts->stack[ts->cnt - 1].cp->in_kernel;
tools/perf/util/thread-stack.c
299
struct thread_stack *ts, size_t idx,
tools/perf/util/thread-stack.c
302
struct call_return_processor *crp = ts->crp;
tools/perf/util/thread-stack.c
306
.comm = ts->comm,
tools/perf/util/thread-stack.c
311
tse = &ts->stack[idx];
tools/perf/util/thread-stack.c
315
cr.branch_count = ts->branch_count - tse->branch_count;
tools/perf/util/thread-stack.c
316
cr.insn_count = ts->insn_count - tse->insn_count;
tools/perf/util/thread-stack.c
317
cr.cyc_count = ts->cyc_count - tse->cyc_count;
tools/perf/util/thread-stack.c
338
static int __thread_stack__flush(struct thread *thread, struct thread_stack *ts)
tools/perf/util/thread-stack.c
340
struct call_return_processor *crp = ts->crp;
tools/perf/util/thread-stack.c
344
ts->cnt = 0;
tools/perf/util/thread-stack.c
345
ts->br_stack_pos = 0;
tools/perf/util/thread-stack.c
346
if (ts->br_stack_rb)
tools/perf/util/thread-stack.c
347
ts->br_stack_rb->nr = 0;
tools/perf/util/thread-stack.c
351
while (ts->cnt) {
tools/perf/util/thread-stack.c
352
err = thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
353
ts->last_time, 0, true);
tools/perf/util/thread-stack.c
356
ts->cnt = 0;
tools/perf/util/thread-stack.c
366
struct thread_stack *ts = thread__ts(thread);
tools/perf/util/thread-stack.c
370
if (ts) {
tools/perf/util/thread-stack.c
371
for (pos = 0; pos < ts->arr_sz; pos++) {
tools/perf/util/thread-stack.c
372
int ret = __thread_stack__flush(thread, ts + pos);
tools/perf/util/thread-stack.c
382
static void thread_stack__update_br_stack(struct thread_stack *ts, u32 flags,
tools/perf/util/thread-stack.c
385
struct branch_stack *bs = ts->br_stack_rb;
tools/perf/util/thread-stack.c
388
if (!ts->br_stack_pos)
tools/perf/util/thread-stack.c
389
ts->br_stack_pos = ts->br_stack_sz;
tools/perf/util/thread-stack.c
391
ts->br_stack_pos -= 1;
tools/perf/util/thread-stack.c
393
be = &bs->entries[ts->br_stack_pos];
tools/perf/util/thread-stack.c
400
be->flags.mispred = ts->mispred_all;
tools/perf/util/thread-stack.c
402
if (bs->nr < ts->br_stack_sz)
tools/perf/util/thread-stack.c
410
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
415
if (!ts) {
tools/perf/util/thread-stack.c
416
ts = thread_stack__new(thread, cpu, NULL, callstack, br_stack_sz);
tools/perf/util/thread-stack.c
417
if (!ts) {
tools/perf/util/thread-stack.c
421
ts->trace_nr = trace_nr;
tools/perf/util/thread-stack.c
422
ts->mispred_all = mispred_all;
tools/perf/util/thread-stack.c
430
if (trace_nr != ts->trace_nr) {
tools/perf/util/thread-stack.c
431
if (ts->trace_nr)
tools/perf/util/thread-stack.c
432
__thread_stack__flush(thread, ts);
tools/perf/util/thread-stack.c
433
ts->trace_nr = trace_nr;
tools/perf/util/thread-stack.c
437
thread_stack__update_br_stack(ts, flags, from_ip, to_ip);
tools/perf/util/thread-stack.c
443
if (ts->crp || !callstack)
tools/perf/util/thread-stack.c
454
return thread_stack__push(ts, ret_addr,
tools/perf/util/thread-stack.c
464
thread_stack__pop(ts, to_ip);
tools/perf/util/thread-stack.c
465
thread_stack__pop_trace_end(ts);
tools/perf/util/thread-stack.c
467
thread_stack__pop(ts, to_ip);
tools/perf/util/thread-stack.c
475
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
477
if (!ts)
tools/perf/util/thread-stack.c
480
if (trace_nr != ts->trace_nr) {
tools/perf/util/thread-stack.c
481
if (ts->trace_nr)
tools/perf/util/thread-stack.c
482
__thread_stack__flush(thread, ts);
tools/perf/util/thread-stack.c
483
ts->trace_nr = trace_nr;
tools/perf/util/thread-stack.c
487
static void __thread_stack__free(struct thread *thread, struct thread_stack *ts)
tools/perf/util/thread-stack.c
489
__thread_stack__flush(thread, ts);
tools/perf/util/thread-stack.c
490
zfree(&ts->stack);
tools/perf/util/thread-stack.c
491
zfree(&ts->br_stack_rb);
tools/perf/util/thread-stack.c
494
static void thread_stack__reset(struct thread *thread, struct thread_stack *ts)
tools/perf/util/thread-stack.c
496
unsigned int arr_sz = ts->arr_sz;
tools/perf/util/thread-stack.c
498
__thread_stack__free(thread, ts);
tools/perf/util/thread-stack.c
499
memset(ts, 0, sizeof(*ts));
tools/perf/util/thread-stack.c
500
ts->arr_sz = arr_sz;
tools/perf/util/thread-stack.c
505
struct thread_stack *ts = thread__ts(thread);
tools/perf/util/thread-stack.c
508
if (ts) {
tools/perf/util/thread-stack.c
509
for (pos = 0; pos < ts->arr_sz; pos++)
tools/perf/util/thread-stack.c
510
__thread_stack__free(thread, ts + pos);
tools/perf/util/thread-stack.c
525
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
538
if (!ts) {
tools/perf/util/thread-stack.c
545
for (i = 2, j = 1; i < sz && j <= ts->cnt; i++, j++) {
tools/perf/util/thread-stack.c
546
ip = ts->stack[ts->cnt - j].ret_addr;
tools/perf/util/thread-stack.c
568
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
578
if (!ts)
tools/perf/util/thread-stack.c
586
for (j = 1; j <= ts->cnt; j++) {
tools/perf/util/thread-stack.c
587
ip = ts->stack[ts->cnt - j].ret_addr;
tools/perf/util/thread-stack.c
596
for (; nr < sz && j <= ts->cnt; nr++, j++) {
tools/perf/util/thread-stack.c
597
ip = ts->stack[ts->cnt - j].ret_addr;
tools/perf/util/thread-stack.c
620
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
628
if (!ts)
tools/perf/util/thread-stack.c
631
src = ts->br_stack_rb;
tools/perf/util/thread-stack.c
638
nr = min(ts->br_stack_sz - ts->br_stack_pos, (unsigned int)dst->nr);
tools/perf/util/thread-stack.c
639
memcpy(be, &src->entries[ts->br_stack_pos], bsz * nr);
tools/perf/util/thread-stack.c
641
if (src->nr >= ts->br_stack_sz) {
tools/perf/util/thread-stack.c
644
nr = min(ts->br_stack_pos, sz);
tools/perf/util/thread-stack.c
645
memcpy(be, &src->entries[0], bsz * ts->br_stack_pos);
tools/perf/util/thread-stack.c
682
struct thread_stack *ts = thread__stack(thread, cpu);
tools/perf/util/thread-stack.c
690
if (!ts)
tools/perf/util/thread-stack.c
693
src = ts->br_stack_rb;
tools/perf/util/thread-stack.c
697
spos = &src->entries[ts->br_stack_pos];
tools/perf/util/thread-stack.c
698
ssz = &src->entries[ts->br_stack_sz];
tools/perf/util/thread-stack.c
715
if (src->nr >= ts->br_stack_sz) {
tools/perf/util/thread-stack.c
739
if (src->nr >= ts->br_stack_sz) {
tools/perf/util/thread-stack.c
782
static int thread_stack__push_cp(struct thread_stack *ts, u64 ret_addr,
tools/perf/util/thread-stack.c
792
if (ts->cnt == ts->sz) {
tools/perf/util/thread-stack.c
793
err = thread_stack__grow(ts);
tools/perf/util/thread-stack.c
798
tse = &ts->stack[ts->cnt++];
tools/perf/util/thread-stack.c
802
tse->branch_count = ts->branch_count;
tools/perf/util/thread-stack.c
803
tse->insn_count = ts->insn_count;
tools/perf/util/thread-stack.c
804
tse->cyc_count = ts->cyc_count;
tools/perf/util/thread-stack.c
814
static int thread_stack__pop_cp(struct thread *thread, struct thread_stack *ts,
tools/perf/util/thread-stack.c
820
if (!ts->cnt)
tools/perf/util/thread-stack.c
823
if (ts->cnt == 1) {
tools/perf/util/thread-stack.c
824
struct thread_stack_entry *tse = &ts->stack[0];
tools/perf/util/thread-stack.c
827
return thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
831
if (ts->stack[ts->cnt - 1].ret_addr == ret_addr &&
tools/perf/util/thread-stack.c
832
!ts->stack[ts->cnt - 1].non_call) {
tools/perf/util/thread-stack.c
833
return thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
836
size_t i = ts->cnt - 1;
tools/perf/util/thread-stack.c
839
if (ts->stack[i].ret_addr != ret_addr ||
tools/perf/util/thread-stack.c
840
ts->stack[i].non_call)
tools/perf/util/thread-stack.c
843
while (ts->cnt > i) {
tools/perf/util/thread-stack.c
844
err = thread_stack__call_return(thread, ts,
tools/perf/util/thread-stack.c
845
--ts->cnt,
tools/perf/util/thread-stack.c
851
return thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
859
static int thread_stack__bottom(struct thread_stack *ts,
tools/perf/util/thread-stack.c
864
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
880
ts->kernel_start);
tools/perf/util/thread-stack.c
882
return thread_stack__push_cp(ts, ip, sample->time, ref, cp,
tools/perf/util/thread-stack.c
886
static int thread_stack__pop_ks(struct thread *thread, struct thread_stack *ts,
tools/perf/util/thread-stack.c
893
while (thread_stack__in_kernel(ts)) {
tools/perf/util/thread-stack.c
894
err = thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
904
struct thread_stack *ts,
tools/perf/util/thread-stack.c
909
struct call_path_root *cpr = ts->crp->cpr;
tools/perf/util/thread-stack.c
914
u64 ks = ts->kernel_start;
tools/perf/util/thread-stack.c
922
err = thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.c
927
if (!ts->cnt) {
tools/perf/util/thread-stack.c
929
return thread_stack__push_cp(ts, 0, tm, ref, cp, true,
tools/perf/util/thread-stack.c
932
} else if (thread_stack__in_kernel(ts) && ip < ks) {
tools/perf/util/thread-stack.c
934
err = thread_stack__pop_ks(thread, ts, sample, ref);
tools/perf/util/thread-stack.c
939
if (ts->cnt)
tools/perf/util/thread-stack.c
940
parent = ts->stack[ts->cnt - 1].cp;
tools/perf/util/thread-stack.c
950
if (ts->cnt == 1) {
tools/perf/util/thread-stack.c
951
err = thread_stack__call_return(thread, ts, --ts->cnt,
tools/perf/util/thread-stack.c
957
if (!ts->cnt) {
tools/perf/util/thread-stack.c
960
return thread_stack__push_cp(ts, addr, tm, ref, cp,
tools/perf/util/thread-stack.c
970
err = thread_stack__push_cp(ts, 0, tm, ref, cp, true, false);
tools/perf/util/thread-stack.c
972
ts->stack[ts->cnt - 1].non_call = true;
tools/perf/util/thread-stack.c
984
err = thread_stack__push_cp(ts, addr, tm, ref, cp, true, false);
tools/perf/util/thread-stack.c
990
err = thread_stack__push_cp(ts, ip, tm, ref, cp, true, false);
tools/perf/util/thread-stack.c
994
return thread_stack__call_return(thread, ts, --ts->cnt, tm, ref, false);
tools/perf/util/thread-stack.c
998
struct thread_stack *ts, u64 timestamp,
tools/perf/util/thread.h
281
return RC_CHK_ACCESS(thread)->ts;
tools/perf/util/thread.h
284
static inline void thread__set_ts(struct thread *thread, struct thread_stack *ts)
tools/perf/util/thread.h
286
RC_CHK_ACCESS(thread)->ts = ts;
tools/perf/util/thread.h
58
struct thread_stack *ts;
tools/perf/util/time-utils.h
45
struct timespec ts;
tools/perf/util/time-utils.h
47
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/perf/util/time-utils.h
48
return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
tools/testing/cxl/test/mem.c
504
struct cxl_mbox_set_timestamp_in *ts = cmd->payload_in;
tools/testing/cxl/test/mem.c
506
if (cmd->size_in != sizeof(*ts))
tools/testing/cxl/test/mem.c
512
mdata->timestamp = le64_to_cpu(ts->timestamp);
tools/testing/selftests/bpf/benchs/bench_xdp_lb.c
568
struct timespec ts;
tools/testing/selftests/bpf/benchs/bench_xdp_lb.c
570
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/bpf/benchs/bench_xdp_lb.c
571
return (__u64)ts.tv_sec * 1000000000ULL + ts.tv_nsec;
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
21
static int64_t timespec_to_ns64(struct timespec *ts)
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
23
return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec;
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
57
validate_timestamp(&tss->ts[0], &usr_ts);
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
61
validate_timestamp(&tss->ts[0], &prev_ts);
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
65
validate_timestamp(&tss->ts[0], &prev_ts);
tools/testing/selftests/bpf/prog_tests/net_timestamping.c
70
prev_ts = tss->ts[0];
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
852
enum num_t ts[2];
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
861
ts[0] = t_unsigned(t);
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
862
ts[1] = t_signed(t);
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
865
ts[0] = t;
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
870
t = ts[i];
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
898
enum num_t ts = t_signed(t);
tools/testing/selftests/bpf/prog_tests/reg_bounds.c
902
br_s = range_branch_taken_op(ts, x->r[ts], y->r[ts], op);
tools/testing/selftests/bpf/prog_tests/test_overhead.c
12
struct timespec ts;
tools/testing/selftests/bpf/prog_tests/test_overhead.c
14
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/bpf/prog_tests/test_overhead.c
15
return ts.tv_sec * 1000000000ull + ts.tv_nsec;
tools/testing/selftests/bpf/prog_tests/time_tai.c
15
static __u64 ts_to_ns(const struct timespec *ts)
tools/testing/selftests/bpf/prog_tests/time_tai.c
17
return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec;
tools/testing/selftests/bpf/prog_tests/vmlinux.c
12
struct timespec ts = { .tv_nsec = MY_TV_NSEC };
tools/testing/selftests/bpf/prog_tests/vmlinux.c
14
(void)syscall(__NR_nanosleep, &ts, NULL);
tools/testing/selftests/bpf/progs/netcnt_prog.c
30
__u64 ts, dt;
tools/testing/selftests/bpf/progs/netcnt_prog.c
49
ts = bpf_ktime_get_ns();
tools/testing/selftests/bpf/progs/netcnt_prog.c
50
dt = ts - percpu_cnt->prev_ts;
tools/testing/selftests/bpf/progs/netcnt_prog.c
61
percpu_cnt->prev_ts = ts;
tools/testing/selftests/bpf/progs/test_tcp_estats.c
126
unsigned long ts;
tools/testing/selftests/bpf/progs/test_tcp_estats.c
167
event->ts = bpf_ktime_get_ns();
tools/testing/selftests/bpf/progs/test_vmlinux.c
21
struct __kernel_timespec *ts;
tools/testing/selftests/bpf/progs/test_vmlinux.c
27
ts = (void *)args->args[0];
tools/testing/selftests/bpf/progs/test_vmlinux.c
28
if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) ||
tools/testing/selftests/bpf/progs/test_vmlinux.c
39
struct __kernel_timespec *ts;
tools/testing/selftests/bpf/progs/test_vmlinux.c
45
ts = (void *)PT_REGS_PARM1_CORE_SYSCALL(regs);
tools/testing/selftests/bpf/progs/test_vmlinux.c
46
if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) ||
tools/testing/selftests/bpf/progs/test_vmlinux.c
57
struct __kernel_timespec *ts;
tools/testing/selftests/bpf/progs/test_vmlinux.c
63
ts = (void *)PT_REGS_PARM1_CORE_SYSCALL(regs);
tools/testing/selftests/bpf/progs/test_vmlinux.c
64
if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) ||
tools/testing/selftests/bpf/test_progs.c
180
struct timespec ts = {
tools/testing/selftests/bpf/test_progs.c
185
return syscall(__NR_nanosleep, &ts, NULL);
tools/testing/selftests/bpf/xdp_hw_metadata.c
264
struct scm_timestamping *ts;
tools/testing/selftests/bpf/xdp_hw_metadata.c
289
ts = (struct scm_timestamping *)CMSG_DATA(cmsg);
tools/testing/selftests/bpf/xdp_hw_metadata.c
290
if (ts->ts[2].tv_sec || ts->ts[2].tv_nsec) {
tools/testing/selftests/bpf/xdp_hw_metadata.c
292
ts->ts[2].tv_sec, ts->ts[2].tv_nsec);
tools/testing/selftests/cgroup/test_cpu.c
137
struct timespec ts_run = param->ts;
tools/testing/selftests/cgroup/test_cpu.c
208
.ts = {
tools/testing/selftests/cgroup/test_cpu.c
272
.ts = {
tools/testing/selftests/cgroup/test_cpu.c
32
struct timespec ts;
tools/testing/selftests/cgroup/test_cpu.c
381
.ts = {
tools/testing/selftests/cgroup/test_cpu.c
543
.ts = {
tools/testing/selftests/cgroup/test_cpu.c
672
.ts = {
tools/testing/selftests/cgroup/test_cpu.c
743
.ts = {
tools/testing/selftests/drivers/net/so_txtime.c
100
tdeliver = glob_tstart + ts->delay_us * 1000;
tools/testing/selftests/drivers/net/so_txtime.c
119
static void do_recv_one(int fdr, struct timed_send *ts)
tools/testing/selftests/drivers/net/so_txtime.c
134
texpect = ts->delay_us >= 0 ? ts->delay_us : 0;
tools/testing/selftests/drivers/net/so_txtime.c
139
if (rbuf[0] != ts->data) {
tools/testing/selftests/drivers/net/so_txtime.c
140
fprintf(stderr, "payload mismatch. expected %c\n", ts->data);
tools/testing/selftests/drivers/net/so_txtime.c
70
struct timespec ts;
tools/testing/selftests/drivers/net/so_txtime.c
72
if (clock_gettime(clock, &ts))
tools/testing/selftests/drivers/net/so_txtime.c
75
return ts.tv_sec * (1000ULL * 1000 * 1000) + ts.tv_nsec;
tools/testing/selftests/drivers/net/so_txtime.c
78
static void do_send_one(int fdt, struct timed_send *ts)
tools/testing/selftests/drivers/net/so_txtime.c
87
iov.iov_base = &ts->data;
tools/testing/selftests/drivers/net/so_txtime.c
95
if (ts->delay_us >= 0) {
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3214
struct timespec ts;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3217
clock_gettime(CLOCK_REALTIME, &ts);
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3218
msecs = ts.tv_sec * 1000ull;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3219
msecs += ts.tv_nsec / 1000000ull;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3425
struct __kernel_timespec ts;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3438
ts.tv_sec = 0;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3439
ts.tv_nsec = cfg_delay_ms * 1000 * 1000;
tools/testing/selftests/filesystems/epoll/epoll_wakeup_test.c
3442
EXPECT_EQ(sys_epoll_pwait2(efd, &e, 1, &ts, NULL, 0), 0);
tools/testing/selftests/futex/functional/futex_numa.c
112
struct timespec ts = {
tools/testing/selftests/futex/functional/futex_numa.c
124
nanosleep(&ts, NULL);
tools/testing/selftests/futex/functional/futex_numa.c
135
nanosleep(&ts, NULL);
tools/testing/selftests/futex/functional/futex_requeue_pi.c
329
struct timespec ts, *tsp = NULL;
tools/testing/selftests/futex/functional/futex_requeue_pi.c
341
ret = clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/futex/functional/futex_requeue_pi.c
342
secs = (ts.tv_nsec + timeout_ns) / 1000000000;
tools/testing/selftests/futex/functional/futex_requeue_pi.c
343
ts.tv_nsec = ((int64_t)ts.tv_nsec + timeout_ns) % 1000000000;
tools/testing/selftests/futex/functional/futex_requeue_pi.c
344
ts.tv_sec += secs;
tools/testing/selftests/futex/functional/futex_requeue_pi.c
345
ksft_print_dbg_msg("ts.tv_sec = %ld\n", ts.tv_sec);
tools/testing/selftests/futex/functional/futex_requeue_pi.c
346
ksft_print_dbg_msg("ts.tv_nsec = %ld\n", ts.tv_nsec);
tools/testing/selftests/futex/functional/futex_requeue_pi.c
347
tsp = &ts;
tools/testing/selftests/futex/include/futex2test.h
69
struct __kernel_timespec ts = {
tools/testing/selftests/futex/include/futex2test.h
74
return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, &ts, clockid);
tools/testing/selftests/kvm/include/test_util.h
104
s64 timespec_to_ns(struct timespec ts);
tools/testing/selftests/kvm/include/test_util.h
105
struct timespec timespec_add_ns(struct timespec ts, s64 ns);
tools/testing/selftests/kvm/include/test_util.h
109
struct timespec timespec_div(struct timespec ts, int divisor);
tools/testing/selftests/kvm/lib/test_util.c
124
struct timespec timespec_div(struct timespec ts, int divisor)
tools/testing/selftests/kvm/lib/test_util.c
126
s64 ns = timespec_to_ns(ts) / divisor;
tools/testing/selftests/kvm/lib/test_util.c
86
s64 timespec_to_ns(struct timespec ts)
tools/testing/selftests/kvm/lib/test_util.c
88
return (s64)ts.tv_nsec + 1000000000LL * (s64)ts.tv_sec;
tools/testing/selftests/kvm/lib/test_util.c
91
struct timespec timespec_add_ns(struct timespec ts, s64 ns)
tools/testing/selftests/kvm/lib/test_util.c
95
res.tv_nsec = ts.tv_nsec + ns;
tools/testing/selftests/kvm/lib/test_util.c
96
res.tv_sec = ts.tv_sec + res.tv_nsec / 1000000000LL;
tools/testing/selftests/kvm/memslot_perf_test.c
180
struct timespec ts;
tools/testing/selftests/kvm/memslot_perf_test.c
182
TEST_ASSERT(!clock_gettime(CLOCK_REALTIME, &ts),
tools/testing/selftests/kvm/memslot_perf_test.c
185
ts.tv_sec += 2;
tools/testing/selftests/kvm/memslot_perf_test.c
186
TEST_ASSERT(!sem_timedwait(&vcpu_ready, &ts),
tools/testing/selftests/kvm/set_memory_region_test.c
102
ts.tv_sec += 2;
tools/testing/selftests/kvm/set_memory_region_test.c
103
TEST_ASSERT(!sem_timedwait(&vcpu_ready, &ts),
tools/testing/selftests/kvm/set_memory_region_test.c
97
struct timespec ts;
tools/testing/selftests/kvm/set_memory_region_test.c
99
TEST_ASSERT(!clock_gettime(CLOCK_REALTIME, &ts),
tools/testing/selftests/kvm/steal_time.c
475
struct timespec ts, stop;
tools/testing/selftests/kvm/steal_time.c
477
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/kvm/steal_time.c
478
stop = timespec_add_ns(ts, MIN_RUN_DELAY_NS);
tools/testing/selftests/kvm/steal_time.c
481
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/kvm/steal_time.c
482
if (timespec_to_ns(timespec_sub(ts, stop)) >= 0)
tools/testing/selftests/kvm/x86/kvm_clock_test.c
85
struct timespec ts;
tools/testing/selftests/kvm/x86/kvm_clock_test.c
90
r = clock_gettime(CLOCK_REALTIME, &ts);
tools/testing/selftests/kvm/x86/kvm_clock_test.c
97
data.realtime = ts.tv_sec * NSEC_PER_SEC;
tools/testing/selftests/kvm/x86/kvm_clock_test.c
98
data.realtime += ts.tv_nsec;
tools/testing/selftests/kvm/x86/nx_huge_pages_test.c
100
ts.tv_sec = reclaim_wait_ms / 1000;
tools/testing/selftests/kvm/x86/nx_huge_pages_test.c
101
ts.tv_nsec = (reclaim_wait_ms - (ts.tv_sec * 1000)) * 1000000;
tools/testing/selftests/kvm/x86/nx_huge_pages_test.c
102
nanosleep(&ts, NULL);
tools/testing/selftests/kvm/x86/nx_huge_pages_test.c
97
struct timespec ts;
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
132
struct timespec ts;
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
134
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
135
return (uint64_t)ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000ULL;
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
676
struct timespec ts = {0, 1000 * 1000}; /* 1ms */
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
678
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
684
struct timespec ts = {
tools/testing/selftests/membarrier/membarrier_rseq_stress.c
688
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
tools/testing/selftests/net/cmsg_sender.c
175
opt.ts.ena = true;
tools/testing/selftests/net/cmsg_sender.c
302
if (opt.ts.ena) {
tools/testing/selftests/net/cmsg_sender.c
349
struct scm_timestamping *ts;
tools/testing/selftests/net/cmsg_sender.c
354
if (!opt.ts.ena)
tools/testing/selftests/net/cmsg_sender.c
360
ts = NULL;
tools/testing/selftests/net/cmsg_sender.c
375
if (cmsg->cmsg_len < sizeof(*ts))
tools/testing/selftests/net/cmsg_sender.c
378
ts = (void *)CMSG_DATA(cmsg);
tools/testing/selftests/net/cmsg_sender.c
391
if (!ts)
tools/testing/selftests/net/cmsg_sender.c
399
if (!ts->ts[i].tv_sec && !ts->ts[i].tv_nsec)
tools/testing/selftests/net/cmsg_sender.c
402
rel_time = (ts->ts[i].tv_sec - time_start_real.tv_sec) *
tools/testing/selftests/net/cmsg_sender.c
404
(ts->ts[i].tv_nsec - time_start_real.tv_nsec) /
tools/testing/selftests/net/cmsg_sender.c
460
if (opt.ts.ena) {
tools/testing/selftests/net/cmsg_sender.c
563
if (opt.ts.ena) {
tools/testing/selftests/net/cmsg_sender.c
71
} ts;
tools/testing/selftests/net/lib/gro.c
1378
struct timespec ts;
tools/testing/selftests/net/lib/gro.c
1384
if (clock_gettime(CLOCK_MONOTONIC, &ts))
tools/testing/selftests/net/lib/gro.c
1387
txtime_ns = ts.tv_sec * 1000000000ULL + ts.tv_nsec;
tools/testing/selftests/net/lib/gro.c
630
static void tcp_write_options(char *buf, int kind, int ts)
tools/testing/selftests/net/lib/gro.c
658
opt_ts->tsval = ts;
tools/testing/selftests/net/lib/gro.c
670
static void add_standard_tcp_options(char *buf, char *no_ext, int ts, int order)
tools/testing/selftests/net/lib/gro.c
677
TCPOPT_TIMESTAMP, ts);
tools/testing/selftests/net/lib/gro.c
682
TCPOPT_TIMESTAMP, ts);
tools/testing/selftests/net/lib/gro.c
687
tcp_write_options(buf + total_hdr_len, TCPOPT_TIMESTAMP, ts);
tools/testing/selftests/net/lib/gro.c
806
struct ip_timestamp *ts = (struct ip_timestamp *)(optpkt + tcp_offset);
tools/testing/selftests/net/lib/gro.c
813
ts->ipt_code = IPOPT_TS;
tools/testing/selftests/net/lib/gro.c
814
ts->ipt_len = optlen;
tools/testing/selftests/net/lib/gro.c
815
ts->ipt_ptr = 5;
tools/testing/selftests/net/lib/gro.c
816
ts->ipt_flg = IPOPT_TS_TSONLY;
tools/testing/selftests/net/mptcp/mptcp_connect.c
485
struct __kernel_timespec ts;
tools/testing/selftests/net/mptcp/mptcp_connect.c
493
memcpy(&ts, CMSG_DATA(cmsg), sizeof(ts));
tools/testing/selftests/net/netfilter/nf_queue.c
266
struct timespec ts = { .tv_sec = delay / 1000 };
tools/testing/selftests/net/netfilter/nf_queue.c
270
ts.tv_nsec = delay * 1000llu * 1000llu;
tools/testing/selftests/net/netfilter/nf_queue.c
272
nanosleep(&ts, NULL);
tools/testing/selftests/net/rxtimestamp.c
197
struct scm_timestamping *ts;
tools/testing/selftests/net/rxtimestamp.c
238
ts = (struct scm_timestamping *)CMSG_DATA(cmsg);
tools/testing/selftests/net/rxtimestamp.c
239
actual.swtstamp = !!ts->ts[0].tv_sec;
tools/testing/selftests/net/rxtimestamp.c
240
if (ts->ts[1].tv_sec != 0)
tools/testing/selftests/net/rxtimestamp.c
242
actual.hwtstamp = !!ts->ts[2].tv_sec;
tools/testing/selftests/net/timestamping.c
161
struct timespec ts;
tools/testing/selftests/net/timestamping.c
268
if (ioctl(sock, SIOCGSTAMPNS, &ts))
tools/testing/selftests/net/timestamping.c
272
(long)ts.tv_sec,
tools/testing/selftests/net/timestamping.c
273
(long)ts.tv_nsec);
tools/testing/selftests/net/txtimestamp.c
103
static int64_t timespec_to_ns64(struct timespec *ts)
tools/testing/selftests/net/txtimestamp.c
105
return ts->tv_sec * NSEC_PER_SEC + ts->tv_nsec;
tools/testing/selftests/net/txtimestamp.c
108
static int64_t timespec_to_us64(struct timespec *ts)
tools/testing/selftests/net/txtimestamp.c
110
return ts->tv_sec * USEC_PER_SEC + ts->tv_nsec / NSEC_PER_USEC;
tools/testing/selftests/net/txtimestamp.c
225
validate_timestamp(&tss->ts[0], 0);
tools/testing/selftests/net/txtimestamp.c
226
add_timing_event(&usr_enq, &ts_usr, &tss->ts[0]);
tools/testing/selftests/net/txtimestamp.c
230
validate_timestamp(&tss->ts[0], cfg_delay_snd);
tools/testing/selftests/net/txtimestamp.c
231
add_timing_event(&usr_snd, &ts_usr, &tss->ts[0]);
tools/testing/selftests/net/txtimestamp.c
235
validate_timestamp(&tss->ts[0], cfg_delay_ack);
tools/testing/selftests/net/txtimestamp.c
236
add_timing_event(&usr_ack, &ts_usr, &tss->ts[0]);
tools/testing/selftests/net/txtimestamp.c
242
__print_timestamp(tsname, &tss->ts[0], tskey, payload_len);
tools/testing/selftests/net/udpgso_bench_tx.c
152
if (tss->ts[i].tv_sec == 0)
tools/testing/selftests/nolibc/nolibc-test.c
1517
struct timespec ts;
tools/testing/selftests/nolibc/nolibc-test.c
1555
CASE_TEST(clock_getres); EXPECT_SYSZR(1, clock_getres(CLOCK_MONOTONIC, &ts)); break;
tools/testing/selftests/nolibc/nolibc-test.c
1556
CASE_TEST(clock_gettime); EXPECT_SYSZR(1, clock_gettime(CLOCK_MONOTONIC, &ts)); break;
tools/testing/selftests/nolibc/nolibc-test.c
1557
CASE_TEST(clock_settime); EXPECT_SYSER(1, clock_settime(CLOCK_MONOTONIC, &ts), -1, EINVAL); break;
tools/testing/selftests/nolibc/nolibc-test.c
1578
CASE_TEST(clock_nanosleep); ts.tv_nsec = -1; EXPECT_EQ(1, EINVAL, clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL)); break;
tools/testing/selftests/nolibc/nolibc-test.c
1612
CASE_TEST(nanosleep); ts.tv_nsec = -1; EXPECT_SYSER(1, nanosleep(&ts, NULL), -1, EINVAL); break;
tools/testing/selftests/nolibc/nolibc-test.c
1693
struct timespec ts;
tools/testing/selftests/nolibc/nolibc-test.c
1698
if (sizeof(ts) != sizeof(kts))
tools/testing/selftests/nolibc/nolibc-test.c
1701
if (!__builtin_types_compatible_p(__typeof__(ts.tv_sec), __typeof__(kts.tv_sec)))
tools/testing/selftests/nolibc/nolibc-test.c
1704
if (!__builtin_types_compatible_p(__typeof__(ts.tv_nsec), __typeof__(kts.tv_nsec)))
tools/testing/selftests/nolibc/nolibc-test.c
1707
if (offsetof(__typeof__(ts), tv_sec) != offsetof(__typeof__(kts), tv_sec))
tools/testing/selftests/nolibc/nolibc-test.c
1710
if (offsetof(__typeof__(ts), tv_nsec) != offsetof(__typeof__(kts), tv_nsec))
tools/testing/selftests/pipe/pipe_bench.c
71
struct timespec ts;
tools/testing/selftests/pipe/pipe_bench.c
73
clock_gettime(CLOCK_MONOTONIC, &ts);
tools/testing/selftests/pipe/pipe_bench.c
74
return (uint64_t)ts.tv_sec * 1000000000ull + (uint64_t)ts.tv_nsec;
tools/testing/selftests/proc/proc-maps-race.c
408
static void start_test_loop(struct timespec *ts, bool verbose)
tools/testing/selftests/proc/proc-maps-race.c
411
print_ts.tv_sec = ts->tv_sec;
tools/testing/selftests/proc/proc-maps-race.c
414
static void end_test_iteration(struct timespec *ts, bool verbose)
tools/testing/selftests/proc/proc-maps-race.c
420
if (print_ts.tv_sec == ts->tv_sec)
tools/testing/selftests/proc/proc-maps-race.c
425
print_ts.tv_sec = ts->tv_sec;
tools/testing/selftests/proc/proc-uptime.h
28
struct timespec ts;
tools/testing/selftests/proc/proc-uptime.h
31
err = clock_gettime(CLOCK_BOOTTIME, &ts);
tools/testing/selftests/proc/proc-uptime.h
34
return (ts.tv_sec * 100) + (ts.tv_nsec / 10000000);
tools/testing/selftests/ptp/testptp.c
163
struct timespec ts;
tools/testing/selftests/ptp/testptp.c
402
if (clock_gettime(clkid, &ts)) {
tools/testing/selftests/ptp/testptp.c
406
ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec));
tools/testing/selftests/ptp/testptp.c
411
clock_gettime(CLOCK_REALTIME, &ts);
tools/testing/selftests/ptp/testptp.c
412
if (clock_settime(clkid, &ts)) {
tools/testing/selftests/ptp/testptp.c
420
clock_gettime(clkid, &ts);
tools/testing/selftests/ptp/testptp.c
421
if (clock_settime(CLOCK_REALTIME, &ts)) {
tools/testing/selftests/ptp/testptp.c
429
ts.tv_sec = seconds;
tools/testing/selftests/ptp/testptp.c
430
ts.tv_nsec = 0;
tools/testing/selftests/ptp/testptp.c
431
if (clock_settime(clkid, &ts)) {
tools/testing/selftests/ptp/testptp.c
514
if (clock_gettime(clkid, &ts)) {
tools/testing/selftests/ptp/testptp.c
533
perout_request.start.sec = ts.tv_sec + 2;
tools/testing/selftests/ptp/testptp.c
572
pct = &sysoff->ts[0];
tools/testing/selftests/ptp/testptp.c
614
i, soe->ts[i][0].sec,
tools/testing/selftests/ptp/testptp.c
615
soe->ts[i][0].nsec);
tools/testing/selftests/ptp/testptp.c
619
i, soe->ts[i][0].sec,
tools/testing/selftests/ptp/testptp.c
620
soe->ts[i][0].nsec);
tools/testing/selftests/ptp/testptp.c
624
i, soe->ts[i][0].sec,
tools/testing/selftests/ptp/testptp.c
625
soe->ts[i][0].nsec);
tools/testing/selftests/ptp/testptp.c
631
soe->ts[i][1].sec, soe->ts[i][1].nsec);
tools/testing/selftests/ptp/testptp.c
635
soe->ts[i][2].sec,
tools/testing/selftests/ptp/testptp.c
636
soe->ts[i][2].nsec);
tools/testing/selftests/ptp/testptp.c
640
soe->ts[i][2].sec,
tools/testing/selftests/ptp/testptp.c
641
soe->ts[i][2].nsec);
tools/testing/selftests/ptp/testptp.c
645
soe->ts[i][2].sec,
tools/testing/selftests/ptp/testptp.c
646
soe->ts[i][2].nsec);
tools/testing/selftests/sched_ext/cyclic_kick_wait.c
65
struct timespec ts;
tools/testing/selftests/sched_ext/cyclic_kick_wait.c
71
if (clock_gettime(CLOCK_REALTIME, &ts))
tools/testing/selftests/sched_ext/cyclic_kick_wait.c
74
ts.tv_sec += 2;
tools/testing/selftests/sched_ext/cyclic_kick_wait.c
75
err = pthread_timedjoin_np(worker->tid, &ret, &ts);
tools/testing/selftests/timens/timens.h
21
struct timespec ts;
tools/testing/selftests/timens/timens.h
26
if (clock_gettime(CLOCK_BOOTTIME_ALARM, &ts) == -1 && errno == EINVAL)
tools/testing/selftests/timers/adjtick.c
40
unsigned long long ts_to_nsec(struct timespec ts)
tools/testing/selftests/timers/adjtick.c
42
return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
tools/testing/selftests/timers/adjtick.c
47
struct timespec ts;
tools/testing/selftests/timers/adjtick.c
49
ts.tv_sec = ns/NSEC_PER_SEC;
tools/testing/selftests/timers/adjtick.c
50
ts.tv_nsec = ns%NSEC_PER_SEC;
tools/testing/selftests/timers/adjtick.c
52
return ts;
tools/testing/selftests/timers/alarmtimer-suspend.c
86
struct timespec ts;
tools/testing/selftests/timers/alarmtimer-suspend.c
88
clock_gettime(alarm_clock_id, &ts);
tools/testing/selftests/timers/alarmtimer-suspend.c
91
delta_ns = timespec_sub(start_time, ts);
tools/testing/selftests/timers/alarmtimer-suspend.c
94
printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec,
tools/testing/selftests/timers/alarmtimer-suspend.c
95
ts.tv_nsec, delta_ns);
tools/testing/selftests/timers/freq-step.c
205
struct timespec ts;
tools/testing/selftests/timers/freq-step.c
208
if (clock_gettime(CLOCK_MONOTONIC_RAW, &ts)) {
tools/testing/selftests/timers/freq-step.c
213
mono_raw_base = ts.tv_sec;
tools/testing/selftests/timers/freq-step.c
215
if (clock_gettime(CLOCK_MONOTONIC, &ts)) {
tools/testing/selftests/timers/freq-step.c
220
mono_base = ts.tv_sec;
tools/testing/selftests/timers/freq-step.c
233
srand(ts.tv_sec ^ ts.tv_nsec);
tools/testing/selftests/timers/inconsistency-check.c
146
struct timespec ts;
tools/testing/selftests/timers/inconsistency-check.c
173
if (clockid == CLOCK_HWSPECIFIC || clock_gettime(clockid, &ts)) {
tools/testing/selftests/timers/leap-a-day.c
213
struct timespec ts;
tools/testing/selftests/timers/leap-a-day.c
215
if (clock_gettime(CLOCK_TAI, &ts)) {
tools/testing/selftests/timers/leap-a-day.c
238
struct timespec ts;
tools/testing/selftests/timers/leap-a-day.c
243
clock_gettime(CLOCK_REALTIME, &ts);
tools/testing/selftests/timers/leap-a-day.c
246
next_leap = ts.tv_sec;
tools/testing/selftests/timers/leap-a-day.c
307
ts.tv_sec = next_leap - 3;
tools/testing/selftests/timers/leap-a-day.c
308
ts.tv_nsec = 0;
tools/testing/selftests/timers/leap-a-day.c
311
while (clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &ts, NULL))
tools/testing/selftests/timers/leap-a-day.c
355
ts.tv_sec = 0;
tools/testing/selftests/timers/leap-a-day.c
356
ts.tv_nsec = NSEC_PER_SEC / 2;
tools/testing/selftests/timers/leap-a-day.c
357
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
tools/testing/selftests/timers/leap-a-day.c
71
struct timespec timespec_add(struct timespec ts, unsigned long long ns)
tools/testing/selftests/timers/leap-a-day.c
73
ts.tv_nsec += ns;
tools/testing/selftests/timers/leap-a-day.c
74
while (ts.tv_nsec >= NSEC_PER_SEC) {
tools/testing/selftests/timers/leap-a-day.c
75
ts.tv_nsec -= NSEC_PER_SEC;
tools/testing/selftests/timers/leap-a-day.c
76
ts.tv_sec++;
tools/testing/selftests/timers/leap-a-day.c
78
return ts;
tools/testing/selftests/timers/leapcrash.c
61
struct timespec ts;
tools/testing/selftests/timers/leapcrash.c
75
clock_gettime(CLOCK_REALTIME, &ts);
tools/testing/selftests/timers/leapcrash.c
78
next_leap = ts.tv_sec;
tools/testing/selftests/timers/mqueue-lat.c
48
struct timespec timespec_add(struct timespec ts, unsigned long long ns)
tools/testing/selftests/timers/mqueue-lat.c
50
ts.tv_nsec += ns;
tools/testing/selftests/timers/mqueue-lat.c
51
while (ts.tv_nsec >= NSEC_PER_SEC) {
tools/testing/selftests/timers/mqueue-lat.c
52
ts.tv_nsec -= NSEC_PER_SEC;
tools/testing/selftests/timers/mqueue-lat.c
53
ts.tv_sec++;
tools/testing/selftests/timers/mqueue-lat.c
55
return ts;
tools/testing/selftests/timers/nanosleep.c
79
struct timespec timespec_add(struct timespec ts, unsigned long long ns)
tools/testing/selftests/timers/nanosleep.c
81
ts.tv_nsec += ns;
tools/testing/selftests/timers/nanosleep.c
82
while (ts.tv_nsec >= NSEC_PER_SEC) {
tools/testing/selftests/timers/nanosleep.c
83
ts.tv_nsec -= NSEC_PER_SEC;
tools/testing/selftests/timers/nanosleep.c
84
ts.tv_sec++;
tools/testing/selftests/timers/nanosleep.c
86
return ts;
tools/testing/selftests/timers/nsleep-lat.c
66
struct timespec timespec_add(struct timespec ts, unsigned long long ns)
tools/testing/selftests/timers/nsleep-lat.c
68
ts.tv_nsec += ns;
tools/testing/selftests/timers/nsleep-lat.c
69
while (ts.tv_nsec >= NSEC_PER_SEC) {
tools/testing/selftests/timers/nsleep-lat.c
70
ts.tv_nsec -= NSEC_PER_SEC;
tools/testing/selftests/timers/nsleep-lat.c
71
ts.tv_sec++;
tools/testing/selftests/timers/nsleep-lat.c
73
return ts;
tools/testing/selftests/timers/raw_skew.c
44
unsigned long long ts_to_nsec(struct timespec ts)
tools/testing/selftests/timers/raw_skew.c
46
return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec;
tools/testing/selftests/timers/raw_skew.c
51
struct timespec ts;
tools/testing/selftests/timers/raw_skew.c
53
ts.tv_sec = ns/NSEC_PER_SEC;
tools/testing/selftests/timers/raw_skew.c
54
ts.tv_nsec = ns%NSEC_PER_SEC;
tools/testing/selftests/timers/raw_skew.c
55
return ts;
tools/testing/selftests/timers/set-timer-lat.c
88
struct timespec ts;
tools/testing/selftests/timers/set-timer-lat.c
90
clock_gettime(clock_id, &ts);
tools/testing/selftests/timers/set-timer-lat.c
93
delta_ns = timespec_sub(start_time, ts);
tools/testing/selftests/ublk/fault_inject.c
88
struct __kernel_timespec ts = {
tools/testing/selftests/ublk/fault_inject.c
93
io_uring_prep_timeout(sqe, &ts, 1, 0);
tools/testing/selftests/vDSO/vdso_test_abi.c
121
struct timespec ts;
tools/testing/selftests/vDSO/vdso_test_abi.c
122
long ret = VDSO_CALL(vdso_clock_gettime, 2, clk_id, &ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
126
(long long)ts.tv_sec, (long long)ts.tv_nsec);
tools/testing/selftests/vDSO/vdso_test_abi.c
173
struct timespec ts, sys_ts;
tools/testing/selftests/vDSO/vdso_test_abi.c
174
long ret = VDSO_CALL(vdso_clock_getres, 2, clk_id, &ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
178
(long long)ts.tv_sec, (long long)ts.tv_nsec);
tools/testing/selftests/vDSO/vdso_test_abi.c
188
if ((sys_ts.tv_sec != ts.tv_sec) || (sys_ts.tv_nsec != ts.tv_nsec))
tools/testing/selftests/vDSO/vdso_test_abi.c
216
struct vdso_timespec64 ts, sys_ts;
tools/testing/selftests/vDSO/vdso_test_abi.c
217
long ret = VDSO_CALL(vdso_clock_getres_time64, 2, clk_id, &ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
221
(long long)ts.tv_sec, (long long)ts.tv_nsec);
tools/testing/selftests/vDSO/vdso_test_abi.c
231
if ((sys_ts.tv_sec != ts.tv_sec) || (sys_ts.tv_nsec != ts.tv_nsec))
tools/testing/selftests/vDSO/vdso_test_abi.c
36
typedef long (*vdso_clock_gettime_t)(clockid_t clk_id, struct timespec *ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
37
typedef long (*vdso_clock_gettime64_t)(clockid_t clk_id, struct vdso_timespec64 *ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
38
typedef long (*vdso_clock_getres_t)(clockid_t clk_id, struct timespec *ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
39
typedef long (*vdso_clock_getres_time64_t)(clockid_t clk_id, struct vdso_timespec64 *ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
94
struct vdso_timespec64 ts;
tools/testing/selftests/vDSO/vdso_test_abi.c
95
long ret = VDSO_CALL(vdso_clock_gettime64, 2, clk_id, &ts);
tools/testing/selftests/vDSO/vdso_test_abi.c
99
(long long)ts.tv_sec, (long long)ts.tv_nsec);
tools/testing/selftests/vDSO/vdso_test_correctness.c
152
static inline int sys_clock_gettime(clockid_t id, struct timespec *ts)
tools/testing/selftests/vDSO/vdso_test_correctness.c
154
return syscall(__NR_clock_gettime, id, ts);
tools/testing/selftests/vDSO/vdso_test_correctness.c
157
static inline int sys_clock_gettime64(clockid_t id, struct __kernel_timespec *ts)
tools/testing/selftests/vDSO/vdso_test_correctness.c
159
return syscall(__NR_clock_gettime64, id, ts);
tools/testing/selftests/vfio/vfio_pci_device_init_perf_test.c
67
static s64 to_ns(struct timespec ts)
tools/testing/selftests/vfio/vfio_pci_device_init_perf_test.c
69
return (s64)ts.tv_nsec + NSEC_PER_SEC * (s64)ts.tv_sec;
tools/testing/selftests/vfio/vfio_pci_device_init_perf_test.c
74
struct timespec ts = {
tools/testing/selftests/vfio/vfio_pci_device_init_perf_test.c
79
return ts;
tools/testing/vsock/timeout.c
72
struct timespec ts = {
tools/testing/vsock/timeout.c
77
return nanosleep(&ts, NULL);
tools/testing/vsock/vsock_perf.c
47
struct timespec ts;
tools/testing/vsock/vsock_perf.c
49
if (clock_gettime(CLOCK_REALTIME, &ts))
tools/testing/vsock/vsock_perf.c
52
return (ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec;
tools/testing/vsock/vsock_test.c
591
struct timespec ts;
tools/testing/vsock/vsock_test.c
593
if (clock_gettime(CLOCK_REALTIME, &ts)) {
tools/testing/vsock/vsock_test.c
598
return (ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec;
tools/thermal/tmon/pid.c
101
i_term = p_param.kp * p_param.ki * p_param.ts * ek;
tools/thermal/tmon/pid.c
102
d_term = -p_param.kp * p_param.kd * (xk - 2 * xk_1 + xk_2) / p_param.ts;
tools/thermal/tmon/pid.c
59
p_param.ts = ticktime;
tools/thermal/tmon/tmon.h
129
double ts;
tools/tracing/rtla/src/timerlat_aa.c
155
taa_data->tlat_irq_timstamp = record->ts;
tools/tracing/rtla/src/timerlat_aa.c
223
taa_data->tlat_thread_timstamp = record->ts;
tools/virtio/virtio-trace/trace-agent-rw.c
108
struct rw_thread_info *ts = (struct rw_thread_info *)thread_info;
tools/virtio/virtio-trace/trace-agent-rw.c
110
bind_cpu(ts->cpu_num);
tools/virtio/virtio-trace/trace-agent-rw.c
127
rlen = splice(ts->in_fd, NULL, ts->read_pipe, NULL,
tools/virtio/virtio-trace/trace-agent-rw.c
128
ts->pipe_size, SPLICE_F_MOVE | SPLICE_F_MORE);
tools/virtio/virtio-trace/trace-agent-rw.c
131
pr_err("Splice_read in rw-thread(%d)\n", ts->cpu_num);
tools/virtio/virtio-trace/trace-agent-rw.c
141
pr_debug("Read retry(cpu:%d)\n", ts->cpu_num);
tools/virtio/virtio-trace/trace-agent-rw.c
148
ret = splice(ts->write_pipe, NULL, ts->out_fd, NULL,
tools/virtio/virtio-trace/trace-agent-rw.c
154
ts->cpu_num);