st 110 arch/alpha/boot/tools/objstrip.c struct stat st; st 118 arch/alpha/boot/tools/objstrip.c if (fstat(fd, &st) == -1) { st 123 arch/alpha/boot/tools/objstrip.c size = (st.st_size + BLOCK_SIZE - 1) & ~(BLOCK_SIZE - 1); st 89 arch/arc/include/asm/entry-arcv2.h st r0, [sp] ; orig_r0 st 117 arch/arc/include/asm/entry-arcv2.h st blink, [sp, PT_blink] st 123 arch/arc/include/asm/entry-arcv2.h st lp_count, [sp, PT_lpc] st 139 arch/arc/include/asm/entry-arcv2.h st r12, [sp, PT_sp + 4] st 140 arch/arc/include/asm/entry-arcv2.h st r30, [sp, PT_sp + 8] st 157 arch/arc/include/asm/entry-arcv2.h st r10, [sp, PT_sp] ; SP (pt_regs->sp) st 160 arch/arc/include/asm/entry-arcv2.h st r25, [sp, PT_user_r25] st 89 arch/arc/include/asm/entry-compact.h st sp, [sp, PT_sp - SZ_PT_REGS] st 99 arch/arc/include/asm/entry-compact.h st sp, [r9, PT_sp - SZ_PT_REGS] st 136 arch/arc/include/asm/entry-compact.h st \reg, [\mem] st 174 arch/arc/include/asm/entry-compact.h st.a r0, [sp, -8] /* orig_r0 needed for syscall (skip ECR slot) */ st 199 arch/arc/include/asm/entry-compact.h st r10, [sp, PT_event] /* EV_Trap expects r10 to have ECR */ st 34 arch/arc/include/asm/entry.h st.a \reg, [sp, -4] st 195 arch/arc/include/asm/entry.h st r12, [sp, PT_user_r25] st 255 arch/arc/include/asm/entry.h st \tsk, [\tmp] st 270 arch/arc/include/asm/entry.h st \tsk, [@_current_task] st 17 arch/arc/include/asm/linkage.h st \e, [sp, \off] st 18 arch/arc/include/asm/linkage.h st \o, [sp, \off+4] st 36 arch/arc/include/asm/tlb-mmu1.h st r0,[jh_ex_way_sel] ; store back st 66 arch/arm/include/asm/barrier.h #define wmb() __arm_heavy_mb(st) st 85 arch/arm/mach-omap2/prm2xxx_3xxx.c u32 rst, st; st 89 arch/arm/mach-omap2/prm2xxx_3xxx.c st = 1 << st_shift; st 96 arch/arm/mach-omap2/prm2xxx_3xxx.c omap2_prm_rmw_mod_reg_bits(0xffffffff, st, prm_mod, OMAP2_RM_RSTST); st 101 arch/arm/mach-omap2/prm2xxx_3xxx.c st), st 358 arch/arm/mach-omap2/prm33xx.c int st, ctrl; st 360 arch/arm/mach-omap2/prm33xx.c st = am33xx_prm_read_reg(pwrdm->prcm_offs, st 367 arch/arm/mach-omap2/prm33xx.c st &= OMAP_POWERSTATEST_MASK; st 370 arch/arm/mach-omap2/prm33xx.c if (st != ctrl) st 155 arch/arm/mach-omap2/prm3xxx.c u32 mask, st; st 159 arch/arm/mach-omap2/prm3xxx.c st = omap2_prm_read_mod_reg(OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); st 161 arch/arm/mach-omap2/prm3xxx.c events[0] = mask & st; st 205 arch/arm/mach-omap2/prm44xx.c u32 mask, st; st 210 arch/arm/mach-omap2/prm44xx.c st = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, irqst_offs); st 212 arch/arm/mach-omap2/prm44xx.c return mask & st; st 705 arch/arm/mach-omap2/prm44xx.c int st, ctrl; st 707 arch/arm/mach-omap2/prm44xx.c st = omap4_prminst_read_inst_reg(pwrdm->prcm_partition, st 717 arch/arm/mach-omap2/prm44xx.c st &= OMAP_POWERSTATEST_MASK; st 720 arch/arm/mach-omap2/prm44xx.c if (st != ctrl) st 670 arch/arm/mach-rpc/ecard.c #define ec_set_resource(ec,nr,st,sz) \ st 673 arch/arm/mach-rpc/ecard.c (ec)->resource[nr].start = st; \ st 674 arch/arm/mach-rpc/ecard.c (ec)->resource[nr].end = (st) + (sz) - 1; \ st 113 arch/arm/mach-tegra/iomap.h #define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz))) st 140 arch/arm/mm/cache-l2x0.c dsb(st); st 1445 arch/arm/mm/cache-l2x0.c dsb(st); st 220 arch/arm/mm/dump.c static void dump_prot(struct pg_state *st, const struct prot_bits *bits, size_t num) st 227 arch/arm/mm/dump.c if ((st->current_prot & bits->mask) == bits->val) st 233 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, " %s", s); st 237 arch/arm/mm/dump.c static void note_prot_wx(struct pg_state *st, unsigned long addr) st 239 arch/arm/mm/dump.c if (!st->check_wx) st 241 arch/arm/mm/dump.c if ((st->current_prot & pg_level[st->level].ro_bit->mask) == st 242 arch/arm/mm/dump.c pg_level[st->level].ro_bit->val) st 244 arch/arm/mm/dump.c if ((st->current_prot & pg_level[st->level].nx_bit->mask) == st 245 arch/arm/mm/dump.c pg_level[st->level].nx_bit->val) st 249 arch/arm/mm/dump.c (void *)st->start_address); st 251 arch/arm/mm/dump.c st->wx_pages += (addr - st->start_address) / PAGE_SIZE; st 254 arch/arm/mm/dump.c static void note_page(struct pg_state *st, unsigned long addr, st 260 arch/arm/mm/dump.c if (!st->level) { st 261 arch/arm/mm/dump.c st->level = level; st 262 arch/arm/mm/dump.c st->current_prot = prot; st 263 arch/arm/mm/dump.c st->current_domain = domain; st 264 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 265 arch/arm/mm/dump.c } else if (prot != st->current_prot || level != st->level || st 266 arch/arm/mm/dump.c domain != st->current_domain || st 267 arch/arm/mm/dump.c addr >= st->marker[1].start_address) { st 271 arch/arm/mm/dump.c if (st->current_prot) { st 272 arch/arm/mm/dump.c note_prot_wx(st, addr); st 273 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, "0x%08lx-0x%08lx ", st 274 arch/arm/mm/dump.c st->start_address, addr); st 276 arch/arm/mm/dump.c delta = (addr - st->start_address) >> 10; st 281 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, "%9lu%c", delta, *unit); st 282 arch/arm/mm/dump.c if (st->current_domain) st 283 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, " %s", st 284 arch/arm/mm/dump.c st->current_domain); st 285 arch/arm/mm/dump.c if (pg_level[st->level].bits) st 286 arch/arm/mm/dump.c dump_prot(st, pg_level[st->level].bits, pg_level[st->level].num); st 287 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, "\n"); st 290 arch/arm/mm/dump.c if (addr >= st->marker[1].start_address) { st 291 arch/arm/mm/dump.c st->marker++; st 292 arch/arm/mm/dump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st 293 arch/arm/mm/dump.c st->marker->name); st 295 arch/arm/mm/dump.c st->start_address = addr; st 296 arch/arm/mm/dump.c st->current_prot = prot; st 297 arch/arm/mm/dump.c st->current_domain = domain; st 298 arch/arm/mm/dump.c st->level = level; st 302 arch/arm/mm/dump.c static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start, st 311 arch/arm/mm/dump.c note_page(st, addr, 4, pte_val(*pte), domain); st 334 arch/arm/mm/dump.c static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) st 345 arch/arm/mm/dump.c note_page(st, addr, 3, pmd_val(*pmd), domain); st 347 arch/arm/mm/dump.c walk_pte(st, pmd, addr, domain); st 353 arch/arm/mm/dump.c note_page(st, addr, 3, pmd_val(*pmd), domain); st 358 arch/arm/mm/dump.c static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) st 367 arch/arm/mm/dump.c walk_pmd(st, pud, addr); st 369 arch/arm/mm/dump.c note_page(st, addr, 2, pud_val(*pud), NULL); st 374 arch/arm/mm/dump.c static void walk_pgd(struct pg_state *st, struct mm_struct *mm, st 384 arch/arm/mm/dump.c walk_pud(st, pgd, addr); st 386 arch/arm/mm/dump.c note_page(st, addr, 1, pgd_val(*pgd), NULL); st 393 arch/arm/mm/dump.c struct pg_state st = { st 399 arch/arm/mm/dump.c walk_pgd(&st, info->mm, info->base_addr); st 400 arch/arm/mm/dump.c note_page(&st, 0, 0, 0, NULL); st 428 arch/arm/mm/dump.c struct pg_state st = { st 437 arch/arm/mm/dump.c walk_pgd(&st, &init_mm, 0); st 438 arch/arm/mm/dump.c note_page(&st, 0, 0, 0, NULL); st 439 arch/arm/mm/dump.c if (st.wx_pages) st 441 arch/arm/mm/dump.c st.wx_pages); st 27 arch/arm64/crypto/sha3-ce-glue.c asmlinkage void sha3_ce_transform(u64 *st, const u8 *data, int blocks, st 47 arch/arm64/crypto/sha3-ce-glue.c sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); st 60 arch/arm64/crypto/sha3-ce-glue.c sha3_ce_transform(sctx->st, data, blocks, digest_size); st 88 arch/arm64/crypto/sha3-ce-glue.c sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); st 92 arch/arm64/crypto/sha3-ce-glue.c put_unaligned_le64(sctx->st[i], digest++); st 95 arch/arm64/crypto/sha3-ce-glue.c put_unaligned_le32(sctx->st[i], (__le32 *)digest); st 65 arch/arm64/include/asm/asm-uaccess.h sbfx \dst, \addr, #0, #56 st 66 arch/arm64/include/asm/asm-uaccess.h and \dst, \dst, \addr st 202 arch/arm64/include/asm/assembler.h adrp \dst, \sym st 203 arch/arm64/include/asm/assembler.h add \dst, \dst, :lo12:\sym st 215 arch/arm64/include/asm/assembler.h adrp \dst, \sym st 216 arch/arm64/include/asm/assembler.h ldr \dst, [\dst, :lo12:\sym] st 219 arch/arm64/include/asm/assembler.h ldr \dst, [\tmp, :lo12:\sym] st 241 arch/arm64/include/asm/assembler.h add \dst, \tmp, #:lo12:\sym st 247 arch/arm64/include/asm/assembler.h add \dst, \dst, \tmp st 256 arch/arm64/include/asm/assembler.h adr_l \dst, \sym st 262 arch/arm64/include/asm/assembler.h ldr \dst, [\dst, \tmp] st 633 arch/arm64/include/asm/assembler.h __frame st, \regcount, \extra st 655 arch/arm64/include/asm/assembler.h .ifc \op, st st 34 arch/arm64/include/asm/barrier.h #define wmb() dsb(st) st 114 arch/arm64/kernel/fpsimd.c struct user_fpsimd_state *st; st 310 arch/arm64/kernel/fpsimd.c &last->st->fpsr); st 312 arch/arm64/kernel/fpsimd.c fpsimd_save_state(last->st); st 1000 arch/arm64/kernel/fpsimd.c wrong_task = __this_cpu_read(fpsimd_last_state.st) != st 1098 arch/arm64/kernel/fpsimd.c last->st = ¤t->thread.uw.fpsimd_state; st 1114 arch/arm64/kernel/fpsimd.c void fpsimd_bind_state_to_cpu(struct user_fpsimd_state *st, void *sve_state, st 1123 arch/arm64/kernel/fpsimd.c last->st = st; st 1218 arch/arm64/kernel/fpsimd.c __this_cpu_write(fpsimd_last_state.st, NULL); st 1406 arch/arm64/kernel/fpsimd.c per_cpu(fpsimd_last_state.st, cpu) = NULL; st 196 arch/arm64/mm/dump.c static void dump_prot(struct pg_state *st, const struct prot_bits *bits, st 204 arch/arm64/mm/dump.c if ((st->current_prot & bits->mask) == bits->val) st 210 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, " %s", s); st 214 arch/arm64/mm/dump.c static void note_prot_uxn(struct pg_state *st, unsigned long addr) st 216 arch/arm64/mm/dump.c if (!st->check_wx) st 219 arch/arm64/mm/dump.c if ((st->current_prot & PTE_UXN) == PTE_UXN) st 223 arch/arm64/mm/dump.c (void *)st->start_address, (void *)st->start_address); st 225 arch/arm64/mm/dump.c st->uxn_pages += (addr - st->start_address) / PAGE_SIZE; st 228 arch/arm64/mm/dump.c static void note_prot_wx(struct pg_state *st, unsigned long addr) st 230 arch/arm64/mm/dump.c if (!st->check_wx) st 232 arch/arm64/mm/dump.c if ((st->current_prot & PTE_RDONLY) == PTE_RDONLY) st 234 arch/arm64/mm/dump.c if ((st->current_prot & PTE_PXN) == PTE_PXN) st 238 arch/arm64/mm/dump.c (void *)st->start_address, (void *)st->start_address); st 240 arch/arm64/mm/dump.c st->wx_pages += (addr - st->start_address) / PAGE_SIZE; st 243 arch/arm64/mm/dump.c static void note_page(struct pg_state *st, unsigned long addr, unsigned level, st 249 arch/arm64/mm/dump.c if (!st->level) { st 250 arch/arm64/mm/dump.c st->level = level; st 251 arch/arm64/mm/dump.c st->current_prot = prot; st 252 arch/arm64/mm/dump.c st->start_address = addr; st 253 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 254 arch/arm64/mm/dump.c } else if (prot != st->current_prot || level != st->level || st 255 arch/arm64/mm/dump.c addr >= st->marker[1].start_address) { st 259 arch/arm64/mm/dump.c if (st->current_prot) { st 260 arch/arm64/mm/dump.c note_prot_uxn(st, addr); st 261 arch/arm64/mm/dump.c note_prot_wx(st, addr); st 262 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, "0x%016lx-0x%016lx ", st 263 arch/arm64/mm/dump.c st->start_address, addr); st 265 arch/arm64/mm/dump.c delta = (addr - st->start_address) >> 10; st 270 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, "%9lu%c %s", delta, *unit, st 271 arch/arm64/mm/dump.c pg_level[st->level].name); st 272 arch/arm64/mm/dump.c if (pg_level[st->level].bits) st 273 arch/arm64/mm/dump.c dump_prot(st, pg_level[st->level].bits, st 274 arch/arm64/mm/dump.c pg_level[st->level].num); st 275 arch/arm64/mm/dump.c pt_dump_seq_puts(st->seq, "\n"); st 278 arch/arm64/mm/dump.c if (addr >= st->marker[1].start_address) { st 279 arch/arm64/mm/dump.c st->marker++; st 280 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 283 arch/arm64/mm/dump.c st->start_address = addr; st 284 arch/arm64/mm/dump.c st->current_prot = prot; st 285 arch/arm64/mm/dump.c st->level = level; st 288 arch/arm64/mm/dump.c if (addr >= st->marker[1].start_address) { st 289 arch/arm64/mm/dump.c st->marker++; st 290 arch/arm64/mm/dump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 295 arch/arm64/mm/dump.c static void walk_pte(struct pg_state *st, pmd_t *pmdp, unsigned long start, st 302 arch/arm64/mm/dump.c note_page(st, addr, 4, READ_ONCE(pte_val(*ptep))); st 306 arch/arm64/mm/dump.c static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start, st 317 arch/arm64/mm/dump.c note_page(st, addr, 3, pmd_val(pmd)); st 320 arch/arm64/mm/dump.c walk_pte(st, pmdp, addr, next); st 325 arch/arm64/mm/dump.c static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start, st 336 arch/arm64/mm/dump.c note_page(st, addr, 2, pud_val(pud)); st 339 arch/arm64/mm/dump.c walk_pmd(st, pudp, addr, next); st 344 arch/arm64/mm/dump.c static void walk_pgd(struct pg_state *st, struct mm_struct *mm, st 356 arch/arm64/mm/dump.c note_page(st, addr, 1, pgd_val(pgd)); st 359 arch/arm64/mm/dump.c walk_pud(st, pgdp, addr, next); st 366 arch/arm64/mm/dump.c struct pg_state st = { st 371 arch/arm64/mm/dump.c walk_pgd(&st, info->mm, info->base_addr); st 373 arch/arm64/mm/dump.c note_page(&st, 0, 0, 0); st 394 arch/arm64/mm/dump.c struct pg_state st = { st 403 arch/arm64/mm/dump.c walk_pgd(&st, &init_mm, PAGE_OFFSET); st 404 arch/arm64/mm/dump.c note_page(&st, 0, 0, 0); st 405 arch/arm64/mm/dump.c if (st.wx_pages || st.uxn_pages) st 407 arch/arm64/mm/dump.c st.wx_pages, st.uxn_pages); st 604 arch/ia64/kernel/palinfo.c pal_bus_features_u_t av, st, ct; st 609 arch/ia64/kernel/palinfo.c if ((ret=ia64_pal_bus_get_features(&av, &st, &ct)) != 0) st 613 arch/ia64/kernel/palinfo.c status = st.pal_bus_features_val; st 185 arch/m68k/include/asm/floppy.h register unsigned char st; st 211 arch/m68k/include/asm/floppy.h st=1; st 214 arch/m68k/include/asm/floppy.h st=inb(virtual_dma_port+4) & 0xa0 ; st 215 arch/m68k/include/asm/floppy.h if(st != 0xa0) st 225 arch/m68k/include/asm/floppy.h st = inb(virtual_dma_port+4); st 231 arch/m68k/include/asm/floppy.h if(st == 0x20) st 233 arch/m68k/include/asm/floppy.h if(!(st & 0x20)) { st 116 arch/m68k/include/asm/sun3xflop.h register unsigned char st; st 145 arch/m68k/include/asm/sun3xflop.h st = *(sun3x_fdc.status_r); st 149 arch/m68k/include/asm/sun3xflop.h if((st & 0x80) == 0) { st 155 arch/m68k/include/asm/sun3xflop.h if((st & 0x20) == 0) st 169 arch/m68k/include/asm/sun3xflop.h st = *(sun3x_fdc.status_r); st 176 arch/m68k/include/asm/sun3xflop.h if(st == 0x20) st 178 arch/m68k/include/asm/sun3xflop.h if(!(st & 0x20)) { st 301 arch/mips/include/asm/asmmacro.h st.b $w\wd, \off(\base) st 310 arch/mips/include/asm/asmmacro.h st.h $w\wd, \off(\base) st 319 arch/mips/include/asm/asmmacro.h st.w $w\wd, \off(\base) st 328 arch/mips/include/asm/asmmacro.h st.d $w\wd, \off(\base) st 44 arch/mips/include/asm/cmpxchg.h #define __xchg_asm(ld, st, m, val) \ st 59 arch/mips/include/asm/cmpxchg.h " " st " $1, %1 \n" \ st 116 arch/mips/include/asm/cmpxchg.h #define __cmpxchg_asm(ld, st, m, old, new) \ st 132 arch/mips/include/asm/cmpxchg.h " " st " $1, %1 \n" \ st 54 arch/parisc/include/asm/floppy.h register unsigned char st; st 78 arch/parisc/include/asm/floppy.h st = fd_inb(virtual_dma_port+4) & 0xa0 ; st 79 arch/parisc/include/asm/floppy.h if (st != 0xa0) st 90 arch/parisc/include/asm/floppy.h st = fd_inb(virtual_dma_port+4); st 96 arch/parisc/include/asm/floppy.h if (st == 0x20) st 98 arch/parisc/include/asm/floppy.h if (!(st & 0x20)) { st 47 arch/powerpc/boot/mktree.c struct stat st; st 55 arch/powerpc/boot/mktree.c if (stat(argv[1], &st) < 0) { st 60 arch/powerpc/boot/mktree.c nblks = (st.st_size + IMGBLK) / IMGBLK; st 53 arch/powerpc/include/asm/floppy.h unsigned char st; st 61 arch/powerpc/include/asm/floppy.h st = 1; st 64 arch/powerpc/include/asm/floppy.h st=inb(virtual_dma_port+4) & 0xa0 ; st 65 arch/powerpc/include/asm/floppy.h if (st != 0xa0) st 74 arch/powerpc/include/asm/floppy.h st = inb(virtual_dma_port+4); st 76 arch/powerpc/include/asm/floppy.h if (st == 0x20) st 78 arch/powerpc/include/asm/floppy.h if (!(st & 0x20)) { st 122 arch/powerpc/include/asm/kvm_host.h u64 st; st 67 arch/powerpc/kvm/book3s.c { "st", VCPU_STAT(st) }, st 330 arch/powerpc/kvm/powerpc.c vcpu->stat.st++; st 706 arch/powerpc/lib/rheap.c static rh_stats_t st[32]; /* XXX maximum 32 blocks */ st 710 arch/powerpc/lib/rheap.c maxnr = ARRAY_SIZE(st); st 717 arch/powerpc/lib/rheap.c nr = rh_get_stats(info, RHGS_FREE, maxnr, st); st 723 arch/powerpc/lib/rheap.c st[i].start, st[i].start + st[i].size, st 724 arch/powerpc/lib/rheap.c st[i].size); st 728 arch/powerpc/lib/rheap.c nr = rh_get_stats(info, RHGS_TAKEN, maxnr, st); st 734 arch/powerpc/lib/rheap.c st[i].start, st[i].start + st[i].size, st 735 arch/powerpc/lib/rheap.c st[i].size, st[i].owner != NULL ? st[i].owner : ""); st 142 arch/powerpc/mm/ptdump/hashpagetable.c static int calculate_pagesize(struct pg_state *st, int ps, char s[]) st 151 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, " %s_ps: %i%c\t", s, 1<<ps, *unit); st 155 arch/powerpc/mm/ptdump/hashpagetable.c static void dump_flag_info(struct pg_state *st, const struct flag_info st 172 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, " %s:%llx", flag->set, val); st 179 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, " %s", s); st 184 arch/powerpc/mm/ptdump/hashpagetable.c static void dump_hpte_info(struct pg_state *st, unsigned long ea, u64 v, u64 r, st 189 arch/powerpc/mm/ptdump/hashpagetable.c while (ea >= st->marker[1].start_address) { st 190 arch/powerpc/mm/ptdump/hashpagetable.c st->marker++; st 191 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 193 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, "0x%lx:\t", ea); st 194 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, "AVPN:%llx\t", HPTE_V_AVPN_VAL(v)); st 195 arch/powerpc/mm/ptdump/hashpagetable.c dump_flag_info(st, v_flag_array, v, ARRAY_SIZE(v_flag_array)); st 196 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, " rpn: %lx\t", rpn); st 197 arch/powerpc/mm/ptdump/hashpagetable.c dump_flag_info(st, r_flag_array, r, ARRAY_SIZE(r_flag_array)); st 199 arch/powerpc/mm/ptdump/hashpagetable.c calculate_pagesize(st, bps, "base"); st 200 arch/powerpc/mm/ptdump/hashpagetable.c aps_index = calculate_pagesize(st, aps, "actual"); st 202 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, "LP enc: %lx", lp); st 203 arch/powerpc/mm/ptdump/hashpagetable.c seq_putc(st->seq, '\n'); st 323 arch/powerpc/mm/ptdump/hashpagetable.c static unsigned long hpte_find(struct pg_state *st, unsigned long ea, int psize) st 368 arch/powerpc/mm/ptdump/hashpagetable.c dump_hpte_info(st, ea, v, r, rpn, base_psize, actual_psize, lp_bits); st 372 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) st 394 arch/powerpc/mm/ptdump/hashpagetable.c status = hpte_find(st, addr, psize); st 399 arch/powerpc/mm/ptdump/hashpagetable.c seq_printf(st->seq, "page probably bolted before linux" st 406 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) st 416 arch/powerpc/mm/ptdump/hashpagetable.c walk_pte(st, pmd, addr); st 420 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) st 430 arch/powerpc/mm/ptdump/hashpagetable.c walk_pmd(st, pud, addr); st 434 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_pagetables(struct pg_state *st) st 448 arch/powerpc/mm/ptdump/hashpagetable.c walk_pud(st, pgd, addr); st 453 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_linearmapping(struct pg_state *st) st 465 arch/powerpc/mm/ptdump/hashpagetable.c hpte_find(st, addr, mmu_linear_psize); st 468 arch/powerpc/mm/ptdump/hashpagetable.c static void walk_vmemmap(struct pg_state *st) st 479 arch/powerpc/mm/ptdump/hashpagetable.c hpte_find(st, ptr->virt_addr, mmu_vmemmap_psize); st 482 arch/powerpc/mm/ptdump/hashpagetable.c seq_puts(st->seq, "---[ vmemmap end ]---\n"); st 501 arch/powerpc/mm/ptdump/hashpagetable.c struct pg_state st = { st 510 arch/powerpc/mm/ptdump/hashpagetable.c walk_linearmapping(&st); st 511 arch/powerpc/mm/ptdump/hashpagetable.c walk_pagetables(&st); st 512 arch/powerpc/mm/ptdump/hashpagetable.c walk_vmemmap(&st); st 114 arch/powerpc/mm/ptdump/ptdump.c static void dump_flag_info(struct pg_state *st, const struct flag_info st 131 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, " %s:%llx", flag->set, val); st 138 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, " %s", s); st 140 arch/powerpc/mm/ptdump/ptdump.c st->current_flags &= ~flag->mask; st 142 arch/powerpc/mm/ptdump/ptdump.c if (st->current_flags != 0) st 143 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, " unknown flags:%llx", st->current_flags); st 146 arch/powerpc/mm/ptdump/ptdump.c static void dump_addr(struct pg_state *st, unsigned long addr) st 158 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, REG "-" REG " ", st->start_address, addr - 1); st 159 arch/powerpc/mm/ptdump/ptdump.c if (st->start_pa == st->last_pa && st->start_address + st->page_size != addr) { st 160 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, "[" REG "]", st->start_pa); st 161 arch/powerpc/mm/ptdump/ptdump.c delta = st->page_size >> 10; st 163 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, " " REG " ", st->start_pa); st 164 arch/powerpc/mm/ptdump/ptdump.c delta = (addr - st->start_address) >> 10; st 171 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, "%9lu%c", delta, *unit); st 175 arch/powerpc/mm/ptdump/ptdump.c static void note_prot_wx(struct pg_state *st, unsigned long addr) st 177 arch/powerpc/mm/ptdump/ptdump.c pte_t pte = __pte(st->current_flags); st 179 arch/powerpc/mm/ptdump/ptdump.c if (!IS_ENABLED(CONFIG_PPC_DEBUG_WX) || !st->check_wx) st 186 arch/powerpc/mm/ptdump/ptdump.c (void *)st->start_address, (void *)st->start_address); st 188 arch/powerpc/mm/ptdump/ptdump.c st->wx_pages += (addr - st->start_address) / PAGE_SIZE; st 191 arch/powerpc/mm/ptdump/ptdump.c static void note_page(struct pg_state *st, unsigned long addr, st 198 arch/powerpc/mm/ptdump/ptdump.c if (!st->level) { st 199 arch/powerpc/mm/ptdump/ptdump.c st->level = level; st 200 arch/powerpc/mm/ptdump/ptdump.c st->current_flags = flag; st 201 arch/powerpc/mm/ptdump/ptdump.c st->start_address = addr; st 202 arch/powerpc/mm/ptdump/ptdump.c st->start_pa = pa; st 203 arch/powerpc/mm/ptdump/ptdump.c st->last_pa = pa; st 204 arch/powerpc/mm/ptdump/ptdump.c st->page_size = page_size; st 205 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 214 arch/powerpc/mm/ptdump/ptdump.c } else if (flag != st->current_flags || level != st->level || st 215 arch/powerpc/mm/ptdump/ptdump.c addr >= st->marker[1].start_address || st 216 arch/powerpc/mm/ptdump/ptdump.c (pa != st->last_pa + st->page_size && st 217 arch/powerpc/mm/ptdump/ptdump.c (pa != st->start_pa || st->start_pa != st->last_pa))) { st 220 arch/powerpc/mm/ptdump/ptdump.c if (st->current_flags) { st 221 arch/powerpc/mm/ptdump/ptdump.c note_prot_wx(st, addr); st 222 arch/powerpc/mm/ptdump/ptdump.c dump_addr(st, addr); st 225 arch/powerpc/mm/ptdump/ptdump.c if (pg_level[st->level].flag) st 226 arch/powerpc/mm/ptdump/ptdump.c dump_flag_info(st, pg_level[st->level].flag, st 227 arch/powerpc/mm/ptdump/ptdump.c st->current_flags, st 228 arch/powerpc/mm/ptdump/ptdump.c pg_level[st->level].num); st 230 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_putc(st->seq, '\n'); st 237 arch/powerpc/mm/ptdump/ptdump.c while (addr >= st->marker[1].start_address) { st 238 arch/powerpc/mm/ptdump/ptdump.c st->marker++; st 239 arch/powerpc/mm/ptdump/ptdump.c pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); st 241 arch/powerpc/mm/ptdump/ptdump.c st->start_address = addr; st 242 arch/powerpc/mm/ptdump/ptdump.c st->start_pa = pa; st 243 arch/powerpc/mm/ptdump/ptdump.c st->last_pa = pa; st 244 arch/powerpc/mm/ptdump/ptdump.c st->page_size = page_size; st 245 arch/powerpc/mm/ptdump/ptdump.c st->current_flags = flag; st 246 arch/powerpc/mm/ptdump/ptdump.c st->level = level; st 248 arch/powerpc/mm/ptdump/ptdump.c st->last_pa = pa; st 252 arch/powerpc/mm/ptdump/ptdump.c static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) st 260 arch/powerpc/mm/ptdump/ptdump.c note_page(st, addr, 4, pte_val(*pte), PAGE_SIZE); st 265 arch/powerpc/mm/ptdump/ptdump.c static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) st 275 arch/powerpc/mm/ptdump/ptdump.c walk_pte(st, pmd, addr); st 277 arch/powerpc/mm/ptdump/ptdump.c note_page(st, addr, 3, pmd_val(*pmd), PMD_SIZE); st 281 arch/powerpc/mm/ptdump/ptdump.c static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) st 291 arch/powerpc/mm/ptdump/ptdump.c walk_pmd(st, pud, addr); st 293 arch/powerpc/mm/ptdump/ptdump.c note_page(st, addr, 2, pud_val(*pud), PUD_SIZE); st 297 arch/powerpc/mm/ptdump/ptdump.c static void walk_pagetables(struct pg_state *st) st 300 arch/powerpc/mm/ptdump/ptdump.c unsigned long addr = st->start_address & PGDIR_MASK; st 310 arch/powerpc/mm/ptdump/ptdump.c walk_pud(st, pgd, addr); st 312 arch/powerpc/mm/ptdump/ptdump.c note_page(st, addr, 1, pgd_val(*pgd), PGDIR_SIZE); st 354 arch/powerpc/mm/ptdump/ptdump.c struct pg_state st = { st 362 arch/powerpc/mm/ptdump/ptdump.c st.start_address = KERN_VIRT_START; st 366 arch/powerpc/mm/ptdump/ptdump.c walk_pagetables(&st); st 367 arch/powerpc/mm/ptdump/ptdump.c note_page(&st, 0, 0, 0, 0); st 397 arch/powerpc/mm/ptdump/ptdump.c struct pg_state st = { st 406 arch/powerpc/mm/ptdump/ptdump.c st.start_address = KERN_VIRT_START; st 409 arch/powerpc/mm/ptdump/ptdump.c walk_pagetables(&st); st 411 arch/powerpc/mm/ptdump/ptdump.c if (st.wx_pages) st 413 arch/powerpc/mm/ptdump/ptdump.c st.wx_pages); st 38 arch/s390/crypto/sha3_256_s390.c memcpy(octx->st, sctx->state, sizeof(octx->st)); st 50 arch/s390/crypto/sha3_256_s390.c memcpy(sctx->state, ictx->st, sizeof(ictx->st)); st 63 arch/s390/crypto/sha3_256_s390.c memcpy(sctx->state, ictx->st, sizeof(ictx->st)); st 39 arch/s390/crypto/sha3_512_s390.c memcpy(octx->st, sctx->state, sizeof(octx->st)); st 54 arch/s390/crypto/sha3_512_s390.c memcpy(sctx->state, ictx->st, sizeof(ictx->st)); st 70 arch/s390/crypto/sha3_512_s390.c memcpy(sctx->state, ictx->st, sizeof(ictx->st)); st 68 arch/s390/include/asm/nmi.h u64 st : 1; /* 31 storage logical validity */ st 67 arch/s390/mm/dump_pagetables.c static void note_page(struct seq_file *m, struct pg_state *st, st 82 arch/s390/mm/dump_pagetables.c cur = st->current_prot; st 84 arch/s390/mm/dump_pagetables.c if (!st->level) { st 86 arch/s390/mm/dump_pagetables.c st->current_prot = new_prot; st 87 arch/s390/mm/dump_pagetables.c st->level = level; st 88 arch/s390/mm/dump_pagetables.c st->marker = address_markers; st 89 arch/s390/mm/dump_pagetables.c seq_printf(m, "---[ %s ]---\n", st->marker->name); st 90 arch/s390/mm/dump_pagetables.c } else if (prot != cur || level != st->level || st 91 arch/s390/mm/dump_pagetables.c st->current_address >= st->marker[1].start_address) { st 94 arch/s390/mm/dump_pagetables.c width, st->start_address, st 95 arch/s390/mm/dump_pagetables.c width, st->current_address); st 96 arch/s390/mm/dump_pagetables.c delta = (st->current_address - st->start_address) >> 10; st 102 arch/s390/mm/dump_pagetables.c print_prot(m, st->current_prot, st->level); st 103 arch/s390/mm/dump_pagetables.c while (st->current_address >= st->marker[1].start_address) { st 104 arch/s390/mm/dump_pagetables.c st->marker++; st 105 arch/s390/mm/dump_pagetables.c seq_printf(m, "---[ %s ]---\n", st->marker->name); st 107 arch/s390/mm/dump_pagetables.c st->start_address = st->current_address; st 108 arch/s390/mm/dump_pagetables.c st->current_prot = new_prot; st 109 arch/s390/mm/dump_pagetables.c st->level = level; st 115 arch/s390/mm/dump_pagetables.c struct pg_state *st) st 121 arch/s390/mm/dump_pagetables.c note_page(m, st, prot, 4); st 133 arch/s390/mm/dump_pagetables.c static void walk_pte_level(struct seq_file *m, struct pg_state *st, st 141 arch/s390/mm/dump_pagetables.c st->current_address = addr; st 145 arch/s390/mm/dump_pagetables.c note_page(m, st, prot, 4); st 150 arch/s390/mm/dump_pagetables.c static void walk_pmd_level(struct seq_file *m, struct pg_state *st, st 159 arch/s390/mm/dump_pagetables.c note_kasan_early_shadow_page(m, st); st 166 arch/s390/mm/dump_pagetables.c st->current_address = addr; st 172 arch/s390/mm/dump_pagetables.c note_page(m, st, prot, 3); st 174 arch/s390/mm/dump_pagetables.c walk_pte_level(m, st, pmd, addr); st 176 arch/s390/mm/dump_pagetables.c note_page(m, st, _PAGE_INVALID, 3); st 181 arch/s390/mm/dump_pagetables.c static void walk_pud_level(struct seq_file *m, struct pg_state *st, st 190 arch/s390/mm/dump_pagetables.c note_kasan_early_shadow_page(m, st); st 197 arch/s390/mm/dump_pagetables.c st->current_address = addr; st 203 arch/s390/mm/dump_pagetables.c note_page(m, st, prot, 2); st 205 arch/s390/mm/dump_pagetables.c walk_pmd_level(m, st, pud, addr); st 207 arch/s390/mm/dump_pagetables.c note_page(m, st, _PAGE_INVALID, 2); st 212 arch/s390/mm/dump_pagetables.c static void walk_p4d_level(struct seq_file *m, struct pg_state *st, st 220 arch/s390/mm/dump_pagetables.c note_kasan_early_shadow_page(m, st); st 227 arch/s390/mm/dump_pagetables.c st->current_address = addr; st 229 arch/s390/mm/dump_pagetables.c walk_pud_level(m, st, p4d, addr); st 231 arch/s390/mm/dump_pagetables.c note_page(m, st, _PAGE_INVALID, 2); st 239 arch/s390/mm/dump_pagetables.c struct pg_state st; st 243 arch/s390/mm/dump_pagetables.c memset(&st, 0, sizeof(st)); st 245 arch/s390/mm/dump_pagetables.c st.current_address = addr; st 248 arch/s390/mm/dump_pagetables.c walk_p4d_level(m, &st, pgd, addr); st 250 arch/s390/mm/dump_pagetables.c note_page(m, &st, _PAGE_INVALID, 1); st 255 arch/s390/mm/dump_pagetables.c st.current_address = max_addr; st 256 arch/s390/mm/dump_pagetables.c note_page(m, &st, 0, 0); st 72 arch/sparc/include/asm/winmacro.h st %g1, [%base_reg + STACKFRAME_SZ + PT_G1]; \ st 79 arch/sparc/include/asm/winmacro.h st %scratch, [%base_reg + STACKFRAME_SZ + PT_Y]; st 82 arch/sparc/include/asm/winmacro.h st %pt_psr, [%base_reg + STACKFRAME_SZ + PT_PSR]; \ st 83 arch/sparc/include/asm/winmacro.h st %pt_pc, [%base_reg + STACKFRAME_SZ + PT_PC]; \ st 84 arch/sparc/include/asm/winmacro.h st %pt_npc, [%base_reg + STACKFRAME_SZ + PT_NPC]; st 96 arch/sparc/include/asm/winmacro.h st %sp, [%scratch + TI_RWIN_SPTRS]; \ st 104 arch/sparc/include/asm/winmacro.h st %scratch, [%cur_reg + TI_W_SAVED]; st 26 arch/um/os-Linux/mem.c struct statfs st; st 29 arch/um/os-Linux/mem.c if (statfs(dir, &st) < 0) { st 31 arch/um/os-Linux/mem.c } else if (st.f_type != TMPFS_MAGIC) { st 117 arch/unicore32/include/asm/assembler.h usracc st, \reg, \ptr, \inc, \cond, \rept, \abort st 236 arch/unicore32/kernel/irq.c struct puv3_irq_state *st = &puv3_irq_state; st 238 arch/unicore32/kernel/irq.c st->saved = 1; st 239 arch/unicore32/kernel/irq.c st->icmr = readl(INTC_ICMR); st 240 arch/unicore32/kernel/irq.c st->iclr = readl(INTC_ICLR); st 241 arch/unicore32/kernel/irq.c st->iccr = readl(INTC_ICCR); st 264 arch/unicore32/kernel/irq.c struct puv3_irq_state *st = &puv3_irq_state; st 266 arch/unicore32/kernel/irq.c if (st->saved) { st 267 arch/unicore32/kernel/irq.c writel(st->iccr, INTC_ICCR); st 268 arch/unicore32/kernel/irq.c writel(st->iclr, INTC_ICLR); st 273 arch/unicore32/kernel/irq.c writel(st->icmr, INTC_ICMR); st 51 arch/x86/include/asm/cpu_entry_area.h #define CEA_ESTACK_SIZE(st) \ st 52 arch/x86/include/asm/cpu_entry_area.h sizeof(((struct cea_exception_stacks *)0)->st## _stack) st 54 arch/x86/include/asm/cpu_entry_area.h #define CEA_ESTACK_BOT(ceastp, st) \ st 55 arch/x86/include/asm/cpu_entry_area.h ((unsigned long)&(ceastp)->st## _stack) st 57 arch/x86/include/asm/cpu_entry_area.h #define CEA_ESTACK_TOP(ceastp, st) \ st 58 arch/x86/include/asm/cpu_entry_area.h (CEA_ESTACK_BOT(ceastp, st) + CEA_ESTACK_SIZE(st)) st 60 arch/x86/include/asm/cpu_entry_area.h #define CEA_ESTACK_OFFS(st) \ st 61 arch/x86/include/asm/cpu_entry_area.h offsetof(struct cea_exception_stacks, st## _stack) st 56 arch/x86/include/asm/floppy.h unsigned char st; st 77 arch/x86/include/asm/floppy.h st = 1; st 80 arch/x86/include/asm/floppy.h st = inb(virtual_dma_port + 4) & 0xa0; st 81 arch/x86/include/asm/floppy.h if (st != 0xa0) st 90 arch/x86/include/asm/floppy.h st = inb(virtual_dma_port + 4); st 96 arch/x86/include/asm/floppy.h if (st == 0x20) st 98 arch/x86/include/asm/floppy.h if (!(st & 0x20)) { st 213 arch/x86/include/asm/fpu/internal.h #define XSTATE_OP(op, st, lmask, hmask, err) \ st 223 arch/x86/include/asm/fpu/internal.h : "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \ st 240 arch/x86/include/asm/fpu/internal.h #define XSTATE_XSAVE(st, lmask, hmask, err) \ st 253 arch/x86/include/asm/fpu/internal.h : "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \ st 260 arch/x86/include/asm/fpu/internal.h #define XSTATE_XRESTORE(st, lmask, hmask) \ st 267 arch/x86/include/asm/fpu/internal.h : "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \ st 675 arch/x86/include/asm/kvm_host.h } st; st 32 arch/x86/include/uapi/asm/stat.h #define INIT_STRUCT_STAT_PADDING(st) do { \ st 33 arch/x86/include/uapi/asm/stat.h st.__unused4 = 0; \ st 34 arch/x86/include/uapi/asm/stat.h st.__unused5 = 0; \ st 76 arch/x86/include/uapi/asm/stat.h #define INIT_STRUCT_STAT64_PADDING(st) do { \ st 77 arch/x86/include/uapi/asm/stat.h memset(&st.__pad0, 0, sizeof(st.__pad0)); \ st 78 arch/x86/include/uapi/asm/stat.h memset(&st.__pad3, 0, sizeof(st.__pad3)); \ st 107 arch/x86/include/uapi/asm/stat.h #define INIT_STRUCT_STAT_PADDING(st) do { \ st 108 arch/x86/include/uapi/asm/stat.h st.__pad0 = 0; \ st 109 arch/x86/include/uapi/asm/stat.h st.__unused[0] = 0; \ st 110 arch/x86/include/uapi/asm/stat.h st.__unused[1] = 0; \ st 111 arch/x86/include/uapi/asm/stat.h st.__unused[2] = 0; \ st 1255 arch/x86/kernel/apic/x2apic_uv_x.c struct uv_systab *st; st 1261 arch/x86/kernel/apic/x2apic_uv_x.c st = uv_systab; st 1262 arch/x86/kernel/apic/x2apic_uv_x.c if ((!st) || (st->revision < UV_SYSTAB_VERSION_UV4_LATEST)) { st 1263 arch/x86/kernel/apic/x2apic_uv_x.c int rev = st ? st->revision : 0; st 1272 arch/x86/kernel/apic/x2apic_uv_x.c for (i = 0; st->entry[i].type != UV_SYSTAB_TYPE_UNUSED; i++) { st 1273 arch/x86/kernel/apic/x2apic_uv_x.c unsigned long ptr = st->entry[i].offset; st 1278 arch/x86/kernel/apic/x2apic_uv_x.c ptr = ptr + (unsigned long)st; st 1280 arch/x86/kernel/apic/x2apic_uv_x.c switch (st->entry[i].type) { st 65 arch/x86/kernel/dumpstack_64.c #define EPAGERANGE(st) \ st 66 arch/x86/kernel/dumpstack_64.c [PFN_DOWN(CEA_ESTACK_OFFS(st)) ... \ st 67 arch/x86/kernel/dumpstack_64.c PFN_DOWN(CEA_ESTACK_OFFS(st) + CEA_ESTACK_SIZE(st) - 1)] = { \ st 68 arch/x86/kernel/dumpstack_64.c .offs = CEA_ESTACK_OFFS(st), \ st 69 arch/x86/kernel/dumpstack_64.c .size = CEA_ESTACK_SIZE(st), \ st 70 arch/x86/kernel/dumpstack_64.c .type = STACK_TYPE_EXCEPTION + ESTACK_ ##st, } st 188 arch/x86/kernel/fpu/regset.c struct _fpxreg *st; st 197 arch/x86/kernel/fpu/regset.c st = FPREG_ADDR(fxsave, (i - tos) & 7); st 199 arch/x86/kernel/fpu/regset.c switch (st->exponent & 0x7fff) { st 204 arch/x86/kernel/fpu/regset.c if (!st->significand[0] && st 205 arch/x86/kernel/fpu/regset.c !st->significand[1] && st 206 arch/x86/kernel/fpu/regset.c !st->significand[2] && st 207 arch/x86/kernel/fpu/regset.c !st->significand[3]) st 213 arch/x86/kernel/fpu/regset.c if (st->significand[3] & 0x8000) st 283 arch/x86/kernel/kvm.c struct kvm_steal_time *st = &per_cpu(steal_time, cpu); st 288 arch/x86/kernel/kvm.c wrmsrl(MSR_KVM_STEAL_TIME, (slow_virt_to_phys(st) | KVM_MSR_ENABLED)); st 290 arch/x86/kernel/kvm.c cpu, (unsigned long long) slow_virt_to_phys(st)); st 313 arch/x86/kernel/process.c struct ssb_state *st = this_cpu_ptr(&ssb_state); st 317 arch/x86/kernel/process.c st->local_state = 0; st 323 arch/x86/kernel/process.c if (st->shared_state) st 326 arch/x86/kernel/process.c raw_spin_lock_init(&st->lock); st 340 arch/x86/kernel/process.c st->shared_state = per_cpu(ssb_state, cpu).shared_state; st 350 arch/x86/kernel/process.c st->shared_state = st; st 362 arch/x86/kernel/process.c struct ssb_state *st = this_cpu_ptr(&ssb_state); st 376 arch/x86/kernel/process.c if (__test_and_set_bit(LSTATE_SSB, &st->local_state)) st 381 arch/x86/kernel/process.c raw_spin_lock(&st->shared_state->lock); st 383 arch/x86/kernel/process.c if (!st->shared_state->disable_state) st 385 arch/x86/kernel/process.c st->shared_state->disable_state++; st 386 arch/x86/kernel/process.c raw_spin_unlock(&st->shared_state->lock); st 388 arch/x86/kernel/process.c if (!__test_and_clear_bit(LSTATE_SSB, &st->local_state)) st 391 arch/x86/kernel/process.c raw_spin_lock(&st->shared_state->lock); st 392 arch/x86/kernel/process.c st->shared_state->disable_state--; st 393 arch/x86/kernel/process.c if (!st->shared_state->disable_state) st 395 arch/x86/kernel/process.c raw_spin_unlock(&st->shared_state->lock); st 2650 arch/x86/kvm/x86.c struct kvm_steal_time *st; st 2652 arch/x86/kvm/x86.c if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) st 2656 arch/x86/kvm/x86.c if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, st 2657 arch/x86/kvm/x86.c &map, &vcpu->arch.st.cache, false)) st 2660 arch/x86/kvm/x86.c st = map.hva + st 2661 arch/x86/kvm/x86.c offset_in_page(vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS); st 2668 arch/x86/kvm/x86.c st->preempted & KVM_VCPU_FLUSH_TLB); st 2669 arch/x86/kvm/x86.c if (xchg(&st->preempted, 0) & KVM_VCPU_FLUSH_TLB) st 2672 arch/x86/kvm/x86.c vcpu->arch.st.preempted = 0; st 2674 arch/x86/kvm/x86.c if (st->version & 1) st 2675 arch/x86/kvm/x86.c st->version += 1; /* first time write, random junk */ st 2677 arch/x86/kvm/x86.c st->version += 1; st 2681 arch/x86/kvm/x86.c st->steal += current->sched_info.run_delay - st 2682 arch/x86/kvm/x86.c vcpu->arch.st.last_steal; st 2683 arch/x86/kvm/x86.c vcpu->arch.st.last_steal = current->sched_info.run_delay; st 2687 arch/x86/kvm/x86.c st->version += 1; st 2689 arch/x86/kvm/x86.c kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, false); st 2842 arch/x86/kvm/x86.c vcpu->arch.st.msr_val = data; st 3101 arch/x86/kvm/x86.c msr_info->data = vcpu->arch.st.msr_val; st 3546 arch/x86/kvm/x86.c struct kvm_steal_time *st; st 3548 arch/x86/kvm/x86.c if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) st 3551 arch/x86/kvm/x86.c if (vcpu->arch.st.preempted) st 3554 arch/x86/kvm/x86.c if (kvm_map_gfn(vcpu, vcpu->arch.st.msr_val >> PAGE_SHIFT, &map, st 3555 arch/x86/kvm/x86.c &vcpu->arch.st.cache, true)) st 3558 arch/x86/kvm/x86.c st = map.hva + st 3559 arch/x86/kvm/x86.c offset_in_page(vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS); st 3561 arch/x86/kvm/x86.c st->preempted = vcpu->arch.st.preempted = KVM_VCPU_PREEMPTED; st 3563 arch/x86/kvm/x86.c kvm_unmap_gfn(vcpu, &map, &vcpu->arch.st.cache, true, true); st 9142 arch/x86/kvm/x86.c struct gfn_to_pfn_cache *cache = &vcpu->arch.st.cache; st 9238 arch/x86/kvm/x86.c vcpu->arch.st.msr_val = 0; st 179 arch/x86/math-emu/errors.c FPU_REG *r = &st(i); st 416 arch/x86/math-emu/errors.c FPU_REG *dest = &st(deststnr); st 514 arch/x86/math-emu/errors.c FPU_REG *dest = &st(deststnr); st 24 arch/x86/math-emu/fpu_arith.c FPU_add(&st(i), FPU_gettagi(i), 0, control_word); st 32 arch/x86/math-emu/fpu_arith.c FPU_mul(&st(i), FPU_gettagi(i), 0, control_word); st 68 arch/x86/math-emu/fpu_arith.c FPU_add(&st(i), FPU_gettagi(i), i, control_word); st 75 arch/x86/math-emu/fpu_arith.c FPU_mul(&st(0), FPU_gettag0(), FPU_rm, control_word); st 111 arch/x86/math-emu/fpu_arith.c if (FPU_add(&st(i), FPU_gettagi(i), i, control_word) >= 0) st 119 arch/x86/math-emu/fpu_arith.c if (FPU_mul(&st(0), FPU_gettag0(), FPU_rm, control_word) >= 0) st 116 arch/x86/math-emu/fpu_aux.c reg_copy(&st(i), st_new_ptr); st 135 arch/x86/math-emu/fpu_aux.c FPU_REG *st0_ptr = &st(0), *sti_ptr = &st(i); st 177 arch/x86/math-emu/fpu_aux.c FPU_REG *st0_ptr = &st(0); st 178 arch/x86/math-emu/fpu_aux.c FPU_REG *sti_ptr = &st(i); st 259 arch/x86/math-emu/fpu_aux.c FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm); st 265 arch/x86/math-emu/fpu_aux.c FPU_copy_to_regi(&st(0), FPU_gettag0(), FPU_rm); st 266 arch/x86/math-emu/fpu_entry.c st0_ptr = &st(0); st 473 arch/x86/math-emu/fpu_entry.c st0_ptr = &st(0); st 130 arch/x86/math-emu/fpu_etc.c (fp_etc_table[FPU_rm]) (&st(0), FPU_gettag0()); st 90 arch/x86/math-emu/fpu_tags.c *st_new_ptr = &st(-1); st 97 arch/x86/math-emu/fpu_tags.c reg_copy(r, &st(stnr)); st 103 arch/x86/math-emu/fpu_tags.c reg_copy(r, &st(1)); st 112 arch/x86/math-emu/fpu_tags.c reg_copy(r, &st(0)); st 157 arch/x86/math-emu/fpu_trig.c FPU_REG *dest = &st(deststnr); st 286 arch/x86/math-emu/fpu_trig.c st_new_ptr = &st(-1); st 345 arch/x86/math-emu/fpu_trig.c st_new_ptr = &st(-1); st 696 arch/x86/math-emu/fpu_trig.c st_new_ptr = &st(-1); st 730 arch/x86/math-emu/fpu_trig.c f_cos(&st(0), st0_tag); st 781 arch/x86/math-emu/fpu_trig.c FPU_REG *st1_ptr = &st(1); st 1023 arch/x86/math-emu/fpu_trig.c FPU_REG *st1_ptr = &st(1), exponent; st 1194 arch/x86/math-emu/fpu_trig.c FPU_REG *st1_ptr = &st(1); st 1315 arch/x86/math-emu/fpu_trig.c FPU_REG *st1_ptr = &st(1), a, b; st 1483 arch/x86/math-emu/fpu_trig.c FPU_REG *st1_ptr = &st(1); st 1634 arch/x86/math-emu/fpu_trig.c (trig_table_a[FPU_rm]) (&st(0), FPU_gettag0()); st 1643 arch/x86/math-emu/fpu_trig.c (trig_table_b[FPU_rm]) (&st(0), FPU_gettag0()); st 96 arch/x86/math-emu/load_store.c st0_ptr = &st(0); /* Some of these instructions pop after st 107 arch/x86/math-emu/load_store.c st0_ptr = &st(0); st 135 arch/x86/math-emu/poly_2xm1.c result = &st(0); st 39 arch/x86/math-emu/reg_add_sub.c FPU_REG *a = &st(0); st 40 arch/x86/math-emu/reg_add_sub.c FPU_REG *dest = &st(deststnr); st 136 arch/x86/math-emu/reg_add_sub.c a = &st(0); st 144 arch/x86/math-emu/reg_add_sub.c b = &st(rm); st 159 arch/x86/math-emu/reg_add_sub.c dest = &st(deststnr); st 32 arch/x86/math-emu/reg_compare.c st0_ptr = &st(0); st 219 arch/x86/math-emu/reg_compare.c st_ptr = &st(nr); st 266 arch/x86/math-emu/reg_compare.c st_ptr = &st(nr); st 313 arch/x86/math-emu/reg_compare.c st_ptr = &st(nr); st 364 arch/x86/math-emu/reg_compare.c st_ptr = &st(nr); st 42 arch/x86/math-emu/reg_divide.c b = &st(0); st 49 arch/x86/math-emu/reg_divide.c a = &st(rm); st 54 arch/x86/math-emu/reg_divide.c a = &st(0); st 61 arch/x86/math-emu/reg_divide.c b = &st(rm); st 72 arch/x86/math-emu/reg_divide.c dest = &st(deststnr); st 142 arch/x86/math-emu/reg_divide.c (flags & REV) ? st0_ptr : &st(rm)); st 147 arch/x86/math-emu/reg_divide.c tag = FPU_Special(&st(rm)); st 148 arch/x86/math-emu/reg_divide.c return real_2op_NaN(&st(rm), tag, 0, st 149 arch/x86/math-emu/reg_divide.c (flags & REV) ? st0_ptr : &st(rm)); st 84 arch/x86/math-emu/reg_ld_str.c FPU_REG *sti_ptr = &st(stnr); st 214 arch/x86/math-emu/reg_ld_str.c FPU_REG *st0_ptr = &st(0); st 300 arch/x86/math-emu/reg_ld_str.c FPU_REG *st0_ptr = &st(0); st 1138 arch/x86/math-emu/reg_ld_str.c FPU_settag(regnr, FPU_tagof(&st(i))); st 32 arch/x86/math-emu/reg_mul.c FPU_REG *a = &st(deststnr); st 92 arch/x86/math-emu/reg_mul.c return real_2op_NaN(b, tagb, deststnr, &st(0)); st 239 arch/x86/mm/dump_pagetables.c static void note_wx(struct pg_state *st) st 243 arch/x86/mm/dump_pagetables.c npages = (st->current_address - st->start_address) / PAGE_SIZE; st 250 arch/x86/mm/dump_pagetables.c if (pcibios_enabled && st->start_address >= PAGE_OFFSET + BIOS_BEGIN && st 251 arch/x86/mm/dump_pagetables.c st->current_address <= PAGE_OFFSET + BIOS_END) { st 257 arch/x86/mm/dump_pagetables.c st->wx_pages += npages; st 260 arch/x86/mm/dump_pagetables.c (void *)st->start_address); st 268 arch/x86/mm/dump_pagetables.c static void note_page(struct seq_file *m, struct pg_state *st, st 280 arch/x86/mm/dump_pagetables.c cur = pgprot_val(st->current_prot); st 281 arch/x86/mm/dump_pagetables.c eff = st->effective_prot; st 283 arch/x86/mm/dump_pagetables.c if (!st->level) { st 285 arch/x86/mm/dump_pagetables.c st->current_prot = new_prot; st 286 arch/x86/mm/dump_pagetables.c st->effective_prot = new_eff; st 287 arch/x86/mm/dump_pagetables.c st->level = level; st 288 arch/x86/mm/dump_pagetables.c st->marker = address_markers; st 289 arch/x86/mm/dump_pagetables.c st->lines = 0; st 290 arch/x86/mm/dump_pagetables.c pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", st 291 arch/x86/mm/dump_pagetables.c st->marker->name); st 292 arch/x86/mm/dump_pagetables.c } else if (prot != cur || new_eff != eff || level != st->level || st 293 arch/x86/mm/dump_pagetables.c st->current_address >= st->marker[1].start_address) { st 298 arch/x86/mm/dump_pagetables.c if (st->check_wx && (eff & _PAGE_RW) && !(eff & _PAGE_NX)) st 299 arch/x86/mm/dump_pagetables.c note_wx(st); st 304 arch/x86/mm/dump_pagetables.c if (!st->marker->max_lines || st 305 arch/x86/mm/dump_pagetables.c st->lines < st->marker->max_lines) { st 306 arch/x86/mm/dump_pagetables.c pt_dump_seq_printf(m, st->to_dmesg, st 308 arch/x86/mm/dump_pagetables.c width, st->start_address, st 309 arch/x86/mm/dump_pagetables.c width, st->current_address); st 311 arch/x86/mm/dump_pagetables.c delta = st->current_address - st->start_address; st 316 arch/x86/mm/dump_pagetables.c pt_dump_cont_printf(m, st->to_dmesg, "%9lu%c ", st 318 arch/x86/mm/dump_pagetables.c printk_prot(m, st->current_prot, st->level, st 319 arch/x86/mm/dump_pagetables.c st->to_dmesg); st 321 arch/x86/mm/dump_pagetables.c st->lines++; st 328 arch/x86/mm/dump_pagetables.c if (st->current_address >= st->marker[1].start_address) { st 329 arch/x86/mm/dump_pagetables.c if (st->marker->max_lines && st 330 arch/x86/mm/dump_pagetables.c st->lines > st->marker->max_lines) { st 332 arch/x86/mm/dump_pagetables.c st->lines - st->marker->max_lines; st 333 arch/x86/mm/dump_pagetables.c pt_dump_seq_printf(m, st->to_dmesg, st 338 arch/x86/mm/dump_pagetables.c st->marker++; st 339 arch/x86/mm/dump_pagetables.c st->lines = 0; st 340 arch/x86/mm/dump_pagetables.c pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", st 341 arch/x86/mm/dump_pagetables.c st->marker->name); st 344 arch/x86/mm/dump_pagetables.c st->start_address = st->current_address; st 345 arch/x86/mm/dump_pagetables.c st->current_prot = new_prot; st 346 arch/x86/mm/dump_pagetables.c st->effective_prot = new_eff; st 347 arch/x86/mm/dump_pagetables.c st->level = level; st 357 arch/x86/mm/dump_pagetables.c static void walk_pte_level(struct seq_file *m, struct pg_state *st, pmd_t addr, st 365 arch/x86/mm/dump_pagetables.c st->current_address = normalize_addr(P + i * PTE_LEVEL_MULT); st 366 arch/x86/mm/dump_pagetables.c pte = pte_offset_map(&addr, st->current_address); st 369 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(prot), eff, 5); st 382 arch/x86/mm/dump_pagetables.c static inline bool kasan_page_table(struct seq_file *m, struct pg_state *st, st 390 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(prot), 0, 5); st 396 arch/x86/mm/dump_pagetables.c static inline bool kasan_page_table(struct seq_file *m, struct pg_state *st, st 405 arch/x86/mm/dump_pagetables.c static void walk_pmd_level(struct seq_file *m, struct pg_state *st, pud_t addr, st 414 arch/x86/mm/dump_pagetables.c st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); st 419 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(prot), eff, 4); st 420 arch/x86/mm/dump_pagetables.c } else if (!kasan_page_table(m, st, pmd_start)) { st 421 arch/x86/mm/dump_pagetables.c walk_pte_level(m, st, *start, eff, st 425 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(0), 0, 4); st 438 arch/x86/mm/dump_pagetables.c static void walk_pud_level(struct seq_file *m, struct pg_state *st, p4d_t addr, st 448 arch/x86/mm/dump_pagetables.c st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); st 453 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(prot), eff, 3); st 454 arch/x86/mm/dump_pagetables.c } else if (!kasan_page_table(m, st, pud_start)) { st 455 arch/x86/mm/dump_pagetables.c walk_pmd_level(m, st, *start, eff, st 459 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(0), 0, 3); st 471 arch/x86/mm/dump_pagetables.c static void walk_p4d_level(struct seq_file *m, struct pg_state *st, pgd_t addr, st 479 arch/x86/mm/dump_pagetables.c return walk_pud_level(m, st, __p4d(pgd_val(addr)), eff_in, P); st 484 arch/x86/mm/dump_pagetables.c st->current_address = normalize_addr(P + i * P4D_LEVEL_MULT); st 489 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(prot), eff, 2); st 490 arch/x86/mm/dump_pagetables.c } else if (!kasan_page_table(m, st, p4d_start)) { st 491 arch/x86/mm/dump_pagetables.c walk_pud_level(m, st, *start, eff, st 495 arch/x86/mm/dump_pagetables.c note_page(m, st, __pgprot(0), 0, 2); st 524 arch/x86/mm/dump_pagetables.c struct pg_state st = {}; st 528 arch/x86/mm/dump_pagetables.c st.to_dmesg = dmesg; st 531 arch/x86/mm/dump_pagetables.c st.check_wx = checkwx; st 533 arch/x86/mm/dump_pagetables.c st.wx_pages = 0; st 536 arch/x86/mm/dump_pagetables.c st.current_address = normalize_addr(i * PGD_LEVEL_MULT); st 545 arch/x86/mm/dump_pagetables.c note_page(m, &st, __pgprot(prot), eff, 1); st 547 arch/x86/mm/dump_pagetables.c walk_p4d_level(m, &st, *start, eff, st 551 arch/x86/mm/dump_pagetables.c note_page(m, &st, __pgprot(0), 0, 1); st 558 arch/x86/mm/dump_pagetables.c st.current_address = normalize_addr(PTRS_PER_PGD*PGD_LEVEL_MULT); st 559 arch/x86/mm/dump_pagetables.c note_page(m, &st, __pgprot(0), 0, 0); st 562 arch/x86/mm/dump_pagetables.c if (st.wx_pages) st 564 arch/x86/mm/dump_pagetables.c st.wx_pages); st 737 arch/x86/net/bpf_jit_comp.c goto st; st 743 arch/x86/net/bpf_jit_comp.c goto st; st 749 arch/x86/net/bpf_jit_comp.c goto st; st 753 arch/x86/net/bpf_jit_comp.c st: if (is_imm8(insn->off)) st 39 arch/x86/um/signal.c struct _fpxreg *st = NULL; st 49 arch/x86/um/signal.c st = (struct _fpxreg *) FPREG_ADDR(fxsave, i); st 51 arch/x86/um/signal.c switch (st->exponent & 0x7fff) { st 56 arch/x86/um/signal.c if ( !st->significand[0] && st 57 arch/x86/um/signal.c !st->significand[1] && st 58 arch/x86/um/signal.c !st->significand[2] && st 59 arch/x86/um/signal.c !st->significand[3] ) { st 66 arch/x86/um/signal.c if (st->significand[3] & 0x8000) { st 790 block/bfq-cgroup.c static void bfq_flush_idle_tree(struct bfq_service_tree *st) st 792 block/bfq-cgroup.c struct bfq_entity *entity = st->first_idle; st 794 block/bfq-cgroup.c for (; entity ; entity = st->first_idle) st 835 block/bfq-cgroup.c struct bfq_service_tree *st, st 838 block/bfq-cgroup.c struct rb_root *active = &st->active; st 860 block/bfq-cgroup.c struct bfq_service_tree *st; st 877 block/bfq-cgroup.c st = bfqg->sched_data.service_tree + i; st 891 block/bfq-cgroup.c bfq_reparent_active_queues(bfqd, bfqg, st, i); st 904 block/bfq-cgroup.c bfq_flush_idle_tree(st); st 1029 block/bfq-iosched.h void bfq_put_idle_entity(struct bfq_service_tree *st, st 110 block/bfq-wf2q.c struct bfq_service_tree *st = st 117 block/bfq-wf2q.c !bfq_gt(new_entity->start, st->vtime) st 344 block/bfq-wf2q.c static void bfq_idle_extract(struct bfq_service_tree *st, st 350 block/bfq-wf2q.c if (entity == st->first_idle) { st 352 block/bfq-wf2q.c st->first_idle = bfq_entity_of(next); st 355 block/bfq-wf2q.c if (entity == st->last_idle) { st 357 block/bfq-wf2q.c st->last_idle = bfq_entity_of(next); st 360 block/bfq-wf2q.c bfq_extract(&st->idle, entity); st 475 block/bfq-wf2q.c static void bfq_active_insert(struct bfq_service_tree *st, st 486 block/bfq-wf2q.c bfq_insert(&st->active, entity); st 579 block/bfq-wf2q.c static void bfq_active_extract(struct bfq_service_tree *st, st 591 block/bfq-wf2q.c bfq_extract(&st->active, entity); st 614 block/bfq-wf2q.c static void bfq_idle_insert(struct bfq_service_tree *st, st 618 block/bfq-wf2q.c struct bfq_entity *first_idle = st->first_idle; st 619 block/bfq-wf2q.c struct bfq_entity *last_idle = st->last_idle; st 622 block/bfq-wf2q.c st->first_idle = entity; st 624 block/bfq-wf2q.c st->last_idle = entity; st 626 block/bfq-wf2q.c bfq_insert(&st->idle, entity); st 647 block/bfq-wf2q.c static void bfq_forget_entity(struct bfq_service_tree *st, st 654 block/bfq-wf2q.c st->wsum -= entity->weight; st 670 block/bfq-wf2q.c void bfq_put_idle_entity(struct bfq_service_tree *st, struct bfq_entity *entity) st 672 block/bfq-wf2q.c bfq_idle_extract(st, entity); st 673 block/bfq-wf2q.c bfq_forget_entity(st, entity, st 684 block/bfq-wf2q.c static void bfq_forget_idle(struct bfq_service_tree *st) st 686 block/bfq-wf2q.c struct bfq_entity *first_idle = st->first_idle; st 687 block/bfq-wf2q.c struct bfq_entity *last_idle = st->last_idle; st 689 block/bfq-wf2q.c if (RB_EMPTY_ROOT(&st->active) && last_idle && st 690 block/bfq-wf2q.c !bfq_gt(last_idle->finish, st->vtime)) { st 695 block/bfq-wf2q.c st->vtime = last_idle->finish; st 698 block/bfq-wf2q.c if (first_idle && !bfq_gt(first_idle->finish, st->vtime)) st 699 block/bfq-wf2q.c bfq_put_idle_entity(st, first_idle); st 838 block/bfq-wf2q.c struct bfq_service_tree *st; st 848 block/bfq-wf2q.c st = bfq_entity_service_tree(entity); st 852 block/bfq-wf2q.c st->vtime += bfq_delta(served, st->wsum); st 853 block/bfq-wf2q.c bfq_forget_idle(st); st 904 block/bfq-wf2q.c struct bfq_service_tree *st, st 914 block/bfq-wf2q.c st = __bfq_entity_update_weight_prio(st, entity, true); st 950 block/bfq-wf2q.c if (backshifted && bfq_gt(st->vtime, entity->finish)) { st 951 block/bfq-wf2q.c unsigned long delta = st->vtime - entity->finish; st 960 block/bfq-wf2q.c bfq_active_insert(st, entity); st 978 block/bfq-wf2q.c struct bfq_service_tree *st = bfq_entity_service_tree(entity); st 983 block/bfq-wf2q.c if (non_blocking_wait_rq && bfq_gt(st->vtime, entity->finish)) { st 987 block/bfq-wf2q.c min_vstart = st->vtime; st 989 block/bfq-wf2q.c if (entity->tree == &st->idle) { st 994 block/bfq-wf2q.c bfq_idle_extract(st, entity); st 1004 block/bfq-wf2q.c st->wsum += entity->weight; st 1029 block/bfq-wf2q.c bfq_update_fin_time_enqueue(entity, st, backshifted); st 1050 block/bfq-wf2q.c struct bfq_service_tree *st = bfq_entity_service_tree(entity); st 1091 block/bfq-wf2q.c bfq_active_extract(st, entity); st 1107 block/bfq-wf2q.c bfq_active_extract(st, entity); st 1110 block/bfq-wf2q.c bfq_update_fin_time_enqueue(entity, st, false); st 1117 block/bfq-wf2q.c struct bfq_service_tree *st = bfq_entity_service_tree(entity); st 1119 block/bfq-wf2q.c if (sd->in_service_entity == entity || entity->tree == &st->active) st 1176 block/bfq-wf2q.c struct bfq_service_tree *st; st 1188 block/bfq-wf2q.c st = bfq_entity_service_tree(entity); st 1203 block/bfq-wf2q.c if (entity->tree == &st->active) st 1204 block/bfq-wf2q.c bfq_active_extract(st, entity); st 1205 block/bfq-wf2q.c else if (!is_in_service && entity->tree == &st->idle) st 1206 block/bfq-wf2q.c bfq_idle_extract(st, entity); st 1208 block/bfq-wf2q.c if (!ins_into_idle_tree || !bfq_gt(entity->finish, st->vtime)) st 1209 block/bfq-wf2q.c bfq_forget_entity(st, entity, is_in_service); st 1211 block/bfq-wf2q.c bfq_idle_insert(st, entity); st 1328 block/bfq-wf2q.c static u64 bfq_calc_vtime_jump(struct bfq_service_tree *st) st 1330 block/bfq-wf2q.c struct bfq_entity *root_entity = bfq_root_active_entity(&st->active); st 1332 block/bfq-wf2q.c if (bfq_gt(root_entity->min_start, st->vtime)) st 1335 block/bfq-wf2q.c return st->vtime; st 1338 block/bfq-wf2q.c static void bfq_update_vtime(struct bfq_service_tree *st, u64 new_value) st 1340 block/bfq-wf2q.c if (new_value > st->vtime) { st 1341 block/bfq-wf2q.c st->vtime = new_value; st 1342 block/bfq-wf2q.c bfq_forget_idle(st); st 1358 block/bfq-wf2q.c static struct bfq_entity *bfq_first_active_entity(struct bfq_service_tree *st, st 1362 block/bfq-wf2q.c struct rb_node *node = st->active.rb_node; st 1409 block/bfq-wf2q.c __bfq_lookup_next_entity(struct bfq_service_tree *st, bool in_service) st 1414 block/bfq-wf2q.c if (RB_EMPTY_ROOT(&st->active)) st 1421 block/bfq-wf2q.c new_vtime = bfq_calc_vtime_jump(st); st 1434 block/bfq-wf2q.c bfq_update_vtime(st, new_vtime); st 1436 block/bfq-wf2q.c entity = bfq_first_active_entity(st, new_vtime); st 1453 block/bfq-wf2q.c struct bfq_service_tree *st = sd->service_tree; st 1454 block/bfq-wf2q.c struct bfq_service_tree *idle_class_st = st + (BFQ_IOPRIO_CLASSES - 1); st 1493 block/bfq-wf2q.c entity = __bfq_lookup_next_entity(st + class_idx, st 24 block/partitions/atari.c be32_to_cpu((pi)->st) <= (hdsiz) && \ st 25 block/partitions/atari.c be32_to_cpu((pi)->st) + be32_to_cpu((pi)->siz) <= (hdsiz)) st 84 block/partitions/atari.c put_partition (state, slot, be32_to_cpu(pi->st), st 93 block/partitions/atari.c partsect = extensect = be32_to_cpu(pi->st); st 110 block/partitions/atari.c partsect + be32_to_cpu(xrs->part[0].st), st 124 block/partitions/atari.c partsect = be32_to_cpu(xrs->part[1].st) + extensect; st 145 block/partitions/atari.c be32_to_cpu(pi->st), st 21 block/partitions/atari.h __be32 st; /* start of partition */ st 42 crypto/aegis128-neon-inner.c static void aegis128_save_state_neon(struct aegis128_state st, void *state) st 44 crypto/aegis128-neon-inner.c vst1q_u8(state, st.v[0]); st 45 crypto/aegis128-neon-inner.c vst1q_u8(state + 16, st.v[1]); st 46 crypto/aegis128-neon-inner.c vst1q_u8(state + 32, st.v[2]); st 47 crypto/aegis128-neon-inner.c vst1q_u8(state + 48, st.v[3]); st 48 crypto/aegis128-neon-inner.c vst1q_u8(state + 64, st.v[4]); st 107 crypto/aegis128-neon-inner.c struct aegis128_state aegis128_update_neon(struct aegis128_state st, st 110 crypto/aegis128-neon-inner.c m ^= aegis_aes_round(st.v[4]); st 111 crypto/aegis128-neon-inner.c st.v[4] ^= aegis_aes_round(st.v[3]); st 112 crypto/aegis128-neon-inner.c st.v[3] ^= aegis_aes_round(st.v[2]); st 113 crypto/aegis128-neon-inner.c st.v[2] ^= aegis_aes_round(st.v[1]); st 114 crypto/aegis128-neon-inner.c st.v[1] ^= aegis_aes_round(st.v[0]); st 115 crypto/aegis128-neon-inner.c st.v[0] ^= m; st 117 crypto/aegis128-neon-inner.c return st; st 137 crypto/aegis128-neon-inner.c struct aegis128_state st = aegis128_load_state_neon(state); st 141 crypto/aegis128-neon-inner.c st = aegis128_update_neon(st, vld1q_u8(msg)); st 143 crypto/aegis128-neon-inner.c aegis128_save_state_neon(st, state); st 149 crypto/aegis128-neon-inner.c struct aegis128_state st = aegis128_load_state_neon(state); st 155 crypto/aegis128-neon-inner.c uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; st 158 crypto/aegis128-neon-inner.c st = aegis128_update_neon(st, msg); st 167 crypto/aegis128-neon-inner.c uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; st 172 crypto/aegis128-neon-inner.c st = aegis128_update_neon(st, msg); st 177 crypto/aegis128-neon-inner.c aegis128_save_state_neon(st, state); st 183 crypto/aegis128-neon-inner.c struct aegis128_state st = aegis128_load_state_neon(state); st 189 crypto/aegis128-neon-inner.c msg = vld1q_u8(src) ^ st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; st 190 crypto/aegis128-neon-inner.c st = aegis128_update_neon(st, msg); st 199 crypto/aegis128-neon-inner.c uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; st 208 crypto/aegis128-neon-inner.c st = aegis128_update_neon(st, msg); st 211 crypto/aegis128-neon-inner.c aegis128_save_state_neon(st, state); st 47 crypto/sha3_generic.c static SHA3_INLINE void keccakf_round(u64 st[25]) st 52 crypto/sha3_generic.c bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20]; st 53 crypto/sha3_generic.c bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21]; st 54 crypto/sha3_generic.c bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22]; st 55 crypto/sha3_generic.c bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23]; st 56 crypto/sha3_generic.c bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24]; st 64 crypto/sha3_generic.c st[0] ^= t[0]; st 67 crypto/sha3_generic.c tt = st[1]; st 68 crypto/sha3_generic.c st[ 1] = rol64(st[ 6] ^ t[1], 44); st 69 crypto/sha3_generic.c st[ 6] = rol64(st[ 9] ^ t[4], 20); st 70 crypto/sha3_generic.c st[ 9] = rol64(st[22] ^ t[2], 61); st 71 crypto/sha3_generic.c st[22] = rol64(st[14] ^ t[4], 39); st 72 crypto/sha3_generic.c st[14] = rol64(st[20] ^ t[0], 18); st 73 crypto/sha3_generic.c st[20] = rol64(st[ 2] ^ t[2], 62); st 74 crypto/sha3_generic.c st[ 2] = rol64(st[12] ^ t[2], 43); st 75 crypto/sha3_generic.c st[12] = rol64(st[13] ^ t[3], 25); st 76 crypto/sha3_generic.c st[13] = rol64(st[19] ^ t[4], 8); st 77 crypto/sha3_generic.c st[19] = rol64(st[23] ^ t[3], 56); st 78 crypto/sha3_generic.c st[23] = rol64(st[15] ^ t[0], 41); st 79 crypto/sha3_generic.c st[15] = rol64(st[ 4] ^ t[4], 27); st 80 crypto/sha3_generic.c st[ 4] = rol64(st[24] ^ t[4], 14); st 81 crypto/sha3_generic.c st[24] = rol64(st[21] ^ t[1], 2); st 82 crypto/sha3_generic.c st[21] = rol64(st[ 8] ^ t[3], 55); st 83 crypto/sha3_generic.c st[ 8] = rol64(st[16] ^ t[1], 45); st 84 crypto/sha3_generic.c st[16] = rol64(st[ 5] ^ t[0], 36); st 85 crypto/sha3_generic.c st[ 5] = rol64(st[ 3] ^ t[3], 28); st 86 crypto/sha3_generic.c st[ 3] = rol64(st[18] ^ t[3], 21); st 87 crypto/sha3_generic.c st[18] = rol64(st[17] ^ t[2], 15); st 88 crypto/sha3_generic.c st[17] = rol64(st[11] ^ t[1], 10); st 89 crypto/sha3_generic.c st[11] = rol64(st[ 7] ^ t[2], 6); st 90 crypto/sha3_generic.c st[ 7] = rol64(st[10] ^ t[0], 3); st 91 crypto/sha3_generic.c st[10] = rol64( tt ^ t[1], 1); st 94 crypto/sha3_generic.c bc[ 0] = ~st[ 1] & st[ 2]; st 95 crypto/sha3_generic.c bc[ 1] = ~st[ 2] & st[ 3]; st 96 crypto/sha3_generic.c bc[ 2] = ~st[ 3] & st[ 4]; st 97 crypto/sha3_generic.c bc[ 3] = ~st[ 4] & st[ 0]; st 98 crypto/sha3_generic.c bc[ 4] = ~st[ 0] & st[ 1]; st 99 crypto/sha3_generic.c st[ 0] ^= bc[ 0]; st 100 crypto/sha3_generic.c st[ 1] ^= bc[ 1]; st 101 crypto/sha3_generic.c st[ 2] ^= bc[ 2]; st 102 crypto/sha3_generic.c st[ 3] ^= bc[ 3]; st 103 crypto/sha3_generic.c st[ 4] ^= bc[ 4]; st 105 crypto/sha3_generic.c bc[ 0] = ~st[ 6] & st[ 7]; st 106 crypto/sha3_generic.c bc[ 1] = ~st[ 7] & st[ 8]; st 107 crypto/sha3_generic.c bc[ 2] = ~st[ 8] & st[ 9]; st 108 crypto/sha3_generic.c bc[ 3] = ~st[ 9] & st[ 5]; st 109 crypto/sha3_generic.c bc[ 4] = ~st[ 5] & st[ 6]; st 110 crypto/sha3_generic.c st[ 5] ^= bc[ 0]; st 111 crypto/sha3_generic.c st[ 6] ^= bc[ 1]; st 112 crypto/sha3_generic.c st[ 7] ^= bc[ 2]; st 113 crypto/sha3_generic.c st[ 8] ^= bc[ 3]; st 114 crypto/sha3_generic.c st[ 9] ^= bc[ 4]; st 116 crypto/sha3_generic.c bc[ 0] = ~st[11] & st[12]; st 117 crypto/sha3_generic.c bc[ 1] = ~st[12] & st[13]; st 118 crypto/sha3_generic.c bc[ 2] = ~st[13] & st[14]; st 119 crypto/sha3_generic.c bc[ 3] = ~st[14] & st[10]; st 120 crypto/sha3_generic.c bc[ 4] = ~st[10] & st[11]; st 121 crypto/sha3_generic.c st[10] ^= bc[ 0]; st 122 crypto/sha3_generic.c st[11] ^= bc[ 1]; st 123 crypto/sha3_generic.c st[12] ^= bc[ 2]; st 124 crypto/sha3_generic.c st[13] ^= bc[ 3]; st 125 crypto/sha3_generic.c st[14] ^= bc[ 4]; st 127 crypto/sha3_generic.c bc[ 0] = ~st[16] & st[17]; st 128 crypto/sha3_generic.c bc[ 1] = ~st[17] & st[18]; st 129 crypto/sha3_generic.c bc[ 2] = ~st[18] & st[19]; st 130 crypto/sha3_generic.c bc[ 3] = ~st[19] & st[15]; st 131 crypto/sha3_generic.c bc[ 4] = ~st[15] & st[16]; st 132 crypto/sha3_generic.c st[15] ^= bc[ 0]; st 133 crypto/sha3_generic.c st[16] ^= bc[ 1]; st 134 crypto/sha3_generic.c st[17] ^= bc[ 2]; st 135 crypto/sha3_generic.c st[18] ^= bc[ 3]; st 136 crypto/sha3_generic.c st[19] ^= bc[ 4]; st 138 crypto/sha3_generic.c bc[ 0] = ~st[21] & st[22]; st 139 crypto/sha3_generic.c bc[ 1] = ~st[22] & st[23]; st 140 crypto/sha3_generic.c bc[ 2] = ~st[23] & st[24]; st 141 crypto/sha3_generic.c bc[ 3] = ~st[24] & st[20]; st 142 crypto/sha3_generic.c bc[ 4] = ~st[20] & st[21]; st 143 crypto/sha3_generic.c st[20] ^= bc[ 0]; st 144 crypto/sha3_generic.c st[21] ^= bc[ 1]; st 145 crypto/sha3_generic.c st[22] ^= bc[ 2]; st 146 crypto/sha3_generic.c st[23] ^= bc[ 3]; st 147 crypto/sha3_generic.c st[24] ^= bc[ 4]; st 150 crypto/sha3_generic.c static void keccakf(u64 st[25]) st 155 crypto/sha3_generic.c keccakf_round(st); st 157 crypto/sha3_generic.c st[0] ^= keccakf_rndc[round]; st 170 crypto/sha3_generic.c memset(sctx->st, 0, sizeof(sctx->st)); st 197 crypto/sha3_generic.c sctx->st[i] ^= get_unaligned_le64(src + 8 * i); st 198 crypto/sha3_generic.c keccakf(sctx->st); st 225 crypto/sha3_generic.c sctx->st[i] ^= get_unaligned_le64(sctx->buf + 8 * i); st 227 crypto/sha3_generic.c keccakf(sctx->st); st 230 crypto/sha3_generic.c put_unaligned_le64(sctx->st[i], digest++); st 233 crypto/sha3_generic.c put_unaligned_le32(sctx->st[i], (__le32 *)digest); st 2655 drivers/base/power/domain.c struct genpd_power_state *st; st 2668 drivers/base/power/domain.c st = kcalloc(ret, sizeof(*st), GFP_KERNEL); st 2669 drivers/base/power/domain.c if (!st) st 2672 drivers/base/power/domain.c ret = genpd_iterate_idle_states(dn, st); st 2674 drivers/base/power/domain.c kfree(st); st 2678 drivers/base/power/domain.c *states = st; st 2028 drivers/block/pktcdvd.c unsigned int size, st, sp; st 2067 drivers/block/pktcdvd.c st = (buf[6] >> 3) & 0x7; /* disc sub-type */ st 2072 drivers/block/pktcdvd.c switch (st) { st 2083 drivers/block/pktcdvd.c pkt_notice(pd, "unknown disc sub-type %d\n", st); st 2090 drivers/block/pktcdvd.c pkt_notice(pd, "unknown speed %d for sub-type %d\n", sp, st); st 87 drivers/block/rsxx/config.c int st; st 110 drivers/block/rsxx/config.c st = rsxx_creg_write(card, CREG_ADD_CONFIG, sizeof(cfg), &cfg, 1); st 111 drivers/block/rsxx/config.c if (st) st 112 drivers/block/rsxx/config.c return st; st 119 drivers/block/rsxx/config.c int st; st 122 drivers/block/rsxx/config.c st = rsxx_creg_read(card, CREG_ADD_CONFIG, sizeof(card->config), st 124 drivers/block/rsxx/config.c if (st) { st 127 drivers/block/rsxx/config.c return st; st 169 drivers/block/rsxx/config.c st = rsxx_save_config(card); st 170 drivers/block/rsxx/config.c if (st) st 171 drivers/block/rsxx/config.c return st; st 168 drivers/block/rsxx/core.c ssize_t st; st 174 drivers/block/rsxx/core.c st = rsxx_creg_read(card, CREG_ADD_CRAM + (u32)*ppos, cnt, buf, 1); st 175 drivers/block/rsxx/core.c if (!st) st 176 drivers/block/rsxx/core.c st = copy_to_user(ubuf, buf, cnt); st 178 drivers/block/rsxx/core.c if (st) st 179 drivers/block/rsxx/core.c return st; st 189 drivers/block/rsxx/core.c ssize_t st; st 195 drivers/block/rsxx/core.c st = rsxx_creg_write(card, CREG_ADD_CRAM + (u32)*ppos, cnt, buf, 1); st 197 drivers/block/rsxx/core.c if (st) st 198 drivers/block/rsxx/core.c return st; st 407 drivers/block/rsxx/core.c int st; st 430 drivers/block/rsxx/core.c st = rsxx_get_card_size8(card, &card->size8); st 431 drivers/block/rsxx/core.c if (st) st 465 drivers/block/rsxx/core.c int st; st 481 drivers/block/rsxx/core.c st = rsxx_get_card_state(card, &state); st 482 drivers/block/rsxx/core.c if (st) { st 501 drivers/block/rsxx/core.c int st; st 506 drivers/block/rsxx/core.c st = rsxx_get_card_state(card, &state); st 507 drivers/block/rsxx/core.c if (st) st 508 drivers/block/rsxx/core.c return st; st 518 drivers/block/rsxx/core.c st = rsxx_issue_card_cmd(card, CARD_CMD_SHUTDOWN); st 519 drivers/block/rsxx/core.c if (st) st 520 drivers/block/rsxx/core.c return st; st 525 drivers/block/rsxx/core.c st = rsxx_get_card_state(card, &state); st 526 drivers/block/rsxx/core.c if (st) st 527 drivers/block/rsxx/core.c return st; st 541 drivers/block/rsxx/core.c int st; st 557 drivers/block/rsxx/core.c st = rsxx_eeh_save_issued_dmas(card); st 558 drivers/block/rsxx/core.c if (st) st 559 drivers/block/rsxx/core.c return st; st 630 drivers/block/rsxx/core.c int st; st 640 drivers/block/rsxx/core.c st = rsxx_eeh_frozen(dev); st 641 drivers/block/rsxx/core.c if (st) { st 655 drivers/block/rsxx/core.c int st; st 660 drivers/block/rsxx/core.c st = pci_enable_device(dev); st 661 drivers/block/rsxx/core.c if (st) st 666 drivers/block/rsxx/core.c st = rsxx_eeh_fifo_flush_poll(card); st 667 drivers/block/rsxx/core.c if (st) st 673 drivers/block/rsxx/core.c st = rsxx_hw_buffers_init(dev, &card->ctrl[i]); st 674 drivers/block/rsxx/core.c if (st) st 682 drivers/block/rsxx/core.c st = ioread32(card->regmap + ISR); st 748 drivers/block/rsxx/core.c int st; st 760 drivers/block/rsxx/core.c st = ida_alloc(&rsxx_disk_ida, GFP_KERNEL); st 761 drivers/block/rsxx/core.c if (st < 0) st 763 drivers/block/rsxx/core.c card->disk_id = st; st 765 drivers/block/rsxx/core.c st = pci_enable_device(dev); st 766 drivers/block/rsxx/core.c if (st) st 771 drivers/block/rsxx/core.c st = dma_set_mask(&dev->dev, DMA_BIT_MASK(64)); st 772 drivers/block/rsxx/core.c if (st) { st 778 drivers/block/rsxx/core.c st = pci_request_regions(dev, DRIVER_NAME); st 779 drivers/block/rsxx/core.c if (st) { st 787 drivers/block/rsxx/core.c st = -ENOMEM; st 794 drivers/block/rsxx/core.c st = -ENOMEM; st 807 drivers/block/rsxx/core.c st = pci_enable_msi(dev); st 808 drivers/block/rsxx/core.c if (st) st 813 drivers/block/rsxx/core.c st = request_irq(dev->irq, rsxx_isr, IRQF_SHARED, st 815 drivers/block/rsxx/core.c if (st) { st 822 drivers/block/rsxx/core.c st = rsxx_creg_setup(card); st 823 drivers/block/rsxx/core.c if (st) { st 832 drivers/block/rsxx/core.c st = rsxx_compatibility_check(card); st 833 drivers/block/rsxx/core.c if (st) { st 836 drivers/block/rsxx/core.c st = -EINVAL; st 841 drivers/block/rsxx/core.c st = rsxx_load_config(card); st 842 drivers/block/rsxx/core.c if (st) st 847 drivers/block/rsxx/core.c st = rsxx_get_num_targets(card, &card->n_targets); st 848 drivers/block/rsxx/core.c if (st) st 855 drivers/block/rsxx/core.c st = -ENOMEM; st 859 drivers/block/rsxx/core.c st = rsxx_dma_setup(card); st 860 drivers/block/rsxx/core.c if (st) { st 875 drivers/block/rsxx/core.c st = rsxx_setup_dev(card); st 876 drivers/block/rsxx/core.c if (st) st 895 drivers/block/rsxx/core.c st = rsxx_issue_card_cmd(card, CARD_CMD_STARTUP); st 896 drivers/block/rsxx/core.c if (st) st 921 drivers/block/rsxx/core.c st = rsxx_get_card_size8(card, &card->size8); st 922 drivers/block/rsxx/core.c if (st) st 928 drivers/block/rsxx/core.c st = rsxx_get_card_size8(card, &card->size8); st 929 drivers/block/rsxx/core.c if (st) st 968 drivers/block/rsxx/core.c return st; st 975 drivers/block/rsxx/core.c int st; st 992 drivers/block/rsxx/core.c st = card_shutdown(card); st 993 drivers/block/rsxx/core.c if (st) st 1086 drivers/block/rsxx/core.c int st; st 1088 drivers/block/rsxx/core.c st = rsxx_dev_init(); st 1089 drivers/block/rsxx/core.c if (st) st 1090 drivers/block/rsxx/core.c return st; st 1092 drivers/block/rsxx/core.c st = rsxx_dma_init(); st 1093 drivers/block/rsxx/core.c if (st) st 1096 drivers/block/rsxx/core.c st = rsxx_creg_init(); st 1097 drivers/block/rsxx/core.c if (st) st 1107 drivers/block/rsxx/core.c return st; st 20 drivers/block/rsxx/cregs.c int st); st 100 drivers/block/rsxx/cregs.c int st; st 110 drivers/block/rsxx/cregs.c st = copy_to_creg_data(card, cmd->cnt8, st 112 drivers/block/rsxx/cregs.c if (st) st 226 drivers/block/rsxx/cregs.c int st = 0; st 259 drivers/block/rsxx/cregs.c st = -EIO; st 262 drivers/block/rsxx/cregs.c st = -EIO; st 272 drivers/block/rsxx/cregs.c st = -EIO; st 278 drivers/block/rsxx/cregs.c st = -EIO; st 282 drivers/block/rsxx/cregs.c st = copy_from_creg_data(card, cnt8, cmd->buf, cmd->stream); st 287 drivers/block/rsxx/cregs.c cmd->cb(card, cmd, st); st 353 drivers/block/rsxx/cregs.c int st; st 359 drivers/block/rsxx/cregs.c int st) st 366 drivers/block/rsxx/cregs.c cmd_completion->st = st; st 382 drivers/block/rsxx/cregs.c int st; st 385 drivers/block/rsxx/cregs.c completion.st = 0; st 388 drivers/block/rsxx/cregs.c st = creg_queue_cmd(card, op, addr, cnt8, buf, stream, creg_cmd_done_cb, st 390 drivers/block/rsxx/cregs.c if (st) st 391 drivers/block/rsxx/cregs.c return st; st 405 drivers/block/rsxx/cregs.c st = wait_for_completion_timeout(completion.cmd_done, timeout); st 406 drivers/block/rsxx/cregs.c if (st == 0) { st 419 drivers/block/rsxx/cregs.c if (completion.st) { st 431 drivers/block/rsxx/cregs.c completion.st, addr); st 432 drivers/block/rsxx/cregs.c return completion.st; st 448 drivers/block/rsxx/cregs.c int st; st 455 drivers/block/rsxx/cregs.c st = __issue_creg_rw(card, op, addr, xfer, st 457 drivers/block/rsxx/cregs.c if (st) st 458 drivers/block/rsxx/cregs.c return st; st 496 drivers/block/rsxx/cregs.c int st; st 498 drivers/block/rsxx/cregs.c st = rsxx_creg_read(card, CREG_ADD_CARD_SIZE, st 500 drivers/block/rsxx/cregs.c if (st) st 501 drivers/block/rsxx/cregs.c return st; st 597 drivers/block/rsxx/cregs.c int st) st 609 drivers/block/rsxx/cregs.c if (st) st 640 drivers/block/rsxx/cregs.c int st; st 642 drivers/block/rsxx/cregs.c st = creg_queue_cmd(card, CREG_OP_READ, CREG_ADD_LOG, st 645 drivers/block/rsxx/cregs.c if (st) st 649 drivers/block/rsxx/cregs.c return st; st 668 drivers/block/rsxx/cregs.c int st; st 670 drivers/block/rsxx/cregs.c st = copy_from_user(&cmd, ucmd, sizeof(cmd)); st 671 drivers/block/rsxx/cregs.c if (st) st 677 drivers/block/rsxx/cregs.c st = issue_reg_cmd(card, &cmd, read); st 678 drivers/block/rsxx/cregs.c if (st) st 679 drivers/block/rsxx/cregs.c return st; st 681 drivers/block/rsxx/cregs.c st = put_user(cmd.stat, &ucmd->stat); st 682 drivers/block/rsxx/cregs.c if (st) st 686 drivers/block/rsxx/cregs.c st = copy_to_user(ucmd->data, cmd.data, cmd.cnt); st 687 drivers/block/rsxx/cregs.c if (st) st 138 drivers/block/rsxx/dev.c blk_status_t st = BLK_STS_IOERR; st 163 drivers/block/rsxx/dev.c st = BLK_STS_RESOURCE; st 179 drivers/block/rsxx/dev.c st = rsxx_dma_queue_bio(card, bio, &bio_meta->pending_dmas, st 181 drivers/block/rsxx/dev.c if (st) st 189 drivers/block/rsxx/dev.c if (st) st 190 drivers/block/rsxx/dev.c bio->bi_status = st; st 683 drivers/block/rsxx/dma.c blk_status_t st; st 701 drivers/block/rsxx/dma.c st = rsxx_queue_discard(card, &dma_list[tgt], laddr, st 703 drivers/block/rsxx/dma.c if (st) st 723 drivers/block/rsxx/dma.c st = rsxx_queue_dma(card, &dma_list[tgt], st 728 drivers/block/rsxx/dma.c if (st) st 758 drivers/block/rsxx/dma.c return st; st 807 drivers/block/rsxx/dma.c int st; st 840 drivers/block/rsxx/dma.c st = rsxx_hw_buffers_init(dev, ctrl); st 841 drivers/block/rsxx/dma.c if (st) st 842 drivers/block/rsxx/dma.c return st; st 893 drivers/block/rsxx/dma.c int st; st 911 drivers/block/rsxx/dma.c st = rsxx_dma_ctrl_init(card->dev, &card->ctrl[i]); st 912 drivers/block/rsxx/dma.c if (st) st 959 drivers/block/rsxx/dma.c return st; st 589 drivers/block/sx8.c struct carm_msg_sync_time *st = mem; st 593 drivers/block/sx8.c memset(st, 0, sizeof(*st)); st 594 drivers/block/sx8.c st->type = CARM_MSG_MISC; st 595 drivers/block/sx8.c st->subtype = MISC_SET_TIME; st 596 drivers/block/sx8.c st->handle = cpu_to_le32(TAG_ENCODE(idx)); st 597 drivers/block/sx8.c st->timestamp = cpu_to_le32(tv); st 210 drivers/block/xen-blkback/blkback.c unsigned short op, int st); st 1441 drivers/block/xen-blkback/blkback.c unsigned short op, int st) st 1470 drivers/block/xen-blkback/blkback.c resp->status = st; st 100 drivers/char/agp/intel-gtt.c struct sg_table *st) st 107 drivers/char/agp/intel-gtt.c if (sg_alloc_table(st, num_entries, GFP_KERNEL)) st 110 drivers/char/agp/intel-gtt.c for_each_sg(st->sgl, sg, num_entries, i) st 114 drivers/char/agp/intel-gtt.c st->sgl, st->nents, PCI_DMA_BIDIRECTIONAL)) st 120 drivers/char/agp/intel-gtt.c sg_free_table(st); st 126 drivers/char/agp/intel-gtt.c struct sg_table st; st 132 drivers/char/agp/intel-gtt.c st.sgl = sg_list; st 133 drivers/char/agp/intel-gtt.c st.orig_nents = st.nents = num_sg; st 135 drivers/char/agp/intel-gtt.c sg_free_table(&st); st 855 drivers/char/agp/intel-gtt.c void intel_gtt_insert_sg_entries(struct sg_table *st, st 867 drivers/char/agp/intel-gtt.c for_each_sg(st->sgl, sg, st->nents, i) { st 928 drivers/char/agp/intel-gtt.c struct sg_table st; st 930 drivers/char/agp/intel-gtt.c ret = intel_gtt_map_memory(mem->pages, mem->page_count, &st); st 934 drivers/char/agp/intel-gtt.c intel_gtt_insert_sg_entries(&st, pg_start, type); st 935 drivers/char/agp/intel-gtt.c mem->sg_list = st.sgl; st 936 drivers/char/agp/intel-gtt.c mem->num_sg = st.nents; st 104 drivers/char/tpm/tpm_tis.c acpi_status st; st 112 drivers/char/tpm/tpm_tis.c st = st 114 drivers/char/tpm/tpm_tis.c if (ACPI_FAILURE(st) || tbl->header.length < sizeof(*tbl)) { st 471 drivers/crypto/cavium/zip/zip_main.c struct zip_stats *st; st 478 drivers/crypto/cavium/zip/zip_main.c st = &zip->stats; st 487 drivers/crypto/cavium/zip/zip_main.c val = atomic64_read(&st->comp_req_complete); st 488 drivers/crypto/cavium/zip/zip_main.c avg_chunk = (val) ? atomic64_read(&st->comp_in_bytes) / val : 0; st 490 drivers/crypto/cavium/zip/zip_main.c val = atomic64_read(&st->comp_out_bytes); st 491 drivers/crypto/cavium/zip/zip_main.c avg_cr = (val) ? atomic64_read(&st->comp_in_bytes) / val : 0; st 508 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->comp_req_submit), st 509 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->comp_req_complete), st 510 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->comp_in_bytes), st 511 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->comp_out_bytes), st 514 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->decomp_req_submit), st 515 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->decomp_req_complete), st 516 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->decomp_in_bytes), st 517 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->decomp_out_bytes), st 518 drivers/crypto/cavium/zip/zip_main.c (u64)atomic64_read(&st->decomp_bad_reqs), st 91 drivers/dma-buf/selftest.c __subtests(const char *caller, const struct subtest *st, int count, void *data) st 95 drivers/dma-buf/selftest.c for (; count--; st++) { st 100 drivers/dma-buf/selftest.c if (!apply_subtest_filter(caller, st->name)) st 103 drivers/dma-buf/selftest.c pr_info("dma-buf: Running %s/%s\n", caller, st->name); st 105 drivers/dma-buf/selftest.c err = st->func(data); st 108 drivers/dma-buf/selftest.c caller, st->name, err); st 116 drivers/dma-buf/selftest.c static void set_default_test_all(struct selftest *st, unsigned long count) st 121 drivers/dma-buf/selftest.c if (st[i].enabled) st 125 drivers/dma-buf/selftest.c st[i].enabled = true; st 128 drivers/dma-buf/selftest.c static int run_selftests(struct selftest *st, unsigned long count) st 132 drivers/dma-buf/selftest.c set_default_test_all(st, count); st 135 drivers/dma-buf/selftest.c for (; count--; st++) { st 136 drivers/dma-buf/selftest.c if (!st->enabled) st 139 drivers/dma-buf/selftest.c pr_info("dma-buf: Running %s\n", st->name); st 140 drivers/dma-buf/selftest.c err = st->func(); st 147 drivers/dma-buf/selftest.c st->name, err)) st 22 drivers/dma-buf/selftest.h const struct subtest *st, st 630 drivers/dma/tegra20-apb-dma.c bool st; st 650 drivers/dma/tegra20-apb-dma.c st = handle_continuous_head_request(tdc, sgreq, to_terminate); st 651 drivers/dma/tegra20-apb-dma.c if (!st) st 121 drivers/firmware/arm_scmi/power.c struct scmi_power_set_state *st; st 124 drivers/firmware/arm_scmi/power.c sizeof(*st), 0, &t); st 128 drivers/firmware/arm_scmi/power.c st = t->tx.buf; st 129 drivers/firmware/arm_scmi/power.c st->flags = cpu_to_le32(0); st 130 drivers/firmware/arm_scmi/power.c st->domain = cpu_to_le32(domain); st 131 drivers/firmware/arm_scmi/power.c st->state = cpu_to_le32(state); st 279 drivers/fpga/socfpga.c u32 irqs, st; st 287 drivers/fpga/socfpga.c st = socfpga_fpga_raw_readl(priv, SOCFPGA_FPGMGR_GPIO_EXT_PORTA_OFST); st 288 drivers/fpga/socfpga.c conf_done = (st & SOCFPGA_FPGMGR_MON_CONF_DONE) != 0; st 289 drivers/fpga/socfpga.c nstatus = (st & SOCFPGA_FPGMGR_MON_NSTATUS) != 0; st 4838 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int to_drm_connector_type(enum signal_type st) st 4840 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c switch (st) { st 608 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c bool st = (state == AMDGPU_IRQ_STATE_ENABLE); st 610 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c dc_interrupt_set(adev->dm.dc, src, st); st 621 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c bool st; st 639 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c st = (state == AMDGPU_IRQ_STATE_ENABLE); st 641 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c dc_interrupt_set(adev->dm.dc, irq_source, st); st 2471 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c enum dc_status st = DC_OK; st 2483 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c st = core_link_read_dpcd(link, DP_DPCD_REV, &rev.raw, st 2486 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c if (st == DC_OK && rev.raw >= DPCD_REV_12) { st 2488 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c st = core_link_read_dpcd(link, DP_MSTM_CAP, st 2490 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c if (st == DC_OK && cap.bits.MST_CAP == 1) st 709 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h #define smu_store_cc6_data(smu, st, cc6_dis, pst_dis, pst_sw_dis) \ st 710 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h ((smu)->funcs->store_cc6_data ? (smu)->funcs->store_cc6_data((smu), (st), (cc6_dis), (pst_dis), (pst_sw_dis)) : 0) st 157 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c static inline u32 to_d71_input_id(struct komeda_component_state *st, int idx) st 159 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_component_output *input = &st->inputs[idx]; st 162 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c if (has_bit(idx, st->active_inputs)) st 200 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_layer_state *st = to_layer_st(state); st 206 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c u32 ctrl = L_EN | to_rot_ctrl(st->rot); st 208 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c d71_layer_update_fb(c, kfb, st->addr); st 214 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, LAYER_AD_H_CROP, HV_CROP(st->afbc_crop_l, st 215 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c st->afbc_crop_r)); st 216 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, LAYER_AD_V_CROP, HV_CROP(st->afbc_crop_t, st 217 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c st->afbc_crop_b)); st 220 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c addr = st->addr[0] + kfb->offset_payload; st 222 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c addr = st->addr[0] + kfb->afbc_size - 1; st 262 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_IN_SIZE, HV_SIZE(st->hsize, st->vsize)); st 381 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_layer_state *st = to_layer_st(state); st 387 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c d71_layer_update_fb(c, kfb, st->addr); st 392 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_IN_SIZE, HV_SIZE(st->hsize, st->vsize)); st 514 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_compiz_state *st = to_compiz_st(state); st 525 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c &st->cins[index]); st 532 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_SIZE, HV_SIZE(st->hsize, st->vsize)); st 638 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_scaler_state *st = to_scaler_st(state); st 642 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c d71_scaler_update_filter_lut(reg, st->hsize_in, st->vsize_in, st 643 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c st->hsize_out, st->vsize_out); st 645 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_IN_SIZE, HV_SIZE(st->hsize_in, st->vsize_in)); st 646 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, SC_OUT_SIZE, HV_SIZE(st->hsize_out, st->vsize_out)); st 647 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, SC_H_CROP, HV_CROP(st->left_crop, st->right_crop)); st 667 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c if (st->right_part) { st 668 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c u32 dst_a = st->total_hsize_out - st->hsize_out + st->left_crop; st 670 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c if (st->en_img_enhancement) st 673 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c init_ph = ((st->total_hsize_in * (2 * dst_a + 1) - st 674 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c 2 * st->total_hsize_out * (st->total_hsize_in - st 675 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c st->hsize_in)) << 15) / st->total_hsize_out; st 677 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c init_ph = (st->total_hsize_in << 15) / st->total_hsize_out; st 682 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c delta_ph = (st->total_hsize_in << 16) / st->total_hsize_out; st 685 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c init_ph = (st->total_vsize_in << 15) / st->vsize_out; st 688 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c delta_ph = (st->total_vsize_in << 16) / st->vsize_out; st 692 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c ctrl |= st->en_scaling ? SC_CTRL_SCL : 0; st 693 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c ctrl |= st->en_alpha ? SC_CTRL_AP : 0; st 694 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c ctrl |= st->en_img_enhancement ? SC_CTRL_IENH : 0; st 696 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c if (st->en_split && st 812 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_splitter_state *st = to_splitter_st(state); st 816 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_SIZE, HV_SIZE(st->hsize, st->vsize)); st 817 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, SP_OVERLAP_SIZE, st->overlap & 0x1FFF); st 874 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_merger_state *st = to_merger_st(state); st 882 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, MG_SIZE, HV_SIZE(st->hsize_merged, st 883 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c st->vsize_merged)); st 945 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c struct komeda_improc_state *st = to_improc_st(state); st 953 drivers/gpu/drm/arm/display/komeda/d71/d71_component.c malidp_write32(reg, BLK_SIZE, HV_SIZE(st->hsize, st->vsize)); st 136 drivers/gpu/drm/arm/display/komeda/komeda_kms.h static inline bool is_writeback_only(struct drm_crtc_state *st) st 138 drivers/gpu/drm/arm/display/komeda/komeda_kms.h struct komeda_wb_connector *wb_conn = to_kcrtc(st->crtc)->wb_conn; st 141 drivers/gpu/drm/arm/display/komeda/komeda_kms.h return conn && (st->connector_mask == BIT(drm_connector_index(conn))); st 145 drivers/gpu/drm/arm/display/komeda/komeda_kms.h is_only_changed_connector(struct drm_crtc_state *st, struct drm_connector *conn) st 150 drivers/gpu/drm/arm/display/komeda/komeda_kms.h old_st = drm_atomic_get_old_crtc_state(st->state, st->crtc); st 151 drivers/gpu/drm/arm/display/komeda/komeda_kms.h changed_connectors = st->connector_mask ^ old_st->connector_mask; st 208 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h static inline u16 component_disabling_inputs(struct komeda_component_state *st) st 210 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h return st->affected_inputs ^ st->active_inputs; st 213 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h static inline u16 component_changed_inputs(struct komeda_component_state *st) st 215 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h return component_disabling_inputs(st) | st->changed_active_inputs; st 218 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h #define for_each_changed_input(st, i) \ st 219 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h for ((i) = 0; (i) < (st)->component->max_active_inputs; (i)++) \ st 220 drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h if (has_bit((i), component_changed_inputs(st))) st 66 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_pipeline_state *st; st 68 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = komeda_pipeline_get_state(pipe, state); st 69 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (IS_ERR(st)) st 70 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c return st; st 72 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (is_switching_user(crtc, st->crtc)) { st 79 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (!crtc && st->active_comps) { st 84 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->crtc = crtc; st 95 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c return st; st 157 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_component_state *st; st 165 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = komeda_component_get_state(c, state); st 166 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (IS_ERR(st)) st 167 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c return st; st 170 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (is_switching_user(user, st->binding_user)) { st 175 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->binding_user = user; st 177 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (st->binding_user) st 180 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c return st; st 239 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_component_state *st) st 246 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c err = c->funcs->validate(c, st); st 329 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_layer_state *st; st 341 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_layer_st(c_st); st 343 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->rot = dflow->rot; st 346 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize = kfb->aligned_w; st 347 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize = kfb->aligned_h; st 348 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_l = dflow->in_x; st 349 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_r = kfb->aligned_w - dflow->in_x - dflow->in_w; st 350 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_t = dflow->in_y; st 351 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_b = kfb->aligned_h - dflow->in_y - dflow->in_h; st 353 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize = dflow->in_w; st 354 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize = dflow->in_h; st 355 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_l = 0; st 356 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_r = 0; st 357 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_t = 0; st 358 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->afbc_crop_b = 0; st 362 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->addr[i] = komeda_fb_get_pixel_addr(kfb, dflow->in_x, st 376 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_rotate_data_flow(dflow, st->rot); st 388 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_layer_state *st; st 400 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_layer_st(c_st); st 402 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize = dflow->out_w; st 403 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize = dflow->out_h; st 406 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->addr[i] = komeda_fb_get_pixel_addr(kfb, dflow->out_x, st 409 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_component_add_input(&st->base, &dflow->input, 0); st 493 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_scaler_state *st; st 516 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_scaler_st(c_st); st 518 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize_in = dflow->in_w; st 519 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize_in = dflow->in_h; st 520 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize_out = dflow->out_w; st 521 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize_out = dflow->out_h; st 522 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->right_crop = dflow->right_crop; st 523 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->left_crop = dflow->left_crop; st 524 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->total_vsize_in = dflow->total_in_h; st 525 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->total_hsize_in = dflow->total_in_w; st 526 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->total_hsize_out = dflow->total_out_w; st 529 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->en_alpha = dflow->pixel_blend_mode != DRM_MODE_BLEND_PIXEL_NONE; st 530 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->en_scaling = dflow->en_scaling; st 531 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->en_img_enhancement = dflow->en_img_enhancement; st 532 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->en_split = dflow->en_split; st 533 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->right_part = dflow->right_part; st 535 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_component_add_input(&st->base, &dflow->input, 0); st 553 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_splitter_state *st; st 581 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_splitter_st(c_st); st 582 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize = dflow->in_w; st 583 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize = dflow->in_h; st 584 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->overlap = dflow->overlap; st 586 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_component_add_input(&st->base, &dflow->input, 0); st 602 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_merger_state *st; st 628 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_merger_st(c_st); st 629 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize_merged = output->out_w; st 630 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize_merged = output->out_h; st 708 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_compiz_state *st; st 715 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_compiz_st(c_st); st 717 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c pipeline_composition_size(state, &st->hsize, &st->vsize); st 725 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c dflow->in_w = st->hsize; st 726 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c dflow->in_h = st->vsize; st 747 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_improc_state *st; st 754 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_improc_st(c_st); st 756 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->hsize = dflow->in_w; st 757 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st->vsize = dflow->in_h; st 759 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_component_add_input(&st->base, &dflow->input, 0); st 771 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_timing_ctrlr_state *st; st 779 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = to_ctrlr_st(c_st); st 781 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_component_add_input(&st->base, &dflow->input, 0); st 1202 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c struct komeda_pipeline_state *st; st 1209 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = komeda_pipeline_get_new_state(pipe, drm_st); st 1211 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c st = komeda_pipeline_get_state_and_set_crtc(pipe, drm_st, NULL); st 1213 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c if (WARN_ON(IS_ERR_OR_NULL(st))) st 1216 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c komeda_pipeline_unbound_components(pipe, st); st 16 drivers/gpu/drm/arm/display/komeda/komeda_plane.c komeda_plane_init_data_flow(struct drm_plane_state *st, st 20 drivers/gpu/drm/arm/display/komeda/komeda_plane.c struct komeda_plane *kplane = to_kplane(st->plane); st 21 drivers/gpu/drm/arm/display/komeda/komeda_plane.c struct drm_framebuffer *fb = st->fb; st 27 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->blending_zorder = st->normalized_zpos; st 28 drivers/gpu/drm/arm/display/komeda/komeda_plane.c if (pipe == to_kcrtc(st->crtc)->master) st 32 drivers/gpu/drm/arm/display/komeda/komeda_plane.c st->plane->name, st->normalized_zpos, st 37 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->pixel_blend_mode = st->pixel_blend_mode; st 38 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->layer_alpha = st->alpha >> 8; st 40 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->out_x = st->crtc_x; st 41 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->out_y = st->crtc_y; st 42 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->out_w = st->crtc_w; st 43 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->out_h = st->crtc_h; st 45 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->in_x = st->src_x >> 16; st 46 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->in_y = st->src_y >> 16; st 47 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->in_w = st->src_w >> 16; st 48 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->in_h = st->src_h >> 16; st 50 drivers/gpu/drm/arm/display/komeda/komeda_plane.c dflow->rot = drm_rotation_simplify(st->rotation, caps->supported_rots); st 11 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(struct komeda_component_state *st) st 13 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->binding_user = NULL; st 14 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->affected_inputs = st->active_inputs; st 15 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->active_inputs = 0; st 16 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->changed_active_inputs = 0; st 22 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_layer_state *st; st 24 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 25 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 28 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 29 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 31 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 38 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_layer_state *st = to_layer_st(priv_to_comp_st(state)); st 40 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c kfree(st); st 51 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_layer_state *st; st 53 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 54 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 57 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &layer->base; st 58 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c drm_atomic_private_obj_init(&kms->base, &layer->base.obj, &st->base.obj, st 66 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_scaler_state *st; st 68 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 69 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 72 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 73 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 75 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 93 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_scaler_state *st; st 95 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 96 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 99 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &scaler->base; st 101 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c &scaler->base.obj, &st->base.obj, st 109 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_compiz_state *st; st 111 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 112 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 115 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 116 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 118 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 136 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_compiz_state *st; st 138 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 139 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 142 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &compiz->base; st 143 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c drm_atomic_private_obj_init(&kms->base, &compiz->base.obj, &st->base.obj, st 152 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_splitter_state *st; st 154 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 155 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 158 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 159 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 161 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 179 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_splitter_state *st; st 181 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 182 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 185 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &splitter->base; st 187 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c &splitter->base.obj, &st->base.obj, st 196 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_merger_state *st; st 198 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 199 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 202 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 203 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 205 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 222 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_merger_state *st; st 224 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 225 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 228 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &merger->base; st 230 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c &merger->base.obj, &st->base.obj, st 239 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_improc_state *st; st 241 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 242 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 245 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 246 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 248 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 266 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_improc_state *st; st 268 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 269 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 272 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &improc->base; st 273 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c drm_atomic_private_obj_init(&kms->base, &improc->base.obj, &st->base.obj, st 282 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_timing_ctrlr_state *st; st 284 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 285 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 288 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c komeda_component_state_reset(&st->base); st 289 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj); st 291 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->base.obj; st 309 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_compiz_state *st; st 311 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 312 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 315 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->base.component = &ctrlr->base; st 316 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c drm_atomic_private_obj_init(&kms->base, &ctrlr->base.obj, &st->base.obj, st 325 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_pipeline_state *st; st 327 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kmemdup(obj->state, sizeof(*st), GFP_KERNEL); st 328 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 331 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->active_comps = 0; st 333 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c __drm_atomic_helper_private_obj_duplicate_state(obj, &st->obj); st 335 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c return &st->obj; st 353 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c struct komeda_pipeline_state *st; st 355 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 356 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c if (!st) st 359 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c st->pipe = pipe; st 360 drivers/gpu/drm/arm/display/komeda/komeda_private_obj.c drm_atomic_private_obj_init(&kms->base, &pipe->obj, &st->obj, st 111 drivers/gpu/drm/armada/armada_plane.c struct armada_plane_state *st = to_armada_plane_state(state); st 136 drivers/gpu/drm/armada/armada_plane.c st->src_hw = drm_rect_height(&state->src) >> 17; st 137 drivers/gpu/drm/armada/armada_plane.c st->dst_yx = state->dst.y1 >> 1; st 138 drivers/gpu/drm/armada/armada_plane.c st->dst_hw = drm_rect_height(&state->dst) >> 1; st 140 drivers/gpu/drm/armada/armada_plane.c st->src_hw = drm_rect_height(&state->src) >> 16; st 141 drivers/gpu/drm/armada/armada_plane.c st->dst_yx = state->dst.y1; st 142 drivers/gpu/drm/armada/armada_plane.c st->dst_hw = drm_rect_height(&state->dst); st 145 drivers/gpu/drm/armada/armada_plane.c st->src_hw <<= 16; st 146 drivers/gpu/drm/armada/armada_plane.c st->src_hw |= drm_rect_width(&state->src) >> 16; st 147 drivers/gpu/drm/armada/armada_plane.c st->dst_yx <<= 16; st 148 drivers/gpu/drm/armada/armada_plane.c st->dst_yx |= state->dst.x1 & 0x0000ffff; st 149 drivers/gpu/drm/armada/armada_plane.c st->dst_hw <<= 16; st 150 drivers/gpu/drm/armada/armada_plane.c st->dst_hw |= drm_rect_width(&state->dst) & 0x0000ffff; st 152 drivers/gpu/drm/armada/armada_plane.c armada_drm_plane_calc(state, st->addrs, st->pitches, interlace); st 153 drivers/gpu/drm/armada/armada_plane.c st->interlace = interlace; st 283 drivers/gpu/drm/armada/armada_plane.c struct armada_plane_state *st; st 287 drivers/gpu/drm/armada/armada_plane.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 288 drivers/gpu/drm/armada/armada_plane.c if (st) st 289 drivers/gpu/drm/armada/armada_plane.c __drm_atomic_helper_plane_reset(plane, &st->base); st 294 drivers/gpu/drm/armada/armada_plane.c struct armada_plane_state *st; st 299 drivers/gpu/drm/armada/armada_plane.c st = kmemdup(plane->state, sizeof(*st), GFP_KERNEL); st 300 drivers/gpu/drm/armada/armada_plane.c if (st) st 301 drivers/gpu/drm/armada/armada_plane.c __drm_atomic_helper_plane_duplicate_state(plane, &st->base); st 303 drivers/gpu/drm/armada/armada_plane.c return &st->base; st 14 drivers/gpu/drm/armada/armada_plane.h #define to_armada_plane_state(st) \ st 15 drivers/gpu/drm/armada/armada_plane.h container_of(st, struct armada_plane_state, base) st 1698 drivers/gpu/drm/bridge/sil-sii8620.c u8 st[MHL_DST_SIZE], xst[MHL_XDS_SIZE]; st 1700 drivers/gpu/drm/bridge/sil-sii8620.c sii8620_read_buf(ctx, REG_MHL_STAT_0, st, MHL_DST_SIZE); st 1703 drivers/gpu/drm/bridge/sil-sii8620.c sii8620_update_array(ctx->stat, st, MHL_DST_SIZE); st 1706 drivers/gpu/drm/bridge/sil-sii8620.c if (ctx->stat[MHL_DST_CONNECTED_RDY] & st[MHL_DST_CONNECTED_RDY] & st 1714 drivers/gpu/drm/bridge/sil-sii8620.c if (st[MHL_DST_LINK_MODE] & MHL_DST_LM_PATH_ENABLED) st 122 drivers/gpu/drm/drm_cache.c drm_clflush_sg(struct sg_table *st) st 129 drivers/gpu/drm/drm_cache.c for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) st 24 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c struct sg_table *st; st 33 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c st = kmalloc(sizeof(struct sg_table), GFP_KERNEL); st 34 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c if (st == NULL) { st 39 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c ret = sg_alloc_table(st, obj->mm.pages->nents, GFP_KERNEL); st 44 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c dst = st->sgl; st 51 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c if (!dma_map_sg(attachment->dev, st->sgl, st->nents, dir)) { st 56 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c return st; st 59 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c sg_free_table(st); st 61 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c kfree(st); st 22 drivers/gpu/drm/i915/gem/i915_gem_internal.c static void internal_free_pages(struct sg_table *st) st 26 drivers/gpu/drm/i915/gem/i915_gem_internal.c for (sg = st->sgl; sg; sg = __sg_next(sg)) { st 31 drivers/gpu/drm/i915/gem/i915_gem_internal.c sg_free_table(st); st 32 drivers/gpu/drm/i915/gem/i915_gem_internal.c kfree(st); st 38 drivers/gpu/drm/i915/gem/i915_gem_internal.c struct sg_table *st; st 67 drivers/gpu/drm/i915/gem/i915_gem_internal.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 68 drivers/gpu/drm/i915/gem/i915_gem_internal.c if (!st) st 72 drivers/gpu/drm/i915/gem/i915_gem_internal.c if (sg_alloc_table(st, npages, GFP_KERNEL)) { st 73 drivers/gpu/drm/i915/gem/i915_gem_internal.c kfree(st); st 77 drivers/gpu/drm/i915/gem/i915_gem_internal.c sg = st->sgl; st 78 drivers/gpu/drm/i915/gem/i915_gem_internal.c st->nents = 0; st 99 drivers/gpu/drm/i915/gem/i915_gem_internal.c st->nents++; st 110 drivers/gpu/drm/i915/gem/i915_gem_internal.c if (i915_gem_gtt_prepare_pages(obj, st)) { st 112 drivers/gpu/drm/i915/gem/i915_gem_internal.c if (get_order(st->sgl->length)) { st 113 drivers/gpu/drm/i915/gem/i915_gem_internal.c internal_free_pages(st); st 127 drivers/gpu/drm/i915/gem/i915_gem_internal.c __i915_gem_object_set_pages(obj, st, sg_page_sizes); st 134 drivers/gpu/drm/i915/gem/i915_gem_internal.c internal_free_pages(st); st 25 drivers/gpu/drm/i915/gem/i915_gem_phys.c struct sg_table *st; st 45 drivers/gpu/drm/i915/gem/i915_gem_phys.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 46 drivers/gpu/drm/i915/gem/i915_gem_phys.c if (!st) st 49 drivers/gpu/drm/i915/gem/i915_gem_phys.c if (sg_alloc_table(st, 1, GFP_KERNEL)) st 52 drivers/gpu/drm/i915/gem/i915_gem_phys.c sg = st->sgl; st 80 drivers/gpu/drm/i915/gem/i915_gem_phys.c __i915_gem_object_set_pages(obj, st, sg->length); st 85 drivers/gpu/drm/i915/gem/i915_gem_phys.c kfree(st); st 32 drivers/gpu/drm/i915/gem/i915_gem_shmem.c struct sg_table *st; st 58 drivers/gpu/drm/i915/gem/i915_gem_shmem.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 59 drivers/gpu/drm/i915/gem/i915_gem_shmem.c if (!st) st 63 drivers/gpu/drm/i915/gem/i915_gem_shmem.c if (sg_alloc_table(st, page_count, GFP_KERNEL)) { st 64 drivers/gpu/drm/i915/gem/i915_gem_shmem.c kfree(st); st 79 drivers/gpu/drm/i915/gem/i915_gem_shmem.c sg = st->sgl; st 80 drivers/gpu/drm/i915/gem/i915_gem_shmem.c st->nents = 0; st 140 drivers/gpu/drm/i915/gem/i915_gem_shmem.c st->nents++; st 156 drivers/gpu/drm/i915/gem/i915_gem_shmem.c i915_sg_trim(st); st 158 drivers/gpu/drm/i915/gem/i915_gem_shmem.c ret = i915_gem_gtt_prepare_pages(obj, st); st 166 drivers/gpu/drm/i915/gem/i915_gem_shmem.c for_each_sgt_page(page, sgt_iter, st) st 168 drivers/gpu/drm/i915/gem/i915_gem_shmem.c sg_free_table(st); st 181 drivers/gpu/drm/i915/gem/i915_gem_shmem.c i915_gem_object_do_bit_17_swizzle(obj, st); st 183 drivers/gpu/drm/i915/gem/i915_gem_shmem.c __i915_gem_object_set_pages(obj, st, sg_page_sizes); st 192 drivers/gpu/drm/i915/gem/i915_gem_shmem.c for_each_sgt_page(page, sgt_iter, st) { st 198 drivers/gpu/drm/i915/gem/i915_gem_shmem.c sg_free_table(st); st 199 drivers/gpu/drm/i915/gem/i915_gem_shmem.c kfree(st); st 478 drivers/gpu/drm/i915/gem/i915_gem_stolen.c struct sg_table *st; st 488 drivers/gpu/drm/i915/gem/i915_gem_stolen.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 489 drivers/gpu/drm/i915/gem/i915_gem_stolen.c if (st == NULL) st 492 drivers/gpu/drm/i915/gem/i915_gem_stolen.c if (sg_alloc_table(st, 1, GFP_KERNEL)) { st 493 drivers/gpu/drm/i915/gem/i915_gem_stolen.c kfree(st); st 497 drivers/gpu/drm/i915/gem/i915_gem_stolen.c sg = st->sgl; st 504 drivers/gpu/drm/i915/gem/i915_gem_stolen.c return st; st 433 drivers/gpu/drm/i915/gem/i915_gem_userptr.c struct sg_table *st; st 437 drivers/gpu/drm/i915/gem/i915_gem_userptr.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 438 drivers/gpu/drm/i915/gem/i915_gem_userptr.c if (!st) st 442 drivers/gpu/drm/i915/gem/i915_gem_userptr.c ret = __sg_alloc_table_from_pages(st, pvec, num_pages, st 447 drivers/gpu/drm/i915/gem/i915_gem_userptr.c kfree(st); st 451 drivers/gpu/drm/i915/gem/i915_gem_userptr.c ret = i915_gem_gtt_prepare_pages(obj, st); st 453 drivers/gpu/drm/i915/gem/i915_gem_userptr.c sg_free_table(st); st 460 drivers/gpu/drm/i915/gem/i915_gem_userptr.c kfree(st); st 464 drivers/gpu/drm/i915/gem/i915_gem_userptr.c sg_page_sizes = i915_sg_page_sizes(st->sgl); st 466 drivers/gpu/drm/i915/gem/i915_gem_userptr.c __i915_gem_object_set_pages(obj, st, sg_page_sizes); st 468 drivers/gpu/drm/i915/gem/i915_gem_userptr.c return st; st 43 drivers/gpu/drm/i915/gem/selftests/huge_pages.c static void huge_pages_free_pages(struct sg_table *st) st 47 drivers/gpu/drm/i915/gem/selftests/huge_pages.c for (sg = st->sgl; sg; sg = __sg_next(sg)) { st 52 drivers/gpu/drm/i915/gem/selftests/huge_pages.c sg_free_table(st); st 53 drivers/gpu/drm/i915/gem/selftests/huge_pages.c kfree(st); st 60 drivers/gpu/drm/i915/gem/selftests/huge_pages.c struct sg_table *st; st 65 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st = kmalloc(sizeof(*st), GFP); st 66 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (!st) st 69 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (sg_alloc_table(st, obj->base.size >> PAGE_SHIFT, GFP)) { st 70 drivers/gpu/drm/i915/gem/selftests/huge_pages.c kfree(st); st 75 drivers/gpu/drm/i915/gem/selftests/huge_pages.c sg = st->sgl; st 76 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st->nents = 0; st 99 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st->nents++; st 113 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (i915_gem_gtt_prepare_pages(obj, st)) st 119 drivers/gpu/drm/i915/gem/selftests/huge_pages.c __i915_gem_object_set_pages(obj, st, sg_page_sizes); st 126 drivers/gpu/drm/i915/gem/selftests/huge_pages.c huge_pages_free_pages(st); st 184 drivers/gpu/drm/i915/gem/selftests/huge_pages.c struct sg_table *st; st 189 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st = kmalloc(sizeof(*st), GFP); st 190 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (!st) st 193 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (sg_alloc_table(st, obj->base.size >> PAGE_SHIFT, GFP)) { st 194 drivers/gpu/drm/i915/gem/selftests/huge_pages.c kfree(st); st 200 drivers/gpu/drm/i915/gem/selftests/huge_pages.c sg = st->sgl; st 201 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st->nents = 0; st 217 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st->nents++; st 228 drivers/gpu/drm/i915/gem/selftests/huge_pages.c i915_sg_trim(st); st 232 drivers/gpu/drm/i915/gem/selftests/huge_pages.c __i915_gem_object_set_pages(obj, st, sg_page_sizes); st 240 drivers/gpu/drm/i915/gem/selftests/huge_pages.c struct sg_table *st; st 244 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st = kmalloc(sizeof(*st), GFP); st 245 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (!st) st 248 drivers/gpu/drm/i915/gem/selftests/huge_pages.c if (sg_alloc_table(st, 1, GFP)) { st 249 drivers/gpu/drm/i915/gem/selftests/huge_pages.c kfree(st); st 253 drivers/gpu/drm/i915/gem/selftests/huge_pages.c sg = st->sgl; st 254 drivers/gpu/drm/i915/gem/selftests/huge_pages.c st->nents = 1; st 266 drivers/gpu/drm/i915/gem/selftests/huge_pages.c __i915_gem_object_set_pages(obj, st, sg->length); st 13 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c struct sg_table *st; st 17 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 18 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c if (!st) st 21 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c err = sg_alloc_table(st, mock->npages, GFP_KERNEL); st 25 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c sg = st->sgl; st 31 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c if (!dma_map_sg(attachment->dev, st->sgl, st->nents, dir)) { st 36 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c return st; st 39 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c sg_free_table(st); st 41 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c kfree(st); st 46 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c struct sg_table *st, st 49 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c dma_unmap_sg(attachment->dev, st->sgl, st->nents, dir); st 50 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c sg_free_table(st); st 51 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c kfree(st); st 43 drivers/gpu/drm/i915/gvt/dmabuf.c struct sg_table *st; st 54 drivers/gpu/drm/i915/gvt/dmabuf.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 55 drivers/gpu/drm/i915/gvt/dmabuf.c if (unlikely(!st)) st 59 drivers/gpu/drm/i915/gvt/dmabuf.c ret = sg_alloc_table(st, page_num, GFP_KERNEL); st 61 drivers/gpu/drm/i915/gvt/dmabuf.c kfree(st); st 66 drivers/gpu/drm/i915/gvt/dmabuf.c for_each_sg(st->sgl, sg, page_num, i) { st 74 drivers/gpu/drm/i915/gvt/dmabuf.c __i915_gem_object_set_pages(obj, st, PAGE_SIZE); st 3360 drivers/gpu/drm/i915/i915_gem_gtt.c struct sg_table *st, struct scatterlist *sg) st 3368 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents++; st 3390 drivers/gpu/drm/i915/i915_gem_gtt.c struct sg_table *st; st 3396 drivers/gpu/drm/i915/i915_gem_gtt.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 3397 drivers/gpu/drm/i915/i915_gem_gtt.c if (!st) st 3400 drivers/gpu/drm/i915/i915_gem_gtt.c ret = sg_alloc_table(st, size, GFP_KERNEL); st 3404 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents = 0; st 3405 drivers/gpu/drm/i915/i915_gem_gtt.c sg = st->sgl; st 3410 drivers/gpu/drm/i915/i915_gem_gtt.c rot_info->plane[i].stride, st, sg); st 3413 drivers/gpu/drm/i915/i915_gem_gtt.c return st; st 3416 drivers/gpu/drm/i915/i915_gem_gtt.c kfree(st); st 3429 drivers/gpu/drm/i915/i915_gem_gtt.c struct sg_table *st, struct scatterlist *sg) st 3449 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents++; st 3471 drivers/gpu/drm/i915/i915_gem_gtt.c struct sg_table *st; st 3477 drivers/gpu/drm/i915/i915_gem_gtt.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 3478 drivers/gpu/drm/i915/i915_gem_gtt.c if (!st) st 3481 drivers/gpu/drm/i915/i915_gem_gtt.c ret = sg_alloc_table(st, size, GFP_KERNEL); st 3485 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents = 0; st 3486 drivers/gpu/drm/i915/i915_gem_gtt.c sg = st->sgl; st 3491 drivers/gpu/drm/i915/i915_gem_gtt.c rem_info->plane[i].stride, st, sg); st 3494 drivers/gpu/drm/i915/i915_gem_gtt.c i915_sg_trim(st); st 3496 drivers/gpu/drm/i915/i915_gem_gtt.c return st; st 3499 drivers/gpu/drm/i915/i915_gem_gtt.c kfree(st); st 3512 drivers/gpu/drm/i915/i915_gem_gtt.c struct sg_table *st; st 3518 drivers/gpu/drm/i915/i915_gem_gtt.c st = kmalloc(sizeof(*st), GFP_KERNEL); st 3519 drivers/gpu/drm/i915/i915_gem_gtt.c if (!st) st 3522 drivers/gpu/drm/i915/i915_gem_gtt.c ret = sg_alloc_table(st, count, GFP_KERNEL); st 3529 drivers/gpu/drm/i915/i915_gem_gtt.c sg = st->sgl; st 3530 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents = 0; st 3541 drivers/gpu/drm/i915/i915_gem_gtt.c st->nents++; st 3545 drivers/gpu/drm/i915/i915_gem_gtt.c i915_sg_trim(st); /* Drop any unused tail entries. */ st 3547 drivers/gpu/drm/i915/i915_gem_gtt.c return st; st 3556 drivers/gpu/drm/i915/i915_gem_gtt.c kfree(st); st 83 drivers/gpu/drm/i915/i915_selftest.h const struct i915_subtest *st, st 97 drivers/gpu/drm/i915/selftests/i915_selftest.c static void set_default_test_all(struct selftest *st, unsigned int count) st 102 drivers/gpu/drm/i915/selftests/i915_selftest.c if (st[i].enabled) st 106 drivers/gpu/drm/i915/selftests/i915_selftest.c st[i].enabled = true; st 110 drivers/gpu/drm/i915/selftests/i915_selftest.c struct selftest *st, st 124 drivers/gpu/drm/i915/selftests/i915_selftest.c set_default_test_all(st, count); st 130 drivers/gpu/drm/i915/selftests/i915_selftest.c for (; count--; st++) { st 131 drivers/gpu/drm/i915/selftests/i915_selftest.c if (!st->enabled) st 138 drivers/gpu/drm/i915/selftests/i915_selftest.c pr_info(DRIVER_NAME ": Running %s\n", st->name); st 140 drivers/gpu/drm/i915/selftests/i915_selftest.c err = st->live(data); st 142 drivers/gpu/drm/i915/selftests/i915_selftest.c err = st->mock(); st 151 drivers/gpu/drm/i915/selftests/i915_selftest.c st->name, err)) st 300 drivers/gpu/drm/i915/selftests/i915_selftest.c const struct i915_subtest *st, st 306 drivers/gpu/drm/i915/selftests/i915_selftest.c for (; count--; st++) { st 311 drivers/gpu/drm/i915/selftests/i915_selftest.c if (!apply_subtest_filter(caller, st->name)) st 317 drivers/gpu/drm/i915/selftests/i915_selftest.c caller, st->name); st 321 drivers/gpu/drm/i915/selftests/i915_selftest.c pr_info(DRIVER_NAME ": Running %s/%s\n", caller, st->name); st 322 drivers/gpu/drm/i915/selftests/i915_selftest.c GEM_TRACE("Running %s/%s\n", caller, st->name); st 324 drivers/gpu/drm/i915/selftests/i915_selftest.c err = teardown(st->func(data), data); st 327 drivers/gpu/drm/i915/selftests/i915_selftest.c caller, st->name, err); st 33 drivers/gpu/drm/i915/selftests/scatterlist.c struct sg_table st; st 51 drivers/gpu/drm/i915/selftests/scatterlist.c for_each_sg(pt->st.sgl, sg, pt->st.nents, n) { st 53 drivers/gpu/drm/i915/selftests/scatterlist.c unsigned int npages = npages_fn(n, pt->st.nents, rnd); st 89 drivers/gpu/drm/i915/selftests/scatterlist.c for_each_sg_page(pt->st.sgl, &sgiter, pt->st.nents, 0) { st 121 drivers/gpu/drm/i915/selftests/scatterlist.c for_each_sgt_page(page, sgt, &pt->st) { st 223 drivers/gpu/drm/i915/selftests/scatterlist.c if (sg_alloc_table(&pt->st, max, st 236 drivers/gpu/drm/i915/selftests/scatterlist.c sg = pt->st.sgl; st 244 drivers/gpu/drm/i915/selftests/scatterlist.c sg_free_table(&pt->st); st 259 drivers/gpu/drm/i915/selftests/scatterlist.c pt->st.nents = n; st 307 drivers/gpu/drm/i915/selftests/scatterlist.c sg_free_table(&pt.st); st 344 drivers/gpu/drm/i915/selftests/scatterlist.c if (i915_sg_trim(&pt.st)) { st 345 drivers/gpu/drm/i915/selftests/scatterlist.c if (pt.st.orig_nents != prime || st 346 drivers/gpu/drm/i915/selftests/scatterlist.c pt.st.nents != prime) { st 348 drivers/gpu/drm/i915/selftests/scatterlist.c pt.st.nents, pt.st.orig_nents, prime); st 359 drivers/gpu/drm/i915/selftests/scatterlist.c sg_free_table(&pt.st); st 60 drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c enum nvkm_therm_thrs_state st) st 62 drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c therm->sensor.alarm_state[thrs] = st; st 412 drivers/gpu/drm/savage/savage_drv.h #define BCI_BD_SET_STRIDE(bd, st) ((bd) |= ((st) & 0xFFFF)) st 50 drivers/gpu/drm/selftests/drm_selftest.c static void set_default_test_all(struct drm_selftest *st, unsigned long count) st 55 drivers/gpu/drm/selftests/drm_selftest.c if (st[i].enabled) st 59 drivers/gpu/drm/selftests/drm_selftest.c st[i].enabled = true; st 62 drivers/gpu/drm/selftests/drm_selftest.c static int run_selftests(struct drm_selftest *st, st 68 drivers/gpu/drm/selftests/drm_selftest.c set_default_test_all(st, count); st 71 drivers/gpu/drm/selftests/drm_selftest.c for (; count--; st++) { st 72 drivers/gpu/drm/selftests/drm_selftest.c if (!st->enabled) st 75 drivers/gpu/drm/selftests/drm_selftest.c pr_debug("drm: Running %s\n", st->name); st 76 drivers/gpu/drm/selftests/drm_selftest.c err = st->func(data); st 83 drivers/gpu/drm/selftests/drm_selftest.c st->name, err)) st 92 drivers/gpu/drm/selftests/drm_selftest.c const struct drm_subtest *st, st 98 drivers/gpu/drm/selftests/drm_selftest.c for (; count--; st++) { st 99 drivers/gpu/drm/selftests/drm_selftest.c pr_debug("Running %s/%s\n", caller, st->name); st 100 drivers/gpu/drm/selftests/drm_selftest.c err = st->func(data); st 103 drivers/gpu/drm/selftests/drm_selftest.c caller, st->name, err); st 33 drivers/gpu/drm/selftests/drm_selftest.h const struct drm_subtest *st, st 334 drivers/gpu/drm/selftests/test-drm_mm.c #define B(st, sz) { (st), (sz), "{ " #st ", " #sz "}" } st 67 drivers/hwmon/iio_hwmon.c struct iio_hwmon_state *st; st 83 drivers/hwmon/iio_hwmon.c st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL); st 84 drivers/hwmon/iio_hwmon.c if (st == NULL) st 87 drivers/hwmon/iio_hwmon.c st->channels = channels; st 90 drivers/hwmon/iio_hwmon.c while (st->channels[st->num_channels].indio_dev) st 91 drivers/hwmon/iio_hwmon.c st->num_channels++; st 93 drivers/hwmon/iio_hwmon.c st->attrs = devm_kcalloc(dev, st 94 drivers/hwmon/iio_hwmon.c st->num_channels + 1, sizeof(*st->attrs), st 96 drivers/hwmon/iio_hwmon.c if (st->attrs == NULL) st 99 drivers/hwmon/iio_hwmon.c for (i = 0; i < st->num_channels; i++) { st 108 drivers/hwmon/iio_hwmon.c ret = iio_get_channel_type(&st->channels[i], &type); st 146 drivers/hwmon/iio_hwmon.c st->attrs[i] = &a->dev_attr.attr; st 149 drivers/hwmon/iio_hwmon.c st->attr_group.attrs = st->attrs; st 150 drivers/hwmon/iio_hwmon.c st->groups[0] = &st->attr_group; st 161 drivers/hwmon/iio_hwmon.c hwmon_dev = devm_hwmon_device_register_with_groups(dev, sname, st, st 162 drivers/hwmon/iio_hwmon.c st->groups); st 1678 drivers/hwmon/lm90.c int st, st2 = 0; st 1680 drivers/hwmon/lm90.c st = lm90_read_reg(client, LM90_REG_R_STATUS); st 1681 drivers/hwmon/lm90.c if (st < 0) st 1690 drivers/hwmon/lm90.c *status = st | (st2 << 8); st 1692 drivers/hwmon/lm90.c if ((st & 0x7f) == 0 && (st2 & 0xfe) == 0) st 1695 drivers/hwmon/lm90.c if ((st & (LM90_STATUS_LLOW | LM90_STATUS_LHIGH | LM90_STATUS_LTHRM)) || st 1699 drivers/hwmon/lm90.c if ((st & (LM90_STATUS_RLOW | LM90_STATUS_RHIGH | LM90_STATUS_RTHRM)) || st 1703 drivers/hwmon/lm90.c if (st & LM90_STATUS_ROPEN) st 586 drivers/i2c/busses/i2c-exynos5.c u32 st = readl(i2c->regs + HSI2C_TRANS_STATUS); st 588 drivers/i2c/busses/i2c-exynos5.c if ((st & HSI2C_MASTER_ST_MASK) != HSI2C_MASTER_ST_LOSE) st 117 drivers/ide/ide-proc.c const struct ide_proc_devset *ide_find_setting(const struct ide_proc_devset *st, st 120 drivers/ide/ide-proc.c while (st->name) { st 121 drivers/ide/ide-proc.c if (strcmp(st->name, name) == 0) st 123 drivers/ide/ide-proc.c st++; st 125 drivers/ide/ide-proc.c return st->name ? st : NULL; st 105 drivers/iio/accel/adis16201.c struct adis *st = iio_priv(indio_dev); st 169 drivers/iio/accel/adis16201.c ret = adis_read_reg_16(st, addr, &val16); st 186 drivers/iio/accel/adis16201.c struct adis *st = iio_priv(indio_dev); st 203 drivers/iio/accel/adis16201.c return adis_write_reg_16(st, adis16201_addresses[chan->scan_index], st 256 drivers/iio/accel/adis16201.c struct adis *st; st 259 drivers/iio/accel/adis16201.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 263 drivers/iio/accel/adis16201.c st = iio_priv(indio_dev); st 274 drivers/iio/accel/adis16201.c ret = adis_init(st, indio_dev, spi, &adis16201_data); st 278 drivers/iio/accel/adis16201.c ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); st 282 drivers/iio/accel/adis16201.c ret = adis_initial_startup(st); st 293 drivers/iio/accel/adis16201.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 300 drivers/iio/accel/adis16201.c struct adis *st = iio_priv(indio_dev); st 303 drivers/iio/accel/adis16201.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 113 drivers/iio/accel/adis16209.c struct adis *st = iio_priv(indio_dev); st 128 drivers/iio/accel/adis16209.c return adis_write_reg_16(st, adis16209_addresses[chan->scan_index][0], st 137 drivers/iio/accel/adis16209.c struct adis *st = iio_priv(indio_dev); st 205 drivers/iio/accel/adis16209.c ret = adis_read_reg_16(st, addr, &val16); st 267 drivers/iio/accel/adis16209.c struct adis *st; st 270 drivers/iio/accel/adis16209.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 274 drivers/iio/accel/adis16209.c st = iio_priv(indio_dev); st 284 drivers/iio/accel/adis16209.c ret = adis_init(st, indio_dev, spi, &adis16209_data); st 288 drivers/iio/accel/adis16209.c ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); st 292 drivers/iio/accel/adis16209.c ret = adis_initial_startup(st); st 302 drivers/iio/accel/adis16209.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 309 drivers/iio/accel/adis16209.c struct adis *st = iio_priv(indio_dev); st 312 drivers/iio/accel/adis16209.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 279 drivers/iio/accel/adxl372.c static int adxl372_read_axis(struct adxl372_state *st, u8 addr) st 284 drivers/iio/accel/adxl372.c ret = regmap_bulk_read(st->regmap, addr, ®val, sizeof(regval)); st 291 drivers/iio/accel/adxl372.c static int adxl372_set_op_mode(struct adxl372_state *st, st 296 drivers/iio/accel/adxl372.c ret = regmap_update_bits(st->regmap, ADXL372_POWER_CTL, st 302 drivers/iio/accel/adxl372.c st->op_mode = op_mode; st 307 drivers/iio/accel/adxl372.c static int adxl372_set_odr(struct adxl372_state *st, st 312 drivers/iio/accel/adxl372.c ret = regmap_update_bits(st->regmap, ADXL372_TIMING, st 318 drivers/iio/accel/adxl372.c st->odr = odr; st 336 drivers/iio/accel/adxl372.c static int adxl372_set_bandwidth(struct adxl372_state *st, st 341 drivers/iio/accel/adxl372.c ret = regmap_update_bits(st->regmap, ADXL372_MEASURE, st 347 drivers/iio/accel/adxl372.c st->bw = bw; st 352 drivers/iio/accel/adxl372.c static int adxl372_set_act_proc_mode(struct adxl372_state *st, st 357 drivers/iio/accel/adxl372.c ret = regmap_update_bits(st->regmap, st 364 drivers/iio/accel/adxl372.c st->act_proc_mode = mode; st 369 drivers/iio/accel/adxl372.c static int adxl372_set_activity_threshold(struct adxl372_state *st, st 389 drivers/iio/accel/adxl372.c return regmap_bulk_write(st->regmap, th_reg_high_addr, st 393 drivers/iio/accel/adxl372.c static int adxl372_set_activity_time_ms(struct adxl372_state *st, st 403 drivers/iio/accel/adxl372.c if (st->odr == ADXL372_ODR_6400HZ) st 414 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_TIME_ACT, reg_val); st 418 drivers/iio/accel/adxl372.c st->act_time_ms = act_time_ms; st 423 drivers/iio/accel/adxl372.c static int adxl372_set_inactivity_time_ms(struct adxl372_state *st, st 433 drivers/iio/accel/adxl372.c if (st->odr == ADXL372_ODR_6400HZ) st 442 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_TIME_INACT_H, reg_val_h); st 446 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_TIME_INACT_L, reg_val_l); st 450 drivers/iio/accel/adxl372.c st->inact_time_ms = inact_time_ms; st 455 drivers/iio/accel/adxl372.c static int adxl372_set_interrupts(struct adxl372_state *st, st 461 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_INT1_MAP, int1_bitmask); st 465 drivers/iio/accel/adxl372.c return regmap_write(st->regmap, ADXL372_INT2_MAP, int2_bitmask); st 468 drivers/iio/accel/adxl372.c static int adxl372_configure_fifo(struct adxl372_state *st) st 474 drivers/iio/accel/adxl372.c ret = adxl372_set_op_mode(st, ADXL372_STANDBY); st 482 drivers/iio/accel/adxl372.c fifo_samples = (st->watermark * st->fifo_set_size); st 483 drivers/iio/accel/adxl372.c fifo_ctl = ADXL372_FIFO_CTL_FORMAT_MODE(st->fifo_format) | st 484 drivers/iio/accel/adxl372.c ADXL372_FIFO_CTL_MODE_MODE(st->fifo_mode) | st 487 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, st 492 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_FIFO_CTL, fifo_ctl); st 496 drivers/iio/accel/adxl372.c return adxl372_set_op_mode(st, ADXL372_FULL_BW_MEASUREMENT); st 499 drivers/iio/accel/adxl372.c static int adxl372_get_status(struct adxl372_state *st, st 508 drivers/iio/accel/adxl372.c ret = regmap_bulk_read(st->regmap, ADXL372_STATUS_1, st 530 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 535 drivers/iio/accel/adxl372.c ret = adxl372_get_status(st, &status1, &status2, &fifo_entries); st 539 drivers/iio/accel/adxl372.c if (st->fifo_mode != ADXL372_FIFO_BYPASSED && st 547 drivers/iio/accel/adxl372.c fifo_entries -= st->fifo_set_size; st 550 drivers/iio/accel/adxl372.c ret = regmap_noinc_read(st->regmap, ADXL372_FIFO_DATA, st 551 drivers/iio/accel/adxl372.c st->fifo_buf, st 557 drivers/iio/accel/adxl372.c for (i = 0; i < fifo_entries; i += st->fifo_set_size) st 558 drivers/iio/accel/adxl372.c iio_push_to_buffers(indio_dev, &st->fifo_buf[i]); st 565 drivers/iio/accel/adxl372.c static int adxl372_setup(struct adxl372_state *st) st 570 drivers/iio/accel/adxl372.c ret = regmap_read(st->regmap, ADXL372_DEVID, ®val); st 575 drivers/iio/accel/adxl372.c dev_err(st->dev, "Invalid chip id %x\n", regval); st 583 drivers/iio/accel/adxl372.c ret = regmap_write(st->regmap, ADXL372_RESET, ADXL372_RESET_CODE); st 587 drivers/iio/accel/adxl372.c ret = adxl372_set_op_mode(st, ADXL372_STANDBY); st 592 drivers/iio/accel/adxl372.c ret = adxl372_set_activity_threshold(st, ADXL372_ACTIVITY, st 598 drivers/iio/accel/adxl372.c ret = adxl372_set_activity_threshold(st, ADXL372_INACTIVITY, st 604 drivers/iio/accel/adxl372.c ret = adxl372_set_act_proc_mode(st, ADXL372_LOOPED); st 608 drivers/iio/accel/adxl372.c ret = adxl372_set_odr(st, ADXL372_ODR_6400HZ); st 612 drivers/iio/accel/adxl372.c ret = adxl372_set_bandwidth(st, ADXL372_BW_3200HZ); st 617 drivers/iio/accel/adxl372.c ret = adxl372_set_activity_time_ms(st, 1); st 622 drivers/iio/accel/adxl372.c ret = adxl372_set_inactivity_time_ms(st, 10000); st 627 drivers/iio/accel/adxl372.c return adxl372_set_op_mode(st, ADXL372_FULL_BW_MEASUREMENT); st 635 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 638 drivers/iio/accel/adxl372.c return regmap_read(st->regmap, reg, readval); st 640 drivers/iio/accel/adxl372.c return regmap_write(st->regmap, reg, writeval); st 647 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 656 drivers/iio/accel/adxl372.c ret = adxl372_read_axis(st, chan->address); st 669 drivers/iio/accel/adxl372.c *val = adxl372_samp_freq_tbl[st->odr]; st 672 drivers/iio/accel/adxl372.c *val = adxl372_bw_freq_tbl[st->bw]; st 683 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 691 drivers/iio/accel/adxl372.c ret = adxl372_set_odr(st, odr_index); st 698 drivers/iio/accel/adxl372.c ret = adxl372_set_activity_time_ms(st, st->act_time_ms); st 705 drivers/iio/accel/adxl372.c ret = adxl372_set_inactivity_time_ms(st, st->inact_time_ms); st 712 drivers/iio/accel/adxl372.c if (st->bw > odr_index) st 713 drivers/iio/accel/adxl372.c ret = adxl372_set_bandwidth(st, odr_index); st 720 drivers/iio/accel/adxl372.c return adxl372_set_bandwidth(st, bw_index); st 731 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 735 drivers/iio/accel/adxl372.c for (i = 0; i <= st->odr; i++) st 749 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 751 drivers/iio/accel/adxl372.c return sprintf(buf, "%d\n", st->fifo_mode); st 759 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 761 drivers/iio/accel/adxl372.c return sprintf(buf, "%d\n", st->watermark); st 782 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 787 drivers/iio/accel/adxl372.c st->watermark = val; st 794 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 802 drivers/iio/accel/adxl372.c ret = adxl372_set_interrupts(st, ADXL372_INT1_MAP_FIFO_FULL_MSK, 0); st 818 drivers/iio/accel/adxl372.c st->fifo_format = adxl372_axis_lookup_table[i].fifo_format; st 819 drivers/iio/accel/adxl372.c st->fifo_set_size = bitmap_weight(indio_dev->active_scan_mask, st 827 drivers/iio/accel/adxl372.c if ((st->watermark * st->fifo_set_size) > ADXL372_FIFO_SIZE) st 828 drivers/iio/accel/adxl372.c st->watermark = (ADXL372_FIFO_SIZE / st->fifo_set_size); st 830 drivers/iio/accel/adxl372.c st->fifo_mode = ADXL372_FIFO_STREAMED; st 832 drivers/iio/accel/adxl372.c ret = adxl372_configure_fifo(st); st 834 drivers/iio/accel/adxl372.c st->fifo_mode = ADXL372_FIFO_BYPASSED; st 835 drivers/iio/accel/adxl372.c adxl372_set_interrupts(st, 0, 0); st 848 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 850 drivers/iio/accel/adxl372.c adxl372_set_interrupts(st, 0, 0); st 851 drivers/iio/accel/adxl372.c st->fifo_mode = ADXL372_FIFO_BYPASSED; st 852 drivers/iio/accel/adxl372.c adxl372_configure_fifo(st); st 866 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 872 drivers/iio/accel/adxl372.c return adxl372_set_interrupts(st, mask, 0); st 878 drivers/iio/accel/adxl372.c struct adxl372_state *st = iio_priv(indio_dev); st 880 drivers/iio/accel/adxl372.c if (st->dready_trig != trig) st 924 drivers/iio/accel/adxl372.c struct adxl372_state *st; st 927 drivers/iio/accel/adxl372.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 931 drivers/iio/accel/adxl372.c st = iio_priv(indio_dev); st 934 drivers/iio/accel/adxl372.c st->dev = dev; st 935 drivers/iio/accel/adxl372.c st->regmap = regmap; st 936 drivers/iio/accel/adxl372.c st->irq = irq; st 946 drivers/iio/accel/adxl372.c ret = adxl372_setup(st); st 961 drivers/iio/accel/adxl372.c if (st->irq) { st 962 drivers/iio/accel/adxl372.c st->dready_trig = devm_iio_trigger_alloc(dev, st 966 drivers/iio/accel/adxl372.c if (st->dready_trig == NULL) st 969 drivers/iio/accel/adxl372.c st->dready_trig->ops = &adxl372_trigger_ops; st 970 drivers/iio/accel/adxl372.c st->dready_trig->dev.parent = dev; st 971 drivers/iio/accel/adxl372.c iio_trigger_set_drvdata(st->dready_trig, indio_dev); st 972 drivers/iio/accel/adxl372.c ret = devm_iio_trigger_register(dev, st->dready_trig); st 976 drivers/iio/accel/adxl372.c indio_dev->trig = iio_trigger_get(st->dready_trig); st 978 drivers/iio/accel/adxl372.c ret = devm_request_threaded_irq(dev, st->irq, st 982 drivers/iio/accel/adxl372.c indio_dev->name, st->dready_trig); st 40 drivers/iio/accel/cros_ec_accel_legacy.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 49 drivers/iio/accel/cros_ec_accel_legacy.c sensor_num = st->param.info.sensor_num; st 50 drivers/iio/accel/cros_ec_accel_legacy.c st->param.cmd = MOTIONSENSE_CMD_DUMP; st 51 drivers/iio/accel/cros_ec_accel_legacy.c st->param.dump.max_sensor_count = CROS_EC_SENSOR_LEGACY_NUM; st 52 drivers/iio/accel/cros_ec_accel_legacy.c ret = cros_ec_motion_send_host_cmd(st, st 53 drivers/iio/accel/cros_ec_accel_legacy.c sizeof(st->resp->dump) + CROS_EC_SENSOR_LEGACY_NUM * st 55 drivers/iio/accel/cros_ec_accel_legacy.c st->param.info.sensor_num = sensor_num; st 62 drivers/iio/accel/cros_ec_accel_legacy.c *data = st->resp->dump.sensor[sensor_num].data[i] * st 63 drivers/iio/accel/cros_ec_accel_legacy.c st->sign[i]; st 74 drivers/iio/accel/cros_ec_accel_legacy.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 79 drivers/iio/accel/cros_ec_accel_legacy.c mutex_lock(&st->cmd_lock); st 83 drivers/iio/accel/cros_ec_accel_legacy.c ret = st->read_ec_sensors_data(indio_dev, 1 << idx, &data); st 90 drivers/iio/accel/cros_ec_accel_legacy.c WARN_ON(st->type != MOTIONSENSE_TYPE_ACCEL); st 101 drivers/iio/accel/cros_ec_accel_legacy.c ret = cros_ec_sensors_core_read(st, chan, val, val2, st 105 drivers/iio/accel/cros_ec_accel_legacy.c mutex_unlock(&st->cmd_lock); st 292 drivers/iio/accel/hid-sensor-accel-3d.c struct accel_3d_state *st) st 302 drivers/iio/accel/hid-sensor-accel-3d.c &st->accel[CHANNEL_SCAN_INDEX_X + i]); st 307 drivers/iio/accel/hid-sensor-accel-3d.c st->accel[CHANNEL_SCAN_INDEX_X + i].size); st 310 drivers/iio/accel/hid-sensor-accel-3d.c st->accel[0].index, st 311 drivers/iio/accel/hid-sensor-accel-3d.c st->accel[0].report_id, st 312 drivers/iio/accel/hid-sensor-accel-3d.c st->accel[1].index, st->accel[1].report_id, st 313 drivers/iio/accel/hid-sensor-accel-3d.c st->accel[2].index, st->accel[2].report_id); st 315 drivers/iio/accel/hid-sensor-accel-3d.c st->scale_precision = hid_sensor_format_scale( st 317 drivers/iio/accel/hid-sensor-accel-3d.c &st->accel[CHANNEL_SCAN_INDEX_X], st 318 drivers/iio/accel/hid-sensor-accel-3d.c &st->scale_pre_decml, &st->scale_post_decml); st 321 drivers/iio/accel/hid-sensor-accel-3d.c if (st->common_attributes.sensitivity.index < 0) { st 326 drivers/iio/accel/hid-sensor-accel-3d.c &st->common_attributes.sensitivity); st 328 drivers/iio/accel/hid-sensor-accel-3d.c st->common_attributes.sensitivity.index, st 329 drivers/iio/accel/hid-sensor-accel-3d.c st->common_attributes.sensitivity.report_id); st 99 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 110 drivers/iio/accel/kxsd9.c ret = regmap_update_bits(st->map, st 118 drivers/iio/accel/kxsd9.c st->scale = i; st 142 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 144 drivers/iio/accel/kxsd9.c pm_runtime_get_sync(st->dev); st 153 drivers/iio/accel/kxsd9.c pm_runtime_mark_last_busy(st->dev); st 154 drivers/iio/accel/kxsd9.c pm_runtime_put_autosuspend(st->dev); st 164 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 169 drivers/iio/accel/kxsd9.c pm_runtime_get_sync(st->dev); st 173 drivers/iio/accel/kxsd9.c ret = regmap_bulk_read(st->map, chan->address, &raw_val, st 189 drivers/iio/accel/kxsd9.c ret = regmap_read(st->map, st 201 drivers/iio/accel/kxsd9.c pm_runtime_mark_last_busy(st->dev); st 202 drivers/iio/accel/kxsd9.c pm_runtime_put_autosuspend(st->dev); st 211 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 216 drivers/iio/accel/kxsd9.c ret = regmap_bulk_read(st->map, st 221 drivers/iio/accel/kxsd9.c dev_err(st->dev, st 236 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 238 drivers/iio/accel/kxsd9.c pm_runtime_get_sync(st->dev); st 245 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 247 drivers/iio/accel/kxsd9.c pm_runtime_mark_last_busy(st->dev); st 248 drivers/iio/accel/kxsd9.c pm_runtime_put_autosuspend(st->dev); st 264 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 266 drivers/iio/accel/kxsd9.c return &st->orientation; st 319 drivers/iio/accel/kxsd9.c static int kxsd9_power_up(struct kxsd9_state *st) st 324 drivers/iio/accel/kxsd9.c ret = regulator_bulk_enable(ARRAY_SIZE(st->regs), st->regs); st 326 drivers/iio/accel/kxsd9.c dev_err(st->dev, "Cannot enable regulators\n"); st 331 drivers/iio/accel/kxsd9.c ret = regmap_write(st->map, st 341 drivers/iio/accel/kxsd9.c ret = regmap_write(st->map, st 346 drivers/iio/accel/kxsd9.c st->scale); st 359 drivers/iio/accel/kxsd9.c static int kxsd9_power_down(struct kxsd9_state *st) st 369 drivers/iio/accel/kxsd9.c ret = regmap_update_bits(st->map, st 377 drivers/iio/accel/kxsd9.c ret = regulator_bulk_disable(ARRAY_SIZE(st->regs), st->regs); st 379 drivers/iio/accel/kxsd9.c dev_err(st->dev, "Cannot disable regulators\n"); st 400 drivers/iio/accel/kxsd9.c struct kxsd9_state *st; st 403 drivers/iio/accel/kxsd9.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 407 drivers/iio/accel/kxsd9.c st = iio_priv(indio_dev); st 408 drivers/iio/accel/kxsd9.c st->dev = dev; st 409 drivers/iio/accel/kxsd9.c st->map = map; st 420 drivers/iio/accel/kxsd9.c ret = iio_read_mount_matrix(dev, "mount-matrix", &st->orientation); st 425 drivers/iio/accel/kxsd9.c st->regs[0].supply = kxsd9_reg_vdd; st 426 drivers/iio/accel/kxsd9.c st->regs[1].supply = kxsd9_reg_iovdd; st 428 drivers/iio/accel/kxsd9.c ARRAY_SIZE(st->regs), st 429 drivers/iio/accel/kxsd9.c st->regs); st 435 drivers/iio/accel/kxsd9.c st->scale = KXSD9_CTRL_C_FS_2G; st 437 drivers/iio/accel/kxsd9.c kxsd9_power_up(st); st 472 drivers/iio/accel/kxsd9.c kxsd9_power_down(st); st 481 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 488 drivers/iio/accel/kxsd9.c kxsd9_power_down(st); st 498 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 500 drivers/iio/accel/kxsd9.c return kxsd9_power_down(st); st 506 drivers/iio/accel/kxsd9.c struct kxsd9_state *st = iio_priv(indio_dev); st 508 drivers/iio/accel/kxsd9.c return kxsd9_power_up(st); st 277 drivers/iio/accel/sca3000.c static int sca3000_write_reg(struct sca3000_state *st, u8 address, u8 val) st 279 drivers/iio/accel/sca3000.c st->tx[0] = SCA3000_WRITE_REG(address); st 280 drivers/iio/accel/sca3000.c st->tx[1] = val; st 281 drivers/iio/accel/sca3000.c return spi_write(st->us, st->tx, 2); st 284 drivers/iio/accel/sca3000.c static int sca3000_read_data_short(struct sca3000_state *st, st 291 drivers/iio/accel/sca3000.c .tx_buf = st->tx, st 294 drivers/iio/accel/sca3000.c .rx_buf = st->rx, st 297 drivers/iio/accel/sca3000.c st->tx[0] = SCA3000_READ_REG(reg_address_high); st 299 drivers/iio/accel/sca3000.c return spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); st 308 drivers/iio/accel/sca3000.c static int sca3000_reg_lock_on(struct sca3000_state *st) st 312 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_STATUS_ADDR, 1); st 316 drivers/iio/accel/sca3000.c return !(st->rx[0] & SCA3000_LOCKED); st 327 drivers/iio/accel/sca3000.c static int __sca3000_unlock_reg_lock(struct sca3000_state *st) st 333 drivers/iio/accel/sca3000.c .tx_buf = st->tx, st 337 drivers/iio/accel/sca3000.c .tx_buf = st->tx + 2, st 340 drivers/iio/accel/sca3000.c .tx_buf = st->tx + 4, st 343 drivers/iio/accel/sca3000.c st->tx[0] = SCA3000_WRITE_REG(SCA3000_REG_UNLOCK_ADDR); st 344 drivers/iio/accel/sca3000.c st->tx[1] = 0x00; st 345 drivers/iio/accel/sca3000.c st->tx[2] = SCA3000_WRITE_REG(SCA3000_REG_UNLOCK_ADDR); st 346 drivers/iio/accel/sca3000.c st->tx[3] = 0x50; st 347 drivers/iio/accel/sca3000.c st->tx[4] = SCA3000_WRITE_REG(SCA3000_REG_UNLOCK_ADDR); st 348 drivers/iio/accel/sca3000.c st->tx[5] = 0xA0; st 350 drivers/iio/accel/sca3000.c return spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); st 364 drivers/iio/accel/sca3000.c static int sca3000_write_ctrl_reg(struct sca3000_state *st, st 370 drivers/iio/accel/sca3000.c ret = sca3000_reg_lock_on(st); st 374 drivers/iio/accel/sca3000.c ret = __sca3000_unlock_reg_lock(st); st 380 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, SCA3000_REG_CTRL_SEL_ADDR, sel); st 385 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, SCA3000_REG_CTRL_DATA_ADDR, val); st 398 drivers/iio/accel/sca3000.c static int sca3000_read_ctrl_reg(struct sca3000_state *st, st 403 drivers/iio/accel/sca3000.c ret = sca3000_reg_lock_on(st); st 407 drivers/iio/accel/sca3000.c ret = __sca3000_unlock_reg_lock(st); st 412 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, SCA3000_REG_CTRL_SEL_ADDR, ctrl_reg); st 415 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_CTRL_DATA_ADDR, 1); st 418 drivers/iio/accel/sca3000.c return st->rx[0]; st 432 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 434 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 435 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_REVID_ADDR, 1); st 440 drivers/iio/accel/sca3000.c st->rx[0] & SCA3000_REG_REVID_MAJOR_MASK, st 441 drivers/iio/accel/sca3000.c st->rx[0] & SCA3000_REG_REVID_MINOR_MASK); st 443 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 454 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 457 drivers/iio/accel/sca3000.c len = sprintf(buf, "%d", st->info->measurement_mode_3db_freq); st 458 drivers/iio/accel/sca3000.c if (st->info->option_mode_1) st 460 drivers/iio/accel/sca3000.c st->info->option_mode_1_3db_freq); st 461 drivers/iio/accel/sca3000.c if (st->info->option_mode_2) st 463 drivers/iio/accel/sca3000.c st->info->option_mode_2_3db_freq); st 565 drivers/iio/accel/sca3000.c static inline int __sca3000_get_base_freq(struct sca3000_state *st, st 571 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 574 drivers/iio/accel/sca3000.c switch (SCA3000_REG_MODE_MODE_MASK & st->rx[0]) { st 598 drivers/iio/accel/sca3000.c static int sca3000_read_raw_samp_freq(struct sca3000_state *st, int *val) st 602 drivers/iio/accel/sca3000.c ret = __sca3000_get_base_freq(st, st->info, val); st 606 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL); st 632 drivers/iio/accel/sca3000.c static int sca3000_write_raw_samp_freq(struct sca3000_state *st, int val) st 636 drivers/iio/accel/sca3000.c ret = __sca3000_get_base_freq(st, st->info, &base_freq); st 640 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL); st 653 drivers/iio/accel/sca3000.c return sca3000_write_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL, st 657 drivers/iio/accel/sca3000.c static int sca3000_read_3db_freq(struct sca3000_state *st, int *val) st 661 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 666 drivers/iio/accel/sca3000.c st->rx[0] &= SCA3000_REG_MODE_MODE_MASK; st 667 drivers/iio/accel/sca3000.c switch (st->rx[0]) { st 669 drivers/iio/accel/sca3000.c *val = st->info->measurement_mode_3db_freq; st 674 drivers/iio/accel/sca3000.c *val = st->info->option_mode_1_3db_freq; st 677 drivers/iio/accel/sca3000.c *val = st->info->option_mode_2_3db_freq; st 684 drivers/iio/accel/sca3000.c static int sca3000_write_3db_freq(struct sca3000_state *st, int val) st 689 drivers/iio/accel/sca3000.c if (val == st->info->measurement_mode_3db_freq) st 691 drivers/iio/accel/sca3000.c else if (st->info->option_mode_1 && st 692 drivers/iio/accel/sca3000.c (val == st->info->option_mode_1_3db_freq)) st 694 drivers/iio/accel/sca3000.c else if (st->info->option_mode_2 && st 695 drivers/iio/accel/sca3000.c (val == st->info->option_mode_2_3db_freq)) st 699 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 703 drivers/iio/accel/sca3000.c st->rx[0] &= ~SCA3000_REG_MODE_MODE_MASK; st 704 drivers/iio/accel/sca3000.c st->rx[0] |= (mode & SCA3000_REG_MODE_MODE_MASK); st 706 drivers/iio/accel/sca3000.c return sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st->rx[0]); st 715 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 721 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 723 drivers/iio/accel/sca3000.c if (st->mo_det_use_count) { st 724 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 728 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, address, 2); st 730 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 733 drivers/iio/accel/sca3000.c *val = (be16_to_cpup((__be16 *)st->rx) >> 3) & 0x1FFF; st 738 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, st 742 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 745 drivers/iio/accel/sca3000.c *val = ((st->rx[0] & 0x3F) << 3) | st 746 drivers/iio/accel/sca3000.c ((st->rx[1] & 0xE0) >> 5); st 748 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 753 drivers/iio/accel/sca3000.c *val2 = st->info->scale; st 762 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 763 drivers/iio/accel/sca3000.c ret = sca3000_read_raw_samp_freq(st, val); st 764 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 767 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 768 drivers/iio/accel/sca3000.c ret = sca3000_read_3db_freq(st, val); st 769 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 780 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 787 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 788 drivers/iio/accel/sca3000.c ret = sca3000_write_raw_samp_freq(st, val); st 789 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 794 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 795 drivers/iio/accel/sca3000.c ret = sca3000_write_3db_freq(st, val); st 796 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 821 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 824 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 825 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 826 drivers/iio/accel/sca3000.c val = st->rx[0]; st 827 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 834 drivers/iio/accel/sca3000.c st->info->measurement_mode_freq, st 835 drivers/iio/accel/sca3000.c st->info->measurement_mode_freq / 2, st 836 drivers/iio/accel/sca3000.c st->info->measurement_mode_freq / 4); st 840 drivers/iio/accel/sca3000.c st->info->option_mode_1_freq, st 841 drivers/iio/accel/sca3000.c st->info->option_mode_1_freq / 2, st 842 drivers/iio/accel/sca3000.c st->info->option_mode_1_freq / 4); st 846 drivers/iio/accel/sca3000.c st->info->option_mode_2_freq, st 847 drivers/iio/accel/sca3000.c st->info->option_mode_2_freq / 2, st 848 drivers/iio/accel/sca3000.c st->info->option_mode_2_freq / 4); st 872 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 878 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 879 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, st 881 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 887 drivers/iio/accel/sca3000.c ARRAY_SIZE(st->info->mot_det_mult_y)) st 888 drivers/iio/accel/sca3000.c *val += st->info->mot_det_mult_y[i]; st 891 drivers/iio/accel/sca3000.c ARRAY_SIZE(st->info->mot_det_mult_xz)) st 892 drivers/iio/accel/sca3000.c *val += st->info->mot_det_mult_xz[i]; st 924 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 930 drivers/iio/accel/sca3000.c i = ARRAY_SIZE(st->info->mot_det_mult_y); st 932 drivers/iio/accel/sca3000.c if (val >= st->info->mot_det_mult_y[--i]) { st 934 drivers/iio/accel/sca3000.c val -= st->info->mot_det_mult_y[i]; st 937 drivers/iio/accel/sca3000.c i = ARRAY_SIZE(st->info->mot_det_mult_xz); st 939 drivers/iio/accel/sca3000.c if (val >= st->info->mot_det_mult_xz[--i]) { st 941 drivers/iio/accel/sca3000.c val -= st->info->mot_det_mult_xz[i]; st 945 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 946 drivers/iio/accel/sca3000.c ret = sca3000_write_ctrl_reg(st, st 949 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 964 drivers/iio/accel/sca3000.c static int sca3000_read_data(struct sca3000_state *st, st 973 drivers/iio/accel/sca3000.c .tx_buf = st->tx, st 980 drivers/iio/accel/sca3000.c st->tx[0] = SCA3000_READ_REG(reg_address_high); st 981 drivers/iio/accel/sca3000.c ret = spi_sync_transfer(st->us, xfer, ARRAY_SIZE(xfer)); st 983 drivers/iio/accel/sca3000.c dev_err(&st->us->dev, "problem reading register\n"); st 997 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1000 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1003 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_BUF_COUNT_ADDR, st 1007 drivers/iio/accel/sca3000.c num_available = st->rx[0]; st 1012 drivers/iio/accel/sca3000.c ret = sca3000_read_data(st, SCA3000_REG_RING_OUT_ADDR, st->rx, st 1024 drivers/iio/accel/sca3000.c iio_push_to_buffers(indio_dev, st->rx + i * 3 * 2); st 1028 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1046 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1054 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1055 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_STATUS_ADDR, 1); st 1056 drivers/iio/accel/sca3000.c val = st->rx[0]; st 1057 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1111 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1114 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1116 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 1122 drivers/iio/accel/sca3000.c ret = !!(st->rx[0] & SCA3000_REG_MODE_FREE_FALL_DETECT); st 1131 drivers/iio/accel/sca3000.c if ((st->rx[0] & SCA3000_REG_MODE_MODE_MASK) st 1135 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, st 1148 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1155 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1159 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 1164 drivers/iio/accel/sca3000.c if (state && !(st->rx[0] & SCA3000_REG_MODE_FREE_FALL_DETECT)) st 1165 drivers/iio/accel/sca3000.c return sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st 1166 drivers/iio/accel/sca3000.c st->rx[0] | SCA3000_REG_MODE_FREE_FALL_DETECT); st 1168 drivers/iio/accel/sca3000.c else if (!state && (st->rx[0] & SCA3000_REG_MODE_FREE_FALL_DETECT)) st 1169 drivers/iio/accel/sca3000.c return sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st 1170 drivers/iio/accel/sca3000.c st->rx[0] & ~SCA3000_REG_MODE_FREE_FALL_DETECT); st 1178 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1185 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_MD_CTRL); st 1191 drivers/iio/accel/sca3000.c ret = sca3000_write_ctrl_reg(st, st 1197 drivers/iio/accel/sca3000.c st->mo_det_use_count++; st 1199 drivers/iio/accel/sca3000.c ret = sca3000_write_ctrl_reg(st, st 1205 drivers/iio/accel/sca3000.c st->mo_det_use_count--; st 1209 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 1213 drivers/iio/accel/sca3000.c if ((st->mo_det_use_count) && st 1214 drivers/iio/accel/sca3000.c ((st->rx[0] & SCA3000_REG_MODE_MODE_MASK) st 1216 drivers/iio/accel/sca3000.c return sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st 1217 drivers/iio/accel/sca3000.c (st->rx[0] & ~SCA3000_REG_MODE_MODE_MASK) st 1220 drivers/iio/accel/sca3000.c else if (!(st->mo_det_use_count) && st 1221 drivers/iio/accel/sca3000.c ((st->rx[0] & SCA3000_REG_MODE_MODE_MASK) st 1223 drivers/iio/accel/sca3000.c return sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st 1224 drivers/iio/accel/sca3000.c st->rx[0] & SCA3000_REG_MODE_MODE_MASK); st 1250 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1253 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1270 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1292 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1295 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1296 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 1301 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, st 1303 drivers/iio/accel/sca3000.c (st->rx[0] | SCA3000_REG_MODE_RING_BUF_ENABLE)); st 1305 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, st 1307 drivers/iio/accel/sca3000.c (st->rx[0] & ~SCA3000_REG_MODE_RING_BUF_ENABLE)); st 1309 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1326 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1328 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1331 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1); st 1334 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, st 1336 drivers/iio/accel/sca3000.c st->rx[0] | SCA3000_REG_INT_MASK_RING_HALF); st 1340 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1345 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1353 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1360 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1362 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1); st 1365 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, st 1367 drivers/iio/accel/sca3000.c st->rx[0] & ~SCA3000_REG_INT_MASK_RING_HALF); st 1369 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1386 drivers/iio/accel/sca3000.c static int sca3000_clean_setup(struct sca3000_state *st) st 1390 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1392 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_STATUS_ADDR, 1); st 1397 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_MD_CTRL); st 1400 drivers/iio/accel/sca3000.c ret = sca3000_write_ctrl_reg(st, SCA3000_REG_CTRL_SEL_MD_CTRL, st 1406 drivers/iio/accel/sca3000.c ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL); st 1409 drivers/iio/accel/sca3000.c ret = sca3000_write_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL, st 1418 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1); st 1421 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, st 1432 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_MODE_ADDR, 1); st 1435 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, SCA3000_REG_MODE_ADDR, st 1436 drivers/iio/accel/sca3000.c (st->rx[0] & SCA3000_MODE_PROT_MASK)); st 1439 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1456 drivers/iio/accel/sca3000.c struct sca3000_state *st; st 1459 drivers/iio/accel/sca3000.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 1463 drivers/iio/accel/sca3000.c st = iio_priv(indio_dev); st 1465 drivers/iio/accel/sca3000.c st->us = spi; st 1466 drivers/iio/accel/sca3000.c mutex_init(&st->lock); st 1467 drivers/iio/accel/sca3000.c st->info = &sca3000_spi_chip_info_tbl[spi_get_device_id(spi) st 1473 drivers/iio/accel/sca3000.c if (st->info->temp_output) { st 1498 drivers/iio/accel/sca3000.c ret = sca3000_clean_setup(st); st 1515 drivers/iio/accel/sca3000.c static int sca3000_stop_all_interrupts(struct sca3000_state *st) st 1519 drivers/iio/accel/sca3000.c mutex_lock(&st->lock); st 1520 drivers/iio/accel/sca3000.c ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1); st 1523 drivers/iio/accel/sca3000.c ret = sca3000_write_reg(st, SCA3000_REG_INT_MASK_ADDR, st 1524 drivers/iio/accel/sca3000.c (st->rx[0] & st 1529 drivers/iio/accel/sca3000.c mutex_unlock(&st->lock); st 1536 drivers/iio/accel/sca3000.c struct sca3000_state *st = iio_priv(indio_dev); st 1541 drivers/iio/accel/sca3000.c sca3000_stop_all_interrupts(st); st 179 drivers/iio/adc/ad7124.c static int ad7124_spi_write_mask(struct ad7124_state *st, st 188 drivers/iio/adc/ad7124.c ret = ad_sd_read_reg(&st->sd, addr, bytes, &readval); st 195 drivers/iio/adc/ad7124.c return ad_sd_write_reg(&st->sd, addr, bytes, readval); st 201 drivers/iio/adc/ad7124.c struct ad7124_state *st = container_of(sd, struct ad7124_state, sd); st 203 drivers/iio/adc/ad7124.c st->adc_control &= ~AD7124_ADC_CTRL_MODE_MSK; st 204 drivers/iio/adc/ad7124.c st->adc_control |= AD7124_ADC_CTRL_MODE(mode); st 206 drivers/iio/adc/ad7124.c return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control); st 211 drivers/iio/adc/ad7124.c struct ad7124_state *st = container_of(sd, struct ad7124_state, sd); st 214 drivers/iio/adc/ad7124.c val = st->channel_config[channel].ain | AD7124_CHANNEL_EN(1) | st 217 drivers/iio/adc/ad7124.c return ad_sd_write_reg(&st->sd, AD7124_CHANNEL(channel), 2, val); st 229 drivers/iio/adc/ad7124.c static int ad7124_set_channel_odr(struct ad7124_state *st, st 236 drivers/iio/adc/ad7124.c fclk = clk_get_rate(st->mclk); st 250 drivers/iio/adc/ad7124.c ret = ad7124_spi_write_mask(st, AD7124_FILTER(channel), st 256 drivers/iio/adc/ad7124.c st->channel_config[channel].odr = st 262 drivers/iio/adc/ad7124.c static int ad7124_set_channel_gain(struct ad7124_state *st, st 271 drivers/iio/adc/ad7124.c ret = ad7124_spi_write_mask(st, AD7124_CONFIG(channel), st 277 drivers/iio/adc/ad7124.c st->channel_config[channel].pga_bits = res; st 286 drivers/iio/adc/ad7124.c struct ad7124_state *st = iio_priv(indio_dev); st 296 drivers/iio/adc/ad7124.c ret = ad_sd_write_reg(&st->sd, st 298 drivers/iio/adc/ad7124.c st->channel_config[chan->address].ain | st 305 drivers/iio/adc/ad7124.c idx = st->channel_config[chan->address].pga_bits; st 306 drivers/iio/adc/ad7124.c *val = st->channel_config[chan->address].vref_mv; st 307 drivers/iio/adc/ad7124.c if (st->channel_config[chan->address].bipolar) st 314 drivers/iio/adc/ad7124.c if (st->channel_config[chan->address].bipolar) st 321 drivers/iio/adc/ad7124.c *val = st->channel_config[chan->address].odr; st 333 drivers/iio/adc/ad7124.c struct ad7124_state *st = iio_priv(indio_dev); st 341 drivers/iio/adc/ad7124.c return ad7124_set_channel_odr(st, chan->address, val); st 346 drivers/iio/adc/ad7124.c if (st->channel_config[chan->address].bipolar) st 351 drivers/iio/adc/ad7124.c vref = st->channel_config[chan->address].vref_mv * 1000000LL; st 355 drivers/iio/adc/ad7124.c return ad7124_set_channel_gain(st, chan->address, gain); st 380 drivers/iio/adc/ad7124.c static int ad7124_soft_reset(struct ad7124_state *st) st 385 drivers/iio/adc/ad7124.c ret = ad_sd_reset(&st->sd, 64); st 391 drivers/iio/adc/ad7124.c ret = ad_sd_read_reg(&st->sd, AD7124_STATUS, 1, &readval); st 402 drivers/iio/adc/ad7124.c dev_err(&st->sd.spi->dev, "Soft reset failed\n"); st 407 drivers/iio/adc/ad7124.c static int ad7124_init_channel_vref(struct ad7124_state *st, st 410 drivers/iio/adc/ad7124.c unsigned int refsel = st->channel_config[channel_number].refsel; st 416 drivers/iio/adc/ad7124.c if (IS_ERR(st->vref[refsel])) { st 417 drivers/iio/adc/ad7124.c dev_err(&st->sd.spi->dev, st 420 drivers/iio/adc/ad7124.c return PTR_ERR(st->vref[refsel]); st 422 drivers/iio/adc/ad7124.c st->channel_config[channel_number].vref_mv = st 423 drivers/iio/adc/ad7124.c regulator_get_voltage(st->vref[refsel]); st 425 drivers/iio/adc/ad7124.c st->channel_config[channel_number].vref_mv /= 1000; st 428 drivers/iio/adc/ad7124.c st->channel_config[channel_number].vref_mv = 2500; st 429 drivers/iio/adc/ad7124.c st->adc_control &= ~AD7124_ADC_CTRL_REF_EN_MSK; st 430 drivers/iio/adc/ad7124.c st->adc_control |= AD7124_ADC_CTRL_REF_EN(1); st 431 drivers/iio/adc/ad7124.c return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, st 432 drivers/iio/adc/ad7124.c 2, st->adc_control); st 434 drivers/iio/adc/ad7124.c dev_err(&st->sd.spi->dev, "Invalid reference %d\n", refsel); st 444 drivers/iio/adc/ad7124.c struct ad7124_state *st = iio_priv(indio_dev); st 451 drivers/iio/adc/ad7124.c st->num_channels = of_get_available_child_count(np); st 452 drivers/iio/adc/ad7124.c if (!st->num_channels) { st 457 drivers/iio/adc/ad7124.c chan = devm_kcalloc(indio_dev->dev.parent, st->num_channels, st 462 drivers/iio/adc/ad7124.c chan_config = devm_kcalloc(indio_dev->dev.parent, st->num_channels, st 468 drivers/iio/adc/ad7124.c indio_dev->num_channels = st->num_channels; st 469 drivers/iio/adc/ad7124.c st->channel_config = chan_config; st 481 drivers/iio/adc/ad7124.c st->channel_config[channel].ain = AD7124_CHANNEL_AINP(ain[0]) | st 483 drivers/iio/adc/ad7124.c st->channel_config[channel].bipolar = st 488 drivers/iio/adc/ad7124.c st->channel_config[channel].refsel = AD7124_INT_REF; st 490 drivers/iio/adc/ad7124.c st->channel_config[channel].refsel = tmp; st 492 drivers/iio/adc/ad7124.c st->channel_config[channel].buf_positive = st 494 drivers/iio/adc/ad7124.c st->channel_config[channel].buf_negative = st 511 drivers/iio/adc/ad7124.c static int ad7124_setup(struct ad7124_state *st) st 516 drivers/iio/adc/ad7124.c fclk = clk_get_rate(st->mclk); st 525 drivers/iio/adc/ad7124.c ret = clk_set_rate(st->mclk, fclk); st 531 drivers/iio/adc/ad7124.c st->adc_control &= ~AD7124_ADC_CTRL_PWR_MSK; st 532 drivers/iio/adc/ad7124.c st->adc_control |= AD7124_ADC_CTRL_PWR(power_mode); st 533 drivers/iio/adc/ad7124.c ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control); st 537 drivers/iio/adc/ad7124.c for (i = 0; i < st->num_channels; i++) { st 538 drivers/iio/adc/ad7124.c val = st->channel_config[i].ain | AD7124_CHANNEL_SETUP(i); st 539 drivers/iio/adc/ad7124.c ret = ad_sd_write_reg(&st->sd, AD7124_CHANNEL(i), 2, val); st 543 drivers/iio/adc/ad7124.c ret = ad7124_init_channel_vref(st, i); st 547 drivers/iio/adc/ad7124.c tmp = (st->channel_config[i].buf_positive << 1) + st 548 drivers/iio/adc/ad7124.c st->channel_config[i].buf_negative; st 550 drivers/iio/adc/ad7124.c val = AD7124_CONFIG_BIPOLAR(st->channel_config[i].bipolar) | st 551 drivers/iio/adc/ad7124.c AD7124_CONFIG_REF_SEL(st->channel_config[i].refsel) | st 553 drivers/iio/adc/ad7124.c ret = ad_sd_write_reg(&st->sd, AD7124_CONFIG(i), 2, val); st 561 drivers/iio/adc/ad7124.c ret = ad7124_set_channel_odr(st, i, 10); st 570 drivers/iio/adc/ad7124.c struct ad7124_state *st; st 574 drivers/iio/adc/ad7124.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 578 drivers/iio/adc/ad7124.c st = iio_priv(indio_dev); st 581 drivers/iio/adc/ad7124.c st->chip_info = &ad7124_chip_info_tbl[id->driver_data]; st 583 drivers/iio/adc/ad7124.c ad_sd_init(&st->sd, indio_dev, spi, &ad7124_sigma_delta_info); st 596 drivers/iio/adc/ad7124.c for (i = 0; i < ARRAY_SIZE(st->vref); i++) { st 600 drivers/iio/adc/ad7124.c st->vref[i] = devm_regulator_get_optional(&spi->dev, st 602 drivers/iio/adc/ad7124.c if (PTR_ERR(st->vref[i]) == -ENODEV) st 604 drivers/iio/adc/ad7124.c else if (IS_ERR(st->vref[i])) st 605 drivers/iio/adc/ad7124.c return PTR_ERR(st->vref[i]); st 607 drivers/iio/adc/ad7124.c ret = regulator_enable(st->vref[i]); st 612 drivers/iio/adc/ad7124.c st->mclk = devm_clk_get(&spi->dev, "mclk"); st 613 drivers/iio/adc/ad7124.c if (IS_ERR(st->mclk)) { st 614 drivers/iio/adc/ad7124.c ret = PTR_ERR(st->mclk); st 618 drivers/iio/adc/ad7124.c ret = clk_prepare_enable(st->mclk); st 622 drivers/iio/adc/ad7124.c ret = ad7124_soft_reset(st); st 626 drivers/iio/adc/ad7124.c ret = ad7124_setup(st); st 645 drivers/iio/adc/ad7124.c clk_disable_unprepare(st->mclk); st 647 drivers/iio/adc/ad7124.c for (i = ARRAY_SIZE(st->vref) - 1; i >= 0; i--) { st 648 drivers/iio/adc/ad7124.c if (!IS_ERR_OR_NULL(st->vref[i])) st 649 drivers/iio/adc/ad7124.c regulator_disable(st->vref[i]); st 658 drivers/iio/adc/ad7124.c struct ad7124_state *st = iio_priv(indio_dev); st 663 drivers/iio/adc/ad7124.c clk_disable_unprepare(st->mclk); st 665 drivers/iio/adc/ad7124.c for (i = ARRAY_SIZE(st->vref) - 1; i >= 0; i--) { st 666 drivers/iio/adc/ad7124.c if (!IS_ERR_OR_NULL(st->vref[i])) st 667 drivers/iio/adc/ad7124.c regulator_disable(st->vref[i]); st 51 drivers/iio/adc/ad7266.c static int ad7266_wakeup(struct ad7266_state *st) st 54 drivers/iio/adc/ad7266.c return spi_read(st->spi, &st->data.sample[0], 2); st 57 drivers/iio/adc/ad7266.c static int ad7266_powerdown(struct ad7266_state *st) st 60 drivers/iio/adc/ad7266.c return spi_read(st->spi, &st->data.sample[0], 1); st 65 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 66 drivers/iio/adc/ad7266.c return ad7266_wakeup(st); st 71 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 72 drivers/iio/adc/ad7266.c return ad7266_powerdown(st); st 86 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 89 drivers/iio/adc/ad7266.c ret = spi_read(st->spi, st->data.sample, 4); st 91 drivers/iio/adc/ad7266.c iio_push_to_buffers_with_timestamp(indio_dev, &st->data, st 100 drivers/iio/adc/ad7266.c static void ad7266_select_input(struct ad7266_state *st, unsigned int nr) st 104 drivers/iio/adc/ad7266.c if (st->fixed_addr) st 107 drivers/iio/adc/ad7266.c switch (st->mode) { st 120 drivers/iio/adc/ad7266.c gpio_set_value(st->gpios[i].gpio, (bool)(nr & BIT(i))); st 126 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 129 drivers/iio/adc/ad7266.c ad7266_select_input(st, nr); st 134 drivers/iio/adc/ad7266.c static int ad7266_read_single(struct ad7266_state *st, int *val, st 139 drivers/iio/adc/ad7266.c ad7266_select_input(st, address); st 141 drivers/iio/adc/ad7266.c ret = spi_sync(st->spi, &st->single_msg); st 142 drivers/iio/adc/ad7266.c *val = be16_to_cpu(st->data.sample[address % 2]); st 150 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 159 drivers/iio/adc/ad7266.c ret = ad7266_read_single(st, val, chan->address); st 168 drivers/iio/adc/ad7266.c scale_mv = st->vref_mv; st 169 drivers/iio/adc/ad7266.c if (st->mode == AD7266_MODE_DIFF) st 171 drivers/iio/adc/ad7266.c if (st->range == AD7266_RANGE_2VREF) st 178 drivers/iio/adc/ad7266.c if (st->range == AD7266_RANGE_2VREF && st 179 drivers/iio/adc/ad7266.c st->mode != AD7266_MODE_DIFF) st 360 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 365 drivers/iio/adc/ad7266.c is_differential = st->mode != AD7266_MODE_SINGLE_ENDED; st 366 drivers/iio/adc/ad7266.c is_signed = (st->range == AD7266_RANGE_2VREF) | st 367 drivers/iio/adc/ad7266.c (st->mode == AD7266_MODE_DIFF); st 369 drivers/iio/adc/ad7266.c i = AD7266_CHAN_INFO_INDEX(is_differential, is_signed, st->fixed_addr); st 386 drivers/iio/adc/ad7266.c struct ad7266_state *st; st 390 drivers/iio/adc/ad7266.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 394 drivers/iio/adc/ad7266.c st = iio_priv(indio_dev); st 396 drivers/iio/adc/ad7266.c st->reg = devm_regulator_get_optional(&spi->dev, "vref"); st 397 drivers/iio/adc/ad7266.c if (!IS_ERR(st->reg)) { st 398 drivers/iio/adc/ad7266.c ret = regulator_enable(st->reg); st 402 drivers/iio/adc/ad7266.c ret = regulator_get_voltage(st->reg); st 406 drivers/iio/adc/ad7266.c st->vref_mv = ret / 1000; st 409 drivers/iio/adc/ad7266.c if (PTR_ERR(st->reg) != -ENODEV) st 410 drivers/iio/adc/ad7266.c return PTR_ERR(st->reg); st 412 drivers/iio/adc/ad7266.c st->vref_mv = 2500; st 416 drivers/iio/adc/ad7266.c st->fixed_addr = pdata->fixed_addr; st 417 drivers/iio/adc/ad7266.c st->mode = pdata->mode; st 418 drivers/iio/adc/ad7266.c st->range = pdata->range; st 420 drivers/iio/adc/ad7266.c if (!st->fixed_addr) { st 421 drivers/iio/adc/ad7266.c for (i = 0; i < ARRAY_SIZE(st->gpios); ++i) { st 422 drivers/iio/adc/ad7266.c st->gpios[i].gpio = pdata->addr_gpios[i]; st 423 drivers/iio/adc/ad7266.c st->gpios[i].flags = GPIOF_OUT_INIT_LOW; st 424 drivers/iio/adc/ad7266.c st->gpios[i].label = ad7266_gpio_labels[i]; st 426 drivers/iio/adc/ad7266.c ret = gpio_request_array(st->gpios, st 427 drivers/iio/adc/ad7266.c ARRAY_SIZE(st->gpios)); st 432 drivers/iio/adc/ad7266.c st->fixed_addr = true; st 433 drivers/iio/adc/ad7266.c st->range = AD7266_RANGE_VREF; st 434 drivers/iio/adc/ad7266.c st->mode = AD7266_MODE_DIFF; st 438 drivers/iio/adc/ad7266.c st->spi = spi; st 449 drivers/iio/adc/ad7266.c st->single_xfer[0].rx_buf = &st->data.sample[0]; st 450 drivers/iio/adc/ad7266.c st->single_xfer[0].len = 2; st 451 drivers/iio/adc/ad7266.c st->single_xfer[0].cs_change = 1; st 453 drivers/iio/adc/ad7266.c st->single_xfer[1].rx_buf = st->data.sample; st 454 drivers/iio/adc/ad7266.c st->single_xfer[1].len = 4; st 455 drivers/iio/adc/ad7266.c st->single_xfer[1].cs_change = 1; st 457 drivers/iio/adc/ad7266.c st->single_xfer[2].tx_buf = &st->data.sample[0]; st 458 drivers/iio/adc/ad7266.c st->single_xfer[2].len = 1; st 460 drivers/iio/adc/ad7266.c spi_message_init(&st->single_msg); st 461 drivers/iio/adc/ad7266.c spi_message_add_tail(&st->single_xfer[0], &st->single_msg); st 462 drivers/iio/adc/ad7266.c spi_message_add_tail(&st->single_xfer[1], &st->single_msg); st 463 drivers/iio/adc/ad7266.c spi_message_add_tail(&st->single_xfer[2], &st->single_msg); st 479 drivers/iio/adc/ad7266.c if (!st->fixed_addr) st 480 drivers/iio/adc/ad7266.c gpio_free_array(st->gpios, ARRAY_SIZE(st->gpios)); st 482 drivers/iio/adc/ad7266.c if (!IS_ERR(st->reg)) st 483 drivers/iio/adc/ad7266.c regulator_disable(st->reg); st 491 drivers/iio/adc/ad7266.c struct ad7266_state *st = iio_priv(indio_dev); st 495 drivers/iio/adc/ad7266.c if (!st->fixed_addr) st 496 drivers/iio/adc/ad7266.c gpio_free_array(st->gpios, ARRAY_SIZE(st->gpios)); st 497 drivers/iio/adc/ad7266.c if (!IS_ERR(st->reg)) st 498 drivers/iio/adc/ad7266.c regulator_disable(st->reg); st 107 drivers/iio/adc/ad7298.c struct ad7298_state *st = iio_priv(indio_dev); st 115 drivers/iio/adc/ad7298.c command = AD7298_WRITE | st->ext_ref; st 121 drivers/iio/adc/ad7298.c st->tx_buf[0] = cpu_to_be16(command); st 124 drivers/iio/adc/ad7298.c st->ring_xfer[0].tx_buf = &st->tx_buf[0]; st 125 drivers/iio/adc/ad7298.c st->ring_xfer[0].len = 2; st 126 drivers/iio/adc/ad7298.c st->ring_xfer[0].cs_change = 1; st 127 drivers/iio/adc/ad7298.c st->ring_xfer[1].tx_buf = &st->tx_buf[1]; st 128 drivers/iio/adc/ad7298.c st->ring_xfer[1].len = 2; st 129 drivers/iio/adc/ad7298.c st->ring_xfer[1].cs_change = 1; st 131 drivers/iio/adc/ad7298.c spi_message_init(&st->ring_msg); st 132 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->ring_xfer[0], &st->ring_msg); st 133 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->ring_xfer[1], &st->ring_msg); st 136 drivers/iio/adc/ad7298.c st->ring_xfer[i + 2].rx_buf = &st->rx_buf[i]; st 137 drivers/iio/adc/ad7298.c st->ring_xfer[i + 2].len = 2; st 138 drivers/iio/adc/ad7298.c st->ring_xfer[i + 2].cs_change = 1; st 139 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->ring_xfer[i + 2], &st->ring_msg); st 142 drivers/iio/adc/ad7298.c st->ring_xfer[i + 1].cs_change = 0; st 157 drivers/iio/adc/ad7298.c struct ad7298_state *st = iio_priv(indio_dev); st 160 drivers/iio/adc/ad7298.c b_sent = spi_sync(st->spi, &st->ring_msg); st 164 drivers/iio/adc/ad7298.c iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, st 173 drivers/iio/adc/ad7298.c static int ad7298_scan_direct(struct ad7298_state *st, unsigned ch) st 176 drivers/iio/adc/ad7298.c st->tx_buf[0] = cpu_to_be16(AD7298_WRITE | st->ext_ref | st 179 drivers/iio/adc/ad7298.c ret = spi_sync(st->spi, &st->scan_single_msg); st 183 drivers/iio/adc/ad7298.c return be16_to_cpu(st->rx_buf[0]); st 186 drivers/iio/adc/ad7298.c static int ad7298_scan_temp(struct ad7298_state *st, int *val) st 192 drivers/iio/adc/ad7298.c AD7298_TAVG | st->ext_ref); st 194 drivers/iio/adc/ad7298.c ret = spi_write(st->spi, (u8 *)&buf, 2); st 200 drivers/iio/adc/ad7298.c ret = spi_write(st->spi, (u8 *)&buf, 2); st 206 drivers/iio/adc/ad7298.c ret = spi_read(st->spi, (u8 *)&buf, 2); st 215 drivers/iio/adc/ad7298.c static int ad7298_get_ref_voltage(struct ad7298_state *st) st 219 drivers/iio/adc/ad7298.c if (st->ext_ref) { st 220 drivers/iio/adc/ad7298.c vref = regulator_get_voltage(st->reg); st 237 drivers/iio/adc/ad7298.c struct ad7298_state *st = iio_priv(indio_dev); st 246 drivers/iio/adc/ad7298.c ret = ad7298_scan_temp(st, val); st 248 drivers/iio/adc/ad7298.c ret = ad7298_scan_direct(st, chan->address); st 262 drivers/iio/adc/ad7298.c *val = ad7298_get_ref_voltage(st); st 266 drivers/iio/adc/ad7298.c *val = ad7298_get_ref_voltage(st); st 273 drivers/iio/adc/ad7298.c *val = 1093 - 2732500 / ad7298_get_ref_voltage(st); st 287 drivers/iio/adc/ad7298.c struct ad7298_state *st; st 291 drivers/iio/adc/ad7298.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 295 drivers/iio/adc/ad7298.c st = iio_priv(indio_dev); st 298 drivers/iio/adc/ad7298.c st->ext_ref = AD7298_EXTREF; st 300 drivers/iio/adc/ad7298.c if (st->ext_ref) { st 301 drivers/iio/adc/ad7298.c st->reg = devm_regulator_get(&spi->dev, "vref"); st 302 drivers/iio/adc/ad7298.c if (IS_ERR(st->reg)) st 303 drivers/iio/adc/ad7298.c return PTR_ERR(st->reg); st 305 drivers/iio/adc/ad7298.c ret = regulator_enable(st->reg); st 312 drivers/iio/adc/ad7298.c st->spi = spi; st 324 drivers/iio/adc/ad7298.c st->scan_single_xfer[0].tx_buf = &st->tx_buf[0]; st 325 drivers/iio/adc/ad7298.c st->scan_single_xfer[0].len = 2; st 326 drivers/iio/adc/ad7298.c st->scan_single_xfer[0].cs_change = 1; st 327 drivers/iio/adc/ad7298.c st->scan_single_xfer[1].tx_buf = &st->tx_buf[1]; st 328 drivers/iio/adc/ad7298.c st->scan_single_xfer[1].len = 2; st 329 drivers/iio/adc/ad7298.c st->scan_single_xfer[1].cs_change = 1; st 330 drivers/iio/adc/ad7298.c st->scan_single_xfer[2].rx_buf = &st->rx_buf[0]; st 331 drivers/iio/adc/ad7298.c st->scan_single_xfer[2].len = 2; st 333 drivers/iio/adc/ad7298.c spi_message_init(&st->scan_single_msg); st 334 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->scan_single_xfer[0], &st->scan_single_msg); st 335 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->scan_single_xfer[1], &st->scan_single_msg); st 336 drivers/iio/adc/ad7298.c spi_message_add_tail(&st->scan_single_xfer[2], &st->scan_single_msg); st 352 drivers/iio/adc/ad7298.c if (st->ext_ref) st 353 drivers/iio/adc/ad7298.c regulator_disable(st->reg); st 361 drivers/iio/adc/ad7298.c struct ad7298_state *st = iio_priv(indio_dev); st 365 drivers/iio/adc/ad7298.c if (st->ext_ref) st 366 drivers/iio/adc/ad7298.c regulator_disable(st->reg); st 71 drivers/iio/adc/ad7476.c struct ad7476_state *st = iio_priv(indio_dev); st 74 drivers/iio/adc/ad7476.c b_sent = spi_sync(st->spi, &st->msg); st 78 drivers/iio/adc/ad7476.c iio_push_to_buffers_with_timestamp(indio_dev, st->data, st 86 drivers/iio/adc/ad7476.c static void ad7091_reset(struct ad7476_state *st) st 89 drivers/iio/adc/ad7476.c spi_read(st->spi, st->data, 1); st 92 drivers/iio/adc/ad7476.c static int ad7476_scan_direct(struct ad7476_state *st) st 96 drivers/iio/adc/ad7476.c ret = spi_sync(st->spi, &st->msg); st 100 drivers/iio/adc/ad7476.c return be16_to_cpup((__be16 *)st->data); st 110 drivers/iio/adc/ad7476.c struct ad7476_state *st = iio_priv(indio_dev); st 118 drivers/iio/adc/ad7476.c ret = ad7476_scan_direct(st); st 123 drivers/iio/adc/ad7476.c *val = (ret >> st->chip_info->channel[0].scan_type.shift) & st 124 drivers/iio/adc/ad7476.c GENMASK(st->chip_info->channel[0].scan_type.realbits - 1, 0); st 127 drivers/iio/adc/ad7476.c if (!st->chip_info->int_vref_uv) { st 128 drivers/iio/adc/ad7476.c scale_uv = regulator_get_voltage(st->reg); st 132 drivers/iio/adc/ad7476.c scale_uv = st->chip_info->int_vref_uv; st 237 drivers/iio/adc/ad7476.c struct ad7476_state *st; st 241 drivers/iio/adc/ad7476.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 245 drivers/iio/adc/ad7476.c st = iio_priv(indio_dev); st 246 drivers/iio/adc/ad7476.c st->chip_info = st 249 drivers/iio/adc/ad7476.c st->reg = devm_regulator_get(&spi->dev, "vcc"); st 250 drivers/iio/adc/ad7476.c if (IS_ERR(st->reg)) st 251 drivers/iio/adc/ad7476.c return PTR_ERR(st->reg); st 253 drivers/iio/adc/ad7476.c ret = regulator_enable(st->reg); st 259 drivers/iio/adc/ad7476.c st->spi = spi; st 266 drivers/iio/adc/ad7476.c indio_dev->channels = st->chip_info->channel; st 271 drivers/iio/adc/ad7476.c st->xfer.rx_buf = &st->data; st 272 drivers/iio/adc/ad7476.c st->xfer.len = st->chip_info->channel[0].scan_type.storagebits / 8; st 274 drivers/iio/adc/ad7476.c spi_message_init(&st->msg); st 275 drivers/iio/adc/ad7476.c spi_message_add_tail(&st->xfer, &st->msg); st 282 drivers/iio/adc/ad7476.c if (st->chip_info->reset) st 283 drivers/iio/adc/ad7476.c st->chip_info->reset(st); st 293 drivers/iio/adc/ad7476.c regulator_disable(st->reg); st 301 drivers/iio/adc/ad7476.c struct ad7476_state *st = iio_priv(indio_dev); st 305 drivers/iio/adc/ad7476.c regulator_disable(st->reg); st 51 drivers/iio/adc/ad7606.c static int ad7606_reset(struct ad7606_state *st) st 53 drivers/iio/adc/ad7606.c if (st->gpio_reset) { st 54 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_reset, 1); st 56 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_reset, 0); st 68 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 71 drivers/iio/adc/ad7606.c mutex_lock(&st->lock); st 73 drivers/iio/adc/ad7606.c ret = st->bops->reg_read(st, reg); st 79 drivers/iio/adc/ad7606.c ret = st->bops->reg_write(st, reg, writeval); st 82 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 86 drivers/iio/adc/ad7606.c static int ad7606_read_samples(struct ad7606_state *st) st 88 drivers/iio/adc/ad7606.c unsigned int num = st->chip_info->num_channels - 1; st 89 drivers/iio/adc/ad7606.c u16 *data = st->data; st 102 drivers/iio/adc/ad7606.c if (st->gpio_frstdata) { st 103 drivers/iio/adc/ad7606.c ret = st->bops->read_block(st->dev, 1, data); st 107 drivers/iio/adc/ad7606.c if (!gpiod_get_value(st->gpio_frstdata)) { st 108 drivers/iio/adc/ad7606.c ad7606_reset(st); st 116 drivers/iio/adc/ad7606.c return st->bops->read_block(st->dev, num, data); st 123 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 126 drivers/iio/adc/ad7606.c mutex_lock(&st->lock); st 128 drivers/iio/adc/ad7606.c ret = ad7606_read_samples(st); st 130 drivers/iio/adc/ad7606.c iio_push_to_buffers_with_timestamp(indio_dev, st->data, st 135 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 1); st 137 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 144 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 147 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 1); st 148 drivers/iio/adc/ad7606.c ret = wait_for_completion_timeout(&st->completion, st 155 drivers/iio/adc/ad7606.c ret = ad7606_read_samples(st); st 157 drivers/iio/adc/ad7606.c ret = st->data[ch]; st 160 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 0); st 172 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 188 drivers/iio/adc/ad7606.c if (st->sw_mode_en) st 191 drivers/iio/adc/ad7606.c *val2 = st->scale_avail[st->range[ch]]; st 194 drivers/iio/adc/ad7606.c *val = st->oversampling; st 220 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 222 drivers/iio/adc/ad7606.c return ad7606_show_avail(buf, st->scale_avail, st->num_scales, true); st 229 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 231 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_range, val); st 238 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 243 drivers/iio/adc/ad7606.c gpiod_set_array_value(ARRAY_SIZE(values), st->gpio_os->desc, st 244 drivers/iio/adc/ad7606.c st->gpio_os->info, values); st 247 drivers/iio/adc/ad7606.c if (st->chip_info->os_req_reset) st 248 drivers/iio/adc/ad7606.c ad7606_reset(st); st 259 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 264 drivers/iio/adc/ad7606.c mutex_lock(&st->lock); st 265 drivers/iio/adc/ad7606.c i = find_closest(val2, st->scale_avail, st->num_scales); st 266 drivers/iio/adc/ad7606.c if (st->sw_mode_en) st 268 drivers/iio/adc/ad7606.c ret = st->write_scale(indio_dev, ch, i); st 270 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 273 drivers/iio/adc/ad7606.c st->range[ch] = i; st 274 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 280 drivers/iio/adc/ad7606.c i = find_closest(val, st->oversampling_avail, st 281 drivers/iio/adc/ad7606.c st->num_os_ratios); st 282 drivers/iio/adc/ad7606.c mutex_lock(&st->lock); st 283 drivers/iio/adc/ad7606.c ret = st->write_os(indio_dev, i); st 285 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 288 drivers/iio/adc/ad7606.c st->oversampling = st->oversampling_avail[i]; st 289 drivers/iio/adc/ad7606.c mutex_unlock(&st->lock); st 302 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 304 drivers/iio/adc/ad7606.c return ad7606_show_avail(buf, st->oversampling_avail, st 305 drivers/iio/adc/ad7606.c st->num_os_ratios, false); st 429 drivers/iio/adc/ad7606.c static int ad7606_request_gpios(struct ad7606_state *st) st 431 drivers/iio/adc/ad7606.c struct device *dev = st->dev; st 433 drivers/iio/adc/ad7606.c st->gpio_convst = devm_gpiod_get(dev, "adi,conversion-start", st 435 drivers/iio/adc/ad7606.c if (IS_ERR(st->gpio_convst)) st 436 drivers/iio/adc/ad7606.c return PTR_ERR(st->gpio_convst); st 438 drivers/iio/adc/ad7606.c st->gpio_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); st 439 drivers/iio/adc/ad7606.c if (IS_ERR(st->gpio_reset)) st 440 drivers/iio/adc/ad7606.c return PTR_ERR(st->gpio_reset); st 442 drivers/iio/adc/ad7606.c st->gpio_range = devm_gpiod_get_optional(dev, "adi,range", st 444 drivers/iio/adc/ad7606.c if (IS_ERR(st->gpio_range)) st 445 drivers/iio/adc/ad7606.c return PTR_ERR(st->gpio_range); st 447 drivers/iio/adc/ad7606.c st->gpio_standby = devm_gpiod_get_optional(dev, "standby", st 449 drivers/iio/adc/ad7606.c if (IS_ERR(st->gpio_standby)) st 450 drivers/iio/adc/ad7606.c return PTR_ERR(st->gpio_standby); st 452 drivers/iio/adc/ad7606.c st->gpio_frstdata = devm_gpiod_get_optional(dev, "adi,first-data", st 454 drivers/iio/adc/ad7606.c if (IS_ERR(st->gpio_frstdata)) st 455 drivers/iio/adc/ad7606.c return PTR_ERR(st->gpio_frstdata); st 457 drivers/iio/adc/ad7606.c if (!st->chip_info->oversampling_num) st 460 drivers/iio/adc/ad7606.c st->gpio_os = devm_gpiod_get_array_optional(dev, st 463 drivers/iio/adc/ad7606.c return PTR_ERR_OR_ZERO(st->gpio_os); st 475 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 478 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 0); st 479 drivers/iio/adc/ad7606.c iio_trigger_poll_chained(st->trig); st 481 drivers/iio/adc/ad7606.c complete(&st->completion); st 490 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 492 drivers/iio/adc/ad7606.c if (st->trig != trig) st 500 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 503 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 1); st 510 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 512 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_convst, 0); st 562 drivers/iio/adc/ad7606.c struct ad7606_state *st = data; st 564 drivers/iio/adc/ad7606.c regulator_disable(st->reg); st 571 drivers/iio/adc/ad7606.c struct ad7606_state *st; st 575 drivers/iio/adc/ad7606.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 579 drivers/iio/adc/ad7606.c st = iio_priv(indio_dev); st 582 drivers/iio/adc/ad7606.c st->dev = dev; st 583 drivers/iio/adc/ad7606.c mutex_init(&st->lock); st 584 drivers/iio/adc/ad7606.c st->bops = bops; st 585 drivers/iio/adc/ad7606.c st->base_address = base_address; st 587 drivers/iio/adc/ad7606.c st->range[0] = 0; st 588 drivers/iio/adc/ad7606.c st->oversampling = 1; st 589 drivers/iio/adc/ad7606.c st->scale_avail = ad7606_scale_avail; st 590 drivers/iio/adc/ad7606.c st->num_scales = ARRAY_SIZE(ad7606_scale_avail); st 592 drivers/iio/adc/ad7606.c st->reg = devm_regulator_get(dev, "avcc"); st 593 drivers/iio/adc/ad7606.c if (IS_ERR(st->reg)) st 594 drivers/iio/adc/ad7606.c return PTR_ERR(st->reg); st 596 drivers/iio/adc/ad7606.c ret = regulator_enable(st->reg); st 602 drivers/iio/adc/ad7606.c ret = devm_add_action_or_reset(dev, ad7606_regulator_disable, st); st 606 drivers/iio/adc/ad7606.c st->chip_info = &ad7606_chip_info_tbl[id]; st 608 drivers/iio/adc/ad7606.c if (st->chip_info->oversampling_num) { st 609 drivers/iio/adc/ad7606.c st->oversampling_avail = st->chip_info->oversampling_avail; st 610 drivers/iio/adc/ad7606.c st->num_os_ratios = st->chip_info->oversampling_num; st 613 drivers/iio/adc/ad7606.c ret = ad7606_request_gpios(st); st 618 drivers/iio/adc/ad7606.c if (st->gpio_os) { st 619 drivers/iio/adc/ad7606.c if (st->gpio_range) st 624 drivers/iio/adc/ad7606.c if (st->gpio_range) st 631 drivers/iio/adc/ad7606.c indio_dev->channels = st->chip_info->channels; st 632 drivers/iio/adc/ad7606.c indio_dev->num_channels = st->chip_info->num_channels; st 634 drivers/iio/adc/ad7606.c init_completion(&st->completion); st 636 drivers/iio/adc/ad7606.c ret = ad7606_reset(st); st 638 drivers/iio/adc/ad7606.c dev_warn(st->dev, "failed to RESET: no RESET GPIO specified\n"); st 641 drivers/iio/adc/ad7606.c if (st->chip_info->init_delay_ms) { st 642 drivers/iio/adc/ad7606.c if (msleep_interruptible(st->chip_info->init_delay_ms)) st 646 drivers/iio/adc/ad7606.c st->write_scale = ad7606_write_scale_hw; st 647 drivers/iio/adc/ad7606.c st->write_os = ad7606_write_os_hw; st 649 drivers/iio/adc/ad7606.c if (st->bops->sw_mode_config) st 650 drivers/iio/adc/ad7606.c st->sw_mode_en = device_property_present(st->dev, st 653 drivers/iio/adc/ad7606.c if (st->sw_mode_en) { st 655 drivers/iio/adc/ad7606.c st->scale_avail = ad7616_sw_scale_avail; st 656 drivers/iio/adc/ad7606.c st->num_scales = ARRAY_SIZE(ad7616_sw_scale_avail); st 659 drivers/iio/adc/ad7606.c memset32(st->range, 2, ARRAY_SIZE(st->range)); st 662 drivers/iio/adc/ad7606.c ret = st->bops->sw_mode_config(indio_dev); st 667 drivers/iio/adc/ad7606.c st->trig = devm_iio_trigger_alloc(dev, "%s-dev%d", st 669 drivers/iio/adc/ad7606.c if (!st->trig) st 672 drivers/iio/adc/ad7606.c st->trig->ops = &ad7606_trigger_ops; st 673 drivers/iio/adc/ad7606.c st->trig->dev.parent = dev; st 674 drivers/iio/adc/ad7606.c iio_trigger_set_drvdata(st->trig, indio_dev); st 675 drivers/iio/adc/ad7606.c ret = devm_iio_trigger_register(dev, st->trig); st 679 drivers/iio/adc/ad7606.c indio_dev->trig = iio_trigger_get(st->trig); st 705 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 707 drivers/iio/adc/ad7606.c if (st->gpio_standby) { st 708 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_range, 1); st 709 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_standby, 0); st 718 drivers/iio/adc/ad7606.c struct ad7606_state *st = iio_priv(indio_dev); st 720 drivers/iio/adc/ad7606.c if (st->gpio_standby) { st 721 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_range, st->range[0]); st 722 drivers/iio/adc/ad7606.c gpiod_set_value(st->gpio_standby, 1); st 723 drivers/iio/adc/ad7606.c ad7606_reset(st); st 141 drivers/iio/adc/ad7606.h int (*reg_read)(struct ad7606_state *st, unsigned int addr); st 142 drivers/iio/adc/ad7606.h int (*reg_write)(struct ad7606_state *st, st 145 drivers/iio/adc/ad7606.h int (*write_mask)(struct ad7606_state *st, st 21 drivers/iio/adc/ad7606_par.c struct ad7606_state *st = iio_priv(indio_dev); st 23 drivers/iio/adc/ad7606_par.c insw((unsigned long)st->base_address, buf, count); st 36 drivers/iio/adc/ad7606_par.c struct ad7606_state *st = iio_priv(indio_dev); st 38 drivers/iio/adc/ad7606_par.c insb((unsigned long)st->base_address, buf, count * 2); st 123 drivers/iio/adc/ad7606_spi.c static int ad7606_spi_reg_read(struct ad7606_state *st, unsigned int addr) st 125 drivers/iio/adc/ad7606_spi.c struct spi_device *spi = to_spi_device(st->dev); st 128 drivers/iio/adc/ad7606_spi.c .tx_buf = &st->d16[0], st 132 drivers/iio/adc/ad7606_spi.c .rx_buf = &st->d16[1], st 138 drivers/iio/adc/ad7606_spi.c st->d16[0] = cpu_to_be16(st->bops->rd_wr_cmd(addr, 0) << 8); st 144 drivers/iio/adc/ad7606_spi.c return be16_to_cpu(st->d16[1]); st 147 drivers/iio/adc/ad7606_spi.c static int ad7606_spi_reg_write(struct ad7606_state *st, st 151 drivers/iio/adc/ad7606_spi.c struct spi_device *spi = to_spi_device(st->dev); st 153 drivers/iio/adc/ad7606_spi.c st->d16[0] = cpu_to_be16((st->bops->rd_wr_cmd(addr, 1) << 8) | st 156 drivers/iio/adc/ad7606_spi.c return spi_write(spi, &st->d16[0], sizeof(st->d16[0])); st 159 drivers/iio/adc/ad7606_spi.c static int ad7606_spi_write_mask(struct ad7606_state *st, st 166 drivers/iio/adc/ad7606_spi.c readval = st->bops->reg_read(st, addr); st 173 drivers/iio/adc/ad7606_spi.c return st->bops->reg_write(st, addr, readval); st 178 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 200 drivers/iio/adc/ad7606_spi.c return st->bops->write_mask(st, ch_addr, AD7616_RANGE_CH_MSK(ch_index), st 206 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 208 drivers/iio/adc/ad7606_spi.c return st->bops->write_mask(st, AD7616_CONFIGURATION_REGISTER, st 214 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 216 drivers/iio/adc/ad7606_spi.c return ad7606_spi_write_mask(st, st 224 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 226 drivers/iio/adc/ad7606_spi.c return ad7606_spi_reg_write(st, AD7606_OS_MODE, val); st 231 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 239 drivers/iio/adc/ad7606_spi.c st->write_scale = ad7616_write_scale_sw; st 240 drivers/iio/adc/ad7606_spi.c st->write_os = &ad7616_write_os_sw; st 243 drivers/iio/adc/ad7606_spi.c return st->bops->write_mask(st, st 251 drivers/iio/adc/ad7606_spi.c struct ad7606_state *st = iio_priv(indio_dev); st 260 drivers/iio/adc/ad7606_spi.c if (st->gpio_os) { st 262 drivers/iio/adc/ad7606_spi.c st->gpio_os->desc, st->gpio_os->info, os); st 265 drivers/iio/adc/ad7606_spi.c st->oversampling_avail = ad7606B_oversampling_avail; st 266 drivers/iio/adc/ad7606_spi.c st->num_os_ratios = ARRAY_SIZE(ad7606B_oversampling_avail); st 268 drivers/iio/adc/ad7606_spi.c st->write_scale = ad7606_write_scale_sw; st 269 drivers/iio/adc/ad7606_spi.c st->write_os = &ad7606_write_os_sw; st 272 drivers/iio/adc/ad7606_spi.c st->bops->reg_write(st, st 174 drivers/iio/adc/ad7768-1.c static int ad7768_spi_reg_read(struct ad7768_state *st, unsigned int addr, st 181 drivers/iio/adc/ad7768-1.c st->data.d8[0] = AD7768_RD_FLAG_MSK(addr); st 183 drivers/iio/adc/ad7768-1.c ret = spi_write_then_read(st->spi, st->data.d8, 1, st 184 drivers/iio/adc/ad7768-1.c &st->data.d32, len); st 188 drivers/iio/adc/ad7768-1.c return (be32_to_cpu(st->data.d32) >> shift); st 191 drivers/iio/adc/ad7768-1.c static int ad7768_spi_reg_write(struct ad7768_state *st, st 195 drivers/iio/adc/ad7768-1.c st->data.d8[0] = AD7768_WR_FLAG_MSK(addr); st 196 drivers/iio/adc/ad7768-1.c st->data.d8[1] = val & 0xFF; st 198 drivers/iio/adc/ad7768-1.c return spi_write(st->spi, st->data.d8, 2); st 201 drivers/iio/adc/ad7768-1.c static int ad7768_set_mode(struct ad7768_state *st, st 206 drivers/iio/adc/ad7768-1.c regval = ad7768_spi_reg_read(st, AD7768_REG_CONVERSION, 1); st 213 drivers/iio/adc/ad7768-1.c return ad7768_spi_reg_write(st, AD7768_REG_CONVERSION, regval); st 218 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 221 drivers/iio/adc/ad7768-1.c reinit_completion(&st->completion); st 223 drivers/iio/adc/ad7768-1.c ret = ad7768_set_mode(st, AD7768_ONE_SHOT); st 227 drivers/iio/adc/ad7768-1.c ret = wait_for_completion_timeout(&st->completion, st 232 drivers/iio/adc/ad7768-1.c readval = ad7768_spi_reg_read(st, AD7768_REG_ADC_DATA, 3); st 239 drivers/iio/adc/ad7768-1.c ret = ad7768_set_mode(st, AD7768_CONTINUOUS); st 251 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 254 drivers/iio/adc/ad7768-1.c mutex_lock(&st->lock); st 256 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_read(st, reg, 1); st 262 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_write(st, reg, writeval); st 265 drivers/iio/adc/ad7768-1.c mutex_unlock(&st->lock); st 270 drivers/iio/adc/ad7768-1.c static int ad7768_set_dig_fil(struct ad7768_state *st, st 281 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_write(st, AD7768_REG_DIGITAL_FILTER, mode); st 286 drivers/iio/adc/ad7768-1.c gpiod_set_value(st->gpio_sync_in, 1); st 287 drivers/iio/adc/ad7768-1.c gpiod_set_value(st->gpio_sync_in, 0); st 292 drivers/iio/adc/ad7768-1.c static int ad7768_set_freq(struct ad7768_state *st, st 301 drivers/iio/adc/ad7768-1.c res = DIV_ROUND_CLOSEST(st->mclk_freq, freq); st 318 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_write(st, AD7768_REG_POWER_CLOCK, pwr_mode); st 322 drivers/iio/adc/ad7768-1.c ret = ad7768_set_dig_fil(st, ad7768_clk_config[idx].dec_rate); st 326 drivers/iio/adc/ad7768-1.c st->samp_freq = DIV_ROUND_CLOSEST(st->mclk_freq, st 337 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 342 drivers/iio/adc/ad7768-1.c freq = DIV_ROUND_CLOSEST(st->mclk_freq, st 358 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 378 drivers/iio/adc/ad7768-1.c scale_uv = regulator_get_voltage(st->vref); st 388 drivers/iio/adc/ad7768-1.c *val = st->samp_freq; st 400 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 404 drivers/iio/adc/ad7768-1.c return ad7768_set_freq(st, val); st 426 drivers/iio/adc/ad7768-1.c static int ad7768_setup(struct ad7768_state *st) st 436 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_write(st, AD7768_REG_SYNC_RESET, 0x3); st 440 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_write(st, AD7768_REG_SYNC_RESET, 0x2); st 444 drivers/iio/adc/ad7768-1.c st->gpio_sync_in = devm_gpiod_get(&st->spi->dev, "adi,sync-in", st 446 drivers/iio/adc/ad7768-1.c if (IS_ERR(st->gpio_sync_in)) st 447 drivers/iio/adc/ad7768-1.c return PTR_ERR(st->gpio_sync_in); st 450 drivers/iio/adc/ad7768-1.c return ad7768_set_freq(st, 32000); st 457 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 460 drivers/iio/adc/ad7768-1.c mutex_lock(&st->lock); st 462 drivers/iio/adc/ad7768-1.c ret = spi_read(st->spi, &st->data.d32, 3); st 466 drivers/iio/adc/ad7768-1.c iio_push_to_buffers_with_timestamp(indio_dev, &st->data.d32, st 471 drivers/iio/adc/ad7768-1.c mutex_unlock(&st->lock); st 479 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 482 drivers/iio/adc/ad7768-1.c iio_trigger_poll(st->trig); st 484 drivers/iio/adc/ad7768-1.c complete(&st->completion); st 491 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 499 drivers/iio/adc/ad7768-1.c return ad7768_spi_reg_write(st, AD7768_REG_INTERFACE_FORMAT, 0x01); st 504 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = iio_priv(indio_dev); st 511 drivers/iio/adc/ad7768-1.c ret = ad7768_spi_reg_read(st, AD7768_REG_ADC_DATA, 3); st 529 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = data; st 531 drivers/iio/adc/ad7768-1.c regulator_disable(st->vref); st 536 drivers/iio/adc/ad7768-1.c struct ad7768_state *st = data; st 538 drivers/iio/adc/ad7768-1.c clk_disable_unprepare(st->mclk); st 543 drivers/iio/adc/ad7768-1.c struct ad7768_state *st; st 547 drivers/iio/adc/ad7768-1.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 551 drivers/iio/adc/ad7768-1.c st = iio_priv(indio_dev); st 552 drivers/iio/adc/ad7768-1.c st->spi = spi; st 554 drivers/iio/adc/ad7768-1.c st->vref = devm_regulator_get(&spi->dev, "vref"); st 555 drivers/iio/adc/ad7768-1.c if (IS_ERR(st->vref)) st 556 drivers/iio/adc/ad7768-1.c return PTR_ERR(st->vref); st 558 drivers/iio/adc/ad7768-1.c ret = regulator_enable(st->vref); st 564 drivers/iio/adc/ad7768-1.c ret = devm_add_action_or_reset(&spi->dev, ad7768_regulator_disable, st); st 568 drivers/iio/adc/ad7768-1.c st->mclk = devm_clk_get(&spi->dev, "mclk"); st 569 drivers/iio/adc/ad7768-1.c if (IS_ERR(st->mclk)) st 570 drivers/iio/adc/ad7768-1.c return PTR_ERR(st->mclk); st 572 drivers/iio/adc/ad7768-1.c ret = clk_prepare_enable(st->mclk); st 576 drivers/iio/adc/ad7768-1.c ret = devm_add_action_or_reset(&spi->dev, ad7768_clk_disable, st); st 580 drivers/iio/adc/ad7768-1.c st->mclk_freq = clk_get_rate(st->mclk); st 583 drivers/iio/adc/ad7768-1.c mutex_init(&st->lock); st 592 drivers/iio/adc/ad7768-1.c ret = ad7768_setup(st); st 598 drivers/iio/adc/ad7768-1.c st->trig = devm_iio_trigger_alloc(&spi->dev, "%s-dev%d", st 600 drivers/iio/adc/ad7768-1.c if (!st->trig) st 603 drivers/iio/adc/ad7768-1.c st->trig->ops = &ad7768_trigger_ops; st 604 drivers/iio/adc/ad7768-1.c st->trig->dev.parent = &spi->dev; st 605 drivers/iio/adc/ad7768-1.c iio_trigger_set_drvdata(st->trig, indio_dev); st 606 drivers/iio/adc/ad7768-1.c ret = devm_iio_trigger_register(&spi->dev, st->trig); st 610 drivers/iio/adc/ad7768-1.c indio_dev->trig = iio_trigger_get(st->trig); st 612 drivers/iio/adc/ad7768-1.c init_completion(&st->completion); st 87 drivers/iio/adc/ad7780.c struct ad7780_state *st = ad_sigma_delta_to_ad7780(sigma_delta); st 100 drivers/iio/adc/ad7780.c gpiod_set_value(st->powerdown_gpio, val); st 111 drivers/iio/adc/ad7780.c struct ad7780_state *st = iio_priv(indio_dev); st 118 drivers/iio/adc/ad7780.c voltage_uv = regulator_get_voltage(st->reg); st 122 drivers/iio/adc/ad7780.c *val = voltage_uv * st->gain; st 124 drivers/iio/adc/ad7780.c st->int_vref_mv = voltage_uv; st 130 drivers/iio/adc/ad7780.c *val = st->odr; st 145 drivers/iio/adc/ad7780.c struct ad7780_state *st = iio_priv(indio_dev); st 146 drivers/iio/adc/ad7780.c const struct ad7780_chip_info *chip_info = st->chip_info; st 158 drivers/iio/adc/ad7780.c vref = st->int_vref_mv * 1000000LL; st 162 drivers/iio/adc/ad7780.c st->gain = gain; st 167 drivers/iio/adc/ad7780.c gpiod_set_value(st->gain_gpio, gain); st 174 drivers/iio/adc/ad7780.c st->odr = ad778x_odr_avail[val]; st 175 drivers/iio/adc/ad7780.c gpiod_set_value(st->filter_gpio, val); st 187 drivers/iio/adc/ad7780.c struct ad7780_state *st = ad_sigma_delta_to_ad7780(sigma_delta); st 188 drivers/iio/adc/ad7780.c const struct ad7780_chip_info *chip_info = st->chip_info; st 195 drivers/iio/adc/ad7780.c st->gain = ad778x_gain[raw_sample & AD7780_GAIN]; st 196 drivers/iio/adc/ad7780.c st->odr = ad778x_odr_avail[raw_sample & AD7780_FILTER]; st 245 drivers/iio/adc/ad7780.c static int ad7780_init_gpios(struct device *dev, struct ad7780_state *st) st 249 drivers/iio/adc/ad7780.c st->powerdown_gpio = devm_gpiod_get_optional(dev, st 252 drivers/iio/adc/ad7780.c if (IS_ERR(st->powerdown_gpio)) { st 253 drivers/iio/adc/ad7780.c ret = PTR_ERR(st->powerdown_gpio); st 258 drivers/iio/adc/ad7780.c if (!st->chip_info->is_ad778x) st 262 drivers/iio/adc/ad7780.c st->gain_gpio = devm_gpiod_get_optional(dev, st 265 drivers/iio/adc/ad7780.c if (IS_ERR(st->gain_gpio)) { st 266 drivers/iio/adc/ad7780.c ret = PTR_ERR(st->gain_gpio); st 271 drivers/iio/adc/ad7780.c st->filter_gpio = devm_gpiod_get_optional(dev, st 274 drivers/iio/adc/ad7780.c if (IS_ERR(st->filter_gpio)) { st 275 drivers/iio/adc/ad7780.c ret = PTR_ERR(st->filter_gpio); st 285 drivers/iio/adc/ad7780.c struct ad7780_state *st; st 289 drivers/iio/adc/ad7780.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 293 drivers/iio/adc/ad7780.c st = iio_priv(indio_dev); st 294 drivers/iio/adc/ad7780.c st->gain = 1; st 296 drivers/iio/adc/ad7780.c ad_sd_init(&st->sd, indio_dev, spi, &ad7780_sigma_delta_info); st 298 drivers/iio/adc/ad7780.c st->chip_info = st 306 drivers/iio/adc/ad7780.c indio_dev->channels = &st->chip_info->channel; st 310 drivers/iio/adc/ad7780.c ret = ad7780_init_gpios(&spi->dev, st); st 314 drivers/iio/adc/ad7780.c st->reg = devm_regulator_get(&spi->dev, "avdd"); st 315 drivers/iio/adc/ad7780.c if (IS_ERR(st->reg)) st 316 drivers/iio/adc/ad7780.c return PTR_ERR(st->reg); st 318 drivers/iio/adc/ad7780.c ret = regulator_enable(st->reg); st 337 drivers/iio/adc/ad7780.c regulator_disable(st->reg); st 345 drivers/iio/adc/ad7780.c struct ad7780_state *st = iio_priv(indio_dev); st 350 drivers/iio/adc/ad7780.c regulator_disable(st->reg); st 181 drivers/iio/adc/ad7791.c struct ad7791_state *st = ad_sigma_delta_to_ad7791(sd); st 196 drivers/iio/adc/ad7791.c st->mode &= ~AD7791_MODE_SEL_MASK; st 197 drivers/iio/adc/ad7791.c st->mode |= AD7791_MODE_SEL(mode); st 199 drivers/iio/adc/ad7791.c return ad_sd_write_reg(sd, AD7791_REG_MODE, sizeof(st->mode), st->mode); st 213 drivers/iio/adc/ad7791.c struct ad7791_state *st = iio_priv(indio_dev); st 214 drivers/iio/adc/ad7791.c bool unipolar = !!(st->mode & AD7791_MODE_UNIPOLAR); st 241 drivers/iio/adc/ad7791.c voltage_uv = regulator_get_voltage(st->reg); st 254 drivers/iio/adc/ad7791.c rate = st->filter & AD7791_FILTER_RATE_MASK; st 266 drivers/iio/adc/ad7791.c struct ad7791_state *st = iio_priv(indio_dev); st 286 drivers/iio/adc/ad7791.c st->filter &= ~AD7791_FILTER_RATE_MASK; st 287 drivers/iio/adc/ad7791.c st->filter |= i; st 288 drivers/iio/adc/ad7791.c ad_sd_write_reg(&st->sd, AD7791_REG_FILTER, st 289 drivers/iio/adc/ad7791.c sizeof(st->filter), st 290 drivers/iio/adc/ad7791.c st->filter); st 324 drivers/iio/adc/ad7791.c static int ad7791_setup(struct ad7791_state *st, st 328 drivers/iio/adc/ad7791.c st->mode = AD7791_MODE_BUFFER; st 329 drivers/iio/adc/ad7791.c st->filter = AD7791_FILTER_RATE_16_6; st 334 drivers/iio/adc/ad7791.c if ((st->info->flags & AD7791_FLAG_HAS_BUFFER) && !pdata->buffered) st 335 drivers/iio/adc/ad7791.c st->mode &= ~AD7791_MODE_BUFFER; st 337 drivers/iio/adc/ad7791.c if ((st->info->flags & AD7791_FLAG_HAS_BURNOUT) && st 339 drivers/iio/adc/ad7791.c st->mode |= AD7791_MODE_BURNOUT; st 341 drivers/iio/adc/ad7791.c if ((st->info->flags & AD7791_FLAG_HAS_UNIPOLAR) && pdata->unipolar) st 342 drivers/iio/adc/ad7791.c st->mode |= AD7791_MODE_UNIPOLAR; st 344 drivers/iio/adc/ad7791.c return ad_sd_write_reg(&st->sd, AD7791_REG_MODE, sizeof(st->mode), st 345 drivers/iio/adc/ad7791.c st->mode); st 352 drivers/iio/adc/ad7791.c struct ad7791_state *st; st 360 drivers/iio/adc/ad7791.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 364 drivers/iio/adc/ad7791.c st = iio_priv(indio_dev); st 366 drivers/iio/adc/ad7791.c st->reg = devm_regulator_get(&spi->dev, "refin"); st 367 drivers/iio/adc/ad7791.c if (IS_ERR(st->reg)) st 368 drivers/iio/adc/ad7791.c return PTR_ERR(st->reg); st 370 drivers/iio/adc/ad7791.c ret = regulator_enable(st->reg); st 374 drivers/iio/adc/ad7791.c st->info = &ad7791_chip_infos[spi_get_device_id(spi)->driver_data]; st 375 drivers/iio/adc/ad7791.c ad_sd_init(&st->sd, indio_dev, spi, &ad7791_sigma_delta_info); st 383 drivers/iio/adc/ad7791.c indio_dev->channels = st->info->channels; st 384 drivers/iio/adc/ad7791.c indio_dev->num_channels = st->info->num_channels; st 385 drivers/iio/adc/ad7791.c if (st->info->flags & AD7791_FLAG_HAS_FILTER) st 394 drivers/iio/adc/ad7791.c ret = ad7791_setup(st, pdata); st 407 drivers/iio/adc/ad7791.c regulator_disable(st->reg); st 415 drivers/iio/adc/ad7791.c struct ad7791_state *st = iio_priv(indio_dev); st 420 drivers/iio/adc/ad7791.c regulator_disable(st->reg); st 184 drivers/iio/adc/ad7793.c struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd); st 186 drivers/iio/adc/ad7793.c st->conf &= ~AD7793_CONF_CHAN_MASK; st 187 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_CHAN(channel); st 189 drivers/iio/adc/ad7793.c return ad_sd_write_reg(&st->sd, AD7793_REG_CONF, 2, st->conf); st 195 drivers/iio/adc/ad7793.c struct ad7793_state *st = ad_sigma_delta_to_ad7793(sd); st 197 drivers/iio/adc/ad7793.c st->mode &= ~AD7793_MODE_SEL_MASK; st 198 drivers/iio/adc/ad7793.c st->mode |= AD7793_MODE_SEL(mode); st 200 drivers/iio/adc/ad7793.c return ad_sd_write_reg(&st->sd, AD7793_REG_MODE, 2, st->mode); st 220 drivers/iio/adc/ad7793.c static int ad7793_calibrate_all(struct ad7793_state *st) st 222 drivers/iio/adc/ad7793.c return ad_sd_calibrate_all(&st->sd, ad7793_calib_arr, st 226 drivers/iio/adc/ad7793.c static int ad7793_check_platform_data(struct ad7793_state *st, st 235 drivers/iio/adc/ad7793.c if (!(st->chip_info->flags & AD7793_FLAG_HAS_CLKSEL) && st 239 drivers/iio/adc/ad7793.c if (!(st->chip_info->flags & AD7793_FLAG_HAS_REFSEL) && st 243 drivers/iio/adc/ad7793.c if (!(st->chip_info->flags & AD7793_FLAG_HAS_VBIAS) && st 247 drivers/iio/adc/ad7793.c if (!(st->chip_info->flags & AD7793_HAS_EXITATION_CURRENT) && st 258 drivers/iio/adc/ad7793.c struct ad7793_state *st = iio_priv(indio_dev); st 263 drivers/iio/adc/ad7793.c ret = ad7793_check_platform_data(st, pdata); st 268 drivers/iio/adc/ad7793.c ret = ad_sd_reset(&st->sd, 32); st 274 drivers/iio/adc/ad7793.c ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id); st 280 drivers/iio/adc/ad7793.c if (id != st->chip_info->id) { st 281 drivers/iio/adc/ad7793.c dev_err(&st->sd.spi->dev, "device ID query failed\n"); st 285 drivers/iio/adc/ad7793.c st->mode = AD7793_MODE_RATE(1); st 286 drivers/iio/adc/ad7793.c st->conf = 0; st 288 drivers/iio/adc/ad7793.c if (st->chip_info->flags & AD7793_FLAG_HAS_CLKSEL) st 289 drivers/iio/adc/ad7793.c st->mode |= AD7793_MODE_CLKSRC(pdata->clock_src); st 290 drivers/iio/adc/ad7793.c if (st->chip_info->flags & AD7793_FLAG_HAS_REFSEL) st 291 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_REFSEL(pdata->refsel); st 292 drivers/iio/adc/ad7793.c if (st->chip_info->flags & AD7793_FLAG_HAS_VBIAS) st 293 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_VBIAS(pdata->bias_voltage); st 294 drivers/iio/adc/ad7793.c if (pdata->buffered || !(st->chip_info->flags & AD7793_FLAG_HAS_BUFFER)) st 295 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_BUF; st 297 drivers/iio/adc/ad7793.c (st->chip_info->flags & AD7793_FLAG_HAS_VBIAS)) st 298 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_BOOST; st 300 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_BO_EN; st 302 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_UNIPOLAR; st 304 drivers/iio/adc/ad7793.c if (!(st->chip_info->flags & AD7793_FLAG_HAS_GAIN)) st 305 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_GAIN(7); st 307 drivers/iio/adc/ad7793.c ret = ad7793_set_mode(&st->sd, AD_SD_MODE_IDLE); st 311 drivers/iio/adc/ad7793.c ret = ad7793_set_channel(&st->sd, 0); st 315 drivers/iio/adc/ad7793.c if (st->chip_info->flags & AD7793_HAS_EXITATION_CURRENT) { st 316 drivers/iio/adc/ad7793.c ret = ad_sd_write_reg(&st->sd, AD7793_REG_IO, 1, st 323 drivers/iio/adc/ad7793.c ret = ad7793_calibrate_all(st); st 328 drivers/iio/adc/ad7793.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) { st 330 drivers/iio/adc/ad7793.c >> (st->chip_info->channels[0].scan_type.realbits - st 331 drivers/iio/adc/ad7793.c (!!(st->conf & AD7793_CONF_UNIPOLAR) ? 0 : 1)); st 334 drivers/iio/adc/ad7793.c st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; st 335 drivers/iio/adc/ad7793.c st->scale_avail[i][0] = scale_uv; st 340 drivers/iio/adc/ad7793.c dev_err(&st->sd.spi->dev, "setup failed\n"); st 360 drivers/iio/adc/ad7793.c struct ad7793_state *st = iio_priv(indio_dev); st 363 drivers/iio/adc/ad7793.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 364 drivers/iio/adc/ad7793.c len += sprintf(buf + len, "%d.%09u ", st->scale_avail[i][0], st 365 drivers/iio/adc/ad7793.c st->scale_avail[i][1]); st 401 drivers/iio/adc/ad7793.c struct ad7793_state *st = iio_priv(indio_dev); st 404 drivers/iio/adc/ad7793.c bool unipolar = !!(st->conf & AD7793_CONF_UNIPOLAR); st 418 drivers/iio/adc/ad7793.c *val = st-> st 419 drivers/iio/adc/ad7793.c scale_avail[(st->conf >> 8) & 0x7][0]; st 420 drivers/iio/adc/ad7793.c *val2 = st-> st 421 drivers/iio/adc/ad7793.c scale_avail[(st->conf >> 8) & 0x7][1]; st 457 drivers/iio/adc/ad7793.c *val = st->chip_info st 458 drivers/iio/adc/ad7793.c ->sample_freq_avail[AD7793_MODE_RATE(st->mode)]; st 470 drivers/iio/adc/ad7793.c struct ad7793_state *st = iio_priv(indio_dev); st 481 drivers/iio/adc/ad7793.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 482 drivers/iio/adc/ad7793.c if (val2 == st->scale_avail[i][1]) { st 484 drivers/iio/adc/ad7793.c tmp = st->conf; st 485 drivers/iio/adc/ad7793.c st->conf &= ~AD7793_CONF_GAIN(-1); st 486 drivers/iio/adc/ad7793.c st->conf |= AD7793_CONF_GAIN(i); st 488 drivers/iio/adc/ad7793.c if (tmp == st->conf) st 491 drivers/iio/adc/ad7793.c ad_sd_write_reg(&st->sd, AD7793_REG_CONF, st 492 drivers/iio/adc/ad7793.c sizeof(st->conf), st->conf); st 493 drivers/iio/adc/ad7793.c ad7793_calibrate_all(st); st 504 drivers/iio/adc/ad7793.c if (val == st->chip_info->sample_freq_avail[i]) st 512 drivers/iio/adc/ad7793.c st->mode &= ~AD7793_MODE_RATE(-1); st 513 drivers/iio/adc/ad7793.c st->mode |= AD7793_MODE_RATE(i); st 514 drivers/iio/adc/ad7793.c ad_sd_write_reg(&st->sd, AD7793_REG_MODE, sizeof(st->mode), st 515 drivers/iio/adc/ad7793.c st->mode); st 707 drivers/iio/adc/ad7793.c struct ad7793_state *st; st 721 drivers/iio/adc/ad7793.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 725 drivers/iio/adc/ad7793.c st = iio_priv(indio_dev); st 727 drivers/iio/adc/ad7793.c ad_sd_init(&st->sd, indio_dev, spi, &ad7793_sigma_delta_info); st 730 drivers/iio/adc/ad7793.c st->reg = devm_regulator_get(&spi->dev, "refin"); st 731 drivers/iio/adc/ad7793.c if (IS_ERR(st->reg)) st 732 drivers/iio/adc/ad7793.c return PTR_ERR(st->reg); st 734 drivers/iio/adc/ad7793.c ret = regulator_enable(st->reg); st 738 drivers/iio/adc/ad7793.c vref_mv = regulator_get_voltage(st->reg); st 749 drivers/iio/adc/ad7793.c st->chip_info = st 758 drivers/iio/adc/ad7793.c indio_dev->channels = st->chip_info->channels; st 759 drivers/iio/adc/ad7793.c indio_dev->num_channels = st->chip_info->num_channels; st 760 drivers/iio/adc/ad7793.c indio_dev->info = st->chip_info->iio_info; st 780 drivers/iio/adc/ad7793.c regulator_disable(st->reg); st 789 drivers/iio/adc/ad7793.c struct ad7793_state *st = iio_priv(indio_dev); st 795 drivers/iio/adc/ad7793.c regulator_disable(st->reg); st 78 drivers/iio/adc/ad7887.c struct ad7887_state *st = iio_priv(indio_dev); st 83 drivers/iio/adc/ad7887.c st->ring_msg = &st->msg[AD7887_CH0]; st 86 drivers/iio/adc/ad7887.c st->ring_msg = &st->msg[AD7887_CH1]; st 88 drivers/iio/adc/ad7887.c spi_sync(st->spi, st->ring_msg); st 91 drivers/iio/adc/ad7887.c st->ring_msg = &st->msg[AD7887_CH0_CH1]; st 100 drivers/iio/adc/ad7887.c struct ad7887_state *st = iio_priv(indio_dev); st 103 drivers/iio/adc/ad7887.c return spi_sync(st->spi, &st->msg[AD7887_CH0]); st 116 drivers/iio/adc/ad7887.c struct ad7887_state *st = iio_priv(indio_dev); st 119 drivers/iio/adc/ad7887.c b_sent = spi_sync(st->spi, st->ring_msg); st 123 drivers/iio/adc/ad7887.c iio_push_to_buffers_with_timestamp(indio_dev, st->data, st 138 drivers/iio/adc/ad7887.c static int ad7887_scan_direct(struct ad7887_state *st, unsigned ch) st 140 drivers/iio/adc/ad7887.c int ret = spi_sync(st->spi, &st->msg[ch]); st 144 drivers/iio/adc/ad7887.c return (st->data[(ch * 2)] << 8) | st->data[(ch * 2) + 1]; st 154 drivers/iio/adc/ad7887.c struct ad7887_state *st = iio_priv(indio_dev); st 161 drivers/iio/adc/ad7887.c ret = ad7887_scan_direct(st, chan->address); st 170 drivers/iio/adc/ad7887.c if (st->reg) { st 171 drivers/iio/adc/ad7887.c *val = regulator_get_voltage(st->reg); st 176 drivers/iio/adc/ad7887.c *val = st->chip_info->int_vref_mv; st 236 drivers/iio/adc/ad7887.c struct ad7887_state *st; st 241 drivers/iio/adc/ad7887.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 245 drivers/iio/adc/ad7887.c st = iio_priv(indio_dev); st 248 drivers/iio/adc/ad7887.c st->reg = devm_regulator_get(&spi->dev, "vref"); st 249 drivers/iio/adc/ad7887.c if (IS_ERR(st->reg)) st 250 drivers/iio/adc/ad7887.c return PTR_ERR(st->reg); st 252 drivers/iio/adc/ad7887.c ret = regulator_enable(st->reg); st 257 drivers/iio/adc/ad7887.c st->chip_info = st 261 drivers/iio/adc/ad7887.c st->spi = spi; st 278 drivers/iio/adc/ad7887.c st->tx_cmd_buf[0] = AD7887_CH_AIN0 | mode; st 280 drivers/iio/adc/ad7887.c st->xfer[0].rx_buf = &st->data[0]; st 281 drivers/iio/adc/ad7887.c st->xfer[0].tx_buf = &st->tx_cmd_buf[0]; st 282 drivers/iio/adc/ad7887.c st->xfer[0].len = 2; st 284 drivers/iio/adc/ad7887.c spi_message_init(&st->msg[AD7887_CH0]); st 285 drivers/iio/adc/ad7887.c spi_message_add_tail(&st->xfer[0], &st->msg[AD7887_CH0]); st 288 drivers/iio/adc/ad7887.c st->tx_cmd_buf[2] = AD7887_CH_AIN1 | mode; st 290 drivers/iio/adc/ad7887.c st->xfer[1].rx_buf = &st->data[0]; st 291 drivers/iio/adc/ad7887.c st->xfer[1].tx_buf = &st->tx_cmd_buf[2]; st 292 drivers/iio/adc/ad7887.c st->xfer[1].len = 2; st 294 drivers/iio/adc/ad7887.c st->xfer[2].rx_buf = &st->data[2]; st 295 drivers/iio/adc/ad7887.c st->xfer[2].tx_buf = &st->tx_cmd_buf[0]; st 296 drivers/iio/adc/ad7887.c st->xfer[2].len = 2; st 298 drivers/iio/adc/ad7887.c spi_message_init(&st->msg[AD7887_CH0_CH1]); st 299 drivers/iio/adc/ad7887.c spi_message_add_tail(&st->xfer[1], &st->msg[AD7887_CH0_CH1]); st 300 drivers/iio/adc/ad7887.c spi_message_add_tail(&st->xfer[2], &st->msg[AD7887_CH0_CH1]); st 302 drivers/iio/adc/ad7887.c st->xfer[3].rx_buf = &st->data[2]; st 303 drivers/iio/adc/ad7887.c st->xfer[3].tx_buf = &st->tx_cmd_buf[2]; st 304 drivers/iio/adc/ad7887.c st->xfer[3].len = 2; st 306 drivers/iio/adc/ad7887.c spi_message_init(&st->msg[AD7887_CH1]); st 307 drivers/iio/adc/ad7887.c spi_message_add_tail(&st->xfer[3], &st->msg[AD7887_CH1]); st 309 drivers/iio/adc/ad7887.c indio_dev->channels = st->chip_info->channel; st 312 drivers/iio/adc/ad7887.c indio_dev->channels = &st->chip_info->channel[1]; st 329 drivers/iio/adc/ad7887.c if (st->reg) st 330 drivers/iio/adc/ad7887.c regulator_disable(st->reg); st 338 drivers/iio/adc/ad7887.c struct ad7887_state *st = iio_priv(indio_dev); st 342 drivers/iio/adc/ad7887.c if (st->reg) st 343 drivers/iio/adc/ad7887.c regulator_disable(st->reg); st 134 drivers/iio/adc/ad7923.c struct ad7923_state *st = iio_priv(indio_dev); st 141 drivers/iio/adc/ad7923.c st->settings; st 143 drivers/iio/adc/ad7923.c st->tx_buf[len++] = cpu_to_be16(cmd); st 146 drivers/iio/adc/ad7923.c st->ring_xfer[0].tx_buf = &st->tx_buf[0]; st 147 drivers/iio/adc/ad7923.c st->ring_xfer[0].len = len; st 148 drivers/iio/adc/ad7923.c st->ring_xfer[0].cs_change = 1; st 150 drivers/iio/adc/ad7923.c spi_message_init(&st->ring_msg); st 151 drivers/iio/adc/ad7923.c spi_message_add_tail(&st->ring_xfer[0], &st->ring_msg); st 154 drivers/iio/adc/ad7923.c st->ring_xfer[i + 1].rx_buf = &st->rx_buf[i]; st 155 drivers/iio/adc/ad7923.c st->ring_xfer[i + 1].len = 2; st 156 drivers/iio/adc/ad7923.c st->ring_xfer[i + 1].cs_change = 1; st 157 drivers/iio/adc/ad7923.c spi_message_add_tail(&st->ring_xfer[i + 1], &st->ring_msg); st 160 drivers/iio/adc/ad7923.c st->ring_xfer[i + 1].cs_change = 0; st 175 drivers/iio/adc/ad7923.c struct ad7923_state *st = iio_priv(indio_dev); st 178 drivers/iio/adc/ad7923.c b_sent = spi_sync(st->spi, &st->ring_msg); st 182 drivers/iio/adc/ad7923.c iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, st 191 drivers/iio/adc/ad7923.c static int ad7923_scan_direct(struct ad7923_state *st, unsigned ch) st 197 drivers/iio/adc/ad7923.c st->settings; st 199 drivers/iio/adc/ad7923.c st->tx_buf[0] = cpu_to_be16(cmd); st 201 drivers/iio/adc/ad7923.c ret = spi_sync(st->spi, &st->scan_single_msg); st 205 drivers/iio/adc/ad7923.c return be16_to_cpu(st->rx_buf[0]); st 208 drivers/iio/adc/ad7923.c static int ad7923_get_range(struct ad7923_state *st) st 212 drivers/iio/adc/ad7923.c vref = regulator_get_voltage(st->reg); st 218 drivers/iio/adc/ad7923.c if (!(st->settings & AD7923_RANGE)) st 231 drivers/iio/adc/ad7923.c struct ad7923_state *st = iio_priv(indio_dev); st 238 drivers/iio/adc/ad7923.c ret = ad7923_scan_direct(st, chan->address); st 251 drivers/iio/adc/ad7923.c ret = ad7923_get_range(st); st 268 drivers/iio/adc/ad7923.c struct ad7923_state *st; st 273 drivers/iio/adc/ad7923.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 277 drivers/iio/adc/ad7923.c st = iio_priv(indio_dev); st 281 drivers/iio/adc/ad7923.c st->spi = spi; st 282 drivers/iio/adc/ad7923.c st->settings = AD7923_CODING | AD7923_RANGE | st 297 drivers/iio/adc/ad7923.c st->scan_single_xfer[0].tx_buf = &st->tx_buf[0]; st 298 drivers/iio/adc/ad7923.c st->scan_single_xfer[0].len = 2; st 299 drivers/iio/adc/ad7923.c st->scan_single_xfer[0].cs_change = 1; st 300 drivers/iio/adc/ad7923.c st->scan_single_xfer[1].rx_buf = &st->rx_buf[0]; st 301 drivers/iio/adc/ad7923.c st->scan_single_xfer[1].len = 2; st 303 drivers/iio/adc/ad7923.c spi_message_init(&st->scan_single_msg); st 304 drivers/iio/adc/ad7923.c spi_message_add_tail(&st->scan_single_xfer[0], &st->scan_single_msg); st 305 drivers/iio/adc/ad7923.c spi_message_add_tail(&st->scan_single_xfer[1], &st->scan_single_msg); st 307 drivers/iio/adc/ad7923.c st->reg = devm_regulator_get(&spi->dev, "refin"); st 308 drivers/iio/adc/ad7923.c if (IS_ERR(st->reg)) st 309 drivers/iio/adc/ad7923.c return PTR_ERR(st->reg); st 311 drivers/iio/adc/ad7923.c ret = regulator_enable(st->reg); st 329 drivers/iio/adc/ad7923.c regulator_disable(st->reg); st 337 drivers/iio/adc/ad7923.c struct ad7923_state *st = iio_priv(indio_dev); st 341 drivers/iio/adc/ad7923.c regulator_disable(st->reg); st 135 drivers/iio/adc/ad799x.c static int ad799x_write_config(struct ad799x_state *st, u16 val) st 137 drivers/iio/adc/ad799x.c switch (st->id) { st 140 drivers/iio/adc/ad799x.c return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG, st 145 drivers/iio/adc/ad799x.c return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG, st 149 drivers/iio/adc/ad799x.c st->config = val; st 154 drivers/iio/adc/ad799x.c static int ad799x_read_config(struct ad799x_state *st) st 156 drivers/iio/adc/ad799x.c switch (st->id) { st 159 drivers/iio/adc/ad799x.c return i2c_smbus_read_word_swapped(st->client, AD7998_CONF_REG); st 163 drivers/iio/adc/ad799x.c return i2c_smbus_read_byte_data(st->client, AD7998_CONF_REG); st 166 drivers/iio/adc/ad799x.c return st->config; st 180 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 184 drivers/iio/adc/ad799x.c switch (st->id) { st 188 drivers/iio/adc/ad799x.c cmd = st->config | st 205 drivers/iio/adc/ad799x.c b_sent = i2c_smbus_read_i2c_block_data(st->client, st 206 drivers/iio/adc/ad799x.c cmd, st->transfer_size, st->rx_buf); st 210 drivers/iio/adc/ad799x.c iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, st 221 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 223 drivers/iio/adc/ad799x.c kfree(st->rx_buf); st 224 drivers/iio/adc/ad799x.c st->rx_buf = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); st 225 drivers/iio/adc/ad799x.c if (!st->rx_buf) st 228 drivers/iio/adc/ad799x.c st->transfer_size = bitmap_weight(scan_mask, indio_dev->masklength) * 2; st 230 drivers/iio/adc/ad799x.c switch (st->id) { st 236 drivers/iio/adc/ad799x.c st->config &= ~(GENMASK(7, 0) << AD799X_CHANNEL_SHIFT); st 237 drivers/iio/adc/ad799x.c st->config |= (*scan_mask << AD799X_CHANNEL_SHIFT); st 238 drivers/iio/adc/ad799x.c return ad799x_write_config(st, st->config); st 244 drivers/iio/adc/ad799x.c static int ad799x_scan_direct(struct ad799x_state *st, unsigned ch) st 248 drivers/iio/adc/ad799x.c switch (st->id) { st 252 drivers/iio/adc/ad799x.c cmd = st->config | (BIT(ch) << AD799X_CHANNEL_SHIFT); st 267 drivers/iio/adc/ad799x.c return i2c_smbus_read_word_swapped(st->client, cmd); st 277 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 284 drivers/iio/adc/ad799x.c ret = ad799x_scan_direct(st, chan->scan_index); st 293 drivers/iio/adc/ad799x.c ret = regulator_get_voltage(st->vref); st 317 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 319 drivers/iio/adc/ad799x.c int ret = i2c_smbus_read_byte_data(st->client, AD7998_CYCLE_TMR_REG); st 332 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 342 drivers/iio/adc/ad799x.c ret = i2c_smbus_read_byte_data(st->client, AD7998_CYCLE_TMR_REG); st 356 drivers/iio/adc/ad799x.c ret = i2c_smbus_write_byte_data(st->client, AD7998_CYCLE_TMR_REG, st 373 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 375 drivers/iio/adc/ad799x.c if (!(st->config & AD7998_ALERT_EN)) st 378 drivers/iio/adc/ad799x.c if ((st->config >> AD799X_CHANNEL_SHIFT) & BIT(chan->scan_index)) st 390 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 398 drivers/iio/adc/ad799x.c st->config |= BIT(chan->scan_index) << AD799X_CHANNEL_SHIFT; st 400 drivers/iio/adc/ad799x.c st->config &= ~(BIT(chan->scan_index) << AD799X_CHANNEL_SHIFT); st 402 drivers/iio/adc/ad799x.c if (st->config >> AD799X_CHANNEL_SHIFT) st 403 drivers/iio/adc/ad799x.c st->config |= AD7998_ALERT_EN; st 405 drivers/iio/adc/ad799x.c st->config &= ~AD7998_ALERT_EN; st 407 drivers/iio/adc/ad799x.c ret = ad799x_write_config(st, st->config); st 439 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 445 drivers/iio/adc/ad799x.c ret = i2c_smbus_write_word_swapped(st->client, st 461 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 464 drivers/iio/adc/ad799x.c ret = i2c_smbus_read_word_swapped(st->client, st 478 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(private); st 481 drivers/iio/adc/ad799x.c ret = i2c_smbus_read_byte_data(st->client, AD7998_ALERT_STAT_REG); st 485 drivers/iio/adc/ad799x.c if (i2c_smbus_write_byte_data(st->client, AD7998_ALERT_STAT_REG, st 764 drivers/iio/adc/ad799x.c struct ad799x_state *st; st 769 drivers/iio/adc/ad799x.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 773 drivers/iio/adc/ad799x.c st = iio_priv(indio_dev); st 777 drivers/iio/adc/ad799x.c st->id = id->driver_data; st 779 drivers/iio/adc/ad799x.c st->chip_config = &chip_info->irq_config; st 781 drivers/iio/adc/ad799x.c st->chip_config = &chip_info->noirq_config; st 785 drivers/iio/adc/ad799x.c st->reg = devm_regulator_get(&client->dev, "vcc"); st 786 drivers/iio/adc/ad799x.c if (IS_ERR(st->reg)) st 787 drivers/iio/adc/ad799x.c return PTR_ERR(st->reg); st 788 drivers/iio/adc/ad799x.c ret = regulator_enable(st->reg); st 791 drivers/iio/adc/ad799x.c st->vref = devm_regulator_get(&client->dev, "vref"); st 792 drivers/iio/adc/ad799x.c if (IS_ERR(st->vref)) { st 793 drivers/iio/adc/ad799x.c ret = PTR_ERR(st->vref); st 796 drivers/iio/adc/ad799x.c ret = regulator_enable(st->vref); st 800 drivers/iio/adc/ad799x.c st->client = client; st 805 drivers/iio/adc/ad799x.c indio_dev->info = st->chip_config->info; st 808 drivers/iio/adc/ad799x.c indio_dev->channels = st->chip_config->channel; st 811 drivers/iio/adc/ad799x.c ret = ad799x_write_config(st, st->chip_config->default_config); st 814 drivers/iio/adc/ad799x.c ret = ad799x_read_config(st); st 817 drivers/iio/adc/ad799x.c st->config = ret; st 845 drivers/iio/adc/ad799x.c regulator_disable(st->vref); st 847 drivers/iio/adc/ad799x.c regulator_disable(st->reg); st 855 drivers/iio/adc/ad799x.c struct ad799x_state *st = iio_priv(indio_dev); st 860 drivers/iio/adc/ad799x.c regulator_disable(st->vref); st 861 drivers/iio/adc/ad799x.c regulator_disable(st->reg); st 862 drivers/iio/adc/ad799x.c kfree(st->rx_buf); st 330 drivers/iio/adc/at91-sama5d2_adc.c #define at91_adc_readl(st, reg) readl_relaxed(st->base + reg) st 331 drivers/iio/adc/at91-sama5d2_adc.c #define at91_adc_writel(st, reg, val) writel_relaxed(val, st->base + reg) st 489 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_config_emr(struct at91_adc_state *st) st 492 drivers/iio/adc/at91-sama5d2_adc.c unsigned int emr = at91_adc_readl(st, AT91_SAMA5D2_EMR); st 501 drivers/iio/adc/at91-sama5d2_adc.c switch (st->oversampling_ratio) { st 516 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_EMR, emr); st 519 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_adjust_val_osr(struct at91_adc_state *st, int *val) st 521 drivers/iio/adc/at91-sama5d2_adc.c if (st->oversampling_ratio == AT91_OSR_1SAMPLES) { st 527 drivers/iio/adc/at91-sama5d2_adc.c } else if (st->oversampling_ratio == AT91_OSR_4SAMPLES) { st 538 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_adjust_val_osr_array(struct at91_adc_state *st, void *buf, st 554 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_adjust_val_osr(st, &val); st 560 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_configure_touch(struct at91_adc_state *st, bool state) st 562 drivers/iio/adc/at91-sama5d2_adc.c u32 clk_khz = st->current_sample_rate / 1000; st 569 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, st 571 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_TSMR, 0); st 597 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_TSMR, tsmr); st 599 drivers/iio/adc/at91-sama5d2_adc.c acr = at91_adc_readl(st, AT91_SAMA5D2_ACR); st 602 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_ACR, acr); st 605 drivers/iio/adc/at91-sama5d2_adc.c st->touch_st.sample_period_val = st 609 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, AT91_SAMA5D2_IER_PEN); st 614 drivers/iio/adc/at91-sama5d2_adc.c static u16 at91_adc_touch_pos(struct at91_adc_state *st, int reg) st 625 drivers/iio/adc/at91-sama5d2_adc.c val = at91_adc_readl(st, reg); st 627 drivers/iio/adc/at91-sama5d2_adc.c dev_dbg(&iio_priv_to_dev(st)->dev, "pos is 0\n"); st 633 drivers/iio/adc/at91-sama5d2_adc.c dev_err(&iio_priv_to_dev(st)->dev, "scale is 0\n"); st 641 drivers/iio/adc/at91-sama5d2_adc.c static u16 at91_adc_touch_x_pos(struct at91_adc_state *st) st 643 drivers/iio/adc/at91-sama5d2_adc.c st->touch_st.x_pos = at91_adc_touch_pos(st, AT91_SAMA5D2_XPOSR); st 644 drivers/iio/adc/at91-sama5d2_adc.c return st->touch_st.x_pos; st 647 drivers/iio/adc/at91-sama5d2_adc.c static u16 at91_adc_touch_y_pos(struct at91_adc_state *st) st 649 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_touch_pos(st, AT91_SAMA5D2_YPOSR); st 652 drivers/iio/adc/at91-sama5d2_adc.c static u16 at91_adc_touch_pressure(struct at91_adc_state *st) st 661 drivers/iio/adc/at91-sama5d2_adc.c val = at91_adc_readl(st, AT91_SAMA5D2_PRESSR); st 666 drivers/iio/adc/at91-sama5d2_adc.c pres = rxp * (st->touch_st.x_pos * factor / 1024) * st 680 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_read_position(struct at91_adc_state *st, int chan, u16 *val) st 683 drivers/iio/adc/at91-sama5d2_adc.c if (!st->touch_st.touching) st 686 drivers/iio/adc/at91-sama5d2_adc.c *val = at91_adc_touch_x_pos(st); st 688 drivers/iio/adc/at91-sama5d2_adc.c *val = at91_adc_touch_y_pos(st); st 695 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_read_pressure(struct at91_adc_state *st, int chan, u16 *val) st 698 drivers/iio/adc/at91-sama5d2_adc.c if (!st->touch_st.touching) st 701 drivers/iio/adc/at91-sama5d2_adc.c *val = at91_adc_touch_pressure(st); st 711 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio); st 712 drivers/iio/adc/at91-sama5d2_adc.c u32 status = at91_adc_readl(st, AT91_SAMA5D2_TRGR); st 719 drivers/iio/adc/at91-sama5d2_adc.c status |= st->selected_trig->trgmod_value; st 722 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_TRGR, status); st 736 drivers/iio/adc/at91-sama5d2_adc.c cor = at91_adc_readl(st, AT91_SAMA5D2_COR); st 746 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_COR, cor); st 750 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CHER, st 753 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) { st 754 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, st 759 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) { st 760 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, st 763 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CHDR, st 774 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio); st 777 drivers/iio/adc/at91-sama5d2_adc.c if (st->dma_st.dma_chan) st 780 drivers/iio/adc/at91-sama5d2_adc.c enable_irq(st->irq); st 783 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_readl(st, AT91_SAMA5D2_LCDR); st 793 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_dma_size_done(struct at91_adc_state *st) st 799 drivers/iio/adc/at91-sama5d2_adc.c status = dmaengine_tx_status(st->dma_st.dma_chan, st 800 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_chan->cookie, st 806 drivers/iio/adc/at91-sama5d2_adc.c i = st->dma_st.rx_buf_sz - state.residue; st 809 drivers/iio/adc/at91-sama5d2_adc.c if (i >= st->dma_st.buf_idx) st 810 drivers/iio/adc/at91-sama5d2_adc.c size = i - st->dma_st.buf_idx; st 812 drivers/iio/adc/at91-sama5d2_adc.c size = st->dma_st.rx_buf_sz + i - st->dma_st.buf_idx; st 825 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 831 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) st 835 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.buf_idx = 0; st 841 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf_sz = 0; st 851 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf_sz += chan->scan_type.storagebits / 8; st 853 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf_sz *= st->dma_st.watermark; st 856 drivers/iio/adc/at91-sama5d2_adc.c desc = dmaengine_prep_dma_cyclic(st->dma_st.dma_chan, st 857 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_dma_buf, st 858 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf_sz, st 859 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf_sz / 2, st 874 drivers/iio/adc/at91-sama5d2_adc.c dmaengine_terminate_async(st->dma_st.dma_chan); st 879 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, AT91_SAMA5D2_IER_GOVRE); st 881 drivers/iio/adc/at91-sama5d2_adc.c dma_async_issue_pending(st->dma_st.dma_chan); st 884 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_ts = iio_get_time_ns(indio_dev); st 894 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 898 drivers/iio/adc/at91-sama5d2_adc.c &st->touch_st.channels_bitmask, st 901 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_configure_touch(st, true); st 919 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 925 drivers/iio/adc/at91-sama5d2_adc.c &st->touch_st.channels_bitmask, st 928 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_configure_touch(st, false); st 939 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) st 943 drivers/iio/adc/at91-sama5d2_adc.c dmaengine_terminate_sync(st->dma_st.dma_chan); st 961 drivers/iio/adc/at91-sama5d2_adc.c if (st->dma_st.dma_chan) st 962 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_readl(st, chan->address); st 966 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_readl(st, AT91_SAMA5D2_OVER); st 999 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio); st 1001 drivers/iio/adc/at91-sama5d2_adc.c st->trig = at91_adc_allocate_trigger(indio, st->selected_trig->name); st 1002 drivers/iio/adc/at91-sama5d2_adc.c if (IS_ERR(st->trig)) { st 1005 drivers/iio/adc/at91-sama5d2_adc.c return PTR_ERR(st->trig); st 1014 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1037 drivers/iio/adc/at91-sama5d2_adc.c val = at91_adc_readl(st, chan->address); st 1038 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_adjust_val_osr(st, &val); st 1039 drivers/iio/adc/at91-sama5d2_adc.c st->buffer[i] = val; st 1041 drivers/iio/adc/at91-sama5d2_adc.c st->buffer[i] = 0; st 1046 drivers/iio/adc/at91-sama5d2_adc.c iio_push_to_buffers_with_timestamp(indio_dev, st->buffer, st 1052 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1053 drivers/iio/adc/at91-sama5d2_adc.c int transferred_len = at91_adc_dma_size_done(st); st 1058 drivers/iio/adc/at91-sama5d2_adc.c u32 status = at91_adc_readl(st, AT91_SAMA5D2_ISR); st 1064 drivers/iio/adc/at91-sama5d2_adc.c sample_size = div_s64(st->dma_st.rx_buf_sz, st->dma_st.watermark); st 1072 drivers/iio/adc/at91-sama5d2_adc.c interval = div_s64((ns - st->dma_st.dma_ts), sample_count); st 1079 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_adjust_val_osr_array(st, st 1080 drivers/iio/adc/at91-sama5d2_adc.c &st->dma_st.rx_buf[st->dma_st.buf_idx], st 1084 drivers/iio/adc/at91-sama5d2_adc.c (st->dma_st.rx_buf + st->dma_st.buf_idx), st 1085 drivers/iio/adc/at91-sama5d2_adc.c (st->dma_st.dma_ts + interval * sample_index)); st 1089 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.buf_idx += sample_size; st 1091 drivers/iio/adc/at91-sama5d2_adc.c if (st->dma_st.buf_idx >= st->dma_st.rx_buf_sz) st 1092 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.buf_idx = 0; st 1096 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_ts = iio_get_time_ns(indio_dev); st 1103 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1105 drivers/iio/adc/at91-sama5d2_adc.c if (st->dma_st.dma_chan) st 1117 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio); st 1119 drivers/iio/adc/at91-sama5d2_adc.c if (st->selected_trig->hw_trig) { st 1157 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_setup_samp_freq(struct at91_adc_state *st, unsigned freq) st 1159 drivers/iio/adc/at91-sama5d2_adc.c struct iio_dev *indio_dev = iio_priv_to_dev(st); st 1162 drivers/iio/adc/at91-sama5d2_adc.c f_per = clk_get_rate(st->per_clk); st 1165 drivers/iio/adc/at91-sama5d2_adc.c startup = at91_adc_startup_time(st->soc_info.startup_time, st 1168 drivers/iio/adc/at91-sama5d2_adc.c mr = at91_adc_readl(st, AT91_SAMA5D2_MR); st 1172 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_MR, mr); st 1176 drivers/iio/adc/at91-sama5d2_adc.c st->current_sample_rate = freq; st 1179 drivers/iio/adc/at91-sama5d2_adc.c static inline unsigned at91_adc_get_sample_freq(struct at91_adc_state *st) st 1181 drivers/iio/adc/at91-sama5d2_adc.c return st->current_sample_rate; st 1186 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1197 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_read_position(st, chan->channel, &val); st 1199 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_read_pressure(st, chan->channel, &val); st 1202 drivers/iio/adc/at91-sama5d2_adc.c st->buffer[i] = val; st 1213 drivers/iio/adc/at91-sama5d2_adc.c schedule_work(&st->touch_st.workq); st 1216 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_pen_detect_interrupt(struct at91_adc_state *st) st 1218 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, AT91_SAMA5D2_IER_PEN); st 1219 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, AT91_SAMA5D2_IER_NOPEN | st 1222 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_TRGR, st 1224 drivers/iio/adc/at91-sama5d2_adc.c AT91_SAMA5D2_TRGR_TRGPER(st->touch_st.sample_period_val)); st 1225 drivers/iio/adc/at91-sama5d2_adc.c st->touch_st.touching = true; st 1228 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_no_pen_detect_interrupt(struct at91_adc_state *st) st 1230 drivers/iio/adc/at91-sama5d2_adc.c struct iio_dev *indio_dev = iio_priv_to_dev(st); st 1232 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_TRGR, st 1234 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, AT91_SAMA5D2_IER_NOPEN | st 1237 drivers/iio/adc/at91-sama5d2_adc.c st->touch_st.touching = false; st 1241 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, AT91_SAMA5D2_IER_PEN); st 1248 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = container_of(touch_st, st 1250 drivers/iio/adc/at91-sama5d2_adc.c struct iio_dev *indio_dev = iio_priv_to_dev(st); st 1252 drivers/iio/adc/at91-sama5d2_adc.c iio_push_to_buffers(indio_dev, st->buffer); st 1258 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio); st 1259 drivers/iio/adc/at91-sama5d2_adc.c u32 status = at91_adc_readl(st, AT91_SAMA5D2_ISR); st 1260 drivers/iio/adc/at91-sama5d2_adc.c u32 imr = at91_adc_readl(st, AT91_SAMA5D2_IMR); st 1268 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_pen_detect_interrupt(st); st 1271 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_no_pen_detect_interrupt(st); st 1281 drivers/iio/adc/at91-sama5d2_adc.c status = at91_adc_readl(st, AT91_SAMA5D2_XPOSR); st 1282 drivers/iio/adc/at91-sama5d2_adc.c status = at91_adc_readl(st, AT91_SAMA5D2_YPOSR); st 1283 drivers/iio/adc/at91-sama5d2_adc.c status = at91_adc_readl(st, AT91_SAMA5D2_PRESSR); st 1284 drivers/iio/adc/at91-sama5d2_adc.c } else if (iio_buffer_enabled(indio) && !st->dma_st.dma_chan) { st 1288 drivers/iio/adc/at91-sama5d2_adc.c } else if (iio_buffer_enabled(indio) && st->dma_st.dma_chan) { st 1294 drivers/iio/adc/at91-sama5d2_adc.c st->conversion_value = at91_adc_readl(st, st->chan->address); st 1295 drivers/iio/adc/at91-sama5d2_adc.c st->conversion_done = true; st 1296 drivers/iio/adc/at91-sama5d2_adc.c wake_up_interruptible(&st->wq_data_available); st 1304 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1317 drivers/iio/adc/at91-sama5d2_adc.c mutex_lock(&st->lock); st 1319 drivers/iio/adc/at91-sama5d2_adc.c ret = at91_adc_read_position(st, chan->channel, st 1322 drivers/iio/adc/at91-sama5d2_adc.c mutex_unlock(&st->lock); st 1325 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_adjust_val_osr(st, val); st 1331 drivers/iio/adc/at91-sama5d2_adc.c mutex_lock(&st->lock); st 1333 drivers/iio/adc/at91-sama5d2_adc.c ret = at91_adc_read_pressure(st, chan->channel, st 1336 drivers/iio/adc/at91-sama5d2_adc.c mutex_unlock(&st->lock); st 1339 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_adjust_val_osr(st, val); st 1347 drivers/iio/adc/at91-sama5d2_adc.c mutex_lock(&st->lock); st 1349 drivers/iio/adc/at91-sama5d2_adc.c st->chan = chan; st 1355 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_COR, cor); st 1356 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CHER, BIT(chan->channel)); st 1357 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IER, BIT(chan->channel)); st 1358 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CR, AT91_SAMA5D2_CR_START); st 1360 drivers/iio/adc/at91-sama5d2_adc.c ret = wait_event_interruptible_timeout(st->wq_data_available, st 1361 drivers/iio/adc/at91-sama5d2_adc.c st->conversion_done, st 1367 drivers/iio/adc/at91-sama5d2_adc.c *val = st->conversion_value; st 1368 drivers/iio/adc/at91-sama5d2_adc.c ret = at91_adc_adjust_val_osr(st, val); st 1371 drivers/iio/adc/at91-sama5d2_adc.c st->conversion_done = false; st 1374 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, BIT(chan->channel)); st 1375 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CHDR, BIT(chan->channel)); st 1378 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_readl(st, AT91_SAMA5D2_LCDR); st 1380 drivers/iio/adc/at91-sama5d2_adc.c mutex_unlock(&st->lock); st 1390 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1396 drivers/iio/adc/at91-sama5d2_adc.c *val = st->vref_uv / 1000; st 1403 drivers/iio/adc/at91-sama5d2_adc.c *val = at91_adc_get_sample_freq(st); st 1407 drivers/iio/adc/at91-sama5d2_adc.c *val = st->oversampling_ratio; st 1419 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1427 drivers/iio/adc/at91-sama5d2_adc.c if (val == st->oversampling_ratio) st 1429 drivers/iio/adc/at91-sama5d2_adc.c st->oversampling_ratio = val; st 1431 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_config_emr(st); st 1434 drivers/iio/adc/at91-sama5d2_adc.c if (val < st->soc_info.min_sample_rate || st 1435 drivers/iio/adc/at91-sama5d2_adc.c val > st->soc_info.max_sample_rate) st 1438 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_setup_samp_freq(st, val); st 1448 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1459 drivers/iio/adc/at91-sama5d2_adc.c if (st->dma_st.dma_chan) st 1462 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_chan = dma_request_slave_channel(&pdev->dev, "rx"); st 1464 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) { st 1469 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf = dma_alloc_coherent(st->dma_st.dma_chan->device->dev, st 1471 drivers/iio/adc/at91-sama5d2_adc.c &st->dma_st.rx_dma_buf, st 1473 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.rx_buf) { st 1480 drivers/iio/adc/at91-sama5d2_adc.c config.src_addr = (phys_addr_t)(st->dma_st.phys_addr st 1486 drivers/iio/adc/at91-sama5d2_adc.c if (dmaengine_slave_config(st->dma_st.dma_chan, &config)) { st 1492 drivers/iio/adc/at91-sama5d2_adc.c dma_chan_name(st->dma_st.dma_chan)); st 1497 drivers/iio/adc/at91-sama5d2_adc.c dma_free_coherent(st->dma_st.dma_chan->device->dev, pages * PAGE_SIZE, st 1498 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf, st->dma_st.rx_dma_buf); st 1500 drivers/iio/adc/at91-sama5d2_adc.c dma_release_channel(st->dma_st.dma_chan); st 1501 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_chan = 0; st 1509 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1515 drivers/iio/adc/at91-sama5d2_adc.c if (!st->dma_st.dma_chan) st 1519 drivers/iio/adc/at91-sama5d2_adc.c dmaengine_terminate_sync(st->dma_st.dma_chan); st 1521 drivers/iio/adc/at91-sama5d2_adc.c dma_free_coherent(st->dma_st.dma_chan->device->dev, pages * PAGE_SIZE, st 1522 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.rx_buf, st->dma_st.rx_dma_buf); st 1523 drivers/iio/adc/at91-sama5d2_adc.c dma_release_channel(st->dma_st.dma_chan); st 1524 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.dma_chan = 0; st 1531 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1536 drivers/iio/adc/at91-sama5d2_adc.c if (!st->selected_trig->hw_trig) { st 1542 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.watermark = val; st 1561 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1563 drivers/iio/adc/at91-sama5d2_adc.c if (bitmap_subset(scan_mask, &st->touch_st.channels_bitmask, st 1570 drivers/iio/adc/at91-sama5d2_adc.c if (bitmap_intersects(&st->touch_st.channels_bitmask, scan_mask, st 1576 drivers/iio/adc/at91-sama5d2_adc.c static void at91_adc_hw_init(struct at91_adc_state *st) st 1578 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CR, AT91_SAMA5D2_CR_SWRST); st 1579 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_IDR, 0xffffffff); st 1584 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_MR, st 1587 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_setup_samp_freq(st, st->soc_info.min_sample_rate); st 1590 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_config_emr(st); st 1597 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1599 drivers/iio/adc/at91-sama5d2_adc.c return scnprintf(buf, PAGE_SIZE, "%d\n", !!st->dma_st.dma_chan); st 1606 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1608 drivers/iio/adc/at91-sama5d2_adc.c return scnprintf(buf, PAGE_SIZE, "%d\n", st->dma_st.watermark); st 1653 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st; st 1658 drivers/iio/adc/at91-sama5d2_adc.c indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*st)); st 1669 drivers/iio/adc/at91-sama5d2_adc.c st = iio_priv(indio_dev); st 1671 drivers/iio/adc/at91-sama5d2_adc.c bitmap_set(&st->touch_st.channels_bitmask, st 1673 drivers/iio/adc/at91-sama5d2_adc.c bitmap_set(&st->touch_st.channels_bitmask, st 1675 drivers/iio/adc/at91-sama5d2_adc.c bitmap_set(&st->touch_st.channels_bitmask, st 1678 drivers/iio/adc/at91-sama5d2_adc.c st->oversampling_ratio = AT91_OSR_1SAMPLES; st 1682 drivers/iio/adc/at91-sama5d2_adc.c &st->soc_info.min_sample_rate); st 1691 drivers/iio/adc/at91-sama5d2_adc.c &st->soc_info.max_sample_rate); st 1699 drivers/iio/adc/at91-sama5d2_adc.c &st->soc_info.startup_time); st 1713 drivers/iio/adc/at91-sama5d2_adc.c st->selected_trig = NULL; st 1718 drivers/iio/adc/at91-sama5d2_adc.c st->selected_trig = &at91_adc_trigger_list[i]; st 1722 drivers/iio/adc/at91-sama5d2_adc.c if (!st->selected_trig) { st 1727 drivers/iio/adc/at91-sama5d2_adc.c init_waitqueue_head(&st->wq_data_available); st 1728 drivers/iio/adc/at91-sama5d2_adc.c mutex_init(&st->lock); st 1729 drivers/iio/adc/at91-sama5d2_adc.c INIT_WORK(&st->touch_st.workq, at91_adc_workq_handler); st 1736 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.phys_addr = res->start; st 1738 drivers/iio/adc/at91-sama5d2_adc.c st->base = devm_ioremap_resource(&pdev->dev, res); st 1739 drivers/iio/adc/at91-sama5d2_adc.c if (IS_ERR(st->base)) st 1740 drivers/iio/adc/at91-sama5d2_adc.c return PTR_ERR(st->base); st 1742 drivers/iio/adc/at91-sama5d2_adc.c st->irq = platform_get_irq(pdev, 0); st 1743 drivers/iio/adc/at91-sama5d2_adc.c if (st->irq <= 0) { st 1744 drivers/iio/adc/at91-sama5d2_adc.c if (!st->irq) st 1745 drivers/iio/adc/at91-sama5d2_adc.c st->irq = -ENXIO; st 1747 drivers/iio/adc/at91-sama5d2_adc.c return st->irq; st 1750 drivers/iio/adc/at91-sama5d2_adc.c st->per_clk = devm_clk_get(&pdev->dev, "adc_clk"); st 1751 drivers/iio/adc/at91-sama5d2_adc.c if (IS_ERR(st->per_clk)) st 1752 drivers/iio/adc/at91-sama5d2_adc.c return PTR_ERR(st->per_clk); st 1754 drivers/iio/adc/at91-sama5d2_adc.c st->reg = devm_regulator_get(&pdev->dev, "vddana"); st 1755 drivers/iio/adc/at91-sama5d2_adc.c if (IS_ERR(st->reg)) st 1756 drivers/iio/adc/at91-sama5d2_adc.c return PTR_ERR(st->reg); st 1758 drivers/iio/adc/at91-sama5d2_adc.c st->vref = devm_regulator_get(&pdev->dev, "vref"); st 1759 drivers/iio/adc/at91-sama5d2_adc.c if (IS_ERR(st->vref)) st 1760 drivers/iio/adc/at91-sama5d2_adc.c return PTR_ERR(st->vref); st 1762 drivers/iio/adc/at91-sama5d2_adc.c ret = devm_request_irq(&pdev->dev, st->irq, at91_adc_interrupt, 0, st 1767 drivers/iio/adc/at91-sama5d2_adc.c ret = regulator_enable(st->reg); st 1771 drivers/iio/adc/at91-sama5d2_adc.c ret = regulator_enable(st->vref); st 1775 drivers/iio/adc/at91-sama5d2_adc.c st->vref_uv = regulator_get_voltage(st->vref); st 1776 drivers/iio/adc/at91-sama5d2_adc.c if (st->vref_uv <= 0) { st 1781 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_hw_init(st); st 1783 drivers/iio/adc/at91-sama5d2_adc.c ret = clk_prepare_enable(st->per_clk); st 1795 drivers/iio/adc/at91-sama5d2_adc.c if (st->selected_trig->hw_trig) { st 1805 drivers/iio/adc/at91-sama5d2_adc.c st->dma_st.watermark = 1; st 1818 drivers/iio/adc/at91-sama5d2_adc.c if (st->selected_trig->hw_trig) st 1820 drivers/iio/adc/at91-sama5d2_adc.c st->selected_trig->name); st 1823 drivers/iio/adc/at91-sama5d2_adc.c readl_relaxed(st->base + AT91_SAMA5D2_VERSION)); st 1830 drivers/iio/adc/at91-sama5d2_adc.c clk_disable_unprepare(st->per_clk); st 1832 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->vref); st 1834 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->reg); st 1841 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1847 drivers/iio/adc/at91-sama5d2_adc.c clk_disable_unprepare(st->per_clk); st 1849 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->vref); st 1850 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->reg); st 1858 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1866 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_writel(st, AT91_SAMA5D2_CR, AT91_SAMA5D2_CR_SWRST); st 1868 drivers/iio/adc/at91-sama5d2_adc.c clk_disable_unprepare(st->per_clk); st 1869 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->vref); st 1870 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->reg); st 1878 drivers/iio/adc/at91-sama5d2_adc.c struct at91_adc_state *st = iio_priv(indio_dev); st 1885 drivers/iio/adc/at91-sama5d2_adc.c ret = regulator_enable(st->reg); st 1889 drivers/iio/adc/at91-sama5d2_adc.c ret = regulator_enable(st->vref); st 1893 drivers/iio/adc/at91-sama5d2_adc.c ret = clk_prepare_enable(st->per_clk); st 1897 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_hw_init(st); st 1905 drivers/iio/adc/at91-sama5d2_adc.c &st->touch_st.channels_bitmask, st 1908 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_configure_touch(st, true); st 1910 drivers/iio/adc/at91-sama5d2_adc.c return at91_adc_configure_trigger(st->trig, true); st 1917 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->vref); st 1919 drivers/iio/adc/at91-sama5d2_adc.c regulator_disable(st->reg); st 138 drivers/iio/adc/at91_adc.c #define AT91_ADC_CHAN(st, ch) \ st 139 drivers/iio/adc/at91_adc.c (st->registers->channel_base + (ch * 4)) st 140 drivers/iio/adc/at91_adc.c #define at91_adc_readl(st, reg) \ st 141 drivers/iio/adc/at91_adc.c (readl_relaxed(st->reg_base + reg)) st 142 drivers/iio/adc/at91_adc.c #define at91_adc_writel(st, reg, val) \ st 143 drivers/iio/adc/at91_adc.c (writel_relaxed(val, st->reg_base + reg)) st 249 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 257 drivers/iio/adc/at91_adc.c st->buffer[j] = at91_adc_readl(st, AT91_ADC_CHAN(st, chan->channel)); st 261 drivers/iio/adc/at91_adc.c iio_push_to_buffers_with_timestamp(idev, st->buffer, pf->timestamp); st 266 drivers/iio/adc/at91_adc.c at91_adc_readl(st, AT91_ADC_LCDR); st 268 drivers/iio/adc/at91_adc.c enable_irq(st->irq); st 276 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 282 drivers/iio/adc/at91_adc.c st->last_value = at91_adc_readl(st, AT91_ADC_CHAN(st, st->chnb)); st 284 drivers/iio/adc/at91_adc.c at91_adc_readl(st, AT91_ADC_LCDR); st 285 drivers/iio/adc/at91_adc.c st->done = true; st 286 drivers/iio/adc/at91_adc.c wake_up_interruptible(&st->wq_data_avail); st 290 drivers/iio/adc/at91_adc.c static int at91_ts_sample(struct at91_adc_state *st) st 296 drivers/iio/adc/at91_adc.c struct iio_dev *idev = iio_priv_to_dev(st); st 298 drivers/iio/adc/at91_adc.c unsigned int xyz_mask_bits = st->res; st 303 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_TSXPOSR); st 314 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_TSYPOSR); st 325 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_TSPRESSR); st 333 drivers/iio/adc/at91_adc.c pres = st->ts_pressure_threshold; /* no pen contacted */ st 338 drivers/iio/adc/at91_adc.c if (pres < st->ts_pressure_threshold) { st 341 drivers/iio/adc/at91_adc.c input_report_abs(st->ts_input, ABS_X, x); st 342 drivers/iio/adc/at91_adc.c input_report_abs(st->ts_input, ABS_Y, y); st 343 drivers/iio/adc/at91_adc.c input_report_abs(st->ts_input, ABS_PRESSURE, pres); st 344 drivers/iio/adc/at91_adc.c input_report_key(st->ts_input, BTN_TOUCH, 1); st 345 drivers/iio/adc/at91_adc.c input_sync(st->ts_input); st 356 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 357 drivers/iio/adc/at91_adc.c u32 status = at91_adc_readl(st, st->registers->status_register); st 360 drivers/iio/adc/at91_adc.c status &= at91_adc_readl(st, AT91_ADC_IMR); st 361 drivers/iio/adc/at91_adc.c if (status & GENMASK(st->num_channels - 1, 0)) st 366 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_MR); st 368 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_MR, reg); st 370 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91RL_ADC_IER_PEN); st 371 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91RL_ADC_IER_NOPEN st 374 drivers/iio/adc/at91_adc.c at91_adc_writel(st, st->registers->trigger_register, st 376 drivers/iio/adc/at91_adc.c AT91_ADC_TRGR_TRGPER_(st->ts_sample_period_val)); st 378 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_MR); st 379 drivers/iio/adc/at91_adc.c reg |= AT91_ADC_PENDBC_(st->ts_pendbc) & AT91_ADC_PENDBC; st 380 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_MR, reg); st 381 drivers/iio/adc/at91_adc.c at91_adc_writel(st, st->registers->trigger_register, st 384 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91RL_ADC_IER_NOPEN st 386 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91RL_ADC_IER_PEN); st 387 drivers/iio/adc/at91_adc.c st->ts_bufferedmeasure = false; st 388 drivers/iio/adc/at91_adc.c input_report_key(st->ts_input, BTN_TOUCH, 0); st 389 drivers/iio/adc/at91_adc.c input_sync(st->ts_input); st 390 drivers/iio/adc/at91_adc.c } else if (status & AT91_ADC_EOC(3) && st->ts_input) { st 392 drivers/iio/adc/at91_adc.c if (st->ts_bufferedmeasure) { st 398 drivers/iio/adc/at91_adc.c input_report_abs(st->ts_input, ABS_X, st->ts_prev_absx); st 399 drivers/iio/adc/at91_adc.c input_report_abs(st->ts_input, ABS_Y, st->ts_prev_absy); st 400 drivers/iio/adc/at91_adc.c input_report_key(st->ts_input, BTN_TOUCH, 1); st 401 drivers/iio/adc/at91_adc.c input_sync(st->ts_input); st 403 drivers/iio/adc/at91_adc.c st->ts_bufferedmeasure = true; st 406 drivers/iio/adc/at91_adc.c st->ts_prev_absx = at91_adc_readl(st, AT91_ADC_CHAN(st, 3)) st 408 drivers/iio/adc/at91_adc.c st->ts_prev_absx /= at91_adc_readl(st, AT91_ADC_CHAN(st, 2)); st 410 drivers/iio/adc/at91_adc.c st->ts_prev_absy = at91_adc_readl(st, AT91_ADC_CHAN(st, 1)) st 412 drivers/iio/adc/at91_adc.c st->ts_prev_absy /= at91_adc_readl(st, AT91_ADC_CHAN(st, 0)); st 421 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 422 drivers/iio/adc/at91_adc.c u32 status = at91_adc_readl(st, st->registers->status_register); st 428 drivers/iio/adc/at91_adc.c if (status & GENMASK(st->num_channels - 1, 0)) st 432 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91_ADC_IER_PEN); st 433 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91_ADC_IER_NOPEN | st 436 drivers/iio/adc/at91_adc.c at91_adc_writel(st, st->registers->trigger_register, st 438 drivers/iio/adc/at91_adc.c AT91_ADC_TRGR_TRGPER_(st->ts_sample_period_val)); st 440 drivers/iio/adc/at91_adc.c at91_adc_writel(st, st->registers->trigger_register, 0); st 441 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91_ADC_IER_NOPEN | st 443 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91_ADC_IER_PEN); st 445 drivers/iio/adc/at91_adc.c input_report_key(st->ts_input, BTN_TOUCH, 0); st 446 drivers/iio/adc/at91_adc.c input_sync(st->ts_input); st 452 drivers/iio/adc/at91_adc.c at91_ts_sample(st); st 457 drivers/iio/adc/at91_adc.c at91_adc_readl(st, AT91_ADC_TSXPOSR); st 458 drivers/iio/adc/at91_adc.c at91_adc_readl(st, AT91_ADC_TSYPOSR); st 459 drivers/iio/adc/at91_adc.c at91_adc_readl(st, AT91_ADC_TSPRESSR); st 468 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 474 drivers/iio/adc/at91_adc.c if (st->touchscreen_type == ATMEL_ADC_TOUCHSCREEN_4WIRE) st 476 drivers/iio/adc/at91_adc.c else if (st->touchscreen_type == ATMEL_ADC_TOUCHSCREEN_5WIRE) st 480 drivers/iio/adc/at91_adc.c st->channels_mask &= ~rsvd_mask; st 482 drivers/iio/adc/at91_adc.c idev->num_channels = bitmap_weight(&st->channels_mask, st 483 drivers/iio/adc/at91_adc.c st->num_channels) + 1; st 493 drivers/iio/adc/at91_adc.c for_each_set_bit(bit, &st->channels_mask, st->num_channels) { st 501 drivers/iio/adc/at91_adc.c chan->scan_type.realbits = st->res; st 524 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 527 drivers/iio/adc/at91_adc.c for (i = 0; i < st->trigger_number; i++) { st 552 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 553 drivers/iio/adc/at91_adc.c struct at91_adc_reg_desc *reg = st->registers; st 554 drivers/iio/adc/at91_adc.c u32 status = at91_adc_readl(st, reg->trigger_register); st 559 drivers/iio/adc/at91_adc.c st->trigger_list, st 565 drivers/iio/adc/at91_adc.c st->buffer = kmalloc(idev->scan_bytes, GFP_KERNEL); st 566 drivers/iio/adc/at91_adc.c if (st->buffer == NULL) st 569 drivers/iio/adc/at91_adc.c at91_adc_writel(st, reg->trigger_register, st 573 drivers/iio/adc/at91_adc.c st->num_channels) { st 575 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CHER, st 579 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, reg->drdy_mask); st 582 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, reg->drdy_mask); st 584 drivers/iio/adc/at91_adc.c at91_adc_writel(st, reg->trigger_register, st 588 drivers/iio/adc/at91_adc.c st->num_channels) { st 590 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CHDR, st 593 drivers/iio/adc/at91_adc.c kfree(st->buffer); st 627 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 630 drivers/iio/adc/at91_adc.c st->trig = devm_kcalloc(&idev->dev, st 631 drivers/iio/adc/at91_adc.c st->trigger_number, sizeof(*st->trig), st 634 drivers/iio/adc/at91_adc.c if (st->trig == NULL) { st 639 drivers/iio/adc/at91_adc.c for (i = 0; i < st->trigger_number; i++) { st 640 drivers/iio/adc/at91_adc.c if (st->trigger_list[i].is_external && !(st->use_external)) st 643 drivers/iio/adc/at91_adc.c st->trig[i] = at91_adc_allocate_trigger(idev, st 644 drivers/iio/adc/at91_adc.c st->trigger_list + i); st 645 drivers/iio/adc/at91_adc.c if (st->trig[i] == NULL) { st 657 drivers/iio/adc/at91_adc.c iio_trigger_unregister(st->trig[i]); st 658 drivers/iio/adc/at91_adc.c iio_trigger_free(st->trig[i]); st 666 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 669 drivers/iio/adc/at91_adc.c for (i = 0; i < st->trigger_number; i++) { st 670 drivers/iio/adc/at91_adc.c iio_trigger_unregister(st->trig[i]); st 671 drivers/iio/adc/at91_adc.c iio_trigger_free(st->trig[i]); st 690 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 695 drivers/iio/adc/at91_adc.c mutex_lock(&st->lock); st 697 drivers/iio/adc/at91_adc.c st->chnb = chan->channel; st 698 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CHER, st 700 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, BIT(chan->channel)); st 701 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CR, AT91_ADC_START); st 703 drivers/iio/adc/at91_adc.c ret = wait_event_interruptible_timeout(st->wq_data_avail, st 704 drivers/iio/adc/at91_adc.c st->done, st 710 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CHDR, st 712 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel)); st 716 drivers/iio/adc/at91_adc.c *val = st->last_value; st 717 drivers/iio/adc/at91_adc.c st->last_value = 0; st 718 drivers/iio/adc/at91_adc.c st->done = false; st 727 drivers/iio/adc/at91_adc.c mutex_unlock(&st->lock); st 731 drivers/iio/adc/at91_adc.c *val = st->vref_mv; st 740 drivers/iio/adc/at91_adc.c static int at91_adc_of_get_resolution(struct at91_adc_state *st, st 743 drivers/iio/adc/at91_adc.c struct iio_dev *idev = iio_priv_to_dev(st); st 776 drivers/iio/adc/at91_adc.c st->res = resolutions[i]; st 778 drivers/iio/adc/at91_adc.c st->low_res = true; st 780 drivers/iio/adc/at91_adc.c st->low_res = false; st 782 drivers/iio/adc/at91_adc.c dev_info(&idev->dev, "Resolution used: %u bits\n", st->res); st 835 drivers/iio/adc/at91_adc.c struct at91_adc_state *st, struct device *dev) st 849 drivers/iio/adc/at91_adc.c st->touchscreen_type = prop; st 856 drivers/iio/adc/at91_adc.c if (!st->caps->has_tsmr) st 860 drivers/iio/adc/at91_adc.c st->ts_pressure_threshold = prop; st 861 drivers/iio/adc/at91_adc.c if (st->ts_pressure_threshold) { st 869 drivers/iio/adc/at91_adc.c static int at91_adc_probe_dt(struct at91_adc_state *st, st 872 drivers/iio/adc/at91_adc.c struct iio_dev *idev = iio_priv_to_dev(st); st 881 drivers/iio/adc/at91_adc.c st->caps = (struct at91_adc_caps *) st 884 drivers/iio/adc/at91_adc.c st->use_external = of_property_read_bool(node, "atmel,adc-use-external-triggers"); st 891 drivers/iio/adc/at91_adc.c st->channels_mask = prop; st 893 drivers/iio/adc/at91_adc.c st->sleep_mode = of_property_read_bool(node, "atmel,adc-sleep-mode"); st 900 drivers/iio/adc/at91_adc.c st->startup_time = prop; st 904 drivers/iio/adc/at91_adc.c st->sample_hold_time = prop; st 911 drivers/iio/adc/at91_adc.c st->vref_mv = prop; st 913 drivers/iio/adc/at91_adc.c ret = at91_adc_of_get_resolution(st, pdev); st 917 drivers/iio/adc/at91_adc.c st->registers = &st->caps->registers; st 918 drivers/iio/adc/at91_adc.c st->num_channels = st->caps->num_channels; st 919 drivers/iio/adc/at91_adc.c st->trigger_number = of_get_child_count(node); st 920 drivers/iio/adc/at91_adc.c st->trigger_list = devm_kcalloc(&idev->dev, st 921 drivers/iio/adc/at91_adc.c st->trigger_number, st 924 drivers/iio/adc/at91_adc.c if (!st->trigger_list) { st 931 drivers/iio/adc/at91_adc.c struct at91_adc_trigger *trig = st->trigger_list + i; st 952 drivers/iio/adc/at91_adc.c if (st->caps->has_ts) st 953 drivers/iio/adc/at91_adc.c return at91_adc_probe_dt_ts(node, st, &idev->dev); st 963 drivers/iio/adc/at91_adc.c static int at91_adc_probe_pdata(struct at91_adc_state *st, st 971 drivers/iio/adc/at91_adc.c st->caps = (struct at91_adc_caps *) st 974 drivers/iio/adc/at91_adc.c st->use_external = pdata->use_external_triggers; st 975 drivers/iio/adc/at91_adc.c st->vref_mv = pdata->vref; st 976 drivers/iio/adc/at91_adc.c st->channels_mask = pdata->channels_used; st 977 drivers/iio/adc/at91_adc.c st->num_channels = st->caps->num_channels; st 978 drivers/iio/adc/at91_adc.c st->startup_time = pdata->startup_time; st 979 drivers/iio/adc/at91_adc.c st->trigger_number = pdata->trigger_number; st 980 drivers/iio/adc/at91_adc.c st->trigger_list = pdata->trigger_list; st 981 drivers/iio/adc/at91_adc.c st->registers = &st->caps->registers; st 982 drivers/iio/adc/at91_adc.c st->touchscreen_type = pdata->touchscreen_type; st 994 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = input_get_drvdata(dev); st 996 drivers/iio/adc/at91_adc.c if (st->caps->has_tsmr) st 997 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91_ADC_IER_PEN); st 999 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IER, AT91RL_ADC_IER_PEN); st 1005 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = input_get_drvdata(dev); st 1007 drivers/iio/adc/at91_adc.c if (st->caps->has_tsmr) st 1008 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91_ADC_IER_PEN); st 1010 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, AT91RL_ADC_IER_PEN); st 1013 drivers/iio/adc/at91_adc.c static int at91_ts_hw_init(struct at91_adc_state *st, u32 adc_clk_khz) st 1015 drivers/iio/adc/at91_adc.c struct iio_dev *idev = iio_priv_to_dev(st); st 1024 drivers/iio/adc/at91_adc.c st->ts_pendbc = round_up(TOUCH_PEN_DETECT_DEBOUNCE_US * adc_clk_khz / st 1027 drivers/iio/adc/at91_adc.c while (st->ts_pendbc >> ++i) st 1029 drivers/iio/adc/at91_adc.c if (abs(st->ts_pendbc - (1 << i)) < abs(st->ts_pendbc - (1 << (i - 1)))) st 1030 drivers/iio/adc/at91_adc.c st->ts_pendbc = i; st 1032 drivers/iio/adc/at91_adc.c st->ts_pendbc = i - 1; st 1034 drivers/iio/adc/at91_adc.c if (!st->caps->has_tsmr) { st 1035 drivers/iio/adc/at91_adc.c reg = at91_adc_readl(st, AT91_ADC_MR); st 1038 drivers/iio/adc/at91_adc.c reg |= AT91_ADC_PENDBC_(st->ts_pendbc) & AT91_ADC_PENDBC; st 1039 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_MR, reg); st 1042 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_TSR, reg); st 1044 drivers/iio/adc/at91_adc.c st->ts_sample_period_val = round_up((TOUCH_SAMPLE_PERIOD_US_RL * st 1058 drivers/iio/adc/at91_adc.c if (st->touchscreen_type == ATMEL_ADC_TOUCHSCREEN_4WIRE) st 1064 drivers/iio/adc/at91_adc.c reg |= AT91_ADC_TSMR_TSAV_(st->caps->ts_filter_average) st 1066 drivers/iio/adc/at91_adc.c reg |= AT91_ADC_TSMR_PENDBC_(st->ts_pendbc) & AT91_ADC_TSMR_PENDBC; st 1071 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_TSMR, reg); st 1078 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_ACR, st->caps->ts_pen_detect_sensitivity st 1082 drivers/iio/adc/at91_adc.c st->ts_sample_period_val = round_up((TOUCH_SAMPLE_PERIOD_US * st 1088 drivers/iio/adc/at91_adc.c static int at91_ts_register(struct at91_adc_state *st, st 1092 drivers/iio/adc/at91_adc.c struct iio_dev *idev = iio_priv_to_dev(st); st 1110 drivers/iio/adc/at91_adc.c if (st->caps->has_tsmr) { st 1117 drivers/iio/adc/at91_adc.c if (st->touchscreen_type != ATMEL_ADC_TOUCHSCREEN_4WIRE) { st 1130 drivers/iio/adc/at91_adc.c st->ts_input = input; st 1131 drivers/iio/adc/at91_adc.c input_set_drvdata(input, st); st 1140 drivers/iio/adc/at91_adc.c input_free_device(st->ts_input); st 1144 drivers/iio/adc/at91_adc.c static void at91_ts_unregister(struct at91_adc_state *st) st 1146 drivers/iio/adc/at91_adc.c input_unregister_device(st->ts_input); st 1154 drivers/iio/adc/at91_adc.c struct at91_adc_state *st; st 1162 drivers/iio/adc/at91_adc.c st = iio_priv(idev); st 1165 drivers/iio/adc/at91_adc.c ret = at91_adc_probe_dt(st, pdev); st 1167 drivers/iio/adc/at91_adc.c ret = at91_adc_probe_pdata(st, pdev); st 1181 drivers/iio/adc/at91_adc.c st->irq = platform_get_irq(pdev, 0); st 1182 drivers/iio/adc/at91_adc.c if (st->irq < 0) st 1187 drivers/iio/adc/at91_adc.c st->reg_base = devm_ioremap_resource(&pdev->dev, res); st 1188 drivers/iio/adc/at91_adc.c if (IS_ERR(st->reg_base)) st 1189 drivers/iio/adc/at91_adc.c return PTR_ERR(st->reg_base); st 1195 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_CR, AT91_ADC_SWRST); st 1196 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_IDR, 0xFFFFFFFF); st 1198 drivers/iio/adc/at91_adc.c if (st->caps->has_tsmr) st 1199 drivers/iio/adc/at91_adc.c ret = request_irq(st->irq, at91_adc_9x5_interrupt, 0, st 1202 drivers/iio/adc/at91_adc.c ret = request_irq(st->irq, at91_adc_rl_interrupt, 0, st 1209 drivers/iio/adc/at91_adc.c st->clk = devm_clk_get(&pdev->dev, "adc_clk"); st 1210 drivers/iio/adc/at91_adc.c if (IS_ERR(st->clk)) { st 1212 drivers/iio/adc/at91_adc.c ret = PTR_ERR(st->clk); st 1216 drivers/iio/adc/at91_adc.c ret = clk_prepare_enable(st->clk); st 1223 drivers/iio/adc/at91_adc.c st->adc_clk = devm_clk_get(&pdev->dev, "adc_op_clk"); st 1224 drivers/iio/adc/at91_adc.c if (IS_ERR(st->adc_clk)) { st 1226 drivers/iio/adc/at91_adc.c ret = PTR_ERR(st->adc_clk); st 1230 drivers/iio/adc/at91_adc.c ret = clk_prepare_enable(st->adc_clk); st 1242 drivers/iio/adc/at91_adc.c mstrclk = clk_get_rate(st->clk); st 1243 drivers/iio/adc/at91_adc.c adc_clk = clk_get_rate(st->adc_clk); st 1251 drivers/iio/adc/at91_adc.c if (!st->startup_time) { st 1256 drivers/iio/adc/at91_adc.c ticks = (*st->caps->calc_startup_ticks)(st->startup_time, adc_clk_khz); st 1263 drivers/iio/adc/at91_adc.c if (st->sample_hold_time > 0) st 1264 drivers/iio/adc/at91_adc.c shtim = round_up((st->sample_hold_time * adc_clk_khz / 1000) st 1269 drivers/iio/adc/at91_adc.c reg = AT91_ADC_PRESCAL_(prsc) & st->registers->mr_prescal_mask; st 1270 drivers/iio/adc/at91_adc.c reg |= AT91_ADC_STARTUP_(ticks) & st->registers->mr_startup_mask; st 1271 drivers/iio/adc/at91_adc.c if (st->low_res) st 1273 drivers/iio/adc/at91_adc.c if (st->sleep_mode) st 1276 drivers/iio/adc/at91_adc.c at91_adc_writel(st, AT91_ADC_MR, reg); st 1285 drivers/iio/adc/at91_adc.c init_waitqueue_head(&st->wq_data_avail); st 1286 drivers/iio/adc/at91_adc.c mutex_init(&st->lock); st 1293 drivers/iio/adc/at91_adc.c if (!st->touchscreen_type) { st 1307 drivers/iio/adc/at91_adc.c ret = at91_ts_register(st, pdev); st 1311 drivers/iio/adc/at91_adc.c at91_ts_hw_init(st, adc_clk_khz); st 1323 drivers/iio/adc/at91_adc.c if (!st->touchscreen_type) { st 1327 drivers/iio/adc/at91_adc.c at91_ts_unregister(st); st 1330 drivers/iio/adc/at91_adc.c clk_disable_unprepare(st->adc_clk); st 1332 drivers/iio/adc/at91_adc.c clk_disable_unprepare(st->clk); st 1334 drivers/iio/adc/at91_adc.c free_irq(st->irq, idev); st 1341 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 1344 drivers/iio/adc/at91_adc.c if (!st->touchscreen_type) { st 1348 drivers/iio/adc/at91_adc.c at91_ts_unregister(st); st 1350 drivers/iio/adc/at91_adc.c clk_disable_unprepare(st->adc_clk); st 1351 drivers/iio/adc/at91_adc.c clk_disable_unprepare(st->clk); st 1352 drivers/iio/adc/at91_adc.c free_irq(st->irq, idev); st 1361 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 1364 drivers/iio/adc/at91_adc.c clk_disable_unprepare(st->clk); st 1372 drivers/iio/adc/at91_adc.c struct at91_adc_state *st = iio_priv(idev); st 1374 drivers/iio/adc/at91_adc.c clk_prepare_enable(st->clk); st 61 drivers/iio/adc/lpc32xx_adc.c struct lpc32xx_adc_state *st = iio_priv(indio_dev); st 67 drivers/iio/adc/lpc32xx_adc.c ret = clk_prepare_enable(st->clk); st 75 drivers/iio/adc/lpc32xx_adc.c LPC32XXAD_SELECT(st->adc_base)); st 78 drivers/iio/adc/lpc32xx_adc.c LPC32XXAD_CTRL(st->adc_base)); st 79 drivers/iio/adc/lpc32xx_adc.c wait_for_completion(&st->completion); /* set by ISR */ st 80 drivers/iio/adc/lpc32xx_adc.c clk_disable_unprepare(st->clk); st 81 drivers/iio/adc/lpc32xx_adc.c *val = st->value; st 87 drivers/iio/adc/lpc32xx_adc.c *val = regulator_get_voltage(st->vref) / 1000; st 131 drivers/iio/adc/lpc32xx_adc.c struct lpc32xx_adc_state *st = dev_id; st 134 drivers/iio/adc/lpc32xx_adc.c st->value = __raw_readl(LPC32XXAD_VALUE(st->adc_base)) & st 136 drivers/iio/adc/lpc32xx_adc.c complete(&st->completion); st 143 drivers/iio/adc/lpc32xx_adc.c struct lpc32xx_adc_state *st = NULL; st 155 drivers/iio/adc/lpc32xx_adc.c iodev = devm_iio_device_alloc(&pdev->dev, sizeof(*st)); st 159 drivers/iio/adc/lpc32xx_adc.c st = iio_priv(iodev); st 161 drivers/iio/adc/lpc32xx_adc.c st->adc_base = devm_ioremap(&pdev->dev, res->start, st 163 drivers/iio/adc/lpc32xx_adc.c if (!st->adc_base) { st 168 drivers/iio/adc/lpc32xx_adc.c st->clk = devm_clk_get(&pdev->dev, NULL); st 169 drivers/iio/adc/lpc32xx_adc.c if (IS_ERR(st->clk)) { st 171 drivers/iio/adc/lpc32xx_adc.c return PTR_ERR(st->clk); st 179 drivers/iio/adc/lpc32xx_adc.c LPC32XXAD_NAME, st); st 185 drivers/iio/adc/lpc32xx_adc.c st->vref = devm_regulator_get(&pdev->dev, "vref"); st 186 drivers/iio/adc/lpc32xx_adc.c if (IS_ERR(st->vref)) { st 196 drivers/iio/adc/lpc32xx_adc.c init_completion(&st->completion); st 38 drivers/iio/adc/ltc2497.c static int ltc2497_wait_conv(struct ltc2497_st *st) st 42 drivers/iio/adc/ltc2497.c time_elapsed = ktime_ms_delta(ktime_get(), st->time_prev); st 65 drivers/iio/adc/ltc2497.c static int ltc2497_read(struct ltc2497_st *st, u8 address, int *val) st 67 drivers/iio/adc/ltc2497.c struct i2c_client *client = st->client; st 70 drivers/iio/adc/ltc2497.c ret = ltc2497_wait_conv(st); st 74 drivers/iio/adc/ltc2497.c if (ret || st->addr_prev != address) { st 75 drivers/iio/adc/ltc2497.c ret = i2c_smbus_write_byte(st->client, st 79 drivers/iio/adc/ltc2497.c st->addr_prev = address; st 83 drivers/iio/adc/ltc2497.c ret = i2c_master_recv(client, (char *)&st->buf, 3); st 88 drivers/iio/adc/ltc2497.c st->time_prev = ktime_get(); st 93 drivers/iio/adc/ltc2497.c *val = (be32_to_cpu(st->buf) >> 14) - (1 << 17); st 102 drivers/iio/adc/ltc2497.c struct ltc2497_st *st = iio_priv(indio_dev); st 108 drivers/iio/adc/ltc2497.c ret = ltc2497_read(st, chan->address, val); st 116 drivers/iio/adc/ltc2497.c ret = regulator_get_voltage(st->ref); st 194 drivers/iio/adc/ltc2497.c struct ltc2497_st *st; st 202 drivers/iio/adc/ltc2497.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 206 drivers/iio/adc/ltc2497.c st = iio_priv(indio_dev); st 208 drivers/iio/adc/ltc2497.c st->client = client; st 217 drivers/iio/adc/ltc2497.c st->ref = devm_regulator_get(&client->dev, "vref"); st 218 drivers/iio/adc/ltc2497.c if (IS_ERR(st->ref)) st 219 drivers/iio/adc/ltc2497.c return PTR_ERR(st->ref); st 221 drivers/iio/adc/ltc2497.c ret = regulator_enable(st->ref); st 234 drivers/iio/adc/ltc2497.c ret = i2c_smbus_write_byte(st->client, LTC2497_CONFIG_DEFAULT); st 238 drivers/iio/adc/ltc2497.c st->addr_prev = LTC2497_CONFIG_DEFAULT; st 239 drivers/iio/adc/ltc2497.c st->time_prev = ktime_get(); st 251 drivers/iio/adc/ltc2497.c regulator_disable(st->ref); st 259 drivers/iio/adc/ltc2497.c struct ltc2497_st *st = iio_priv(indio_dev); st 263 drivers/iio/adc/ltc2497.c regulator_disable(st->ref); st 220 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 228 drivers/iio/adc/max1027.c st->reg = MAX1027_SETUP_REG | MAX1027_REF_MODE2 | MAX1027_CKS_MODE2; st 229 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 237 drivers/iio/adc/max1027.c st->reg = MAX1027_CONV_REG | MAX1027_CHAN(chan->channel) | st 240 drivers/iio/adc/max1027.c st->reg |= MAX1027_TEMP; st 241 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 256 drivers/iio/adc/max1027.c ret = spi_read(st->spi, st->buffer, (chan->type == IIO_TEMP) ? 4 : 2); st 260 drivers/iio/adc/max1027.c *val = be16_to_cpu(st->buffer[0]); st 270 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 272 drivers/iio/adc/max1027.c mutex_lock(&st->lock); st 300 drivers/iio/adc/max1027.c mutex_unlock(&st->lock); st 309 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 310 drivers/iio/adc/max1027.c u8 *val = (u8 *)st->buffer; st 316 drivers/iio/adc/max1027.c return spi_write(st->spi, val, 1); st 322 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 324 drivers/iio/adc/max1027.c if (st->trig != trig) st 333 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 338 drivers/iio/adc/max1027.c st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE0 | st 340 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 345 drivers/iio/adc/max1027.c st->reg = MAX1027_CONV_REG | MAX1027_CHAN(0) | st 347 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 352 drivers/iio/adc/max1027.c st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE2 | st 354 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 366 drivers/iio/adc/max1027.c struct max1027_state *st = iio_priv(indio_dev); st 371 drivers/iio/adc/max1027.c spi_read(st->spi, st->buffer, indio_dev->masklength * 2); st 373 drivers/iio/adc/max1027.c iio_push_to_buffers(indio_dev, st->buffer); st 395 drivers/iio/adc/max1027.c struct max1027_state *st; st 399 drivers/iio/adc/max1027.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 407 drivers/iio/adc/max1027.c st = iio_priv(indio_dev); st 408 drivers/iio/adc/max1027.c st->spi = spi; st 409 drivers/iio/adc/max1027.c st->info = &max1027_chip_info_tbl[spi_get_device_id(spi)->driver_data]; st 411 drivers/iio/adc/max1027.c mutex_init(&st->lock); st 418 drivers/iio/adc/max1027.c indio_dev->channels = st->info->channels; st 419 drivers/iio/adc/max1027.c indio_dev->num_channels = st->info->num_channels; st 420 drivers/iio/adc/max1027.c indio_dev->available_scan_masks = st->info->available_scan_masks; st 422 drivers/iio/adc/max1027.c st->buffer = devm_kmalloc_array(&indio_dev->dev, st 425 drivers/iio/adc/max1027.c if (st->buffer == NULL) { st 438 drivers/iio/adc/max1027.c st->trig = devm_iio_trigger_alloc(&spi->dev, "%s-trigger", st 440 drivers/iio/adc/max1027.c if (st->trig == NULL) { st 446 drivers/iio/adc/max1027.c st->trig->ops = &max1027_trigger_ops; st 447 drivers/iio/adc/max1027.c st->trig->dev.parent = &spi->dev; st 448 drivers/iio/adc/max1027.c iio_trigger_set_drvdata(st->trig, indio_dev); st 449 drivers/iio/adc/max1027.c iio_trigger_register(st->trig); st 455 drivers/iio/adc/max1027.c spi->dev.driver->name, st->trig); st 462 drivers/iio/adc/max1027.c st->reg = MAX1027_RST_REG; st 463 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 470 drivers/iio/adc/max1027.c st->reg = MAX1027_AVG_REG; st 471 drivers/iio/adc/max1027.c ret = spi_write(st->spi, &st->reg, 1); st 339 drivers/iio/adc/max1363.c static int max1363_write_basic_config(struct max1363_state *st) st 341 drivers/iio/adc/max1363.c u8 tx_buf[2] = { st->setupbyte, st->configbyte }; st 343 drivers/iio/adc/max1363.c return st->send(st->client, tx_buf, 2); st 346 drivers/iio/adc/max1363.c static int max1363_set_scan_mode(struct max1363_state *st) st 348 drivers/iio/adc/max1363.c st->configbyte &= ~(MAX1363_CHANNEL_SEL_MASK st 351 drivers/iio/adc/max1363.c st->configbyte |= st->current_mode->conf; st 353 drivers/iio/adc/max1363.c return max1363_write_basic_config(st); st 364 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 365 drivers/iio/adc/max1363.c struct i2c_client *client = st->client; st 375 drivers/iio/adc/max1363.c if (st->monitor_on || iio_buffer_enabled(indio_dev)) { st 381 drivers/iio/adc/max1363.c if (st->current_mode != &max1363_mode_table[chan->address]) { st 383 drivers/iio/adc/max1363.c st->current_mode = &max1363_mode_table[chan->address]; st 384 drivers/iio/adc/max1363.c ret = max1363_set_scan_mode(st); st 388 drivers/iio/adc/max1363.c if (st->chip_info->bits != 8) { st 390 drivers/iio/adc/max1363.c data = st->recv(client, rxbuf, 2); st 396 drivers/iio/adc/max1363.c ((1 << st->chip_info->bits) - 1); st 399 drivers/iio/adc/max1363.c data = st->recv(client, rxbuf, 1); st 419 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 429 drivers/iio/adc/max1363.c *val = st->vref_uv / 1000; st 430 drivers/iio/adc/max1363.c *val2 = st->chip_info->bits; st 682 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(dev_to_iio_dev(dev)); st 683 drivers/iio/adc/max1363.c return sprintf(buf, "%d\n", max1363_monitor_speeds[st->monitor_speed]); st 692 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 709 drivers/iio/adc/max1363.c st->monitor_speed = i; st 727 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 729 drivers/iio/adc/max1363.c *val = st->thresh_low[chan->channel]; st 731 drivers/iio/adc/max1363.c *val = st->thresh_high[chan->channel]; st 740 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 742 drivers/iio/adc/max1363.c switch (st->chip_info->bits) { st 755 drivers/iio/adc/max1363.c st->thresh_low[chan->channel] = val; st 758 drivers/iio/adc/max1363.c st->thresh_high[chan->channel] = val; st 789 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 793 drivers/iio/adc/max1363.c u8 tx[2] = { st->setupbyte, st 794 drivers/iio/adc/max1363.c MAX1363_MON_INT_ENABLE | (st->monitor_speed << 1) | 0xF0 }; st 796 drivers/iio/adc/max1363.c st->recv(st->client, &rx, 1); st 800 drivers/iio/adc/max1363.c st->send(st->client, tx, 2); st 809 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 815 drivers/iio/adc/max1363.c val = (1 << number) & st->mask_low; st 817 drivers/iio/adc/max1363.c val = (1 << number) & st->mask_high; st 823 drivers/iio/adc/max1363.c static int max1363_monitor_mode_update(struct max1363_state *st, int enabled) st 833 drivers/iio/adc/max1363.c st->setupbyte &= ~MAX1363_SETUP_MONITOR_SETUP; st 834 drivers/iio/adc/max1363.c st->configbyte &= ~MAX1363_SCAN_MASK; st 835 drivers/iio/adc/max1363.c st->monitor_on = false; st 836 drivers/iio/adc/max1363.c return max1363_write_basic_config(st); st 840 drivers/iio/adc/max1363.c st->setupbyte |= MAX1363_SETUP_MONITOR_SETUP; st 841 drivers/iio/adc/max1363.c st->configbyte &= ~(MAX1363_CHANNEL_SEL_MASK st 844 drivers/iio/adc/max1363.c st->configbyte |= MAX1363_CONFIG_SCAN_MONITOR_MODE; st 845 drivers/iio/adc/max1363.c if ((st->mask_low | st->mask_high) & 0x0F) { st 846 drivers/iio/adc/max1363.c st->configbyte |= max1363_mode_table[s0to3].conf; st 848 drivers/iio/adc/max1363.c } else if ((st->mask_low | st->mask_high) & 0x30) { st 849 drivers/iio/adc/max1363.c st->configbyte |= max1363_mode_table[d0m1to2m3].conf; st 852 drivers/iio/adc/max1363.c st->configbyte |= max1363_mode_table[d1m0to3m2].conf; st 862 drivers/iio/adc/max1363.c tx_buf[0] = st->configbyte; st 863 drivers/iio/adc/max1363.c tx_buf[1] = st->setupbyte; st 864 drivers/iio/adc/max1363.c tx_buf[2] = (st->monitor_speed << 1); st 873 drivers/iio/adc/max1363.c if (st->mask_low & (1 << j)) { st 874 drivers/iio/adc/max1363.c tx_buf[i] = (st->thresh_low[j] >> 4) & 0xFF; st 875 drivers/iio/adc/max1363.c tx_buf[i + 1] = (st->thresh_low[j] << 4) & 0xF0; st 883 drivers/iio/adc/max1363.c if (st->mask_high & (1 << j)) { st 885 drivers/iio/adc/max1363.c (st->thresh_high[j] >> 8) & 0x0F; st 886 drivers/iio/adc/max1363.c tx_buf[i + 2] = st->thresh_high[j] & 0xFF; st 898 drivers/iio/adc/max1363.c ret = st->send(st->client, tx_buf, len); st 913 drivers/iio/adc/max1363.c tx_buf[0] = st->setupbyte; st 914 drivers/iio/adc/max1363.c tx_buf[1] = MAX1363_MON_INT_ENABLE | (st->monitor_speed << 1) | 0xF0; st 915 drivers/iio/adc/max1363.c ret = st->send(st->client, tx_buf, 2); st 923 drivers/iio/adc/max1363.c st->monitor_on = true; st 961 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 966 drivers/iio/adc/max1363.c unifiedmask = st->mask_low | st->mask_high; st 970 drivers/iio/adc/max1363.c st->mask_low &= ~(1 << number); st 976 drivers/iio/adc/max1363.c st->mask_low |= (1 << number); st 980 drivers/iio/adc/max1363.c st->mask_high &= ~(1 << number); st 986 drivers/iio/adc/max1363.c st->mask_high |= (1 << number); st 990 drivers/iio/adc/max1363.c max1363_monitor_mode_update(st, !!(st->mask_high | st->mask_low)); st 1014 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 1020 drivers/iio/adc/max1363.c st->current_mode = max1363_match_mode(scan_mask, st->chip_info); st 1021 drivers/iio/adc/max1363.c if (!st->current_mode) st 1023 drivers/iio/adc/max1363.c max1363_set_scan_mode(st); st 1426 drivers/iio/adc/max1363.c static int max1363_initial_setup(struct max1363_state *st) st 1428 drivers/iio/adc/max1363.c st->setupbyte = MAX1363_SETUP_INT_CLOCK st 1432 drivers/iio/adc/max1363.c if (st->vref) st 1433 drivers/iio/adc/max1363.c st->setupbyte |= MAX1363_SETUP_AIN3_IS_REF_EXT_TO_REF; st 1435 drivers/iio/adc/max1363.c st->setupbyte |= MAX1363_SETUP_POWER_UP_INT_REF st 1439 drivers/iio/adc/max1363.c st->setupbyte = MAX1363_SETUP_BYTE(st->setupbyte); st 1440 drivers/iio/adc/max1363.c st->current_mode = &max1363_mode_table[st->chip_info->default_mode]; st 1441 drivers/iio/adc/max1363.c st->configbyte = MAX1363_CONFIG_BYTE(st->configbyte); st 1443 drivers/iio/adc/max1363.c return max1363_set_scan_mode(st); st 1448 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 1455 drivers/iio/adc/max1363.c st->chip_info->num_modes + 1), st 1460 drivers/iio/adc/max1363.c for (i = 0; i < st->chip_info->num_modes; i++) st 1462 drivers/iio/adc/max1363.c max1363_mode_table[st->chip_info->mode_list[i]] st 1474 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 1478 drivers/iio/adc/max1363.c unsigned long numvals = bitmap_weight(st->current_mode->modemask, st 1482 drivers/iio/adc/max1363.c if (st->chip_info->bits != 8) st 1501 drivers/iio/adc/max1363.c if (st->chip_info->bits != 8) st 1502 drivers/iio/adc/max1363.c b_sent = st->recv(st->client, rxbuf, numvals * 2); st 1504 drivers/iio/adc/max1363.c b_sent = st->recv(st->client, rxbuf, numvals); st 1574 drivers/iio/adc/max1363.c struct max1363_state *st; st 1588 drivers/iio/adc/max1363.c st = iio_priv(indio_dev); st 1590 drivers/iio/adc/max1363.c st->reg = devm_regulator_get(&client->dev, "vcc"); st 1591 drivers/iio/adc/max1363.c if (IS_ERR(st->reg)) { st 1592 drivers/iio/adc/max1363.c ret = PTR_ERR(st->reg); st 1596 drivers/iio/adc/max1363.c ret = regulator_enable(st->reg); st 1603 drivers/iio/adc/max1363.c st->chip_info = of_device_get_match_data(&client->dev); st 1604 drivers/iio/adc/max1363.c if (!st->chip_info) st 1605 drivers/iio/adc/max1363.c st->chip_info = &max1363_chip_info_tbl[id->driver_data]; st 1606 drivers/iio/adc/max1363.c st->client = client; st 1608 drivers/iio/adc/max1363.c st->vref_uv = st->chip_info->int_vref_mv * 1000; st 1616 drivers/iio/adc/max1363.c st->vref = vref; st 1622 drivers/iio/adc/max1363.c st->vref_uv = vref_uv; st 1626 drivers/iio/adc/max1363.c st->send = i2c_master_send; st 1627 drivers/iio/adc/max1363.c st->recv = i2c_master_recv; st 1629 drivers/iio/adc/max1363.c && st->chip_info->bits == 8) { st 1630 drivers/iio/adc/max1363.c st->send = max1363_smbus_send; st 1631 drivers/iio/adc/max1363.c st->recv = max1363_smbus_recv; st 1645 drivers/iio/adc/max1363.c indio_dev->channels = st->chip_info->channels; st 1646 drivers/iio/adc/max1363.c indio_dev->num_channels = st->chip_info->num_channels; st 1647 drivers/iio/adc/max1363.c indio_dev->info = st->chip_info->info; st 1649 drivers/iio/adc/max1363.c ret = max1363_initial_setup(st); st 1659 drivers/iio/adc/max1363.c ret = devm_request_threaded_irq(&client->dev, st->client->irq, st 1679 drivers/iio/adc/max1363.c if (st->vref) st 1680 drivers/iio/adc/max1363.c regulator_disable(st->vref); st 1681 drivers/iio/adc/max1363.c regulator_disable(st->reg); st 1690 drivers/iio/adc/max1363.c struct max1363_state *st = iio_priv(indio_dev); st 1694 drivers/iio/adc/max1363.c if (st->vref) st 1695 drivers/iio/adc/max1363.c regulator_disable(st->vref); st 1696 drivers/iio/adc/max1363.c regulator_disable(st->reg); st 440 drivers/iio/adc/mxs-lradc-adc.c const u32 st = state ? STMP_OFFSET_REG_SET : STMP_OFFSET_REG_CLR; st 442 drivers/iio/adc/mxs-lradc-adc.c writel(LRADC_DELAY_KICK, adc->base + (LRADC_DELAY(0) + st)); st 84 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(dev_to_iio_dev(dev)); st 87 drivers/iio/adc/nau7802.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 89 drivers/iio/adc/nau7802.c st->scale_avail[i]); st 111 drivers/iio/adc/nau7802.c static int nau7802_set_gain(struct nau7802_state *st, int gain) st 115 drivers/iio/adc/nau7802.c mutex_lock(&st->lock); st 116 drivers/iio/adc/nau7802.c st->conversion_count = 0; st 118 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_CTRL1); st 121 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_CTRL1, st 126 drivers/iio/adc/nau7802.c mutex_unlock(&st->lock); st 131 drivers/iio/adc/nau7802.c static int nau7802_read_conversion(struct nau7802_state *st) st 135 drivers/iio/adc/nau7802.c mutex_lock(&st->data_lock); st 136 drivers/iio/adc/nau7802.c data = i2c_smbus_read_byte_data(st->client, NAU7802_REG_ADC_B2); st 139 drivers/iio/adc/nau7802.c st->last_value = data << 16; st 141 drivers/iio/adc/nau7802.c data = i2c_smbus_read_byte_data(st->client, NAU7802_REG_ADC_B1); st 144 drivers/iio/adc/nau7802.c st->last_value |= data << 8; st 146 drivers/iio/adc/nau7802.c data = i2c_smbus_read_byte_data(st->client, NAU7802_REG_ADC_B0); st 149 drivers/iio/adc/nau7802.c st->last_value |= data; st 151 drivers/iio/adc/nau7802.c st->last_value = sign_extend32(st->last_value, 23); st 154 drivers/iio/adc/nau7802.c mutex_unlock(&st->data_lock); st 162 drivers/iio/adc/nau7802.c static int nau7802_sync(struct nau7802_state *st) st 166 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_PUCTRL); st 169 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_PUCTRL, st 178 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 181 drivers/iio/adc/nau7802.c status = i2c_smbus_read_byte_data(st->client, NAU7802_REG_PUCTRL); st 188 drivers/iio/adc/nau7802.c if (nau7802_read_conversion(st) < 0) st 196 drivers/iio/adc/nau7802.c if (st->conversion_count < NAU7802_MIN_CONVERSIONS) st 197 drivers/iio/adc/nau7802.c st->conversion_count++; st 198 drivers/iio/adc/nau7802.c if (st->conversion_count >= NAU7802_MIN_CONVERSIONS) st 199 drivers/iio/adc/nau7802.c complete(&st->value_ok); st 208 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 211 drivers/iio/adc/nau7802.c reinit_completion(&st->value_ok); st 212 drivers/iio/adc/nau7802.c enable_irq(st->client->irq); st 214 drivers/iio/adc/nau7802.c nau7802_sync(st); st 217 drivers/iio/adc/nau7802.c ret = nau7802_read_conversion(st); st 222 drivers/iio/adc/nau7802.c ret = wait_for_completion_interruptible_timeout(&st->value_ok, st 230 drivers/iio/adc/nau7802.c disable_irq(st->client->irq); st 232 drivers/iio/adc/nau7802.c *val = st->last_value; st 237 drivers/iio/adc/nau7802.c disable_irq(st->client->irq); st 246 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 249 drivers/iio/adc/nau7802.c nau7802_sync(st); st 252 drivers/iio/adc/nau7802.c ret = nau7802_read_conversion(st); st 262 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_PUCTRL); st 267 drivers/iio/adc/nau7802.c if (st->sample_rate != NAU7802_SAMP_FREQ_320) st 271 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, st 277 drivers/iio/adc/nau7802.c ret = nau7802_read_conversion(st); st 280 drivers/iio/adc/nau7802.c if (st->conversion_count < NAU7802_MIN_CONVERSIONS) st 281 drivers/iio/adc/nau7802.c st->conversion_count++; st 282 drivers/iio/adc/nau7802.c } while (st->conversion_count < NAU7802_MIN_CONVERSIONS); st 284 drivers/iio/adc/nau7802.c *val = st->last_value; st 293 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 298 drivers/iio/adc/nau7802.c mutex_lock(&st->lock); st 304 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_CTRL2); st 306 drivers/iio/adc/nau7802.c mutex_unlock(&st->lock); st 313 drivers/iio/adc/nau7802.c st->conversion_count = 0; st 314 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, st 317 drivers/iio/adc/nau7802.c NAU7802_CTRL2_CRS(st->sample_rate)); st 320 drivers/iio/adc/nau7802.c mutex_unlock(&st->lock); st 325 drivers/iio/adc/nau7802.c if (st->client->irq) st 330 drivers/iio/adc/nau7802.c mutex_unlock(&st->lock); st 334 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_CTRL1); st 342 drivers/iio/adc/nau7802.c *val = st->vref_mv; st 348 drivers/iio/adc/nau7802.c *val = nau7802_sample_freq_avail[st->sample_rate]; st 363 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 368 drivers/iio/adc/nau7802.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 369 drivers/iio/adc/nau7802.c if (val2 == st->scale_avail[i]) st 370 drivers/iio/adc/nau7802.c return nau7802_set_gain(st, i); st 377 drivers/iio/adc/nau7802.c mutex_lock(&st->lock); st 378 drivers/iio/adc/nau7802.c st->sample_rate = i; st 379 drivers/iio/adc/nau7802.c st->conversion_count = 0; st 380 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, st 382 drivers/iio/adc/nau7802.c NAU7802_CTRL2_CRS(st->sample_rate)); st 383 drivers/iio/adc/nau7802.c mutex_unlock(&st->lock); st 414 drivers/iio/adc/nau7802.c struct nau7802_state *st; st 425 drivers/iio/adc/nau7802.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 429 drivers/iio/adc/nau7802.c st = iio_priv(indio_dev); st 439 drivers/iio/adc/nau7802.c st->client = client; st 442 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_PUCTRL, st 448 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_PUCTRL, st 458 drivers/iio/adc/nau7802.c ret = i2c_smbus_read_byte_data(st->client, NAU7802_REG_PUCTRL); st 465 drivers/iio/adc/nau7802.c st->vref_mv = tmp; st 472 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_PUCTRL, data); st 475 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_ADC_CTRL, 0x30); st 481 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_CTRL1, st 488 drivers/iio/adc/nau7802.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 489 drivers/iio/adc/nau7802.c st->scale_avail[i] = (((u64)st->vref_mv) * 1000000000ULL) st 492 drivers/iio/adc/nau7802.c init_completion(&st->value_ok); st 527 drivers/iio/adc/nau7802.c st->sample_rate = NAU7802_SAMP_FREQ_320; st 528 drivers/iio/adc/nau7802.c ret = i2c_smbus_write_byte_data(st->client, NAU7802_REG_CTRL2, st 529 drivers/iio/adc/nau7802.c NAU7802_CTRL2_CRS(st->sample_rate)); st 538 drivers/iio/adc/nau7802.c mutex_init(&st->lock); st 539 drivers/iio/adc/nau7802.c mutex_init(&st->data_lock); st 550 drivers/iio/adc/nau7802.c mutex_destroy(&st->lock); st 551 drivers/iio/adc/nau7802.c mutex_destroy(&st->data_lock); st 562 drivers/iio/adc/nau7802.c struct nau7802_state *st = iio_priv(indio_dev); st 565 drivers/iio/adc/nau7802.c mutex_destroy(&st->lock); st 566 drivers/iio/adc/nau7802.c mutex_destroy(&st->data_lock); st 90 drivers/iio/adc/spear_adc.c static void spear_adc_set_status(struct spear_adc_state *st, u32 val) st 92 drivers/iio/adc/spear_adc.c __raw_writel(val, &st->adc_base_spear6xx->status); st 95 drivers/iio/adc/spear_adc.c static void spear_adc_set_clk(struct spear_adc_state *st, u32 val) st 98 drivers/iio/adc/spear_adc.c u32 apb_clk = clk_get_rate(st->clk); st 103 drivers/iio/adc/spear_adc.c st->current_clk = apb_clk / count; st 106 drivers/iio/adc/spear_adc.c &st->adc_base_spear6xx->clk); st 109 drivers/iio/adc/spear_adc.c static void spear_adc_set_ctrl(struct spear_adc_state *st, int n, st 112 drivers/iio/adc/spear_adc.c __raw_writel(val, &st->adc_base_spear6xx->ch_ctrl[n]); st 115 drivers/iio/adc/spear_adc.c static u32 spear_adc_get_average(struct spear_adc_state *st) st 117 drivers/iio/adc/spear_adc.c if (of_device_is_compatible(st->np, "st,spear600-adc")) { st 118 drivers/iio/adc/spear_adc.c return __raw_readl(&st->adc_base_spear6xx->average.msb) & st 121 drivers/iio/adc/spear_adc.c return __raw_readl(&st->adc_base_spear3xx->average) & st 126 drivers/iio/adc/spear_adc.c static void spear_adc_set_scanrate(struct spear_adc_state *st, u32 rate) st 128 drivers/iio/adc/spear_adc.c if (of_device_is_compatible(st->np, "st,spear600-adc")) { st 130 drivers/iio/adc/spear_adc.c &st->adc_base_spear6xx->scan_rate_lo); st 132 drivers/iio/adc/spear_adc.c &st->adc_base_spear6xx->scan_rate_hi); st 134 drivers/iio/adc/spear_adc.c __raw_writel(rate, &st->adc_base_spear3xx->scan_rate); st 144 drivers/iio/adc/spear_adc.c struct spear_adc_state *st = iio_priv(indio_dev); st 152 drivers/iio/adc/spear_adc.c SPEAR_ADC_STATUS_AVG_SAMPLE(st->avg_samples) | st 155 drivers/iio/adc/spear_adc.c if (st->vref_external == 0) st 158 drivers/iio/adc/spear_adc.c spear_adc_set_status(st, status); st 159 drivers/iio/adc/spear_adc.c wait_for_completion(&st->completion); /* set by ISR */ st 160 drivers/iio/adc/spear_adc.c *val = st->value; st 167 drivers/iio/adc/spear_adc.c *val = st->vref_external; st 171 drivers/iio/adc/spear_adc.c *val = st->current_clk; st 184 drivers/iio/adc/spear_adc.c struct spear_adc_state *st = iio_priv(indio_dev); st 199 drivers/iio/adc/spear_adc.c spear_adc_set_clk(st, val); st 228 drivers/iio/adc/spear_adc.c struct spear_adc_state *st = dev_id; st 231 drivers/iio/adc/spear_adc.c st->value = spear_adc_get_average(st); st 232 drivers/iio/adc/spear_adc.c complete(&st->completion); st 237 drivers/iio/adc/spear_adc.c static int spear_adc_configure(struct spear_adc_state *st) st 242 drivers/iio/adc/spear_adc.c spear_adc_set_status(st, 0); st 243 drivers/iio/adc/spear_adc.c __raw_writel(0, &st->adc_base_spear6xx->clk); st 245 drivers/iio/adc/spear_adc.c spear_adc_set_ctrl(st, i, 0); st 246 drivers/iio/adc/spear_adc.c spear_adc_set_scanrate(st, 0); st 248 drivers/iio/adc/spear_adc.c spear_adc_set_clk(st, st->sampling_freq); st 262 drivers/iio/adc/spear_adc.c struct spear_adc_state *st; st 274 drivers/iio/adc/spear_adc.c st = iio_priv(indio_dev); st 275 drivers/iio/adc/spear_adc.c st->np = np; st 283 drivers/iio/adc/spear_adc.c st->adc_base_spear6xx = devm_ioremap_resource(&pdev->dev, res); st 284 drivers/iio/adc/spear_adc.c if (IS_ERR(st->adc_base_spear6xx)) st 285 drivers/iio/adc/spear_adc.c return PTR_ERR(st->adc_base_spear6xx); st 287 drivers/iio/adc/spear_adc.c st->adc_base_spear3xx = st 288 drivers/iio/adc/spear_adc.c (struct adc_regs_spear3xx __iomem *)st->adc_base_spear6xx; st 290 drivers/iio/adc/spear_adc.c st->clk = devm_clk_get(dev, NULL); st 291 drivers/iio/adc/spear_adc.c if (IS_ERR(st->clk)) { st 293 drivers/iio/adc/spear_adc.c return PTR_ERR(st->clk); st 296 drivers/iio/adc/spear_adc.c ret = clk_prepare_enable(st->clk); st 309 drivers/iio/adc/spear_adc.c st); st 316 drivers/iio/adc/spear_adc.c &st->sampling_freq)) { st 326 drivers/iio/adc/spear_adc.c of_property_read_u32(np, "average-samples", &st->avg_samples); st 332 drivers/iio/adc/spear_adc.c of_property_read_u32(np, "vref-external", &st->vref_external); st 334 drivers/iio/adc/spear_adc.c spear_adc_configure(st); st 338 drivers/iio/adc/spear_adc.c init_completion(&st->completion); st 356 drivers/iio/adc/spear_adc.c clk_disable_unprepare(st->clk); st 363 drivers/iio/adc/spear_adc.c struct spear_adc_state *st = iio_priv(indio_dev); st 366 drivers/iio/adc/spear_adc.c clk_disable_unprepare(st->clk); st 115 drivers/iio/adc/ti-adc108s102.c struct adc108s102_state *st = iio_priv(indio_dev); st 124 drivers/iio/adc/ti-adc108s102.c st->tx_buf[cmds++] = cpu_to_be16(ADC108S102_CMD(bit)); st 127 drivers/iio/adc/ti-adc108s102.c st->tx_buf[cmds++] = 0x00; st 130 drivers/iio/adc/ti-adc108s102.c st->ring_xfer.tx_buf = &st->tx_buf[0]; st 131 drivers/iio/adc/ti-adc108s102.c st->ring_xfer.rx_buf = &st->rx_buf[0]; st 132 drivers/iio/adc/ti-adc108s102.c st->ring_xfer.len = cmds * sizeof(st->tx_buf[0]); st 134 drivers/iio/adc/ti-adc108s102.c spi_message_init_with_transfers(&st->ring_msg, &st->ring_xfer, 1); st 143 drivers/iio/adc/ti-adc108s102.c struct adc108s102_state *st = iio_priv(indio_dev); st 146 drivers/iio/adc/ti-adc108s102.c ret = spi_sync(st->spi, &st->ring_msg); st 152 drivers/iio/adc/ti-adc108s102.c (u8 *)&st->rx_buf[1], st 161 drivers/iio/adc/ti-adc108s102.c static int adc108s102_scan_direct(struct adc108s102_state *st, unsigned int ch) st 165 drivers/iio/adc/ti-adc108s102.c st->tx_buf[0] = cpu_to_be16(ADC108S102_CMD(ch)); st 166 drivers/iio/adc/ti-adc108s102.c ret = spi_sync(st->spi, &st->scan_single_msg); st 171 drivers/iio/adc/ti-adc108s102.c return be16_to_cpu(st->rx_buf[1]); st 178 drivers/iio/adc/ti-adc108s102.c struct adc108s102_state *st = iio_priv(indio_dev); st 187 drivers/iio/adc/ti-adc108s102.c ret = adc108s102_scan_direct(st, chan->address); st 201 drivers/iio/adc/ti-adc108s102.c *val = st->va_millivolt; st 219 drivers/iio/adc/ti-adc108s102.c struct adc108s102_state *st; st 223 drivers/iio/adc/ti-adc108s102.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 227 drivers/iio/adc/ti-adc108s102.c st = iio_priv(indio_dev); st 230 drivers/iio/adc/ti-adc108s102.c st->va_millivolt = ADC108S102_VA_MV_ACPI_DEFAULT; st 232 drivers/iio/adc/ti-adc108s102.c st->reg = devm_regulator_get(&spi->dev, "vref"); st 233 drivers/iio/adc/ti-adc108s102.c if (IS_ERR(st->reg)) st 234 drivers/iio/adc/ti-adc108s102.c return PTR_ERR(st->reg); st 236 drivers/iio/adc/ti-adc108s102.c ret = regulator_enable(st->reg); st 242 drivers/iio/adc/ti-adc108s102.c ret = regulator_get_voltage(st->reg); st 248 drivers/iio/adc/ti-adc108s102.c st->va_millivolt = ret / 1000; st 252 drivers/iio/adc/ti-adc108s102.c st->spi = spi; st 262 drivers/iio/adc/ti-adc108s102.c st->scan_single_xfer.tx_buf = st->tx_buf; st 263 drivers/iio/adc/ti-adc108s102.c st->scan_single_xfer.rx_buf = st->rx_buf; st 264 drivers/iio/adc/ti-adc108s102.c st->scan_single_xfer.len = 2 * sizeof(st->tx_buf[0]); st 266 drivers/iio/adc/ti-adc108s102.c spi_message_init_with_transfers(&st->scan_single_msg, st 267 drivers/iio/adc/ti-adc108s102.c &st->scan_single_xfer, 1); st 285 drivers/iio/adc/ti-adc108s102.c regulator_disable(st->reg); st 293 drivers/iio/adc/ti-adc108s102.c struct adc108s102_state *st = iio_priv(indio_dev); st 298 drivers/iio/adc/ti-adc108s102.c regulator_disable(st->reg); st 60 drivers/iio/adc/ti-ads7950.c #define TI_ADS7950_MAN_CMD_SETTINGS(st) \ st 61 drivers/iio/adc/ti-ads7950.c (TI_ADS7950_MAN_CMD(TI_ADS7950_CR_WRITE | st->cmd_settings_bitmask)) st 63 drivers/iio/adc/ti-ads7950.c #define TI_ADS7950_GPIO_CMD_SETTINGS(st) \ st 64 drivers/iio/adc/ti-ads7950.c (TI_ADS7950_GPIO_CMD(st->gpio_cmd_settings_bitmask)) st 286 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = iio_priv(indio_dev); st 292 drivers/iio/adc/ti-ads7950.c st->tx_buf[len++] = cmd; st 296 drivers/iio/adc/ti-ads7950.c st->tx_buf[len++] = 0; st 297 drivers/iio/adc/ti-ads7950.c st->tx_buf[len++] = 0; st 299 drivers/iio/adc/ti-ads7950.c st->ring_xfer.len = len * 2; st 308 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = iio_priv(indio_dev); st 311 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 312 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->ring_msg); st 316 drivers/iio/adc/ti-ads7950.c iio_push_to_buffers_with_timestamp(indio_dev, &st->rx_buf[2], st 320 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 328 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = iio_priv(indio_dev); st 331 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 333 drivers/iio/adc/ti-ads7950.c st->single_tx = cmd; st 335 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 339 drivers/iio/adc/ti-ads7950.c ret = st->single_rx; st 342 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 347 drivers/iio/adc/ti-ads7950.c static int ti_ads7950_get_range(struct ti_ads7950_state *st) st 351 drivers/iio/adc/ti-ads7950.c if (st->vref_mv) { st 352 drivers/iio/adc/ti-ads7950.c vref = st->vref_mv; st 354 drivers/iio/adc/ti-ads7950.c vref = regulator_get_voltage(st->reg); st 361 drivers/iio/adc/ti-ads7950.c if (st->cmd_settings_bitmask & TI_ADS7950_CR_RANGE_5V) st 371 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = iio_priv(indio_dev); st 388 drivers/iio/adc/ti-ads7950.c ret = ti_ads7950_get_range(st); st 409 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = gpiochip_get_data(chip); st 411 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 414 drivers/iio/adc/ti-ads7950.c st->cmd_settings_bitmask |= BIT(offset); st 416 drivers/iio/adc/ti-ads7950.c st->cmd_settings_bitmask &= ~BIT(offset); st 418 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st); st 419 drivers/iio/adc/ti-ads7950.c spi_sync(st->spi, &st->scan_single_msg); st 421 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 426 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = gpiochip_get_data(chip); st 429 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 432 drivers/iio/adc/ti-ads7950.c if (st->gpio_cmd_settings_bitmask & BIT(offset)) { st 433 drivers/iio/adc/ti-ads7950.c ret = st->cmd_settings_bitmask & BIT(offset); st 438 drivers/iio/adc/ti-ads7950.c st->cmd_settings_bitmask |= TI_ADS7950_CR_GPIO_DATA; st 439 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st); st 440 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 444 drivers/iio/adc/ti-ads7950.c ret = ((st->single_rx >> 12) & BIT(offset)) ? 1 : 0; st 447 drivers/iio/adc/ti-ads7950.c st->cmd_settings_bitmask &= ~TI_ADS7950_CR_GPIO_DATA; st 448 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st); st 449 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 454 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 462 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = gpiochip_get_data(chip); st 465 drivers/iio/adc/ti-ads7950.c return !(st->gpio_cmd_settings_bitmask & BIT(offset)); st 471 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = gpiochip_get_data(chip); st 474 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 477 drivers/iio/adc/ti-ads7950.c if (input && (st->gpio_cmd_settings_bitmask & BIT(offset))) st 478 drivers/iio/adc/ti-ads7950.c st->gpio_cmd_settings_bitmask &= ~BIT(offset); st 479 drivers/iio/adc/ti-ads7950.c else if (!input && !(st->gpio_cmd_settings_bitmask & BIT(offset))) st 480 drivers/iio/adc/ti-ads7950.c st->gpio_cmd_settings_bitmask |= BIT(offset); st 484 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_GPIO_CMD_SETTINGS(st); st 485 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 488 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 507 drivers/iio/adc/ti-ads7950.c static int ti_ads7950_init_hw(struct ti_ads7950_state *st) st 511 drivers/iio/adc/ti-ads7950.c mutex_lock(&st->slock); st 515 drivers/iio/adc/ti-ads7950.c st->cmd_settings_bitmask = TI_ADS7950_CR_RANGE_5V; st 516 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st); st 517 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 522 drivers/iio/adc/ti-ads7950.c st->gpio_cmd_settings_bitmask = 0x0; st 523 drivers/iio/adc/ti-ads7950.c st->single_tx = TI_ADS7950_GPIO_CMD_SETTINGS(st); st 524 drivers/iio/adc/ti-ads7950.c ret = spi_sync(st->spi, &st->scan_single_msg); st 527 drivers/iio/adc/ti-ads7950.c mutex_unlock(&st->slock); st 534 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st; st 547 drivers/iio/adc/ti-ads7950.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 551 drivers/iio/adc/ti-ads7950.c st = iio_priv(indio_dev); st 555 drivers/iio/adc/ti-ads7950.c st->spi = spi; st 567 drivers/iio/adc/ti-ads7950.c spi_message_init(&st->ring_msg); st 569 drivers/iio/adc/ti-ads7950.c st->ring_xfer.tx_buf = &st->tx_buf[0]; st 570 drivers/iio/adc/ti-ads7950.c st->ring_xfer.rx_buf = &st->rx_buf[0]; st 572 drivers/iio/adc/ti-ads7950.c st->ring_xfer.cs_change = true; st 574 drivers/iio/adc/ti-ads7950.c spi_message_add_tail(&st->ring_xfer, &st->ring_msg); st 585 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[0].tx_buf = &st->single_tx; st 586 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[0].len = 2; st 587 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[0].cs_change = 1; st 588 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[1].tx_buf = &st->single_tx; st 589 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[1].len = 2; st 590 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[1].cs_change = 1; st 591 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[2].rx_buf = &st->single_rx; st 592 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer[2].len = 2; st 594 drivers/iio/adc/ti-ads7950.c spi_message_init_with_transfers(&st->scan_single_msg, st 595 drivers/iio/adc/ti-ads7950.c st->scan_single_xfer, 3); st 599 drivers/iio/adc/ti-ads7950.c st->vref_mv = TI_ADS7950_VA_MV_ACPI_DEFAULT; st 601 drivers/iio/adc/ti-ads7950.c mutex_init(&st->slock); st 603 drivers/iio/adc/ti-ads7950.c st->reg = devm_regulator_get(&spi->dev, "vref"); st 604 drivers/iio/adc/ti-ads7950.c if (IS_ERR(st->reg)) { st 606 drivers/iio/adc/ti-ads7950.c ret = PTR_ERR(st->reg); st 610 drivers/iio/adc/ti-ads7950.c ret = regulator_enable(st->reg); st 623 drivers/iio/adc/ti-ads7950.c ret = ti_ads7950_init_hw(st); st 636 drivers/iio/adc/ti-ads7950.c st->chip.label = dev_name(&st->spi->dev); st 637 drivers/iio/adc/ti-ads7950.c st->chip.parent = &st->spi->dev; st 638 drivers/iio/adc/ti-ads7950.c st->chip.owner = THIS_MODULE; st 639 drivers/iio/adc/ti-ads7950.c st->chip.base = -1; st 640 drivers/iio/adc/ti-ads7950.c st->chip.ngpio = TI_ADS7950_NUM_GPIOS; st 641 drivers/iio/adc/ti-ads7950.c st->chip.get_direction = ti_ads7950_get_direction; st 642 drivers/iio/adc/ti-ads7950.c st->chip.direction_input = ti_ads7950_direction_input; st 643 drivers/iio/adc/ti-ads7950.c st->chip.direction_output = ti_ads7950_direction_output; st 644 drivers/iio/adc/ti-ads7950.c st->chip.get = ti_ads7950_get; st 645 drivers/iio/adc/ti-ads7950.c st->chip.set = ti_ads7950_set; st 647 drivers/iio/adc/ti-ads7950.c ret = gpiochip_add_data(&st->chip, st); st 660 drivers/iio/adc/ti-ads7950.c regulator_disable(st->reg); st 662 drivers/iio/adc/ti-ads7950.c mutex_destroy(&st->slock); st 670 drivers/iio/adc/ti-ads7950.c struct ti_ads7950_state *st = iio_priv(indio_dev); st 672 drivers/iio/adc/ti-ads7950.c gpiochip_remove(&st->chip); st 675 drivers/iio/adc/ti-ads7950.c regulator_disable(st->reg); st 676 drivers/iio/adc/ti-ads7950.c mutex_destroy(&st->slock); st 121 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(dev_to_iio_dev(dev)); st 124 drivers/iio/adc/ti-ads8688.c ads8688_range_def[0].scale * st->vref_mv, st 125 drivers/iio/adc/ti-ads8688.c ads8688_range_def[1].scale * st->vref_mv, st 126 drivers/iio/adc/ti-ads8688.c ads8688_range_def[2].scale * st->vref_mv); st 189 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 194 drivers/iio/adc/ti-ads8688.c st->data[0].d32 = cpu_to_be32(tmp); st 196 drivers/iio/adc/ti-ads8688.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 201 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 206 drivers/iio/adc/ti-ads8688.c st->data[0].d32 = cpu_to_be32(tmp); st 208 drivers/iio/adc/ti-ads8688.c return spi_write(st->spi, &st->data[0].d8[0], 4); st 213 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 218 drivers/iio/adc/ti-ads8688.c .tx_buf = &st->data[0].d8[0], st 222 drivers/iio/adc/ti-ads8688.c .tx_buf = &st->data[1].d8[0], st 223 drivers/iio/adc/ti-ads8688.c .rx_buf = &st->data[1].d8[0], st 230 drivers/iio/adc/ti-ads8688.c st->data[0].d32 = cpu_to_be32(tmp); st 234 drivers/iio/adc/ti-ads8688.c st->data[1].d32 = cpu_to_be32(tmp); st 236 drivers/iio/adc/ti-ads8688.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 240 drivers/iio/adc/ti-ads8688.c return be32_to_cpu(st->data[1].d32) & 0xffff; st 250 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 252 drivers/iio/adc/ti-ads8688.c mutex_lock(&st->lock); st 256 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 262 drivers/iio/adc/ti-ads8688.c scale_mv = st->vref_mv; st 263 drivers/iio/adc/ti-ads8688.c scale_mv *= ads8688_range_def[st->range[chan->channel]].scale; st 266 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 269 drivers/iio/adc/ti-ads8688.c offset = ads8688_range_def[st->range[chan->channel]].offset; st 271 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 274 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 296 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 300 drivers/iio/adc/ti-ads8688.c mutex_lock(&st->lock); st 304 drivers/iio/adc/ti-ads8688.c offset = ads8688_range_def[st->range[chan->channel]].offset; st 305 drivers/iio/adc/ti-ads8688.c if (offset == 0 && val2 == ads8688_range_def[0].scale * st->vref_mv) { st 306 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 312 drivers/iio/adc/ti-ads8688.c if (val2 == ads8688_range_def[i].scale * st->vref_mv && st 326 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 335 drivers/iio/adc/ti-ads8688.c st->range[chan->channel] == ADS8688_PLUSMINUS25VREF) { st 336 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 340 drivers/iio/adc/ti-ads8688.c scale = ads8688_range_def[st->range[chan->channel]].scale; st 354 drivers/iio/adc/ti-ads8688.c st->range[chan->channel] = ads8688_range_def[i].range; st 356 drivers/iio/adc/ti-ads8688.c mutex_unlock(&st->lock); st 417 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st; st 421 drivers/iio/adc/ti-ads8688.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 425 drivers/iio/adc/ti-ads8688.c st = iio_priv(indio_dev); st 427 drivers/iio/adc/ti-ads8688.c st->reg = devm_regulator_get_optional(&spi->dev, "vref"); st 428 drivers/iio/adc/ti-ads8688.c if (!IS_ERR(st->reg)) { st 429 drivers/iio/adc/ti-ads8688.c ret = regulator_enable(st->reg); st 433 drivers/iio/adc/ti-ads8688.c ret = regulator_get_voltage(st->reg); st 437 drivers/iio/adc/ti-ads8688.c st->vref_mv = ret / 1000; st 440 drivers/iio/adc/ti-ads8688.c st->vref_mv = ADS8688_VREF_MV; st 443 drivers/iio/adc/ti-ads8688.c st->chip_info = &ads8688_chip_info_tbl[spi_get_device_id(spi)->driver_data]; st 449 drivers/iio/adc/ti-ads8688.c st->spi = spi; st 455 drivers/iio/adc/ti-ads8688.c indio_dev->channels = st->chip_info->channels; st 456 drivers/iio/adc/ti-ads8688.c indio_dev->num_channels = st->chip_info->num_channels; st 461 drivers/iio/adc/ti-ads8688.c mutex_init(&st->lock); st 479 drivers/iio/adc/ti-ads8688.c if (!IS_ERR(st->reg)) st 480 drivers/iio/adc/ti-ads8688.c regulator_disable(st->reg); st 488 drivers/iio/adc/ti-ads8688.c struct ads8688_state *st = iio_priv(indio_dev); st 493 drivers/iio/adc/ti-ads8688.c if (!IS_ERR(st->reg)) st 494 drivers/iio/adc/ti-ads8688.c regulator_disable(st->reg); st 94 drivers/iio/adc/ti-tlc4541.c struct tlc4541_state *st = iio_priv(indio_dev); st 97 drivers/iio/adc/ti-tlc4541.c ret = spi_sync(st->spi, &st->scan_single_msg); st 101 drivers/iio/adc/ti-tlc4541.c iio_push_to_buffers_with_timestamp(indio_dev, st->rx_buf, st 109 drivers/iio/adc/ti-tlc4541.c static int tlc4541_get_range(struct tlc4541_state *st) st 113 drivers/iio/adc/ti-tlc4541.c vref = regulator_get_voltage(st->reg); st 129 drivers/iio/adc/ti-tlc4541.c struct tlc4541_state *st = iio_priv(indio_dev); st 136 drivers/iio/adc/ti-tlc4541.c ret = spi_sync(st->spi, &st->scan_single_msg); st 140 drivers/iio/adc/ti-tlc4541.c *val = be16_to_cpu(st->rx_buf[0]); st 145 drivers/iio/adc/ti-tlc4541.c ret = tlc4541_get_range(st); st 161 drivers/iio/adc/ti-tlc4541.c struct tlc4541_state *st; st 167 drivers/iio/adc/ti-tlc4541.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 171 drivers/iio/adc/ti-tlc4541.c st = iio_priv(indio_dev); st 175 drivers/iio/adc/ti-tlc4541.c st->spi = spi; st 190 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer[0].rx_buf = &st->rx_buf[0]; st 191 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer[0].len = 3; st 192 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer[1].delay_usecs = 3; st 193 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer[2].rx_buf = &st->rx_buf[0]; st 194 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer[2].len = 2; st 196 drivers/iio/adc/ti-tlc4541.c spi_message_init_with_transfers(&st->scan_single_msg, st 197 drivers/iio/adc/ti-tlc4541.c st->scan_single_xfer, 3); st 199 drivers/iio/adc/ti-tlc4541.c st->reg = devm_regulator_get(&spi->dev, "vref"); st 200 drivers/iio/adc/ti-tlc4541.c if (IS_ERR(st->reg)) st 201 drivers/iio/adc/ti-tlc4541.c return PTR_ERR(st->reg); st 203 drivers/iio/adc/ti-tlc4541.c ret = regulator_enable(st->reg); st 221 drivers/iio/adc/ti-tlc4541.c regulator_disable(st->reg); st 229 drivers/iio/adc/ti-tlc4541.c struct tlc4541_state *st = iio_priv(indio_dev); st 233 drivers/iio/adc/ti-tlc4541.c regulator_disable(st->reg); st 70 drivers/iio/amplifiers/ad8366.c struct ad8366_state *st = iio_priv(indio_dev); st 73 drivers/iio/amplifiers/ad8366.c switch (st->type) { st 78 drivers/iio/amplifiers/ad8366.c st->data[0] = ch_b >> 4; st 79 drivers/iio/amplifiers/ad8366.c st->data[1] = (ch_b << 4) | (ch_a >> 2); st 82 drivers/iio/amplifiers/ad8366.c st->data[0] = ch_a & 0x1F; st 85 drivers/iio/amplifiers/ad8366.c st->data[0] = (ch_a & 0x3F); st 89 drivers/iio/amplifiers/ad8366.c ret = spi_write(st->spi, st->data, indio_dev->num_channels); st 102 drivers/iio/amplifiers/ad8366.c struct ad8366_state *st = iio_priv(indio_dev); st 106 drivers/iio/amplifiers/ad8366.c mutex_lock(&st->lock); st 109 drivers/iio/amplifiers/ad8366.c code = st->ch[chan->channel]; st 111 drivers/iio/amplifiers/ad8366.c switch (st->type) { st 132 drivers/iio/amplifiers/ad8366.c mutex_unlock(&st->lock); st 143 drivers/iio/amplifiers/ad8366.c struct ad8366_state *st = iio_priv(indio_dev); st 144 drivers/iio/amplifiers/ad8366.c struct ad8366_info *inf = st->info; st 157 drivers/iio/amplifiers/ad8366.c switch (st->type) { st 169 drivers/iio/amplifiers/ad8366.c mutex_lock(&st->lock); st 172 drivers/iio/amplifiers/ad8366.c st->ch[chan->channel] = code; st 173 drivers/iio/amplifiers/ad8366.c ret = ad8366_write(indio_dev, st->ch[0], st->ch[1]); st 178 drivers/iio/amplifiers/ad8366.c mutex_unlock(&st->lock); st 208 drivers/iio/amplifiers/ad8366.c struct ad8366_state *st; st 211 drivers/iio/amplifiers/ad8366.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 215 drivers/iio/amplifiers/ad8366.c st = iio_priv(indio_dev); st 217 drivers/iio/amplifiers/ad8366.c st->reg = devm_regulator_get(&spi->dev, "vcc"); st 218 drivers/iio/amplifiers/ad8366.c if (!IS_ERR(st->reg)) { st 219 drivers/iio/amplifiers/ad8366.c ret = regulator_enable(st->reg); st 225 drivers/iio/amplifiers/ad8366.c mutex_init(&st->lock); st 226 drivers/iio/amplifiers/ad8366.c st->spi = spi; st 227 drivers/iio/amplifiers/ad8366.c st->type = spi_get_device_id(spi)->driver_data; st 229 drivers/iio/amplifiers/ad8366.c switch (st->type) { st 236 drivers/iio/amplifiers/ad8366.c st->reset_gpio = devm_gpiod_get(&spi->dev, "reset", st 247 drivers/iio/amplifiers/ad8366.c st->info = &ad8366_infos[st->type]; st 264 drivers/iio/amplifiers/ad8366.c if (!IS_ERR(st->reg)) st 265 drivers/iio/amplifiers/ad8366.c regulator_disable(st->reg); st 273 drivers/iio/amplifiers/ad8366.c struct ad8366_state *st = iio_priv(indio_dev); st 274 drivers/iio/amplifiers/ad8366.c struct regulator *reg = st->reg; st 53 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 56 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c st->param.cmd = MOTIONSENSE_CMD_LID_ANGLE; st 57 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c ret = cros_ec_motion_send_host_cmd(st, sizeof(st->resp->lid_angle)); st 63 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c *data = st->resp->lid_angle.value; st 71 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c struct cros_ec_lid_angle_state *st = iio_priv(indio_dev); st 75 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c mutex_lock(&st->core.cmd_lock); st 81 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c mutex_unlock(&st->core.cmd_lock); st 40 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c struct cros_ec_sensors_state *st = iio_priv(indio_dev); st 47 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c mutex_lock(&st->core.cmd_lock); st 51 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = st->core.read_ec_sensors_data(indio_dev, 1 << idx, &data); st 58 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_OFFSET; st 59 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.flags = 0; st 61 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 67 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[i].offset = st 68 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.resp->sensor_offset.offset[i]; st 70 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c *val = st->core.calib[idx].offset; st 73 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_SCALE; st 74 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.flags = 0; st 76 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 89 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[i].scale = st 90 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.resp->sensor_scale.scale[i]; st 92 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c *val = st->core.calib[idx].scale >> 15; st 93 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c *val2 = ((st->core.calib[idx].scale & 0x7FFF) * 1000000LL) / st 98 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 99 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_range.data = EC_MOTION_SENSE_NO_VALUE; st 101 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 105 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c val64 = st->core.resp->sensor_range.ret; st 106 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c switch (st->core.type) { st 141 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_sensors_core_read(&st->core, chan, val, val2, st 145 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c mutex_unlock(&st->core.cmd_lock); st 154 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c struct cros_ec_sensors_state *st = iio_priv(indio_dev); st 159 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c mutex_lock(&st->core.cmd_lock); st 163 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[idx].offset = val; st 166 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_OFFSET; st 167 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.flags = st 170 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.offset[i] = st 171 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[i].offset; st 172 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.temp = st 175 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 178 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[idx].scale = val; st 181 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_SCALE; st 182 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_offset.flags = st 185 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_scale.scale[i] = st 186 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.calib[i].scale; st 187 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_scale.temp = st 190 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 193 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c if (st->core.type == MOTIONSENSE_TYPE_MAG) { st 197 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 198 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_range.data = val; st 201 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c st->core.param.sensor_range.roundup = 1; st 203 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 207 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c &st->core, chan, val, val2, mask); st 211 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c mutex_unlock(&st->core.cmd_lock); st 189 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 199 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_lock(&st->cmd_lock); st 200 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_PERFORM_CALIB; st 201 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, 0); st 207 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->calib[i].offset = st->resp->perform_calib.offset[i]; st 209 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_unlock(&st->cmd_lock); st 218 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 220 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c return snprintf(buf, PAGE_SIZE, "%d\n", st->param.info.sensor_num); st 227 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 229 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c return snprintf(buf, PAGE_SIZE, "%s\n", cros_ec_loc[st->loc]); st 260 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st, st 267 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c if (st->type == MOTIONSENSE_TYPE_ACCEL) st 269 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c (1 + idx + st->param.info.sensor_num * st 302 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st) st 304 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_device *ec = st->ec; st 344 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 345 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_device *ec = st->ec; st 352 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c cros_ec_sensors_idx_to_reg(st, i), st 357 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c *data *= st->sign[i]; st 378 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 379 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_device *ec = st->ec; st 396 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_sensors_read_until_not_busy(st); st 426 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 431 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_DATA; st 432 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, sizeof(st->resp->data)); st 439 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c *data = st->resp->data.data[i]; st 451 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 454 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_lock(&st->cmd_lock); st 457 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c memset(st->samples, 0, indio_dev->scan_bytes); st 460 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = st->read_ec_sensors_data(indio_dev, st 462 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c (s16 *)st->samples); st 466 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c iio_push_to_buffers_with_timestamp(indio_dev, st->samples, st 476 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_unlock(&st->cmd_lock); st 482 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c int cros_ec_sensors_core_read(struct cros_ec_sensors_core_state *st, st 490 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_EC_RATE; st 491 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.ec_rate.data = st 494 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, 0); st 498 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c *val = st->resp->ec_rate.ret; st 502 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_SENSOR_ODR; st 503 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.sensor_odr.data = st 506 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, 0); st 510 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c *val = st->resp->sensor_odr.ret; st 543 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c int cros_ec_sensors_core_write(struct cros_ec_sensors_core_state *st, st 551 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_SENSOR_ODR; st 552 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.sensor_odr.data = val; st 555 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.sensor_odr.roundup = 1; st 557 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, 0); st 560 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_EC_RATE; st 561 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.ec_rate.data = val; st 563 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c ret = cros_ec_motion_send_host_cmd(st, 0); st 566 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->curr_sampl_freq = val; st 579 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 581 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c if (st->curr_sampl_freq == 0) st 588 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c if (st->curr_sampl_freq < CROS_EC_MIN_SUSPEND_SAMPLING_FREQUENCY) { st 589 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_lock(&st->cmd_lock); st 590 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_EC_RATE; st 591 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.ec_rate.data = CROS_EC_MIN_SUSPEND_SAMPLING_FREQUENCY; st 592 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c cros_ec_motion_send_host_cmd(st, 0); st 593 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_unlock(&st->cmd_lock); st 601 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c struct cros_ec_sensors_core_state *st = iio_priv(indio_dev); st 603 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c if (st->curr_sampl_freq == 0) st 606 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c if (st->curr_sampl_freq < CROS_EC_MIN_SUSPEND_SAMPLING_FREQUENCY) { st 607 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_lock(&st->cmd_lock); st 608 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.cmd = MOTIONSENSE_CMD_EC_RATE; st 609 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c st->param.ec_rate.data = st->curr_sampl_freq; st 610 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c cros_ec_motion_send_host_cmd(st, 0); st 611 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c mutex_unlock(&st->cmd_lock); st 159 drivers/iio/common/hid-sensors/hid-sensor-attributes.c s32 hid_sensor_read_poll_value(struct hid_sensor_common *st) st 164 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st 165 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.report_id, st 166 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.index, sizeof(value), &value); st 171 drivers/iio/common/hid-sensors/hid-sensor-attributes.c if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) st 179 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st, st 185 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st 186 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.report_id, st 187 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.index, sizeof(value), &value); st 192 drivers/iio/common/hid-sensors/hid-sensor-attributes.c if (st->poll.units == HID_USAGE_SENSOR_UNITS_MILLISECOND) st 194 drivers/iio/common/hid-sensors/hid-sensor-attributes.c else if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) st 206 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st, st 217 drivers/iio/common/hid-sensors/hid-sensor-attributes.c if (st->poll.units == HID_USAGE_SENSOR_UNITS_MILLISECOND) st 219 drivers/iio/common/hid-sensors/hid-sensor-attributes.c else if (st->poll.units == HID_USAGE_SENSOR_UNITS_SECOND) st 224 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_set_feature(st->hsdev, st->poll.report_id, st 225 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.index, sizeof(value), &value); st 229 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st 230 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.report_id, st 231 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.index, sizeof(value), &value); st 235 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll_interval = value; st 241 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st, st 247 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st 248 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.report_id, st 249 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.index, sizeof(value), st 255 drivers/iio/common/hid-sensors/hid-sensor-attributes.c convert_from_vtf_format(value, st->sensitivity.size, st 256 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.unit_expo, st 264 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st, st 273 drivers/iio/common/hid-sensors/hid-sensor-attributes.c value = convert_to_vtf_format(st->sensitivity.size, st 274 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.unit_expo, st 276 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_set_feature(st->hsdev, st->sensitivity.report_id, st 277 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.index, sizeof(value), st 282 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st 283 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.report_id, st 284 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.index, sizeof(value), st 289 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->raw_hystersis = value; st 379 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int64_t hid_sensor_convert_timestamp(struct hid_sensor_common *st, st 382 drivers/iio/common/hid-sensors/hid-sensor-attributes.c return st->timestamp_ns_scale * raw_value; st 389 drivers/iio/common/hid-sensors/hid-sensor-attributes.c struct hid_sensor_common *st) st 394 drivers/iio/common/hid-sensors/hid-sensor-attributes.c &st->poll); st 396 drivers/iio/common/hid-sensors/hid-sensor-attributes.c if (st->poll.units == 0) st 397 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.units = HID_USAGE_SENSOR_UNITS_MILLISECOND; st 399 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll_interval = -1; st 407 drivers/iio/common/hid-sensors/hid-sensor-attributes.c struct hid_sensor_common *st) st 412 drivers/iio/common/hid-sensors/hid-sensor-attributes.c &st->report_latency); st 415 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->report_latency.index, st->report_latency.report_id); st 418 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_get_report_latency(struct hid_sensor_common *st) st 423 drivers/iio/common/hid-sensors/hid-sensor-attributes.c ret = sensor_hub_get_feature(st->hsdev, st->report_latency.report_id, st 424 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->report_latency.index, sizeof(value), st 433 drivers/iio/common/hid-sensors/hid-sensor-attributes.c int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency_ms) st 435 drivers/iio/common/hid-sensors/hid-sensor-attributes.c return sensor_hub_set_feature(st->hsdev, st->report_latency.report_id, st 436 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->report_latency.index, st 441 drivers/iio/common/hid-sensors/hid-sensor-attributes.c bool hid_sensor_batch_mode_supported(struct hid_sensor_common *st) st 443 drivers/iio/common/hid-sensors/hid-sensor-attributes.c return st->report_latency.index > 0 && st->report_latency.report_id > 0; st 449 drivers/iio/common/hid-sensors/hid-sensor-attributes.c struct hid_sensor_common *st) st 456 drivers/iio/common/hid-sensors/hid-sensor-attributes.c hid_sensor_get_reporting_interval(hsdev, usage_id, st); st 461 drivers/iio/common/hid-sensors/hid-sensor-attributes.c &st->report_state); st 466 drivers/iio/common/hid-sensors/hid-sensor-attributes.c &st->power_state); st 468 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->power_state.logical_minimum = 1; st 469 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->report_state.logical_minimum = 1; st 474 drivers/iio/common/hid-sensors/hid-sensor-attributes.c &st->sensitivity); st 476 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->raw_hystersis = -1; st 487 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->timestamp_ns_scale = val0; st 489 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->timestamp_ns_scale = 1000000000; st 491 drivers/iio/common/hid-sensors/hid-sensor-attributes.c hid_sensor_get_report_latency_info(hsdev, usage_id, st); st 494 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->poll.index, st->poll.report_id, st 495 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->report_state.index, st->report_state.report_id, st 496 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->power_state.index, st->power_state.report_id, st 497 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->sensitivity.index, st->sensitivity.report_id, st 501 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->power_state.report_id, st 502 drivers/iio/common/hid-sensors/hid-sensor-attributes.c st->power_state.index, sizeof(value), &value); st 86 drivers/iio/common/hid-sensors/hid-sensor-trigger.c struct hid_sensor_common *st) st 88 drivers/iio/common/hid-sensors/hid-sensor-trigger.c if (!hid_sensor_batch_mode_supported(st)) st 94 drivers/iio/common/hid-sensors/hid-sensor-trigger.c static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) st 101 drivers/iio/common/hid-sensors/hid-sensor-trigger.c if (sensor_hub_device_open(st->hsdev)) st 104 drivers/iio/common/hid-sensors/hid-sensor-trigger.c atomic_inc(&st->data_ready); st 106 drivers/iio/common/hid-sensors/hid-sensor-trigger.c state_val = hid_sensor_get_usage_index(st->hsdev, st 107 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.report_id, st 108 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.index, st 110 drivers/iio/common/hid-sensors/hid-sensor-trigger.c report_val = hid_sensor_get_usage_index(st->hsdev, st 111 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->report_state.report_id, st 112 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->report_state.index, st 115 drivers/iio/common/hid-sensors/hid-sensor-trigger.c poll_value = hid_sensor_read_poll_value(st); st 119 drivers/iio/common/hid-sensors/hid-sensor-trigger.c val = atomic_dec_if_positive(&st->data_ready); st 123 drivers/iio/common/hid-sensors/hid-sensor-trigger.c sensor_hub_device_close(st->hsdev); st 124 drivers/iio/common/hid-sensors/hid-sensor-trigger.c state_val = hid_sensor_get_usage_index(st->hsdev, st 125 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.report_id, st 126 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.index, st 128 drivers/iio/common/hid-sensors/hid-sensor-trigger.c report_val = hid_sensor_get_usage_index(st->hsdev, st 129 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->report_state.report_id, st 130 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->report_state.index, st 135 drivers/iio/common/hid-sensors/hid-sensor-trigger.c state_val += st->power_state.logical_minimum; st 136 drivers/iio/common/hid-sensors/hid-sensor-trigger.c sensor_hub_set_feature(st->hsdev, st->power_state.report_id, st 137 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.index, sizeof(state_val), st 142 drivers/iio/common/hid-sensors/hid-sensor-trigger.c report_val += st->report_state.logical_minimum; st 143 drivers/iio/common/hid-sensors/hid-sensor-trigger.c sensor_hub_set_feature(st->hsdev, st->report_state.report_id, st 144 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->report_state.index, st 150 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->pdev->name, state_val, report_val); st 152 drivers/iio/common/hid-sensors/hid-sensor-trigger.c sensor_hub_get_feature(st->hsdev, st->power_state.report_id, st 153 drivers/iio/common/hid-sensors/hid-sensor-trigger.c st->power_state.index, st 162 drivers/iio/common/hid-sensors/hid-sensor-trigger.c int hid_sensor_power_state(struct hid_sensor_common *st, bool state) st 168 drivers/iio/common/hid-sensors/hid-sensor-trigger.c if (atomic_add_unless(&st->runtime_pm_enable, 1, 1)) st 169 drivers/iio/common/hid-sensors/hid-sensor-trigger.c pm_runtime_enable(&st->pdev->dev); st 172 drivers/iio/common/hid-sensors/hid-sensor-trigger.c atomic_inc(&st->user_requested_state); st 173 drivers/iio/common/hid-sensors/hid-sensor-trigger.c ret = pm_runtime_get_sync(&st->pdev->dev); st 175 drivers/iio/common/hid-sensors/hid-sensor-trigger.c atomic_dec(&st->user_requested_state); st 176 drivers/iio/common/hid-sensors/hid-sensor-trigger.c pm_runtime_mark_last_busy(&st->pdev->dev); st 177 drivers/iio/common/hid-sensors/hid-sensor-trigger.c pm_runtime_use_autosuspend(&st->pdev->dev); st 178 drivers/iio/common/hid-sensors/hid-sensor-trigger.c ret = pm_runtime_put_autosuspend(&st->pdev->dev); st 182 drivers/iio/common/hid-sensors/hid-sensor-trigger.c pm_runtime_put_noidle(&st->pdev->dev); st 188 drivers/iio/common/hid-sensors/hid-sensor-trigger.c atomic_set(&st->user_requested_state, state); st 189 drivers/iio/common/hid-sensors/hid-sensor-trigger.c return _hid_sensor_power_state(st, state); st 17 drivers/iio/common/hid-sensors/hid-sensor-trigger.h int hid_sensor_power_state(struct hid_sensor_common *st, bool state); st 87 drivers/iio/dac/ad5064.c typedef int (*ad5064_write_func)(struct ad5064_state *st, unsigned int cmd, st 192 drivers/iio/dac/ad5064.c static int ad5064_write(struct ad5064_state *st, unsigned int cmd, st 197 drivers/iio/dac/ad5064.c return st->write(st, cmd, addr, val); st 200 drivers/iio/dac/ad5064.c static int ad5064_sync_powerdown_mode(struct ad5064_state *st, st 207 drivers/iio/dac/ad5064.c if (st->chip_info->regmap_type == AD5064_REGMAP_LTC) { st 211 drivers/iio/dac/ad5064.c if (st->chip_info->regmap_type == AD5064_REGMAP_ADI2) st 219 drivers/iio/dac/ad5064.c if (st->pwr_down[chan->channel]) st 220 drivers/iio/dac/ad5064.c val |= st->pwr_down_mode[chan->channel] << shift; st 223 drivers/iio/dac/ad5064.c ret = ad5064_write(st, AD5064_CMD_POWERDOWN_DAC, address, val, 0); st 241 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 243 drivers/iio/dac/ad5064.c return st->pwr_down_mode[chan->channel] - 1; st 249 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 252 drivers/iio/dac/ad5064.c mutex_lock(&st->lock); st 253 drivers/iio/dac/ad5064.c st->pwr_down_mode[chan->channel] = mode + 1; st 255 drivers/iio/dac/ad5064.c ret = ad5064_sync_powerdown_mode(st, chan); st 256 drivers/iio/dac/ad5064.c mutex_unlock(&st->lock); st 278 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 280 drivers/iio/dac/ad5064.c return sprintf(buf, "%d\n", st->pwr_down[chan->channel]); st 287 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 295 drivers/iio/dac/ad5064.c mutex_lock(&st->lock); st 296 drivers/iio/dac/ad5064.c st->pwr_down[chan->channel] = pwr_down; st 298 drivers/iio/dac/ad5064.c ret = ad5064_sync_powerdown_mode(st, chan); st 299 drivers/iio/dac/ad5064.c mutex_unlock(&st->lock); st 303 drivers/iio/dac/ad5064.c static int ad5064_get_vref(struct ad5064_state *st, st 308 drivers/iio/dac/ad5064.c if (st->use_internal_vref) st 309 drivers/iio/dac/ad5064.c return st->chip_info->internal_vref; st 311 drivers/iio/dac/ad5064.c i = st->chip_info->shared_vref ? 0 : chan->channel; st 312 drivers/iio/dac/ad5064.c return regulator_get_voltage(st->vref_reg[i].consumer); st 321 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 326 drivers/iio/dac/ad5064.c *val = st->dac_cache[chan->channel]; st 329 drivers/iio/dac/ad5064.c scale_uv = ad5064_get_vref(st, chan); st 345 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 353 drivers/iio/dac/ad5064.c mutex_lock(&st->lock); st 354 drivers/iio/dac/ad5064.c ret = ad5064_write(st, AD5064_CMD_WRITE_INPUT_N_UPDATE_N, st 357 drivers/iio/dac/ad5064.c st->dac_cache[chan->channel] = val; st 358 drivers/iio/dac/ad5064.c mutex_unlock(&st->lock); st 778 drivers/iio/dac/ad5064.c static inline unsigned int ad5064_num_vref(struct ad5064_state *st) st 780 drivers/iio/dac/ad5064.c return st->chip_info->shared_vref ? 1 : st->chip_info->num_channels; st 790 drivers/iio/dac/ad5064.c static const char * const ad5064_vref_name(struct ad5064_state *st, st 793 drivers/iio/dac/ad5064.c return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref]; st 796 drivers/iio/dac/ad5064.c static int ad5064_set_config(struct ad5064_state *st, unsigned int val) st 800 drivers/iio/dac/ad5064.c switch (st->chip_info->regmap_type) { st 809 drivers/iio/dac/ad5064.c return ad5064_write(st, cmd, 0, val, 0); st 812 drivers/iio/dac/ad5064.c static int ad5064_request_vref(struct ad5064_state *st, struct device *dev) st 817 drivers/iio/dac/ad5064.c for (i = 0; i < ad5064_num_vref(st); ++i) st 818 drivers/iio/dac/ad5064.c st->vref_reg[i].supply = ad5064_vref_name(st, i); st 820 drivers/iio/dac/ad5064.c if (!st->chip_info->internal_vref) st 821 drivers/iio/dac/ad5064.c return devm_regulator_bulk_get(dev, ad5064_num_vref(st), st 822 drivers/iio/dac/ad5064.c st->vref_reg); st 829 drivers/iio/dac/ad5064.c st->vref_reg[0].consumer = devm_regulator_get_optional(dev, "vref"); st 830 drivers/iio/dac/ad5064.c if (!IS_ERR(st->vref_reg[0].consumer)) st 833 drivers/iio/dac/ad5064.c ret = PTR_ERR(st->vref_reg[0].consumer); st 838 drivers/iio/dac/ad5064.c st->use_internal_vref = true; st 839 drivers/iio/dac/ad5064.c ret = ad5064_set_config(st, AD5064_CONFIG_INT_VREF_ENABLE); st 850 drivers/iio/dac/ad5064.c struct ad5064_state *st; st 855 drivers/iio/dac/ad5064.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 859 drivers/iio/dac/ad5064.c st = iio_priv(indio_dev); st 860 drivers/iio/dac/ad5064.c mutex_init(&st->lock); st 863 drivers/iio/dac/ad5064.c st->chip_info = &ad5064_chip_info_tbl[type]; st 864 drivers/iio/dac/ad5064.c st->dev = dev; st 865 drivers/iio/dac/ad5064.c st->write = write; st 867 drivers/iio/dac/ad5064.c ret = ad5064_request_vref(st, dev); st 871 drivers/iio/dac/ad5064.c if (!st->use_internal_vref) { st 872 drivers/iio/dac/ad5064.c ret = regulator_bulk_enable(ad5064_num_vref(st), st->vref_reg); st 881 drivers/iio/dac/ad5064.c indio_dev->channels = st->chip_info->channels; st 882 drivers/iio/dac/ad5064.c indio_dev->num_channels = st->chip_info->num_channels; st 886 drivers/iio/dac/ad5064.c for (i = 0; i < st->chip_info->num_channels; ++i) { st 887 drivers/iio/dac/ad5064.c st->pwr_down_mode[i] = AD5064_LDAC_PWRDN_1K; st 888 drivers/iio/dac/ad5064.c st->dac_cache[i] = midscale; st 898 drivers/iio/dac/ad5064.c if (!st->use_internal_vref) st 899 drivers/iio/dac/ad5064.c regulator_bulk_disable(ad5064_num_vref(st), st->vref_reg); st 907 drivers/iio/dac/ad5064.c struct ad5064_state *st = iio_priv(indio_dev); st 911 drivers/iio/dac/ad5064.c if (!st->use_internal_vref) st 912 drivers/iio/dac/ad5064.c regulator_bulk_disable(ad5064_num_vref(st), st->vref_reg); st 919 drivers/iio/dac/ad5064.c static int ad5064_spi_write(struct ad5064_state *st, unsigned int cmd, st 922 drivers/iio/dac/ad5064.c struct spi_device *spi = to_spi_device(st->dev); st 924 drivers/iio/dac/ad5064.c st->data.spi = cpu_to_be32(AD5064_CMD(cmd) | AD5064_ADDR(addr) | val); st 925 drivers/iio/dac/ad5064.c return spi_write(spi, &st->data.spi, sizeof(st->data.spi)); st 990 drivers/iio/dac/ad5064.c static int ad5064_i2c_write(struct ad5064_state *st, unsigned int cmd, st 993 drivers/iio/dac/ad5064.c struct i2c_client *i2c = to_i2c_client(st->dev); st 997 drivers/iio/dac/ad5064.c switch (st->chip_info->regmap_type) { st 1006 drivers/iio/dac/ad5064.c st->data.i2c[0] = (cmd << cmd_shift) | addr; st 1007 drivers/iio/dac/ad5064.c put_unaligned_be16(val, &st->data.i2c[1]); st 1009 drivers/iio/dac/ad5064.c ret = i2c_master_send(i2c, st->data.i2c, 3); st 168 drivers/iio/dac/ad5360.c static unsigned int ad5360_get_channel_vref_index(struct ad5360_state *st, st 175 drivers/iio/dac/ad5360.c i = channel / st->chip_info->channels_per_group; st 176 drivers/iio/dac/ad5360.c if (i >= st->chip_info->num_vrefs) st 177 drivers/iio/dac/ad5360.c i = st->chip_info->num_vrefs - 1; st 182 drivers/iio/dac/ad5360.c static int ad5360_get_channel_vref(struct ad5360_state *st, st 185 drivers/iio/dac/ad5360.c unsigned int i = ad5360_get_channel_vref_index(st, channel); st 187 drivers/iio/dac/ad5360.c return regulator_get_voltage(st->vref_reg[i].consumer); st 195 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 199 drivers/iio/dac/ad5360.c st->data[0].d32 = cpu_to_be32(val); st 201 drivers/iio/dac/ad5360.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 219 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 223 drivers/iio/dac/ad5360.c .tx_buf = &st->data[0].d8[1], st 227 drivers/iio/dac/ad5360.c .rx_buf = &st->data[1].d8[1], st 234 drivers/iio/dac/ad5360.c st->data[0].d32 = cpu_to_be32(AD5360_CMD(AD5360_CMD_SPECIAL_FUNCTION) | st 239 drivers/iio/dac/ad5360.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 241 drivers/iio/dac/ad5360.c ret = be32_to_cpu(st->data[1].d32) & 0xffff; st 253 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 255 drivers/iio/dac/ad5360.c return sprintf(buf, "%d\n", (bool)(st->ctrl & AD5360_SF_CTRL_PWR_DOWN)); st 261 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 266 drivers/iio/dac/ad5360.c st->ctrl |= set; st 267 drivers/iio/dac/ad5360.c st->ctrl &= ~clr; st 270 drivers/iio/dac/ad5360.c AD5360_REG_SF_CTRL, st->ctrl, 0); st 316 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 356 drivers/iio/dac/ad5360.c ofs_index = ad5360_get_channel_vref_index(st, chan->channel); st 372 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 386 drivers/iio/dac/ad5360.c scale_uv = ad5360_get_channel_vref(st, chan->channel); st 409 drivers/iio/dac/ad5360.c ofs_index = ad5360_get_channel_vref_index(st, chan->channel); st 435 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 439 drivers/iio/dac/ad5360.c channels = kcalloc(st->chip_info->num_channels, st 445 drivers/iio/dac/ad5360.c for (i = 0; i < st->chip_info->num_channels; ++i) { st 446 drivers/iio/dac/ad5360.c channels[i] = st->chip_info->channel_template; st 460 drivers/iio/dac/ad5360.c struct ad5360_state *st; st 464 drivers/iio/dac/ad5360.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 470 drivers/iio/dac/ad5360.c st = iio_priv(indio_dev); st 473 drivers/iio/dac/ad5360.c st->chip_info = &ad5360_chip_info_tbl[type]; st 474 drivers/iio/dac/ad5360.c st->spi = spi; st 480 drivers/iio/dac/ad5360.c indio_dev->num_channels = st->chip_info->num_channels; st 488 drivers/iio/dac/ad5360.c for (i = 0; i < st->chip_info->num_vrefs; ++i) st 489 drivers/iio/dac/ad5360.c st->vref_reg[i].supply = ad5360_vref_name[i]; st 491 drivers/iio/dac/ad5360.c ret = devm_regulator_bulk_get(&st->spi->dev, st->chip_info->num_vrefs, st 492 drivers/iio/dac/ad5360.c st->vref_reg); st 498 drivers/iio/dac/ad5360.c ret = regulator_bulk_enable(st->chip_info->num_vrefs, st->vref_reg); st 513 drivers/iio/dac/ad5360.c regulator_bulk_disable(st->chip_info->num_vrefs, st->vref_reg); st 523 drivers/iio/dac/ad5360.c struct ad5360_state *st = iio_priv(indio_dev); st 529 drivers/iio/dac/ad5360.c regulator_bulk_disable(st->chip_info->num_vrefs, st->vref_reg); st 84 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 86 drivers/iio/dac/ad5380.c return sprintf(buf, "%d\n", st->pwr_down); st 93 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 104 drivers/iio/dac/ad5380.c ret = regmap_write(st->regmap, AD5380_REG_SF_PWR_DOWN, 0); st 106 drivers/iio/dac/ad5380.c ret = regmap_write(st->regmap, AD5380_REG_SF_PWR_UP, 0); st 108 drivers/iio/dac/ad5380.c st->pwr_down = pwr_down; st 123 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 127 drivers/iio/dac/ad5380.c ret = regmap_read(st->regmap, AD5380_REG_SF_CTRL, &mode); st 139 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 142 drivers/iio/dac/ad5380.c ret = regmap_update_bits(st->regmap, AD5380_REG_SF_CTRL, st 177 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 185 drivers/iio/dac/ad5380.c return regmap_write(st->regmap, st 193 drivers/iio/dac/ad5380.c return regmap_write(st->regmap, st 205 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 211 drivers/iio/dac/ad5380.c ret = regmap_read(st->regmap, ad5380_info_to_reg(chan, info), st 218 drivers/iio/dac/ad5380.c ret = regmap_read(st->regmap, AD5380_REG_OFFSET(chan->address), st 226 drivers/iio/dac/ad5380.c *val = 2 * st->vref; st 346 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 350 drivers/iio/dac/ad5380.c channels = kcalloc(st->chip_info->num_channels, st 356 drivers/iio/dac/ad5380.c for (i = 0; i < st->chip_info->num_channels; ++i) { st 357 drivers/iio/dac/ad5380.c channels[i] = st->chip_info->channel_template; st 371 drivers/iio/dac/ad5380.c struct ad5380_state *st; st 375 drivers/iio/dac/ad5380.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 381 drivers/iio/dac/ad5380.c st = iio_priv(indio_dev); st 384 drivers/iio/dac/ad5380.c st->chip_info = &ad5380_chip_info_tbl[type]; st 385 drivers/iio/dac/ad5380.c st->regmap = regmap; st 391 drivers/iio/dac/ad5380.c indio_dev->num_channels = st->chip_info->num_channels; st 399 drivers/iio/dac/ad5380.c if (st->chip_info->int_vref == 2500) st 402 drivers/iio/dac/ad5380.c st->vref_reg = devm_regulator_get(dev, "vref"); st 403 drivers/iio/dac/ad5380.c if (!IS_ERR(st->vref_reg)) { st 404 drivers/iio/dac/ad5380.c ret = regulator_enable(st->vref_reg); st 411 drivers/iio/dac/ad5380.c ret = regulator_get_voltage(st->vref_reg); st 415 drivers/iio/dac/ad5380.c st->vref = ret / 1000; st 417 drivers/iio/dac/ad5380.c st->vref = st->chip_info->int_vref; st 421 drivers/iio/dac/ad5380.c ret = regmap_write(st->regmap, AD5380_REG_SF_CTRL, ctrl); st 436 drivers/iio/dac/ad5380.c if (!IS_ERR(st->vref_reg)) st 437 drivers/iio/dac/ad5380.c regulator_disable(st->vref_reg); st 447 drivers/iio/dac/ad5380.c struct ad5380_state *st = iio_priv(indio_dev); st 453 drivers/iio/dac/ad5380.c if (!IS_ERR(st->vref_reg)) { st 454 drivers/iio/dac/ad5380.c regulator_disable(st->vref_reg); st 135 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 137 drivers/iio/dac/ad5421.c st->data[0].d32 = cpu_to_be32((reg << 16) | val); st 139 drivers/iio/dac/ad5421.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 156 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 160 drivers/iio/dac/ad5421.c .tx_buf = &st->data[0].d8[1], st 164 drivers/iio/dac/ad5421.c .rx_buf = &st->data[1].d8[1], st 171 drivers/iio/dac/ad5421.c st->data[0].d32 = cpu_to_be32((1 << 23) | (reg << 16)); st 173 drivers/iio/dac/ad5421.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 175 drivers/iio/dac/ad5421.c ret = be32_to_cpu(st->data[1].d32) & 0xffff; st 185 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 190 drivers/iio/dac/ad5421.c st->ctrl &= ~clr; st 191 drivers/iio/dac/ad5421.c st->ctrl |= set; st 193 drivers/iio/dac/ad5421.c ret = ad5421_write_unlocked(indio_dev, AD5421_REG_CTRL, st->ctrl); st 203 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 236 drivers/iio/dac/ad5421.c events &= st->fault_mask; st 278 drivers/iio/dac/ad5421.c static void ad5421_get_current_min_max(struct ad5421_state *st, st 283 drivers/iio/dac/ad5421.c switch (st->current_range) { st 303 drivers/iio/dac/ad5421.c static inline unsigned int ad5421_get_offset(struct ad5421_state *st) st 307 drivers/iio/dac/ad5421.c ad5421_get_current_min_max(st, &min, &max); st 314 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 329 drivers/iio/dac/ad5421.c ad5421_get_current_min_max(st, &min, &max); st 334 drivers/iio/dac/ad5421.c *val = ad5421_get_offset(st); st 386 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 405 drivers/iio/dac/ad5421.c st->fault_mask |= mask; st 407 drivers/iio/dac/ad5421.c st->fault_mask &= ~mask; st 417 drivers/iio/dac/ad5421.c struct ad5421_state *st = iio_priv(indio_dev); st 434 drivers/iio/dac/ad5421.c return (bool)(st->fault_mask & mask); st 473 drivers/iio/dac/ad5421.c struct ad5421_state *st; st 476 drivers/iio/dac/ad5421.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 482 drivers/iio/dac/ad5421.c st = iio_priv(indio_dev); st 485 drivers/iio/dac/ad5421.c st->spi = spi; st 494 drivers/iio/dac/ad5421.c st->ctrl = AD5421_CTRL_WATCHDOG_DISABLE | st 498 drivers/iio/dac/ad5421.c st->current_range = pdata->current_range; st 500 drivers/iio/dac/ad5421.c st->ctrl |= AD5421_CTRL_PWR_DOWN_INT_VREF; st 502 drivers/iio/dac/ad5421.c st->current_range = AD5421_CURRENT_RANGE_4mA_20mA; st 56 drivers/iio/dac/ad5446.c int (*write)(struct ad5446_state *st, unsigned val); st 66 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 68 drivers/iio/dac/ad5446.c st->pwr_down_mode = mode + 1; st 76 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 78 drivers/iio/dac/ad5446.c return st->pwr_down_mode - 1; st 93 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 95 drivers/iio/dac/ad5446.c return sprintf(buf, "%d\n", st->pwr_down); st 103 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 114 drivers/iio/dac/ad5446.c st->pwr_down = powerdown; st 116 drivers/iio/dac/ad5446.c if (st->pwr_down) { st 118 drivers/iio/dac/ad5446.c val = st->pwr_down_mode << shift; st 120 drivers/iio/dac/ad5446.c val = st->cached_val; st 123 drivers/iio/dac/ad5446.c ret = st->chip_info->write(st, val); st 169 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 173 drivers/iio/dac/ad5446.c *val = st->cached_val; st 176 drivers/iio/dac/ad5446.c *val = st->vref_mv; st 189 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 199 drivers/iio/dac/ad5446.c st->cached_val = val; st 200 drivers/iio/dac/ad5446.c if (!st->pwr_down) st 201 drivers/iio/dac/ad5446.c ret = st->chip_info->write(st, val); st 219 drivers/iio/dac/ad5446.c struct ad5446_state *st; st 237 drivers/iio/dac/ad5446.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 242 drivers/iio/dac/ad5446.c st = iio_priv(indio_dev); st 243 drivers/iio/dac/ad5446.c st->chip_info = chip_info; st 246 drivers/iio/dac/ad5446.c st->reg = reg; st 247 drivers/iio/dac/ad5446.c st->dev = dev; st 254 drivers/iio/dac/ad5446.c indio_dev->channels = &st->chip_info->channel; st 257 drivers/iio/dac/ad5446.c st->pwr_down_mode = MODE_PWRDWN_1k; st 259 drivers/iio/dac/ad5446.c if (st->chip_info->int_vref_mv) st 260 drivers/iio/dac/ad5446.c st->vref_mv = st->chip_info->int_vref_mv; st 262 drivers/iio/dac/ad5446.c st->vref_mv = voltage_uv / 1000; st 281 drivers/iio/dac/ad5446.c struct ad5446_state *st = iio_priv(indio_dev); st 284 drivers/iio/dac/ad5446.c if (!IS_ERR(st->reg)) st 285 drivers/iio/dac/ad5446.c regulator_disable(st->reg); st 292 drivers/iio/dac/ad5446.c static int ad5446_write(struct ad5446_state *st, unsigned val) st 294 drivers/iio/dac/ad5446.c struct spi_device *spi = to_spi_device(st->dev); st 300 drivers/iio/dac/ad5446.c static int ad5660_write(struct ad5446_state *st, unsigned val) st 302 drivers/iio/dac/ad5446.c struct spi_device *spi = to_spi_device(st->dev); st 526 drivers/iio/dac/ad5446.c static int ad5622_write(struct ad5446_state *st, unsigned val) st 528 drivers/iio/dac/ad5446.c struct i2c_client *client = to_i2c_client(st->dev); st 87 drivers/iio/dac/ad5449.c struct ad5449 *st = iio_priv(indio_dev); st 91 drivers/iio/dac/ad5449.c st->data[0] = cpu_to_be16((addr << 12) | val); st 92 drivers/iio/dac/ad5449.c ret = spi_write(st->spi, st->data, 2); st 101 drivers/iio/dac/ad5449.c struct ad5449 *st = iio_priv(indio_dev); st 105 drivers/iio/dac/ad5449.c .tx_buf = &st->data[0], st 109 drivers/iio/dac/ad5449.c .tx_buf = &st->data[1], st 110 drivers/iio/dac/ad5449.c .rx_buf = &st->data[1], st 116 drivers/iio/dac/ad5449.c st->data[0] = cpu_to_be16(addr << 12); st 117 drivers/iio/dac/ad5449.c st->data[1] = cpu_to_be16(AD5449_CMD_NOOP); st 119 drivers/iio/dac/ad5449.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 123 drivers/iio/dac/ad5449.c *val = be16_to_cpu(st->data[1]); st 133 drivers/iio/dac/ad5449.c struct ad5449 *st = iio_priv(indio_dev); st 140 drivers/iio/dac/ad5449.c if (st->has_sdo) { st 147 drivers/iio/dac/ad5449.c *val = st->dac_cache[chan->address]; st 152 drivers/iio/dac/ad5449.c reg = &st->vref_reg[chan->channel]; st 171 drivers/iio/dac/ad5449.c struct ad5449 *st = iio_priv(indio_dev); st 183 drivers/iio/dac/ad5449.c st->dac_cache[chan->address] = val; st 256 drivers/iio/dac/ad5449.c static const char *ad5449_vref_name(struct ad5449 *st, int n) st 258 drivers/iio/dac/ad5449.c if (st->chip_info->num_channels == 1) st 272 drivers/iio/dac/ad5449.c struct ad5449 *st; st 276 drivers/iio/dac/ad5449.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 280 drivers/iio/dac/ad5449.c st = iio_priv(indio_dev); st 283 drivers/iio/dac/ad5449.c st->chip_info = &ad5449_chip_info[id->driver_data]; st 284 drivers/iio/dac/ad5449.c st->spi = spi; st 286 drivers/iio/dac/ad5449.c for (i = 0; i < st->chip_info->num_channels; ++i) st 287 drivers/iio/dac/ad5449.c st->vref_reg[i].supply = ad5449_vref_name(st, i); st 289 drivers/iio/dac/ad5449.c ret = devm_regulator_bulk_get(&spi->dev, st->chip_info->num_channels, st 290 drivers/iio/dac/ad5449.c st->vref_reg); st 294 drivers/iio/dac/ad5449.c ret = regulator_bulk_enable(st->chip_info->num_channels, st->vref_reg); st 302 drivers/iio/dac/ad5449.c indio_dev->channels = st->chip_info->channels; st 303 drivers/iio/dac/ad5449.c indio_dev->num_channels = st->chip_info->num_channels; st 305 drivers/iio/dac/ad5449.c if (st->chip_info->has_ctrl) { st 311 drivers/iio/dac/ad5449.c st->has_sdo = pdata->sdo_mode != AD5449_SDO_DISABLED; st 313 drivers/iio/dac/ad5449.c st->has_sdo = true; st 325 drivers/iio/dac/ad5449.c regulator_bulk_disable(st->chip_info->num_channels, st->vref_reg); st 333 drivers/iio/dac/ad5449.c struct ad5449 *st = iio_priv(indio_dev); st 337 drivers/iio/dac/ad5449.c regulator_bulk_disable(st->chip_info->num_channels, st->vref_reg); st 69 drivers/iio/dac/ad5504.c static int ad5504_spi_write(struct ad5504_state *st, u8 addr, u16 val) st 71 drivers/iio/dac/ad5504.c st->data[0] = cpu_to_be16(AD5504_CMD_WRITE | AD5504_ADDR(addr) | st 74 drivers/iio/dac/ad5504.c return spi_write(st->spi, &st->data[0], 2); st 77 drivers/iio/dac/ad5504.c static int ad5504_spi_read(struct ad5504_state *st, u8 addr) st 81 drivers/iio/dac/ad5504.c .tx_buf = &st->data[0], st 82 drivers/iio/dac/ad5504.c .rx_buf = &st->data[1], st 86 drivers/iio/dac/ad5504.c st->data[0] = cpu_to_be16(AD5504_CMD_READ | AD5504_ADDR(addr)); st 87 drivers/iio/dac/ad5504.c ret = spi_sync_transfer(st->spi, &t, 1); st 91 drivers/iio/dac/ad5504.c return be16_to_cpu(st->data[1]) & AD5504_RES_MASK; st 100 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 105 drivers/iio/dac/ad5504.c ret = ad5504_spi_read(st, chan->address); st 113 drivers/iio/dac/ad5504.c *val = st->vref_mv; st 126 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 133 drivers/iio/dac/ad5504.c return ad5504_spi_write(st, chan->address, val); st 147 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 149 drivers/iio/dac/ad5504.c return st->pwr_down_mode; st 155 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 157 drivers/iio/dac/ad5504.c st->pwr_down_mode = mode; st 172 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 175 drivers/iio/dac/ad5504.c !(st->pwr_down_mask & (1 << chan->channel))); st 184 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 191 drivers/iio/dac/ad5504.c st->pwr_down_mask |= (1 << chan->channel); st 193 drivers/iio/dac/ad5504.c st->pwr_down_mask &= ~(1 << chan->channel); st 195 drivers/iio/dac/ad5504.c ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, st 196 drivers/iio/dac/ad5504.c AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) | st 197 drivers/iio/dac/ad5504.c AD5504_DAC_PWR(st->pwr_down_mask)); st 200 drivers/iio/dac/ad5504.c ad5504_spi_write(st, AD5504_ADDR_NOOP, 0); st 276 drivers/iio/dac/ad5504.c struct ad5504_state *st; st 280 drivers/iio/dac/ad5504.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 297 drivers/iio/dac/ad5504.c st = iio_priv(indio_dev); st 299 drivers/iio/dac/ad5504.c st->vref_mv = voltage_uv / 1000; st 301 drivers/iio/dac/ad5504.c st->vref_mv = pdata->vref_mv; st 305 drivers/iio/dac/ad5504.c st->reg = reg; st 306 drivers/iio/dac/ad5504.c st->spi = spi; st 308 drivers/iio/dac/ad5504.c indio_dev->name = spi_get_device_id(st->spi)->name; st 310 drivers/iio/dac/ad5504.c if (spi_get_device_id(st->spi)->driver_data == ID_AD5501) st 322 drivers/iio/dac/ad5504.c spi_get_device_id(st->spi)->name, st 344 drivers/iio/dac/ad5504.c struct ad5504_state *st = iio_priv(indio_dev); st 348 drivers/iio/dac/ad5504.c if (!IS_ERR(st->reg)) st 349 drivers/iio/dac/ad5504.c regulator_disable(st->reg); st 27 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = gpiochip_get_data(chip); st 31 drivers/iio/dac/ad5592r-base.c mutex_lock(&st->gpio_lock); st 33 drivers/iio/dac/ad5592r-base.c if (st->gpio_out & BIT(offset)) st 34 drivers/iio/dac/ad5592r-base.c val = st->gpio_val; st 36 drivers/iio/dac/ad5592r-base.c ret = st->ops->gpio_read(st, &val); st 38 drivers/iio/dac/ad5592r-base.c mutex_unlock(&st->gpio_lock); st 48 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = gpiochip_get_data(chip); st 50 drivers/iio/dac/ad5592r-base.c mutex_lock(&st->gpio_lock); st 53 drivers/iio/dac/ad5592r-base.c st->gpio_val |= BIT(offset); st 55 drivers/iio/dac/ad5592r-base.c st->gpio_val &= ~BIT(offset); st 57 drivers/iio/dac/ad5592r-base.c st->ops->reg_write(st, AD5592R_REG_GPIO_SET, st->gpio_val); st 59 drivers/iio/dac/ad5592r-base.c mutex_unlock(&st->gpio_lock); st 64 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = gpiochip_get_data(chip); st 67 drivers/iio/dac/ad5592r-base.c mutex_lock(&st->gpio_lock); st 69 drivers/iio/dac/ad5592r-base.c st->gpio_out &= ~BIT(offset); st 70 drivers/iio/dac/ad5592r-base.c st->gpio_in |= BIT(offset); st 72 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_GPIO_OUT_EN, st->gpio_out); st 76 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_GPIO_IN_EN, st->gpio_in); st 79 drivers/iio/dac/ad5592r-base.c mutex_unlock(&st->gpio_lock); st 87 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = gpiochip_get_data(chip); st 90 drivers/iio/dac/ad5592r-base.c mutex_lock(&st->gpio_lock); st 93 drivers/iio/dac/ad5592r-base.c st->gpio_val |= BIT(offset); st 95 drivers/iio/dac/ad5592r-base.c st->gpio_val &= ~BIT(offset); st 97 drivers/iio/dac/ad5592r-base.c st->gpio_in &= ~BIT(offset); st 98 drivers/iio/dac/ad5592r-base.c st->gpio_out |= BIT(offset); st 100 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_GPIO_SET, st->gpio_val); st 104 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_GPIO_OUT_EN, st->gpio_out); st 108 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_GPIO_IN_EN, st->gpio_in); st 111 drivers/iio/dac/ad5592r-base.c mutex_unlock(&st->gpio_lock); st 118 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = gpiochip_get_data(chip); st 120 drivers/iio/dac/ad5592r-base.c if (!(st->gpio_map & BIT(offset))) { st 121 drivers/iio/dac/ad5592r-base.c dev_err(st->dev, "GPIO %d is reserved by alternate function\n", st 129 drivers/iio/dac/ad5592r-base.c static int ad5592r_gpio_init(struct ad5592r_state *st) st 131 drivers/iio/dac/ad5592r-base.c if (!st->gpio_map) st 134 drivers/iio/dac/ad5592r-base.c st->gpiochip.label = dev_name(st->dev); st 135 drivers/iio/dac/ad5592r-base.c st->gpiochip.base = -1; st 136 drivers/iio/dac/ad5592r-base.c st->gpiochip.ngpio = 8; st 137 drivers/iio/dac/ad5592r-base.c st->gpiochip.parent = st->dev; st 138 drivers/iio/dac/ad5592r-base.c st->gpiochip.can_sleep = true; st 139 drivers/iio/dac/ad5592r-base.c st->gpiochip.direction_input = ad5592r_gpio_direction_input; st 140 drivers/iio/dac/ad5592r-base.c st->gpiochip.direction_output = ad5592r_gpio_direction_output; st 141 drivers/iio/dac/ad5592r-base.c st->gpiochip.get = ad5592r_gpio_get; st 142 drivers/iio/dac/ad5592r-base.c st->gpiochip.set = ad5592r_gpio_set; st 143 drivers/iio/dac/ad5592r-base.c st->gpiochip.request = ad5592r_gpio_request; st 144 drivers/iio/dac/ad5592r-base.c st->gpiochip.owner = THIS_MODULE; st 146 drivers/iio/dac/ad5592r-base.c mutex_init(&st->gpio_lock); st 148 drivers/iio/dac/ad5592r-base.c return gpiochip_add_data(&st->gpiochip, st); st 151 drivers/iio/dac/ad5592r-base.c static void ad5592r_gpio_cleanup(struct ad5592r_state *st) st 153 drivers/iio/dac/ad5592r-base.c if (st->gpio_map) st 154 drivers/iio/dac/ad5592r-base.c gpiochip_remove(&st->gpiochip); st 157 drivers/iio/dac/ad5592r-base.c static int ad5592r_reset(struct ad5592r_state *st) st 160 drivers/iio/dac/ad5592r-base.c struct iio_dev *iio_dev = iio_priv_to_dev(st); st 162 drivers/iio/dac/ad5592r-base.c gpio = devm_gpiod_get_optional(st->dev, "reset", GPIOD_OUT_LOW); st 172 drivers/iio/dac/ad5592r-base.c st->ops->reg_write(st, AD5592R_REG_RESET, 0xdac); st 181 drivers/iio/dac/ad5592r-base.c static int ad5592r_get_vref(struct ad5592r_state *st) st 185 drivers/iio/dac/ad5592r-base.c if (st->reg) { st 186 drivers/iio/dac/ad5592r-base.c ret = regulator_get_voltage(st->reg); st 196 drivers/iio/dac/ad5592r-base.c static int ad5592r_set_channel_modes(struct ad5592r_state *st) st 198 drivers/iio/dac/ad5592r-base.c const struct ad5592r_rw_ops *ops = st->ops; st 201 drivers/iio/dac/ad5592r-base.c struct iio_dev *iio_dev = iio_priv_to_dev(st); st 205 drivers/iio/dac/ad5592r-base.c for (i = 0; i < st->num_channels; i++) { st 206 drivers/iio/dac/ad5592r-base.c switch (st->channel_modes[i]) { st 221 drivers/iio/dac/ad5592r-base.c st->gpio_map |= BIT(i); st 222 drivers/iio/dac/ad5592r-base.c st->gpio_in |= BIT(i); /* Default to input */ st 228 drivers/iio/dac/ad5592r-base.c switch (st->channel_offstate[i]) { st 234 drivers/iio/dac/ad5592r-base.c st->gpio_out |= BIT(i); st 238 drivers/iio/dac/ad5592r-base.c st->gpio_out |= BIT(i); st 239 drivers/iio/dac/ad5592r-base.c st->gpio_val |= BIT(i); st 254 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_PULLDOWN, pulldown); st 258 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_TRISTATE, tristate); st 263 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_DAC_EN, dac); st 267 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_ADC_EN, adc); st 271 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_GPIO_SET, st->gpio_val); st 275 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_GPIO_OUT_EN, st->gpio_out); st 279 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_GPIO_IN_EN, st->gpio_in); st 284 drivers/iio/dac/ad5592r-base.c ret = ops->reg_read(st, AD5592R_REG_ADC_EN, &read_back); st 293 drivers/iio/dac/ad5592r-base.c static int ad5592r_reset_channel_modes(struct ad5592r_state *st) st 297 drivers/iio/dac/ad5592r-base.c for (i = 0; i < ARRAY_SIZE(st->channel_modes); i++) st 298 drivers/iio/dac/ad5592r-base.c st->channel_modes[i] = CH_MODE_UNUSED; st 300 drivers/iio/dac/ad5592r-base.c return ad5592r_set_channel_modes(st); st 306 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = iio_priv(iio_dev); st 319 drivers/iio/dac/ad5592r-base.c ret = st->ops->write_dac(st, chan->channel, val); st 321 drivers/iio/dac/ad5592r-base.c st->cached_dac[chan->channel] = val; st 328 drivers/iio/dac/ad5592r-base.c if (val == st->scale_avail[0][0] && st 329 drivers/iio/dac/ad5592r-base.c val2 == st->scale_avail[0][1]) st 331 drivers/iio/dac/ad5592r-base.c else if (val == st->scale_avail[1][0] && st 332 drivers/iio/dac/ad5592r-base.c val2 == st->scale_avail[1][1]) st 339 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_read(st, AD5592R_REG_CTRL, st 340 drivers/iio/dac/ad5592r-base.c &st->cached_gp_ctrl); st 348 drivers/iio/dac/ad5592r-base.c st->cached_gp_ctrl |= st 351 drivers/iio/dac/ad5592r-base.c st->cached_gp_ctrl &= st 355 drivers/iio/dac/ad5592r-base.c st->cached_gp_ctrl |= st 358 drivers/iio/dac/ad5592r-base.c st->cached_gp_ctrl &= st 362 drivers/iio/dac/ad5592r-base.c ret = st->ops->reg_write(st, AD5592R_REG_CTRL, st 363 drivers/iio/dac/ad5592r-base.c st->cached_gp_ctrl); st 380 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = iio_priv(iio_dev); st 389 drivers/iio/dac/ad5592r-base.c ret = st->ops->read_adc(st, chan->channel, &read_val); st 394 drivers/iio/dac/ad5592r-base.c dev_err(st->dev, "Error while reading channel %u\n", st 403 drivers/iio/dac/ad5592r-base.c read_val = st->cached_dac[chan->channel]; st 406 drivers/iio/dac/ad5592r-base.c dev_dbg(st->dev, "Channel %u read: 0x%04hX\n", st 413 drivers/iio/dac/ad5592r-base.c *val = ad5592r_get_vref(st); st 426 drivers/iio/dac/ad5592r-base.c mult = !!(st->cached_gp_ctrl & st 429 drivers/iio/dac/ad5592r-base.c mult = !!(st->cached_gp_ctrl & st 439 drivers/iio/dac/ad5592r-base.c ret = ad5592r_get_vref(st); st 443 drivers/iio/dac/ad5592r-base.c if (st->cached_gp_ctrl & AD5592R_REG_CTRL_ADC_RANGE) st 483 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = iio_priv(iio_dev); st 486 drivers/iio/dac/ad5592r-base.c st->scale_avail[0][0], st->scale_avail[0][1], st 487 drivers/iio/dac/ad5592r-base.c st->scale_avail[1][0], st->scale_avail[1][1]); st 514 drivers/iio/dac/ad5592r-base.c static int ad5592r_alloc_channels(struct ad5592r_state *st) st 517 drivers/iio/dac/ad5592r-base.c num_channels = st->num_channels; st 518 drivers/iio/dac/ad5592r-base.c struct iio_dev *iio_dev = iio_priv_to_dev(st); st 524 drivers/iio/dac/ad5592r-base.c device_for_each_child_node(st->dev, child) { st 526 drivers/iio/dac/ad5592r-base.c if (ret || reg >= ARRAY_SIZE(st->channel_modes)) st 531 drivers/iio/dac/ad5592r-base.c st->channel_modes[reg] = tmp; st 535 drivers/iio/dac/ad5592r-base.c st->channel_offstate[reg] = tmp; st 538 drivers/iio/dac/ad5592r-base.c channels = devm_kcalloc(st->dev, st 545 drivers/iio/dac/ad5592r-base.c switch (st->channel_modes[i]) { st 585 drivers/iio/dac/ad5592r-base.c static void ad5592r_init_scales(struct ad5592r_state *st, int vref_mV) st 589 drivers/iio/dac/ad5592r-base.c st->scale_avail[0][0] = st 590 drivers/iio/dac/ad5592r-base.c div_s64_rem(tmp, 1000000000LL, &st->scale_avail[0][1]); st 591 drivers/iio/dac/ad5592r-base.c st->scale_avail[1][0] = st 592 drivers/iio/dac/ad5592r-base.c div_s64_rem(tmp * 2, 1000000000LL, &st->scale_avail[1][1]); st 599 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st; st 602 drivers/iio/dac/ad5592r-base.c iio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 606 drivers/iio/dac/ad5592r-base.c st = iio_priv(iio_dev); st 607 drivers/iio/dac/ad5592r-base.c st->dev = dev; st 608 drivers/iio/dac/ad5592r-base.c st->ops = ops; st 609 drivers/iio/dac/ad5592r-base.c st->num_channels = 8; st 612 drivers/iio/dac/ad5592r-base.c st->reg = devm_regulator_get_optional(dev, "vref"); st 613 drivers/iio/dac/ad5592r-base.c if (IS_ERR(st->reg)) { st 614 drivers/iio/dac/ad5592r-base.c if ((PTR_ERR(st->reg) != -ENODEV) && dev->of_node) st 615 drivers/iio/dac/ad5592r-base.c return PTR_ERR(st->reg); st 617 drivers/iio/dac/ad5592r-base.c st->reg = NULL; st 619 drivers/iio/dac/ad5592r-base.c ret = regulator_enable(st->reg); st 629 drivers/iio/dac/ad5592r-base.c ad5592r_init_scales(st, ad5592r_get_vref(st)); st 631 drivers/iio/dac/ad5592r-base.c ret = ad5592r_reset(st); st 635 drivers/iio/dac/ad5592r-base.c ret = ops->reg_write(st, AD5592R_REG_PD, st 636 drivers/iio/dac/ad5592r-base.c (st->reg == NULL) ? AD5592R_REG_PD_EN_REF : 0); st 640 drivers/iio/dac/ad5592r-base.c ret = ad5592r_alloc_channels(st); st 644 drivers/iio/dac/ad5592r-base.c ret = ad5592r_set_channel_modes(st); st 652 drivers/iio/dac/ad5592r-base.c ret = ad5592r_gpio_init(st); st 662 drivers/iio/dac/ad5592r-base.c ad5592r_reset_channel_modes(st); st 665 drivers/iio/dac/ad5592r-base.c if (st->reg) st 666 drivers/iio/dac/ad5592r-base.c regulator_disable(st->reg); st 675 drivers/iio/dac/ad5592r-base.c struct ad5592r_state *st = iio_priv(iio_dev); st 678 drivers/iio/dac/ad5592r-base.c ad5592r_reset_channel_modes(st); st 679 drivers/iio/dac/ad5592r-base.c ad5592r_gpio_cleanup(st); st 681 drivers/iio/dac/ad5592r-base.c if (st->reg) st 682 drivers/iio/dac/ad5592r-base.c regulator_disable(st->reg); st 43 drivers/iio/dac/ad5592r-base.h int (*write_dac)(struct ad5592r_state *st, unsigned chan, u16 value); st 44 drivers/iio/dac/ad5592r-base.h int (*read_adc)(struct ad5592r_state *st, unsigned chan, u16 *value); st 45 drivers/iio/dac/ad5592r-base.h int (*reg_write)(struct ad5592r_state *st, u8 reg, u16 value); st 46 drivers/iio/dac/ad5592r-base.h int (*reg_read)(struct ad5592r_state *st, u8 reg, u16 *value); st 47 drivers/iio/dac/ad5592r-base.h int (*gpio_read)(struct ad5592r_state *st, u8 *value); st 20 drivers/iio/dac/ad5592r.c static int ad5592r_spi_wnop_r16(struct ad5592r_state *st, __be16 *buf) st 22 drivers/iio/dac/ad5592r.c struct spi_device *spi = container_of(st->dev, struct spi_device, dev); st 24 drivers/iio/dac/ad5592r.c .tx_buf = &st->spi_msg_nop, st 29 drivers/iio/dac/ad5592r.c st->spi_msg_nop = 0; /* NOP */ st 34 drivers/iio/dac/ad5592r.c static int ad5592r_write_dac(struct ad5592r_state *st, unsigned chan, u16 value) st 36 drivers/iio/dac/ad5592r.c struct spi_device *spi = container_of(st->dev, struct spi_device, dev); st 38 drivers/iio/dac/ad5592r.c st->spi_msg = cpu_to_be16(BIT(15) | (chan << 12) | value); st 40 drivers/iio/dac/ad5592r.c return spi_write(spi, &st->spi_msg, sizeof(st->spi_msg)); st 43 drivers/iio/dac/ad5592r.c static int ad5592r_read_adc(struct ad5592r_state *st, unsigned chan, u16 *value) st 45 drivers/iio/dac/ad5592r.c struct spi_device *spi = container_of(st->dev, struct spi_device, dev); st 48 drivers/iio/dac/ad5592r.c st->spi_msg = cpu_to_be16((AD5592R_REG_ADC_SEQ << 11) | BIT(chan)); st 50 drivers/iio/dac/ad5592r.c ret = spi_write(spi, &st->spi_msg, sizeof(st->spi_msg)); st 58 drivers/iio/dac/ad5592r.c ret = ad5592r_spi_wnop_r16(st, &st->spi_msg); st 62 drivers/iio/dac/ad5592r.c ret = ad5592r_spi_wnop_r16(st, &st->spi_msg); st 66 drivers/iio/dac/ad5592r.c *value = be16_to_cpu(st->spi_msg); st 71 drivers/iio/dac/ad5592r.c static int ad5592r_reg_write(struct ad5592r_state *st, u8 reg, u16 value) st 73 drivers/iio/dac/ad5592r.c struct spi_device *spi = container_of(st->dev, struct spi_device, dev); st 75 drivers/iio/dac/ad5592r.c st->spi_msg = cpu_to_be16((reg << 11) | value); st 77 drivers/iio/dac/ad5592r.c return spi_write(spi, &st->spi_msg, sizeof(st->spi_msg)); st 80 drivers/iio/dac/ad5592r.c static int ad5592r_reg_read(struct ad5592r_state *st, u8 reg, u16 *value) st 82 drivers/iio/dac/ad5592r.c struct spi_device *spi = container_of(st->dev, struct spi_device, dev); st 85 drivers/iio/dac/ad5592r.c st->spi_msg = cpu_to_be16((AD5592R_REG_LDAC << 11) | st 88 drivers/iio/dac/ad5592r.c ret = spi_write(spi, &st->spi_msg, sizeof(st->spi_msg)); st 92 drivers/iio/dac/ad5592r.c ret = ad5592r_spi_wnop_r16(st, &st->spi_msg); st 96 drivers/iio/dac/ad5592r.c *value = be16_to_cpu(st->spi_msg); st 101 drivers/iio/dac/ad5592r.c static int ad5593r_gpio_read(struct ad5592r_state *st, u8 *value) st 105 drivers/iio/dac/ad5592r.c ret = ad5592r_reg_write(st, AD5592R_REG_GPIO_IN_EN, st 106 drivers/iio/dac/ad5592r.c AD5592R_GPIO_READBACK_EN | st->gpio_in); st 110 drivers/iio/dac/ad5592r.c ret = ad5592r_spi_wnop_r16(st, &st->spi_msg); st 114 drivers/iio/dac/ad5592r.c *value = (u8) be16_to_cpu(st->spi_msg); st 24 drivers/iio/dac/ad5593r.c static int ad5593r_write_dac(struct ad5592r_state *st, unsigned chan, u16 value) st 26 drivers/iio/dac/ad5593r.c struct i2c_client *i2c = to_i2c_client(st->dev); st 32 drivers/iio/dac/ad5593r.c static int ad5593r_read_adc(struct ad5592r_state *st, unsigned chan, u16 *value) st 34 drivers/iio/dac/ad5593r.c struct i2c_client *i2c = to_i2c_client(st->dev); st 51 drivers/iio/dac/ad5593r.c static int ad5593r_reg_write(struct ad5592r_state *st, u8 reg, u16 value) st 53 drivers/iio/dac/ad5593r.c struct i2c_client *i2c = to_i2c_client(st->dev); st 59 drivers/iio/dac/ad5593r.c static int ad5593r_reg_read(struct ad5592r_state *st, u8 reg, u16 *value) st 61 drivers/iio/dac/ad5593r.c struct i2c_client *i2c = to_i2c_client(st->dev); st 73 drivers/iio/dac/ad5593r.c static int ad5593r_gpio_read(struct ad5592r_state *st, u8 *value) st 75 drivers/iio/dac/ad5593r.c struct i2c_client *i2c = to_i2c_client(st->dev); st 51 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 55 drivers/iio/dac/ad5624r_spi.c *val = st->vref_mv; st 68 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 75 drivers/iio/dac/ad5624r_spi.c return ad5624r_spi_write(st->us, st 93 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 95 drivers/iio/dac/ad5624r_spi.c return st->pwr_down_mode; st 101 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 103 drivers/iio/dac/ad5624r_spi.c st->pwr_down_mode = mode; st 118 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 121 drivers/iio/dac/ad5624r_spi.c !!(st->pwr_down_mask & (1 << chan->channel))); st 130 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 137 drivers/iio/dac/ad5624r_spi.c st->pwr_down_mask |= (1 << chan->channel); st 139 drivers/iio/dac/ad5624r_spi.c st->pwr_down_mask &= ~(1 << chan->channel); st 141 drivers/iio/dac/ad5624r_spi.c ret = ad5624r_spi_write(st->us, AD5624R_CMD_POWERDOWN_DAC, 0, st 142 drivers/iio/dac/ad5624r_spi.c (st->pwr_down_mode << 4) | st 143 drivers/iio/dac/ad5624r_spi.c st->pwr_down_mask, 16); st 224 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st; st 228 drivers/iio/dac/ad5624r_spi.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 231 drivers/iio/dac/ad5624r_spi.c st = iio_priv(indio_dev); st 232 drivers/iio/dac/ad5624r_spi.c st->reg = devm_regulator_get(&spi->dev, "vcc"); st 233 drivers/iio/dac/ad5624r_spi.c if (!IS_ERR(st->reg)) { st 234 drivers/iio/dac/ad5624r_spi.c ret = regulator_enable(st->reg); st 238 drivers/iio/dac/ad5624r_spi.c ret = regulator_get_voltage(st->reg); st 246 drivers/iio/dac/ad5624r_spi.c st->chip_info = st 250 drivers/iio/dac/ad5624r_spi.c st->vref_mv = voltage_uv / 1000; st 252 drivers/iio/dac/ad5624r_spi.c st->vref_mv = st->chip_info->int_vref_mv; st 254 drivers/iio/dac/ad5624r_spi.c st->us = spi; st 260 drivers/iio/dac/ad5624r_spi.c indio_dev->channels = st->chip_info->channels; st 275 drivers/iio/dac/ad5624r_spi.c if (!IS_ERR(st->reg)) st 276 drivers/iio/dac/ad5624r_spi.c regulator_disable(st->reg); st 284 drivers/iio/dac/ad5624r_spi.c struct ad5624r_state *st = iio_priv(indio_dev); st 287 drivers/iio/dac/ad5624r_spi.c if (!IS_ERR(st->reg)) st 288 drivers/iio/dac/ad5624r_spi.c regulator_disable(st->reg); st 16 drivers/iio/dac/ad5686-spi.c static int ad5686_spi_write(struct ad5686_state *st, st 19 drivers/iio/dac/ad5686-spi.c struct spi_device *spi = to_spi_device(st->dev); st 22 drivers/iio/dac/ad5686-spi.c switch (st->chip_info->regmap_type) { st 24 drivers/iio/dac/ad5686-spi.c st->data[0].d16 = cpu_to_be16(AD5310_CMD(cmd) | st 26 drivers/iio/dac/ad5686-spi.c buf = &st->data[0].d8[0]; st 30 drivers/iio/dac/ad5686-spi.c st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) | st 32 drivers/iio/dac/ad5686-spi.c buf = &st->data[0].d8[1]; st 36 drivers/iio/dac/ad5686-spi.c st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) | st 39 drivers/iio/dac/ad5686-spi.c buf = &st->data[0].d8[1]; st 49 drivers/iio/dac/ad5686-spi.c static int ad5686_spi_read(struct ad5686_state *st, u8 addr) st 53 drivers/iio/dac/ad5686-spi.c .tx_buf = &st->data[0].d8[1], st 57 drivers/iio/dac/ad5686-spi.c .tx_buf = &st->data[1].d8[1], st 58 drivers/iio/dac/ad5686-spi.c .rx_buf = &st->data[2].d8[1], st 62 drivers/iio/dac/ad5686-spi.c struct spi_device *spi = to_spi_device(st->dev); st 66 drivers/iio/dac/ad5686-spi.c switch (st->chip_info->regmap_type) { st 79 drivers/iio/dac/ad5686-spi.c st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) | st 81 drivers/iio/dac/ad5686-spi.c st->data[1].d32 = cpu_to_be32(AD5686_CMD(AD5686_CMD_NOOP)); st 87 drivers/iio/dac/ad5686-spi.c return be32_to_cpu(st->data[2].d32); st 31 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 33 drivers/iio/dac/ad5686.c return ((st->pwr_down_mode >> (chan->channel * 2)) & 0x3) - 1; st 40 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 42 drivers/iio/dac/ad5686.c st->pwr_down_mode &= ~(0x3 << (chan->channel * 2)); st 43 drivers/iio/dac/ad5686.c st->pwr_down_mode |= ((mode + 1) << (chan->channel * 2)); st 58 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 60 drivers/iio/dac/ad5686.c return sprintf(buf, "%d\n", !!(st->pwr_down_mask & st 72 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 81 drivers/iio/dac/ad5686.c st->pwr_down_mask |= (0x3 << (chan->channel * 2)); st 83 drivers/iio/dac/ad5686.c st->pwr_down_mask &= ~(0x3 << (chan->channel * 2)); st 85 drivers/iio/dac/ad5686.c switch (st->chip_info->regmap_type) { st 109 drivers/iio/dac/ad5686.c val = ((st->pwr_down_mask & st->pwr_down_mode) << shift); st 110 drivers/iio/dac/ad5686.c if (!st->use_internal_vref) st 113 drivers/iio/dac/ad5686.c ret = st->write(st, AD5686_CMD_POWERDOWN_DAC, st 125 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 131 drivers/iio/dac/ad5686.c ret = st->read(st, chan->address); st 139 drivers/iio/dac/ad5686.c *val = st->vref_mv; st 152 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 161 drivers/iio/dac/ad5686.c ret = st->write(st, st 423 drivers/iio/dac/ad5686.c struct ad5686_state *st; st 429 drivers/iio/dac/ad5686.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 433 drivers/iio/dac/ad5686.c st = iio_priv(indio_dev); st 436 drivers/iio/dac/ad5686.c st->dev = dev; st 437 drivers/iio/dac/ad5686.c st->write = write; st 438 drivers/iio/dac/ad5686.c st->read = read; st 440 drivers/iio/dac/ad5686.c st->reg = devm_regulator_get_optional(dev, "vcc"); st 441 drivers/iio/dac/ad5686.c if (!IS_ERR(st->reg)) { st 442 drivers/iio/dac/ad5686.c ret = regulator_enable(st->reg); st 446 drivers/iio/dac/ad5686.c ret = regulator_get_voltage(st->reg); st 453 drivers/iio/dac/ad5686.c st->chip_info = &ad5686_chip_info_tbl[chip_type]; st 456 drivers/iio/dac/ad5686.c st->vref_mv = voltage_uv / 1000; st 458 drivers/iio/dac/ad5686.c st->vref_mv = st->chip_info->int_vref_mv; st 461 drivers/iio/dac/ad5686.c for (i = 0; i < st->chip_info->num_channels; i++) st 462 drivers/iio/dac/ad5686.c st->pwr_down_mode |= (0x01 << (i * 2)); st 468 drivers/iio/dac/ad5686.c indio_dev->channels = st->chip_info->channels; st 469 drivers/iio/dac/ad5686.c indio_dev->num_channels = st->chip_info->num_channels; st 471 drivers/iio/dac/ad5686.c switch (st->chip_info->regmap_type) { st 475 drivers/iio/dac/ad5686.c st->use_internal_vref = !voltage_uv; st 480 drivers/iio/dac/ad5686.c st->use_internal_vref = !voltage_uv; st 489 drivers/iio/dac/ad5686.c st->use_internal_vref = !voltage_uv; st 498 drivers/iio/dac/ad5686.c ret = st->write(st, cmd, 0, !!val); st 509 drivers/iio/dac/ad5686.c if (!IS_ERR(st->reg)) st 510 drivers/iio/dac/ad5686.c regulator_disable(st->reg); st 518 drivers/iio/dac/ad5686.c struct ad5686_state *st = iio_priv(indio_dev); st 521 drivers/iio/dac/ad5686.c if (!IS_ERR(st->reg)) st 522 drivers/iio/dac/ad5686.c regulator_disable(st->reg); st 91 drivers/iio/dac/ad5686.h typedef int (*ad5686_write_func)(struct ad5686_state *st, st 94 drivers/iio/dac/ad5686.h typedef int (*ad5686_read_func)(struct ad5686_state *st, u8 addr); st 15 drivers/iio/dac/ad5696-i2c.c static int ad5686_i2c_read(struct ad5686_state *st, u8 addr) st 17 drivers/iio/dac/ad5696-i2c.c struct i2c_client *i2c = to_i2c_client(st->dev); st 23 drivers/iio/dac/ad5696-i2c.c .buf = &st->data[0].d8[1], st 29 drivers/iio/dac/ad5696-i2c.c .buf = (char *)&st->data[0].d16, st 34 drivers/iio/dac/ad5696-i2c.c st->data[0].d32 = cpu_to_be32(AD5686_CMD(AD5686_CMD_NOOP) | st 42 drivers/iio/dac/ad5696-i2c.c return be16_to_cpu(st->data[0].d16); st 45 drivers/iio/dac/ad5696-i2c.c static int ad5686_i2c_write(struct ad5686_state *st, st 48 drivers/iio/dac/ad5696-i2c.c struct i2c_client *i2c = to_i2c_client(st->dev); st 51 drivers/iio/dac/ad5696-i2c.c st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) | AD5686_ADDR(addr) st 54 drivers/iio/dac/ad5696-i2c.c ret = i2c_master_send(i2c, &st->data[0].d8[1], 3); st 160 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 162 drivers/iio/dac/ad5755.c st->data[0].d32 = cpu_to_be32((reg << 16) | val); st 164 drivers/iio/dac/ad5755.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 200 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 204 drivers/iio/dac/ad5755.c .tx_buf = &st->data[0].d8[1], st 208 drivers/iio/dac/ad5755.c .tx_buf = &st->data[1].d8[1], st 209 drivers/iio/dac/ad5755.c .rx_buf = &st->data[1].d8[1], st 216 drivers/iio/dac/ad5755.c st->data[0].d32 = cpu_to_be32(AD5755_READ_FLAG | (addr << 16)); st 217 drivers/iio/dac/ad5755.c st->data[1].d32 = cpu_to_be32(AD5755_NOOP); st 219 drivers/iio/dac/ad5755.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 221 drivers/iio/dac/ad5755.c ret = be32_to_cpu(st->data[1].d32) & 0xffff; st 231 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 234 drivers/iio/dac/ad5755.c st->ctrl[channel] |= set; st 235 drivers/iio/dac/ad5755.c st->ctrl[channel] &= ~clr; st 238 drivers/iio/dac/ad5755.c AD5755_CTRL_REG_DAC, st->ctrl[channel]); st 246 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 251 drivers/iio/dac/ad5755.c if ((bool)(st->pwr_down & mask) == pwr_down) st 255 drivers/iio/dac/ad5755.c st->pwr_down &= ~mask; st 262 drivers/iio/dac/ad5755.c st->pwr_down |= mask; st 284 drivers/iio/dac/ad5755.c static void ad5755_get_min_max(struct ad5755_state *st, st 287 drivers/iio/dac/ad5755.c enum ad5755_mode mode = st->ctrl[chan->channel] & 7; st 292 drivers/iio/dac/ad5755.c static inline int ad5755_get_offset(struct ad5755_state *st, st 297 drivers/iio/dac/ad5755.c ad5755_get_min_max(st, chan, &min, &max); st 301 drivers/iio/dac/ad5755.c static int ad5755_chan_reg_info(struct ad5755_state *st, st 319 drivers/iio/dac/ad5755.c *shift = st->chip_info->calib_shift; st 327 drivers/iio/dac/ad5755.c *shift = st->chip_info->calib_shift; st 340 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 347 drivers/iio/dac/ad5755.c ad5755_get_min_max(st, chan, &min, &max); st 352 drivers/iio/dac/ad5755.c *val = ad5755_get_offset(st, chan); st 355 drivers/iio/dac/ad5755.c ret = ad5755_chan_reg_info(st, chan, info, false, st 375 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 379 drivers/iio/dac/ad5755.c ret = ad5755_chan_reg_info(st, chan, info, true, st 396 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 399 drivers/iio/dac/ad5755.c (bool)(st->pwr_down & (1 << chan->channel))); st 471 drivers/iio/dac/ad5755.c static bool ad5755_is_valid_mode(struct ad5755_state *st, enum ad5755_mode mode) st 478 drivers/iio/dac/ad5755.c return st->chip_info->has_voltage_out; st 491 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 526 drivers/iio/dac/ad5755.c if (!ad5755_is_valid_mode(st, pdata->dac[i].mode)) st 560 drivers/iio/dac/ad5755.c struct ad5755_state *st = iio_priv(indio_dev); st 561 drivers/iio/dac/ad5755.c struct iio_chan_spec *channels = st->channels; st 565 drivers/iio/dac/ad5755.c channels[i] = st->chip_info->channel_template; st 731 drivers/iio/dac/ad5755.c struct ad5755_state *st; st 734 drivers/iio/dac/ad5755.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 740 drivers/iio/dac/ad5755.c st = iio_priv(indio_dev); st 743 drivers/iio/dac/ad5755.c st->chip_info = &ad5755_chip_info_tbl[type]; st 744 drivers/iio/dac/ad5755.c st->spi = spi; st 745 drivers/iio/dac/ad5755.c st->pwr_down = 0xf; st 187 drivers/iio/dac/ad5758.c static int ad5758_spi_reg_read(struct ad5758_state *st, unsigned int addr) st 191 drivers/iio/dac/ad5758.c .tx_buf = &st->d32[0], st 195 drivers/iio/dac/ad5758.c .tx_buf = &st->d32[1], st 196 drivers/iio/dac/ad5758.c .rx_buf = &st->d32[2], st 202 drivers/iio/dac/ad5758.c st->d32[0] = cpu_to_be32( st 205 drivers/iio/dac/ad5758.c st->d32[1] = cpu_to_be32(AD5758_WR_FLAG_MSK(AD5758_NOP) << 24); st 207 drivers/iio/dac/ad5758.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 211 drivers/iio/dac/ad5758.c return (be32_to_cpu(st->d32[2]) >> 8) & 0xFFFF; st 214 drivers/iio/dac/ad5758.c static int ad5758_spi_reg_write(struct ad5758_state *st, st 218 drivers/iio/dac/ad5758.c st->d32[0] = cpu_to_be32((AD5758_WR_FLAG_MSK(addr) << 24) | st 221 drivers/iio/dac/ad5758.c return spi_write(st->spi, &st->d32[0], sizeof(st->d32[0])); st 224 drivers/iio/dac/ad5758.c static int ad5758_spi_write_mask(struct ad5758_state *st, st 231 drivers/iio/dac/ad5758.c regval = ad5758_spi_reg_read(st, addr); st 238 drivers/iio/dac/ad5758.c return ad5758_spi_reg_write(st, addr, regval); st 259 drivers/iio/dac/ad5758.c static int ad5758_wait_for_task_complete(struct ad5758_state *st, st 268 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_read(st, reg); st 278 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, st 284 drivers/iio/dac/ad5758.c static int ad5758_calib_mem_refresh(struct ad5758_state *st) st 288 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, AD5758_KEY, st 291 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, st 297 drivers/iio/dac/ad5758.c return ad5758_wait_for_task_complete(st, AD5758_DIGITAL_DIAG_RESULTS, st 301 drivers/iio/dac/ad5758.c static int ad5758_soft_reset(struct ad5758_state *st) st 305 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, AD5758_KEY, AD5758_KEY_CODE_RESET_1); st 309 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, AD5758_KEY, AD5758_KEY_CODE_RESET_2); st 317 drivers/iio/dac/ad5758.c static int ad5758_set_dc_dc_conv_mode(struct ad5758_state *st, st 327 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_ADC_CONFIG, st 334 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DCDC_CONFIG1, st 344 drivers/iio/dac/ad5758.c ret = ad5758_wait_for_task_complete(st, AD5758_DCDC_CONFIG2, st 349 drivers/iio/dac/ad5758.c st->dc_dc_mode = mode; st 354 drivers/iio/dac/ad5758.c static int ad5758_set_dc_dc_ilim(struct ad5758_state *st, unsigned int ilim) st 358 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DCDC_CONFIG2, st 367 drivers/iio/dac/ad5758.c return ad5758_wait_for_task_complete(st, AD5758_DCDC_CONFIG2, st 371 drivers/iio/dac/ad5758.c static int ad5758_slew_rate_set(struct ad5758_state *st, st 386 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DAC_CONFIG, mask, mode); st 391 drivers/iio/dac/ad5758.c return ad5758_wait_for_task_complete(st, AD5758_DIGITAL_DIAG_RESULTS, st 395 drivers/iio/dac/ad5758.c static int ad5758_slew_rate_config(struct ad5758_state *st) st 420 drivers/iio/dac/ad5758.c do_div(sr_step, st->slew_time); st 437 drivers/iio/dac/ad5758.c diff_new = abs(st->slew_time - calc_slew_time); st 445 drivers/iio/dac/ad5758.c return ad5758_slew_rate_set(st, sr_clk_idx, sr_step_idx); st 448 drivers/iio/dac/ad5758.c static int ad5758_set_out_range(struct ad5758_state *st, int range) st 452 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DAC_CONFIG, st 459 drivers/iio/dac/ad5758.c return ad5758_wait_for_task_complete(st, AD5758_DIGITAL_DIAG_RESULTS, st 463 drivers/iio/dac/ad5758.c static int ad5758_internal_buffers_en(struct ad5758_state *st, bool enable) st 467 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DAC_CONFIG, st 474 drivers/iio/dac/ad5758.c return ad5758_wait_for_task_complete(st, AD5758_DIGITAL_DIAG_RESULTS, st 478 drivers/iio/dac/ad5758.c static int ad5758_reset(struct ad5758_state *st) st 480 drivers/iio/dac/ad5758.c if (st->gpio_reset) { st 481 drivers/iio/dac/ad5758.c gpiod_set_value(st->gpio_reset, 0); st 483 drivers/iio/dac/ad5758.c gpiod_set_value(st->gpio_reset, 1); st 489 drivers/iio/dac/ad5758.c return ad5758_soft_reset(st); st 498 drivers/iio/dac/ad5758.c struct ad5758_state *st = iio_priv(indio_dev); st 501 drivers/iio/dac/ad5758.c mutex_lock(&st->lock); st 503 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_read(st, reg); st 505 drivers/iio/dac/ad5758.c mutex_unlock(&st->lock); st 512 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, reg, writeval); st 514 drivers/iio/dac/ad5758.c mutex_unlock(&st->lock); st 523 drivers/iio/dac/ad5758.c struct ad5758_state *st = iio_priv(indio_dev); st 528 drivers/iio/dac/ad5758.c mutex_lock(&st->lock); st 529 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_read(st, AD5758_DAC_INPUT); st 530 drivers/iio/dac/ad5758.c mutex_unlock(&st->lock); st 537 drivers/iio/dac/ad5758.c min = st->out_range.min; st 538 drivers/iio/dac/ad5758.c max = st->out_range.max; st 543 drivers/iio/dac/ad5758.c min = st->out_range.min; st 544 drivers/iio/dac/ad5758.c max = st->out_range.max; st 556 drivers/iio/dac/ad5758.c struct ad5758_state *st = iio_priv(indio_dev); st 561 drivers/iio/dac/ad5758.c mutex_lock(&st->lock); st 562 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, AD5758_DAC_INPUT, val); st 563 drivers/iio/dac/ad5758.c mutex_unlock(&st->lock); st 575 drivers/iio/dac/ad5758.c struct ad5758_state *st = iio_priv(indio_dev); st 577 drivers/iio/dac/ad5758.c return sprintf(buf, "%d\n", st->pwr_down); st 585 drivers/iio/dac/ad5758.c struct ad5758_state *st = iio_priv(indio_dev); st 595 drivers/iio/dac/ad5758.c mutex_lock(&st->lock); st 606 drivers/iio/dac/ad5758.c ret = ad5758_spi_write_mask(st, AD5758_DAC_CONFIG, st 612 drivers/iio/dac/ad5758.c st->pwr_down = pwr_down; st 615 drivers/iio/dac/ad5758.c mutex_unlock(&st->lock); st 666 drivers/iio/dac/ad5758.c static int ad5758_crc_disable(struct ad5758_state *st) st 671 drivers/iio/dac/ad5758.c st->d32[0] = cpu_to_be32(mask); st 673 drivers/iio/dac/ad5758.c return spi_write(st->spi, &st->d32[0], 4); st 676 drivers/iio/dac/ad5758.c static int ad5758_find_out_range(struct ad5758_state *st, st 685 drivers/iio/dac/ad5758.c st->out_range.reg = range[i].reg; st 686 drivers/iio/dac/ad5758.c st->out_range.min = range[i].min; st 687 drivers/iio/dac/ad5758.c st->out_range.max = range[i].max; st 696 drivers/iio/dac/ad5758.c static int ad5758_parse_dt(struct ad5758_state *st) st 702 drivers/iio/dac/ad5758.c st->dc_dc_ilim = 0; st 703 drivers/iio/dac/ad5758.c ret = device_property_read_u32(&st->spi->dev, st 706 drivers/iio/dac/ad5758.c dev_dbg(&st->spi->dev, st 713 drivers/iio/dac/ad5758.c dev_dbg(&st->spi->dev, "dc-dc-ilim out of range\n"); st 715 drivers/iio/dac/ad5758.c st->dc_dc_ilim = index - ad5758_dc_dc_ilim; st 718 drivers/iio/dac/ad5758.c ret = device_property_read_u32(&st->spi->dev, "adi,dc-dc-mode", st 719 drivers/iio/dac/ad5758.c &st->dc_dc_mode); st 721 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, "Missing \"dc-dc-mode\" property\n"); st 725 drivers/iio/dac/ad5758.c if (!ad5758_is_valid_mode(st->dc_dc_mode)) st 728 drivers/iio/dac/ad5758.c if (st->dc_dc_mode == AD5758_DCDC_MODE_DPC_VOLTAGE) { st 729 drivers/iio/dac/ad5758.c ret = device_property_read_u32_array(&st->spi->dev, st 733 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, st 740 drivers/iio/dac/ad5758.c ret = device_property_read_u32_array(&st->spi->dev, st 744 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, st 752 drivers/iio/dac/ad5758.c ret = ad5758_find_out_range(st, range, size, tmparray[0], tmparray[1]); st 754 drivers/iio/dac/ad5758.c dev_err(&st->spi->dev, "range invalid\n"); st 758 drivers/iio/dac/ad5758.c ret = device_property_read_u32(&st->spi->dev, "adi,slew-time-us", &tmp); st 760 drivers/iio/dac/ad5758.c dev_dbg(&st->spi->dev, "Missing \"slew-time-us\" property\n"); st 761 drivers/iio/dac/ad5758.c st->slew_time = 0; st 763 drivers/iio/dac/ad5758.c st->slew_time = tmp; st 769 drivers/iio/dac/ad5758.c static int ad5758_init(struct ad5758_state *st) st 773 drivers/iio/dac/ad5758.c st->gpio_reset = devm_gpiod_get_optional(&st->spi->dev, "reset", st 775 drivers/iio/dac/ad5758.c if (IS_ERR(st->gpio_reset)) st 776 drivers/iio/dac/ad5758.c return PTR_ERR(st->gpio_reset); st 779 drivers/iio/dac/ad5758.c ret = ad5758_crc_disable(st); st 784 drivers/iio/dac/ad5758.c ret = ad5758_reset(st); st 789 drivers/iio/dac/ad5758.c ret = ad5758_crc_disable(st); st 794 drivers/iio/dac/ad5758.c ret = ad5758_calib_mem_refresh(st); st 798 drivers/iio/dac/ad5758.c regval = ad5758_spi_reg_read(st, AD5758_DIGITAL_DIAG_RESULTS); st 803 drivers/iio/dac/ad5758.c ret = ad5758_spi_reg_write(st, AD5758_DIGITAL_DIAG_RESULTS, regval); st 808 drivers/iio/dac/ad5758.c ret = ad5758_set_dc_dc_ilim(st, st->dc_dc_ilim); st 813 drivers/iio/dac/ad5758.c ret = ad5758_set_dc_dc_conv_mode(st, st->dc_dc_mode); st 818 drivers/iio/dac/ad5758.c ret = ad5758_set_out_range(st, st->out_range.reg); st 823 drivers/iio/dac/ad5758.c if (st->slew_time) { st 824 drivers/iio/dac/ad5758.c ret = ad5758_slew_rate_config(st); st 830 drivers/iio/dac/ad5758.c ret = ad5758_internal_buffers_en(st, 1); st 835 drivers/iio/dac/ad5758.c return ad5758_spi_write_mask(st, AD5758_DAC_CONFIG, st 842 drivers/iio/dac/ad5758.c struct ad5758_state *st; st 846 drivers/iio/dac/ad5758.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 850 drivers/iio/dac/ad5758.c st = iio_priv(indio_dev); st 853 drivers/iio/dac/ad5758.c st->spi = spi; st 855 drivers/iio/dac/ad5758.c mutex_init(&st->lock); st 863 drivers/iio/dac/ad5758.c ret = ad5758_parse_dt(st); st 867 drivers/iio/dac/ad5758.c if (st->dc_dc_mode == AD5758_DCDC_MODE_DPC_VOLTAGE) st 872 drivers/iio/dac/ad5758.c ret = ad5758_init(st); st 878 drivers/iio/dac/ad5758.c return devm_iio_device_register(&st->spi->dev, indio_dev); st 115 drivers/iio/dac/ad5761.c static int _ad5761_spi_write(struct ad5761_state *st, u8 addr, u16 val) st 117 drivers/iio/dac/ad5761.c st->data[0].d32 = cpu_to_be32(AD5761_ADDR(addr) | val); st 119 drivers/iio/dac/ad5761.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 124 drivers/iio/dac/ad5761.c struct ad5761_state *st = iio_priv(indio_dev); st 128 drivers/iio/dac/ad5761.c ret = _ad5761_spi_write(st, addr, val); st 134 drivers/iio/dac/ad5761.c static int _ad5761_spi_read(struct ad5761_state *st, u8 addr, u16 *val) st 139 drivers/iio/dac/ad5761.c .tx_buf = &st->data[0].d8[1], st 144 drivers/iio/dac/ad5761.c .tx_buf = &st->data[1].d8[1], st 145 drivers/iio/dac/ad5761.c .rx_buf = &st->data[2].d8[1], st 151 drivers/iio/dac/ad5761.c st->data[0].d32 = cpu_to_be32(AD5761_ADDR(addr)); st 152 drivers/iio/dac/ad5761.c st->data[1].d32 = cpu_to_be32(AD5761_ADDR(AD5761_ADDR_NOOP)); st 154 drivers/iio/dac/ad5761.c ret = spi_sync_transfer(st->spi, xfers, ARRAY_SIZE(xfers)); st 156 drivers/iio/dac/ad5761.c *val = be32_to_cpu(st->data[2].d32); st 163 drivers/iio/dac/ad5761.c struct ad5761_state *st = iio_priv(indio_dev); st 167 drivers/iio/dac/ad5761.c ret = _ad5761_spi_read(st, addr, val); st 173 drivers/iio/dac/ad5761.c static int ad5761_spi_set_range(struct ad5761_state *st, st 181 drivers/iio/dac/ad5761.c if (st->use_intref) st 184 drivers/iio/dac/ad5761.c ret = _ad5761_spi_write(st, AD5761_ADDR_SW_FULL_RESET, 0); st 188 drivers/iio/dac/ad5761.c ret = _ad5761_spi_write(st, AD5761_ADDR_CTRL_WRITE_REG, aux); st 192 drivers/iio/dac/ad5761.c st->range = range; st 203 drivers/iio/dac/ad5761.c struct ad5761_state *st; st 215 drivers/iio/dac/ad5761.c st = iio_priv(indio_dev); st 216 drivers/iio/dac/ad5761.c *val = st->vref * ad5761_range_params[st->range].m; st 221 drivers/iio/dac/ad5761.c st = iio_priv(indio_dev); st 223 drivers/iio/dac/ad5761.c *val *= ad5761_range_params[st->range].c; st 224 drivers/iio/dac/ad5761.c *val /= ad5761_range_params[st->range].m; st 288 drivers/iio/dac/ad5761.c static int ad5761_get_vref(struct ad5761_state *st, st 293 drivers/iio/dac/ad5761.c st->vref_reg = devm_regulator_get_optional(&st->spi->dev, "vref"); st 294 drivers/iio/dac/ad5761.c if (PTR_ERR(st->vref_reg) == -ENODEV) { st 297 drivers/iio/dac/ad5761.c dev_err(&st->spi->dev, st 302 drivers/iio/dac/ad5761.c st->use_intref = true; st 303 drivers/iio/dac/ad5761.c st->vref = chip_info->int_vref; st 307 drivers/iio/dac/ad5761.c if (IS_ERR(st->vref_reg)) { st 308 drivers/iio/dac/ad5761.c dev_err(&st->spi->dev, st 310 drivers/iio/dac/ad5761.c return PTR_ERR(st->vref_reg); st 313 drivers/iio/dac/ad5761.c ret = regulator_enable(st->vref_reg); st 315 drivers/iio/dac/ad5761.c dev_err(&st->spi->dev, st 320 drivers/iio/dac/ad5761.c ret = regulator_get_voltage(st->vref_reg); st 322 drivers/iio/dac/ad5761.c dev_err(&st->spi->dev, st 328 drivers/iio/dac/ad5761.c dev_warn(&st->spi->dev, st 334 drivers/iio/dac/ad5761.c st->vref = ret / 1000; st 335 drivers/iio/dac/ad5761.c st->use_intref = false; st 340 drivers/iio/dac/ad5761.c regulator_disable(st->vref_reg); st 341 drivers/iio/dac/ad5761.c st->vref_reg = NULL; st 348 drivers/iio/dac/ad5761.c struct ad5761_state *st; st 355 drivers/iio/dac/ad5761.c iio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 359 drivers/iio/dac/ad5761.c st = iio_priv(iio_dev); st 361 drivers/iio/dac/ad5761.c st->spi = spi; st 364 drivers/iio/dac/ad5761.c ret = ad5761_get_vref(st, chip_info); st 371 drivers/iio/dac/ad5761.c ret = ad5761_spi_set_range(st, voltage_range); st 380 drivers/iio/dac/ad5761.c iio_dev->name = spi_get_device_id(st->spi)->name; st 388 drivers/iio/dac/ad5761.c if (!IS_ERR_OR_NULL(st->vref_reg)) st 389 drivers/iio/dac/ad5761.c regulator_disable(st->vref_reg); st 397 drivers/iio/dac/ad5761.c struct ad5761_state *st = iio_priv(iio_dev); st 401 drivers/iio/dac/ad5761.c if (!IS_ERR_OR_NULL(st->vref_reg)) st 402 drivers/iio/dac/ad5761.c regulator_disable(st->vref_reg); st 126 drivers/iio/dac/ad5764.c struct ad5764_state *st = iio_priv(indio_dev); st 130 drivers/iio/dac/ad5764.c st->data[0].d32 = cpu_to_be32((reg << 16) | val); st 132 drivers/iio/dac/ad5764.c ret = spi_write(st->spi, &st->data[0].d8[1], 3); st 141 drivers/iio/dac/ad5764.c struct ad5764_state *st = iio_priv(indio_dev); st 145 drivers/iio/dac/ad5764.c .tx_buf = &st->data[0].d8[1], st 149 drivers/iio/dac/ad5764.c .rx_buf = &st->data[1].d8[1], st 156 drivers/iio/dac/ad5764.c st->data[0].d32 = cpu_to_be32((1 << 23) | (reg << 16)); st 158 drivers/iio/dac/ad5764.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 160 drivers/iio/dac/ad5764.c *val = be32_to_cpu(st->data[1].d32) & 0xffff; st 211 drivers/iio/dac/ad5764.c static int ad5764_get_channel_vref(struct ad5764_state *st, st 214 drivers/iio/dac/ad5764.c if (st->chip_info->int_vref) st 215 drivers/iio/dac/ad5764.c return st->chip_info->int_vref; st 217 drivers/iio/dac/ad5764.c return regulator_get_voltage(st->vref_reg[channel / 2].consumer); st 223 drivers/iio/dac/ad5764.c struct ad5764_state *st = iio_priv(indio_dev); st 252 drivers/iio/dac/ad5764.c vref = ad5764_get_channel_vref(st, chan->channel); st 276 drivers/iio/dac/ad5764.c struct ad5764_state *st; st 279 drivers/iio/dac/ad5764.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 285 drivers/iio/dac/ad5764.c st = iio_priv(indio_dev); st 288 drivers/iio/dac/ad5764.c st->spi = spi; st 289 drivers/iio/dac/ad5764.c st->chip_info = &ad5764_chip_infos[type]; st 296 drivers/iio/dac/ad5764.c indio_dev->channels = st->chip_info->channels; st 298 drivers/iio/dac/ad5764.c if (st->chip_info->int_vref == 0) { st 299 drivers/iio/dac/ad5764.c st->vref_reg[0].supply = "vrefAB"; st 300 drivers/iio/dac/ad5764.c st->vref_reg[1].supply = "vrefCD"; st 302 drivers/iio/dac/ad5764.c ret = devm_regulator_bulk_get(&st->spi->dev, st 303 drivers/iio/dac/ad5764.c ARRAY_SIZE(st->vref_reg), st->vref_reg); st 310 drivers/iio/dac/ad5764.c ret = regulator_bulk_enable(ARRAY_SIZE(st->vref_reg), st 311 drivers/iio/dac/ad5764.c st->vref_reg); st 328 drivers/iio/dac/ad5764.c if (st->chip_info->int_vref == 0) st 329 drivers/iio/dac/ad5764.c regulator_bulk_disable(ARRAY_SIZE(st->vref_reg), st->vref_reg); st 336 drivers/iio/dac/ad5764.c struct ad5764_state *st = iio_priv(indio_dev); st 340 drivers/iio/dac/ad5764.c if (st->chip_info->int_vref == 0) st 341 drivers/iio/dac/ad5764.c regulator_bulk_disable(ARRAY_SIZE(st->vref_reg), st->vref_reg); st 110 drivers/iio/dac/ad5791.c static int ad5791_spi_write(struct ad5791_state *st, u8 addr, u32 val) st 112 drivers/iio/dac/ad5791.c st->data[0].d32 = cpu_to_be32(AD5791_CMD_WRITE | st 116 drivers/iio/dac/ad5791.c return spi_write(st->spi, &st->data[0].d8[1], 3); st 119 drivers/iio/dac/ad5791.c static int ad5791_spi_read(struct ad5791_state *st, u8 addr, u32 *val) st 124 drivers/iio/dac/ad5791.c .tx_buf = &st->data[0].d8[1], st 129 drivers/iio/dac/ad5791.c .tx_buf = &st->data[1].d8[1], st 130 drivers/iio/dac/ad5791.c .rx_buf = &st->data[2].d8[1], st 136 drivers/iio/dac/ad5791.c st->data[0].d32 = cpu_to_be32(AD5791_CMD_READ | st 138 drivers/iio/dac/ad5791.c st->data[1].d32 = cpu_to_be32(AD5791_ADDR(AD5791_ADDR_NOOP)); st 140 drivers/iio/dac/ad5791.c ret = spi_sync_transfer(st->spi, xfers, ARRAY_SIZE(xfers)); st 142 drivers/iio/dac/ad5791.c *val = be32_to_cpu(st->data[2].d32); st 155 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 157 drivers/iio/dac/ad5791.c return st->pwr_down_mode; st 163 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 165 drivers/iio/dac/ad5791.c st->pwr_down_mode = mode; st 180 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 182 drivers/iio/dac/ad5791.c return sprintf(buf, "%d\n", st->pwr_down); st 191 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 198 drivers/iio/dac/ad5791.c st->ctrl &= ~(AD5791_CTRL_OPGND | AD5791_CTRL_DACTRI); st 200 drivers/iio/dac/ad5791.c if (st->pwr_down_mode == AD5791_DAC_PWRDN_6K) st 201 drivers/iio/dac/ad5791.c st->ctrl |= AD5791_CTRL_OPGND; st 202 drivers/iio/dac/ad5791.c else if (st->pwr_down_mode == AD5791_DAC_PWRDN_3STATE) st 203 drivers/iio/dac/ad5791.c st->ctrl |= AD5791_CTRL_DACTRI; st 205 drivers/iio/dac/ad5791.c st->pwr_down = pwr_down; st 207 drivers/iio/dac/ad5791.c ret = ad5791_spi_write(st, AD5791_ADDR_CTRL, st->ctrl); st 254 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 260 drivers/iio/dac/ad5791.c ret = ad5791_spi_read(st, chan->address, val); st 267 drivers/iio/dac/ad5791.c *val = st->vref_mv; st 271 drivers/iio/dac/ad5791.c val64 = (((u64)st->vref_neg_mv) << chan->scan_type.realbits); st 272 drivers/iio/dac/ad5791.c do_div(val64, st->vref_mv); st 325 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 332 drivers/iio/dac/ad5791.c return ad5791_spi_write(st, chan->address, val); st 348 drivers/iio/dac/ad5791.c struct ad5791_state *st; st 351 drivers/iio/dac/ad5791.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 354 drivers/iio/dac/ad5791.c st = iio_priv(indio_dev); st 355 drivers/iio/dac/ad5791.c st->reg_vdd = devm_regulator_get(&spi->dev, "vdd"); st 356 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vdd)) { st 357 drivers/iio/dac/ad5791.c ret = regulator_enable(st->reg_vdd); st 361 drivers/iio/dac/ad5791.c ret = regulator_get_voltage(st->reg_vdd); st 368 drivers/iio/dac/ad5791.c st->reg_vss = devm_regulator_get(&spi->dev, "vss"); st 369 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vss)) { st 370 drivers/iio/dac/ad5791.c ret = regulator_enable(st->reg_vss); st 374 drivers/iio/dac/ad5791.c ret = regulator_get_voltage(st->reg_vss); st 381 drivers/iio/dac/ad5791.c st->pwr_down = true; st 382 drivers/iio/dac/ad5791.c st->spi = spi; st 384 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vss) && !IS_ERR(st->reg_vdd)) { st 385 drivers/iio/dac/ad5791.c st->vref_mv = (pos_voltage_uv + neg_voltage_uv) / 1000; st 386 drivers/iio/dac/ad5791.c st->vref_neg_mv = neg_voltage_uv / 1000; st 388 drivers/iio/dac/ad5791.c st->vref_mv = pdata->vref_pos_mv + pdata->vref_neg_mv; st 389 drivers/iio/dac/ad5791.c st->vref_neg_mv = pdata->vref_neg_mv; st 394 drivers/iio/dac/ad5791.c ret = ad5791_spi_write(st, AD5791_ADDR_SW_CTRL, AD5791_SWCTRL_RESET); st 398 drivers/iio/dac/ad5791.c st->chip_info = &ad5791_chip_info_tbl[spi_get_device_id(spi) st 402 drivers/iio/dac/ad5791.c st->ctrl = AD5761_CTRL_LINCOMP(st->chip_info->get_lin_comp(st->vref_mv)) st 406 drivers/iio/dac/ad5791.c ret = ad5791_spi_write(st, AD5791_ADDR_CTRL, st->ctrl | st 418 drivers/iio/dac/ad5791.c indio_dev->name = spi_get_device_id(st->spi)->name; st 426 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vss)) st 427 drivers/iio/dac/ad5791.c regulator_disable(st->reg_vss); st 429 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vdd)) st 430 drivers/iio/dac/ad5791.c regulator_disable(st->reg_vdd); st 437 drivers/iio/dac/ad5791.c struct ad5791_state *st = iio_priv(indio_dev); st 440 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vdd)) st 441 drivers/iio/dac/ad5791.c regulator_disable(st->reg_vdd); st 443 drivers/iio/dac/ad5791.c if (!IS_ERR(st->reg_vss)) st 444 drivers/iio/dac/ad5791.c regulator_disable(st->reg_vss); st 51 drivers/iio/dac/ad7303.c static int ad7303_write(struct ad7303_state *st, unsigned int chan, st 54 drivers/iio/dac/ad7303.c st->data = cpu_to_be16(AD7303_CMD_UPDATE_DAC | st 56 drivers/iio/dac/ad7303.c st->config | val); st 58 drivers/iio/dac/ad7303.c return spi_write(st->spi, &st->data, sizeof(st->data)); st 64 drivers/iio/dac/ad7303.c struct ad7303_state *st = iio_priv(indio_dev); st 66 drivers/iio/dac/ad7303.c return sprintf(buf, "%d\n", (bool)(st->config & st 74 drivers/iio/dac/ad7303.c struct ad7303_state *st = iio_priv(indio_dev); st 85 drivers/iio/dac/ad7303.c st->config |= AD7303_CFG_POWER_DOWN(chan->channel); st 87 drivers/iio/dac/ad7303.c st->config &= ~AD7303_CFG_POWER_DOWN(chan->channel); st 91 drivers/iio/dac/ad7303.c ad7303_write(st, chan->channel, st->dac_cache[chan->channel]); st 97 drivers/iio/dac/ad7303.c static int ad7303_get_vref(struct ad7303_state *st, st 102 drivers/iio/dac/ad7303.c if (st->config & AD7303_CFG_EXTERNAL_VREF) st 103 drivers/iio/dac/ad7303.c return regulator_get_voltage(st->vref_reg); st 105 drivers/iio/dac/ad7303.c ret = regulator_get_voltage(st->vdd_reg); st 114 drivers/iio/dac/ad7303.c struct ad7303_state *st = iio_priv(indio_dev); st 119 drivers/iio/dac/ad7303.c *val = st->dac_cache[chan->channel]; st 122 drivers/iio/dac/ad7303.c vref_uv = ad7303_get_vref(st, chan); st 139 drivers/iio/dac/ad7303.c struct ad7303_state *st = iio_priv(indio_dev); st 148 drivers/iio/dac/ad7303.c ret = ad7303_write(st, chan->address, val); st 150 drivers/iio/dac/ad7303.c st->dac_cache[chan->channel] = val; st 201 drivers/iio/dac/ad7303.c struct ad7303_state *st; st 205 drivers/iio/dac/ad7303.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 209 drivers/iio/dac/ad7303.c st = iio_priv(indio_dev); st 212 drivers/iio/dac/ad7303.c st->spi = spi; st 214 drivers/iio/dac/ad7303.c st->vdd_reg = devm_regulator_get(&spi->dev, "Vdd"); st 215 drivers/iio/dac/ad7303.c if (IS_ERR(st->vdd_reg)) st 216 drivers/iio/dac/ad7303.c return PTR_ERR(st->vdd_reg); st 218 drivers/iio/dac/ad7303.c ret = regulator_enable(st->vdd_reg); st 234 drivers/iio/dac/ad7303.c st->vref_reg = devm_regulator_get(&spi->dev, "REF"); st 235 drivers/iio/dac/ad7303.c if (IS_ERR(st->vref_reg)) { st 236 drivers/iio/dac/ad7303.c ret = PTR_ERR(st->vref_reg); st 240 drivers/iio/dac/ad7303.c ret = regulator_enable(st->vref_reg); st 244 drivers/iio/dac/ad7303.c st->config |= AD7303_CFG_EXTERNAL_VREF; st 261 drivers/iio/dac/ad7303.c if (st->vref_reg) st 262 drivers/iio/dac/ad7303.c regulator_disable(st->vref_reg); st 264 drivers/iio/dac/ad7303.c regulator_disable(st->vdd_reg); st 271 drivers/iio/dac/ad7303.c struct ad7303_state *st = iio_priv(indio_dev); st 275 drivers/iio/dac/ad7303.c if (st->vref_reg) st 276 drivers/iio/dac/ad7303.c regulator_disable(st->vref_reg); st 277 drivers/iio/dac/ad7303.c regulator_disable(st->vdd_reg); st 89 drivers/iio/dac/ltc2632.c const struct ltc2632_state *st = iio_priv(indio_dev); st 93 drivers/iio/dac/ltc2632.c *val = st->vref_mv; st 106 drivers/iio/dac/ltc2632.c struct ltc2632_state *st = iio_priv(indio_dev); st 113 drivers/iio/dac/ltc2632.c return ltc2632_spi_write(st->spi_dev, st 127 drivers/iio/dac/ltc2632.c struct ltc2632_state *st = iio_priv(indio_dev); st 130 drivers/iio/dac/ltc2632.c !!(st->powerdown_cache_mask & (1 << chan->channel))); st 141 drivers/iio/dac/ltc2632.c struct ltc2632_state *st = iio_priv(indio_dev); st 148 drivers/iio/dac/ltc2632.c st->powerdown_cache_mask |= (1 << chan->channel); st 150 drivers/iio/dac/ltc2632.c st->powerdown_cache_mask &= ~(1 << chan->channel); st 152 drivers/iio/dac/ltc2632.c ret = ltc2632_spi_write(st->spi_dev, st 232 drivers/iio/dac/ltc2632.c struct ltc2632_state *st; st 237 drivers/iio/dac/ltc2632.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 241 drivers/iio/dac/ltc2632.c st = iio_priv(indio_dev); st 244 drivers/iio/dac/ltc2632.c st->spi_dev = spi; st 249 drivers/iio/dac/ltc2632.c st->vref_reg = devm_regulator_get_optional(&spi->dev, "vref"); st 250 drivers/iio/dac/ltc2632.c if (PTR_ERR(st->vref_reg) == -ENODEV) { st 252 drivers/iio/dac/ltc2632.c st->vref_reg = NULL; st 253 drivers/iio/dac/ltc2632.c st->vref_mv = chip_info->vref_mv; st 263 drivers/iio/dac/ltc2632.c } else if (IS_ERR(st->vref_reg)) { st 266 drivers/iio/dac/ltc2632.c return PTR_ERR(st->vref_reg); st 269 drivers/iio/dac/ltc2632.c ret = regulator_enable(st->vref_reg); st 276 drivers/iio/dac/ltc2632.c st->vref_mv = regulator_get_voltage(st->vref_reg) / 1000; st 302 drivers/iio/dac/ltc2632.c struct ltc2632_state *st = iio_priv(indio_dev); st 306 drivers/iio/dac/ltc2632.c if (st->vref_reg) st 307 drivers/iio/dac/ltc2632.c regulator_disable(st->vref_reg); st 57 drivers/iio/dac/max5821.c struct max5821_data *st = iio_priv(indio_dev); st 59 drivers/iio/dac/max5821.c return st->powerdown_mode[chan->channel]; st 66 drivers/iio/dac/max5821.c struct max5821_data *st = iio_priv(indio_dev); st 68 drivers/iio/dac/max5821.c st->powerdown_mode[chan->channel] = mode; st 85 drivers/iio/dac/max5821.c struct max5821_data *st = iio_priv(indio_dev); st 87 drivers/iio/dac/max5821.c return sprintf(buf, "%d\n", st->powerdown[chan->channel]); st 285 drivers/iio/dummy/iio_simple_dummy.c struct iio_dummy_state *st = iio_priv(indio_dev); st 288 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 295 drivers/iio/dummy/iio_simple_dummy.c *val = st->dac_val; st 299 drivers/iio/dummy/iio_simple_dummy.c *val = st->differential_adc_val[0]; st 301 drivers/iio/dummy/iio_simple_dummy.c *val = st->differential_adc_val[1]; st 304 drivers/iio/dummy/iio_simple_dummy.c *val = st->single_ended_adc_val; st 309 drivers/iio/dummy/iio_simple_dummy.c *val = st->accel_val; st 319 drivers/iio/dummy/iio_simple_dummy.c *val = st->steps; st 325 drivers/iio/dummy/iio_simple_dummy.c *val = st->activity_running; st 329 drivers/iio/dummy/iio_simple_dummy.c *val = st->activity_walking; st 368 drivers/iio/dummy/iio_simple_dummy.c *val = st->accel_calibbias; st 372 drivers/iio/dummy/iio_simple_dummy.c *val = st->accel_calibscale->val; st 373 drivers/iio/dummy/iio_simple_dummy.c *val2 = st->accel_calibscale->val2; st 384 drivers/iio/dummy/iio_simple_dummy.c *val = st->steps_enabled; st 394 drivers/iio/dummy/iio_simple_dummy.c *val = st->height; st 405 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 430 drivers/iio/dummy/iio_simple_dummy.c struct iio_dummy_state *st = iio_priv(indio_dev); st 440 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 441 drivers/iio/dummy/iio_simple_dummy.c st->dac_val = val; st 442 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 450 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 451 drivers/iio/dummy/iio_simple_dummy.c st->steps = val; st 452 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 461 drivers/iio/dummy/iio_simple_dummy.c st->activity_running = val; st 464 drivers/iio/dummy/iio_simple_dummy.c st->activity_walking = val; st 474 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 483 drivers/iio/dummy/iio_simple_dummy.c st->accel_calibscale = &dummy_scales[i]; st 484 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 487 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 488 drivers/iio/dummy/iio_simple_dummy.c st->accel_calibbias = val; st 489 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 494 drivers/iio/dummy/iio_simple_dummy.c mutex_lock(&st->lock); st 495 drivers/iio/dummy/iio_simple_dummy.c st->steps_enabled = val; st 496 drivers/iio/dummy/iio_simple_dummy.c mutex_unlock(&st->lock); st 504 drivers/iio/dummy/iio_simple_dummy.c st->height = val; st 538 drivers/iio/dummy/iio_simple_dummy.c struct iio_dummy_state *st = iio_priv(indio_dev); st 540 drivers/iio/dummy/iio_simple_dummy.c st->dac_val = 0; st 541 drivers/iio/dummy/iio_simple_dummy.c st->single_ended_adc_val = 73; st 542 drivers/iio/dummy/iio_simple_dummy.c st->differential_adc_val[0] = 33; st 543 drivers/iio/dummy/iio_simple_dummy.c st->differential_adc_val[1] = -34; st 544 drivers/iio/dummy/iio_simple_dummy.c st->accel_val = 34; st 545 drivers/iio/dummy/iio_simple_dummy.c st->accel_calibbias = -7; st 546 drivers/iio/dummy/iio_simple_dummy.c st->accel_calibscale = &dummy_scales[0]; st 547 drivers/iio/dummy/iio_simple_dummy.c st->steps = 47; st 548 drivers/iio/dummy/iio_simple_dummy.c st->activity_running = 98; st 549 drivers/iio/dummy/iio_simple_dummy.c st->activity_walking = 4; st 567 drivers/iio/dummy/iio_simple_dummy.c struct iio_dummy_state *st; st 583 drivers/iio/dummy/iio_simple_dummy.c indio_dev = iio_device_alloc(sizeof(*st)); st 589 drivers/iio/dummy/iio_simple_dummy.c st = iio_priv(indio_dev); st 590 drivers/iio/dummy/iio_simple_dummy.c mutex_init(&st->lock); st 35 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 37 drivers/iio/dummy/iio_simple_dummy_events.c return st->event_en; st 58 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 69 drivers/iio/dummy/iio_simple_dummy_events.c st->event_en = state; st 80 drivers/iio/dummy/iio_simple_dummy_events.c st->event_en = state; st 89 drivers/iio/dummy/iio_simple_dummy_events.c st->event_en = state; st 124 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 126 drivers/iio/dummy/iio_simple_dummy_events.c *val = st->event_val; st 147 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 149 drivers/iio/dummy/iio_simple_dummy_events.c st->event_val = val; st 157 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 159 drivers/iio/dummy/iio_simple_dummy_events.c st->event_timestamp = iio_get_time_ns(indio_dev); st 176 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 179 drivers/iio/dummy/iio_simple_dummy_events.c st->regs->reg_id, st->regs->reg_data); st 181 drivers/iio/dummy/iio_simple_dummy_events.c switch (st->regs->reg_data) { st 187 drivers/iio/dummy/iio_simple_dummy_events.c st->event_timestamp); st 190 drivers/iio/dummy/iio_simple_dummy_events.c if (st->activity_running > st->event_val) st 197 drivers/iio/dummy/iio_simple_dummy_events.c st->event_timestamp); st 200 drivers/iio/dummy/iio_simple_dummy_events.c if (st->activity_walking < st->event_val) st 207 drivers/iio/dummy/iio_simple_dummy_events.c st->event_timestamp); st 214 drivers/iio/dummy/iio_simple_dummy_events.c st->event_timestamp); st 236 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 240 drivers/iio/dummy/iio_simple_dummy_events.c st->event_irq = iio_dummy_evgen_get_irq(); st 241 drivers/iio/dummy/iio_simple_dummy_events.c if (st->event_irq < 0) { st 242 drivers/iio/dummy/iio_simple_dummy_events.c ret = st->event_irq; st 245 drivers/iio/dummy/iio_simple_dummy_events.c st->regs = iio_dummy_evgen_get_regs(st->event_irq); st 247 drivers/iio/dummy/iio_simple_dummy_events.c ret = request_threaded_irq(st->event_irq, st 258 drivers/iio/dummy/iio_simple_dummy_events.c iio_dummy_evgen_release_irq(st->event_irq); st 269 drivers/iio/dummy/iio_simple_dummy_events.c struct iio_dummy_state *st = iio_priv(indio_dev); st 271 drivers/iio/dummy/iio_simple_dummy_events.c free_irq(st->event_irq, indio_dev); st 273 drivers/iio/dummy/iio_simple_dummy_events.c iio_dummy_evgen_release_irq(st->event_irq); st 301 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 311 drivers/iio/frequency/ad9523.c .tx_buf = &st->data[0].d8[2], st 314 drivers/iio/frequency/ad9523.c .rx_buf = &st->data[1].d8[4 - AD9523_TRANSF_LEN(addr)], st 319 drivers/iio/frequency/ad9523.c st->data[0].d32 = cpu_to_be32(AD9523_READ | st 323 drivers/iio/frequency/ad9523.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 327 drivers/iio/frequency/ad9523.c ret = be32_to_cpu(st->data[1].d32) & (0xFFFFFF >> st 336 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 340 drivers/iio/frequency/ad9523.c .tx_buf = &st->data[0].d8[2], st 343 drivers/iio/frequency/ad9523.c .tx_buf = &st->data[1].d8[4 - AD9523_TRANSF_LEN(addr)], st 348 drivers/iio/frequency/ad9523.c st->data[0].d32 = cpu_to_be32(AD9523_WRITE | st 351 drivers/iio/frequency/ad9523.c st->data[1].d32 = cpu_to_be32(val); st 353 drivers/iio/frequency/ad9523.c ret = spi_sync_transfer(st->spi, t, ARRAY_SIZE(t)); st 369 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 415 drivers/iio/frequency/ad9523.c st->vco_out_map[ch] = out; st 423 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 429 drivers/iio/frequency/ad9523.c use_alt_clk_src = (freq == st->vco_out_freq[AD9523_VCXO]); st 432 drivers/iio/frequency/ad9523.c tmp1 = st->vco_out_freq[AD9523_VCO1] / freq; st 433 drivers/iio/frequency/ad9523.c tmp2 = st->vco_out_freq[AD9523_VCO2] / freq; st 515 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 526 drivers/iio/frequency/ad9523.c mutex_lock(&st->lock); st 537 drivers/iio/frequency/ad9523.c mutex_unlock(&st->lock); st 548 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 551 drivers/iio/frequency/ad9523.c mutex_lock(&st->lock); st 557 drivers/iio/frequency/ad9523.c mutex_unlock(&st->lock); st 636 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 640 drivers/iio/frequency/ad9523.c mutex_lock(&st->lock); st 642 drivers/iio/frequency/ad9523.c mutex_unlock(&st->lock); st 652 drivers/iio/frequency/ad9523.c *val = st->vco_out_freq[st->vco_out_map[chan->channel]] / st 672 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 676 drivers/iio/frequency/ad9523.c mutex_lock(&st->lock); st 698 drivers/iio/frequency/ad9523.c tmp = st->vco_out_freq[st->vco_out_map[chan->channel]] / val; st 722 drivers/iio/frequency/ad9523.c mutex_unlock(&st->lock); st 730 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 733 drivers/iio/frequency/ad9523.c mutex_lock(&st->lock); st 746 drivers/iio/frequency/ad9523.c mutex_unlock(&st->lock); st 760 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 761 drivers/iio/frequency/ad9523.c struct ad9523_platform_data *pdata = st->pdata; st 768 drivers/iio/frequency/ad9523.c (st->spi->mode & SPI_3WIRE ? 0 : st 864 drivers/iio/frequency/ad9523.c st->vco_freq = div_u64((unsigned long long)pdata->vcxo_freq * st 886 drivers/iio/frequency/ad9523.c st->vco_out_freq[AD9523_VCO1] = st 887 drivers/iio/frequency/ad9523.c st->vco_freq / pdata->pll2_vco_div_m1; st 890 drivers/iio/frequency/ad9523.c st->vco_out_freq[AD9523_VCO2] = st 891 drivers/iio/frequency/ad9523.c st->vco_freq / pdata->pll2_vco_div_m2; st 893 drivers/iio/frequency/ad9523.c st->vco_out_freq[AD9523_VCXO] = pdata->vcxo_freq; st 934 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].type = IIO_ALTVOLTAGE; st 935 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].output = 1; st 936 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].indexed = 1; st 937 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].channel = chan->channel_num; st 938 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].extend_name = st 940 drivers/iio/frequency/ad9523.c st->ad9523_channels[i].info_mask_separate = st 976 drivers/iio/frequency/ad9523.c struct ad9523_state *st; st 984 drivers/iio/frequency/ad9523.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 988 drivers/iio/frequency/ad9523.c st = iio_priv(indio_dev); st 990 drivers/iio/frequency/ad9523.c mutex_init(&st->lock); st 992 drivers/iio/frequency/ad9523.c st->reg = devm_regulator_get(&spi->dev, "vcc"); st 993 drivers/iio/frequency/ad9523.c if (!IS_ERR(st->reg)) { st 994 drivers/iio/frequency/ad9523.c ret = regulator_enable(st->reg); st 999 drivers/iio/frequency/ad9523.c st->pwrdown_gpio = devm_gpiod_get_optional(&spi->dev, "powerdown", st 1001 drivers/iio/frequency/ad9523.c if (IS_ERR(st->pwrdown_gpio)) { st 1002 drivers/iio/frequency/ad9523.c ret = PTR_ERR(st->pwrdown_gpio); st 1006 drivers/iio/frequency/ad9523.c st->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset", st 1008 drivers/iio/frequency/ad9523.c if (IS_ERR(st->reset_gpio)) { st 1009 drivers/iio/frequency/ad9523.c ret = PTR_ERR(st->reset_gpio); st 1013 drivers/iio/frequency/ad9523.c if (st->reset_gpio) { st 1015 drivers/iio/frequency/ad9523.c gpiod_direction_output(st->reset_gpio, 1); st 1018 drivers/iio/frequency/ad9523.c st->sync_gpio = devm_gpiod_get_optional(&spi->dev, "sync", st 1020 drivers/iio/frequency/ad9523.c if (IS_ERR(st->sync_gpio)) { st 1021 drivers/iio/frequency/ad9523.c ret = PTR_ERR(st->sync_gpio); st 1026 drivers/iio/frequency/ad9523.c st->spi = spi; st 1027 drivers/iio/frequency/ad9523.c st->pdata = pdata; st 1034 drivers/iio/frequency/ad9523.c indio_dev->channels = st->ad9523_channels; st 1050 drivers/iio/frequency/ad9523.c if (!IS_ERR(st->reg)) st 1051 drivers/iio/frequency/ad9523.c regulator_disable(st->reg); st 1059 drivers/iio/frequency/ad9523.c struct ad9523_state *st = iio_priv(indio_dev); st 1063 drivers/iio/frequency/ad9523.c if (!IS_ERR(st->reg)) st 1064 drivers/iio/frequency/ad9523.c regulator_disable(st->reg); st 67 drivers/iio/frequency/adf4350.c static int adf4350_sync_config(struct adf4350_state *st) st 72 drivers/iio/frequency/adf4350.c if ((st->regs_hw[i] != st->regs[i]) || st 81 drivers/iio/frequency/adf4350.c st->val = cpu_to_be32(st->regs[i] | i); st 82 drivers/iio/frequency/adf4350.c ret = spi_write(st->spi, &st->val, 4); st 85 drivers/iio/frequency/adf4350.c st->regs_hw[i] = st->regs[i]; st 86 drivers/iio/frequency/adf4350.c dev_dbg(&st->spi->dev, "[%d] 0x%X\n", st 87 drivers/iio/frequency/adf4350.c i, (u32)st->regs[i] | i); st 97 drivers/iio/frequency/adf4350.c struct adf4350_state *st = iio_priv(indio_dev); st 105 drivers/iio/frequency/adf4350.c st->regs[reg] = writeval & ~(BIT(0) | BIT(1) | BIT(2)); st 106 drivers/iio/frequency/adf4350.c ret = adf4350_sync_config(st); st 108 drivers/iio/frequency/adf4350.c *readval = st->regs_hw[reg]; st 116 drivers/iio/frequency/adf4350.c static int adf4350_tune_r_cnt(struct adf4350_state *st, unsigned short r_cnt) st 118 drivers/iio/frequency/adf4350.c struct adf4350_platform_data *pdata = st->pdata; st 122 drivers/iio/frequency/adf4350.c st->fpfd = (st->clkin * (pdata->ref_doubler_en ? 2 : 1)) / st 124 drivers/iio/frequency/adf4350.c } while (st->fpfd > ADF4350_MAX_FREQ_PFD); st 129 drivers/iio/frequency/adf4350.c static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq) st 131 drivers/iio/frequency/adf4350.c struct adf4350_platform_data *pdata = st->pdata; st 137 drivers/iio/frequency/adf4350.c if (freq > ADF4350_MAX_OUT_FREQ || freq < st->min_out_freq) st 148 drivers/iio/frequency/adf4350.c st->r4_rf_div_sel = 0; st 152 drivers/iio/frequency/adf4350.c st->r4_rf_div_sel++; st 162 drivers/iio/frequency/adf4350.c chspc = st->chspc; st 167 drivers/iio/frequency/adf4350.c r_cnt = adf4350_tune_r_cnt(st, r_cnt); st 168 drivers/iio/frequency/adf4350.c st->r1_mod = st->fpfd / chspc; st 174 drivers/iio/frequency/adf4350.c } while ((st->r1_mod > ADF4350_MAX_MODULUS) && r_cnt); st 177 drivers/iio/frequency/adf4350.c tmp = freq * (u64)st->r1_mod + (st->fpfd >> 1); st 178 drivers/iio/frequency/adf4350.c do_div(tmp, st->fpfd); /* Div round closest (n + d/2)/d */ st 179 drivers/iio/frequency/adf4350.c st->r0_fract = do_div(tmp, st->r1_mod); st 180 drivers/iio/frequency/adf4350.c st->r0_int = tmp; st 181 drivers/iio/frequency/adf4350.c } while (mdiv > st->r0_int); st 183 drivers/iio/frequency/adf4350.c band_sel_div = DIV_ROUND_UP(st->fpfd, ADF4350_MAX_BANDSEL_CLK); st 185 drivers/iio/frequency/adf4350.c if (st->r0_fract && st->r1_mod) { st 186 drivers/iio/frequency/adf4350.c div_gcd = gcd(st->r1_mod, st->r0_fract); st 187 drivers/iio/frequency/adf4350.c st->r1_mod /= div_gcd; st 188 drivers/iio/frequency/adf4350.c st->r0_fract /= div_gcd; st 190 drivers/iio/frequency/adf4350.c st->r0_fract = 0; st 191 drivers/iio/frequency/adf4350.c st->r1_mod = 1; st 194 drivers/iio/frequency/adf4350.c dev_dbg(&st->spi->dev, "VCO: %llu Hz, PFD %lu Hz\n" st 197 drivers/iio/frequency/adf4350.c freq, st->fpfd, r_cnt, st->r0_int, st->r0_fract, st->r1_mod, st 198 drivers/iio/frequency/adf4350.c 1 << st->r4_rf_div_sel, prescaler ? "8/9" : "4/5", st 201 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG0] = ADF4350_REG0_INT(st->r0_int) | st 202 drivers/iio/frequency/adf4350.c ADF4350_REG0_FRACT(st->r0_fract); st 204 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG1] = ADF4350_REG1_PHASE(1) | st 205 drivers/iio/frequency/adf4350.c ADF4350_REG1_MOD(st->r1_mod) | st 208 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG2] = st 218 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG3] = pdata->r3_user_settings & st 226 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG4] = st 228 drivers/iio/frequency/adf4350.c ADF4350_REG4_RF_DIV_SEL(st->r4_rf_div_sel) | st 238 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG5] = ADF4350_REG5_LD_PIN_MODE_DIGITAL; st 239 drivers/iio/frequency/adf4350.c st->freq_req = freq; st 241 drivers/iio/frequency/adf4350.c return adf4350_sync_config(st); st 249 drivers/iio/frequency/adf4350.c struct adf4350_state *st = iio_priv(indio_dev); st 261 drivers/iio/frequency/adf4350.c ret = adf4350_set_freq(st, readin); st 269 drivers/iio/frequency/adf4350.c if (st->clk) { st 270 drivers/iio/frequency/adf4350.c tmp = clk_round_rate(st->clk, readin); st 275 drivers/iio/frequency/adf4350.c ret = clk_set_rate(st->clk, tmp); st 279 drivers/iio/frequency/adf4350.c st->clkin = readin; st 280 drivers/iio/frequency/adf4350.c ret = adf4350_set_freq(st, st->freq_req); st 286 drivers/iio/frequency/adf4350.c st->chspc = readin; st 290 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG2] |= ADF4350_REG2_POWER_DOWN_EN; st 292 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG2] &= ~ADF4350_REG2_POWER_DOWN_EN; st 294 drivers/iio/frequency/adf4350.c adf4350_sync_config(st); st 309 drivers/iio/frequency/adf4350.c struct adf4350_state *st = iio_priv(indio_dev); st 316 drivers/iio/frequency/adf4350.c val = (u64)((st->r0_int * st->r1_mod) + st->r0_fract) * st 317 drivers/iio/frequency/adf4350.c (u64)st->fpfd; st 318 drivers/iio/frequency/adf4350.c do_div(val, st->r1_mod * (1 << st->r4_rf_div_sel)); st 320 drivers/iio/frequency/adf4350.c if (gpio_is_valid(st->pdata->gpio_lock_detect)) st 321 drivers/iio/frequency/adf4350.c if (!gpio_get_value(st->pdata->gpio_lock_detect)) { st 322 drivers/iio/frequency/adf4350.c dev_dbg(&st->spi->dev, "PLL un-locked\n"); st 327 drivers/iio/frequency/adf4350.c if (st->clk) st 328 drivers/iio/frequency/adf4350.c st->clkin = clk_get_rate(st->clk); st 330 drivers/iio/frequency/adf4350.c val = st->clkin; st 333 drivers/iio/frequency/adf4350.c val = st->chspc; st 336 drivers/iio/frequency/adf4350.c val = !!(st->regs[ADF4350_REG2] & ADF4350_REG2_POWER_DOWN_EN); st 496 drivers/iio/frequency/adf4350.c struct adf4350_state *st; st 523 drivers/iio/frequency/adf4350.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 529 drivers/iio/frequency/adf4350.c st = iio_priv(indio_dev); st 531 drivers/iio/frequency/adf4350.c st->reg = devm_regulator_get(&spi->dev, "vcc"); st 532 drivers/iio/frequency/adf4350.c if (!IS_ERR(st->reg)) { st 533 drivers/iio/frequency/adf4350.c ret = regulator_enable(st->reg); st 539 drivers/iio/frequency/adf4350.c st->spi = spi; st 540 drivers/iio/frequency/adf4350.c st->pdata = pdata; st 551 drivers/iio/frequency/adf4350.c st->chspc = pdata->channel_spacing; st 553 drivers/iio/frequency/adf4350.c st->clk = clk; st 554 drivers/iio/frequency/adf4350.c st->clkin = clk_get_rate(clk); st 556 drivers/iio/frequency/adf4350.c st->clkin = pdata->clkin; st 559 drivers/iio/frequency/adf4350.c st->min_out_freq = spi_get_device_id(spi)->driver_data == 4351 ? st 562 drivers/iio/frequency/adf4350.c memset(st->regs_hw, 0xFF, sizeof(st->regs_hw)); st 576 drivers/iio/frequency/adf4350.c ret = adf4350_set_freq(st, pdata->power_up_frequency); st 588 drivers/iio/frequency/adf4350.c if (!IS_ERR(st->reg)) st 589 drivers/iio/frequency/adf4350.c regulator_disable(st->reg); st 600 drivers/iio/frequency/adf4350.c struct adf4350_state *st = iio_priv(indio_dev); st 601 drivers/iio/frequency/adf4350.c struct regulator *reg = st->reg; st 603 drivers/iio/frequency/adf4350.c st->regs[ADF4350_REG2] |= ADF4350_REG2_POWER_DOWN_EN; st 604 drivers/iio/frequency/adf4350.c adf4350_sync_config(st); st 608 drivers/iio/frequency/adf4350.c if (st->clk) st 609 drivers/iio/frequency/adf4350.c clk_disable_unprepare(st->clk); st 181 drivers/iio/frequency/adf4371.c static unsigned long long adf4371_pll_fract_n_get_rate(struct adf4371_state *st, st 187 drivers/iio/frequency/adf4371.c val = (((u64)st->integer * ADF4371_MODULUS1) + st->fract1) * st->fpfd; st 188 drivers/iio/frequency/adf4371.c tmp = (u64)st->fract2 * st->fpfd; st 189 drivers/iio/frequency/adf4371.c do_div(tmp, st->mod2); st 193 drivers/iio/frequency/adf4371.c ref_div_sel = st->rf_div_sel; st 236 drivers/iio/frequency/adf4371.c static int adf4371_set_freq(struct adf4371_state *st, unsigned long long freq, st 249 drivers/iio/frequency/adf4371.c st->rf_div_sel = 0; st 253 drivers/iio/frequency/adf4371.c st->rf_div_sel++; st 274 drivers/iio/frequency/adf4371.c adf4371_pll_fract_n_compute(freq, st->fpfd, &st->integer, &st->fract1, st 275 drivers/iio/frequency/adf4371.c &st->fract2, &st->mod2); st 276 drivers/iio/frequency/adf4371.c st->buf[0] = st->integer >> 8; st 277 drivers/iio/frequency/adf4371.c st->buf[1] = 0x40; /* REG12 default */ st 278 drivers/iio/frequency/adf4371.c st->buf[2] = 0x00; st 279 drivers/iio/frequency/adf4371.c st->buf[3] = st->fract1 & 0xFF; st 280 drivers/iio/frequency/adf4371.c st->buf[4] = st->fract1 >> 8; st 281 drivers/iio/frequency/adf4371.c st->buf[5] = st->fract1 >> 16; st 282 drivers/iio/frequency/adf4371.c st->buf[6] = ADF4371_FRAC2WORD_L(st->fract2 & 0x7F) | st 283 drivers/iio/frequency/adf4371.c ADF4371_FRAC1WORD(st->fract1 >> 24); st 284 drivers/iio/frequency/adf4371.c st->buf[7] = ADF4371_FRAC2WORD_H(st->fract2 >> 7); st 285 drivers/iio/frequency/adf4371.c st->buf[8] = st->mod2 & 0xFF; st 286 drivers/iio/frequency/adf4371.c st->buf[9] = ADF4371_MOD2WORD(st->mod2 >> 8); st 288 drivers/iio/frequency/adf4371.c ret = regmap_bulk_write(st->regmap, ADF4371_REG(0x11), st->buf, 10); st 295 drivers/iio/frequency/adf4371.c ret = regmap_write(st->regmap, ADF4371_REG(0x1F), st->ref_div_factor); st 299 drivers/iio/frequency/adf4371.c ret = regmap_update_bits(st->regmap, ADF4371_REG(0x24), st 301 drivers/iio/frequency/adf4371.c ADF4371_RF_DIV_SEL(st->rf_div_sel)); st 305 drivers/iio/frequency/adf4371.c cp_bleed = DIV_ROUND_UP(400 * 1750, st->integer * 375); st 307 drivers/iio/frequency/adf4371.c ret = regmap_write(st->regmap, ADF4371_REG(0x26), cp_bleed); st 314 drivers/iio/frequency/adf4371.c if (st->fract1 == 0 && st->fract2 == 0) st 317 drivers/iio/frequency/adf4371.c ret = regmap_write(st->regmap, ADF4371_REG(0x2B), int_mode); st 321 drivers/iio/frequency/adf4371.c return regmap_write(st->regmap, ADF4371_REG(0x10), st->integer & 0xFF); st 329 drivers/iio/frequency/adf4371.c struct adf4371_state *st = iio_priv(indio_dev); st 336 drivers/iio/frequency/adf4371.c val = adf4371_pll_fract_n_get_rate(st, chan->channel); st 337 drivers/iio/frequency/adf4371.c ret = regmap_read(st->regmap, ADF4371_REG(0x7C), &readval); st 342 drivers/iio/frequency/adf4371.c dev_dbg(&st->spi->dev, "PLL un-locked\n"); st 350 drivers/iio/frequency/adf4371.c ret = regmap_read(st->regmap, reg, &readval); st 372 drivers/iio/frequency/adf4371.c struct adf4371_state *st = iio_priv(indio_dev); st 378 drivers/iio/frequency/adf4371.c mutex_lock(&st->lock); st 385 drivers/iio/frequency/adf4371.c ret = adf4371_set_freq(st, freq, chan->channel); st 394 drivers/iio/frequency/adf4371.c ret = regmap_read(st->regmap, reg, &readval); st 401 drivers/iio/frequency/adf4371.c ret = regmap_write(st->regmap, reg, readval); st 407 drivers/iio/frequency/adf4371.c mutex_unlock(&st->lock); st 463 drivers/iio/frequency/adf4371.c struct adf4371_state *st = iio_priv(indio_dev); st 466 drivers/iio/frequency/adf4371.c return regmap_read(st->regmap, reg, readval); st 468 drivers/iio/frequency/adf4371.c return regmap_write(st->regmap, reg, writeval); st 475 drivers/iio/frequency/adf4371.c static int adf4371_setup(struct adf4371_state *st) st 482 drivers/iio/frequency/adf4371.c ret = regmap_write(st->regmap, ADF4371_REG(0x0), ADF4371_RESET_CMD); st 486 drivers/iio/frequency/adf4371.c ret = regmap_multi_reg_write(st->regmap, adf4371_reg_defaults, st 492 drivers/iio/frequency/adf4371.c if (device_property_read_bool(&st->spi->dev, "adi,mute-till-lock-en")) { st 493 drivers/iio/frequency/adf4371.c ret = regmap_update_bits(st->regmap, ADF4371_REG(0x25), st 501 drivers/iio/frequency/adf4371.c ret = regmap_update_bits(st->regmap, ADF4371_REG(0x0), st 514 drivers/iio/frequency/adf4371.c st->ref_div_factor++; st 515 drivers/iio/frequency/adf4371.c st->fpfd = st->clkin_freq / st->ref_div_factor; st 516 drivers/iio/frequency/adf4371.c } while (st->fpfd > ADF4371_MAX_FREQ_PFD); st 519 drivers/iio/frequency/adf4371.c vco_band_div = DIV_ROUND_UP(st->fpfd, 2400000U); st 521 drivers/iio/frequency/adf4371.c tmp = DIV_ROUND_CLOSEST(st->fpfd, 1000000U); st 534 drivers/iio/frequency/adf4371.c st->buf[0] = vco_band_div; st 535 drivers/iio/frequency/adf4371.c st->buf[1] = timeout & 0xFF; st 536 drivers/iio/frequency/adf4371.c st->buf[2] = ADF4371_TIMEOUT(timeout >> 8) | 0x04; st 537 drivers/iio/frequency/adf4371.c st->buf[3] = synth_timeout; st 538 drivers/iio/frequency/adf4371.c st->buf[4] = ADF4371_VCO_ALC_TOUT(vco_alc_timeout); st 540 drivers/iio/frequency/adf4371.c return regmap_bulk_write(st->regmap, ADF4371_REG(0x30), st->buf, 5); st 545 drivers/iio/frequency/adf4371.c struct adf4371_state *st = data; st 547 drivers/iio/frequency/adf4371.c clk_disable_unprepare(st->clkin); st 554 drivers/iio/frequency/adf4371.c struct adf4371_state *st; st 558 drivers/iio/frequency/adf4371.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 569 drivers/iio/frequency/adf4371.c st = iio_priv(indio_dev); st 571 drivers/iio/frequency/adf4371.c st->spi = spi; st 572 drivers/iio/frequency/adf4371.c st->regmap = regmap; st 573 drivers/iio/frequency/adf4371.c mutex_init(&st->lock); st 575 drivers/iio/frequency/adf4371.c st->chip_info = &adf4371_chip_info[id->driver_data]; st 580 drivers/iio/frequency/adf4371.c indio_dev->channels = st->chip_info->channels; st 581 drivers/iio/frequency/adf4371.c indio_dev->num_channels = st->chip_info->num_channels; st 583 drivers/iio/frequency/adf4371.c st->clkin = devm_clk_get(&spi->dev, "clkin"); st 584 drivers/iio/frequency/adf4371.c if (IS_ERR(st->clkin)) st 585 drivers/iio/frequency/adf4371.c return PTR_ERR(st->clkin); st 587 drivers/iio/frequency/adf4371.c ret = clk_prepare_enable(st->clkin); st 591 drivers/iio/frequency/adf4371.c ret = devm_add_action_or_reset(&spi->dev, adf4371_clk_disable, st); st 595 drivers/iio/frequency/adf4371.c st->clkin_freq = clk_get_rate(st->clkin); st 597 drivers/iio/frequency/adf4371.c ret = adf4371_setup(st); st 52 drivers/iio/gyro/adis16080.c struct adis16080_state *st = iio_priv(indio_dev); st 56 drivers/iio/gyro/adis16080.c .tx_buf = &st->buf, st 60 drivers/iio/gyro/adis16080.c .rx_buf = &st->buf, st 65 drivers/iio/gyro/adis16080.c st->buf = cpu_to_be16(addr | ADIS16080_DIN_WRITE); st 67 drivers/iio/gyro/adis16080.c ret = spi_sync_transfer(st->us, t, ARRAY_SIZE(t)); st 69 drivers/iio/gyro/adis16080.c *val = sign_extend32(be16_to_cpu(st->buf), 11); st 80 drivers/iio/gyro/adis16080.c struct adis16080_state *st = iio_priv(indio_dev); st 92 drivers/iio/gyro/adis16080.c *val = st->info->scale_val; st 93 drivers/iio/gyro/adis16080.c *val2 = st->info->scale_val2; st 188 drivers/iio/gyro/adis16080.c struct adis16080_state *st; st 192 drivers/iio/gyro/adis16080.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 195 drivers/iio/gyro/adis16080.c st = iio_priv(indio_dev); st 200 drivers/iio/gyro/adis16080.c st->us = spi; st 201 drivers/iio/gyro/adis16080.c st->info = &adis16080_chip_info[id->driver_data]; st 48 drivers/iio/gyro/adis16130.c struct adis16130_state *st = iio_priv(indio_dev); st 50 drivers/iio/gyro/adis16130.c .tx_buf = st->buf, st 51 drivers/iio/gyro/adis16130.c .rx_buf = st->buf, st 55 drivers/iio/gyro/adis16130.c mutex_lock(&st->buf_lock); st 57 drivers/iio/gyro/adis16130.c st->buf[0] = ADIS16130_CON_RD | reg_addr; st 58 drivers/iio/gyro/adis16130.c st->buf[1] = st->buf[2] = st->buf[3] = 0; st 60 drivers/iio/gyro/adis16130.c ret = spi_sync_transfer(st->us, &xfer, 1); st 62 drivers/iio/gyro/adis16130.c *val = (st->buf[1] << 16) | (st->buf[2] << 8) | st->buf[3]; st 63 drivers/iio/gyro/adis16130.c mutex_unlock(&st->buf_lock); st 143 drivers/iio/gyro/adis16130.c struct adis16130_state *st; st 147 drivers/iio/gyro/adis16130.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 150 drivers/iio/gyro/adis16130.c st = iio_priv(indio_dev); st 153 drivers/iio/gyro/adis16130.c st->us = spi; st 154 drivers/iio/gyro/adis16130.c mutex_init(&st->buf_lock); st 92 drivers/iio/gyro/adxrs450.c struct adxrs450_state *st = iio_priv(indio_dev); st 97 drivers/iio/gyro/adxrs450.c .tx_buf = &st->tx, st 99 drivers/iio/gyro/adxrs450.c .len = sizeof(st->tx), st 102 drivers/iio/gyro/adxrs450.c .rx_buf = &st->rx, st 104 drivers/iio/gyro/adxrs450.c .len = sizeof(st->rx), st 108 drivers/iio/gyro/adxrs450.c mutex_lock(&st->buf_lock); st 114 drivers/iio/gyro/adxrs450.c st->tx = cpu_to_be32(tx); st 115 drivers/iio/gyro/adxrs450.c ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); st 117 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "problem while reading 16 bit register 0x%02x\n", st 122 drivers/iio/gyro/adxrs450.c *val = (be32_to_cpu(st->rx) >> 5) & 0xFFFF; st 125 drivers/iio/gyro/adxrs450.c mutex_unlock(&st->buf_lock); st 140 drivers/iio/gyro/adxrs450.c struct adxrs450_state *st = iio_priv(indio_dev); st 144 drivers/iio/gyro/adxrs450.c mutex_lock(&st->buf_lock); st 150 drivers/iio/gyro/adxrs450.c st->tx = cpu_to_be32(tx); st 151 drivers/iio/gyro/adxrs450.c ret = spi_write(st->us, &st->tx, sizeof(st->tx)); st 153 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "problem while writing 16 bit register 0x%02x\n", st 156 drivers/iio/gyro/adxrs450.c mutex_unlock(&st->buf_lock); st 167 drivers/iio/gyro/adxrs450.c struct adxrs450_state *st = iio_priv(indio_dev); st 171 drivers/iio/gyro/adxrs450.c .tx_buf = &st->tx, st 173 drivers/iio/gyro/adxrs450.c .len = sizeof(st->tx), st 176 drivers/iio/gyro/adxrs450.c .rx_buf = &st->rx, st 178 drivers/iio/gyro/adxrs450.c .len = sizeof(st->rx), st 182 drivers/iio/gyro/adxrs450.c mutex_lock(&st->buf_lock); st 183 drivers/iio/gyro/adxrs450.c st->tx = cpu_to_be32(ADXRS450_SENSOR_DATA); st 185 drivers/iio/gyro/adxrs450.c ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); st 187 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "Problem while reading sensor data\n"); st 191 drivers/iio/gyro/adxrs450.c *val = (be32_to_cpu(st->rx) >> 10) & 0xFFFF; st 194 drivers/iio/gyro/adxrs450.c mutex_unlock(&st->buf_lock); st 204 drivers/iio/gyro/adxrs450.c static int adxrs450_spi_initial(struct adxrs450_state *st, st 210 drivers/iio/gyro/adxrs450.c .tx_buf = &st->tx, st 211 drivers/iio/gyro/adxrs450.c .rx_buf = &st->rx, st 213 drivers/iio/gyro/adxrs450.c .len = sizeof(st->tx), st 216 drivers/iio/gyro/adxrs450.c mutex_lock(&st->buf_lock); st 220 drivers/iio/gyro/adxrs450.c st->tx = cpu_to_be32(tx); st 221 drivers/iio/gyro/adxrs450.c ret = spi_sync_transfer(st->us, &xfers, 1); st 223 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "Problem while reading initializing data\n"); st 227 drivers/iio/gyro/adxrs450.c *val = be32_to_cpu(st->rx); st 230 drivers/iio/gyro/adxrs450.c mutex_unlock(&st->buf_lock); st 240 drivers/iio/gyro/adxrs450.c struct adxrs450_state *st = iio_priv(indio_dev); st 243 drivers/iio/gyro/adxrs450.c ret = adxrs450_spi_initial(st, &t, 1); st 247 drivers/iio/gyro/adxrs450.c dev_warn(&st->us->dev, "The initial power on response is not correct! Restart without reset?\n"); st 250 drivers/iio/gyro/adxrs450.c ret = adxrs450_spi_initial(st, &t, 0); st 255 drivers/iio/gyro/adxrs450.c ret = adxrs450_spi_initial(st, &t, 0); st 259 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "The second response is not correct!\n"); st 263 drivers/iio/gyro/adxrs450.c ret = adxrs450_spi_initial(st, &t, 0); st 267 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "The third response is not correct!\n"); st 275 drivers/iio/gyro/adxrs450.c dev_err(&st->us->dev, "The device is not in normal status!\n"); st 414 drivers/iio/gyro/adxrs450.c struct adxrs450_state *st; st 418 drivers/iio/gyro/adxrs450.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 421 drivers/iio/gyro/adxrs450.c st = iio_priv(indio_dev); st 422 drivers/iio/gyro/adxrs450.c st->us = spi; st 423 drivers/iio/gyro/adxrs450.c mutex_init(&st->buf_lock); st 240 drivers/iio/gyro/hid-sensor-gyro-3d.c struct gyro_3d_state *st) st 250 drivers/iio/gyro/hid-sensor-gyro-3d.c &st->gyro[CHANNEL_SCAN_INDEX_X + i]); st 255 drivers/iio/gyro/hid-sensor-gyro-3d.c st->gyro[CHANNEL_SCAN_INDEX_X + i].size); st 258 drivers/iio/gyro/hid-sensor-gyro-3d.c st->gyro[0].index, st 259 drivers/iio/gyro/hid-sensor-gyro-3d.c st->gyro[0].report_id, st 260 drivers/iio/gyro/hid-sensor-gyro-3d.c st->gyro[1].index, st->gyro[1].report_id, st 261 drivers/iio/gyro/hid-sensor-gyro-3d.c st->gyro[2].index, st->gyro[2].report_id); st 263 drivers/iio/gyro/hid-sensor-gyro-3d.c st->scale_precision = hid_sensor_format_scale( st 265 drivers/iio/gyro/hid-sensor-gyro-3d.c &st->gyro[CHANNEL_SCAN_INDEX_X], st 266 drivers/iio/gyro/hid-sensor-gyro-3d.c &st->scale_pre_decml, &st->scale_post_decml); st 269 drivers/iio/gyro/hid-sensor-gyro-3d.c if (st->common_attributes.sensitivity.index < 0) { st 274 drivers/iio/gyro/hid-sensor-gyro-3d.c &st->common_attributes.sensitivity); st 276 drivers/iio/gyro/hid-sensor-gyro-3d.c st->common_attributes.sensitivity.index, st 277 drivers/iio/gyro/hid-sensor-gyro-3d.c st->common_attributes.sensitivity.report_id); st 48 drivers/iio/gyro/itg3200_buffer.c struct itg3200 *st = iio_priv(indio_dev); st 51 drivers/iio/gyro/itg3200_buffer.c int ret = itg3200_read_all_channels(st->i2c, buf); st 107 drivers/iio/gyro/itg3200_buffer.c struct itg3200 *st = iio_priv(indio_dev); st 109 drivers/iio/gyro/itg3200_buffer.c st->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, st 111 drivers/iio/gyro/itg3200_buffer.c if (!st->trig) st 114 drivers/iio/gyro/itg3200_buffer.c ret = request_irq(st->i2c->irq, st 118 drivers/iio/gyro/itg3200_buffer.c st->trig); st 123 drivers/iio/gyro/itg3200_buffer.c st->trig->dev.parent = &st->i2c->dev; st 124 drivers/iio/gyro/itg3200_buffer.c st->trig->ops = &itg3200_trigger_ops; st 125 drivers/iio/gyro/itg3200_buffer.c iio_trigger_set_drvdata(st->trig, indio_dev); st 126 drivers/iio/gyro/itg3200_buffer.c ret = iio_trigger_register(st->trig); st 131 drivers/iio/gyro/itg3200_buffer.c indio_dev->trig = iio_trigger_get(st->trig); st 136 drivers/iio/gyro/itg3200_buffer.c free_irq(st->i2c->irq, st->trig); st 138 drivers/iio/gyro/itg3200_buffer.c iio_trigger_free(st->trig); st 144 drivers/iio/gyro/itg3200_buffer.c struct itg3200 *st = iio_priv(indio_dev); st 146 drivers/iio/gyro/itg3200_buffer.c iio_trigger_unregister(st->trig); st 147 drivers/iio/gyro/itg3200_buffer.c free_irq(st->i2c->irq, st->trig); st 148 drivers/iio/gyro/itg3200_buffer.c iio_trigger_free(st->trig); st 35 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 37 drivers/iio/gyro/itg3200_core.c return i2c_smbus_write_byte_data(st->i2c, 0x80 | reg_address, val); st 43 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 46 drivers/iio/gyro/itg3200_core.c ret = i2c_smbus_read_byte_data(st->i2c, reg_address); st 56 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 57 drivers/iio/gyro/itg3200_core.c struct i2c_client *client = st->i2c; st 170 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 173 drivers/iio/gyro/itg3200_core.c dev_dbg(&st->i2c->dev, "reset device"); st 179 drivers/iio/gyro/itg3200_core.c dev_err(&st->i2c->dev, "error resetting device"); st 194 drivers/iio/gyro/itg3200_core.c dev_err(&st->i2c->dev, "error init device"); st 219 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 232 drivers/iio/gyro/itg3200_core.c dev_err(&st->i2c->dev, "invalid reg value 0x%02x", val); st 301 drivers/iio/gyro/itg3200_core.c struct itg3200 *st; st 306 drivers/iio/gyro/itg3200_core.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 310 drivers/iio/gyro/itg3200_core.c st = iio_priv(indio_dev); st 313 drivers/iio/gyro/itg3200_core.c &st->orientation); st 318 drivers/iio/gyro/itg3200_core.c st->i2c = client; st 373 drivers/iio/gyro/itg3200_core.c struct itg3200 *st = iio_priv(indio_dev); st 375 drivers/iio/gyro/itg3200_core.c dev_dbg(&st->i2c->dev, "suspend device"); st 160 drivers/iio/humidity/hid-sensor-humidity.c struct hid_humidity_state *st) st 167 drivers/iio/humidity/hid-sensor-humidity.c &st->humidity_attr); st 171 drivers/iio/humidity/hid-sensor-humidity.c humidity_adjust_channel_bit_mask(channels, 0, st->humidity_attr.size); st 173 drivers/iio/humidity/hid-sensor-humidity.c st->scale_precision = hid_sensor_format_scale( st 175 drivers/iio/humidity/hid-sensor-humidity.c &st->humidity_attr, st 176 drivers/iio/humidity/hid-sensor-humidity.c &st->scale_pre_decml, st 177 drivers/iio/humidity/hid-sensor-humidity.c &st->scale_post_decml); st 180 drivers/iio/humidity/hid-sensor-humidity.c if (st->common_attributes.sensitivity.index < 0) st 185 drivers/iio/humidity/hid-sensor-humidity.c &st->common_attributes.sensitivity); st 165 drivers/iio/imu/adis16400.c int (*set_freq)(struct adis16400_state *st, unsigned int freq); st 166 drivers/iio/imu/adis16400.c int (*get_freq)(struct adis16400_state *st); st 213 drivers/iio/imu/adis16400.c struct adis16400_state *st = file->private_data; st 219 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID1, &lot1); st 223 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID2, &lot2); st 227 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16334_SERIAL_NUMBER, st 247 drivers/iio/imu/adis16400.c struct adis16400_state *st = arg; st 251 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_PRODUCT_ID, &prod_id); st 264 drivers/iio/imu/adis16400.c struct adis16400_state *st = arg; st 268 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_FLASH_CNT, &flash_count); st 281 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 283 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_HAS_SERIAL_NUMBER) st 285 drivers/iio/imu/adis16400.c indio_dev->debugfs_dentry, st, st 287 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_HAS_PROD_ID) st 289 drivers/iio/imu/adis16400.c indio_dev->debugfs_dentry, st, st 292 drivers/iio/imu/adis16400.c st, &adis16400_flash_count_fops); st 324 drivers/iio/imu/adis16400.c static int adis16334_get_freq(struct adis16400_state *st) st 329 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); st 338 drivers/iio/imu/adis16400.c static int adis16334_set_freq(struct adis16400_state *st, unsigned int freq) st 353 drivers/iio/imu/adis16400.c return adis_write_reg_16(&st->adis, ADIS16400_SMPL_PRD, t); st 356 drivers/iio/imu/adis16400.c static int adis16400_get_freq(struct adis16400_state *st) st 361 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); st 371 drivers/iio/imu/adis16400.c static int adis16400_set_freq(struct adis16400_state *st, unsigned int freq) st 389 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_SLOW; st 391 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_FAST; st 393 drivers/iio/imu/adis16400.c return adis_write_reg_8(&st->adis, ADIS16400_SMPL_PRD, val); st 409 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 418 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_SENS_AVG, &val16); st 422 drivers/iio/imu/adis16400.c ret = adis_write_reg_16(&st->adis, ADIS16400_SENS_AVG, st 430 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 433 drivers/iio/imu/adis16400.c ret = adis_write_reg_16(&st->adis, ADIS16400_SLP_CNT, st 444 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 450 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_HAS_SLOW_MODE) st 451 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_SLOW; st 453 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_FAST; st 454 drivers/iio/imu/adis16400.c st->adis.spi->mode = SPI_MODE_3; st 455 drivers/iio/imu/adis16400.c spi_setup(st->adis.spi); st 457 drivers/iio/imu/adis16400.c ret = adis_initial_startup(&st->adis); st 461 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_HAS_PROD_ID) { st 462 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, st 479 drivers/iio/imu/adis16400.c st->adis.spi->chip_select, st->adis.spi->irq); st 482 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_HAS_SLOW_MODE) { st 483 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &smp_prd); st 488 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_FAST; st 489 drivers/iio/imu/adis16400.c spi_setup(st->adis.spi); st 509 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 515 drivers/iio/imu/adis16400.c ret = adis_write_reg_16(&st->adis, st 525 drivers/iio/imu/adis16400.c st->filt_int = val; st 527 drivers/iio/imu/adis16400.c sps = st->variant->get_freq(st); st 544 drivers/iio/imu/adis16400.c ret = st->variant->set_freq(st, sps); st 555 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 566 drivers/iio/imu/adis16400.c *val2 = st->variant->gyro_scale_micro; st 580 drivers/iio/imu/adis16400.c *val2 = st->variant->accel_scale_micro; st 587 drivers/iio/imu/adis16400.c *val = st->variant->temp_scale_nano / 1000000; st 588 drivers/iio/imu/adis16400.c *val2 = (st->variant->temp_scale_nano % 1000000); st 600 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, st 610 drivers/iio/imu/adis16400.c *val = st->variant->temp_offset; st 615 drivers/iio/imu/adis16400.c ret = adis_read_reg_16(&st->adis, st 622 drivers/iio/imu/adis16400.c ret = st->variant->get_freq(st); st 633 drivers/iio/imu/adis16400.c ret = st->variant->get_freq(st); st 649 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 650 drivers/iio/imu/adis16400.c struct adis *adis = &st->adis; st 651 drivers/iio/imu/adis16400.c u32 old_speed_hz = st->adis.spi->max_speed_hz; st 658 drivers/iio/imu/adis16400.c if (!(st->variant->flags & ADIS16400_NO_BURST) && st 659 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz > ADIS16400_SPI_BURST) { st 660 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = ADIS16400_SPI_BURST; st 661 drivers/iio/imu/adis16400.c spi_setup(st->adis.spi); st 668 drivers/iio/imu/adis16400.c if (!(st->variant->flags & ADIS16400_NO_BURST)) { st 669 drivers/iio/imu/adis16400.c st->adis.spi->max_speed_hz = old_speed_hz; st 670 drivers/iio/imu/adis16400.c spi_setup(st->adis.spi); st 673 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_BURST_DIAG_STAT) st 1110 drivers/iio/imu/adis16400.c static void adis16400_setup_chan_mask(struct adis16400_state *st) st 1112 drivers/iio/imu/adis16400.c const struct adis16400_chip_info *chip_info = st->variant; st 1120 drivers/iio/imu/adis16400.c st->avail_scan_mask[0] |= BIT(ch->scan_index); st 1126 drivers/iio/imu/adis16400.c struct adis16400_state *st; st 1130 drivers/iio/imu/adis16400.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 1134 drivers/iio/imu/adis16400.c st = iio_priv(indio_dev); st 1139 drivers/iio/imu/adis16400.c st->variant = &adis16400_chips[spi_get_device_id(spi)->driver_data]; st 1142 drivers/iio/imu/adis16400.c indio_dev->channels = st->variant->channels; st 1143 drivers/iio/imu/adis16400.c indio_dev->num_channels = st->variant->num_channels; st 1147 drivers/iio/imu/adis16400.c if (!(st->variant->flags & ADIS16400_NO_BURST)) { st 1148 drivers/iio/imu/adis16400.c adis16400_setup_chan_mask(st); st 1149 drivers/iio/imu/adis16400.c indio_dev->available_scan_masks = st->avail_scan_mask; st 1150 drivers/iio/imu/adis16400.c st->adis.burst = &adis16400_burst; st 1151 drivers/iio/imu/adis16400.c if (st->variant->flags & ADIS16400_BURST_DIAG_STAT) st 1152 drivers/iio/imu/adis16400.c st->adis.burst->extra_len = sizeof(u16); st 1155 drivers/iio/imu/adis16400.c ret = adis_init(&st->adis, indio_dev, spi, &adis16400_data); st 1159 drivers/iio/imu/adis16400.c ret = adis_setup_buffer_and_trigger(&st->adis, indio_dev, st 1176 drivers/iio/imu/adis16400.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 1183 drivers/iio/imu/adis16400.c struct adis16400_state *st = iio_priv(indio_dev); st 1188 drivers/iio/imu/adis16400.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 154 drivers/iio/imu/adis16460.c struct adis16460 *st = iio_priv(indio_dev); st 168 drivers/iio/imu/adis16460.c return adis_write_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, t); st 173 drivers/iio/imu/adis16460.c struct adis16460 *st = iio_priv(indio_dev); st 178 drivers/iio/imu/adis16460.c ret = adis_read_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, &t); st 192 drivers/iio/imu/adis16460.c struct adis16460 *st = iio_priv(indio_dev); st 200 drivers/iio/imu/adis16460.c *val = st->chip_info->gyro_max_scale; st 201 drivers/iio/imu/adis16460.c *val2 = st->chip_info->gyro_max_val; st 204 drivers/iio/imu/adis16460.c *val = st->chip_info->accel_max_scale; st 205 drivers/iio/imu/adis16460.c *val2 = st->chip_info->accel_max_val; st 338 drivers/iio/imu/adis16460.c struct adis16460 *st = iio_priv(indio_dev); st 343 drivers/iio/imu/adis16460.c adis_reset(&st->adis); st 346 drivers/iio/imu/adis16460.c ret = adis_write_reg_16(&st->adis, ADIS16460_REG_GLOB_CMD, BIT(1)); st 351 drivers/iio/imu/adis16460.c ret = adis_check_status(&st->adis); st 355 drivers/iio/imu/adis16460.c ret = adis_read_reg_16(&st->adis, ADIS16460_REG_PROD_ID, &prod_id); st 406 drivers/iio/imu/adis16460.c struct adis16460 *st; st 409 drivers/iio/imu/adis16460.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 415 drivers/iio/imu/adis16460.c st = iio_priv(indio_dev); st 417 drivers/iio/imu/adis16460.c st->chip_info = &adis16460_chip_info; st 420 drivers/iio/imu/adis16460.c indio_dev->channels = st->chip_info->channels; st 421 drivers/iio/imu/adis16460.c indio_dev->num_channels = st->chip_info->num_channels; st 425 drivers/iio/imu/adis16460.c ret = adis_init(&st->adis, indio_dev, spi, &adis16460_data); st 429 drivers/iio/imu/adis16460.c ret = adis_setup_buffer_and_trigger(&st->adis, indio_dev, NULL); st 433 drivers/iio/imu/adis16460.c adis16460_enable_irq(&st->adis, 0); st 448 drivers/iio/imu/adis16460.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 455 drivers/iio/imu/adis16460.c struct adis16460 *st = iio_priv(indio_dev); st 459 drivers/iio/imu/adis16460.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 317 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 334 drivers/iio/imu/adis16480.c if (st->clk_mode == ADIS16480_CLK_PPS) { st 335 drivers/iio/imu/adis16480.c t = t / st->clk_freq; st 338 drivers/iio/imu/adis16480.c t = st->clk_freq / t; st 342 drivers/iio/imu/adis16480.c if (t > st->chip_info->max_dec_rate) st 343 drivers/iio/imu/adis16480.c t = st->chip_info->max_dec_rate; st 345 drivers/iio/imu/adis16480.c if ((t != 0) && (st->clk_mode != ADIS16480_CLK_PPS)) st 348 drivers/iio/imu/adis16480.c return adis_write_reg_16(&st->adis, reg, t); st 353 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 359 drivers/iio/imu/adis16480.c if (st->clk_mode == ADIS16480_CLK_PPS) st 364 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, reg, &t); st 375 drivers/iio/imu/adis16480.c if (st->clk_mode == ADIS16480_CLK_PPS) st 376 drivers/iio/imu/adis16480.c freq = st->clk_freq * t; st 378 drivers/iio/imu/adis16480.c freq = st->clk_freq / (t + 1); st 426 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 433 drivers/iio/imu/adis16480.c return adis_write_reg_16(&st->adis, reg, bias); st 436 drivers/iio/imu/adis16480.c return adis_write_reg_32(&st->adis, reg, bias); st 448 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 456 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, reg, &val16); st 462 drivers/iio/imu/adis16480.c ret = adis_read_reg_32(&st->adis, reg, &val32); st 480 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 485 drivers/iio/imu/adis16480.c return adis_write_reg_16(&st->adis, reg, scale); st 492 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 496 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, reg, &val16); st 533 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 542 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, reg, &val); st 549 drivers/iio/imu/adis16480.c *freq = st->chip_info->filter_freqs[(val >> offset) & 0x3]; st 557 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 568 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, reg, &val); st 576 drivers/iio/imu/adis16480.c best_diff = st->chip_info->filter_freqs[0]; st 578 drivers/iio/imu/adis16480.c if (st->chip_info->filter_freqs[i] >= freq) { st 579 drivers/iio/imu/adis16480.c diff = st->chip_info->filter_freqs[i] - freq; st 592 drivers/iio/imu/adis16480.c return adis_write_reg_16(&st->adis, reg, val); st 598 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 607 drivers/iio/imu/adis16480.c *val = st->chip_info->gyro_max_scale; st 608 drivers/iio/imu/adis16480.c *val2 = st->chip_info->gyro_max_val; st 611 drivers/iio/imu/adis16480.c *val = st->chip_info->accel_max_scale; st 612 drivers/iio/imu/adis16480.c *val2 = st->chip_info->accel_max_val; st 624 drivers/iio/imu/adis16480.c *val = st->chip_info->temp_scale / 1000; st 625 drivers/iio/imu/adis16480.c *val2 = (st->chip_info->temp_scale % 1000) * 1000; st 641 drivers/iio/imu/adis16480.c *val = DIV_ROUND_CLOSEST_ULL(temp, st->chip_info->temp_scale); st 934 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 937 drivers/iio/imu/adis16480.c ret = adis_write_reg_16(&st->adis, ADIS16480_REG_SLP_CNT, BIT(9)); st 962 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 967 drivers/iio/imu/adis16480.c adis_reset(&st->adis); st 970 drivers/iio/imu/adis16480.c ret = adis_write_reg_16(&st->adis, ADIS16480_REG_GLOB_CMD, BIT(1)); st 975 drivers/iio/imu/adis16480.c ret = adis_check_status(&st->adis); st 979 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, ADIS16480_REG_PROD_ID, &prod_id); st 1042 drivers/iio/imu/adis16480.c struct adis16480 *st) st 1050 drivers/iio/imu/adis16480.c desc = irq_get_irq_data(st->adis.spi->irq); st 1052 drivers/iio/imu/adis16480.c dev_err(&st->adis.spi->dev, "Could not find IRQ %d\n", irq); st 1089 drivers/iio/imu/adis16480.c dev_err(&st->adis.spi->dev, st 1094 drivers/iio/imu/adis16480.c return adis_write_reg_16(&st->adis, ADIS16480_REG_FNCTIO_CTRL, val); st 1097 drivers/iio/imu/adis16480.c static int adis16480_of_get_ext_clk_pin(struct adis16480 *st, st 1114 drivers/iio/imu/adis16480.c dev_info(&st->adis.spi->dev, st 1119 drivers/iio/imu/adis16480.c static int adis16480_ext_clk_config(struct adis16480 *st, st 1128 drivers/iio/imu/adis16480.c ret = adis_read_reg_16(&st->adis, ADIS16480_REG_FNCTIO_CTRL, &val); st 1132 drivers/iio/imu/adis16480.c pin = adis16480_of_get_ext_clk_pin(st, of_node); st 1139 drivers/iio/imu/adis16480.c dev_warn(&st->adis.spi->dev, st 1146 drivers/iio/imu/adis16480.c if (st->chip_info->has_pps_clk_mode) { st 1147 drivers/iio/imu/adis16480.c mode |= ADIS16480_SYNC_MODE(st->clk_mode); st 1154 drivers/iio/imu/adis16480.c ret = adis_write_reg_16(&st->adis, ADIS16480_REG_FNCTIO_CTRL, val); st 1158 drivers/iio/imu/adis16480.c return clk_prepare_enable(st->ext_clk); st 1161 drivers/iio/imu/adis16480.c static int adis16480_get_ext_clocks(struct adis16480 *st) st 1163 drivers/iio/imu/adis16480.c st->clk_mode = ADIS16480_CLK_INT; st 1164 drivers/iio/imu/adis16480.c st->ext_clk = devm_clk_get(&st->adis.spi->dev, "sync"); st 1165 drivers/iio/imu/adis16480.c if (!IS_ERR_OR_NULL(st->ext_clk)) { st 1166 drivers/iio/imu/adis16480.c st->clk_mode = ADIS16480_CLK_SYNC; st 1170 drivers/iio/imu/adis16480.c if (PTR_ERR(st->ext_clk) != -ENOENT) { st 1171 drivers/iio/imu/adis16480.c dev_err(&st->adis.spi->dev, "failed to get ext clk\n"); st 1172 drivers/iio/imu/adis16480.c return PTR_ERR(st->ext_clk); st 1175 drivers/iio/imu/adis16480.c if (st->chip_info->has_pps_clk_mode) { st 1176 drivers/iio/imu/adis16480.c st->ext_clk = devm_clk_get(&st->adis.spi->dev, "pps"); st 1177 drivers/iio/imu/adis16480.c if (!IS_ERR_OR_NULL(st->ext_clk)) { st 1178 drivers/iio/imu/adis16480.c st->clk_mode = ADIS16480_CLK_PPS; st 1182 drivers/iio/imu/adis16480.c if (PTR_ERR(st->ext_clk) != -ENOENT) { st 1183 drivers/iio/imu/adis16480.c dev_err(&st->adis.spi->dev, "failed to get ext clk\n"); st 1184 drivers/iio/imu/adis16480.c return PTR_ERR(st->ext_clk); st 1195 drivers/iio/imu/adis16480.c struct adis16480 *st; st 1198 drivers/iio/imu/adis16480.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 1204 drivers/iio/imu/adis16480.c st = iio_priv(indio_dev); st 1206 drivers/iio/imu/adis16480.c st->chip_info = &adis16480_chip_info[id->driver_data]; st 1209 drivers/iio/imu/adis16480.c indio_dev->channels = st->chip_info->channels; st 1210 drivers/iio/imu/adis16480.c indio_dev->num_channels = st->chip_info->num_channels; st 1214 drivers/iio/imu/adis16480.c ret = adis_init(&st->adis, indio_dev, spi, &adis16480_data); st 1218 drivers/iio/imu/adis16480.c ret = adis16480_config_irq_pin(spi->dev.of_node, st); st 1222 drivers/iio/imu/adis16480.c ret = adis16480_get_ext_clocks(st); st 1226 drivers/iio/imu/adis16480.c if (!IS_ERR_OR_NULL(st->ext_clk)) { st 1227 drivers/iio/imu/adis16480.c ret = adis16480_ext_clk_config(st, spi->dev.of_node, true); st 1231 drivers/iio/imu/adis16480.c st->clk_freq = clk_get_rate(st->ext_clk); st 1232 drivers/iio/imu/adis16480.c st->clk_freq *= 1000; /* micro */ st 1234 drivers/iio/imu/adis16480.c st->clk_freq = st->chip_info->int_clk; st 1237 drivers/iio/imu/adis16480.c ret = adis_setup_buffer_and_trigger(&st->adis, indio_dev, NULL); st 1256 drivers/iio/imu/adis16480.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 1258 drivers/iio/imu/adis16480.c clk_disable_unprepare(st->ext_clk); st 1265 drivers/iio/imu/adis16480.c struct adis16480 *st = iio_priv(indio_dev); st 1270 drivers/iio/imu/adis16480.c adis_cleanup_buffer_and_trigger(&st->adis, indio_dev); st 1271 drivers/iio/imu/adis16480.c clk_disable_unprepare(st->ext_clk); st 133 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c struct inv_mpu6050_state *st = iio_priv(dev_get_drvdata(&client->dev)); st 135 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c st->mux_client = NULL; st 175 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c st->mux_client = i2c_new_device(st->muxc->adapter[0], &info); st 176 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c if (!st->mux_client) st 185 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c struct inv_mpu6050_state *st = iio_priv(dev_get_drvdata(&client->dev)); st 187 drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c i2c_unregister_device(st->mux_client); st 186 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask) st 196 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_read(st->map, st->reg->pwr_mgmt_1, &mgmt_1); st 209 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->pwr_mgmt_1, mgmt_1); st 214 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_read(st->map, st->reg->pwr_mgmt_2, &d); st 221 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->pwr_mgmt_2, d); st 231 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st 232 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->reg->pwr_mgmt_1, mgmt_1); st 241 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c int inv_mpu6050_set_power_itg(struct inv_mpu6050_state *st, bool power_on) st 246 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (!st->powerup_count) { st 247 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->pwr_mgmt_1, 0); st 253 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->powerup_count++; st 255 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (st->powerup_count == 1) { st 256 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->pwr_mgmt_1, st 261 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->powerup_count--; st 264 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c dev_dbg(regmap_get_device(st->map), "set power %d, count=%u\n", st 265 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c power_on, st->powerup_count); st 277 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_set_lpf_regs(struct inv_mpu6050_state *st, st 282 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->lpf, val); st 286 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c switch (st->chip_type) { st 295 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->accel_lpf, val); st 315 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 317 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 321 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->gyro_config, d); st 325 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_lpf_regs(st, INV_MPU6050_FILTER_20HZ); st 330 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->sample_rate_div, d); st 335 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->accl_config, d); st 339 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->int_pin_cfg, st->irq_mask); st 343 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c memcpy(&st->chip_config, hw_info[st->chip_type].config, st 351 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_period = NSEC_PER_MSEC; st 353 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c return inv_mpu6050_set_power_itg(st, false); st 356 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c inv_mpu6050_set_power_itg(st, false); st 360 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_sensor_set(struct inv_mpu6050_state *st, int reg, st 367 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_bulk_write(st->map, reg + ind, (u8 *)&d, 2); st 374 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_sensor_show(struct inv_mpu6050_state *st, int reg, st 381 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_bulk_read(st->map, reg + ind, (u8 *)&d, 2); st 393 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 397 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 403 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, true, st 407 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ret = inv_mpu6050_sensor_show(st, st->reg->raw_gyro, st 409 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, false, st 415 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, true, st 419 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ret = inv_mpu6050_sensor_show(st, st->reg->raw_accl, st 421 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, false, st 429 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ret = inv_mpu6050_sensor_show(st, st->reg->temperature, st 437 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, false); st 444 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c inv_mpu6050_set_power_itg(st, false); st 453 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 461 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 463 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 469 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 471 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c *val2 = gyro_scale_6050[st->chip_config.fsr]; st 472 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 476 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 478 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c *val2 = accel_scale[st->chip_config.accl_fs]; st 479 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 483 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c *val = st->hw->temp.scale / 1000000; st 484 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c *val2 = st->hw->temp.scale % 1000000; st 492 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c *val = st->hw->temp.offset; st 500 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 501 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ret = inv_mpu6050_sensor_show(st, st->reg->gyro_offset, st 503 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 506 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 507 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ret = inv_mpu6050_sensor_show(st, st->reg->accl_offset, st 509 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 520 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_write_gyro_scale(struct inv_mpu6050_state *st, int val) st 528 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->gyro_config, d); st 532 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_config.fsr = i; st 558 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_write_accel_scale(struct inv_mpu6050_state *st, int val) st 566 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->accl_config, d); st 570 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_config.accl_fs = i; st 582 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 593 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 594 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 602 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_write_gyro_scale(st, val2); st 605 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_write_accel_scale(st, val2); st 615 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_sensor_set(st, st 616 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->reg->gyro_offset, st 620 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_sensor_set(st, st 621 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->reg->accl_offset, st 634 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result |= inv_mpu6050_set_power_itg(st, false); st 636 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 653 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu6050_set_lpf(struct inv_mpu6050_state *st, int rate) st 669 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_lpf_regs(st, data); st 672 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_config.lpf = data; st 688 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 705 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 706 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (d == st->chip_config.divider) { st 710 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 714 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->sample_rate_div, d); st 717 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_config.divider = d; st 719 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_lpf(st, fifo_rate); st 724 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result |= inv_mpu6050_set_power_itg(st, false); st 726 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 741 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev)); st 744 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 745 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c fifo_rate = INV_MPU6050_DIVIDER_TO_FIFO_RATE(st->chip_config.divider); st 746 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 762 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(dev_to_iio_dev(dev)); st 773 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c m = st->plat_data.orientation; st 795 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 797 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (st->trig != trig) st 972 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_check_and_setup_chip(struct inv_mpu6050_state *st) st 978 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->hw = &hw_info[st->chip_type]; st 979 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->reg = hw_info[st->chip_type].reg; st 982 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_read(st->map, INV_MPU6050_REG_WHOAMI, ®val); st 985 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (regval != st->hw->whoami) { st 989 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c dev_warn(regmap_get_device(st->map), st 993 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->hw->whoami, st->hw->name); st 998 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c dev_err(regmap_get_device(st->map), st 1000 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c regval, st->hw->whoami, st->hw->name); st 1006 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regmap_write(st->map, st->reg->pwr_mgmt_1, st 1018 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 1022 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, false, st 1026 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_switch_engine(st, false, st 1031 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c return inv_mpu6050_set_power_itg(st, false); st 1034 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c inv_mpu6050_set_power_itg(st, false); st 1038 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu_core_enable_regulator(struct inv_mpu6050_state *st) st 1042 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regulator_enable(st->vddio_supply); st 1044 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c dev_err(regmap_get_device(st->map), st 1054 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c static int inv_mpu_core_disable_regulator(struct inv_mpu6050_state *st) st 1058 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = regulator_disable(st->vddio_supply); st 1060 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c dev_err(regmap_get_device(st->map), st 1074 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st; st 1082 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); st 1092 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st = iio_priv(indio_dev); st 1093 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_init(&st->lock); st 1094 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->chip_type = chip_type; st 1095 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->powerup_count = 0; st 1096 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->irq = irq; st 1097 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->map = regmap; st 1102 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c &st->orientation); st 1109 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->plat_data = *pdata; st 1122 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->irq_mask = INV_MPU6050_ACTIVE_HIGH; st 1124 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->irq_mask = INV_MPU6050_ACTIVE_LOW; st 1126 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->irq_mask = INV_MPU6050_ACTIVE_HIGH | st 1129 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->irq_mask = INV_MPU6050_ACTIVE_LOW | st 1137 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st->vddio_supply = devm_regulator_get(dev, "vddio"); st 1138 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (IS_ERR(st->vddio_supply)) { st 1139 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c if (PTR_ERR(st->vddio_supply) != -EPROBE_DEFER) st 1141 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c (int)PTR_ERR(st->vddio_supply)); st 1143 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c return PTR_ERR(st->vddio_supply); st 1146 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu_core_enable_regulator(st); st 1151 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c st); st 1159 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_check_and_setup_chip(st); st 1221 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(dev_get_drvdata(dev)); st 1224 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 1225 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu_core_enable_regulator(st); st 1229 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, true); st 1231 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 1238 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c struct inv_mpu6050_state *st = iio_priv(dev_get_drvdata(dev)); st 1241 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_lock(&st->lock); st 1242 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c result = inv_mpu6050_set_power_itg(st, false); st 1243 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c inv_mpu_core_disable_regulator(st); st 1244 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c mutex_unlock(&st->lock); st 23 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 26 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c mutex_lock(&st->lock); st 28 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c ret = inv_mpu6050_set_power_itg(st, true); st 32 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c ret = regmap_write(st->map, st->reg->int_pin_cfg, st 33 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c st->irq_mask | INV_MPU6050_BIT_BYPASS_EN); st 36 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c mutex_unlock(&st->lock); st 44 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 46 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c mutex_lock(&st->lock); st 49 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c regmap_write(st->map, st->reg->int_pin_cfg, st->irq_mask); st 50 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c inv_mpu6050_set_power_itg(st, false); st 52 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c mutex_unlock(&st->lock); st 81 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c struct inv_mpu6050_state *st; st 119 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c st = iio_priv(dev_get_drvdata(&client->dev)); st 120 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c switch (st->chip_type) { st 127 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c st->muxc = i2c_mux_alloc(client->adapter, &client->dev, st 131 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c if (!st->muxc) st 133 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c st->muxc->priv = dev_get_drvdata(&client->dev); st 134 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c result = i2c_mux_add_adapter(st->muxc, 0, 0, 0); st 146 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c i2c_mux_del_adapters(st->muxc); st 153 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 155 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c if (st->muxc) { st 157 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c i2c_mux_del_adapters(st->muxc); st 261 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h #define INV_MPU6050_FREQ_DIVIDER(st) \ st 262 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h ((st)->chip_config.divider + 1) st 347 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h int inv_mpu6050_switch_engine(struct inv_mpu6050_state *st, bool en, u32 mask); st 348 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h int inv_mpu6050_write_reg(struct inv_mpu6050_state *st, int reg, u8 val); st 349 drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h int inv_mpu6050_set_power_itg(struct inv_mpu6050_state *st, bool power_on); st 29 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c static void inv_mpu6050_update_period(struct inv_mpu6050_state *st, st 37 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c const s32 divider = INV_MPU6050_FREQ_DIVIDER(st); st 41 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->it_timestamp == 0) { st 52 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c delta = div_s64(timestamp - st->it_timestamp, divider); st 55 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->chip_period = (st->chip_period + delta) / 2; st 66 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c interval = (nb - 1) * st->chip_period * divider; st 67 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->data_timestamp = timestamp - interval; st 71 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->it_timestamp = timestamp; st 82 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c static s64 inv_mpu6050_get_timestamp(struct inv_mpu6050_state *st) st 87 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c ts = st->data_timestamp; st 88 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->data_timestamp += st->chip_period * INV_MPU6050_FREQ_DIVIDER(st); st 97 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 100 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->it_timestamp = 0; st 103 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->int_enable, 0); st 105 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c dev_err(regmap_get_device(st->map), "int_enable failed %d\n", st 110 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->fifo_en, 0); st 114 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->user_ctrl, st 115 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->chip_config.user_ctrl); st 120 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c d = st->chip_config.user_ctrl | INV_MPU6050_BIT_FIFO_RST; st 121 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->user_ctrl, d); st 126 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_config.accl_fifo_enable || st 127 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->chip_config.gyro_fifo_enable) { st 128 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->int_enable, st 134 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c d = st->chip_config.user_ctrl | INV_MPU6050_BIT_FIFO_EN; st 135 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->user_ctrl, d); st 140 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_config.gyro_fifo_enable) st 142 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_config.accl_fifo_enable) st 144 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->fifo_en, d); st 151 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c dev_err(regmap_get_device(st->map), "reset fifo failed %d\n", result); st 152 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_write(st->map, st->reg->int_enable, st 165 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 174 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c mutex_lock(&st->lock); st 177 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_read(st->map, st->reg->int_status, &int_status); st 179 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c dev_err(regmap_get_device(st->map), st 184 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c dev_warn(regmap_get_device(st->map), st 189 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (!(st->chip_config.accl_fifo_enable | st 190 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->chip_config.gyro_fifo_enable)) st 193 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_config.accl_fifo_enable) st 196 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_config.gyro_fifo_enable) st 199 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->chip_type == INV_ICM20602) st 206 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_bulk_read(st->map, st->reg->fifo_count_h, data, st 218 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (fifo_count >= st->hw->fifo_size - nb) { st 219 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c dev_warn(regmap_get_device(st->map), "fifo overflow reset\n"); st 225 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c inv_mpu6050_update_period(st, pf->timestamp, nb); st 227 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c result = regmap_bulk_read(st->map, st->reg->fifo_r_w, st 232 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c if (st->skip_samples) { st 233 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c st->skip_samples--; st 236 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c timestamp = inv_mpu6050_get_timestamp(st); st 241 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c mutex_unlock(&st->lock); st 249 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c mutex_unlock(&st->lock); st 19 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 22 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c ret = inv_mpu6050_set_power_itg(st, true); st 26 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c if (st->reg->i2c_if) { st 27 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c ret = regmap_write(st->map, st->reg->i2c_if, st 30 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c st->chip_config.user_ctrl |= INV_MPU6050_BIT_I2C_IF_DIS; st 31 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c ret = regmap_write(st->map, st->reg->user_ctrl, st 32 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c st->chip_config.user_ctrl); st 35 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c inv_mpu6050_set_power_itg(st, false); st 39 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c return inv_mpu6050_set_power_itg(st, false); st 10 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 12 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->chip_config.gyro_fifo_enable = st 20 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->chip_config.accl_fifo_enable = st 36 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 40 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_set_power_itg(st, true); st 44 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->skip_samples = 0; st 45 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c if (st->chip_config.gyro_fifo_enable) { st 46 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_switch_engine(st, true, st 51 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->skip_samples = 1; st 53 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c if (st->chip_config.accl_fifo_enable) { st 54 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_switch_engine(st, true, st 63 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = regmap_write(st->map, st->reg->fifo_en, 0); st 67 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = regmap_write(st->map, st->reg->int_enable, 0); st 71 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = regmap_write(st->map, st->reg->user_ctrl, st 72 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->chip_config.user_ctrl); st 76 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_switch_engine(st, false, st 81 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_switch_engine(st, false, st 86 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c result = inv_mpu6050_set_power_itg(st, false); st 94 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c if (st->chip_config.accl_fifo_enable) st 95 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c inv_mpu6050_switch_engine(st, false, st 98 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c if (st->chip_config.gyro_fifo_enable) st 99 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c inv_mpu6050_switch_engine(st, false, st 102 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c inv_mpu6050_set_power_itg(st, false); st 115 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 118 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c mutex_lock(&st->lock); st 120 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c mutex_unlock(&st->lock); st 132 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c struct inv_mpu6050_state *st = iio_priv(indio_dev); st 134 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->trig = devm_iio_trigger_alloc(&indio_dev->dev, st 138 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c if (!st->trig) st 141 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c ret = devm_request_irq(&indio_dev->dev, st->irq, st 145 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->trig); st 149 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->trig->dev.parent = regmap_get_device(st->map); st 150 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c st->trig->ops = &inv_mpu_trigger_ops; st 151 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c iio_trigger_set_drvdata(st->trig, indio_dev); st 153 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c ret = devm_iio_trigger_register(&indio_dev->dev, st->trig); st 157 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c indio_dev->trig = iio_trigger_get(st->trig); st 43 drivers/iio/light/cros_ec_light_prox.c struct cros_ec_light_prox_state *st = iio_priv(indio_dev); st 49 drivers/iio/light/cros_ec_light_prox.c mutex_lock(&st->core.cmd_lock); st 82 drivers/iio/light/cros_ec_light_prox.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_OFFSET; st 83 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_offset.flags = 0; st 85 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 90 drivers/iio/light/cros_ec_light_prox.c st->core.calib[0].offset = st 91 drivers/iio/light/cros_ec_light_prox.c st->core.resp->sensor_offset.offset[0]; st 93 drivers/iio/light/cros_ec_light_prox.c *val = st->core.calib[idx].offset; st 102 drivers/iio/light/cros_ec_light_prox.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 103 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_range.data = EC_MOTION_SENSE_NO_VALUE; st 105 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 109 drivers/iio/light/cros_ec_light_prox.c val64 = st->core.resp->sensor_range.ret; st 115 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_sensors_core_read(&st->core, chan, val, val2, st 120 drivers/iio/light/cros_ec_light_prox.c mutex_unlock(&st->core.cmd_lock); st 129 drivers/iio/light/cros_ec_light_prox.c struct cros_ec_light_prox_state *st = iio_priv(indio_dev); st 133 drivers/iio/light/cros_ec_light_prox.c mutex_lock(&st->core.cmd_lock); st 137 drivers/iio/light/cros_ec_light_prox.c st->core.calib[idx].offset = val; st 139 drivers/iio/light/cros_ec_light_prox.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_OFFSET; st 140 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_offset.flags = MOTION_SENSE_SET_OFFSET; st 141 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_offset.offset[0] = st 142 drivers/iio/light/cros_ec_light_prox.c st->core.calib[0].offset; st 143 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_offset.temp = st 145 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 148 drivers/iio/light/cros_ec_light_prox.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 149 drivers/iio/light/cros_ec_light_prox.c st->core.param.sensor_range.data = (val << 16) | (val2 / 100); st 150 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 153 drivers/iio/light/cros_ec_light_prox.c ret = cros_ec_sensors_core_write(&st->core, chan, val, val2, st 158 drivers/iio/light/cros_ec_light_prox.c mutex_unlock(&st->core.cmd_lock); st 227 drivers/iio/light/hid-sensor-als.c struct als_state *st) st 234 drivers/iio/light/hid-sensor-als.c &st->als_illum); st 238 drivers/iio/light/hid-sensor-als.c st->als_illum.size); st 240 drivers/iio/light/hid-sensor-als.c st->als_illum.size); st 242 drivers/iio/light/hid-sensor-als.c dev_dbg(&pdev->dev, "als %x:%x\n", st->als_illum.index, st 243 drivers/iio/light/hid-sensor-als.c st->als_illum.report_id); st 245 drivers/iio/light/hid-sensor-als.c st->scale_precision = hid_sensor_format_scale( st 247 drivers/iio/light/hid-sensor-als.c &st->als_illum, st 248 drivers/iio/light/hid-sensor-als.c &st->scale_pre_decml, &st->scale_post_decml); st 251 drivers/iio/light/hid-sensor-als.c if (st->common_attributes.sensitivity.index < 0) { st 256 drivers/iio/light/hid-sensor-als.c &st->common_attributes.sensitivity); st 258 drivers/iio/light/hid-sensor-als.c st->common_attributes.sensitivity.index, st 259 drivers/iio/light/hid-sensor-als.c st->common_attributes.sensitivity.report_id); st 205 drivers/iio/light/hid-sensor-prox.c struct prox_state *st) st 212 drivers/iio/light/hid-sensor-prox.c &st->prox_attr); st 216 drivers/iio/light/hid-sensor-prox.c st->prox_attr.size); st 218 drivers/iio/light/hid-sensor-prox.c dev_dbg(&pdev->dev, "prox %x:%x\n", st->prox_attr.index, st 219 drivers/iio/light/hid-sensor-prox.c st->prox_attr.report_id); st 222 drivers/iio/light/hid-sensor-prox.c if (st->common_attributes.sensitivity.index < 0) { st 227 drivers/iio/light/hid-sensor-prox.c &st->common_attributes.sensitivity); st 229 drivers/iio/light/hid-sensor-prox.c st->common_attributes.sensitivity.index, st 230 drivers/iio/light/hid-sensor-prox.c st->common_attributes.sensitivity.report_id); st 232 drivers/iio/light/hid-sensor-prox.c if (st->common_attributes.sensitivity.index < 0) st 237 drivers/iio/light/hid-sensor-prox.c &st->common_attributes.sensitivity); st 346 drivers/iio/magnetometer/hid-sensor-magn-3d.c struct magn_3d_state *st) st 362 drivers/iio/magnetometer/hid-sensor-magn-3d.c &(st->magn[i])); st 376 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn[0].index, st 377 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn[0].report_id, st 378 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn[1].index, st->magn[1].report_id, st 379 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn[2].index, st->magn[2].report_id); st 391 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->iio_vals = devm_kcalloc(&pdev->dev, attr_count, st 394 drivers/iio/magnetometer/hid-sensor-magn-3d.c if (!st->iio_vals) { st 403 drivers/iio/magnetometer/hid-sensor-magn-3d.c if (st->magn[i].index >= 0) { st 410 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_val_addr[i] = &(st->iio_vals[*chan_count]); st 413 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn[i].size); st 429 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_flux_attr.scale_precision = hid_sensor_format_scale( st 431 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn[CHANNEL_SCAN_INDEX_X], st 432 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn_flux_attr.scale_pre_decml, st 433 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn_flux_attr.scale_post_decml); st 434 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->rot_attr.scale_precision st 437 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn[CHANNEL_SCAN_INDEX_NORTH_MAGN_TILT_COMP], st 438 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->rot_attr.scale_pre_decml, st 439 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->rot_attr.scale_post_decml); st 442 drivers/iio/magnetometer/hid-sensor-magn-3d.c if (st->magn_flux_attributes.sensitivity.index < 0) { st 447 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn_flux_attributes.sensitivity); st 449 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_flux_attributes.sensitivity.index, st 450 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_flux_attributes.sensitivity.report_id); st 452 drivers/iio/magnetometer/hid-sensor-magn-3d.c if (st->magn_flux_attributes.sensitivity.index < 0) { st 457 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->magn_flux_attributes.sensitivity); st 459 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_flux_attributes.sensitivity.index, st 460 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->magn_flux_attributes.sensitivity.report_id); st 462 drivers/iio/magnetometer/hid-sensor-magn-3d.c if (st->rot_attributes.sensitivity.index < 0) { st 467 drivers/iio/magnetometer/hid-sensor-magn-3d.c &st->rot_attributes.sensitivity); st 469 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->rot_attributes.sensitivity.index, st 470 drivers/iio/magnetometer/hid-sensor-magn-3d.c st->rot_attributes.sensitivity.report_id); st 240 drivers/iio/orientation/hid-sensor-incl-3d.c struct incl_3d_state *st) st 248 drivers/iio/orientation/hid-sensor-incl-3d.c &st->incl[CHANNEL_SCAN_INDEX_X]); st 252 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[CHANNEL_SCAN_INDEX_X].size); st 258 drivers/iio/orientation/hid-sensor-incl-3d.c &st->incl[CHANNEL_SCAN_INDEX_Y]); st 262 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[CHANNEL_SCAN_INDEX_Y].size); st 268 drivers/iio/orientation/hid-sensor-incl-3d.c &st->incl[CHANNEL_SCAN_INDEX_Z]); st 272 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[CHANNEL_SCAN_INDEX_Z].size); st 275 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[0].index, st 276 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[0].report_id, st 277 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[1].index, st->incl[1].report_id, st 278 drivers/iio/orientation/hid-sensor-incl-3d.c st->incl[2].index, st->incl[2].report_id); st 280 drivers/iio/orientation/hid-sensor-incl-3d.c st->scale_precision = hid_sensor_format_scale( st 282 drivers/iio/orientation/hid-sensor-incl-3d.c &st->incl[CHANNEL_SCAN_INDEX_X], st 283 drivers/iio/orientation/hid-sensor-incl-3d.c &st->scale_pre_decml, &st->scale_post_decml); st 286 drivers/iio/orientation/hid-sensor-incl-3d.c if (st->common_attributes.sensitivity.index < 0) { st 291 drivers/iio/orientation/hid-sensor-incl-3d.c &st->common_attributes.sensitivity); st 293 drivers/iio/orientation/hid-sensor-incl-3d.c st->common_attributes.sensitivity.index, st 294 drivers/iio/orientation/hid-sensor-incl-3d.c st->common_attributes.sensitivity.report_id); st 187 drivers/iio/orientation/hid-sensor-rotation.c struct dev_rot_state *st) st 195 drivers/iio/orientation/hid-sensor-rotation.c &st->quaternion); st 200 drivers/iio/orientation/hid-sensor-rotation.c st->quaternion.size / 4); st 202 drivers/iio/orientation/hid-sensor-rotation.c dev_dbg(&pdev->dev, "dev_rot %x:%x\n", st->quaternion.index, st 203 drivers/iio/orientation/hid-sensor-rotation.c st->quaternion.report_id); st 206 drivers/iio/orientation/hid-sensor-rotation.c st->quaternion.size); st 208 drivers/iio/orientation/hid-sensor-rotation.c st->scale_precision = hid_sensor_format_scale( st 210 drivers/iio/orientation/hid-sensor-rotation.c &st->quaternion, st 211 drivers/iio/orientation/hid-sensor-rotation.c &st->scale_pre_decml, &st->scale_post_decml); st 214 drivers/iio/orientation/hid-sensor-rotation.c if (st->common_attributes.sensitivity.index < 0) { st 219 drivers/iio/orientation/hid-sensor-rotation.c &st->common_attributes.sensitivity); st 221 drivers/iio/orientation/hid-sensor-rotation.c st->common_attributes.sensitivity.index, st 222 drivers/iio/orientation/hid-sensor-rotation.c st->common_attributes.sensitivity.report_id); st 41 drivers/iio/pressure/cros_ec_baro.c struct cros_ec_baro_state *st = iio_priv(indio_dev); st 46 drivers/iio/pressure/cros_ec_baro.c mutex_lock(&st->core.cmd_lock); st 59 drivers/iio/pressure/cros_ec_baro.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 60 drivers/iio/pressure/cros_ec_baro.c st->core.param.sensor_range.data = EC_MOTION_SENSE_NO_VALUE; st 62 drivers/iio/pressure/cros_ec_baro.c ret = cros_ec_motion_send_host_cmd(&st->core, 0); st 66 drivers/iio/pressure/cros_ec_baro.c *val = st->core.resp->sensor_range.ret; st 73 drivers/iio/pressure/cros_ec_baro.c ret = cros_ec_sensors_core_read(&st->core, chan, val, val2, st 78 drivers/iio/pressure/cros_ec_baro.c mutex_unlock(&st->core.cmd_lock); st 87 drivers/iio/pressure/cros_ec_baro.c struct cros_ec_baro_state *st = iio_priv(indio_dev); st 90 drivers/iio/pressure/cros_ec_baro.c mutex_lock(&st->core.cmd_lock); st 94 drivers/iio/pressure/cros_ec_baro.c st->core.param.cmd = MOTIONSENSE_CMD_SENSOR_RANGE; st 95 drivers/iio/pressure/cros_ec_baro.c st->core.param.sensor_range.data = val; st 98 drivers/iio/pressure/cros_ec_baro.c st->core.param.sensor_range.roundup = 1; st 100 drivers/iio/pressure/cros_ec_baro.c if (cros_ec_motion_send_host_cmd(&st->core, 0)) st 104 drivers/iio/pressure/cros_ec_baro.c ret = cros_ec_sensors_core_write(&st->core, chan, val, val2, st 109 drivers/iio/pressure/cros_ec_baro.c mutex_unlock(&st->core.cmd_lock); st 209 drivers/iio/pressure/hid-sensor-press.c struct press_state *st) st 216 drivers/iio/pressure/hid-sensor-press.c &st->press_attr); st 220 drivers/iio/pressure/hid-sensor-press.c st->press_attr.size); st 222 drivers/iio/pressure/hid-sensor-press.c dev_dbg(&pdev->dev, "press %x:%x\n", st->press_attr.index, st 223 drivers/iio/pressure/hid-sensor-press.c st->press_attr.report_id); st 225 drivers/iio/pressure/hid-sensor-press.c st->scale_precision = hid_sensor_format_scale( st 227 drivers/iio/pressure/hid-sensor-press.c &st->press_attr, st 228 drivers/iio/pressure/hid-sensor-press.c &st->scale_pre_decml, &st->scale_post_decml); st 231 drivers/iio/pressure/hid-sensor-press.c if (st->common_attributes.sensitivity.index < 0) { st 236 drivers/iio/pressure/hid-sensor-press.c &st->common_attributes.sensitivity); st 238 drivers/iio/pressure/hid-sensor-press.c st->common_attributes.sensitivity.index, st 239 drivers/iio/pressure/hid-sensor-press.c st->common_attributes.sensitivity.report_id); st 85 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 88 drivers/iio/pressure/ms5611_core.c ret = st->read_prom_word(&indio_dev->dev, st 89 drivers/iio/pressure/ms5611_core.c i, &st->chip_info->prom[i]); st 97 drivers/iio/pressure/ms5611_core.c if (!ms5611_prom_is_valid(st->chip_info->prom, MS5611_PROM_WORDS_NB)) { st 109 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 111 drivers/iio/pressure/ms5611_core.c ret = st->read_adc_temp_and_pressure(&indio_dev->dev, temp, pressure); st 118 drivers/iio/pressure/ms5611_core.c return st->chip_info->temp_and_pressure_compensate(st->chip_info, st 197 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 199 drivers/iio/pressure/ms5611_core.c ret = st->reset(&indio_dev->dev); st 214 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 218 drivers/iio/pressure/ms5611_core.c mutex_lock(&st->lock); st 220 drivers/iio/pressure/ms5611_core.c mutex_unlock(&st->lock); st 239 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 243 drivers/iio/pressure/ms5611_core.c mutex_lock(&st->lock); st 246 drivers/iio/pressure/ms5611_core.c mutex_unlock(&st->lock); st 276 drivers/iio/pressure/ms5611_core.c mutex_lock(&st->lock); st 278 drivers/iio/pressure/ms5611_core.c *val = (int)st->temp_osr->rate; st 280 drivers/iio/pressure/ms5611_core.c *val = (int)st->pressure_osr->rate; st 281 drivers/iio/pressure/ms5611_core.c mutex_unlock(&st->lock); st 306 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 326 drivers/iio/pressure/ms5611_core.c mutex_lock(&st->lock); st 329 drivers/iio/pressure/ms5611_core.c st->temp_osr = osr; st 331 drivers/iio/pressure/ms5611_core.c st->pressure_osr = osr; st 333 drivers/iio/pressure/ms5611_core.c mutex_unlock(&st->lock); st 389 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 392 drivers/iio/pressure/ms5611_core.c st->vdd = devm_regulator_get(indio_dev->dev.parent, "vdd"); st 393 drivers/iio/pressure/ms5611_core.c if (IS_ERR(st->vdd)) st 394 drivers/iio/pressure/ms5611_core.c return PTR_ERR(st->vdd); st 396 drivers/iio/pressure/ms5611_core.c ret = regulator_enable(st->vdd); st 414 drivers/iio/pressure/ms5611_core.c regulator_disable(st->vdd); st 420 drivers/iio/pressure/ms5611_core.c const struct ms5611_state *st = iio_priv(indio_dev); st 422 drivers/iio/pressure/ms5611_core.c regulator_disable(st->vdd); st 429 drivers/iio/pressure/ms5611_core.c struct ms5611_state *st = iio_priv(indio_dev); st 431 drivers/iio/pressure/ms5611_core.c mutex_init(&st->lock); st 432 drivers/iio/pressure/ms5611_core.c st->chip_info = &chip_info_tbl[type]; st 433 drivers/iio/pressure/ms5611_core.c st->temp_osr = st 435 drivers/iio/pressure/ms5611_core.c st->pressure_osr = st 23 drivers/iio/pressure/ms5611_i2c.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 25 drivers/iio/pressure/ms5611_i2c.c return i2c_smbus_write_byte(st->client, MS5611_RESET); st 31 drivers/iio/pressure/ms5611_i2c.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 33 drivers/iio/pressure/ms5611_i2c.c ret = i2c_smbus_read_word_swapped(st->client, st 43 drivers/iio/pressure/ms5611_i2c.c static int ms5611_i2c_read_adc(struct ms5611_state *st, s32 *val) st 48 drivers/iio/pressure/ms5611_i2c.c ret = i2c_smbus_read_i2c_block_data(st->client, MS5611_READ_ADC, st 62 drivers/iio/pressure/ms5611_i2c.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 63 drivers/iio/pressure/ms5611_i2c.c const struct ms5611_osr *osr = st->temp_osr; st 65 drivers/iio/pressure/ms5611_i2c.c ret = i2c_smbus_write_byte(st->client, osr->cmd); st 70 drivers/iio/pressure/ms5611_i2c.c ret = ms5611_i2c_read_adc(st, temp); st 74 drivers/iio/pressure/ms5611_i2c.c osr = st->pressure_osr; st 75 drivers/iio/pressure/ms5611_i2c.c ret = i2c_smbus_write_byte(st->client, osr->cmd); st 80 drivers/iio/pressure/ms5611_i2c.c return ms5611_i2c_read_adc(st, pressure); st 86 drivers/iio/pressure/ms5611_i2c.c struct ms5611_state *st; st 95 drivers/iio/pressure/ms5611_i2c.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 99 drivers/iio/pressure/ms5611_i2c.c st = iio_priv(indio_dev); st 101 drivers/iio/pressure/ms5611_i2c.c st->reset = ms5611_i2c_reset; st 102 drivers/iio/pressure/ms5611_i2c.c st->read_prom_word = ms5611_i2c_read_prom_word; st 103 drivers/iio/pressure/ms5611_i2c.c st->read_adc_temp_and_pressure = ms5611_i2c_read_adc_temp_and_pressure; st 104 drivers/iio/pressure/ms5611_i2c.c st->client = client; st 19 drivers/iio/pressure/ms5611_spi.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 21 drivers/iio/pressure/ms5611_spi.c return spi_write_then_read(st->client, &cmd, 1, NULL, 0); st 27 drivers/iio/pressure/ms5611_spi.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 29 drivers/iio/pressure/ms5611_spi.c ret = spi_w8r16be(st->client, MS5611_READ_PROM_WORD + (index << 1)); st 42 drivers/iio/pressure/ms5611_spi.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 44 drivers/iio/pressure/ms5611_spi.c ret = spi_write_then_read(st->client, buf, 1, buf, 3); st 57 drivers/iio/pressure/ms5611_spi.c struct ms5611_state *st = iio_priv(dev_to_iio_dev(dev)); st 58 drivers/iio/pressure/ms5611_spi.c const struct ms5611_osr *osr = st->temp_osr; st 64 drivers/iio/pressure/ms5611_spi.c ret = spi_write_then_read(st->client, &osr->cmd, 1, NULL, 0); st 73 drivers/iio/pressure/ms5611_spi.c osr = st->pressure_osr; st 74 drivers/iio/pressure/ms5611_spi.c ret = spi_write_then_read(st->client, &osr->cmd, 1, NULL, 0); st 85 drivers/iio/pressure/ms5611_spi.c struct ms5611_state *st; st 88 drivers/iio/pressure/ms5611_spi.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 101 drivers/iio/pressure/ms5611_spi.c st = iio_priv(indio_dev); st 102 drivers/iio/pressure/ms5611_spi.c st->reset = ms5611_spi_reset; st 103 drivers/iio/pressure/ms5611_spi.c st->read_prom_word = ms5611_spi_read_prom_word; st 104 drivers/iio/pressure/ms5611_spi.c st->read_adc_temp_and_pressure = ms5611_spi_read_adc_temp_and_pressure; st 105 drivers/iio/pressure/ms5611_spi.c st->client = spi; st 85 drivers/iio/proximity/as3935.c static int as3935_read(struct as3935_state *st, unsigned int reg, int *val) st 91 drivers/iio/proximity/as3935.c ret = spi_w8r8(st->spi, cmd); st 99 drivers/iio/proximity/as3935.c static int as3935_write(struct as3935_state *st, st 103 drivers/iio/proximity/as3935.c u8 *buf = st->buf; st 108 drivers/iio/proximity/as3935.c return spi_write(st->spi, buf, 2); st 115 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(dev_to_iio_dev(dev)); st 118 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_AFE_GAIN, &val); st 130 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(dev_to_iio_dev(dev)); st 141 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_AFE_GAIN, val << 1); st 150 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(dev_to_iio_dev(dev)); st 153 drivers/iio/proximity/as3935.c mutex_lock(&st->lock); st 154 drivers/iio/proximity/as3935.c ret = sprintf(buf, "%d\n", !time_after(jiffies, st->noise_tripped + HZ)); st 155 drivers/iio/proximity/as3935.c mutex_unlock(&st->lock); st 182 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 190 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_DATA, val); st 223 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 226 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_DATA, &val); st 230 drivers/iio/proximity/as3935.c st->buffer[0] = val & AS3935_DATA_MASK; st 231 drivers/iio/proximity/as3935.c iio_push_to_buffers_with_timestamp(indio_dev, &st->buffer, st 244 drivers/iio/proximity/as3935.c struct as3935_state *st; st 248 drivers/iio/proximity/as3935.c st = container_of(work, struct as3935_state, work.work); st 250 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_INT, &val); st 252 drivers/iio/proximity/as3935.c dev_warn(&st->spi->dev, "read error\n"); st 260 drivers/iio/proximity/as3935.c iio_trigger_poll_chained(st->trig); st 264 drivers/iio/proximity/as3935.c mutex_lock(&st->lock); st 265 drivers/iio/proximity/as3935.c st->noise_tripped = jiffies; st 266 drivers/iio/proximity/as3935.c mutex_unlock(&st->lock); st 267 drivers/iio/proximity/as3935.c dev_warn(&st->spi->dev, "noise level is too high\n"); st 275 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 282 drivers/iio/proximity/as3935.c schedule_delayed_work(&st->work, msecs_to_jiffies(3)); st 287 drivers/iio/proximity/as3935.c static void calibrate_as3935(struct as3935_state *st) st 289 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_DEFAULTS, 0x96); st 290 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_CALIBRATE, 0x96); st 291 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_TUNE_CAP, st 292 drivers/iio/proximity/as3935.c BIT(5) | (st->tune_cap / TUNE_CAP_DIV)); st 295 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_TUNE_CAP, (st->tune_cap / TUNE_CAP_DIV)); st 296 drivers/iio/proximity/as3935.c as3935_write(st, AS3935_NFLWDTH, st->nflwdth_reg); st 303 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 306 drivers/iio/proximity/as3935.c mutex_lock(&st->lock); st 307 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_AFE_GAIN, &val); st 312 drivers/iio/proximity/as3935.c ret = as3935_write(st, AS3935_AFE_GAIN, val); st 315 drivers/iio/proximity/as3935.c mutex_unlock(&st->lock); st 323 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 326 drivers/iio/proximity/as3935.c mutex_lock(&st->lock); st 327 drivers/iio/proximity/as3935.c ret = as3935_read(st, AS3935_AFE_GAIN, &val); st 331 drivers/iio/proximity/as3935.c ret = as3935_write(st, AS3935_AFE_GAIN, val); st 333 drivers/iio/proximity/as3935.c calibrate_as3935(st); st 336 drivers/iio/proximity/as3935.c mutex_unlock(&st->lock); st 351 drivers/iio/proximity/as3935.c struct as3935_state *st = iio_priv(indio_dev); st 353 drivers/iio/proximity/as3935.c cancel_delayed_work_sync(&st->work); st 360 drivers/iio/proximity/as3935.c struct as3935_state *st; st 370 drivers/iio/proximity/as3935.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 374 drivers/iio/proximity/as3935.c st = iio_priv(indio_dev); st 375 drivers/iio/proximity/as3935.c st->spi = spi; st 378 drivers/iio/proximity/as3935.c mutex_init(&st->lock); st 381 drivers/iio/proximity/as3935.c "ams,tuning-capacitor-pf", &st->tune_cap); st 383 drivers/iio/proximity/as3935.c st->tune_cap = 0; st 386 drivers/iio/proximity/as3935.c st->tune_cap); st 389 drivers/iio/proximity/as3935.c if (st->tune_cap > MAX_PF_CAP) { st 392 drivers/iio/proximity/as3935.c st->tune_cap); st 397 drivers/iio/proximity/as3935.c "ams,nflwdth", &st->nflwdth_reg); st 398 drivers/iio/proximity/as3935.c if (!ret && st->nflwdth_reg > AS3935_NFLWDTH_MASK) { st 401 drivers/iio/proximity/as3935.c st->nflwdth_reg); st 418 drivers/iio/proximity/as3935.c st->trig = trig; st 419 drivers/iio/proximity/as3935.c st->noise_tripped = jiffies - HZ; st 439 drivers/iio/proximity/as3935.c calibrate_as3935(st); st 441 drivers/iio/proximity/as3935.c INIT_DELAYED_WORK(&st->work, as3935_event_work); st 53 drivers/iio/resolver/ad2s1200.c struct ad2s1200_state *st = iio_priv(indio_dev); st 74 drivers/iio/resolver/ad2s1200.c mutex_lock(&st->lock); st 75 drivers/iio/resolver/ad2s1200.c gpiod_set_value(st->sample, 0); st 79 drivers/iio/resolver/ad2s1200.c gpiod_set_value(st->sample, 1); st 80 drivers/iio/resolver/ad2s1200.c gpiod_set_value(st->rdvel, !!(chan->type == IIO_ANGL)); st 82 drivers/iio/resolver/ad2s1200.c ret = spi_read(st->sdev, &st->rx, 2); st 84 drivers/iio/resolver/ad2s1200.c mutex_unlock(&st->lock); st 90 drivers/iio/resolver/ad2s1200.c *val = be16_to_cpup(&st->rx) >> 4; st 93 drivers/iio/resolver/ad2s1200.c *val = sign_extend32(be16_to_cpup(&st->rx) >> 4, 11); st 96 drivers/iio/resolver/ad2s1200.c mutex_unlock(&st->lock); st 102 drivers/iio/resolver/ad2s1200.c mutex_unlock(&st->lock); st 134 drivers/iio/resolver/ad2s1200.c struct ad2s1200_state *st; st 138 drivers/iio/resolver/ad2s1200.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 143 drivers/iio/resolver/ad2s1200.c st = iio_priv(indio_dev); st 144 drivers/iio/resolver/ad2s1200.c mutex_init(&st->lock); st 145 drivers/iio/resolver/ad2s1200.c st->sdev = spi; st 147 drivers/iio/resolver/ad2s1200.c st->sample = devm_gpiod_get(&spi->dev, "adi,sample", GPIOD_OUT_LOW); st 148 drivers/iio/resolver/ad2s1200.c if (IS_ERR(st->sample)) { st 150 drivers/iio/resolver/ad2s1200.c PTR_ERR(st->sample)); st 151 drivers/iio/resolver/ad2s1200.c return PTR_ERR(st->sample); st 154 drivers/iio/resolver/ad2s1200.c st->rdvel = devm_gpiod_get(&spi->dev, "adi,rdvel", GPIOD_OUT_LOW); st 155 drivers/iio/resolver/ad2s1200.c if (IS_ERR(st->rdvel)) { st 157 drivers/iio/resolver/ad2s1200.c PTR_ERR(st->rdvel)); st 158 drivers/iio/resolver/ad2s1200.c return PTR_ERR(st->rdvel); st 37 drivers/iio/resolver/ad2s90.c struct ad2s90_state *st = iio_priv(indio_dev); st 49 drivers/iio/resolver/ad2s90.c mutex_lock(&st->lock); st 50 drivers/iio/resolver/ad2s90.c ret = spi_read(st->sdev, st->rx, 2); st 52 drivers/iio/resolver/ad2s90.c mutex_unlock(&st->lock); st 55 drivers/iio/resolver/ad2s90.c *val = (((u16)(st->rx[0])) << 4) | ((st->rx[1] & 0xF0) >> 4); st 57 drivers/iio/resolver/ad2s90.c mutex_unlock(&st->lock); st 81 drivers/iio/resolver/ad2s90.c struct ad2s90_state *st; st 89 drivers/iio/resolver/ad2s90.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 92 drivers/iio/resolver/ad2s90.c st = iio_priv(indio_dev); st 95 drivers/iio/resolver/ad2s90.c mutex_init(&st->lock); st 96 drivers/iio/resolver/ad2s90.c st->sdev = spi; st 157 drivers/iio/temperature/hid-sensor-temperature.c struct temperature_state *st) st 164 drivers/iio/temperature/hid-sensor-temperature.c &st->temperature_attr); st 169 drivers/iio/temperature/hid-sensor-temperature.c st->temperature_attr.size); st 171 drivers/iio/temperature/hid-sensor-temperature.c st->scale_precision = hid_sensor_format_scale( st 173 drivers/iio/temperature/hid-sensor-temperature.c &st->temperature_attr, st 174 drivers/iio/temperature/hid-sensor-temperature.c &st->scale_pre_decml, &st->scale_post_decml); st 177 drivers/iio/temperature/hid-sensor-temperature.c if (st->common_attributes.sensitivity.index < 0) st 182 drivers/iio/temperature/hid-sensor-temperature.c &st->common_attributes.sensitivity); st 753 drivers/infiniband/core/nldev.c struct rdma_hw_stats *st = counter->stats; st 761 drivers/infiniband/core/nldev.c for (i = 0; i < st->num_counters; i++) st 762 drivers/infiniband/core/nldev.c if (fill_stat_hwcounter_entry(msg, st->names[i], st->value[i])) st 622 drivers/infiniband/hw/hfi1/trace_tx.h #define usdma_complete_name(st) { st, #st } st 623 drivers/infiniband/hw/hfi1/trace_tx.h #define show_usdma_complete_state(st) \ st 624 drivers/infiniband/hw/hfi1/trace_tx.h __print_symbolic(st, \ st 2173 drivers/infiniband/hw/mlx5/qp.c MLX5_SET(qpc, qpc, st, mlx5_st); st 35 drivers/input/keyboard/adc-keys.c struct adc_keys_state *st = dev->private; st 40 drivers/input/keyboard/adc-keys.c ret = iio_read_channel_processed(st->channel, &value); st 43 drivers/input/keyboard/adc-keys.c value = st->keyup_voltage; st 45 drivers/input/keyboard/adc-keys.c for (i = 0; i < st->num_keys; i++) { st 46 drivers/input/keyboard/adc-keys.c diff = abs(st->map[i].voltage - value); st 49 drivers/input/keyboard/adc-keys.c keycode = st->map[i].keycode; st 54 drivers/input/keyboard/adc-keys.c if (abs(st->keyup_voltage - value) < closest) st 57 drivers/input/keyboard/adc-keys.c if (st->last_key && st->last_key != keycode) st 58 drivers/input/keyboard/adc-keys.c input_report_key(dev->input, st->last_key, 0); st 64 drivers/input/keyboard/adc-keys.c st->last_key = keycode; st 67 drivers/input/keyboard/adc-keys.c static int adc_keys_load_keymap(struct device *dev, struct adc_keys_state *st) st 73 drivers/input/keyboard/adc-keys.c st->num_keys = device_get_child_node_count(dev); st 74 drivers/input/keyboard/adc-keys.c if (st->num_keys == 0) { st 79 drivers/input/keyboard/adc-keys.c map = devm_kmalloc_array(dev, st->num_keys, sizeof(*map), GFP_KERNEL); st 103 drivers/input/keyboard/adc-keys.c st->map = map; st 110 drivers/input/keyboard/adc-keys.c struct adc_keys_state *st; st 117 drivers/input/keyboard/adc-keys.c st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL); st 118 drivers/input/keyboard/adc-keys.c if (!st) st 121 drivers/input/keyboard/adc-keys.c st->channel = devm_iio_channel_get(dev, "buttons"); st 122 drivers/input/keyboard/adc-keys.c if (IS_ERR(st->channel)) st 123 drivers/input/keyboard/adc-keys.c return PTR_ERR(st->channel); st 125 drivers/input/keyboard/adc-keys.c if (!st->channel->indio_dev) st 128 drivers/input/keyboard/adc-keys.c error = iio_get_channel_type(st->channel, &type); st 138 drivers/input/keyboard/adc-keys.c &st->keyup_voltage)) { st 142 drivers/input/keyboard/adc-keys.c st->keyup_voltage /= 1000; st 144 drivers/input/keyboard/adc-keys.c error = adc_keys_load_keymap(dev, st); st 158 drivers/input/keyboard/adc-keys.c poll_dev->private = st; st 171 drivers/input/keyboard/adc-keys.c for (i = 0; i < st->num_keys; i++) st 172 drivers/input/keyboard/adc-keys.c __set_bit(st->map[i].keycode, input->keybit); st 483 drivers/input/mouse/alps.c int dx = fields->st.x - corner[i].x; st 484 drivers/input/mouse/alps.c int dy = fields->st.y - corner[i].y; st 496 drivers/input/mouse/alps.c fields->mt[0] = fields->st; st 532 drivers/input/mouse/alps.c f->mt[0].x = f->st.x; st 533 drivers/input/mouse/alps.c f->mt[0].y = f->st.y; st 649 drivers/input/mouse/alps.c f->st.x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | st 651 drivers/input/mouse/alps.c f->st.y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); st 677 drivers/input/mouse/alps.c f->st.x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | st 679 drivers/input/mouse/alps.c f->st.y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); st 698 drivers/input/mouse/alps.c f->st.x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7)); st 699 drivers/input/mouse/alps.c f->st.y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3)); st 789 drivers/input/mouse/alps.c if (f->st.x && f->st.y && !f->pressure) st 916 drivers/input/mouse/alps.c f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | st 918 drivers/input/mouse/alps.c f->st.y = ((packet[2] & 0x7f) << 4) | (packet[3] & 0x0f); st 238 drivers/input/mouse/alps.h struct input_mt_pos st; st 46 drivers/input/touchscreen/resistive-adc-touch.c struct grts_state *st = private; st 52 drivers/input/touchscreen/resistive-adc-touch.c if (st->pressure) st 55 drivers/input/touchscreen/resistive-adc-touch.c if ((!x && !y) || (st->pressure && (press < st->pressure_min))) { st 57 drivers/input/touchscreen/resistive-adc-touch.c input_report_key(st->input, BTN_TOUCH, 0); st 58 drivers/input/touchscreen/resistive-adc-touch.c input_sync(st->input); st 63 drivers/input/touchscreen/resistive-adc-touch.c touchscreen_report_pos(st->input, &st->prop, x, y, false); st 64 drivers/input/touchscreen/resistive-adc-touch.c if (st->pressure) st 65 drivers/input/touchscreen/resistive-adc-touch.c input_report_abs(st->input, ABS_PRESSURE, press); st 66 drivers/input/touchscreen/resistive-adc-touch.c input_report_key(st->input, BTN_TOUCH, 1); st 67 drivers/input/touchscreen/resistive-adc-touch.c input_sync(st->input); st 75 drivers/input/touchscreen/resistive-adc-touch.c struct grts_state *st = input_get_drvdata(dev); st 77 drivers/input/touchscreen/resistive-adc-touch.c error = iio_channel_start_all_cb(st->iio_cb); st 87 drivers/input/touchscreen/resistive-adc-touch.c struct grts_state *st = input_get_drvdata(dev); st 89 drivers/input/touchscreen/resistive-adc-touch.c iio_channel_stop_all_cb(st->iio_cb); st 99 drivers/input/touchscreen/resistive-adc-touch.c struct grts_state *st; st 105 drivers/input/touchscreen/resistive-adc-touch.c st = devm_kzalloc(dev, sizeof(struct grts_state), GFP_KERNEL); st 106 drivers/input/touchscreen/resistive-adc-touch.c if (!st) st 110 drivers/input/touchscreen/resistive-adc-touch.c st->iio_chans = devm_iio_channel_get_all(dev); st 111 drivers/input/touchscreen/resistive-adc-touch.c if (IS_ERR(st->iio_chans)) { st 112 drivers/input/touchscreen/resistive-adc-touch.c error = PTR_ERR(st->iio_chans); st 118 drivers/input/touchscreen/resistive-adc-touch.c chan = &st->iio_chans[0]; st 119 drivers/input/touchscreen/resistive-adc-touch.c st->pressure = false; st 122 drivers/input/touchscreen/resistive-adc-touch.c st->pressure = true; st 126 drivers/input/touchscreen/resistive-adc-touch.c if (st->pressure) { st 129 drivers/input/touchscreen/resistive-adc-touch.c &st->pressure_min); st 132 drivers/input/touchscreen/resistive-adc-touch.c st->pressure_min = GRTS_DEFAULT_PRESSURE_MIN; st 149 drivers/input/touchscreen/resistive-adc-touch.c if (st->pressure) st 150 drivers/input/touchscreen/resistive-adc-touch.c input_set_abs_params(input, ABS_PRESSURE, st->pressure_min, st 156 drivers/input/touchscreen/resistive-adc-touch.c touchscreen_parse_properties(input, false, &st->prop); st 158 drivers/input/touchscreen/resistive-adc-touch.c st->input = input; st 159 drivers/input/touchscreen/resistive-adc-touch.c input_set_drvdata(input, st); st 167 drivers/input/touchscreen/resistive-adc-touch.c st->iio_cb = iio_channel_get_all_cb(dev, grts_cb, st); st 168 drivers/input/touchscreen/resistive-adc-touch.c if (IS_ERR(st->iio_cb)) { st 170 drivers/input/touchscreen/resistive-adc-touch.c return PTR_ERR(st->iio_cb); st 173 drivers/input/touchscreen/resistive-adc-touch.c error = devm_add_action_or_reset(dev, grts_disable, st->iio_cb); st 69 drivers/input/touchscreen/surface3_spi.c int st = finger->status & 0x01; st 78 drivers/input/touchscreen/surface3_spi.c input_mt_report_slot_state(ts_data->input_dev, MT_TOOL_FINGER, st); st 79 drivers/input/touchscreen/surface3_spi.c if (st) { st 127 drivers/input/touchscreen/surface3_spi.c int st = pen->status; st 128 drivers/input/touchscreen/surface3_spi.c int prox = st & 0x01; st 129 drivers/input/touchscreen/surface3_spi.c int rubber = st & 0x18; st 139 drivers/input/touchscreen/surface3_spi.c input_report_key(dev, BTN_TOUCH, st & 0x12); st 143 drivers/input/touchscreen/surface3_spi.c if (st) { st 146 drivers/input/touchscreen/surface3_spi.c st & 0x04); st 90 drivers/irqchip/irq-sa11x0.c struct sa1100irq_state *st = &sa1100irq_state; st 92 drivers/irqchip/irq-sa11x0.c st->saved = 1; st 93 drivers/irqchip/irq-sa11x0.c st->icmr = readl_relaxed(iobase + ICMR); st 94 drivers/irqchip/irq-sa11x0.c st->iclr = readl_relaxed(iobase + ICLR); st 95 drivers/irqchip/irq-sa11x0.c st->iccr = readl_relaxed(iobase + ICCR); st 100 drivers/irqchip/irq-sa11x0.c writel_relaxed(st->icmr & 0xfffff000, iobase + ICMR); st 107 drivers/irqchip/irq-sa11x0.c struct sa1100irq_state *st = &sa1100irq_state; st 109 drivers/irqchip/irq-sa11x0.c if (st->saved) { st 110 drivers/irqchip/irq-sa11x0.c writel_relaxed(st->iccr, iobase + ICCR); st 111 drivers/irqchip/irq-sa11x0.c writel_relaxed(st->iclr, iobase + ICLR); st 113 drivers/irqchip/irq-sa11x0.c writel_relaxed(st->icmr, iobase + ICMR); st 361 drivers/isdn/mISDN/core.c if (!ch->st) st 363 drivers/isdn/mISDN/core.c if (!ch->st->dev) st 365 drivers/isdn/mISDN/core.c return dev_name(&ch->st->dev->dev); st 1083 drivers/isdn/mISDN/dsp_core.c ndsp->up->st->dev->id + 1, ndsp); st 298 drivers/isdn/mISDN/layer2.c if (l2->ch.st) st 299 drivers/isdn/mISDN/layer2.c l2->ch.st->own.recv(&l2->ch.st->own, skb); st 2072 drivers/isdn/mISDN/layer2.c if (l2->ch.st) st 2073 drivers/isdn/mISDN/layer2.c l2->ch.st->dev->D.ctrl(&l2->ch.st->dev->D, st 2122 drivers/isdn/mISDN/layer2.c l2->ch.st = ch->st; st 2149 drivers/isdn/mISDN/layer2.c l2->ch.st->dev->D.ctrl(&l2->ch.st->dev->D, OPEN_CHANNEL, &rq); st 2174 drivers/isdn/mISDN/layer2.c l2->ch.st->dev->D.ctrl(&l2->ch.st->dev->D, OPEN_CHANNEL, &rq); st 21 drivers/isdn/mISDN/stack.c _queue_message(struct mISDNstack *st, struct sk_buff *skb) st 28 drivers/isdn/mISDN/stack.c skb_queue_tail(&st->msgq, skb); st 29 drivers/isdn/mISDN/stack.c if (likely(!test_bit(mISDN_STACK_STOPPED, &st->status))) { st 30 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_WORK, &st->status); st 31 drivers/isdn/mISDN/stack.c wake_up_interruptible(&st->workq); st 38 drivers/isdn/mISDN/stack.c _queue_message(ch->st, skb); st 43 drivers/isdn/mISDN/stack.c get_channel4id(struct mISDNstack *st, u_int id) st 47 drivers/isdn/mISDN/stack.c mutex_lock(&st->lmutex); st 48 drivers/isdn/mISDN/stack.c list_for_each_entry(ch, &st->layer2, list) { st 54 drivers/isdn/mISDN/stack.c mutex_unlock(&st->lmutex); st 82 drivers/isdn/mISDN/stack.c send_layer2(struct mISDNstack *st, struct sk_buff *skb) st 89 drivers/isdn/mISDN/stack.c if (!st) st 91 drivers/isdn/mISDN/stack.c mutex_lock(&st->lmutex); st 93 drivers/isdn/mISDN/stack.c list_for_each_entry(ch, &st->layer2, list) { st 94 drivers/isdn/mISDN/stack.c if (list_is_last(&ch->list, &st->layer2)) { st 118 drivers/isdn/mISDN/stack.c list_for_each_entry(ch, &st->layer2, list) { st 126 drivers/isdn/mISDN/stack.c ret = st->dev->teimgr->ctrl(st->dev->teimgr, CHECK_DATA, skb); st 135 drivers/isdn/mISDN/stack.c mutex_unlock(&st->lmutex); st 140 drivers/isdn/mISDN/stack.c send_msg_to_layer(struct mISDNstack *st, struct sk_buff *skb) st 151 drivers/isdn/mISDN/stack.c if (!hlist_empty(&st->l1sock.head)) { st 153 drivers/isdn/mISDN/stack.c send_socklist(&st->l1sock, skb); st 155 drivers/isdn/mISDN/stack.c return st->layer1->send(st->layer1, skb); st 157 drivers/isdn/mISDN/stack.c if (!hlist_empty(&st->l1sock.head)) st 158 drivers/isdn/mISDN/stack.c send_socklist(&st->l1sock, skb); st 159 drivers/isdn/mISDN/stack.c send_layer2(st, skb); st 162 drivers/isdn/mISDN/stack.c ch = get_channel4id(st, hh->id); st 168 drivers/isdn/mISDN/stack.c __func__, dev_name(&st->dev->dev), hh->prim, st 172 drivers/isdn/mISDN/stack.c ch = get_channel4id(st, hh->id); st 178 drivers/isdn/mISDN/stack.c __func__, dev_name(&st->dev->dev), hh->prim, st 183 drivers/isdn/mISDN/stack.c __func__, dev_name(&st->dev->dev), hh->prim); st 189 drivers/isdn/mISDN/stack.c do_clear_stack(struct mISDNstack *st) st 196 drivers/isdn/mISDN/stack.c struct mISDNstack *st = data; st 205 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev)); st 207 drivers/isdn/mISDN/stack.c if (st->notify != NULL) { st 208 drivers/isdn/mISDN/stack.c complete(st->notify); st 209 drivers/isdn/mISDN/stack.c st->notify = NULL; st 215 drivers/isdn/mISDN/stack.c if (unlikely(test_bit(mISDN_STACK_STOPPED, &st->status))) { st 216 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_WORK, &st->status); st 217 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); st 219 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_RUNNING, &st->status); st 220 drivers/isdn/mISDN/stack.c while (test_bit(mISDN_STACK_WORK, &st->status)) { st 221 drivers/isdn/mISDN/stack.c skb = skb_dequeue(&st->msgq); st 224 drivers/isdn/mISDN/stack.c &st->status); st 226 drivers/isdn/mISDN/stack.c skb = skb_dequeue(&st->msgq); st 230 drivers/isdn/mISDN/stack.c &st->status); st 233 drivers/isdn/mISDN/stack.c st->msg_cnt++; st 235 drivers/isdn/mISDN/stack.c err = send_msg_to_layer(st, skb); st 241 drivers/isdn/mISDN/stack.c __func__, dev_name(&st->dev->dev), st 248 drivers/isdn/mISDN/stack.c &st->status))) { st 250 drivers/isdn/mISDN/stack.c &st->status); st 252 drivers/isdn/mISDN/stack.c &st->status); st 256 drivers/isdn/mISDN/stack.c if (test_bit(mISDN_STACK_CLEARING, &st->status)) { st 257 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_STOPPED, &st->status); st 258 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); st 259 drivers/isdn/mISDN/stack.c do_clear_stack(st); st 260 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_CLEARING, &st->status); st 261 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_RESTART, &st->status); st 263 drivers/isdn/mISDN/stack.c if (test_and_clear_bit(mISDN_STACK_RESTART, &st->status)) { st 264 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_STOPPED, &st->status); st 265 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_RUNNING, &st->status); st 266 drivers/isdn/mISDN/stack.c if (!skb_queue_empty(&st->msgq)) st 268 drivers/isdn/mISDN/stack.c &st->status); st 270 drivers/isdn/mISDN/stack.c if (test_bit(mISDN_STACK_ABORT, &st->status)) st 272 drivers/isdn/mISDN/stack.c if (st->notify != NULL) { st 273 drivers/isdn/mISDN/stack.c complete(st->notify); st 274 drivers/isdn/mISDN/stack.c st->notify = NULL; st 277 drivers/isdn/mISDN/stack.c st->sleep_cnt++; st 279 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_ACTIVE, &st->status); st 280 drivers/isdn/mISDN/stack.c wait_event_interruptible(st->workq, (st->status & st 284 drivers/isdn/mISDN/stack.c __func__, dev_name(&st->dev->dev), st->status); st 285 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_ACTIVE, &st->status); st 287 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_WAKEUP, &st->status); st 289 drivers/isdn/mISDN/stack.c if (test_bit(mISDN_STACK_STOPPED, &st->status)) { st 290 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); st 292 drivers/isdn/mISDN/stack.c st->stopped_cnt++; st 299 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev), st->msg_cnt, st->sleep_cnt, st 300 drivers/isdn/mISDN/stack.c st->stopped_cnt); st 301 drivers/isdn/mISDN/stack.c task_cputime(st->thread, &utime, &stime); st 304 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev), utime, stime); st 307 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev), st->thread->nvcsw, st->thread->nivcsw); st 309 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev)); st 311 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_KILLED, &st->status); st 312 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); st 313 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_ACTIVE, &st->status); st 314 drivers/isdn/mISDN/stack.c test_and_clear_bit(mISDN_STACK_ABORT, &st->status); st 315 drivers/isdn/mISDN/stack.c skb_queue_purge(&st->msgq); st 316 drivers/isdn/mISDN/stack.c st->thread = NULL; st 317 drivers/isdn/mISDN/stack.c if (st->notify != NULL) { st 318 drivers/isdn/mISDN/stack.c complete(st->notify); st 319 drivers/isdn/mISDN/stack.c st->notify = NULL; st 327 drivers/isdn/mISDN/stack.c if (!ch->st) st 330 drivers/isdn/mISDN/stack.c _queue_message(ch->st, skb); st 341 drivers/isdn/mISDN/stack.c __add_layer2(struct mISDNchannel *ch, struct mISDNstack *st) st 343 drivers/isdn/mISDN/stack.c list_add_tail(&ch->list, &st->layer2); st 347 drivers/isdn/mISDN/stack.c add_layer2(struct mISDNchannel *ch, struct mISDNstack *st) st 349 drivers/isdn/mISDN/stack.c mutex_lock(&st->lmutex); st 350 drivers/isdn/mISDN/stack.c __add_layer2(ch, st); st 351 drivers/isdn/mISDN/stack.c mutex_unlock(&st->lmutex); st 357 drivers/isdn/mISDN/stack.c if (!ch->st || !ch->st->layer1) st 359 drivers/isdn/mISDN/stack.c return ch->st->layer1->ctrl(ch->st->layer1, cmd, arg); st 381 drivers/isdn/mISDN/stack.c dev->D.st = newst; st 390 drivers/isdn/mISDN/stack.c dev->teimgr->st = newst; st 394 drivers/isdn/mISDN/stack.c newst->own.st = newst; st 435 drivers/isdn/mISDN/stack.c ch->peer = &dev->D.st->own; st 436 drivers/isdn/mISDN/stack.c ch->st = dev->D.st; st 444 drivers/isdn/mISDN/stack.c write_lock_bh(&dev->D.st->l1sock.lock); st 445 drivers/isdn/mISDN/stack.c sk_add_node(&msk->sk, &dev->D.st->l1sock.head); st 446 drivers/isdn/mISDN/stack.c write_unlock_bh(&dev->D.st->l1sock.lock); st 467 drivers/isdn/mISDN/stack.c ch->st = dev->D.st; st 479 drivers/isdn/mISDN/stack.c rq.ch->st = dev->D.st; st 492 drivers/isdn/mISDN/stack.c rq2.ch->st = dev->D.st; st 504 drivers/isdn/mISDN/stack.c rq.ch->st = dev->D.st; st 534 drivers/isdn/mISDN/stack.c ch->peer = &dev->D.st->own; st 535 drivers/isdn/mISDN/stack.c ch->st = dev->D.st; st 549 drivers/isdn/mISDN/stack.c add_layer2(rq.ch, dev->D.st); st 551 drivers/isdn/mISDN/stack.c rq.ch->peer = &dev->D.st->own; st 567 drivers/isdn/mISDN/stack.c if (!ch->st) { st 573 drivers/isdn/mISDN/stack.c dev_name(&ch->st->dev->dev), ch->protocol); st 586 drivers/isdn/mISDN/stack.c write_lock_bh(&ch->st->l1sock.lock); st 588 drivers/isdn/mISDN/stack.c write_unlock_bh(&ch->st->l1sock.lock); st 589 drivers/isdn/mISDN/stack.c ch->st->dev->D.ctrl(&ch->st->dev->D, CLOSE_CHANNEL, NULL); st 592 drivers/isdn/mISDN/stack.c pch = get_channel4id(ch->st, ch->nr); st 594 drivers/isdn/mISDN/stack.c mutex_lock(&ch->st->lmutex); st 596 drivers/isdn/mISDN/stack.c mutex_unlock(&ch->st->lmutex); st 598 drivers/isdn/mISDN/stack.c pch = ch->st->dev->teimgr; st 605 drivers/isdn/mISDN/stack.c pch = ch->st->dev->teimgr; st 621 drivers/isdn/mISDN/stack.c struct mISDNstack *st = dev->D.st; st 626 drivers/isdn/mISDN/stack.c dev_name(&st->dev->dev)); st 629 drivers/isdn/mISDN/stack.c if (st->thread) { st 630 drivers/isdn/mISDN/stack.c if (st->notify) { st 633 drivers/isdn/mISDN/stack.c complete(st->notify); st 635 drivers/isdn/mISDN/stack.c st->notify = &done; st 636 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_ABORT, &st->status); st 637 drivers/isdn/mISDN/stack.c test_and_set_bit(mISDN_STACK_WAKEUP, &st->status); st 638 drivers/isdn/mISDN/stack.c wake_up_interruptible(&st->workq); st 641 drivers/isdn/mISDN/stack.c if (!list_empty(&st->layer2)) st 644 drivers/isdn/mISDN/stack.c if (!hlist_empty(&st->l1sock.head)) st 647 drivers/isdn/mISDN/stack.c kfree(st); st 84 drivers/isdn/mISDN/tei.c printk(KERN_DEBUG "mgr(%d): %pV\n", mgr->ch.st->dev->id, &vaf); st 794 drivers/isdn/mISDN/tei.c if (mgr->ch.st->dev->Dprotocols & ((1 << ISDN_P_TE_E1) | st 831 drivers/isdn/mISDN/tei.c __add_layer2(&l2->ch, mgr->ch.st); st 836 drivers/isdn/mISDN/tei.c rq.adr.dev = mgr->ch.st->dev->id; st 837 drivers/isdn/mISDN/tei.c id = mgr->ch.st->own.ctrl(&mgr->ch.st->own, OPEN_CHANNEL, &rq); st 993 drivers/isdn/mISDN/tei.c __func__, dev_name(&mgr->ch.st->dev->dev), st 1025 drivers/isdn/mISDN/tei.c if (mgr->ch.st->dev->Dprotocols st 1087 drivers/isdn/mISDN/tei.c id = mgr->ch.st->own.ctrl(&mgr->ch.st->own, OPEN_CHANNEL, st 1150 drivers/isdn/mISDN/tei.c mutex_lock(&mgr->ch.st->lmutex); st 1152 drivers/isdn/mISDN/tei.c mutex_unlock(&mgr->ch.st->lmutex); st 1166 drivers/isdn/mISDN/tei.c mgr->ch.st->dev->D.ctrl(&mgr->ch.st->dev->D, CLOSE_CHANNEL, NULL); st 1246 drivers/isdn/mISDN/tei.c mutex_lock(&mgr->ch.st->lmutex); st 1248 drivers/isdn/mISDN/tei.c mutex_unlock(&mgr->ch.st->lmutex); st 1312 drivers/isdn/mISDN/tei.c ret = ch->st->own.recv(&ch->st->own, cskb); st 1358 drivers/isdn/mISDN/tei.c mgr->ch.st = dev->D.st; st 1360 drivers/isdn/mISDN/tei.c add_layer2(&mgr->ch, dev->D.st); st 1363 drivers/isdn/mISDN/tei.c mgr->bcast.st = dev->D.st; st 1365 drivers/isdn/mISDN/tei.c add_layer2(&mgr->bcast, dev->D.st); st 25 drivers/macintosh/windfarm_pid.c void wf_pid_init(struct wf_pid_state *st, struct wf_pid_param *param) st 27 drivers/macintosh/windfarm_pid.c memset(st, 0, sizeof(struct wf_pid_state)); st 28 drivers/macintosh/windfarm_pid.c st->param = *param; st 29 drivers/macintosh/windfarm_pid.c st->first = 1; st 33 drivers/macintosh/windfarm_pid.c s32 wf_pid_run(struct wf_pid_state *st, s32 new_sample) st 37 drivers/macintosh/windfarm_pid.c int i, hlen = st->param.history_len; st 40 drivers/macintosh/windfarm_pid.c error = new_sample - st->param.itarget; st 43 drivers/macintosh/windfarm_pid.c if (st->first) { st 45 drivers/macintosh/windfarm_pid.c st->samples[i] = new_sample; st 46 drivers/macintosh/windfarm_pid.c st->errors[i] = error; st 48 drivers/macintosh/windfarm_pid.c st->first = 0; st 49 drivers/macintosh/windfarm_pid.c st->index = 0; st 51 drivers/macintosh/windfarm_pid.c st->index = (st->index + 1) % hlen; st 52 drivers/macintosh/windfarm_pid.c st->samples[st->index] = new_sample; st 53 drivers/macintosh/windfarm_pid.c st->errors[st->index] = error; st 58 drivers/macintosh/windfarm_pid.c integ += st->errors[(st->index + hlen - i) % hlen]; st 59 drivers/macintosh/windfarm_pid.c integ *= st->param.interval; st 62 drivers/macintosh/windfarm_pid.c deriv = st->errors[st->index] - st 63 drivers/macintosh/windfarm_pid.c st->errors[(st->index + hlen - 1) % hlen]; st 64 drivers/macintosh/windfarm_pid.c deriv /= st->param.interval; st 67 drivers/macintosh/windfarm_pid.c target = (s32)((integ * (s64)st->param.gr + deriv * (s64)st->param.gd + st 68 drivers/macintosh/windfarm_pid.c error * (s64)st->param.gp) >> 36); st 69 drivers/macintosh/windfarm_pid.c if (st->param.additive) st 70 drivers/macintosh/windfarm_pid.c target += st->target; st 71 drivers/macintosh/windfarm_pid.c target = max(target, st->param.min); st 72 drivers/macintosh/windfarm_pid.c target = min(target, st->param.max); st 73 drivers/macintosh/windfarm_pid.c st->target = target; st 75 drivers/macintosh/windfarm_pid.c return st->target; st 79 drivers/macintosh/windfarm_pid.c void wf_cpu_pid_init(struct wf_cpu_pid_state *st, st 82 drivers/macintosh/windfarm_pid.c memset(st, 0, sizeof(struct wf_cpu_pid_state)); st 83 drivers/macintosh/windfarm_pid.c st->param = *param; st 84 drivers/macintosh/windfarm_pid.c st->first = 1; st 88 drivers/macintosh/windfarm_pid.c s32 wf_cpu_pid_run(struct wf_cpu_pid_state *st, s32 new_power, s32 new_temp) st 92 drivers/macintosh/windfarm_pid.c int i, hlen = st->param.history_len; st 95 drivers/macintosh/windfarm_pid.c error = st->param.pmaxadj - new_power; st 98 drivers/macintosh/windfarm_pid.c if (st->first) { st 100 drivers/macintosh/windfarm_pid.c st->powers[i] = new_power; st 101 drivers/macintosh/windfarm_pid.c st->errors[i] = error; st 103 drivers/macintosh/windfarm_pid.c st->temps[0] = st->temps[1] = new_temp; st 104 drivers/macintosh/windfarm_pid.c st->first = 0; st 105 drivers/macintosh/windfarm_pid.c st->index = st->tindex = 0; st 107 drivers/macintosh/windfarm_pid.c st->index = (st->index + 1) % hlen; st 108 drivers/macintosh/windfarm_pid.c st->powers[st->index] = new_power; st 109 drivers/macintosh/windfarm_pid.c st->errors[st->index] = error; st 110 drivers/macintosh/windfarm_pid.c st->tindex = (st->tindex + 1) % 2; st 111 drivers/macintosh/windfarm_pid.c st->temps[st->tindex] = new_temp; st 116 drivers/macintosh/windfarm_pid.c integ += st->errors[(st->index + hlen - i) % hlen]; st 117 drivers/macintosh/windfarm_pid.c integ *= st->param.interval; st 118 drivers/macintosh/windfarm_pid.c integ *= st->param.gr; st 119 drivers/macintosh/windfarm_pid.c sval = st->param.tmax - (s32)(integ >> 20); st 120 drivers/macintosh/windfarm_pid.c adj = min(st->param.ttarget, sval); st 125 drivers/macintosh/windfarm_pid.c deriv = st->temps[st->tindex] - st 126 drivers/macintosh/windfarm_pid.c st->temps[(st->tindex + 2 - 1) % 2]; st 127 drivers/macintosh/windfarm_pid.c deriv /= st->param.interval; st 128 drivers/macintosh/windfarm_pid.c deriv *= st->param.gd; st 131 drivers/macintosh/windfarm_pid.c prop = st->last_delta = (new_temp - adj); st 132 drivers/macintosh/windfarm_pid.c prop *= st->param.gp; st 137 drivers/macintosh/windfarm_pid.c target = st->target + (s32)((deriv + prop) >> 36); st 138 drivers/macintosh/windfarm_pid.c target = max(target, st->param.min); st 139 drivers/macintosh/windfarm_pid.c target = min(target, st->param.max); st 140 drivers/macintosh/windfarm_pid.c st->target = target; st 142 drivers/macintosh/windfarm_pid.c return st->target; st 44 drivers/macintosh/windfarm_pid.h extern void wf_pid_init(struct wf_pid_state *st, struct wf_pid_param *param); st 45 drivers/macintosh/windfarm_pid.h extern s32 wf_pid_run(struct wf_pid_state *st, s32 sample); st 82 drivers/macintosh/windfarm_pid.h extern void wf_cpu_pid_init(struct wf_cpu_pid_state *st, st 84 drivers/macintosh/windfarm_pid.h extern s32 wf_cpu_pid_run(struct wf_cpu_pid_state *st, s32 power, s32 temp); st 583 drivers/macintosh/windfarm_pm121.c struct pm121_sys_state *st; st 590 drivers/macintosh/windfarm_pm121.c st = pm121_sys_state[loop_id]; st 594 drivers/macintosh/windfarm_pm121.c if (--st->ticks != 0) { st 599 drivers/macintosh/windfarm_pm121.c st->ticks = PM121_SYS_INTERVAL; st 613 drivers/macintosh/windfarm_pm121.c new_setpoint = wf_pid_run(&st->pid, temp); st 618 drivers/macintosh/windfarm_pm121.c st->pid.param.min); st 622 drivers/macintosh/windfarm_pm121.c if (new_setpoint == st->setpoint) st 624 drivers/macintosh/windfarm_pm121.c st->setpoint = new_setpoint; st 629 drivers/macintosh/windfarm_pm121.c rc = control->ops->set_value(control, st->setpoint); st 718 drivers/macintosh/windfarm_pm121.c static void pm121_cpu_fans_tick(struct pm121_cpu_state *st) st 724 drivers/macintosh/windfarm_pm121.c if (--st->ticks != 0) { st 729 drivers/macintosh/windfarm_pm121.c st->ticks = PM121_CPU_INTERVAL; st 752 drivers/macintosh/windfarm_pm121.c if (temp > st->pid.param.tmax) st 755 drivers/macintosh/windfarm_pm121.c new_setpoint = wf_cpu_pid_run(&st->pid, power, temp); st 760 drivers/macintosh/windfarm_pm121.c st->pid.param.min); st 765 drivers/macintosh/windfarm_pm121.c if (st->setpoint == new_setpoint) st 767 drivers/macintosh/windfarm_pm121.c st->setpoint = new_setpoint; st 772 drivers/macintosh/windfarm_pm121.c rc = fan_cpu->ops->set_value(fan_cpu, st->setpoint); st 973 drivers/macintosh/windfarm_pm121.c struct smu_sdbp_sensortree *st = st 975 drivers/macintosh/windfarm_pm121.c pm121_mach_model = st->model_id; st 328 drivers/macintosh/windfarm_pm81.c static void wf_smu_sys_fans_tick(struct wf_smu_sys_fans_state *st) st 333 drivers/macintosh/windfarm_pm81.c if (--st->ticks != 0) { st 338 drivers/macintosh/windfarm_pm81.c st->ticks = WF_SMU_SYS_FANS_INTERVAL; st 351 drivers/macintosh/windfarm_pm81.c if (temp > (st->pid.param.itarget + 0x50000)) st 354 drivers/macintosh/windfarm_pm81.c new_setpoint = wf_pid_run(&st->pid, temp); st 358 drivers/macintosh/windfarm_pm81.c scaled = ((((s64)new_setpoint) * (s64)st->scale0) >> 12) + st->offset0; st 363 drivers/macintosh/windfarm_pm81.c cputarget = ((((s64)cputarget) * (s64)st->scale1) >> 12) + st->offset1; st 365 drivers/macintosh/windfarm_pm81.c scaled = max(scaled, st->pid.param.min); st 366 drivers/macintosh/windfarm_pm81.c scaled = min(scaled, st->pid.param.max); st 370 drivers/macintosh/windfarm_pm81.c if (st->sys_setpoint == scaled && new_setpoint == st->hd_setpoint) st 372 drivers/macintosh/windfarm_pm81.c st->sys_setpoint = scaled; st 373 drivers/macintosh/windfarm_pm81.c st->hd_setpoint = new_setpoint; st 376 drivers/macintosh/windfarm_pm81.c rc = wf_control_set(fan_system, st->sys_setpoint); st 384 drivers/macintosh/windfarm_pm81.c rc = wf_control_set(fan_hd, st->hd_setpoint); st 472 drivers/macintosh/windfarm_pm81.c static void wf_smu_cpu_fans_tick(struct wf_smu_cpu_fans_state *st) st 477 drivers/macintosh/windfarm_pm81.c if (--st->ticks != 0) { st 482 drivers/macintosh/windfarm_pm81.c st->ticks = WF_SMU_CPU_FANS_INTERVAL; st 507 drivers/macintosh/windfarm_pm81.c if (temp > st->pid.param.tmax) st 510 drivers/macintosh/windfarm_pm81.c new_setpoint = wf_cpu_pid_run(&st->pid, power, temp); st 515 drivers/macintosh/windfarm_pm81.c systarget = ((((s64)systarget) * (s64)st->scale) >> 12) st 516 drivers/macintosh/windfarm_pm81.c + st->offset; st 518 drivers/macintosh/windfarm_pm81.c new_setpoint = max(new_setpoint, st->pid.param.min); st 519 drivers/macintosh/windfarm_pm81.c new_setpoint = min(new_setpoint, st->pid.param.max); st 523 drivers/macintosh/windfarm_pm81.c if (st->cpu_setpoint == new_setpoint) st 525 drivers/macintosh/windfarm_pm81.c st->cpu_setpoint = new_setpoint; st 528 drivers/macintosh/windfarm_pm81.c rc = wf_control_set(fan_cpu_main, st->cpu_setpoint); st 708 drivers/macintosh/windfarm_pm81.c struct smu_sdbp_sensortree *st = st 710 drivers/macintosh/windfarm_pm81.c wf_smu_mach_model = st->model_id; st 218 drivers/macintosh/windfarm_pm91.c static void wf_smu_cpu_fans_tick(struct wf_smu_cpu_fans_state *st) st 223 drivers/macintosh/windfarm_pm91.c if (--st->ticks != 0) { st 228 drivers/macintosh/windfarm_pm91.c st->ticks = WF_SMU_CPU_FANS_INTERVAL; st 253 drivers/macintosh/windfarm_pm91.c if (temp > st->pid.param.tmax) st 256 drivers/macintosh/windfarm_pm91.c new_setpoint = wf_cpu_pid_run(&st->pid, power, temp); st 260 drivers/macintosh/windfarm_pm91.c if (st->cpu_setpoint == new_setpoint) st 262 drivers/macintosh/windfarm_pm91.c st->cpu_setpoint = new_setpoint; st 265 drivers/macintosh/windfarm_pm91.c rc = wf_control_set(fan_cpu_main, st->cpu_setpoint); st 273 drivers/macintosh/windfarm_pm91.c rc = wf_control_set(fan_cpu_second, st->cpu_setpoint); st 281 drivers/macintosh/windfarm_pm91.c rc = wf_control_set(fan_cpu_third, st->cpu_setpoint); st 327 drivers/macintosh/windfarm_pm91.c static void wf_smu_drive_fans_tick(struct wf_smu_drive_fans_state *st) st 332 drivers/macintosh/windfarm_pm91.c if (--st->ticks != 0) { st 337 drivers/macintosh/windfarm_pm91.c st->ticks = st->pid.param.interval; st 350 drivers/macintosh/windfarm_pm91.c if (temp > (st->pid.param.itarget + 0x50000)) st 353 drivers/macintosh/windfarm_pm91.c new_setpoint = wf_pid_run(&st->pid, temp); st 357 drivers/macintosh/windfarm_pm91.c if (st->setpoint == new_setpoint) st 359 drivers/macintosh/windfarm_pm91.c st->setpoint = new_setpoint; st 362 drivers/macintosh/windfarm_pm91.c rc = wf_control_set(fan_hd, st->setpoint); st 408 drivers/macintosh/windfarm_pm91.c static void wf_smu_slots_fans_tick(struct wf_smu_slots_fans_state *st) st 413 drivers/macintosh/windfarm_pm91.c if (--st->ticks != 0) { st 418 drivers/macintosh/windfarm_pm91.c st->ticks = st->pid.param.interval; st 432 drivers/macintosh/windfarm_pm91.c if (power > (st->pid.param.itarget + 0x50000)) st 436 drivers/macintosh/windfarm_pm91.c new_setpoint = wf_pid_run(&st->pid, power); st 440 drivers/macintosh/windfarm_pm91.c if (st->setpoint == new_setpoint) st 442 drivers/macintosh/windfarm_pm91.c st->setpoint = new_setpoint; st 445 drivers/macintosh/windfarm_pm91.c rc = wf_control_set(fan_slots, st->setpoint); st 25 drivers/md/dm-stats.h void dm_stats_init(struct dm_stats *st); st 26 drivers/md/dm-stats.h void dm_stats_cleanup(struct dm_stats *st); st 38 drivers/md/dm-stats.h static inline bool dm_stats_used(struct dm_stats *st) st 40 drivers/md/dm-stats.h return !list_empty(&st->list); st 4240 drivers/md/md.c enum array_state st = inactive; st 4245 drivers/md/md.c st = readonly; st 4248 drivers/md/md.c st = read_auto; st 4253 drivers/md/md.c st = write_pending; st 4255 drivers/md/md.c st = clean; st 4257 drivers/md/md.c st = active_idle; st 4259 drivers/md/md.c st = active; st 4263 drivers/md/md.c if (test_bit(MD_BROKEN, &mddev->flags) && st == clean) st 4264 drivers/md/md.c st = broken; st 4269 drivers/md/md.c st = clear; st 4271 drivers/md/md.c st = inactive; st 4273 drivers/md/md.c return sprintf(page, "%s\n", array_states[st]); st 4285 drivers/md/md.c enum array_state st = match_word(buf, array_states); st 4287 drivers/md/md.c if (mddev->pers && (st == active || st == clean) && mddev->ro != 1) { st 4292 drivers/md/md.c if (st == active) { st 4311 drivers/md/md.c switch(st) { st 1224 drivers/media/common/saa7146/saa7146_video.c static void video_irq_done(struct saa7146_dev *dev, unsigned long st) st 1529 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->strength; st 1532 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->cnr; st 1535 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->pre_bit_error; st 1538 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->pre_bit_count; st 1541 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->post_bit_error; st 1544 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->post_bit_count; st 1547 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->block_error; st 1550 drivers/media/dvb-core/dvb_frontend.c tvp->u.st = c->block_count; st 2048 drivers/media/dvb-core/dvb_frontend.c struct dtv_fe_stats st; st 137 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_hab_get_response(struct bcm3510_state *st, u8 *buf, int len) st 143 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa6,v)) < 0) st 147 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa7,&v)) < 0) st 154 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_hab_send_request(struct bcm3510_state *st, u8 *buf, int len) st 162 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa8,&v)) < 0) st 167 drivers/media/dvb-frontends/bcm3510.c bcm3510_writeB(st,0xa8,v); st 174 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa6,hab)) < 0) st 179 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa7,hab)) < 0) st 186 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa8,v)) < 0) st 194 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa8,&v)) < 0) st 205 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_do_hab_cmd(struct bcm3510_state *st, u8 cmd, u8 msgid, u8 *obuf, u8 olen, u8 *ibuf, u8 ilen) st 228 drivers/media/dvb-frontends/bcm3510.c if (mutex_lock_interruptible(&st->hab_mutex) < 0) st 231 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_hab_send_request(st, ob, olen+2)) < 0 || st 232 drivers/media/dvb-frontends/bcm3510.c (ret = bcm3510_hab_get_response(st, ib, ilen+2)) < 0) st 241 drivers/media/dvb-frontends/bcm3510.c mutex_unlock(&st->hab_mutex); st 247 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_is_ap_ready(struct bcm3510_state *st) st 252 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa8,&hab)) < 0 || st 253 drivers/media/dvb-frontends/bcm3510.c (ret = bcm3510_readB(st,0xa2,&ap) < 0)) st 265 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_bert_reset(struct bcm3510_state *st) st 270 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xfa,&b)) < 0) st 273 drivers/media/dvb-frontends/bcm3510.c b.BERCTL_fa.RESYNC = 0; bcm3510_writeB(st,0xfa,b); st 274 drivers/media/dvb-frontends/bcm3510.c b.BERCTL_fa.RESYNC = 1; bcm3510_writeB(st,0xfa,b); st 275 drivers/media/dvb-frontends/bcm3510.c b.BERCTL_fa.RESYNC = 0; bcm3510_writeB(st,0xfa,b); st 276 drivers/media/dvb-frontends/bcm3510.c b.BERCTL_fa.CNTCTL = 1; b.BERCTL_fa.BITCNT = 1; bcm3510_writeB(st,0xfa,b); st 282 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_refresh_state(struct bcm3510_state *st) st 284 drivers/media/dvb-frontends/bcm3510.c if (time_after(jiffies,st->next_status_check)) { st 285 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st, CMD_STATUS, MSGID_STATUS1, NULL,0, (u8 *)&st->status1, sizeof(st->status1)); st 286 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st, CMD_STATUS, MSGID_STATUS2, NULL,0, (u8 *)&st->status2, sizeof(st->status2)); st 287 drivers/media/dvb-frontends/bcm3510.c st->next_status_check = jiffies + (st->status_check_interval*HZ)/1000; st 294 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 295 drivers/media/dvb-frontends/bcm3510.c bcm3510_refresh_state(st); st 298 drivers/media/dvb-frontends/bcm3510.c if (st->status1.STATUS1.RECEIVER_LOCK) st 301 drivers/media/dvb-frontends/bcm3510.c if (st->status1.STATUS1.FEC_LOCK) st 304 drivers/media/dvb-frontends/bcm3510.c if (st->status1.STATUS1.OUT_PLL_LOCK) st 308 drivers/media/dvb-frontends/bcm3510.c st->status_check_interval = 1500; st 310 drivers/media/dvb-frontends/bcm3510.c st->status_check_interval = 500; st 318 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 319 drivers/media/dvb-frontends/bcm3510.c bcm3510_refresh_state(st); st 321 drivers/media/dvb-frontends/bcm3510.c *ber = (st->status2.LDBER0 << 16) | (st->status2.LDBER1 << 8) | st->status2.LDBER2; st 327 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 328 drivers/media/dvb-frontends/bcm3510.c bcm3510_refresh_state(st); st 329 drivers/media/dvb-frontends/bcm3510.c *unc = (st->status2.LDUERC0 << 8) | st->status2.LDUERC1; st 335 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 338 drivers/media/dvb-frontends/bcm3510.c bcm3510_refresh_state(st); st 339 drivers/media/dvb-frontends/bcm3510.c t = st->status2.SIGNAL; st 355 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 356 drivers/media/dvb-frontends/bcm3510.c bcm3510_refresh_state(st); st 358 drivers/media/dvb-frontends/bcm3510.c *snr = st->status1.SNR_EST0*1000 + ((st->status1.SNR_EST1*1000) >> 8); st 363 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a) st 449 drivers/media/dvb-frontends/bcm3510.c return bcm3510_do_hab_cmd(st,CMD_TUNE, MSGID_TUNE,(u8 *) &c,sizeof(c), NULL, 0); st 452 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_set_freq(struct bcm3510_state* st,u32 freq) st 490 drivers/media/dvb-frontends/bcm3510.c return bcm3510_tuner_cmd(st,bc,n,a); st 498 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 561 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st, CMD_ACQUIRE, MSGID_EXT_TUNER_ACQUIRE, (u8 *) &cmd, sizeof(cmd), NULL, 0); st 566 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st, CMD_STATE_CONTROL, MSGID_BERT_CONTROL, (u8 *) &bert, sizeof(bert), NULL, 0); st 567 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st, CMD_STATE_CONTROL, MSGID_BERT_SET, (u8 *) &bert, sizeof(bert), NULL, 0); st 569 drivers/media/dvb-frontends/bcm3510.c bcm3510_bert_reset(st); st 571 drivers/media/dvb-frontends/bcm3510.c ret = bcm3510_set_freq(st, c->frequency); st 575 drivers/media/dvb-frontends/bcm3510.c memset(&st->status1,0,sizeof(st->status1)); st 576 drivers/media/dvb-frontends/bcm3510.c memset(&st->status2,0,sizeof(st->status2)); st 577 drivers/media/dvb-frontends/bcm3510.c st->status_check_interval = 500; st 610 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, const u8 *b, st 618 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa9,vH)) < 0) return ret; st 619 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xaa,vL)) < 0) return ret; st 623 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xab,vD)) < 0) st 632 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 639 drivers/media/dvb-frontends/bcm3510.c if ((ret = st->config->request_firmware(fe, &fw, BCM3510_DEFAULT_FIRMWARE)) < 0) { st 650 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) { st 661 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_check_firmware_version(struct bcm3510_state *st) st 664 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st,CMD_GET_VERSION_INFO,MSGID_GET_VERSION_INFO,NULL,0,(u8*)&ver,sizeof(ver)); st 679 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_reset(struct bcm3510_state *st) st 685 drivers/media/dvb-frontends/bcm3510.c bcm3510_readB(st,0xa0,&v); v.HCTL1_a0.RESET = 1; st 686 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa0,v)) < 0) st 692 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa2,&v)) < 0) st 702 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_clear_reset(struct bcm3510_state *st) st 709 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0xa0,v)) < 0) st 715 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa2,&v)) < 0) st 726 drivers/media/dvb-frontends/bcm3510.c static int bcm3510_init_cold(struct bcm3510_state *st) st 732 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xa2,&v)) < 0) st 740 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_reset(st)) < 0) st 746 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_writeB(st,0x2e,v)) < 0) st 750 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_download_firmware(&st->frontend)) < 0 || st 751 drivers/media/dvb-frontends/bcm3510.c (ret = bcm3510_clear_reset(st)) < 0) st 761 drivers/media/dvb-frontends/bcm3510.c struct bcm3510_state* st = fe->demodulator_priv; st 766 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_readB(st,0xca,&j)) < 0) st 774 drivers/media/dvb-frontends/bcm3510.c if ((ret = bcm3510_init_cold(st)) < 0) st 779 drivers/media/dvb-frontends/bcm3510.c bcm3510_check_firmware_version(st); st 787 drivers/media/dvb-frontends/bcm3510.c bcm3510_do_hab_cmd(st,CMD_AUTO_PARAM,MSGID_SET_RF_AGC_SEL,(u8 *)&c,sizeof(c),NULL,0); st 1558 drivers/media/dvb-frontends/cx24117.c u8 reg, st, inv; st 1579 drivers/media/dvb-frontends/cx24117.c st = buf[5]; st 1582 drivers/media/dvb-frontends/cx24117.c inv = (((state->demod == 0) ? ~st : st) >> 6) & 1; st 1589 drivers/media/dvb-frontends/cx24117.c idx = st & 0x3f; st 2606 drivers/media/dvb-frontends/dib0090.c struct dib0090_state *st = kzalloc(sizeof(struct dib0090_state), GFP_KERNEL); st 2607 drivers/media/dvb-frontends/dib0090.c if (st == NULL) st 2610 drivers/media/dvb-frontends/dib0090.c st->config = config; st 2611 drivers/media/dvb-frontends/dib0090.c st->i2c = i2c; st 2612 drivers/media/dvb-frontends/dib0090.c st->fe = fe; st 2613 drivers/media/dvb-frontends/dib0090.c mutex_init(&st->i2c_buffer_lock); st 2614 drivers/media/dvb-frontends/dib0090.c fe->tuner_priv = st; st 2617 drivers/media/dvb-frontends/dib0090.c st->current_wbd_table = dib0090_wbd_table_default; st 2619 drivers/media/dvb-frontends/dib0090.c st->current_wbd_table = config->wbd; st 2629 drivers/media/dvb-frontends/dib0090.c kfree(st); st 2638 drivers/media/dvb-frontends/dib0090.c struct dib0090_fw_state *st = kzalloc(sizeof(struct dib0090_fw_state), GFP_KERNEL); st 2639 drivers/media/dvb-frontends/dib0090.c if (st == NULL) st 2642 drivers/media/dvb-frontends/dib0090.c st->config = config; st 2643 drivers/media/dvb-frontends/dib0090.c st->i2c = i2c; st 2644 drivers/media/dvb-frontends/dib0090.c st->fe = fe; st 2645 drivers/media/dvb-frontends/dib0090.c mutex_init(&st->i2c_buffer_lock); st 2646 drivers/media/dvb-frontends/dib0090.c fe->tuner_priv = st; st 2648 drivers/media/dvb-frontends/dib0090.c if (dib0090_fw_reset_digital(fe, st->config) != 0) st 2656 drivers/media/dvb-frontends/dib0090.c kfree(st); st 664 drivers/media/dvb-frontends/dib3000mc.c struct dib3000mc_state *st = demod->demodulator_priv; st 665 drivers/media/dvb-frontends/dib3000mc.c return dibx000_get_i2c_adapter(&st->i2c_master, DIBX000_I2C_INTERFACE_TUNER, gating); st 912 drivers/media/dvb-frontends/dib3000mc.c struct dib3000mc_state *st; st 913 drivers/media/dvb-frontends/dib3000mc.c st = kzalloc(sizeof(struct dib3000mc_state), GFP_KERNEL); st 914 drivers/media/dvb-frontends/dib3000mc.c if (st == NULL) st 917 drivers/media/dvb-frontends/dib3000mc.c st->cfg = cfg; st 918 drivers/media/dvb-frontends/dib3000mc.c st->i2c_adap = i2c_adap; st 919 drivers/media/dvb-frontends/dib3000mc.c st->i2c_addr = i2c_addr; st 921 drivers/media/dvb-frontends/dib3000mc.c demod = &st->demod; st 922 drivers/media/dvb-frontends/dib3000mc.c demod->demodulator_priv = st; st 923 drivers/media/dvb-frontends/dib3000mc.c memcpy(&st->demod.ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops)); st 925 drivers/media/dvb-frontends/dib3000mc.c if (dib3000mc_identify(st) != 0) st 928 drivers/media/dvb-frontends/dib3000mc.c dibx000_init_i2c_master(&st->i2c_master, DIB3000MC, st->i2c_adap, st->i2c_addr); st 930 drivers/media/dvb-frontends/dib3000mc.c dib3000mc_write_word(st, 1037, 0x3130); st 935 drivers/media/dvb-frontends/dib3000mc.c kfree(st); st 448 drivers/media/dvb-frontends/dib7000m.c static int dib7000m_reset_gpio(struct dib7000m_state *st) st 451 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(st, 773, st->cfg.gpio_dir); st 452 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(st, 774, st->cfg.gpio_val); st 456 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(st, 775, st->cfg.gpio_pwm_pos); st 458 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(st, 780, st->cfg.pwm_freq_div); st 1116 drivers/media/dvb-frontends/dib7000m.c struct dib7000m_state *st = demod->demodulator_priv; st 1117 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_output_mode(st, OUTMODE_HIGH_Z); st 1118 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_power_mode(st, DIB7000M_POWER_INTERFACE_ONLY); st 1119 drivers/media/dvb-frontends/dib7000m.c return dib7000m_set_adc_state(st, DIBX000_SLOW_ADC_OFF) | st 1120 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_adc_state(st, DIBX000_ADC_OFF); st 1320 drivers/media/dvb-frontends/dib7000m.c struct dib7000m_state *st = demod->demodulator_priv; st 1321 drivers/media/dvb-frontends/dib7000m.c dibx000_exit_i2c_master(&st->i2c_master); st 1322 drivers/media/dvb-frontends/dib7000m.c kfree(st); st 1327 drivers/media/dvb-frontends/dib7000m.c struct dib7000m_state *st = demod->demodulator_priv; st 1328 drivers/media/dvb-frontends/dib7000m.c return dibx000_get_i2c_adapter(&st->i2c_master, intf, gating); st 1356 drivers/media/dvb-frontends/dib7000m.c struct dib7000m_state st = { .i2c_adap = i2c }; st 1361 drivers/media/dvb-frontends/dib7000m.c st.cfg = cfg[k]; st 1365 drivers/media/dvb-frontends/dib7000m.c st.i2c_addr = new_addr; st 1366 drivers/media/dvb-frontends/dib7000m.c if (dib7000m_identify(&st) != 0) { st 1367 drivers/media/dvb-frontends/dib7000m.c st.i2c_addr = default_addr; st 1368 drivers/media/dvb-frontends/dib7000m.c if (dib7000m_identify(&st) != 0) { st 1375 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_output_mode(&st, OUTMODE_DIVERSITY); st 1377 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(&st, 1796, 0x0); // select DVB-T output st 1380 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(&st, 1794, (new_addr << 2) | 0x2); st 1386 drivers/media/dvb-frontends/dib7000m.c st.cfg = cfg[k]; st 1387 drivers/media/dvb-frontends/dib7000m.c st.i2c_addr = (0x40 + k) << 1; st 1390 drivers/media/dvb-frontends/dib7000m.c dib7000m_write_word(&st,1794, st.i2c_addr << 2); st 1393 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_output_mode(&st, OUTMODE_HIGH_Z); st 1405 drivers/media/dvb-frontends/dib7000m.c struct dib7000m_state *st; st 1406 drivers/media/dvb-frontends/dib7000m.c st = kzalloc(sizeof(struct dib7000m_state), GFP_KERNEL); st 1407 drivers/media/dvb-frontends/dib7000m.c if (st == NULL) st 1410 drivers/media/dvb-frontends/dib7000m.c memcpy(&st->cfg, cfg, sizeof(struct dib7000m_config)); st 1411 drivers/media/dvb-frontends/dib7000m.c st->i2c_adap = i2c_adap; st 1412 drivers/media/dvb-frontends/dib7000m.c st->i2c_addr = i2c_addr; st 1414 drivers/media/dvb-frontends/dib7000m.c demod = &st->demod; st 1415 drivers/media/dvb-frontends/dib7000m.c demod->demodulator_priv = st; st 1416 drivers/media/dvb-frontends/dib7000m.c memcpy(&st->demod.ops, &dib7000m_ops, sizeof(struct dvb_frontend_ops)); st 1417 drivers/media/dvb-frontends/dib7000m.c mutex_init(&st->i2c_buffer_lock); st 1419 drivers/media/dvb-frontends/dib7000m.c st->timf_default = cfg->bw->timf; st 1421 drivers/media/dvb-frontends/dib7000m.c if (dib7000m_identify(st) != 0) st 1424 drivers/media/dvb-frontends/dib7000m.c if (st->revision == 0x4000) st 1425 drivers/media/dvb-frontends/dib7000m.c dibx000_init_i2c_master(&st->i2c_master, DIB7000, st->i2c_adap, st->i2c_addr); st 1427 drivers/media/dvb-frontends/dib7000m.c dibx000_init_i2c_master(&st->i2c_master, DIB7000MC, st->i2c_adap, st->i2c_addr); st 1429 drivers/media/dvb-frontends/dib7000m.c dib7000m_demod_reset(st); st 1434 drivers/media/dvb-frontends/dib7000m.c kfree(st); st 525 drivers/media/dvb-frontends/dib7000p.c static int dib7000p_reset_gpio(struct dib7000p_state *st) st 528 drivers/media/dvb-frontends/dib7000p.c dprintk("gpio dir: %x: val: %x, pwm_pos: %x\n", st->gpio_dir, st->gpio_val, st->cfg.gpio_pwm_pos); st 530 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1029, st->gpio_dir); st 531 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1030, st->gpio_val); st 535 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1032, st->cfg.gpio_pwm_pos); st 537 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1037, st->cfg.pwm_freq_div); st 541 drivers/media/dvb-frontends/dib7000p.c static int dib7000p_cfg_gpio(struct dib7000p_state *st, u8 num, u8 dir, u8 val) st 543 drivers/media/dvb-frontends/dib7000p.c st->gpio_dir = dib7000p_read_word(st, 1029); st 544 drivers/media/dvb-frontends/dib7000p.c st->gpio_dir &= ~(1 << num); /* reset the direction bit */ st 545 drivers/media/dvb-frontends/dib7000p.c st->gpio_dir |= (dir & 0x1) << num; /* set the new direction */ st 546 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1029, st->gpio_dir); st 548 drivers/media/dvb-frontends/dib7000p.c st->gpio_val = dib7000p_read_word(st, 1030); st 549 drivers/media/dvb-frontends/dib7000p.c st->gpio_val &= ~(1 << num); /* reset the direction bit */ st 550 drivers/media/dvb-frontends/dib7000p.c st->gpio_val |= (val & 0x01) << num; /* set the new value */ st 551 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1030, st->gpio_val); st 1403 drivers/media/dvb-frontends/dib7000p.c static int dib7000p_identify(struct dib7000p_state *st) st 1406 drivers/media/dvb-frontends/dib7000p.c dprintk("checking demod on I2C address: %d (%x)\n", st->i2c_addr, st->i2c_addr); st 1408 drivers/media/dvb-frontends/dib7000p.c if ((value = dib7000p_read_word(st, 768)) != 0x01b3) { st 1413 drivers/media/dvb-frontends/dib7000p.c if ((value = dib7000p_read_word(st, 769)) != 0x4000) { st 2006 drivers/media/dvb-frontends/dib7000p.c struct dib7000p_state *st = demod->demodulator_priv; st 2007 drivers/media/dvb-frontends/dib7000p.c dibx000_exit_i2c_master(&st->i2c_master); st 2008 drivers/media/dvb-frontends/dib7000p.c i2c_del_adapter(&st->dib7090_tuner_adap); st 2009 drivers/media/dvb-frontends/dib7000p.c kfree(st); st 2063 drivers/media/dvb-frontends/dib7000p.c struct dib7000p_state *st = demod->demodulator_priv; st 2064 drivers/media/dvb-frontends/dib7000p.c return dibx000_get_i2c_adapter(&st->i2c_master, intf, gating); st 2401 drivers/media/dvb-frontends/dib7000p.c struct dib7000p_state *st = fe->demodulator_priv; st 2402 drivers/media/dvb-frontends/dib7000p.c return &st->dib7090_tuner_adap; st 2740 drivers/media/dvb-frontends/dib7000p.c struct dib7000p_state *st; st 2741 drivers/media/dvb-frontends/dib7000p.c st = kzalloc(sizeof(struct dib7000p_state), GFP_KERNEL); st 2742 drivers/media/dvb-frontends/dib7000p.c if (st == NULL) st 2745 drivers/media/dvb-frontends/dib7000p.c memcpy(&st->cfg, cfg, sizeof(struct dib7000p_config)); st 2746 drivers/media/dvb-frontends/dib7000p.c st->i2c_adap = i2c_adap; st 2747 drivers/media/dvb-frontends/dib7000p.c st->i2c_addr = i2c_addr; st 2748 drivers/media/dvb-frontends/dib7000p.c st->gpio_val = cfg->gpio_val; st 2749 drivers/media/dvb-frontends/dib7000p.c st->gpio_dir = cfg->gpio_dir; st 2754 drivers/media/dvb-frontends/dib7000p.c if ((st->cfg.output_mode != OUTMODE_MPEG2_SERIAL) && (st->cfg.output_mode != OUTMODE_MPEG2_PAR_GATED_CLK)) st 2755 drivers/media/dvb-frontends/dib7000p.c st->cfg.output_mode = OUTMODE_MPEG2_FIFO; st 2757 drivers/media/dvb-frontends/dib7000p.c demod = &st->demod; st 2758 drivers/media/dvb-frontends/dib7000p.c demod->demodulator_priv = st; st 2759 drivers/media/dvb-frontends/dib7000p.c memcpy(&st->demod.ops, &dib7000p_ops, sizeof(struct dvb_frontend_ops)); st 2760 drivers/media/dvb-frontends/dib7000p.c mutex_init(&st->i2c_buffer_lock); st 2762 drivers/media/dvb-frontends/dib7000p.c dib7000p_write_word(st, 1287, 0x0003); /* sram lead in, rdy */ st 2764 drivers/media/dvb-frontends/dib7000p.c if (dib7000p_identify(st) != 0) st 2767 drivers/media/dvb-frontends/dib7000p.c st->version = dib7000p_read_word(st, 897); st 2772 drivers/media/dvb-frontends/dib7000p.c st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent; st 2774 drivers/media/dvb-frontends/dib7000p.c dibx000_init_i2c_master(&st->i2c_master, DIB7000P, st->i2c_adap, st->i2c_addr); st 2777 drivers/media/dvb-frontends/dib7000p.c strscpy(st->dib7090_tuner_adap.name, "DiB7090 tuner interface", st 2778 drivers/media/dvb-frontends/dib7000p.c sizeof(st->dib7090_tuner_adap.name)); st 2779 drivers/media/dvb-frontends/dib7000p.c st->dib7090_tuner_adap.algo = &dib7090_tuner_xfer_algo; st 2780 drivers/media/dvb-frontends/dib7000p.c st->dib7090_tuner_adap.algo_data = NULL; st 2781 drivers/media/dvb-frontends/dib7000p.c st->dib7090_tuner_adap.dev.parent = st->i2c_adap->dev.parent; st 2782 drivers/media/dvb-frontends/dib7000p.c i2c_set_adapdata(&st->dib7090_tuner_adap, st); st 2783 drivers/media/dvb-frontends/dib7000p.c i2c_add_adapter(&st->dib7090_tuner_adap); st 2785 drivers/media/dvb-frontends/dib7000p.c dib7000p_demod_reset(st); st 2789 drivers/media/dvb-frontends/dib7000p.c if (st->version == SOC7090) { st 2790 drivers/media/dvb-frontends/dib7000p.c dib7090_set_output_mode(demod, st->cfg.output_mode); st 2797 drivers/media/dvb-frontends/dib7000p.c kfree(st); st 822 drivers/media/dvb-frontends/dib8000.c static int dib8000_reset_gpio(struct dib8000_state *st) st 825 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1029, st->cfg.gpio_dir); st 826 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1030, st->cfg.gpio_val); st 830 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1032, st->cfg.gpio_pwm_pos); st 832 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1037, st->cfg.pwm_freq_div); st 836 drivers/media/dvb-frontends/dib8000.c static int dib8000_cfg_gpio(struct dib8000_state *st, u8 num, u8 dir, u8 val) st 838 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_dir = dib8000_read_word(st, 1029); st 839 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_dir &= ~(1 << num); /* reset the direction bit */ st 840 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_dir |= (dir & 0x1) << num; /* set the new direction */ st 841 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1029, st->cfg.gpio_dir); st 843 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_val = dib8000_read_word(st, 1030); st 844 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_val &= ~(1 << num); /* reset the direction bit */ st 845 drivers/media/dvb-frontends/dib8000.c st->cfg.gpio_val |= (val & 0x01) << num; /* set the new value */ st 846 drivers/media/dvb-frontends/dib8000.c dib8000_write_word(st, 1030, st->cfg.gpio_val); st 848 drivers/media/dvb-frontends/dib8000.c dprintk("gpio dir: %x: gpio val: %x\n", st->cfg.gpio_dir, st->cfg.gpio_val); st 1887 drivers/media/dvb-frontends/dib8000.c struct dib8000_state *st = fe->demodulator_priv; st 1888 drivers/media/dvb-frontends/dib8000.c return &st->dib8096p_tuner_adap; st 4351 drivers/media/dvb-frontends/dib8000.c struct dib8000_state *st = fe->demodulator_priv; st 4354 drivers/media/dvb-frontends/dib8000.c for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (st->fe[index_frontend] != NULL); index_frontend++) st 4355 drivers/media/dvb-frontends/dib8000.c dvb_frontend_detach(st->fe[index_frontend]); st 4357 drivers/media/dvb-frontends/dib8000.c dibx000_exit_i2c_master(&st->i2c_master); st 4358 drivers/media/dvb-frontends/dib8000.c i2c_del_adapter(&st->dib8096p_tuner_adap); st 4359 drivers/media/dvb-frontends/dib8000.c kfree(st->fe[0]); st 4360 drivers/media/dvb-frontends/dib8000.c kfree(st); st 4365 drivers/media/dvb-frontends/dib8000.c struct dib8000_state *st = fe->demodulator_priv; st 4366 drivers/media/dvb-frontends/dib8000.c return dibx000_get_i2c_adapter(&st->i2c_master, intf, gating); st 4371 drivers/media/dvb-frontends/dib8000.c struct dib8000_state *st = fe->demodulator_priv; st 4372 drivers/media/dvb-frontends/dib8000.c u16 val = dib8000_read_word(st, 299) & 0xffef; st 4376 drivers/media/dvb-frontends/dib8000.c return dib8000_write_word(st, 299, val); st 4381 drivers/media/dvb-frontends/dib8000.c struct dib8000_state *st = fe->demodulator_priv; st 4383 drivers/media/dvb-frontends/dib8000.c return dib8000_write_word(st, 305 + id, onoff ? (1 << 13) | pid : 0); st 1726 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st = fe->demodulator_priv; st 1727 drivers/media/dvb-frontends/dib9000.c return &st->tuner_adap; st 1733 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st = fe->demodulator_priv; st 1734 drivers/media/dvb-frontends/dib9000.c return &st->component_bus; st 1740 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st = fe->demodulator_priv; st 1741 drivers/media/dvb-frontends/dib9000.c return dibx000_get_i2c_adapter(&st->i2c_master, intf, gating); st 1747 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st = fe->demodulator_priv; st 1749 drivers/media/dvb-frontends/dib9000.c st->i2c.i2c_adap = i2c; st 1754 drivers/media/dvb-frontends/dib9000.c static int dib9000_cfg_gpio(struct dib9000_state *st, u8 num, u8 dir, u8 val) st 1756 drivers/media/dvb-frontends/dib9000.c st->gpio_dir = dib9000_read_word(st, 773); st 1757 drivers/media/dvb-frontends/dib9000.c st->gpio_dir &= ~(1 << num); /* reset the direction bit */ st 1758 drivers/media/dvb-frontends/dib9000.c st->gpio_dir |= (dir & 0x1) << num; /* set the new direction */ st 1759 drivers/media/dvb-frontends/dib9000.c dib9000_write_word(st, 773, st->gpio_dir); st 1761 drivers/media/dvb-frontends/dib9000.c st->gpio_val = dib9000_read_word(st, 774); st 1762 drivers/media/dvb-frontends/dib9000.c st->gpio_val &= ~(1 << num); /* reset the direction bit */ st 1763 drivers/media/dvb-frontends/dib9000.c st->gpio_val |= (val & 0x01) << num; /* set the new value */ st 1764 drivers/media/dvb-frontends/dib9000.c dib9000_write_word(st, 774, st->gpio_val); st 1766 drivers/media/dvb-frontends/dib9000.c dprintk("gpio dir: %04x: gpio val: %04x\n", st->gpio_dir, st->gpio_val); st 1849 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st = demod->demodulator_priv; st 1852 drivers/media/dvb-frontends/dib9000.c for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (st->fe[index_frontend] != NULL); index_frontend++) st 1853 drivers/media/dvb-frontends/dib9000.c dvb_frontend_detach(st->fe[index_frontend]); st 1855 drivers/media/dvb-frontends/dib9000.c dibx000_exit_i2c_master(&st->i2c_master); st 1857 drivers/media/dvb-frontends/dib9000.c i2c_del_adapter(&st->tuner_adap); st 1858 drivers/media/dvb-frontends/dib9000.c i2c_del_adapter(&st->component_bus); st 1859 drivers/media/dvb-frontends/dib9000.c kfree(st->fe[0]); st 1860 drivers/media/dvb-frontends/dib9000.c kfree(st); st 2476 drivers/media/dvb-frontends/dib9000.c struct dib9000_state *st; st 2477 drivers/media/dvb-frontends/dib9000.c st = kzalloc(sizeof(struct dib9000_state), GFP_KERNEL); st 2478 drivers/media/dvb-frontends/dib9000.c if (st == NULL) st 2482 drivers/media/dvb-frontends/dib9000.c kfree(st); st 2486 drivers/media/dvb-frontends/dib9000.c memcpy(&st->chip.d9.cfg, cfg, sizeof(struct dib9000_config)); st 2487 drivers/media/dvb-frontends/dib9000.c st->i2c.i2c_adap = i2c_adap; st 2488 drivers/media/dvb-frontends/dib9000.c st->i2c.i2c_addr = i2c_addr; st 2489 drivers/media/dvb-frontends/dib9000.c st->i2c.i2c_write_buffer = st->i2c_write_buffer; st 2490 drivers/media/dvb-frontends/dib9000.c st->i2c.i2c_read_buffer = st->i2c_read_buffer; st 2492 drivers/media/dvb-frontends/dib9000.c st->gpio_dir = DIB9000_GPIO_DEFAULT_DIRECTIONS; st 2493 drivers/media/dvb-frontends/dib9000.c st->gpio_val = DIB9000_GPIO_DEFAULT_VALUES; st 2494 drivers/media/dvb-frontends/dib9000.c st->gpio_pwm_pos = DIB9000_GPIO_DEFAULT_PWM_POS; st 2496 drivers/media/dvb-frontends/dib9000.c mutex_init(&st->platform.risc.mbx_if_lock); st 2497 drivers/media/dvb-frontends/dib9000.c mutex_init(&st->platform.risc.mbx_lock); st 2498 drivers/media/dvb-frontends/dib9000.c mutex_init(&st->platform.risc.mem_lock); st 2499 drivers/media/dvb-frontends/dib9000.c mutex_init(&st->platform.risc.mem_mbx_lock); st 2500 drivers/media/dvb-frontends/dib9000.c mutex_init(&st->demod_lock); st 2501 drivers/media/dvb-frontends/dib9000.c st->get_frontend_internal = 0; st 2503 drivers/media/dvb-frontends/dib9000.c st->pid_ctrl_index = -2; st 2505 drivers/media/dvb-frontends/dib9000.c st->fe[0] = fe; st 2506 drivers/media/dvb-frontends/dib9000.c fe->demodulator_priv = st; st 2507 drivers/media/dvb-frontends/dib9000.c memcpy(&st->fe[0]->ops, &dib9000_ops, sizeof(struct dvb_frontend_ops)); st 2512 drivers/media/dvb-frontends/dib9000.c if ((st->chip.d9.cfg.output_mode != OUTMODE_MPEG2_SERIAL) && (st->chip.d9.cfg.output_mode != OUTMODE_MPEG2_PAR_GATED_CLK)) st 2513 drivers/media/dvb-frontends/dib9000.c st->chip.d9.cfg.output_mode = OUTMODE_MPEG2_FIFO; st 2515 drivers/media/dvb-frontends/dib9000.c if (dib9000_identify(&st->i2c) == 0) st 2518 drivers/media/dvb-frontends/dib9000.c dibx000_init_i2c_master(&st->i2c_master, DIB7000MC, st->i2c.i2c_adap, st->i2c.i2c_addr); st 2520 drivers/media/dvb-frontends/dib9000.c st->tuner_adap.dev.parent = i2c_adap->dev.parent; st 2521 drivers/media/dvb-frontends/dib9000.c strscpy(st->tuner_adap.name, "DIB9000_FW TUNER ACCESS", st 2522 drivers/media/dvb-frontends/dib9000.c sizeof(st->tuner_adap.name)); st 2523 drivers/media/dvb-frontends/dib9000.c st->tuner_adap.algo = &dib9000_tuner_algo; st 2524 drivers/media/dvb-frontends/dib9000.c st->tuner_adap.algo_data = NULL; st 2525 drivers/media/dvb-frontends/dib9000.c i2c_set_adapdata(&st->tuner_adap, st); st 2526 drivers/media/dvb-frontends/dib9000.c if (i2c_add_adapter(&st->tuner_adap) < 0) st 2529 drivers/media/dvb-frontends/dib9000.c st->component_bus.dev.parent = i2c_adap->dev.parent; st 2530 drivers/media/dvb-frontends/dib9000.c strscpy(st->component_bus.name, "DIB9000_FW COMPONENT BUS ACCESS", st 2531 drivers/media/dvb-frontends/dib9000.c sizeof(st->component_bus.name)); st 2532 drivers/media/dvb-frontends/dib9000.c st->component_bus.algo = &dib9000_component_bus_algo; st 2533 drivers/media/dvb-frontends/dib9000.c st->component_bus.algo_data = NULL; st 2534 drivers/media/dvb-frontends/dib9000.c st->component_bus_speed = 340; st 2535 drivers/media/dvb-frontends/dib9000.c i2c_set_adapdata(&st->component_bus, st); st 2536 drivers/media/dvb-frontends/dib9000.c if (i2c_add_adapter(&st->component_bus) < 0) st 2544 drivers/media/dvb-frontends/dib9000.c i2c_del_adapter(&st->tuner_adap); st 2546 drivers/media/dvb-frontends/dib9000.c kfree(st); st 1597 drivers/media/dvb-frontends/drx39xyj/drxj.c int st = -EIO; st 1673 drivers/media/dvb-frontends/drx39xyj/drxj.c st = drxbsp_i2c_write_read(dev_addr, st 1679 drivers/media/dvb-frontends/drx39xyj/drxj.c if ((st != 0) && (first_err == 0)) { st 1681 drivers/media/dvb-frontends/drx39xyj/drxj.c first_err = st; st 1690 drivers/media/dvb-frontends/drx39xyj/drxj.c st = drxbsp_i2c_write_read(dev_addr, st 1696 drivers/media/dvb-frontends/drx39xyj/drxj.c if ((st != 0) && (first_err == 0)) { st 1698 drivers/media/dvb-frontends/drx39xyj/drxj.c first_err = st; st 41 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 44 drivers/media/dvb-frontends/gp8psk-fe.c st->ops->in(st->priv, GET_8PSK_CONFIG, 0, 0, &status, 1); st 50 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 52 drivers/media/dvb-frontends/gp8psk-fe.c return st->ops->out(st->priv, SET_8PSK_CONFIG, mode, 0, NULL, 0); st 55 drivers/media/dvb-frontends/gp8psk-fe.c static int gp8psk_fe_update_status(struct gp8psk_fe_state *st) st 58 drivers/media/dvb-frontends/gp8psk-fe.c if (time_after(jiffies,st->next_status_check)) { st 59 drivers/media/dvb-frontends/gp8psk-fe.c st->ops->in(st->priv, GET_SIGNAL_LOCK, 0, 0, &st->lock, 1); st 60 drivers/media/dvb-frontends/gp8psk-fe.c st->ops->in(st->priv, GET_SIGNAL_STRENGTH, 0, 0, buf, 6); st 61 drivers/media/dvb-frontends/gp8psk-fe.c st->snr = (buf[1]) << 8 | buf[0]; st 62 drivers/media/dvb-frontends/gp8psk-fe.c st->next_status_check = jiffies + (st->status_check_interval*HZ)/1000; st 70 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 71 drivers/media/dvb-frontends/gp8psk-fe.c gp8psk_fe_update_status(st); st 73 drivers/media/dvb-frontends/gp8psk-fe.c if (st->lock) st 79 drivers/media/dvb-frontends/gp8psk-fe.c st->status_check_interval = 1000; st 81 drivers/media/dvb-frontends/gp8psk-fe.c st->status_check_interval = 100; st 103 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 104 drivers/media/dvb-frontends/gp8psk-fe.c gp8psk_fe_update_status(st); st 106 drivers/media/dvb-frontends/gp8psk-fe.c *snr = st->snr; st 112 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 113 drivers/media/dvb-frontends/gp8psk-fe.c gp8psk_fe_update_status(st); st 117 drivers/media/dvb-frontends/gp8psk-fe.c if (st->snr > 0xf00) st 120 drivers/media/dvb-frontends/gp8psk-fe.c *strength = (st->snr << 4) + st->snr; /* snr*17 */ st 132 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 176 drivers/media/dvb-frontends/gp8psk-fe.c if (st->is_rev1) st 178 drivers/media/dvb-frontends/gp8psk-fe.c st->ops->reload(st->priv); st 227 drivers/media/dvb-frontends/gp8psk-fe.c if (st->is_rev1) st 229 drivers/media/dvb-frontends/gp8psk-fe.c st->ops->out(st->priv, TUNE_8PSK, 0, 0, cmd, 10); st 231 drivers/media/dvb-frontends/gp8psk-fe.c st->lock = 0; st 232 drivers/media/dvb-frontends/gp8psk-fe.c st->next_status_check = jiffies; st 233 drivers/media/dvb-frontends/gp8psk-fe.c st->status_check_interval = 200; st 241 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 245 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SEND_DISEQC_COMMAND, m->msg[0], 0, st 255 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 263 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SEND_DISEQC_COMMAND, cmd, 0, st 273 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 275 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SET_22KHZ_TONE, st 285 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 287 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SET_LNB_VOLTAGE, st 296 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 298 drivers/media/dvb-frontends/gp8psk-fe.c return st->ops->out(st->priv, USE_EXTRA_VOLT, onoff, 0, NULL, 0); st 303 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 306 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SET_DN_SWITCH, cmd, 0, NULL, 0)) st 309 drivers/media/dvb-frontends/gp8psk-fe.c if (st->ops->out(st->priv, SET_LNB_VOLTAGE, !!(sw_cmd & 0x80), st 318 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st = fe->demodulator_priv; st 320 drivers/media/dvb-frontends/gp8psk-fe.c kfree(st); st 328 drivers/media/dvb-frontends/gp8psk-fe.c struct gp8psk_fe_state *st; st 335 drivers/media/dvb-frontends/gp8psk-fe.c st = kzalloc(sizeof(struct gp8psk_fe_state), GFP_KERNEL); st 336 drivers/media/dvb-frontends/gp8psk-fe.c if (!st) st 339 drivers/media/dvb-frontends/gp8psk-fe.c memcpy(&st->fe.ops, &gp8psk_fe_ops, sizeof(struct dvb_frontend_ops)); st 340 drivers/media/dvb-frontends/gp8psk-fe.c st->fe.demodulator_priv = st; st 341 drivers/media/dvb-frontends/gp8psk-fe.c st->ops = ops; st 342 drivers/media/dvb-frontends/gp8psk-fe.c st->priv = priv; st 343 drivers/media/dvb-frontends/gp8psk-fe.c st->is_rev1 = is_rev1; st 347 drivers/media/dvb-frontends/gp8psk-fe.c return &st->fe; st 466 drivers/media/dvb-frontends/mn88443x.c u32 seqrd, st, flg, tmpu, tmpm, tmpl; st 471 drivers/media/dvb-frontends/mn88443x.c st = seqrd & SSEQRD_T_SSEQSTRD_MASK; st 474 drivers/media/dvb-frontends/mn88443x.c if (st >= SSEQRD_T_SSEQSTRD_SYNC) st 476 drivers/media/dvb-frontends/mn88443x.c if (st >= SSEQRD_T_SSEQSTRD_FRAME_SYNC) st 574 drivers/media/dvb-frontends/stv6111.c static int get_rf_strength(struct dvb_frontend *fe, u16 *st) st 577 drivers/media/dvb-frontends/stv6111.c u16 rfagc = *st; st 641 drivers/media/dvb-frontends/stv6111.c *st = 10000 - gain; st 196 drivers/media/i2c/adv7180.c int (*set_std)(struct adv7180_state *st, unsigned int std); st 197 drivers/media/i2c/adv7180.c int (*select_input)(struct adv7180_state *st, unsigned int input); st 2216 drivers/media/pci/saa7134/saa7134-video.c static const char *st[] = { st 2225 drivers/media/pci/saa7134/saa7134-video.c st[st1 & 0x03]); st 135 drivers/media/tuners/tda18271-priv.h #define tda_printk(st, lvl, fmt, arg...) \ st 136 drivers/media/tuners/tda18271-priv.h _tda_printk(st, lvl, __func__, fmt, ##arg) st 138 drivers/media/tuners/tda18271-priv.h #define tda_dprintk(st, lvl, fmt, arg...) \ st 141 drivers/media/tuners/tda18271-priv.h tda_printk(st, KERN_DEBUG, fmt, ##arg); \ st 227 drivers/media/usb/cpia2/cpia2_usb.c int st = urb->iso_frame_desc[i].status; st 258 drivers/media/usb/cpia2/cpia2_usb.c if (st) { st 260 drivers/media/usb/cpia2/cpia2_usb.c i, n, st); st 78 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = fe_to_priv(fe); st 84 drivers/media/usb/dvb-usb-v2/az6007.c if (!adap || !st) st 88 drivers/media/usb/dvb-usb-v2/az6007.c status = st->gate_ctrl(fe, 1); st 90 drivers/media/usb/dvb-usb-v2/az6007.c status = st->gate_ctrl(fe, 0); st 128 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = d->priv; st 131 drivers/media/usb/dvb-usb-v2/az6007.c if (mutex_lock_interruptible(&st->mutex) < 0) st 136 drivers/media/usb/dvb-usb-v2/az6007.c mutex_unlock(&st->mutex); st 175 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = d->priv; st 178 drivers/media/usb/dvb-usb-v2/az6007.c if (mutex_lock_interruptible(&st->mutex) < 0) st 183 drivers/media/usb/dvb-usb-v2/az6007.c mutex_unlock(&st->mutex); st 201 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = d_to_priv(d); st 205 drivers/media/usb/dvb-usb-v2/az6007.c az6007_read(d, AZ6007_READ_IR, 0, 0, st->data, 10); st 207 drivers/media/usb/dvb-usb-v2/az6007.c if (st->data[1] == 0x44) st 210 drivers/media/usb/dvb-usb-v2/az6007.c if ((st->data[3] ^ st->data[4]) == 0xff) { st 211 drivers/media/usb/dvb-usb-v2/az6007.c if ((st->data[1] ^ st->data[2]) == 0xff) { st 212 drivers/media/usb/dvb-usb-v2/az6007.c code = RC_SCANCODE_NEC(st->data[1], st->data[3]); st 215 drivers/media/usb/dvb-usb-v2/az6007.c code = RC_SCANCODE_NECX(st->data[1] << 8 | st->data[2], st 216 drivers/media/usb/dvb-usb-v2/az6007.c st->data[3]); st 220 drivers/media/usb/dvb-usb-v2/az6007.c code = RC_SCANCODE_NEC32(st->data[1] << 24 | st 221 drivers/media/usb/dvb-usb-v2/az6007.c st->data[2] << 16 | st 222 drivers/media/usb/dvb-usb-v2/az6007.c st->data[3] << 8 | st 223 drivers/media/usb/dvb-usb-v2/az6007.c st->data[4]); st 227 drivers/media/usb/dvb-usb-v2/az6007.c rc_keydown(d->rc_dev, proto, code, st->data[5]); st 614 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); st 617 drivers/media/usb/dvb-usb-v2/az6007.c ret = az6007_read(d, AZ6007_READ_DATA, 6, 0, st->data, 6); st 618 drivers/media/usb/dvb-usb-v2/az6007.c memcpy(mac, st->data, 6); st 628 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); st 639 drivers/media/usb/dvb-usb-v2/az6007.c st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl; st 649 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = adap_to_priv(adap); st 660 drivers/media/usb/dvb-usb-v2/az6007.c st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl; st 746 drivers/media/usb/dvb-usb-v2/az6007.c struct az6007_device_state *st = d_to_priv(d); st 754 drivers/media/usb/dvb-usb-v2/az6007.c if (mutex_lock_interruptible(&st->mutex) < 0) st 778 drivers/media/usb/dvb-usb-v2/az6007.c st->data, length); st 781 drivers/media/usb/dvb-usb-v2/az6007.c msgs[i + 1].buf[j] = st->data[j + 5]; st 796 drivers/media/usb/dvb-usb-v2/az6007.c st->data[j] = msgs[i].buf[j + 1]; st 798 drivers/media/usb/dvb-usb-v2/az6007.c st->data, length); st 810 drivers/media/usb/dvb-usb-v2/az6007.c st->data, length); st 812 drivers/media/usb/dvb-usb-v2/az6007.c msgs[i].buf[j] = st->data[j + 5]; st 818 drivers/media/usb/dvb-usb-v2/az6007.c mutex_unlock(&st->mutex); st 143 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 146 drivers/media/usb/dvb-usb-v2/lmedm04.c if (max(wlen, rlen) > sizeof(st->usb_buffer)) st 153 drivers/media/usb/dvb-usb-v2/lmedm04.c memcpy(st->usb_buffer, wbuf, wlen); st 155 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = dvb_usbv2_generic_rw_locked(d, st->usb_buffer, wlen, st 156 drivers/media/usb/dvb-usb-v2/lmedm04.c st->usb_buffer, rlen); st 159 drivers/media/usb/dvb-usb-v2/lmedm04.c memcpy(rbuf, st->usb_buffer, rlen); st 168 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 172 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->pid_off) st 182 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 190 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->pid_size == 0) st 198 drivers/media/usb/dvb-usb-v2/lmedm04.c if (pid_len > st->pid_size) st 199 drivers/media/usb/dvb-usb-v2/lmedm04.c st->pid_size = pid_len; st 200 drivers/media/usb/dvb-usb-v2/lmedm04.c pid_buff[7] = 0x80 + st->pid_size; st 205 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->stream_on) st 216 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 235 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->i2c_talk_onoff) { st 243 drivers/media/usb/dvb-usb-v2/lmedm04.c switch (st->tuner_config) { st 245 drivers/media/usb/dvb-usb-v2/lmedm04.c s_tmp = reg_to_16bits(0xff - st->signal_level); st 246 drivers/media/usb/dvb-usb-v2/lmedm04.c c_tmp = reg_to_16bits(0xff - st->signal_sn); st 250 drivers/media/usb/dvb-usb-v2/lmedm04.c s_tmp = 0xffff - (((st->signal_level * 2) << 8) * 5 / 4); st 251 drivers/media/usb/dvb-usb-v2/lmedm04.c c_tmp = reg_to_16bits((0xff - st->signal_sn - 0xa1) * 3); st 254 drivers/media/usb/dvb-usb-v2/lmedm04.c s_tmp = reg_to_16bits(st->signal_level); st 255 drivers/media/usb/dvb-usb-v2/lmedm04.c c_tmp = reg_to_16bits(st->signal_sn); st 270 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 315 drivers/media/usb/dvb-usb-v2/lmedm04.c switch (st->tuner_config) { st 318 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_level = ibuf[4]; st 319 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_sn = ibuf[3]; st 320 drivers/media/usb/dvb-usb-v2/lmedm04.c st->time_key = ibuf[7]; st 327 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_level = ibuf[3]; st 328 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_sn = ibuf[4]; st 330 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_level = ibuf[4]; st 331 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_sn = ibuf[5]; st 336 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_level = ibuf[5]; st 337 drivers/media/usb/dvb-usb-v2/lmedm04.c st->signal_sn = ibuf[4]; st 338 drivers/media/usb/dvb-usb-v2/lmedm04.c st->time_key = ibuf[7]; st 347 drivers/media/usb/dvb-usb-v2/lmedm04.c st->lock_status &= ~FE_HAS_LOCK; st 367 drivers/media/usb/dvb-usb-v2/lmedm04.c st->int_urb_due = jiffies + msecs_to_jiffies(200); st 405 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 417 drivers/media/usb/dvb-usb-v2/lmedm04.c st->pid_off = true; st 419 drivers/media/usb/dvb-usb-v2/lmedm04.c st->pid_off = false; st 421 drivers/media/usb/dvb-usb-v2/lmedm04.c st->pid_size = 0; st 474 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 476 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 1; st 485 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 489 drivers/media/usb/dvb-usb-v2/lmedm04.c u8 gate = st->i2c_gate; st 500 drivers/media/usb/dvb-usb-v2/lmedm04.c gate = (msg[i].addr == st->i2c_tuner_addr) st 501 drivers/media/usb/dvb-usb-v2/lmedm04.c ? (read) ? st->i2c_tuner_gate_r st 502 drivers/media/usb/dvb-usb-v2/lmedm04.c : st->i2c_tuner_gate_w st 503 drivers/media/usb/dvb-usb-v2/lmedm04.c : st->i2c_gate; st 560 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 569 drivers/media/usb/dvb-usb-v2/lmedm04.c st->stream_on = 1; st 577 drivers/media/usb/dvb-usb-v2/lmedm04.c st->stream_on = 0; st 578 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 1; st 673 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 683 drivers/media/usb/dvb-usb-v2/lmedm04.c switch (st->dvb_usb_lme2510_firmware) { st 689 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_S0194; st 698 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_LG; st 701 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_DEFAULT; st 706 drivers/media/usb/dvb-usb-v2/lmedm04.c switch (st->dvb_usb_lme2510_firmware) { st 712 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_S7395; st 721 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_LG; st 729 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_S0194; st 732 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_DEFAULT; st 739 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_RS2000; st 748 drivers/media/usb/dvb-usb-v2/lmedm04.c dvb_usb_lme2510_firmware = st->dvb_usb_lme2510_firmware; st 817 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = fe_to_priv(fe); st 841 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->tuner_config == TUNER_RS2000) st 842 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_set_voltage) st 843 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_set_voltage(fe, voltage); st 852 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 855 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->i2c_talk_onoff) { st 856 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_read_status) { st 857 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = st->fe_read_status(fe, status); st 862 drivers/media/usb/dvb-usb-v2/lmedm04.c st->lock_status = *status; st 864 drivers/media/usb/dvb-usb-v2/lmedm04.c if (*status & FE_HAS_LOCK && st->stream_on) { st 867 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 0; st 877 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->tuner_config == TUNER_RS2000 && st 878 drivers/media/usb/dvb-usb-v2/lmedm04.c time_after(jiffies, st->int_urb_due)) st 879 drivers/media/usb/dvb-usb-v2/lmedm04.c st->lock_status &= ~FE_HAS_LOCK; st 881 drivers/media/usb/dvb-usb-v2/lmedm04.c *status = st->lock_status; st 886 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 1; st 897 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = fe_to_priv(fe); st 899 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_read_signal_strength && !st->stream_on) st 900 drivers/media/usb/dvb-usb-v2/lmedm04.c return st->fe_read_signal_strength(fe, strength); st 913 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = fe_to_priv(fe); st 915 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_read_snr && !st->stream_on) st 916 drivers/media/usb/dvb-usb-v2/lmedm04.c return st->fe_read_snr(fe, snr); st 928 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = fe_to_priv(fe); st 930 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_read_ber && !st->stream_on) st 931 drivers/media/usb/dvb-usb-v2/lmedm04.c return st->fe_read_ber(fe, ber); st 940 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = fe_to_priv(fe); st 942 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->fe_read_ucblocks && !st->stream_on) st 943 drivers/media/usb/dvb-usb-v2/lmedm04.c return st->fe_read_ucblocks(fe, ucblocks); st 953 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 961 drivers/media/usb/dvb-usb-v2/lmedm04.c strlcat(name, fe_name[st->tuner_config], 128); st 969 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 972 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 1; st 976 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_gate = 4; st 981 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_w = 4; st 982 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_r = 4; st 983 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_addr = 0x60; st 984 drivers/media/usb/dvb-usb-v2/lmedm04.c st->tuner_config = TUNER_LG; st 985 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->dvb_usb_lme2510_firmware != TUNER_LG) { st 986 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_LG; st 992 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_gate = 4; st 997 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_w = 4; st 998 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_r = 5; st 999 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_addr = 0x60; st 1000 drivers/media/usb/dvb-usb-v2/lmedm04.c st->tuner_config = TUNER_S0194; st 1001 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->dvb_usb_lme2510_firmware != TUNER_S0194) { st 1002 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_S0194; st 1008 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_gate = 5; st 1014 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_w = 4; st 1015 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_r = 5; st 1016 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_addr = 0x60; st 1017 drivers/media/usb/dvb-usb-v2/lmedm04.c st->tuner_config = TUNER_S7395; st 1018 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->dvb_usb_lme2510_firmware != TUNER_S7395) { st 1019 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = TUNER_S7395; st 1026 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_gate = 5; st 1032 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_w = 5; st 1033 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_gate_r = 5; st 1034 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_tuner_addr = 0x60; st 1035 drivers/media/usb/dvb-usb-v2/lmedm04.c st->tuner_config = TUNER_RS2000; st 1036 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_set_voltage = st 1056 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_status = adap->fe[0]->ops.read_status; st 1057 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_signal_strength = adap->fe[0]->ops.read_signal_strength; st 1058 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_snr = adap->fe[0]->ops.read_snr; st 1059 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_ber = adap->fe[0]->ops.read_ber; st 1060 drivers/media/usb/dvb-usb-v2/lmedm04.c st->fe_read_ucblocks = adap->fe[0]->ops.read_ucblocks; st 1076 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = adap_to_priv(adap); st 1080 drivers/media/usb/dvb-usb-v2/lmedm04.c switch (st->tuner_config) { st 1084 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = st->tuner_config; st 1089 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = st->tuner_config; st 1094 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = st->tuner_config; st 1099 drivers/media/usb/dvb-usb-v2/lmedm04.c ret = st->tuner_config; st 1124 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 1134 drivers/media/usb/dvb-usb-v2/lmedm04.c st->i2c_talk_onoff = 1; st 1148 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 1156 drivers/media/usb/dvb-usb-v2/lmedm04.c st->dvb_usb_lme2510_firmware = dvb_usb_lme2510_firmware; st 1203 drivers/media/usb/dvb-usb-v2/lmedm04.c struct lme2510_state *st = d->priv; st 1210 drivers/media/usb/dvb-usb-v2/lmedm04.c if (st->lme_urb) { st 1211 drivers/media/usb/dvb-usb-v2/lmedm04.c usb_kill_urb(st->lme_urb); st 1212 drivers/media/usb/dvb-usb-v2/lmedm04.c usb_free_urb(st->lme_urb); st 48 drivers/media/usb/dvb-usb/af9005.c struct af9005_device_state *st = d->priv; st 62 drivers/media/usb/dvb-usb/af9005.c st->data[0] = 14; /* rest of buffer length low */ st 63 drivers/media/usb/dvb-usb/af9005.c st->data[1] = 0; /* rest of buffer length high */ st 65 drivers/media/usb/dvb-usb/af9005.c st->data[2] = AF9005_REGISTER_RW; /* register operation */ st 66 drivers/media/usb/dvb-usb/af9005.c st->data[3] = 12; /* rest of buffer length */ st 68 drivers/media/usb/dvb-usb/af9005.c st->data[4] = seq = st->sequence++; /* sequence number */ st 70 drivers/media/usb/dvb-usb/af9005.c st->data[5] = (u8) (reg >> 8); /* register address */ st 71 drivers/media/usb/dvb-usb/af9005.c st->data[6] = (u8) (reg & 0xff); st 85 drivers/media/usb/dvb-usb/af9005.c st->data[8 + i] = values[i]; st 88 drivers/media/usb/dvb-usb/af9005.c st->data[8] = values[0]; st 89 drivers/media/usb/dvb-usb/af9005.c st->data[7] = command; st 91 drivers/media/usb/dvb-usb/af9005.c ret = dvb_usb_generic_rw(d, st->data, 16, st->data, 17, 0); st 96 drivers/media/usb/dvb-usb/af9005.c if (st->data[2] != AF9005_REGISTER_RW_ACK) { st 101 drivers/media/usb/dvb-usb/af9005.c if (st->data[3] != 0x0d) { st 106 drivers/media/usb/dvb-usb/af9005.c if (st->data[4] != seq) { st 118 drivers/media/usb/dvb-usb/af9005.c if (st->data[16] != 0x01) { st 126 drivers/media/usb/dvb-usb/af9005.c values[i] = st->data[8 + i]; st 451 drivers/media/usb/dvb-usb/af9005.c struct af9005_device_state *st = d->priv; st 472 drivers/media/usb/dvb-usb/af9005.c st->data[0] = (u8) (packet_len & 0xff); st 473 drivers/media/usb/dvb-usb/af9005.c st->data[1] = (u8) ((packet_len & 0xff00) >> 8); st 475 drivers/media/usb/dvb-usb/af9005.c st->data[2] = 0x26; /* packet type */ st 476 drivers/media/usb/dvb-usb/af9005.c st->data[3] = wlen + 3; st 477 drivers/media/usb/dvb-usb/af9005.c st->data[4] = seq = st->sequence++; st 478 drivers/media/usb/dvb-usb/af9005.c st->data[5] = command; st 479 drivers/media/usb/dvb-usb/af9005.c st->data[6] = wlen; st 481 drivers/media/usb/dvb-usb/af9005.c st->data[7 + i] = wbuf[i]; st 482 drivers/media/usb/dvb-usb/af9005.c ret = dvb_usb_generic_rw(d, st->data, wlen + 7, st->data, rlen + 7, 0); st 483 drivers/media/usb/dvb-usb/af9005.c if (st->data[2] != 0x27) { st 486 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[4] != seq) { st 489 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[5] != 0x01) { st 492 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[6] != rlen) { st 498 drivers/media/usb/dvb-usb/af9005.c rbuf[i] = st->data[i + 7]; st 508 drivers/media/usb/dvb-usb/af9005.c struct af9005_device_state *st = d->priv; st 514 drivers/media/usb/dvb-usb/af9005.c memset(st->data, 0, sizeof(st->data)); st 516 drivers/media/usb/dvb-usb/af9005.c st->data[0] = 14; /* length of rest of packet low */ st 517 drivers/media/usb/dvb-usb/af9005.c st->data[1] = 0; /* length of rest of packer high */ st 519 drivers/media/usb/dvb-usb/af9005.c st->data[2] = 0x2a; /* read/write eeprom */ st 521 drivers/media/usb/dvb-usb/af9005.c st->data[3] = 12; /* size */ st 523 drivers/media/usb/dvb-usb/af9005.c st->data[4] = seq = st->sequence++; st 525 drivers/media/usb/dvb-usb/af9005.c st->data[5] = 0; /* read */ st 527 drivers/media/usb/dvb-usb/af9005.c st->data[6] = len; st 528 drivers/media/usb/dvb-usb/af9005.c st->data[7] = address; st 529 drivers/media/usb/dvb-usb/af9005.c ret = dvb_usb_generic_rw(d, st->data, 16, st->data, 14, 0); st 530 drivers/media/usb/dvb-usb/af9005.c if (st->data[2] != 0x2b) { st 533 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[3] != 10) { st 536 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[4] != seq) { st 539 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[5] != 1) { st 546 drivers/media/usb/dvb-usb/af9005.c values[i] = st->data[6 + i]; st 775 drivers/media/usb/dvb-usb/af9005.c struct af9005_device_state *st = d->priv; st 782 drivers/media/usb/dvb-usb/af9005.c if (st->led_state != temp) { st 795 drivers/media/usb/dvb-usb/af9005.c st->led_state = temp; st 825 drivers/media/usb/dvb-usb/af9005.c struct af9005_device_state *st = d->priv; st 838 drivers/media/usb/dvb-usb/af9005.c st->data[0] = 3; /* rest of packet length low */ st 839 drivers/media/usb/dvb-usb/af9005.c st->data[1] = 0; /* rest of packet length high */ st 840 drivers/media/usb/dvb-usb/af9005.c st->data[2] = 0x40; /* read remote */ st 841 drivers/media/usb/dvb-usb/af9005.c st->data[3] = 1; /* rest of packet length */ st 842 drivers/media/usb/dvb-usb/af9005.c st->data[4] = seq = st->sequence++; /* sequence number */ st 843 drivers/media/usb/dvb-usb/af9005.c ret = dvb_usb_generic_rw(d, st->data, 5, st->data, 256, 0); st 848 drivers/media/usb/dvb-usb/af9005.c if (st->data[2] != 0x41) { st 852 drivers/media/usb/dvb-usb/af9005.c } else if (st->data[4] != seq) { st 857 drivers/media/usb/dvb-usb/af9005.c len = st->data[5]; st 865 drivers/media/usb/dvb-usb/af9005.c debug_dump((st->data + 6), len, deb_rc); st 866 drivers/media/usb/dvb-usb/af9005.c ret = rc_decode(d, &st->data[6], len, event, state); st 40 drivers/media/usb/dvb-usb/cinergyT2-core.c struct cinergyt2_state *st = d->priv; st 44 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[0] = CINERGYT2_EP1_CONTROL_STREAM_TRANSFER; st 45 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[1] = enable ? 1 : 0; st 47 drivers/media/usb/dvb-usb/cinergyT2-core.c ret = dvb_usb_generic_rw(d, st->data, 2, st->data, 64, 0); st 55 drivers/media/usb/dvb-usb/cinergyT2-core.c struct cinergyt2_state *st = d->priv; st 59 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[0] = CINERGYT2_EP1_SLEEP_MODE; st 60 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[1] = enable ? 0 : 1; st 62 drivers/media/usb/dvb-usb/cinergyT2-core.c ret = dvb_usb_generic_rw(d, st->data, 2, st->data, 3, 0); st 71 drivers/media/usb/dvb-usb/cinergyT2-core.c struct cinergyt2_state *st = d->priv; st 77 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[0] = CINERGYT2_EP1_GET_FIRMWARE_VERSION; st 79 drivers/media/usb/dvb-usb/cinergyT2-core.c ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 3, 0); st 147 drivers/media/usb/dvb-usb/cinergyT2-core.c struct cinergyt2_state *st = d->priv; st 153 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[0] = CINERGYT2_EP1_GET_RC_EVENTS; st 155 drivers/media/usb/dvb-usb/cinergyT2-core.c ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0); st 159 drivers/media/usb/dvb-usb/cinergyT2-core.c if (st->data[4] == 0xff) { st 161 drivers/media/usb/dvb-usb/cinergyT2-core.c st->rc_counter++; st 162 drivers/media/usb/dvb-usb/cinergyT2-core.c if (st->rc_counter > RC_REPEAT_DELAY) { st 178 drivers/media/usb/dvb-usb/cinergyT2-core.c st->data[2] = ~st->data[1]; st 179 drivers/media/usb/dvb-usb/cinergyT2-core.c dvb_usb_nec_rc_key_to_event(d, st->data, event, state); st 180 drivers/media/usb/dvb-usb/cinergyT2-core.c if (st->data[0] != 0) { st 182 drivers/media/usb/dvb-usb/cinergyT2-core.c st->rc_counter = 0; st 184 drivers/media/usb/dvb-usb/cinergyT2-core.c deb_rc("key: %*ph\n", 5, st->data); st 89 drivers/media/usb/dvb-usb/cxusb.c struct cxusb_state *st = d->priv; st 103 drivers/media/usb/dvb-usb/cxusb.c st->data[0] = cmd; st 104 drivers/media/usb/dvb-usb/cxusb.c memcpy(&st->data[1], wbuf, wlen); st 105 drivers/media/usb/dvb-usb/cxusb.c ret = dvb_usb_generic_rw(d, st->data, 1 + wlen, st->data, rlen, 0); st 107 drivers/media/usb/dvb-usb/cxusb.c memcpy(rbuf, st->data, rlen); st 116 drivers/media/usb/dvb-usb/cxusb.c struct cxusb_state *st = d->priv; st 119 drivers/media/usb/dvb-usb/cxusb.c if (st->gpio_write_state[GPIO_TUNER] == onoff && st 120 drivers/media/usb/dvb-usb/cxusb.c !st->gpio_write_refresh[GPIO_TUNER]) st 130 drivers/media/usb/dvb-usb/cxusb.c st->gpio_write_state[GPIO_TUNER] = onoff; st 131 drivers/media/usb/dvb-usb/cxusb.c st->gpio_write_refresh[GPIO_TUNER] = false; st 839 drivers/media/usb/dvb-usb/cxusb.c struct cxusb_state *st = dvbdev->priv; st 890 drivers/media/usb/dvb-usb/cxusb.c for (i = 0; i < ARRAY_SIZE(st->gpio_write_refresh); i++) st 891 drivers/media/usb/dvb-usb/cxusb.c st->gpio_write_refresh[i] = true; st 1193 drivers/media/usb/dvb-usb/cxusb.c struct dib0700_adapter_state *st = adap->priv; st 1201 drivers/media/usb/dvb-usb/cxusb.c tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, st 1208 drivers/media/usb/dvb-usb/cxusb.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 1675 drivers/media/usb/dvb-usb/cxusb.c struct cxusb_state *st = d->priv; st 1682 drivers/media/usb/dvb-usb/cxusb.c client = st->i2c_client_tuner; st 1689 drivers/media/usb/dvb-usb/cxusb.c client = st->i2c_client_demod; st 24 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 35 drivers/media/usb/dvb-usb/dib0700_core.c st->buf, 16, USB_CTRL_GET_TIMEOUT); st 37 drivers/media/usb/dvb-usb/dib0700_core.c *hwversion = (st->buf[0] << 24) | (st->buf[1] << 16) | st 38 drivers/media/usb/dvb-usb/dib0700_core.c (st->buf[2] << 8) | st->buf[3]; st 40 drivers/media/usb/dvb-usb/dib0700_core.c *romversion = (st->buf[4] << 24) | (st->buf[5] << 16) | st 41 drivers/media/usb/dvb-usb/dib0700_core.c (st->buf[6] << 8) | st->buf[7]; st 43 drivers/media/usb/dvb-usb/dib0700_core.c *ramversion = (st->buf[8] << 24) | (st->buf[9] << 16) | st 44 drivers/media/usb/dvb-usb/dib0700_core.c (st->buf[10] << 8) | st->buf[11]; st 46 drivers/media/usb/dvb-usb/dib0700_core.c *fwtype = (st->buf[12] << 24) | (st->buf[13] << 16) | st 47 drivers/media/usb/dvb-usb/dib0700_core.c (st->buf[14] << 8) | st->buf[15]; st 110 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 118 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_SET_GPIO; st 119 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = gpio; st 120 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = ((gpio_dir & 0x01) << 7) | ((gpio_val & 0x01) << 6); st 122 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(d, st->buf, 3); st 130 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 133 drivers/media/usb/dvb-usb/dib0700_core.c if (st->fw_version >= 0x10201) { st 139 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_SET_USB_XFER_LEN; st 140 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = (nb_ts_packets >> 8) & 0xff; st 141 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = nb_ts_packets & 0xff; st 145 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(d, st->buf, 3); st 165 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 210 drivers/media/usb/dvb-usb/dib0700_core.c value, index, st->buf, st 218 drivers/media/usb/dvb-usb/dib0700_core.c if (msg[i].len > sizeof(st->buf)) { st 225 drivers/media/usb/dvb-usb/dib0700_core.c memcpy(msg[i].buf, st->buf, msg[i].len); st 237 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_NEW_I2C_WRITE; st 238 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = msg[i].addr << 1; st 239 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = (en_start << 7) | (en_stop << 6) | st 242 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[3] = ((gen_mode << 6) & 0xC0) | st 245 drivers/media/usb/dvb-usb/dib0700_core.c if (msg[i].len > sizeof(st->buf) - 4) { st 254 drivers/media/usb/dvb-usb/dib0700_core.c memcpy(&st->buf[4], msg[i].buf, msg[i].len); st 257 drivers/media/usb/dvb-usb/dib0700_core.c debug_dump(st->buf, msg[i].len + 4, deb_data); st 263 drivers/media/usb/dvb-usb/dib0700_core.c 0, 0, st->buf, msg[i].len + 4, st 286 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 299 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = msg[i].addr << 1; st 301 drivers/media/usb/dvb-usb/dib0700_core.c if (msg[i].len > sizeof(st->buf) - 2) { st 307 drivers/media/usb/dvb-usb/dib0700_core.c memcpy(&st->buf[2], msg[i].buf, msg[i].len); st 311 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_I2C_READ; st 312 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] |= 1; st 315 drivers/media/usb/dvb-usb/dib0700_core.c len = dib0700_ctrl_rd(d, st->buf, msg[i].len + 2, st 316 drivers/media/usb/dvb-usb/dib0700_core.c st->buf, msg[i + 1].len); st 324 drivers/media/usb/dvb-usb/dib0700_core.c if (msg[i + 1].len > sizeof(st->buf)) { st 330 drivers/media/usb/dvb-usb/dib0700_core.c memcpy(msg[i + 1].buf, st->buf, msg[i + 1].len); st 336 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_I2C_WRITE; st 337 drivers/media/usb/dvb-usb/dib0700_core.c result = dib0700_ctrl_wr(d, st->buf, msg[i].len + 2); st 354 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 356 drivers/media/usb/dvb-usb/dib0700_core.c if (st->fw_use_new_i2c_api == 1) { st 402 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 410 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_SET_CLOCK; st 411 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = (en_pll << 7) | (pll_src << 6) | st 413 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = (pll_prediv >> 8) & 0xff; /* MSB */ st 414 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[3] = pll_prediv & 0xff; /* LSB */ st 415 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[4] = (pll_loopdiv >> 8) & 0xff; /* MSB */ st 416 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[5] = pll_loopdiv & 0xff; /* LSB */ st 417 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[6] = (free_div >> 8) & 0xff; /* MSB */ st 418 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[7] = free_div & 0xff; /* LSB */ st 419 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[8] = (dsuScaler >> 8) & 0xff; /* MSB */ st 420 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[9] = dsuScaler & 0xff; /* LSB */ st 422 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(d, st->buf, 10); st 430 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 442 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_SET_I2C_PARAM; st 444 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = 0; st 445 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = (u8) (divider >> 8); st 446 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[3] = (u8) (divider & 0xff); st 448 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[4] = (u8) (divider >> 8); st 449 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[5] = (u8) (divider & 0xff); st 451 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[6] = (u8) (divider >> 8); st 452 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[7] = (u8) (divider & 0xff); st 455 drivers/media/usb/dvb-usb/dib0700_core.c (st->buf[2] << 8) | (st->buf[3]), (st->buf[4] << 8) | st 456 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[5], (st->buf[6] << 8) | st->buf[7], scl_kHz); st 458 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(d, st->buf, 8); st 583 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = adap->dev->priv; st 586 drivers/media/usb/dvb-usb/dib0700_core.c if ((onoff != 0) && (st->fw_version >= 0x10201)) { st 590 drivers/media/usb/dvb-usb/dib0700_core.c st->nb_packet_buffer_size); st 599 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_ENABLE_VIDEO; st 602 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = (onoff << 4) | 0x00; st 604 drivers/media/usb/dvb-usb/dib0700_core.c if (st->disable_streaming_master_mode == 1) st 605 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = 0x00; st 607 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = 0x01 << 4; /* Master mode */ st 609 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[3] = 0x00; st 613 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state &= ~0x3; st 618 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (adap->id); st 620 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << ~(adap->id); st 623 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (adap->fe_adap[0].stream.props.endpoint-2); st 625 drivers/media/usb/dvb-usb/dib0700_core.c st->channel_state |= 1 << (3-adap->fe_adap[0].stream.props.endpoint); st 628 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] |= st->channel_state; st 630 drivers/media/usb/dvb-usb/dib0700_core.c deb_info("data for streaming: %x %x\n", st->buf[1], st->buf[2]); st 632 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(adap->dev, st->buf, 4); st 641 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 649 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[0] = REQUEST_SET_RC; st 650 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = 0; st 651 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[2] = 0; st 661 drivers/media/usb/dvb-usb/dib0700_core.c if (st->fw_version < 0x10200) { st 672 drivers/media/usb/dvb-usb/dib0700_core.c st->buf[1] = new_proto; st 674 drivers/media/usb/dvb-usb/dib0700_core.c ret = dib0700_ctrl_wr(d, st->buf, 3); st 809 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 816 drivers/media/usb/dvb-usb/dib0700_core.c if (st->fw_version < 0x10200 || !intf) st 885 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = dev->priv; st 894 drivers/media/usb/dvb-usb/dib0700_core.c st->fw_version = fw_version; st 895 drivers/media/usb/dvb-usb/dib0700_core.c st->nb_packet_buffer_size = (u32)nb_packet_buffer_size; st 898 drivers/media/usb/dvb-usb/dib0700_core.c if (st->fw_version >= 0x10200) st 914 drivers/media/usb/dvb-usb/dib0700_core.c struct dib0700_state *st = d->priv; st 918 drivers/media/usb/dvb-usb/dib0700_core.c client = st->i2c_client_tuner; st 925 drivers/media/usb/dvb-usb/dib0700_core.c client = st->i2c_client_demod; st 87 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 104 drivers/media/usb/dvb-usb/dib0700_devices.c st->mt2060_if1[adap->id] = 1220; st 522 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = d->priv; st 524 drivers/media/usb/dvb-usb/dib0700_devices.c if (st->fw_version >= 0x10200) { st 532 drivers/media/usb/dvb-usb/dib0700_devices.c st->buf[0] = REQUEST_POLL_RC; st 533 drivers/media/usb/dvb-usb/dib0700_devices.c st->buf[1] = 0; st 535 drivers/media/usb/dvb-usb/dib0700_devices.c i = dib0700_ctrl_rd(d, st->buf, 2, st->buf, 4); st 542 drivers/media/usb/dvb-usb/dib0700_devices.c if (st->buf[0] == 0 && st->buf[1] == 0 st 543 drivers/media/usb/dvb-usb/dib0700_devices.c && st->buf[2] == 0 && st->buf[3] == 0) st 553 drivers/media/usb/dvb-usb/dib0700_devices.c if ((st->buf[3 - 2] == 0x00) && (st->buf[3 - 3] == 0x00) && st 554 drivers/media/usb/dvb-usb/dib0700_devices.c (st->buf[3] == 0xff)) { st 560 drivers/media/usb/dvb-usb/dib0700_devices.c scancode = RC_SCANCODE_NEC(st->buf[3 - 2], st->buf[3 - 3]); st 567 drivers/media/usb/dvb-usb/dib0700_devices.c scancode = RC_SCANCODE_RC5(st->buf[3 - 2], st->buf[3 - 3]); st 568 drivers/media/usb/dvb-usb/dib0700_devices.c toggle = st->buf[3 - 1]; st 703 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 723 drivers/media/usb/dvb-usb/dib0700_devices.c st->mt2060_if1[0] = 1220; st 727 drivers/media/usb/dvb-usb/dib0700_devices.c st->is_dib7000pc = 1; st 743 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 753 drivers/media/usb/dvb-usb/dib0700_devices.c if (st->is_dib7000pc) st 885 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 886 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, st 893 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 900 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 901 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); st 911 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 920 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adapter->dev->priv; st 922 drivers/media/usb/dvb-usb/dib0700_devices.c if (st->is_dib7000pc) st 929 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adapter->dev->priv; st 931 drivers/media/usb/dvb-usb/dib0700_devices.c if (st->is_dib7000pc) st 1307 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 1308 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, st 1321 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 1738 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 1739 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); st 1750 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 1800 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 1802 drivers/media/usb/dvb-usb/dib0700_devices.c struct dvb_frontend *fe_slave = st->dib8000_ops.get_slave_frontend(adap->fe_adap[0].fe, 1); st 1805 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = st->dib8000_ops.get_i2c_master(fe_slave, DIBX000_I2C_INTERFACE_TUNER, 1); st 1811 drivers/media/usb/dvb-usb/dib0700_devices.c tun_i2c = st->dib8000_ops.get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); st 1815 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 2151 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 2160 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 2187 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 2188 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib8000_ops.get_i2c_tuner(adap->fe_adap[0].fe); st 2190 drivers/media/usb/dvb-usb/dib0700_devices.c tfe8096p_dib0090_config.reset = st->dib8000_ops.tuner_sleep; st 2191 drivers/media/usb/dvb-usb/dib0700_devices.c tfe8096p_dib0090_config.sleep = st->dib8000_ops.tuner_sleep; st 2198 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib8000_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); st 2200 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 2391 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 2397 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 2461 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 2469 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 3079 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 3080 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); st 3082 drivers/media/usb/dvb-usb/dib0700_devices.c nim7090_dib0090_config.reset = st->dib7000p_ops.tuner_sleep, st 3083 drivers/media/usb/dvb-usb/dib0700_devices.c nim7090_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep, st 3084 drivers/media/usb/dvb-usb/dib0700_devices.c nim7090_dib0090_config.get_adc_power = st->dib7000p_ops.get_adc_power; st 3089 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); st 3091 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 3098 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3105 drivers/media/usb/dvb-usb/dib0700_devices.c st->disable_streaming_master_mode = 1; st 3164 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 3165 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); st 3167 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[0].reset = st->dib7000p_ops.tuner_sleep; st 3168 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[0].sleep = st->dib7000p_ops.tuner_sleep; st 3169 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[0].get_adc_power = st->dib7000p_ops.get_adc_power; st 3174 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); st 3176 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 3183 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 3184 drivers/media/usb/dvb-usb/dib0700_devices.c struct i2c_adapter *tun_i2c = st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); st 3186 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[1].reset = st->dib7000p_ops.tuner_sleep; st 3187 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[1].sleep = st->dib7000p_ops.tuner_sleep; st 3188 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7090pvr_dib0090_config[1].get_adc_power = st->dib7000p_ops.get_adc_power; st 3193 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); st 3195 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 3202 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3209 drivers/media/usb/dvb-usb/dib0700_devices.c st->disable_streaming_master_mode = 1; st 3238 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_adapter_state *st = adap->priv; st 3240 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.get_i2c_tuner(adap->fe_adap[0].fe); st 3243 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7790p_dib0090_config.reset = st->dib7000p_ops.tuner_sleep; st 3244 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7790p_dib0090_config.sleep = st->dib7000p_ops.tuner_sleep; st 3245 drivers/media/usb/dvb-usb/dib0700_devices.c tfe7790p_dib0090_config.get_adc_power = st->dib7000p_ops.get_adc_power; st 3251 drivers/media/usb/dvb-usb/dib0700_devices.c st->dib7000p_ops.set_gpio(adap->fe_adap[0].fe, 8, 0, 1); st 3253 drivers/media/usb/dvb-usb/dib0700_devices.c st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; st 3379 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = dev->priv; st 3409 drivers/media/usb/dvb-usb/dib0700_devices.c st->read_status = adap->fe_adap[0].fe->ops.read_status; st 3411 drivers/media/usb/dvb-usb/dib0700_devices.c st->sleep = adap->fe_adap[0].fe->ops.sleep; st 3441 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3444 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 3447 drivers/media/usb/dvb-usb/dib0700_devices.c st->disable_streaming_master_mode = 1; st 3603 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3639 drivers/media/usb/dvb-usb/dib0700_devices.c st->is_dib7000pc = 1; st 3703 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3706 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 3708 drivers/media/usb/dvb-usb/dib0700_devices.c st->disable_streaming_master_mode = 1; st 3740 drivers/media/usb/dvb-usb/dib0700_devices.c struct dib0700_state *st = adap->dev->priv; st 3747 drivers/media/usb/dvb-usb/dib0700_devices.c st->fw_use_new_i2c_api = 1; st 3748 drivers/media/usb/dvb-usb/dib0700_devices.c st->disable_streaming_master_mode = 1; st 3781 drivers/media/usb/dvb-usb/dib0700_devices.c st->i2c_client_demod = client_demod; st 3809 drivers/media/usb/dvb-usb/dib0700_devices.c st->i2c_client_tuner = client_tuner; st 25 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; st 26 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.fifo_ctrl != NULL) st 27 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.fifo_ctrl(adap->fe_adap[0].fe, onoff)) { st 39 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; st 40 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.pid_ctrl != NULL) st 41 drivers/media/usb/dvb-usb/dibusb-common.c st->ops.pid_ctrl(adap->fe_adap[0].fe, st 51 drivers/media/usb/dvb-usb/dibusb-common.c struct dibusb_state *st = adap->priv; st 52 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.pid_parse != NULL) st 53 drivers/media/usb/dvb-usb/dibusb-common.c if (st->ops.pid_parse(adap->fe_adap[0].fe, onoff) < 0) st 19 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; st 21 drivers/media/usb/dvb-usb/dibusb-mb.c return st->ops.tuner_pass_ctrl(fe, enable, st->tuner_addr); st 27 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; st 32 drivers/media/usb/dvb-usb/dibusb-mb.c &adap->dev->i2c_adap, &st->ops); st 43 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; st 45 drivers/media/usb/dvb-usb/dibusb-mb.c st->tuner_addr = 0x61; st 54 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; st 56 drivers/media/usb/dvb-usb/dibusb-mb.c st->tuner_addr = 0x60; st 74 drivers/media/usb/dvb-usb/dibusb-mb.c struct dibusb_state *st = adap->priv; st 77 drivers/media/usb/dvb-usb/dibusb-mb.c msg[0].addr = msg[1].addr = st->tuner_addr = 0x60; st 102 drivers/media/usb/dvb-usb/dibusb-mc-common.c struct dibusb_state *st = adap->priv; st 103 drivers/media/usb/dvb-usb/dibusb-mc-common.c st->ops.pid_parse = dib3000mc_pid_parse; st 104 drivers/media/usb/dvb-usb/dibusb-mc-common.c st->ops.pid_ctrl = dib3000mc_pid_control; st 118 drivers/media/usb/dvb-usb/dibusb-mc-common.c struct dibusb_state *st = adap->priv; st 160 drivers/media/usb/dvb-usb/dibusb-mc-common.c st->mt2060_present = 1; st 28 drivers/media/usb/dvb-usb/digitv.c struct digitv_state *st = d->priv; st 36 drivers/media/usb/dvb-usb/digitv.c memset(st->sndbuf, 0, 7); st 37 drivers/media/usb/dvb-usb/digitv.c memset(st->rcvbuf, 0, 7); st 39 drivers/media/usb/dvb-usb/digitv.c st->sndbuf[0] = cmd; st 40 drivers/media/usb/dvb-usb/digitv.c st->sndbuf[1] = vv; st 41 drivers/media/usb/dvb-usb/digitv.c st->sndbuf[2] = wo ? wlen : rlen; st 44 drivers/media/usb/dvb-usb/digitv.c memcpy(&st->sndbuf[3], wbuf, wlen); st 45 drivers/media/usb/dvb-usb/digitv.c ret = dvb_usb_generic_write(d, st->sndbuf, 7); st 47 drivers/media/usb/dvb-usb/digitv.c ret = dvb_usb_generic_rw(d, st->sndbuf, 7, st->rcvbuf, 7, 10); st 48 drivers/media/usb/dvb-usb/digitv.c memcpy(rbuf, &st->rcvbuf[3], rlen); st 142 drivers/media/usb/dvb-usb/digitv.c struct digitv_state *st = adap->dev->priv; st 147 drivers/media/usb/dvb-usb/digitv.c st->is_nxt6000 = 0; st 154 drivers/media/usb/dvb-usb/digitv.c st->is_nxt6000 = 1; st 162 drivers/media/usb/dvb-usb/digitv.c struct digitv_state *st = adap->dev->priv; st 167 drivers/media/usb/dvb-usb/digitv.c if (st->is_nxt6000) st 26 drivers/media/usb/dvb-usb/dtt200u.c struct dtt200u_state *st = d->priv; st 31 drivers/media/usb/dvb-usb/dtt200u.c st->data[0] = SET_INIT; st 34 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(d, st->data, 2); st 43 drivers/media/usb/dvb-usb/dtt200u.c struct dtt200u_state *st = d->priv; st 47 drivers/media/usb/dvb-usb/dtt200u.c st->data[0] = SET_STREAMING; st 48 drivers/media/usb/dvb-usb/dtt200u.c st->data[1] = onoff; st 50 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 2); st 57 drivers/media/usb/dvb-usb/dtt200u.c st->data[0] = RESET_PID_FILTER; st 58 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 1); st 69 drivers/media/usb/dvb-usb/dtt200u.c struct dtt200u_state *st = d->priv; st 75 drivers/media/usb/dvb-usb/dtt200u.c st->data[0] = SET_PID_FILTER; st 76 drivers/media/usb/dvb-usb/dtt200u.c st->data[1] = index; st 77 drivers/media/usb/dvb-usb/dtt200u.c st->data[2] = pid & 0xff; st 78 drivers/media/usb/dvb-usb/dtt200u.c st->data[3] = (pid >> 8) & 0x1f; st 80 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_write(adap->dev, st->data, 4); st 88 drivers/media/usb/dvb-usb/dtt200u.c struct dtt200u_state *st = d->priv; st 93 drivers/media/usb/dvb-usb/dtt200u.c st->data[0] = GET_RC_CODE; st 95 drivers/media/usb/dvb-usb/dtt200u.c ret = dvb_usb_generic_rw(d, st->data, 1, st->data, 5, 0); st 99 drivers/media/usb/dvb-usb/dtt200u.c if (st->data[0] == 1) { st 102 drivers/media/usb/dvb-usb/dtt200u.c scancode = st->data[1]; st 103 drivers/media/usb/dvb-usb/dtt200u.c if ((u8) ~st->data[1] != st->data[2]) { st 106 drivers/media/usb/dvb-usb/dtt200u.c scancode |= st->data[2]; st 110 drivers/media/usb/dvb-usb/dtt200u.c scancode |= st->data[3]; st 113 drivers/media/usb/dvb-usb/dtt200u.c if ((u8) ~st->data[3] == st->data[4]) st 117 drivers/media/usb/dvb-usb/dtt200u.c } else if (st->data[0] == 2) { st 123 drivers/media/usb/dvb-usb/dtt200u.c if (st->data[0] != 0) st 124 drivers/media/usb/dvb-usb/dtt200u.c deb_info("st->data: %*ph\n", 5, st->data); st 28 drivers/media/usb/dvb-usb/dtv5100.c struct dtv5100_state *st = d->priv; st 55 drivers/media/usb/dvb-usb/dtv5100.c memcpy(st->data, rbuf, rlen); st 58 drivers/media/usb/dvb-usb/dtv5100.c type, value, index, st->data, rlen, st 998 drivers/media/usb/dvb-usb/dw2102.c struct dw2102_state *st = (struct dw2102_state *)d->dev->priv; st 1001 drivers/media/usb/dvb-usb/dw2102.c if (st->old_set_voltage) st 1002 drivers/media/usb/dvb-usb/dw2102.c st->old_set_voltage(fe, voltage); st 1030 drivers/media/usb/dvb-usb/dw2102.c struct dw2102_state *st = (struct dw2102_state *)d->dev->priv; st 1033 drivers/media/usb/dvb-usb/dw2102.c ret = st->fe_read_status(fe, status); st 1036 drivers/media/usb/dvb-usb/dw2102.c if ((*status & FE_HAS_LOCK) && (!st->last_lock)) st 1039 drivers/media/usb/dvb-usb/dw2102.c st->last_lock = (*status & FE_HAS_LOCK) ? 1 : 0; st 1338 drivers/media/usb/dvb-usb/dw2102.c struct dw2102_state *st = d->dev->priv; st 1350 drivers/media/usb/dvb-usb/dw2102.c st->old_set_voltage = d->fe_adap[0].fe->ops.set_voltage; st 2429 drivers/media/usb/dvb-usb/dw2102.c struct dw2102_state *st = (struct dw2102_state *)d->priv; st 2433 drivers/media/usb/dvb-usb/dw2102.c client = st->i2c_client_tuner; st 2440 drivers/media/usb/dvb-usb/dw2102.c client = st->i2c_client_demod; st 32 drivers/media/usb/dvb-usb/gp8psk.c struct gp8psk_state *st = d->priv; st 35 drivers/media/usb/dvb-usb/gp8psk.c if (blen > sizeof(st->data)) st 46 drivers/media/usb/dvb-usb/gp8psk.c value, index, st->data, blen, st 57 drivers/media/usb/dvb-usb/gp8psk.c memcpy(b, st->data, blen); st 71 drivers/media/usb/dvb-usb/gp8psk.c struct gp8psk_state *st = d->priv; st 77 drivers/media/usb/dvb-usb/gp8psk.c if (blen > sizeof(st->data)) st 83 drivers/media/usb/dvb-usb/gp8psk.c memcpy(st->data, b, blen); st 88 drivers/media/usb/dvb-usb/gp8psk.c value, index, st->data, blen, st 77 drivers/media/usb/dvb-usb/nova-t-usb2.c struct dibusb_device_state *st = d->priv; st 109 drivers/media/usb/dvb-usb/nova-t-usb2.c if (st->old_toggle == toggle) { st 110 drivers/media/usb/dvb-usb/nova-t-usb2.c if (st->last_repeat_count++ < 2) st 113 drivers/media/usb/dvb-usb/nova-t-usb2.c st->last_repeat_count = 0; st 114 drivers/media/usb/dvb-usb/nova-t-usb2.c st->old_toggle = toggle; st 227 drivers/media/usb/dvb-usb/technisat-usb2.c enum technisat_usb2_led_state st) st 235 drivers/media/usb/dvb-usb/technisat-usb2.c if (disable_led_control && st != TECH_LED_OFF) st 238 drivers/media/usb/dvb-usb/technisat-usb2.c switch (st) { st 74 drivers/media/usb/dvb-usb/ttusb2.c struct ttusb2_state *st = d->priv; st 92 drivers/media/usb/dvb-usb/ttusb2.c s[1] = ++st->id; st 450 drivers/media/usb/dvb-usb/ttusb2.c struct ttusb2_state *st = d->priv; st 457 drivers/media/usb/dvb-usb/ttusb2.c st->last_rc_key = RC_SCANCODE_RC5(rx[3], rx[2]); st 459 drivers/media/usb/dvb-usb/ttusb2.c rc_keydown(d->rc_dev, RC_PROTO_RC5, st->last_rc_key, rx[1]); st 460 drivers/media/usb/dvb-usb/ttusb2.c } else if (st->last_rc_key) { st 462 drivers/media/usb/dvb-usb/ttusb2.c st->last_rc_key = 0; st 38 drivers/media/usb/dvb-usb/vp702x-fe.c static int vp702x_fe_refresh_state(struct vp702x_fe_state *st) st 40 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_device_state *dst = st->d->priv; st 43 drivers/media/usb/dvb-usb/vp702x-fe.c if (time_after(jiffies, st->next_status_check)) { st 47 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_in_op(st->d, READ_STATUS, 0, 0, buf, 10); st 48 drivers/media/usb/dvb-usb/vp702x-fe.c st->lock = buf[4]; st 50 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_in_op(st->d, READ_TUNER_REG_REQ, 0x11, 0, buf, 1); st 51 drivers/media/usb/dvb-usb/vp702x-fe.c st->snr = buf[0]; st 53 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_in_op(st->d, READ_TUNER_REG_REQ, 0x15, 0, buf, 1); st 54 drivers/media/usb/dvb-usb/vp702x-fe.c st->sig = buf[0]; st 57 drivers/media/usb/dvb-usb/vp702x-fe.c st->next_status_check = jiffies + (st->status_check_interval*HZ)/1000; st 74 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 75 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_fe_refresh_state(st); st 78 drivers/media/usb/dvb-usb/vp702x-fe.c if (st->lock == 0) st 84 drivers/media/usb/dvb-usb/vp702x-fe.c st->status_check_interval = 1000; st 86 drivers/media/usb/dvb-usb/vp702x-fe.c st->status_check_interval = 250; st 93 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 94 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_fe_refresh_state(st); st 102 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 103 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_fe_refresh_state(st); st 110 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 111 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_fe_refresh_state(st); st 113 drivers/media/usb/dvb-usb/vp702x-fe.c *strength = (st->sig << 8) | st->sig; st 120 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 121 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_fe_refresh_state(st); st 123 drivers/media/usb/dvb-usb/vp702x-fe.c _snr = (st->snr & 0x1f) * 0xff / 0x1f; st 138 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 139 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_device_state *dst = st->d->priv; st 168 drivers/media/usb/dvb-usb/vp702x-fe.c if (st->voltage == SEC_VOLTAGE_18) st 182 drivers/media/usb/dvb-usb/vp702x-fe.c st->status_check_interval = 250; st 183 drivers/media/usb/dvb-usb/vp702x-fe.c st->next_status_check = jiffies; st 185 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_inout_op(st->d, cmd, 8, cmd, 10, 100); st 199 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 201 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_in_op(st->d, RESET_TUNER, 0, 0, NULL, 0); st 215 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 216 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_device_state *dst = st->d->priv; st 231 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_inout_op(st->d, cmd, 8, cmd, 10, 100); st 253 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 254 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_device_state *dst = st->d->priv; st 259 drivers/media/usb/dvb-usb/vp702x-fe.c st->tone_mode = tone; st 262 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[2] = 0x02; st 264 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[2] = 0x00; st 266 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[7] = vp702x_chksum(st->lnb_buf, 0, 7); st 271 drivers/media/usb/dvb-usb/vp702x-fe.c memcpy(buf, st->lnb_buf, 8); st 273 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_inout_op(st->d, buf, 8, buf, 10, 100); st 287 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 288 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_device_state *dst = st->d->priv; st 292 drivers/media/usb/dvb-usb/vp702x-fe.c st->voltage = voltage; st 295 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[4] = 0x01; st 297 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[4] = 0x00; st 299 drivers/media/usb/dvb-usb/vp702x-fe.c st->lnb_buf[7] = vp702x_chksum(st->lnb_buf, 0, 7); st 304 drivers/media/usb/dvb-usb/vp702x-fe.c memcpy(buf, st->lnb_buf, 8); st 306 drivers/media/usb/dvb-usb/vp702x-fe.c vp702x_usb_inout_op(st->d, buf, 8, buf, 10, 100); st 318 drivers/media/usb/dvb-usb/vp702x-fe.c struct vp702x_fe_state *st = fe->demodulator_priv; st 319 drivers/media/usb/dvb-usb/vp702x-fe.c kfree(st); st 116 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = d->priv; st 121 drivers/media/usb/dvb-usb/vp702x.c ret = mutex_lock_interruptible(&st->buf_mutex); st 125 drivers/media/usb/dvb-usb/vp702x.c if (buflen > st->buf_len) { st 128 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 132 drivers/media/usb/dvb-usb/vp702x.c kfree(st->buf); st 133 drivers/media/usb/dvb-usb/vp702x.c st->buf = buf; st 134 drivers/media/usb/dvb-usb/vp702x.c st->buf_len = buflen; st 136 drivers/media/usb/dvb-usb/vp702x.c buf = st->buf; st 147 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 155 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = adap->dev->priv; st 158 drivers/media/usb/dvb-usb/vp702x.c mutex_lock(&st->buf_mutex); st 160 drivers/media/usb/dvb-usb/vp702x.c buf = st->buf; st 165 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 172 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = adap->dev->priv; st 175 drivers/media/usb/dvb-usb/vp702x.c mutex_lock(&st->buf_mutex); st 177 drivers/media/usb/dvb-usb/vp702x.c buf = st->buf; st 182 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 189 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_adapter_state *st = adap->priv; st 194 drivers/media/usb/dvb-usb/vp702x.c st->pid_filter_state |= (1 << id); st 196 drivers/media/usb/dvb-usb/vp702x.c st->pid_filter_state &= ~(1 << id); st 202 drivers/media/usb/dvb-usb/vp702x.c vp702x_set_pld_state(adap, st->pid_filter_state); st 219 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_adapter_state *st = adap->priv; st 224 drivers/media/usb/dvb-usb/vp702x.c st->pid_filter_count = 8; st 225 drivers/media/usb/dvb-usb/vp702x.c st->pid_filter_can_bypass = 1; st 226 drivers/media/usb/dvb-usb/vp702x.c st->pid_filter_state = 0x00; st 230 drivers/media/usb/dvb-usb/vp702x.c for (i = 0; i < st->pid_filter_count; i++) st 294 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = d->priv; st 296 drivers/media/usb/dvb-usb/vp702x.c mutex_lock(&st->buf_mutex); st 297 drivers/media/usb/dvb-usb/vp702x.c buf = st->buf; st 302 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 333 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st; st 341 drivers/media/usb/dvb-usb/vp702x.c st = d->priv; st 342 drivers/media/usb/dvb-usb/vp702x.c st->buf_len = 16; st 343 drivers/media/usb/dvb-usb/vp702x.c st->buf = kmalloc(st->buf_len, GFP_KERNEL); st 344 drivers/media/usb/dvb-usb/vp702x.c if (!st->buf) { st 349 drivers/media/usb/dvb-usb/vp702x.c mutex_init(&st->buf_mutex); st 359 drivers/media/usb/dvb-usb/vp702x.c struct vp702x_device_state *st = d->priv; st 360 drivers/media/usb/dvb-usb/vp702x.c mutex_lock(&st->buf_mutex); st 361 drivers/media/usb/dvb-usb/vp702x.c kfree(st->buf); st 362 drivers/media/usb/dvb-usb/vp702x.c mutex_unlock(&st->buf_mutex); st 144 drivers/media/usb/gspca/benq.c int i, st; st 180 drivers/media/usb/gspca/benq.c st = urb0->iso_frame_desc[i].status; st 181 drivers/media/usb/gspca/benq.c if (st == 0) st 182 drivers/media/usb/gspca/benq.c st = urb->iso_frame_desc[i].status; st 183 drivers/media/usb/gspca/benq.c if (st) { st 185 drivers/media/usb/gspca/benq.c i, st); st 229 drivers/media/usb/gspca/benq.c st = usb_submit_urb(urb0, GFP_ATOMIC); st 230 drivers/media/usb/gspca/benq.c if (st < 0) st 231 drivers/media/usb/gspca/benq.c pr_err("usb_submit_urb(0) ret %d\n", st); st 232 drivers/media/usb/gspca/benq.c st = usb_submit_urb(urb, GFP_ATOMIC); st 233 drivers/media/usb/gspca/benq.c if (st < 0) st 234 drivers/media/usb/gspca/benq.c pr_err("usb_submit_urb() ret %d\n", st); st 267 drivers/media/usb/gspca/gspca.c int i, len, st; st 286 drivers/media/usb/gspca/gspca.c st = urb->iso_frame_desc[i].status; st 287 drivers/media/usb/gspca/gspca.c if (st) { st 289 drivers/media/usb/gspca/gspca.c i, len, st); st 311 drivers/media/usb/gspca/gspca.c st = usb_submit_urb(urb, GFP_ATOMIC); st 312 drivers/media/usb/gspca/gspca.c if (st < 0) st 313 drivers/media/usb/gspca/gspca.c pr_err("usb_submit_urb() ret %d\n", st); st 337 drivers/media/usb/gspca/gspca.c int st; st 367 drivers/media/usb/gspca/gspca.c st = usb_submit_urb(urb, GFP_ATOMIC); st 368 drivers/media/usb/gspca/gspca.c if (st < 0) st 369 drivers/media/usb/gspca/gspca.c pr_err("usb_submit_urb() ret %d\n", st); st 260 drivers/media/usb/gspca/konica.c int i, st; st 274 drivers/media/usb/gspca/konica.c st = usb_submit_urb(urb, GFP_ATOMIC); st 275 drivers/media/usb/gspca/konica.c if (st < 0) st 276 drivers/media/usb/gspca/konica.c pr_err("resubmit urb error %d\n", st); st 320 drivers/media/usb/gspca/konica.c st = *((u8 *)status_urb->transfer_buffer st 335 drivers/media/usb/gspca/konica.c if (st & 0x80) { st 340 drivers/media/usb/gspca/konica.c u8 button_state = st & 0x40 ? 1 : 0; st 349 drivers/media/usb/gspca/konica.c if (st & 0x01) st 358 drivers/media/usb/gspca/konica.c st = usb_submit_urb(data_urb, GFP_ATOMIC); st 359 drivers/media/usb/gspca/konica.c if (st < 0) st 361 drivers/media/usb/gspca/konica.c st); st 363 drivers/media/usb/gspca/konica.c st = usb_submit_urb(status_urb, GFP_ATOMIC); st 364 drivers/media/usb/gspca/konica.c if (st < 0) st 365 drivers/media/usb/gspca/konica.c gspca_err(gspca_dev, "usb_submit_urb(status_urb) ret %d\n", st); st 1649 drivers/media/usb/pvrusb2/pvrusb2-hdw.c static const char *pvr2_get_state_name(unsigned int st) st 1651 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (st < ARRAY_SIZE(pvr2_state_names)) { st 1652 drivers/media/usb/pvrusb2/pvrusb2-hdw.c return pvr2_state_names[st]; st 1721 drivers/media/usb/pvrusb2/pvrusb2-hdw.c int ret,st; st 1734 drivers/media/usb/pvrusb2/pvrusb2-hdw.c while ((st = hdw->master_state) != PVR2_STATE_RUN) { st 1735 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (st != PVR2_STATE_READY) return -EIO; st 1736 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if ((ret = pvr2_hdw_wait(hdw,st)) < 0) return ret; st 4598 drivers/media/usb/pvrusb2/pvrusb2-hdw.c unsigned int st; st 4601 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = !(hdw->state_encoder_run || st 4605 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (!st != !hdw->state_pipeline_idle) { st 4606 drivers/media/usb/pvrusb2/pvrusb2-hdw.c hdw->state_pipeline_idle = st; st 4900 drivers/media/usb/pvrusb2/pvrusb2-hdw.c unsigned int st; st 4918 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_DEAD; st 4920 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_COLD; st 4924 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_WARM; st 4927 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_ERROR; st 4931 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_RUN; st 4933 drivers/media/usb/pvrusb2/pvrusb2-hdw.c st = PVR2_STATE_READY; st 4935 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (hdw->master_state != st) { st 4939 drivers/media/usb/pvrusb2/pvrusb2-hdw.c pvr2_get_state_name(st)); st 4940 drivers/media/usb/pvrusb2/pvrusb2-hdw.c pvr2_led_ctrl(hdw,st == PVR2_STATE_RUN); st 4941 drivers/media/usb/pvrusb2/pvrusb2-hdw.c hdw->master_state = st; st 87 drivers/media/usb/pvrusb2/pvrusb2-io.c static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) st 89 drivers/media/usb/pvrusb2/pvrusb2-io.c switch (st) { st 476 drivers/memory/omap-gpmc.c #define GPMC_GET_RAW(reg, st, end, field) \ st 477 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), 0, field, GPMC_CD_FCLK, 0, 1, 0) st 478 drivers/memory/omap-gpmc.c #define GPMC_GET_RAW_MAX(reg, st, end, max, field) \ st 479 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), (max), field, GPMC_CD_FCLK, 0, 1, 0) st 480 drivers/memory/omap-gpmc.c #define GPMC_GET_RAW_BOOL(reg, st, end, field) \ st 481 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), 0, field, GPMC_CD_FCLK, 0, 1, 1) st 482 drivers/memory/omap-gpmc.c #define GPMC_GET_RAW_SHIFT_MAX(reg, st, end, shift, max, field) \ st 483 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), (max), field, GPMC_CD_FCLK, (shift), 1, 1) st 484 drivers/memory/omap-gpmc.c #define GPMC_GET_TICKS(reg, st, end, field) \ st 485 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), 0, field, GPMC_CD_FCLK, 0, 0, 0) st 486 drivers/memory/omap-gpmc.c #define GPMC_GET_TICKS_CD(reg, st, end, field, cd) \ st 487 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), 0, field, (cd), 0, 0, 0) st 488 drivers/memory/omap-gpmc.c #define GPMC_GET_TICKS_CD_MAX(reg, st, end, max, field, cd) \ st 489 drivers/memory/omap-gpmc.c get_gpmc_timing_reg(cs, (reg), (st), (end), (max), field, (cd), 0, 0, 0) st 640 drivers/memory/omap-gpmc.c #define GPMC_SET_ONE_CD_MAX(reg, st, end, max, field, cd) \ st 641 drivers/memory/omap-gpmc.c if (set_gpmc_timing_reg(cs, (reg), (st), (end), (max), \ st 645 drivers/memory/omap-gpmc.c #define GPMC_SET_ONE(reg, st, end, field) \ st 646 drivers/memory/omap-gpmc.c GPMC_SET_ONE_CD_MAX(reg, st, end, 0, field, GPMC_CD_FCLK) st 366 drivers/misc/fastrpc.c int st = CMP(pa->start, pb->start); st 370 drivers/misc/fastrpc.c return st == 0 ? ed : st; st 65 drivers/misc/mic/scif/scif_debugfs.c if (window->st) st 66 drivers/misc/mic/scif/scif_debugfs.c for_each_sg(window->st->sgl, sg, window->st->nents, j) st 230 drivers/misc/mic/scif/scif_rma.c if (window->st) { st 232 drivers/misc/mic/scif/scif_rma.c window->st->sgl, window->st->nents, st 234 drivers/misc/mic/scif/scif_rma.c sg_free_table(window->st); st 235 drivers/misc/mic/scif/scif_rma.c kfree(window->st); st 236 drivers/misc/mic/scif/scif_rma.c window->st = NULL; st 531 drivers/misc/mic/scif/scif_rma.c window->st = kzalloc(sizeof(*window->st), GFP_KERNEL); st 532 drivers/misc/mic/scif/scif_rma.c if (!window->st) st 535 drivers/misc/mic/scif/scif_rma.c err = sg_alloc_table(window->st, window->nr_pages, GFP_KERNEL); st 539 drivers/misc/mic/scif/scif_rma.c for_each_sg(window->st->sgl, sg, window->st->nents, i) st 542 drivers/misc/mic/scif/scif_rma.c err = dma_map_sg(&remote_dev->sdev->dev, window->st->sgl, st 543 drivers/misc/mic/scif/scif_rma.c window->st->nents, DMA_BIDIRECTIONAL); st 547 drivers/misc/mic/scif/scif_rma.c sg = window->st->sgl; st 272 drivers/misc/mic/scif/scif_rma.h struct sg_table *st; st 749 drivers/mtd/nand/raw/marvell_nand.c u32 st = readl_relaxed(nfc->regs + NDSR); st 756 drivers/mtd/nand/raw/marvell_nand.c if (st & NDSR_RDY(1)) st 757 drivers/mtd/nand/raw/marvell_nand.c st |= NDSR_RDY(0); st 759 drivers/mtd/nand/raw/marvell_nand.c if (!(st & ien)) st 762 drivers/mtd/nand/raw/marvell_nand.c marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT); st 764 drivers/mtd/nand/raw/marvell_nand.c if (st & (NDSR_RDY(0) | NDSR_RDY(1))) st 260 drivers/mtd/nand/raw/sunxi_nand.c u32 st = readl(nfc->regs + NFC_REG_ST); st 263 drivers/mtd/nand/raw/sunxi_nand.c if (!(ien & st)) st 266 drivers/mtd/nand/raw/sunxi_nand.c if ((ien & st) == ien) st 269 drivers/mtd/nand/raw/sunxi_nand.c writel(st & NFC_INT_MASK, nfc->regs + NFC_REG_ST); st 270 drivers/mtd/nand/raw/sunxi_nand.c writel(~st & ien & NFC_INT_MASK, nfc->regs + NFC_REG_INT); st 286 drivers/net/ethernet/alacritech/slic.h #define SLIC_INC_STATS_COUNTER(st, counter) \ st 288 drivers/net/ethernet/alacritech/slic.h u64_stats_update_begin(&(st)->syncp); \ st 289 drivers/net/ethernet/alacritech/slic.h (st)->counter++; \ st 290 drivers/net/ethernet/alacritech/slic.h u64_stats_update_end(&(st)->syncp); \ st 293 drivers/net/ethernet/alacritech/slic.h #define SLIC_GET_STATS_COUNTER(newst, st, counter) \ st 297 drivers/net/ethernet/alacritech/slic.h start = u64_stats_fetch_begin_irq(&(st)->syncp); \ st 298 drivers/net/ethernet/alacritech/slic.h newst = (st)->counter; \ st 299 drivers/net/ethernet/alacritech/slic.h } while (u64_stats_fetch_retry_irq(&(st)->syncp, start)); \ st 1127 drivers/net/ethernet/aurora/nb8800.c struct ethtool_stats *estats, u64 *st) st 1135 drivers/net/ethernet/aurora/nb8800.c st[i] = rx; st 1136 drivers/net/ethernet/aurora/nb8800.c st[i + NB8800_NUM_STATS / 2] = tx; st 39 drivers/net/ethernet/brocade/bna/bfa_cs.h #define bfa_fsm_state_decl(oc, st, otype, etype) \ st 40 drivers/net/ethernet/brocade/bna/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event); \ st 41 drivers/net/ethernet/brocade/bna/bfa_cs.h static void oc ## _sm_ ## st ## _entry(otype * fsm) st 313 drivers/net/ethernet/cavium/liquidio/request_manager.c struct iq_post_status st; st 315 drivers/net/ethernet/cavium/liquidio/request_manager.c st.status = IQ_SEND_OK; st 321 drivers/net/ethernet/cavium/liquidio/request_manager.c st.status = IQ_SEND_FAILED; st 322 drivers/net/ethernet/cavium/liquidio/request_manager.c st.index = -1; st 323 drivers/net/ethernet/cavium/liquidio/request_manager.c return st; st 327 drivers/net/ethernet/cavium/liquidio/request_manager.c st.status = IQ_SEND_STOP; st 332 drivers/net/ethernet/cavium/liquidio/request_manager.c st.index = iq->host_write_index; st 344 drivers/net/ethernet/cavium/liquidio/request_manager.c return st; st 549 drivers/net/ethernet/cavium/liquidio/request_manager.c struct iq_post_status st; st 558 drivers/net/ethernet/cavium/liquidio/request_manager.c st = __post_command2(iq, cmd); st 560 drivers/net/ethernet/cavium/liquidio/request_manager.c if (st.status != IQ_SEND_FAILED) { st 562 drivers/net/ethernet/cavium/liquidio/request_manager.c __add_to_request_list(iq, st.index, buf, reqtype); st 567 drivers/net/ethernet/cavium/liquidio/request_manager.c xmit_stopped || st.status == IQ_SEND_STOP) st 580 drivers/net/ethernet/cavium/liquidio/request_manager.c return st.status; st 983 drivers/net/ethernet/chelsio/cxgb/sge.c struct sge_port_stats *st = per_cpu_ptr(sge->port_stats[port], cpu); st 985 drivers/net/ethernet/chelsio/cxgb/sge.c ss->rx_cso_good += st->rx_cso_good; st 986 drivers/net/ethernet/chelsio/cxgb/sge.c ss->tx_cso += st->tx_cso; st 987 drivers/net/ethernet/chelsio/cxgb/sge.c ss->tx_tso += st->tx_tso; st 988 drivers/net/ethernet/chelsio/cxgb/sge.c ss->tx_need_hdrroom += st->tx_need_hdrroom; st 989 drivers/net/ethernet/chelsio/cxgb/sge.c ss->vlan_xtract += st->vlan_xtract; st 990 drivers/net/ethernet/chelsio/cxgb/sge.c ss->vlan_insert += st->vlan_insert; st 1357 drivers/net/ethernet/chelsio/cxgb/sge.c struct sge_port_stats *st; st 1373 drivers/net/ethernet/chelsio/cxgb/sge.c st = this_cpu_ptr(sge->port_stats[p->iff]); st 1380 drivers/net/ethernet/chelsio/cxgb/sge.c ++st->rx_cso_good; st 1386 drivers/net/ethernet/chelsio/cxgb/sge.c st->vlan_xtract++; st 1774 drivers/net/ethernet/chelsio/cxgb/sge.c struct sge_port_stats *st = this_cpu_ptr(sge->port_stats[dev->if_port]); st 1788 drivers/net/ethernet/chelsio/cxgb/sge.c ++st->tx_need_hdrroom; st 1798 drivers/net/ethernet/chelsio/cxgb/sge.c ++st->tx_tso; st 1857 drivers/net/ethernet/chelsio/cxgb/sge.c st->tx_cso += (skb->ip_summed == CHECKSUM_PARTIAL); st 1864 drivers/net/ethernet/chelsio/cxgb/sge.c st->vlan_insert++; st 1733 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st, st 1735 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st, st 1737 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st, st 1739 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st, st 1744 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h struct tp_fcoe_stats *st, bool sleep_ok); st 5640 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st, st 5645 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->mac_in_errs, nchan, TP_MIB_MAC_IN_ERR_0_A, st 5647 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->hdr_in_errs, nchan, TP_MIB_HDR_IN_ERR_0_A, st 5649 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tcp_in_errs, nchan, TP_MIB_TCP_IN_ERR_0_A, st 5651 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tnl_cong_drops, nchan, st 5653 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->ofld_chan_drops, nchan, st 5655 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tnl_tx_drops, nchan, TP_MIB_TNL_DROP_0_A, st 5657 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->ofld_vlan_drops, nchan, st 5659 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->tcp6_in_errs, nchan, st 5661 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->ofld_no_neigh, 2, TP_MIB_OFD_ARP_DROP_A, st 5673 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st, st 5678 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->req, nchan, TP_MIB_CPL_IN_REQ_0_A, sleep_ok); st 5680 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, st->rsp, nchan, TP_MIB_CPL_OUT_RSP_0_A, sleep_ok); st 5691 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st, st 5694 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->rqe_dfr_pkt, 2, TP_MIB_RQE_DFR_PKT_A, st 5708 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c struct tp_fcoe_stats *st, bool sleep_ok) st 5712 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->frames_ddp, 1, TP_MIB_FCOE_DDP_0_A + idx, st 5715 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_mib_read(adap, &st->frames_drop, 1, st 5721 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c st->octets_ddp = ((u64)val[0] << 32) | val[1]; st 5732 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st, st 5738 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c st->frames = val[0]; st 5739 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c st->drops = val[1]; st 5740 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c st->octets = ((u64)val[2] << 32) | val[3]; st 196 drivers/net/ethernet/hisilicon/hns_mdio.c u8 st = is_c45 ? MDIO_ST_CLAUSE_45 : MDIO_ST_CLAUSE_22; st 198 drivers/net/ethernet/hisilicon/hns_mdio.c cmd_reg_value = st << MDIO_CMD_ST_S; st 275 drivers/net/ethernet/huawei/hinic/hinic_hw_if.c u8 st, u8 at, u8 ph, st 291 drivers/net/ethernet/huawei/hinic/hinic_hw_if.c dma_attr_entry = HINIC_DMA_ATTR_SET(st, ST) | st 1600 drivers/net/ethernet/ibm/emac/core.c struct emac_error_stats *st = &dev->estats; st 1604 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_errors; st 1606 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_bad_fcs; st 1608 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_carrier_loss; st 1610 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_excessive_deferral; st 1612 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_excessive_collisions; st 1614 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_late_collision; st 1616 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_multple_collisions; st 1618 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_single_collision; st 1620 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_underrun; st 1622 drivers/net/ethernet/ibm/emac/core.c ++st->tx_bd_sqe; st 1691 drivers/net/ethernet/ibm/emac/core.c struct emac_error_stats *st = &dev->estats; st 1695 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_errors; st 1697 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_overrun; st 1699 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_bad_packet; st 1701 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_runt_packet; st 1703 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_short_event; st 1705 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_alignment_error; st 1707 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_bad_fcs; st 1709 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_packet_too_long; st 1711 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_out_of_range; st 1713 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bd_in_range; st 1924 drivers/net/ethernet/ibm/emac/core.c struct emac_error_stats *st = &dev->estats; st 1935 drivers/net/ethernet/ibm/emac/core.c ++st->tx_parity; st 1937 drivers/net/ethernet/ibm/emac/core.c ++st->rx_parity; st 1939 drivers/net/ethernet/ibm/emac/core.c ++st->tx_underrun; st 1941 drivers/net/ethernet/ibm/emac/core.c ++st->rx_fifo_overrun; st 1943 drivers/net/ethernet/ibm/emac/core.c ++st->rx_overrun; st 1945 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bad_packet; st 1947 drivers/net/ethernet/ibm/emac/core.c ++st->rx_runt_packet; st 1949 drivers/net/ethernet/ibm/emac/core.c ++st->rx_short_event; st 1951 drivers/net/ethernet/ibm/emac/core.c ++st->rx_alignment_error; st 1953 drivers/net/ethernet/ibm/emac/core.c ++st->rx_bad_fcs; st 1955 drivers/net/ethernet/ibm/emac/core.c ++st->rx_packet_too_long; st 1957 drivers/net/ethernet/ibm/emac/core.c ++st->rx_out_of_range; st 1959 drivers/net/ethernet/ibm/emac/core.c ++st->rx_in_range; st 1961 drivers/net/ethernet/ibm/emac/core.c ++st->tx_sqe; st 1963 drivers/net/ethernet/ibm/emac/core.c ++st->tx_errors; st 1973 drivers/net/ethernet/ibm/emac/core.c struct emac_stats *st = &dev->stats; st 1982 drivers/net/ethernet/ibm/emac/core.c nst->rx_packets = (unsigned long)st->rx_packets; st 1983 drivers/net/ethernet/ibm/emac/core.c nst->rx_bytes = (unsigned long)st->rx_bytes; st 1984 drivers/net/ethernet/ibm/emac/core.c nst->tx_packets = (unsigned long)st->tx_packets; st 1985 drivers/net/ethernet/ibm/emac/core.c nst->tx_bytes = (unsigned long)st->tx_bytes; st 587 drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c MLX5_SET(qpc, qpc, st, MLX5_QP_ST_RC); st 694 drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c MLX5_SET(qpc, qpc, st, MLX5_QP_ST_RC); st 928 drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c MLX5_SET(fpga_qpc, conn->fpga_qpc, st, MLX5_FPGA_QPC_ST_RC); st 234 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c MLX5_SET(qpc, qpc, st, MLX5_QP_ST_UD); st 162 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c MLX5_SET(qpc, qpc, st, MLX5_QP_ST_RC); st 1060 drivers/net/ethernet/mellanox/mlxsw/cmd.h MLXSW_ITEM32(cmd_mbox, sw2hw_cq, st, 0x00, 8, 1); st 1144 drivers/net/ethernet/mellanox/mlxsw/cmd.h MLXSW_ITEM32(cmd_mbox, sw2hw_eq, st, 0x00, 8, 2); st 4047 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &st_meta->insn; st 4059 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (BPF_SIZE(ld->code) != BPF_SIZE(st->code)) st 4062 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (ld->dst_reg != st->src_reg) st 4087 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &st_meta->insn; st 4105 drivers/net/ethernet/netronome/nfp/bpf/jit.c if (ld->src_reg != prev_ld_base || st->dst_reg != prev_st_base) st 4117 drivers/net/ethernet/netronome/nfp/bpf/jit.c prev_st_off + prev_size == st->off) st 4122 drivers/net/ethernet/netronome/nfp/bpf/jit.c st->off + curr_size == prev_st_off) st 4191 drivers/net/ethernet/netronome/nfp/bpf/jit.c struct bpf_insn *st = &meta2->insn; st 4240 drivers/net/ethernet/netronome/nfp/bpf/jit.c prev_st = st; st 4265 drivers/net/ethernet/netronome/nfp/bpf/jit.c prev_st = st; st 192 drivers/net/ethernet/qualcomm/qca_debug.c struct qcaspi_stats *st = &qca->stats; st 194 drivers/net/ethernet/qualcomm/qca_debug.c memcpy(data, st, ARRAY_SIZE(qcaspi_gstrings_stats) * sizeof(u64)); st 181 drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c struct rmnet_priv_stats *st = &priv->stats; st 186 drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c memcpy(data, st, ARRAY_SIZE(rmnet_gstrings_stats) * sizeof(u64)); st 169 drivers/net/ethernet/sfc/tx_tso.c static int tso_start(struct tso_state *st, struct efx_nic *efx, st 177 drivers/net/ethernet/sfc/tx_tso.c st->ip_off = skb_network_header(skb) - skb->data; st 178 drivers/net/ethernet/sfc/tx_tso.c st->tcp_off = skb_transport_header(skb) - skb->data; st 179 drivers/net/ethernet/sfc/tx_tso.c header_len = st->tcp_off + (tcp_hdr(skb)->doff << 2u); st 181 drivers/net/ethernet/sfc/tx_tso.c st->header_len = header_len; st 182 drivers/net/ethernet/sfc/tx_tso.c st->in_len = in_len; st 183 drivers/net/ethernet/sfc/tx_tso.c if (st->protocol == htons(ETH_P_IP)) { st 184 drivers/net/ethernet/sfc/tx_tso.c st->ip_base_len = st->header_len - st->ip_off; st 185 drivers/net/ethernet/sfc/tx_tso.c st->ipv4_id = ntohs(ip_hdr(skb)->id); st 187 drivers/net/ethernet/sfc/tx_tso.c st->ip_base_len = st->header_len - st->tcp_off; st 188 drivers/net/ethernet/sfc/tx_tso.c st->ipv4_id = 0; st 190 drivers/net/ethernet/sfc/tx_tso.c st->seqnum = ntohl(tcp_hdr(skb)->seq); st 196 drivers/net/ethernet/sfc/tx_tso.c st->out_len = skb->len - header_len; st 200 drivers/net/ethernet/sfc/tx_tso.c st->header_dma_addr = dma_addr; st 201 drivers/net/ethernet/sfc/tx_tso.c st->header_unmap_len = skb_headlen(skb); st 202 drivers/net/ethernet/sfc/tx_tso.c st->dma_addr = dma_addr + header_len; st 203 drivers/net/ethernet/sfc/tx_tso.c st->unmap_len = 0; st 208 drivers/net/ethernet/sfc/tx_tso.c static int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, st 211 drivers/net/ethernet/sfc/tx_tso.c st->unmap_addr = skb_frag_dma_map(&efx->pci_dev->dev, frag, 0, st 213 drivers/net/ethernet/sfc/tx_tso.c if (likely(!dma_mapping_error(&efx->pci_dev->dev, st->unmap_addr))) { st 214 drivers/net/ethernet/sfc/tx_tso.c st->unmap_len = skb_frag_size(frag); st 215 drivers/net/ethernet/sfc/tx_tso.c st->in_len = skb_frag_size(frag); st 216 drivers/net/ethernet/sfc/tx_tso.c st->dma_addr = st->unmap_addr; st 234 drivers/net/ethernet/sfc/tx_tso.c struct tso_state *st) st 239 drivers/net/ethernet/sfc/tx_tso.c if (st->in_len == 0) st 241 drivers/net/ethernet/sfc/tx_tso.c if (st->packet_space == 0) st 244 drivers/net/ethernet/sfc/tx_tso.c EFX_WARN_ON_ONCE_PARANOID(st->in_len <= 0); st 245 drivers/net/ethernet/sfc/tx_tso.c EFX_WARN_ON_ONCE_PARANOID(st->packet_space <= 0); st 247 drivers/net/ethernet/sfc/tx_tso.c n = min(st->in_len, st->packet_space); st 249 drivers/net/ethernet/sfc/tx_tso.c st->packet_space -= n; st 250 drivers/net/ethernet/sfc/tx_tso.c st->out_len -= n; st 251 drivers/net/ethernet/sfc/tx_tso.c st->in_len -= n; st 253 drivers/net/ethernet/sfc/tx_tso.c efx_tx_queue_insert(tx_queue, st->dma_addr, n, &buffer); st 255 drivers/net/ethernet/sfc/tx_tso.c if (st->out_len == 0) { st 259 drivers/net/ethernet/sfc/tx_tso.c } else if (st->packet_space != 0) { st 263 drivers/net/ethernet/sfc/tx_tso.c if (st->in_len == 0) { st 265 drivers/net/ethernet/sfc/tx_tso.c buffer->unmap_len = st->unmap_len; st 267 drivers/net/ethernet/sfc/tx_tso.c st->unmap_len = 0; st 270 drivers/net/ethernet/sfc/tx_tso.c st->dma_addr += n; st 287 drivers/net/ethernet/sfc/tx_tso.c struct tso_state *st) st 291 drivers/net/ethernet/sfc/tx_tso.c bool is_last = st->out_len <= skb_shinfo(skb)->gso_size; st 295 drivers/net/ethernet/sfc/tx_tso.c st->packet_space = skb_shinfo(skb)->gso_size; st 298 drivers/net/ethernet/sfc/tx_tso.c st->packet_space = st->out_len; st 302 drivers/net/ethernet/sfc/tx_tso.c if (WARN_ON(!st->header_unmap_len)) st 317 drivers/net/ethernet/sfc/tx_tso.c ESF_DZ_TX_TSO_IP_ID, st->ipv4_id, st 318 drivers/net/ethernet/sfc/tx_tso.c ESF_DZ_TX_TSO_TCP_SEQNO, st->seqnum); st 325 drivers/net/ethernet/sfc/tx_tso.c buffer->dma_addr = st->header_dma_addr; st 326 drivers/net/ethernet/sfc/tx_tso.c buffer->len = st->header_len; st 329 drivers/net/ethernet/sfc/tx_tso.c buffer->unmap_len = st->header_unmap_len; st 334 drivers/net/ethernet/sfc/tx_tso.c st->header_unmap_len = 0; st 341 drivers/net/ethernet/sfc/tx_tso.c st->seqnum += skb_shinfo(skb)->gso_size; st 344 drivers/net/ethernet/sfc/tx_tso.c ++st->ipv4_id; st 234 drivers/net/fddi/skfp/drvfbi.c u_short st = inpw(PLC(PB,PL_INTR_EVENT)) ; st 236 drivers/net/fddi/skfp/drvfbi.c plc_irq(smc,PB,st) ; st 245 drivers/net/fddi/skfp/drvfbi.c u_short st = inpw(PLC(PA,PL_INTR_EVENT)) ; st 247 drivers/net/fddi/skfp/drvfbi.c plc_irq(smc,PA,st) ; st 862 drivers/net/fddi/skfp/h/skfbi.h #define DB_MAC(mac,st) {if (debug_mac & 0x1)\ st 865 drivers/net/fddi/skfp/h/skfbi.h printf("\tMAC %d status 0x%08lx\n",mac,st) ;\ st 867 drivers/net/fddi/skfp/h/skfbi.h dp_mac(mac,st) ;\ st 887 drivers/net/fddi/skfp/h/skfbi.h #define DB_MAC(mac,st) st 444 drivers/net/fddi/skfp/pmf.c int st ; st 450 drivers/net/fddi/skfp/pmf.c st = smt_set_para(smc,pa,index,local,1); st 456 drivers/net/fddi/skfp/pmf.c pcon.pc_err = st ; st 85 drivers/net/fddi/skfp/smt.c static void smt_fill_mac_status(struct s_smc *smc, struct smt_p_mac_status *st); st 579 drivers/net/fddi/skfp/smt.c struct smt_p_state *st ; st 602 drivers/net/fddi/skfp/smt.c st = (struct smt_p_state *) st 604 drivers/net/fddi/skfp/smt.c if (st) { st 606 drivers/net/fddi/skfp/smt.c (st->st_dupl_addr & SMT_ST_MY_DUPA) ? st 1379 drivers/net/fddi/skfp/smt.c static void smt_fill_mac_status(struct s_smc *smc, struct smt_p_mac_status *st) st 1381 drivers/net/fddi/skfp/smt.c SMTSETPARA(st,SMT_P_MAC_STATUS) ; st 1383 drivers/net/fddi/skfp/smt.c st->st_mib_index = INDEX_MAC ; st 1384 drivers/net/fddi/skfp/smt.c st->st_mac_index = mac_index(smc,1) ; st 1391 drivers/net/fddi/skfp/smt.c st->st_t_req = smc->mib.m[MAC0].fddiMACT_Req ; st 1392 drivers/net/fddi/skfp/smt.c st->st_t_neg = smc->mib.m[MAC0].fddiMACT_Neg ; st 1393 drivers/net/fddi/skfp/smt.c st->st_t_max = smc->mib.m[MAC0].fddiMACT_Max ; st 1394 drivers/net/fddi/skfp/smt.c st->st_tvx_value = smc->mib.m[MAC0].fddiMACTvxValue ; st 1395 drivers/net/fddi/skfp/smt.c st->st_t_min = smc->mib.m[MAC0].fddiMACT_Min ; st 1397 drivers/net/fddi/skfp/smt.c st->st_sba = smc->mib.a[PATH0].fddiPATHSbaPayload ; st 1398 drivers/net/fddi/skfp/smt.c st->st_frame_ct = smc->mib.m[MAC0].fddiMACFrame_Ct ; st 1399 drivers/net/fddi/skfp/smt.c st->st_error_ct = smc->mib.m[MAC0].fddiMACError_Ct ; st 1400 drivers/net/fddi/skfp/smt.c st->st_lost_ct = smc->mib.m[MAC0].fddiMACLost_Ct ; st 282 drivers/net/fddi/skfp/smtdef.c int st ; st 285 drivers/net/fddi/skfp/smtdef.c st = set_min_max(1,smc->mib.m[MAC0].fddiMACTvxValueMIB, st 288 drivers/net/fddi/skfp/smtdef.c st |= set_min_max(0,smc->mib.m[MAC0].fddiMACT_MaxMIB, st 291 drivers/net/fddi/skfp/smtdef.c st |= (st2 = set_min_max(0,smc->mib.m[MAC0].fddiMACT_ReqMIB, st 302 drivers/net/fddi/skfp/smtdef.c return st; st 38 drivers/net/phy/phy.c static const char *phy_state_to_str(enum phy_state st) st 40 drivers/net/phy/phy.c switch (st) { st 277 drivers/net/ppp/ppp_generic.c static void ppp_get_stats(struct ppp *ppp, struct ppp_stats *st); st 3003 drivers/net/ppp/ppp_generic.c ppp_get_stats(struct ppp *ppp, struct ppp_stats *st) st 3007 drivers/net/ppp/ppp_generic.c memset(st, 0, sizeof(*st)); st 3008 drivers/net/ppp/ppp_generic.c st->p.ppp_ipackets = ppp->stats64.rx_packets; st 3009 drivers/net/ppp/ppp_generic.c st->p.ppp_ierrors = ppp->dev->stats.rx_errors; st 3010 drivers/net/ppp/ppp_generic.c st->p.ppp_ibytes = ppp->stats64.rx_bytes; st 3011 drivers/net/ppp/ppp_generic.c st->p.ppp_opackets = ppp->stats64.tx_packets; st 3012 drivers/net/ppp/ppp_generic.c st->p.ppp_oerrors = ppp->dev->stats.tx_errors; st 3013 drivers/net/ppp/ppp_generic.c st->p.ppp_obytes = ppp->stats64.tx_bytes; st 3016 drivers/net/ppp/ppp_generic.c st->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed; st 3017 drivers/net/ppp/ppp_generic.c st->vj.vjs_compressed = vj->sls_o_compressed; st 3018 drivers/net/ppp/ppp_generic.c st->vj.vjs_searches = vj->sls_o_searches; st 3019 drivers/net/ppp/ppp_generic.c st->vj.vjs_misses = vj->sls_o_misses; st 3020 drivers/net/ppp/ppp_generic.c st->vj.vjs_errorin = vj->sls_i_error; st 3021 drivers/net/ppp/ppp_generic.c st->vj.vjs_tossed = vj->sls_i_tossed; st 3022 drivers/net/ppp/ppp_generic.c st->vj.vjs_uncompressedin = vj->sls_i_uncompressed; st 3023 drivers/net/ppp/ppp_generic.c st->vj.vjs_compressedin = vj->sls_i_compressed; st 456 drivers/net/sb1000.c unsigned char st[7]; st 473 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 475 drivers/net/sb1000.c if (st[3] != 0xf0) st 486 drivers/net/sb1000.c unsigned char st[7]; st 490 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 492 drivers/net/sb1000.c if (st[1] != st[3] || st[2] != st[4]) st 502 drivers/net/sb1000.c unsigned char st[7]; st 504 drivers/net/sb1000.c return card_send_command(ioaddr, name, Command0, st); st 513 drivers/net/sb1000.c unsigned char st[7]; st 516 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 518 drivers/net/sb1000.c return card_send_command(ioaddr, name, Command1, st); st 527 drivers/net/sb1000.c unsigned char st[7]; st 531 drivers/net/sb1000.c status = card_send_command(ioaddr, name, Command0, st); st 534 drivers/net/sb1000.c status = card_send_command(ioaddr, name, Command1, st); st 537 drivers/net/sb1000.c if (st[3] != 0xf1) { st 554 drivers/net/sb1000.c unsigned char st[7]; st 559 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 561 drivers/net/sb1000.c if (st[0] != 0xa3) st 563 drivers/net/sb1000.c version[0] = st[1]; st 564 drivers/net/sb1000.c version[1] = st[2]; st 577 drivers/net/sb1000.c unsigned char st[7]; st 583 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 585 drivers/net/sb1000.c *frequency = ((st[1] << 8 | st[2]) << 8 | st[3]) << 8 | st[4]; st 593 drivers/net/sb1000.c unsigned char st[7]; st 616 drivers/net/sb1000.c return card_send_command(ioaddr, name, Command0, st); st 628 drivers/net/sb1000.c unsigned char st[7]; st 635 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 637 drivers/net/sb1000.c PID[0] = st[1] << 8 | st[2]; st 639 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command1, st))) st 641 drivers/net/sb1000.c PID[1] = st[1] << 8 | st[2]; st 643 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command2, st))) st 645 drivers/net/sb1000.c PID[2] = st[1] << 8 | st[2]; st 647 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command3, st))) st 649 drivers/net/sb1000.c PID[3] = st[1] << 8 | st[2]; st 660 drivers/net/sb1000.c unsigned char st[7]; st 676 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command0, st))) st 683 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command1, st))) st 690 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command2, st))) st 697 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command3, st))) st 700 drivers/net/sb1000.c if ((status = card_send_command(ioaddr, name, Command4, st))) st 707 drivers/net/sb1000.c sb1000_print_status_buffer(const char* name, unsigned char st[], st 712 drivers/net/sb1000.c printk(KERN_DEBUG "%s: status: %02x %02x\n", name, st[0], st[1]); st 741 drivers/net/sb1000.c unsigned char st[2], buffer[FRAMESIZE], session_id, frame_id; st 761 drivers/net/sb1000.c insw(ioaddr, (unsigned short*) st, 1); st 763 drivers/net/sb1000.c printk("cm0: received: %02x %02x\n", st[0], st[1]); st 771 drivers/net/sb1000.c if (st[0] == session_id) { st 772 drivers/net/sb1000.c if (st[1] == frame_id || (!frame_id && (st[1] & 0xf0) == 0x30)) { st 774 drivers/net/sb1000.c } else if ((st[1] & 0xf0) == 0x30 && (st[0] & 0x40)) { st 779 drivers/net/sb1000.c } else if (st[0] == (session_id | 0x40)) { st 780 drivers/net/sb1000.c if ((st[1] & 0xf0) == 0x30) { st 794 drivers/net/sb1000.c "expecting %02x %02x\n", dev->name, st[0], st[1], st 802 drivers/net/sb1000.c lp->rx_frame_id[ns] = 0x30 | ((st[1] + 1) & 0x0f); st 804 drivers/net/sb1000.c if (st[0] & 0x40) { st 881 drivers/net/sb1000.c dev->name, st[0], st[1]); st 885 drivers/net/sb1000.c sb1000_print_status_buffer(dev->name, st, buffer, FrameSize); st 904 drivers/net/sb1000.c unsigned char st[5]; st 917 drivers/net/sb1000.c sb1000_read_status(ioaddr, st); st 918 drivers/net/sb1000.c if (st[1] & 0x10) st 1091 drivers/net/sb1000.c unsigned char st; st 1104 drivers/net/sb1000.c st = inb(ioaddr[1] + 6); st 1105 drivers/net/sb1000.c if (!(st & 0x08 && st & 0x20)) { st 1112 drivers/net/sb1000.c st = inb(ioaddr[0] + 7); st 1119 drivers/net/sb1000.c if (st & 0x01) { st 155 drivers/net/wan/hdlc_cisco.c struct cisco_state *st = state(hdlc); st 219 drivers/net/wan/hdlc_cisco.c spin_lock(&st->lock); st 220 drivers/net/wan/hdlc_cisco.c st->rxseq = ntohl(cisco_data->par1); st 222 drivers/net/wan/hdlc_cisco.c if (ack && (ack == st->txseq || st 224 drivers/net/wan/hdlc_cisco.c ack == st->txseq - 1)) { st 225 drivers/net/wan/hdlc_cisco.c st->last_poll = jiffies; st 226 drivers/net/wan/hdlc_cisco.c if (!st->up) { st 235 drivers/net/wan/hdlc_cisco.c st->up = 1; st 238 drivers/net/wan/hdlc_cisco.c spin_unlock(&st->lock); st 259 drivers/net/wan/hdlc_cisco.c struct cisco_state *st = from_timer(st, t, timer); st 260 drivers/net/wan/hdlc_cisco.c struct net_device *dev = st->dev; st 262 drivers/net/wan/hdlc_cisco.c spin_lock(&st->lock); st 263 drivers/net/wan/hdlc_cisco.c if (st->up && st 264 drivers/net/wan/hdlc_cisco.c time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) { st 265 drivers/net/wan/hdlc_cisco.c st->up = 0; st 270 drivers/net/wan/hdlc_cisco.c cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq), st 271 drivers/net/wan/hdlc_cisco.c htonl(st->rxseq)); st 272 drivers/net/wan/hdlc_cisco.c spin_unlock(&st->lock); st 274 drivers/net/wan/hdlc_cisco.c st->timer.expires = jiffies + st->settings.interval * HZ; st 275 drivers/net/wan/hdlc_cisco.c add_timer(&st->timer); st 283 drivers/net/wan/hdlc_cisco.c struct cisco_state *st = state(hdlc); st 286 drivers/net/wan/hdlc_cisco.c spin_lock_irqsave(&st->lock, flags); st 287 drivers/net/wan/hdlc_cisco.c st->up = st->txseq = st->rxseq = 0; st 288 drivers/net/wan/hdlc_cisco.c spin_unlock_irqrestore(&st->lock, flags); st 290 drivers/net/wan/hdlc_cisco.c st->dev = dev; st 291 drivers/net/wan/hdlc_cisco.c timer_setup(&st->timer, cisco_timer, 0); st 292 drivers/net/wan/hdlc_cisco.c st->timer.expires = jiffies + HZ; /* First poll after 1 s */ st 293 drivers/net/wan/hdlc_cisco.c add_timer(&st->timer); st 301 drivers/net/wan/hdlc_cisco.c struct cisco_state *st = state(hdlc); st 304 drivers/net/wan/hdlc_cisco.c del_timer_sync(&st->timer); st 306 drivers/net/wan/hdlc_cisco.c spin_lock_irqsave(&st->lock, flags); st 308 drivers/net/wan/hdlc_cisco.c st->up = st->txseq = 0; st 309 drivers/net/wan/hdlc_cisco.c spin_unlock_irqrestore(&st->lock, flags); st 600 drivers/net/wan/hdlc_fr.c struct frad_state *st = from_timer(st, t, timer); st 601 drivers/net/wan/hdlc_fr.c struct net_device *dev = st->dev; st 549 drivers/net/wireless/ath/ath5k/debug.c struct ath5k_statistics *st = &ah->stats; st 557 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_crc, st 558 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 559 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_crc * 100 / st->rx_all_count : 0); st 561 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_phy, st 562 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 563 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_phy * 100 / st->rx_all_count : 0); st 565 drivers/net/wireless/ath/ath5k/debug.c if (st->rxerr_phy_code[i]) st 568 drivers/net/wireless/ath/ath5k/debug.c i, st->rxerr_phy_code[i]); st 572 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_fifo, st 573 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 574 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_fifo * 100 / st->rx_all_count : 0); st 576 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_decrypt, st 577 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 578 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_decrypt * 100 / st->rx_all_count : 0); st 580 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_mic, st 581 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 582 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_mic * 100 / st->rx_all_count : 0); st 584 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_proc, st 585 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 586 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_proc * 100 / st->rx_all_count : 0); st 588 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_jumbo, st 589 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count > 0 ? st 590 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_jumbo * 100 / st->rx_all_count : 0); st 592 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count); st 594 drivers/net/wireless/ath/ath5k/debug.c st->rx_bytes_count); st 599 drivers/net/wireless/ath/ath5k/debug.c st->txerr_retry, st 600 drivers/net/wireless/ath/ath5k/debug.c st->tx_all_count > 0 ? st 601 drivers/net/wireless/ath/ath5k/debug.c st->txerr_retry * 100 / st->tx_all_count : 0); st 603 drivers/net/wireless/ath/ath5k/debug.c st->txerr_fifo, st 604 drivers/net/wireless/ath/ath5k/debug.c st->tx_all_count > 0 ? st 605 drivers/net/wireless/ath/ath5k/debug.c st->txerr_fifo * 100 / st->tx_all_count : 0); st 607 drivers/net/wireless/ath/ath5k/debug.c st->txerr_filt, st 608 drivers/net/wireless/ath/ath5k/debug.c st->tx_all_count > 0 ? st 609 drivers/net/wireless/ath/ath5k/debug.c st->txerr_filt * 100 / st->tx_all_count : 0); st 611 drivers/net/wireless/ath/ath5k/debug.c st->tx_all_count); st 613 drivers/net/wireless/ath/ath5k/debug.c st->tx_bytes_count); st 626 drivers/net/wireless/ath/ath5k/debug.c struct ath5k_statistics *st = &ah->stats; st 635 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_crc = 0; st 636 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_phy = 0; st 637 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_fifo = 0; st 638 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_decrypt = 0; st 639 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_mic = 0; st 640 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_proc = 0; st 641 drivers/net/wireless/ath/ath5k/debug.c st->rxerr_jumbo = 0; st 642 drivers/net/wireless/ath/ath5k/debug.c st->rx_all_count = 0; st 643 drivers/net/wireless/ath/ath5k/debug.c st->txerr_retry = 0; st 644 drivers/net/wireless/ath/ath5k/debug.c st->txerr_fifo = 0; st 645 drivers/net/wireless/ath/ath5k/debug.c st->txerr_filt = 0; st 646 drivers/net/wireless/ath/ath5k/debug.c st->tx_all_count = 0; st 667 drivers/net/wireless/ath/ath5k/debug.c struct ath5k_statistics *st = &ah->stats; st 721 drivers/net/wireless/ath/ath5k/debug.c st->mib_intr); st 1113 drivers/net/wireless/ath/ath6kl/txrx.c u16 idx, st, cur, end; st 1135 drivers/net/wireless/ath/ath6kl/txrx.c st = rxtid->seq_next; st 1137 drivers/net/wireless/ath/ath6kl/txrx.c end = (st + rxtid->hold_q_sz-1) & ATH6KL_MAX_SEQ_NO; st 1139 drivers/net/wireless/ath/ath6kl/txrx.c if (((st < end) && (cur < st || cur > end)) || st 1140 drivers/net/wireless/ath/ath6kl/txrx.c ((st > end) && (cur > end) && (cur < st))) { st 1162 drivers/net/wireless/ath/ath6kl/txrx.c st = cur - (rxtid->hold_q_sz - 1); st 1164 drivers/net/wireless/ath/ath6kl/txrx.c st = ATH6KL_MAX_SEQ_NO - st 1167 drivers/net/wireless/ath/ath6kl/txrx.c aggr_deque_frms(agg_conn, tid, st, 0); st 544 drivers/net/wireless/ath/wil6210/txrx_edma.c struct wil_rx_status_extended *st; st 555 drivers/net/wireless/ath/wil6210/txrx_edma.c st = wil_skb_rxstatus(skb); st 557 drivers/net/wireless/ath/wil6210/txrx_edma.c cid = wil_rx_status_get_cid(st); st 558 drivers/net/wireless/ath/wil6210/txrx_edma.c tid = wil_rx_status_get_tid(st); st 559 drivers/net/wireless/ath/wil6210/txrx_edma.c key_id = wil_rx_status_get_key_id(st); st 560 drivers/net/wireless/ath/wil6210/txrx_edma.c mc = wil_rx_status_get_mcast(st); st 564 drivers/net/wireless/ath/wil6210/txrx_edma.c pn = (u8 *)&st->ext.pn_15_0; st 108 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c enum nvram_parser_state st = nvp->state; st 115 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c st = COMMENT; st 117 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c st = VALUE; st 132 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c return st; st 450 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c struct mt76x02_tx_status *st, int n_frames) st 455 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c int retry = st->retry; st 462 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c phy = FIELD_GET(MT_RXWI_RATE_PHY, st->rate); st 464 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c if (st->pktid & MT_PACKET_ID_HAS_RATE) { st 465 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c first_rate = st->rate & ~MT_RXWI_RATE_INDEX; st 466 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c first_rate |= st->pktid & MT_RXWI_RATE_INDEX; st 478 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c mt76x02_mac_process_tx_rate(&last_rate, st->rate, st 500 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c info->status.ampdu_ack_len = st->success ? n_frames : 0; st 502 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c if (st->aggr) st 506 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c if (!st->ack_req) st 508 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c else if (st->success) st 67 drivers/net/wireless/mediatek/mt7601u/mac.c struct mt76_tx_status *st) st 73 drivers/net/wireless/mediatek/mt7601u/mac.c last_rate = min_t(int, st->retry, IEEE80211_TX_MAX_RATES - 1); st 74 drivers/net/wireless/mediatek/mt7601u/mac.c mt76_mac_process_tx_rate(&rate[last_rate], st->rate); st 78 drivers/net/wireless/mediatek/mt7601u/mac.c cur_idx = rate[last_rate].idx + st->retry; st 86 drivers/net/wireless/mediatek/mt7601u/mac.c rate[last_rate - 1].count = st->retry + 1 - last_rate; st 89 drivers/net/wireless/mediatek/mt7601u/mac.c info->status.ampdu_ack_len = st->success; st 91 drivers/net/wireless/mediatek/mt7601u/mac.c if (st->is_probe) st 94 drivers/net/wireless/mediatek/mt7601u/mac.c if (st->aggr) st 98 drivers/net/wireless/mediatek/mt7601u/mac.c if (!st->ack_req) st 100 drivers/net/wireless/mediatek/mt7601u/mac.c else if (st->success) st 1655 drivers/net/wireless/realtek/rtlwifi/base.c u8 st, retry; st 1659 drivers/net/wireless/realtek/rtlwifi/base.c st = GET_TX_REPORT_ST_V2(tmp_buf); st 1663 drivers/net/wireless/realtek/rtlwifi/base.c st = GET_TX_REPORT_ST_V1(tmp_buf); st 1673 drivers/net/wireless/realtek/rtlwifi/base.c rtl_tx_status(hw, skb, st == 0); st 1679 drivers/net/wireless/realtek/rtlwifi/base.c st, sn, retry); st 202 drivers/net/wireless/realtek/rtw88/tx.c u8 sn, st; st 208 drivers/net/wireless/realtek/rtw88/tx.c st = GET_CCX_REPORT_STATUS(c2h->payload); st 215 drivers/net/wireless/realtek/rtw88/tx.c rtw_tx_report_tx_status(rtwdev, cur, st == 0); st 105 drivers/net/xen-netback/netback.c s8 st); st 1377 drivers/net/xen-netback/netback.c s8 st) st 1384 drivers/net/xen-netback/netback.c resp->status = st; st 236 drivers/pinctrl/actions/pinctrl-owl.c if (!info->st) st 238 drivers/pinctrl/actions/pinctrl-owl.c *reg = info->st->reg; st 239 drivers/pinctrl/actions/pinctrl-owl.c *bit = info->st->shift; st 240 drivers/pinctrl/actions/pinctrl-owl.c *width = info->st->width; st 102 drivers/pinctrl/actions/pinctrl-owl.h .st = NULL, \ st 109 drivers/pinctrl/actions/pinctrl-owl.h .st = &name##_st_conf, \ st 116 drivers/pinctrl/actions/pinctrl-owl.h .st = NULL, \ st 123 drivers/pinctrl/actions/pinctrl-owl.h .st = &name##_st_conf, \ st 237 drivers/pinctrl/actions/pinctrl-owl.h struct owl_st *st; st 157 drivers/power/supply/adp5061.c static int adp5061_get_status(struct adp5061_state *st, st 164 drivers/power/supply/adp5061.c ret = regmap_bulk_read(st->regmap, ADP5061_CHG_STATUS_1, st 175 drivers/power/supply/adp5061.c static int adp5061_get_input_current_limit(struct adp5061_state *st, st 181 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_VINX_SET, ®val); st 191 drivers/power/supply/adp5061.c static int adp5061_set_input_current_limit(struct adp5061_state *st, int val) st 203 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_VINX_SET, st 208 drivers/power/supply/adp5061.c static int adp5061_set_min_voltage(struct adp5061_state *st, int val) st 220 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_VOLTAGE_TH, st 225 drivers/power/supply/adp5061.c static int adp5061_get_min_voltage(struct adp5061_state *st, st 231 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_VOLTAGE_TH, ®val); st 241 drivers/power/supply/adp5061.c static int adp5061_get_chg_volt_lim(struct adp5061_state *st, st 247 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_TERM_SET, ®val); st 257 drivers/power/supply/adp5061.c static int adp5061_get_max_voltage(struct adp5061_state *st, st 263 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_TERM_SET, ®val); st 276 drivers/power/supply/adp5061.c static int adp5061_set_max_voltage(struct adp5061_state *st, int val) st 292 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_TERM_SET, st 297 drivers/power/supply/adp5061.c static int adp5061_set_const_chg_vmax(struct adp5061_state *st, int val) st 309 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_TERM_SET, st 314 drivers/power/supply/adp5061.c static int adp5061_set_const_chg_current(struct adp5061_state *st, int val) st 330 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_CHG_CURR, st 335 drivers/power/supply/adp5061.c static int adp5061_get_const_chg_current(struct adp5061_state *st, st 341 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_CHG_CURR, ®val); st 354 drivers/power/supply/adp5061.c static int adp5061_get_prechg_current(struct adp5061_state *st, st 360 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_CHG_CURR, ®val); st 370 drivers/power/supply/adp5061.c static int adp5061_set_prechg_current(struct adp5061_state *st, int val) st 382 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_CHG_CURR, st 387 drivers/power/supply/adp5061.c static int adp5061_get_vweak_th(struct adp5061_state *st, st 393 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_VOLTAGE_TH, ®val); st 403 drivers/power/supply/adp5061.c static int adp5061_set_vweak_th(struct adp5061_state *st, int val) st 415 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_VOLTAGE_TH, st 420 drivers/power/supply/adp5061.c static int adp5061_get_chg_type(struct adp5061_state *st, st 426 drivers/power/supply/adp5061.c ret = adp5061_get_status(st, &status1, &status2); st 439 drivers/power/supply/adp5061.c static int adp5061_get_charger_status(struct adp5061_state *st, st 445 drivers/power/supply/adp5061.c ret = adp5061_get_status(st, &status1, &status2); st 472 drivers/power/supply/adp5061.c static int adp5061_get_battery_status(struct adp5061_state *st, st 478 drivers/power/supply/adp5061.c ret = adp5061_get_status(st, &status1, &status2); st 501 drivers/power/supply/adp5061.c static int adp5061_get_termination_current(struct adp5061_state *st, st 507 drivers/power/supply/adp5061.c ret = regmap_read(st->regmap, ADP5061_IEND, ®val); st 517 drivers/power/supply/adp5061.c static int adp5061_set_termination_current(struct adp5061_state *st, int val) st 527 drivers/power/supply/adp5061.c return regmap_update_bits(st->regmap, ADP5061_IEND, st 536 drivers/power/supply/adp5061.c struct adp5061_state *st = power_supply_get_drvdata(psy); st 542 drivers/power/supply/adp5061.c ret = adp5061_get_status(st, &status1, &status2); st 553 drivers/power/supply/adp5061.c return adp5061_get_chg_type(st, val); st 558 drivers/power/supply/adp5061.c return adp5061_get_input_current_limit(st, val); st 563 drivers/power/supply/adp5061.c return adp5061_get_max_voltage(st, val); st 569 drivers/power/supply/adp5061.c return adp5061_get_min_voltage(st, val); st 574 drivers/power/supply/adp5061.c return adp5061_get_chg_volt_lim(st, val); st 580 drivers/power/supply/adp5061.c return adp5061_get_const_chg_current(st, val); st 586 drivers/power/supply/adp5061.c return adp5061_get_prechg_current(st, val); st 593 drivers/power/supply/adp5061.c return adp5061_get_vweak_th(st, val); st 599 drivers/power/supply/adp5061.c return adp5061_get_charger_status(st, val); st 605 drivers/power/supply/adp5061.c return adp5061_get_battery_status(st, val); st 608 drivers/power/supply/adp5061.c return adp5061_get_termination_current(st, val); st 620 drivers/power/supply/adp5061.c struct adp5061_state *st = power_supply_get_drvdata(psy); st 624 drivers/power/supply/adp5061.c return adp5061_set_input_current_limit(st, val->intval); st 626 drivers/power/supply/adp5061.c return adp5061_set_max_voltage(st, val->intval); st 628 drivers/power/supply/adp5061.c return adp5061_set_min_voltage(st, val->intval); st 630 drivers/power/supply/adp5061.c return adp5061_set_const_chg_vmax(st, val->intval); st 632 drivers/power/supply/adp5061.c return adp5061_set_const_chg_current(st, val->intval); st 634 drivers/power/supply/adp5061.c return adp5061_set_prechg_current(st, val->intval); st 636 drivers/power/supply/adp5061.c return adp5061_set_vweak_th(st, val->intval); st 638 drivers/power/supply/adp5061.c return adp5061_set_termination_current(st, val->intval); st 698 drivers/power/supply/adp5061.c struct adp5061_state *st; st 700 drivers/power/supply/adp5061.c st = devm_kzalloc(&client->dev, sizeof(*st), GFP_KERNEL); st 701 drivers/power/supply/adp5061.c if (!st) st 704 drivers/power/supply/adp5061.c st->client = client; st 705 drivers/power/supply/adp5061.c st->regmap = devm_regmap_init_i2c(client, st 707 drivers/power/supply/adp5061.c if (IS_ERR(st->regmap)) { st 712 drivers/power/supply/adp5061.c i2c_set_clientdata(client, st); st 713 drivers/power/supply/adp5061.c psy_cfg.drv_data = st; st 715 drivers/power/supply/adp5061.c st->psy = devm_power_supply_register(&client->dev, st 719 drivers/power/supply/adp5061.c if (IS_ERR(st->psy)) { st 721 drivers/power/supply/adp5061.c return PTR_ERR(st->psy); st 492 drivers/regulator/tps62360-regulator.c int st; st 498 drivers/regulator/tps62360-regulator.c st = regmap_update_bits(tps->regmap, REG_RAMPCTRL, BIT(2), BIT(2)); st 499 drivers/regulator/tps62360-regulator.c if (st < 0) st 502 drivers/regulator/tps62360-regulator.c __func__, REG_RAMPCTRL, st); st 86 drivers/s390/cio/chsc.c u8 st : 3; /* subchannel type */ st 135 drivers/s390/cio/chsc.c if ((ssd_area->st != SUBCHANNEL_TYPE_IO) && st 136 drivers/s390/cio/chsc.c (ssd_area->st != SUBCHANNEL_TYPE_MSG)) st 620 drivers/s390/cio/cio.c if ((schib.pmcw.st == SUBCHANNEL_TYPE_IO) && schib.pmcw.dnv && st 638 drivers/s390/cio/cio.c (schib.pmcw.st != SUBCHANNEL_TYPE_IO) || !schib.pmcw.dnv) st 39 drivers/s390/cio/cio.h u32 st : 3; /* subchannel type */ st 104 drivers/s390/cio/cio.h } st; /* subchannel type */ st 180 drivers/s390/cio/css.c switch (schib->pmcw.st) { st 200 drivers/s390/cio/css.c schid.ssid, schid.sch_no, schib->pmcw.st); st 221 drivers/s390/cio/css.c sch->st = schib->pmcw.st; st 317 drivers/s390/cio/css.c return sprintf(buf, "%01x\n", sch->st); st 327 drivers/s390/cio/css.c return sprintf(buf, "css:t%01X\n", sch->st); st 449 drivers/s390/cio/css.c if (sch->st == SUBCHANNEL_TYPE_IO) st 525 drivers/s390/cio/css.c if ((schib->pmcw.st == SUBCHANNEL_TYPE_IO) && !schib->pmcw.dnv) st 527 drivers/s390/cio/css.c if ((schib->pmcw.st == SUBCHANNEL_TYPE_MSG) && !schib->pmcw.w) st 1412 drivers/s390/cio/css.c if (sch->st == id->type) st 1457 drivers/s390/cio/css.c ret = add_uevent_var(env, "ST=%01X", sch->st); st 1460 drivers/s390/cio/css.c ret = add_uevent_var(env, "MODALIAS=css:t%01X", sch->st); st 126 drivers/s390/net/fsm.c int st = atomic_read(&fi->state); st 127 drivers/s390/net/fsm.c if (st >= fi->f->nr_states) st 129 drivers/s390/net/fsm.c return fi->f->state_names[st]; st 121 drivers/scsi/aha1740.h st:1, /* Suppress Transfer */ st 1385 drivers/scsi/arm/fas216.c #define STATE(st,ph) ((ph) << 3 | (st)) st 187 drivers/scsi/bfa/bfa_cs.h #define bfa_sm_state_decl(oc, st, otype, etype) \ st 188 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event) st 216 drivers/scsi/bfa/bfa_cs.h #define bfa_fsm_state_decl(oc, st, otype, etype) \ st 217 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st(otype * fsm, etype event); \ st 218 drivers/scsi/bfa/bfa_cs.h static void oc ## _sm_ ## st ## _entry(otype * fsm) st 426 drivers/scsi/device_handler/scsi_dh_emc.c unsigned int hr = 0, st = 0, argc; st 435 drivers/scsi/device_handler/scsi_dh_emc.c if ((sscanf(p, "%u", &st) != 1) || (st > 1)) st 443 drivers/scsi/device_handler/scsi_dh_emc.c if (st) st 2347 drivers/scsi/libfc/fc_exch.c struct fc_host_statistics *st; st 2351 drivers/scsi/libfc/fc_exch.c st = &lport->host_stats; st 2355 drivers/scsi/libfc/fc_exch.c st->fc_no_free_exch += atomic_read(&mp->stats.no_free_exch); st 2356 drivers/scsi/libfc/fc_exch.c st->fc_no_free_exch_xid += st 2358 drivers/scsi/libfc/fc_exch.c st->fc_xid_not_found += atomic_read(&mp->stats.xid_not_found); st 2359 drivers/scsi/libfc/fc_exch.c st->fc_xid_busy += atomic_read(&mp->stats.xid_busy); st 2360 drivers/scsi/libfc/fc_exch.c st->fc_seq_not_found += atomic_read(&mp->stats.seq_not_found); st 2361 drivers/scsi/libfc/fc_exch.c st->fc_non_bls_resp += atomic_read(&mp->stats.non_bls_resp); st 1349 drivers/scsi/mpt3sas/mpt3sas_base.c struct scsiio_tracker *st; st 1352 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); st 1353 drivers/scsi/mpt3sas/mpt3sas_base.c if (st) st 1354 drivers/scsi/mpt3sas/mpt3sas_base.c cb_idx = st->cb_idx; st 1835 drivers/scsi/mpt3sas/mpt3sas_base.c struct scsiio_tracker *st = scsi_cmd_priv(scmd); st 1836 drivers/scsi/mpt3sas/mpt3sas_base.c u16 smid = st->smid; st 3595 drivers/scsi/mpt3sas/mpt3sas_base.c struct scsiio_tracker *st) st 3597 drivers/scsi/mpt3sas/mpt3sas_base.c if (WARN_ON(st->smid == 0)) st 3599 drivers/scsi/mpt3sas/mpt3sas_base.c st->cb_idx = 0xFF; st 3600 drivers/scsi/mpt3sas/mpt3sas_base.c st->direct_io = 0; st 3601 drivers/scsi/mpt3sas/mpt3sas_base.c st->scmd = NULL; st 3602 drivers/scsi/mpt3sas/mpt3sas_base.c atomic_set(&ioc->chain_lookup[st->smid - 1].chain_offset, 0); st 3603 drivers/scsi/mpt3sas/mpt3sas_base.c st->smid = 0; st 3618 drivers/scsi/mpt3sas/mpt3sas_base.c struct scsiio_tracker *st; st 3621 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); st 3622 drivers/scsi/mpt3sas/mpt3sas_base.c if (!st) { st 3631 drivers/scsi/mpt3sas/mpt3sas_base.c mpt3sas_base_clear_st(ioc, st); st 3711 drivers/scsi/mpt3sas/mpt3sas_base.c struct scsiio_tracker *st = NULL; st 3714 drivers/scsi/mpt3sas/mpt3sas_base.c st = _get_st_from_smid(ioc, smid); st 3716 drivers/scsi/mpt3sas/mpt3sas_base.c if (st == NULL) st 3719 drivers/scsi/mpt3sas/mpt3sas_base.c st->msix_io = ioc->get_msix_index_for_smlio(ioc, st->scmd); st 3720 drivers/scsi/mpt3sas/mpt3sas_base.c return st->msix_io; st 1511 drivers/scsi/mpt3sas/mpt3sas_base.h struct scsiio_tracker *st); st 586 drivers/scsi/mpt3sas/mpt3sas_ctl.c struct scsiio_tracker *st; st 598 drivers/scsi/mpt3sas/mpt3sas_ctl.c st = scsi_cmd_priv(scmd); st 605 drivers/scsi/mpt3sas/mpt3sas_ctl.c if (!tm_request->TaskMID || tm_request->TaskMID == st->smid) { st 606 drivers/scsi/mpt3sas/mpt3sas_ctl.c tm_request->TaskMID = cpu_to_le16(st->smid); st 1477 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct scsiio_tracker *st; st 1497 drivers/scsi/mpt3sas/mpt3sas_scsih.c st = scsi_cmd_priv(scmd); st 1498 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (st->cb_idx == 0xFF || st->smid == 0) st 2872 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct scsiio_tracker *st = scsi_cmd_priv(scmd); st 2894 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (st == NULL || st->cb_idx == 0xFF) { st 2918 drivers/scsi/mpt3sas/mpt3sas_scsih.c st->smid, st->msix_io, timeout, 0); st 2920 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (r == SUCCESS && st->cb_idx != 0xFF) st 4515 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct scsiio_tracker *st; st 4525 drivers/scsi/mpt3sas/mpt3sas_scsih.c st = scsi_cmd_priv(scmd); st 4526 drivers/scsi/mpt3sas/mpt3sas_scsih.c mpt3sas_base_clear_st(ioc, st); st 5213 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct scsiio_tracker *st; st 5249 drivers/scsi/mpt3sas/mpt3sas_scsih.c st = scsi_cmd_priv(scmd); st 5250 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (st->direct_io && st 5253 drivers/scsi/mpt3sas/mpt3sas_scsih.c st->direct_io = 0; st 5254 drivers/scsi/mpt3sas/mpt3sas_scsih.c st->scmd = scmd; st 7371 drivers/scsi/mpt3sas/mpt3sas_scsih.c struct scsiio_tracker *st; st 7414 drivers/scsi/mpt3sas/mpt3sas_scsih.c st = scsi_cmd_priv(scmd); st 7441 drivers/scsi/mpt3sas/mpt3sas_scsih.c MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK, st->smid, st 7442 drivers/scsi/mpt3sas/mpt3sas_scsih.c st->msix_io, 30, 0); st 7482 drivers/scsi/mpt3sas/mpt3sas_scsih.c MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, st->smid, st 7483 drivers/scsi/mpt3sas/mpt3sas_scsih.c st->msix_io, 30, 0); st 7484 drivers/scsi/mpt3sas/mpt3sas_scsih.c if (r == FAILED || st->cb_idx != 0xFF) { st 262 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c struct scsiio_tracker *st = scsi_cmd_priv(scmd); st 298 drivers/scsi/mpt3sas/mpt3sas_warpdrive.c st->direct_io = 1; st 44 drivers/scsi/mvumi.c static void tag_init(struct mvumi_tag *st, unsigned short size) st 47 drivers/scsi/mvumi.c BUG_ON(size != st->size); st 48 drivers/scsi/mvumi.c st->top = size; st 50 drivers/scsi/mvumi.c st->stack[i] = size - 1 - i; st 53 drivers/scsi/mvumi.c static unsigned short tag_get_one(struct mvumi_hba *mhba, struct mvumi_tag *st) st 55 drivers/scsi/mvumi.c BUG_ON(st->top <= 0); st 56 drivers/scsi/mvumi.c return st->stack[--st->top]; st 59 drivers/scsi/mvumi.c static void tag_release_one(struct mvumi_hba *mhba, struct mvumi_tag *st, st 62 drivers/scsi/mvumi.c BUG_ON(st->top >= st->size); st 63 drivers/scsi/mvumi.c st->stack[st->top++] = tag; st 66 drivers/scsi/mvumi.c static bool tag_is_empty(struct mvumi_tag *st) st 68 drivers/scsi/mvumi.c if (st->top == 0) st 4402 drivers/scsi/qla2xxx/qla_init.c char *st, *en; st 4413 drivers/scsi/qla2xxx/qla_init.c st = en = ha->model_number; st 4415 drivers/scsi/qla2xxx/qla_init.c while (en > st) { st 106 drivers/scsi/snic/snic_disc.h #define starget_to_tgt(st) \ st 107 drivers/scsi/snic/snic_disc.h (is_snic_target(((struct scsi_target *) st)->dev.parent) ? \ st 108 drivers/scsi/snic/snic_disc.h dev_to_tgt(st->dev.parent) : NULL) st 979 drivers/scsi/snic/snic_scsi.c struct snic_stats *st = &snic->s_stats; st 986 drivers/scsi/snic/snic_scsi.c act_ios = atomic64_read(&st->io.active); st 987 drivers/scsi/snic/snic_scsi.c atomic64_add(act_ios, &st->io.compl); st 988 drivers/scsi/snic/snic_scsi.c atomic64_sub(act_ios, &st->io.active); st 990 drivers/scsi/snic/snic_scsi.c act_fwreqs = atomic64_read(&st->fw.actv_reqs); st 991 drivers/scsi/snic/snic_scsi.c atomic64_sub(act_fwreqs, &st->fw.actv_reqs); st 533 drivers/soc/qcom/rpmh-rsc.c int i, ret, n, st = 0; st 592 drivers/soc/qcom/rpmh-rsc.c if (st + tcs->num_tcs > max_tcs || st 593 drivers/soc/qcom/rpmh-rsc.c st + tcs->num_tcs >= BITS_PER_BYTE * sizeof(tcs->mask)) st 596 drivers/soc/qcom/rpmh-rsc.c tcs->mask = ((1 << tcs->num_tcs) - 1) << st; st 597 drivers/soc/qcom/rpmh-rsc.c tcs->offset = st; st 598 drivers/soc/qcom/rpmh-rsc.c st += tcs->num_tcs; st 614 drivers/soc/qcom/rpmh-rsc.c drv->num_tcs = st; st 160 drivers/soc/renesas/rcar-sysc.c unsigned int st; st 162 drivers/soc/renesas/rcar-sysc.c st = ioread32(rcar_sysc_base + sysc_ch->chan_offs + PWRSR_OFFS); st 163 drivers/soc/renesas/rcar-sysc.c if (st & BIT(sysc_ch->chan_bit)) st 38 drivers/spi/spi-tle62x0.c static inline int tle62x0_write(struct tle62x0_state *st) st 40 drivers/spi/spi-tle62x0.c unsigned char *buff = st->tx_buff; st 41 drivers/spi/spi-tle62x0.c unsigned int gpio_state = st->gpio_state; st 45 drivers/spi/spi-tle62x0.c if (st->nr_gpio == 16) { st 52 drivers/spi/spi-tle62x0.c dev_dbg(&st->us->dev, "buff %3ph\n", buff); st 54 drivers/spi/spi-tle62x0.c return spi_write(st->us, buff, (st->nr_gpio == 16) ? 3 : 2); st 57 drivers/spi/spi-tle62x0.c static inline int tle62x0_read(struct tle62x0_state *st) st 59 drivers/spi/spi-tle62x0.c unsigned char *txbuff = st->tx_buff; st 62 drivers/spi/spi-tle62x0.c .rx_buf = st->rx_buff, st 63 drivers/spi/spi-tle62x0.c .len = (st->nr_gpio * 2) / 8, st 75 drivers/spi/spi-tle62x0.c return spi_sync(st->us, &msg); st 99 drivers/spi/spi-tle62x0.c struct tle62x0_state *st = dev_get_drvdata(dev); st 101 drivers/spi/spi-tle62x0.c unsigned char *buff = st->rx_buff; st 106 drivers/spi/spi-tle62x0.c mutex_lock(&st->lock); st 107 drivers/spi/spi-tle62x0.c ret = tle62x0_read(st); st 110 drivers/spi/spi-tle62x0.c mutex_unlock(&st->lock); st 114 drivers/spi/spi-tle62x0.c for (ptr = 0; ptr < (st->nr_gpio * 2)/8; ptr += 1) { st 121 drivers/spi/spi-tle62x0.c for (ptr = 0; ptr < st->nr_gpio; ptr++) { st 127 drivers/spi/spi-tle62x0.c mutex_unlock(&st->lock); st 136 drivers/spi/spi-tle62x0.c struct tle62x0_state *st = dev_get_drvdata(dev); st 140 drivers/spi/spi-tle62x0.c mutex_lock(&st->lock); st 141 drivers/spi/spi-tle62x0.c value = (st->gpio_state >> gpio_num) & 1; st 142 drivers/spi/spi-tle62x0.c mutex_unlock(&st->lock); st 151 drivers/spi/spi-tle62x0.c struct tle62x0_state *st = dev_get_drvdata(dev); st 162 drivers/spi/spi-tle62x0.c mutex_lock(&st->lock); st 165 drivers/spi/spi-tle62x0.c st->gpio_state |= 1 << gpio_num; st 167 drivers/spi/spi-tle62x0.c st->gpio_state &= ~(1 << gpio_num); st 169 drivers/spi/spi-tle62x0.c tle62x0_write(st); st 170 drivers/spi/spi-tle62x0.c mutex_unlock(&st->lock); st 241 drivers/spi/spi-tle62x0.c struct tle62x0_state *st; st 252 drivers/spi/spi-tle62x0.c st = kzalloc(sizeof(struct tle62x0_state), GFP_KERNEL); st 253 drivers/spi/spi-tle62x0.c if (st == NULL) st 256 drivers/spi/spi-tle62x0.c st->us = spi; st 257 drivers/spi/spi-tle62x0.c st->nr_gpio = pdata->gpio_count; st 258 drivers/spi/spi-tle62x0.c st->gpio_state = pdata->init_state; st 260 drivers/spi/spi-tle62x0.c mutex_init(&st->lock); st 277 drivers/spi/spi-tle62x0.c spi_set_drvdata(spi, st); st 287 drivers/spi/spi-tle62x0.c kfree(st); st 293 drivers/spi/spi-tle62x0.c struct tle62x0_state *st = spi_get_drvdata(spi); st 296 drivers/spi/spi-tle62x0.c for (ptr = 0; ptr < st->nr_gpio; ptr++) st 300 drivers/spi/spi-tle62x0.c kfree(st); st 33 drivers/staging/fwserial/fwserial.h #define fwtty_profile_data(st, n) st 156 drivers/staging/iio/accel/adis16203.c struct adis *st = iio_priv(indio_dev); st 160 drivers/staging/iio/accel/adis16203.c return adis_write_reg_16(st, addr, val & 0x3FFF); st 168 drivers/staging/iio/accel/adis16203.c struct adis *st = iio_priv(indio_dev); st 204 drivers/staging/iio/accel/adis16203.c ret = adis_read_reg_16(st, addr, &val16); st 262 drivers/staging/iio/accel/adis16203.c struct adis *st; st 265 drivers/staging/iio/accel/adis16203.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 268 drivers/staging/iio/accel/adis16203.c st = iio_priv(indio_dev); st 279 drivers/staging/iio/accel/adis16203.c ret = adis_init(st, indio_dev, spi, &adis16203_data); st 283 drivers/staging/iio/accel/adis16203.c ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); st 288 drivers/staging/iio/accel/adis16203.c ret = adis_initial_startup(st); st 299 drivers/staging/iio/accel/adis16203.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 306 drivers/staging/iio/accel/adis16203.c struct adis *st = iio_priv(indio_dev); st 309 drivers/staging/iio/accel/adis16203.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 208 drivers/staging/iio/accel/adis16240.c struct adis *st = iio_priv(indio_dev); st 214 drivers/staging/iio/accel/adis16240.c ret = adis_read_reg_16(st, st 220 drivers/staging/iio/accel/adis16240.c adis_check_status(st); st 250 drivers/staging/iio/accel/adis16240.c struct adis *st = iio_priv(indio_dev); st 289 drivers/staging/iio/accel/adis16240.c ret = adis_read_reg_16(st, addr, &val16); st 296 drivers/staging/iio/accel/adis16240.c ret = adis_read_reg_16(st, addr, &val16); st 311 drivers/staging/iio/accel/adis16240.c struct adis *st = iio_priv(indio_dev); st 317 drivers/staging/iio/accel/adis16240.c return adis_write_reg_16(st, addr, val & GENMASK(9, 0)); st 385 drivers/staging/iio/accel/adis16240.c struct adis *st; st 389 drivers/staging/iio/accel/adis16240.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 392 drivers/staging/iio/accel/adis16240.c st = iio_priv(indio_dev); st 403 drivers/staging/iio/accel/adis16240.c ret = adis_init(st, indio_dev, spi, &adis16240_data); st 406 drivers/staging/iio/accel/adis16240.c ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); st 411 drivers/staging/iio/accel/adis16240.c ret = adis_initial_startup(st); st 420 drivers/staging/iio/accel/adis16240.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 427 drivers/staging/iio/accel/adis16240.c struct adis *st = iio_priv(indio_dev); st 430 drivers/staging/iio/accel/adis16240.c adis_cleanup_buffer_and_trigger(st, indio_dev); st 183 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd); st 185 drivers/staging/iio/adc/ad7192.c st->conf &= ~AD7192_CONF_CHAN_MASK; st 186 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_CHAN(channel); st 188 drivers/staging/iio/adc/ad7192.c return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf); st 194 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = ad_sigma_delta_to_ad7192(sd); st 196 drivers/staging/iio/adc/ad7192.c st->mode &= ~AD7192_MODE_SEL_MASK; st 197 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_SEL(mode); st 199 drivers/staging/iio/adc/ad7192.c return ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); st 221 drivers/staging/iio/adc/ad7192.c static int ad7192_calibrate_all(struct ad7192_state *st) st 223 drivers/staging/iio/adc/ad7192.c return ad_sd_calibrate_all(&st->sd, ad7192_calib_arr, st 233 drivers/staging/iio/adc/ad7192.c static int ad7192_of_clock_select(struct ad7192_state *st) st 235 drivers/staging/iio/adc/ad7192.c struct device_node *np = st->sd.spi->dev.of_node; st 241 drivers/staging/iio/adc/ad7192.c if (PTR_ERR(st->mclk) == -ENOENT) { st 254 drivers/staging/iio/adc/ad7192.c static int ad7192_setup(struct ad7192_state *st, struct device_node *np) st 256 drivers/staging/iio/adc/ad7192.c struct iio_dev *indio_dev = spi_get_drvdata(st->sd.spi); st 263 drivers/staging/iio/adc/ad7192.c ret = ad_sd_reset(&st->sd, 48); st 269 drivers/staging/iio/adc/ad7192.c ret = ad_sd_read_reg(&st->sd, AD7192_REG_ID, 1, &id); st 275 drivers/staging/iio/adc/ad7192.c if (id != st->devid) st 276 drivers/staging/iio/adc/ad7192.c dev_warn(&st->sd.spi->dev, "device ID query failed (0x%X)\n", st 279 drivers/staging/iio/adc/ad7192.c st->mode = AD7192_MODE_SEL(AD7192_MODE_IDLE) | st 280 drivers/staging/iio/adc/ad7192.c AD7192_MODE_CLKSRC(st->clock_sel) | st 283 drivers/staging/iio/adc/ad7192.c st->conf = AD7192_CONF_GAIN(0); st 287 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_REJ60; st 290 drivers/staging/iio/adc/ad7192.c if (refin2_en && st->devid != ID_AD7195) st 291 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_REFSEL; st 293 drivers/staging/iio/adc/ad7192.c st->conf &= ~AD7192_CONF_CHOP; st 294 drivers/staging/iio/adc/ad7192.c st->f_order = AD7192_NO_SYNC_FILTER; st 298 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_BUF; st 302 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_UNIPOLAR; st 307 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_BURN; st 309 drivers/staging/iio/adc/ad7192.c dev_warn(&st->sd.spi->dev, st 313 drivers/staging/iio/adc/ad7192.c ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); st 317 drivers/staging/iio/adc/ad7192.c ret = ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf); st 321 drivers/staging/iio/adc/ad7192.c ret = ad7192_calibrate_all(st); st 326 drivers/staging/iio/adc/ad7192.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) { st 327 drivers/staging/iio/adc/ad7192.c scale_uv = ((u64)st->int_vref_mv * 100000000) st 329 drivers/staging/iio/adc/ad7192.c ((st->conf & AD7192_CONF_UNIPOLAR) ? 0 : 1)); st 332 drivers/staging/iio/adc/ad7192.c st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; st 333 drivers/staging/iio/adc/ad7192.c st->scale_avail[i][0] = scale_uv; st 344 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 346 drivers/staging/iio/adc/ad7192.c return sprintf(buf, "%d\n", !!(st->mode & AD7192_MODE_ACX)); st 354 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 356 drivers/staging/iio/adc/ad7192.c return sprintf(buf, "%d\n", !!(st->gpocon & AD7192_GPOCON_BPDSW)); st 365 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 381 drivers/staging/iio/adc/ad7192.c st->gpocon |= AD7192_GPOCON_BPDSW; st 383 drivers/staging/iio/adc/ad7192.c st->gpocon &= ~AD7192_GPOCON_BPDSW; st 385 drivers/staging/iio/adc/ad7192.c ad_sd_write_reg(&st->sd, AD7192_REG_GPOCON, 1, st->gpocon); st 389 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_ACX; st 391 drivers/staging/iio/adc/ad7192.c st->mode &= ~AD7192_MODE_ACX; st 393 drivers/staging/iio/adc/ad7192.c ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); st 404 drivers/staging/iio/adc/ad7192.c static void ad7192_get_available_filter_freq(struct ad7192_state *st, st 410 drivers/staging/iio/adc/ad7192.c fadc = DIV_ROUND_CLOSEST(st->fclk, st 411 drivers/staging/iio/adc/ad7192.c AD7192_SYNC4_FILTER * AD7192_MODE_RATE(st->mode)); st 414 drivers/staging/iio/adc/ad7192.c fadc = DIV_ROUND_CLOSEST(st->fclk, st 415 drivers/staging/iio/adc/ad7192.c AD7192_SYNC3_FILTER * AD7192_MODE_RATE(st->mode)); st 418 drivers/staging/iio/adc/ad7192.c fadc = DIV_ROUND_CLOSEST(st->fclk, AD7192_MODE_RATE(st->mode)); st 428 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 432 drivers/staging/iio/adc/ad7192.c ad7192_get_available_filter_freq(st, freq_avail); st 481 drivers/staging/iio/adc/ad7192.c static int ad7192_set_3db_filter_freq(struct ad7192_state *st, st 491 drivers/staging/iio/adc/ad7192.c ad7192_get_available_filter_freq(st, freq_avail); st 503 drivers/staging/iio/adc/ad7192.c st->f_order = AD7192_SYNC4_FILTER; st 504 drivers/staging/iio/adc/ad7192.c st->mode &= ~AD7192_MODE_SINC3; st 506 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_CHOP; st 509 drivers/staging/iio/adc/ad7192.c st->f_order = AD7192_SYNC3_FILTER; st 510 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_SINC3; st 512 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_CHOP; st 515 drivers/staging/iio/adc/ad7192.c st->f_order = AD7192_NO_SYNC_FILTER; st 516 drivers/staging/iio/adc/ad7192.c st->mode &= ~AD7192_MODE_SINC3; st 518 drivers/staging/iio/adc/ad7192.c st->conf &= ~AD7192_CONF_CHOP; st 521 drivers/staging/iio/adc/ad7192.c st->f_order = AD7192_NO_SYNC_FILTER; st 522 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_SINC3; st 524 drivers/staging/iio/adc/ad7192.c st->conf &= ~AD7192_CONF_CHOP; st 528 drivers/staging/iio/adc/ad7192.c ret = ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); st 532 drivers/staging/iio/adc/ad7192.c return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf); st 535 drivers/staging/iio/adc/ad7192.c static int ad7192_get_3db_filter_freq(struct ad7192_state *st) st 539 drivers/staging/iio/adc/ad7192.c fadc = DIV_ROUND_CLOSEST(st->fclk, st 540 drivers/staging/iio/adc/ad7192.c st->f_order * AD7192_MODE_RATE(st->mode)); st 542 drivers/staging/iio/adc/ad7192.c if (st->conf & AD7192_CONF_CHOP) st 544 drivers/staging/iio/adc/ad7192.c if (st->mode & AD7192_MODE_SINC3) st 556 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 557 drivers/staging/iio/adc/ad7192.c bool unipolar = !!(st->conf & AD7192_CONF_UNIPOLAR); st 565 drivers/staging/iio/adc/ad7192.c mutex_lock(&st->lock); st 566 drivers/staging/iio/adc/ad7192.c *val = st->scale_avail[AD7192_CONF_GAIN(st->conf)][0]; st 567 drivers/staging/iio/adc/ad7192.c *val2 = st->scale_avail[AD7192_CONF_GAIN(st->conf)][1]; st 568 drivers/staging/iio/adc/ad7192.c mutex_unlock(&st->lock); st 587 drivers/staging/iio/adc/ad7192.c *val = st->fclk / st 588 drivers/staging/iio/adc/ad7192.c (st->f_order * 1024 * AD7192_MODE_RATE(st->mode)); st 591 drivers/staging/iio/adc/ad7192.c *val = ad7192_get_3db_filter_freq(st); st 605 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 616 drivers/staging/iio/adc/ad7192.c mutex_lock(&st->lock); st 617 drivers/staging/iio/adc/ad7192.c for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) st 618 drivers/staging/iio/adc/ad7192.c if (val2 == st->scale_avail[i][1]) { st 620 drivers/staging/iio/adc/ad7192.c tmp = st->conf; st 621 drivers/staging/iio/adc/ad7192.c st->conf &= ~AD7192_CONF_GAIN(-1); st 622 drivers/staging/iio/adc/ad7192.c st->conf |= AD7192_CONF_GAIN(i); st 623 drivers/staging/iio/adc/ad7192.c if (tmp == st->conf) st 625 drivers/staging/iio/adc/ad7192.c ad_sd_write_reg(&st->sd, AD7192_REG_CONF, st 626 drivers/staging/iio/adc/ad7192.c 3, st->conf); st 627 drivers/staging/iio/adc/ad7192.c ad7192_calibrate_all(st); st 630 drivers/staging/iio/adc/ad7192.c mutex_unlock(&st->lock); st 638 drivers/staging/iio/adc/ad7192.c div = st->fclk / (val * st->f_order * 1024); st 644 drivers/staging/iio/adc/ad7192.c st->mode &= ~AD7192_MODE_RATE(-1); st 645 drivers/staging/iio/adc/ad7192.c st->mode |= AD7192_MODE_RATE(div); st 646 drivers/staging/iio/adc/ad7192.c ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); st 649 drivers/staging/iio/adc/ad7192.c ret = ad7192_set_3db_filter_freq(st, val, val2 / 1000); st 681 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 685 drivers/staging/iio/adc/ad7192.c *vals = (int *)st->scale_avail; st 688 drivers/staging/iio/adc/ad7192.c *length = ARRAY_SIZE(st->scale_avail) * 2; st 746 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 751 drivers/staging/iio/adc/ad7192.c switch (st->devid) { st 784 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st; st 793 drivers/staging/iio/adc/ad7192.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 797 drivers/staging/iio/adc/ad7192.c st = iio_priv(indio_dev); st 799 drivers/staging/iio/adc/ad7192.c mutex_init(&st->lock); st 801 drivers/staging/iio/adc/ad7192.c st->avdd = devm_regulator_get(&spi->dev, "avdd"); st 802 drivers/staging/iio/adc/ad7192.c if (IS_ERR(st->avdd)) st 803 drivers/staging/iio/adc/ad7192.c return PTR_ERR(st->avdd); st 805 drivers/staging/iio/adc/ad7192.c ret = regulator_enable(st->avdd); st 811 drivers/staging/iio/adc/ad7192.c st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); st 812 drivers/staging/iio/adc/ad7192.c if (IS_ERR(st->dvdd)) { st 813 drivers/staging/iio/adc/ad7192.c ret = PTR_ERR(st->dvdd); st 817 drivers/staging/iio/adc/ad7192.c ret = regulator_enable(st->dvdd); st 823 drivers/staging/iio/adc/ad7192.c voltage_uv = regulator_get_voltage(st->avdd); st 826 drivers/staging/iio/adc/ad7192.c st->int_vref_mv = voltage_uv / 1000; st 831 drivers/staging/iio/adc/ad7192.c st->devid = spi_get_device_id(spi)->driver_data; st 840 drivers/staging/iio/adc/ad7192.c if (st->devid == ID_AD7195) st 845 drivers/staging/iio/adc/ad7192.c ad_sd_init(&st->sd, indio_dev, spi, &ad7192_sigma_delta_info); st 851 drivers/staging/iio/adc/ad7192.c st->fclk = AD7192_INT_FREQ_MHZ; st 853 drivers/staging/iio/adc/ad7192.c st->mclk = devm_clk_get(&st->sd.spi->dev, "mclk"); st 854 drivers/staging/iio/adc/ad7192.c if (IS_ERR(st->mclk) && PTR_ERR(st->mclk) != -ENOENT) { st 855 drivers/staging/iio/adc/ad7192.c ret = PTR_ERR(st->mclk); st 859 drivers/staging/iio/adc/ad7192.c st->clock_sel = ad7192_of_clock_select(st); st 861 drivers/staging/iio/adc/ad7192.c if (st->clock_sel == AD7192_CLK_EXT_MCLK1_2 || st 862 drivers/staging/iio/adc/ad7192.c st->clock_sel == AD7192_CLK_EXT_MCLK2) { st 863 drivers/staging/iio/adc/ad7192.c ret = clk_prepare_enable(st->mclk); st 867 drivers/staging/iio/adc/ad7192.c st->fclk = clk_get_rate(st->mclk); st 868 drivers/staging/iio/adc/ad7192.c if (!ad7192_valid_external_frequency(st->fclk)) { st 876 drivers/staging/iio/adc/ad7192.c ret = ad7192_setup(st, spi->dev.of_node); st 886 drivers/staging/iio/adc/ad7192.c clk_disable_unprepare(st->mclk); st 890 drivers/staging/iio/adc/ad7192.c regulator_disable(st->dvdd); st 892 drivers/staging/iio/adc/ad7192.c regulator_disable(st->avdd); st 900 drivers/staging/iio/adc/ad7192.c struct ad7192_state *st = iio_priv(indio_dev); st 903 drivers/staging/iio/adc/ad7192.c clk_disable_unprepare(st->mclk); st 906 drivers/staging/iio/adc/ad7192.c regulator_disable(st->dvdd); st 907 drivers/staging/iio/adc/ad7192.c regulator_disable(st->avdd); st 160 drivers/staging/iio/adc/ad7280a.c static int ad7280_check_crc(struct ad7280_state *st, unsigned int val) st 162 drivers/staging/iio/adc/ad7280a.c unsigned char crc = ad7280_calc_crc8(st->crc_tab, val >> 10); st 178 drivers/staging/iio/adc/ad7280a.c static void ad7280_delay(struct ad7280_state *st) st 180 drivers/staging/iio/adc/ad7280a.c if (st->readback_delay_us < 50) st 181 drivers/staging/iio/adc/ad7280a.c udelay(st->readback_delay_us); st 186 drivers/staging/iio/adc/ad7280a.c static int __ad7280_read32(struct ad7280_state *st, unsigned int *val) st 190 drivers/staging/iio/adc/ad7280a.c .tx_buf = &st->buf[0], st 191 drivers/staging/iio/adc/ad7280a.c .rx_buf = &st->buf[1], st 195 drivers/staging/iio/adc/ad7280a.c st->buf[0] = cpu_to_be32(AD7280A_READ_TXVAL); st 197 drivers/staging/iio/adc/ad7280a.c ret = spi_sync_transfer(st->spi, &t, 1); st 201 drivers/staging/iio/adc/ad7280a.c *val = be32_to_cpu(st->buf[1]); st 206 drivers/staging/iio/adc/ad7280a.c static int ad7280_write(struct ad7280_state *st, unsigned int devaddr, st 212 drivers/staging/iio/adc/ad7280a.c reg |= ad7280_calc_crc8(st->crc_tab, reg >> 11) << 3 | 0x2; st 213 drivers/staging/iio/adc/ad7280a.c st->buf[0] = cpu_to_be32(reg); st 215 drivers/staging/iio/adc/ad7280a.c return spi_write(st->spi, &st->buf[0], 4); st 218 drivers/staging/iio/adc/ad7280a.c static int ad7280_read(struct ad7280_state *st, unsigned int devaddr, st 225 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, st 228 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb); st 233 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, devaddr, AD7280A_CONTROL_HB, 0, st 236 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb); st 241 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, devaddr, AD7280A_READ, 0, addr << 2); st 245 drivers/staging/iio/adc/ad7280a.c ret = __ad7280_read32(st, &tmp); st 249 drivers/staging/iio/adc/ad7280a.c if (ad7280_check_crc(st, tmp)) st 258 drivers/staging/iio/adc/ad7280a.c static int ad7280_read_channel(struct ad7280_state *st, unsigned int devaddr, st 264 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, devaddr, AD7280A_READ, 0, addr << 2); st 268 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, st 271 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb); st 275 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, devaddr, AD7280A_CONTROL_HB, 0, st 279 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb); st 283 drivers/staging/iio/adc/ad7280a.c ad7280_delay(st); st 285 drivers/staging/iio/adc/ad7280a.c ret = __ad7280_read32(st, &tmp); st 289 drivers/staging/iio/adc/ad7280a.c if (ad7280_check_crc(st, tmp)) st 298 drivers/staging/iio/adc/ad7280a.c static int ad7280_read_all_channels(struct ad7280_state *st, unsigned int cnt, st 304 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_READ, 1, st 309 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, st 313 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb); st 317 drivers/staging/iio/adc/ad7280a.c ad7280_delay(st); st 320 drivers/staging/iio/adc/ad7280a.c ret = __ad7280_read32(st, &tmp); st 324 drivers/staging/iio/adc/ad7280a.c if (ad7280_check_crc(st, tmp)) st 339 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = data; st 341 drivers/staging/iio/adc/ad7280a.c ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, st 342 drivers/staging/iio/adc/ad7280a.c AD7280A_CTRL_HB_PWRDN_SW | st->ctrl_hb); st 345 drivers/staging/iio/adc/ad7280a.c static int ad7280_chain_setup(struct ad7280_state *st) st 350 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_LB, 1, st 355 drivers/staging/iio/adc/ad7280a.c st->ctrl_lb); st 359 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_LB, 1, st 363 drivers/staging/iio/adc/ad7280a.c st->ctrl_lb); st 367 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_READ, 1, st 373 drivers/staging/iio/adc/ad7280a.c ret = __ad7280_read32(st, &val); st 380 drivers/staging/iio/adc/ad7280a.c if (ad7280_check_crc(st, val)) { st 393 drivers/staging/iio/adc/ad7280a.c ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, st 394 drivers/staging/iio/adc/ad7280a.c AD7280A_CTRL_HB_PWRDN_SW | st->ctrl_hb); st 404 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 408 drivers/staging/iio/adc/ad7280a.c !!(st->cb_mask[this_attr->address >> 8] & st 418 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 431 drivers/staging/iio/adc/ad7280a.c mutex_lock(&st->lock); st 433 drivers/staging/iio/adc/ad7280a.c st->cb_mask[devaddr] |= 1 << (ch + 2); st 435 drivers/staging/iio/adc/ad7280a.c st->cb_mask[devaddr] &= ~(1 << (ch + 2)); st 437 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, devaddr, AD7280A_CELL_BALANCE, st 438 drivers/staging/iio/adc/ad7280a.c 0, st->cb_mask[devaddr]); st 439 drivers/staging/iio/adc/ad7280a.c mutex_unlock(&st->lock); st 449 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 454 drivers/staging/iio/adc/ad7280a.c mutex_lock(&st->lock); st 455 drivers/staging/iio/adc/ad7280a.c ret = ad7280_read(st, this_attr->address >> 8, st 457 drivers/staging/iio/adc/ad7280a.c mutex_unlock(&st->lock); st 473 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 487 drivers/staging/iio/adc/ad7280a.c mutex_lock(&st->lock); st 488 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, this_attr->address >> 8, st 491 drivers/staging/iio/adc/ad7280a.c mutex_unlock(&st->lock); st 557 drivers/staging/iio/adc/ad7280a.c static void ad7280_init_dev_channels(struct ad7280_state *st, int dev, int *cnt) st 563 drivers/staging/iio/adc/ad7280a.c chan = &st->channels[*cnt]; st 580 drivers/staging/iio/adc/ad7280a.c static int ad7280_channel_init(struct ad7280_state *st) st 584 drivers/staging/iio/adc/ad7280a.c st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 2, st 585 drivers/staging/iio/adc/ad7280a.c sizeof(*st->channels), GFP_KERNEL); st 586 drivers/staging/iio/adc/ad7280a.c if (!st->channels) st 589 drivers/staging/iio/adc/ad7280a.c for (dev = 0; dev <= st->slave_num; dev++) st 590 drivers/staging/iio/adc/ad7280a.c ad7280_init_dev_channels(st, dev, &cnt); st 592 drivers/staging/iio/adc/ad7280a.c ad7280_total_voltage_channel_init(&st->channels[cnt], cnt, dev); st 594 drivers/staging/iio/adc/ad7280a.c ad7280_timestamp_channel_init(&st->channels[cnt], cnt); st 631 drivers/staging/iio/adc/ad7280a.c static int ad7280_init_dev_attrs(struct ad7280_state *st, int dev, int *cnt) st 635 drivers/staging/iio/adc/ad7280a.c struct device *sdev = &st->spi->dev; st 638 drivers/staging/iio/adc/ad7280a.c iio_attr = &st->iio_attr[*cnt]; st 649 drivers/staging/iio/adc/ad7280a.c iio_attr = &st->iio_attr[*cnt]; st 665 drivers/staging/iio/adc/ad7280a.c static int ad7280_attr_init(struct ad7280_state *st) st 669 drivers/staging/iio/adc/ad7280a.c st->iio_attr = devm_kcalloc(&st->spi->dev, 2, sizeof(*st->iio_attr) * st 670 drivers/staging/iio/adc/ad7280a.c (st->slave_num + 1) * AD7280A_CELLS_PER_DEV, st 672 drivers/staging/iio/adc/ad7280a.c if (!st->iio_attr) st 675 drivers/staging/iio/adc/ad7280a.c for (dev = 0; dev <= st->slave_num; dev++) { st 676 drivers/staging/iio/adc/ad7280a.c ret = ad7280_init_dev_attrs(st, dev, &cnt); st 689 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 695 drivers/staging/iio/adc/ad7280a.c val = 1000 + (st->cell_threshhigh * 1568) / 100; st 698 drivers/staging/iio/adc/ad7280a.c val = 1000 + (st->cell_threshlow * 1568) / 100; st 701 drivers/staging/iio/adc/ad7280a.c val = (st->aux_threshhigh * 196) / 10; st 704 drivers/staging/iio/adc/ad7280a.c val = (st->aux_threshlow * 196) / 10; st 719 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 744 drivers/staging/iio/adc/ad7280a.c mutex_lock(&st->lock); st 747 drivers/staging/iio/adc/ad7280a.c st->cell_threshhigh = val; st 750 drivers/staging/iio/adc/ad7280a.c st->cell_threshlow = val; st 753 drivers/staging/iio/adc/ad7280a.c st->aux_threshhigh = val; st 756 drivers/staging/iio/adc/ad7280a.c st->aux_threshlow = val; st 760 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, st 763 drivers/staging/iio/adc/ad7280a.c mutex_unlock(&st->lock); st 771 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 775 drivers/staging/iio/adc/ad7280a.c channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_KERNEL); st 779 drivers/staging/iio/adc/ad7280a.c ret = ad7280_read_all_channels(st, st->scan_cnt, channels); st 783 drivers/staging/iio/adc/ad7280a.c for (i = 0; i < st->scan_cnt; i++) { st 786 drivers/staging/iio/adc/ad7280a.c st->cell_threshhigh) { st 794 drivers/staging/iio/adc/ad7280a.c st->cell_threshlow) { st 804 drivers/staging/iio/adc/ad7280a.c st->aux_threshhigh) { st 811 drivers/staging/iio/adc/ad7280a.c st->aux_threshlow) { st 871 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st = iio_priv(indio_dev); st 876 drivers/staging/iio/adc/ad7280a.c mutex_lock(&st->lock); st 878 drivers/staging/iio/adc/ad7280a.c ret = ad7280_read_all_channels(st, st->scan_cnt, NULL); st 880 drivers/staging/iio/adc/ad7280a.c ret = ad7280_read_channel(st, chan->address >> 8, st 882 drivers/staging/iio/adc/ad7280a.c mutex_unlock(&st->lock); st 917 drivers/staging/iio/adc/ad7280a.c struct ad7280_state *st; st 923 drivers/staging/iio/adc/ad7280a.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 927 drivers/staging/iio/adc/ad7280a.c st = iio_priv(indio_dev); st 929 drivers/staging/iio/adc/ad7280a.c st->spi = spi; st 930 drivers/staging/iio/adc/ad7280a.c mutex_init(&st->lock); st 935 drivers/staging/iio/adc/ad7280a.c crc8_populate_msb(st->crc_tab, POLYNOM); st 937 drivers/staging/iio/adc/ad7280a.c st->spi->max_speed_hz = AD7280A_MAX_SPI_CLK_HZ; st 938 drivers/staging/iio/adc/ad7280a.c st->spi->mode = SPI_MODE_1; st 939 drivers/staging/iio/adc/ad7280a.c spi_setup(st->spi); st 941 drivers/staging/iio/adc/ad7280a.c st->ctrl_lb = AD7280A_CTRL_LB_ACQ_TIME(pdata->acquisition_time & 0x3); st 942 drivers/staging/iio/adc/ad7280a.c st->ctrl_hb = AD7280A_CTRL_HB_CONV_AVG(pdata->conversion_averaging st 946 drivers/staging/iio/adc/ad7280a.c ret = ad7280_chain_setup(st); st 950 drivers/staging/iio/adc/ad7280a.c st->slave_num = ret; st 951 drivers/staging/iio/adc/ad7280a.c st->scan_cnt = (st->slave_num + 1) * AD7280A_NUM_CH; st 952 drivers/staging/iio/adc/ad7280a.c st->cell_threshhigh = 0xFF; st 953 drivers/staging/iio/adc/ad7280a.c st->aux_threshhigh = 0xFF; st 955 drivers/staging/iio/adc/ad7280a.c ret = devm_add_action_or_reset(&spi->dev, ad7280_sw_power_down, st); st 967 drivers/staging/iio/adc/ad7280a.c st->readback_delay_us = st 970 drivers/staging/iio/adc/ad7280a.c t_acq_ns[pdata->acquisition_time & 0x3] + st->slave_num * 250; st 973 drivers/staging/iio/adc/ad7280a.c st->readback_delay_us = DIV_ROUND_UP(st->readback_delay_us, 1000); st 974 drivers/staging/iio/adc/ad7280a.c st->readback_delay_us += 5; /* Add tWAIT */ st 980 drivers/staging/iio/adc/ad7280a.c ret = ad7280_channel_init(st); st 985 drivers/staging/iio/adc/ad7280a.c indio_dev->channels = st->channels; st 988 drivers/staging/iio/adc/ad7280a.c ret = ad7280_attr_init(st); st 997 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, st 1003 drivers/staging/iio/adc/ad7280a.c ret = ad7280_write(st, ad7280a_devaddr(st->slave_num), st 129 drivers/staging/iio/frequency/ad9832.c static int ad9832_write_frequency(struct ad9832_state *st, st 134 drivers/staging/iio/frequency/ad9832.c if (fout > (clk_get_rate(st->mclk) / 2)) st 137 drivers/staging/iio/frequency/ad9832.c regval = ad9832_calc_freqreg(clk_get_rate(st->mclk), fout); st 139 drivers/staging/iio/frequency/ad9832.c st->freq_data[0] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | st 142 drivers/staging/iio/frequency/ad9832.c st->freq_data[1] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | st 145 drivers/staging/iio/frequency/ad9832.c st->freq_data[2] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | st 148 drivers/staging/iio/frequency/ad9832.c st->freq_data[3] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | st 152 drivers/staging/iio/frequency/ad9832.c return spi_sync(st->spi, &st->freq_msg); st 155 drivers/staging/iio/frequency/ad9832.c static int ad9832_write_phase(struct ad9832_state *st, st 161 drivers/staging/iio/frequency/ad9832.c st->phase_data[0] = cpu_to_be16((AD9832_CMD_PHA8BITSW << CMD_SHIFT) | st 164 drivers/staging/iio/frequency/ad9832.c st->phase_data[1] = cpu_to_be16((AD9832_CMD_PHA16BITSW << CMD_SHIFT) | st 168 drivers/staging/iio/frequency/ad9832.c return spi_sync(st->spi, &st->phase_msg); st 175 drivers/staging/iio/frequency/ad9832.c struct ad9832_state *st = iio_priv(indio_dev); st 184 drivers/staging/iio/frequency/ad9832.c mutex_lock(&st->lock); st 188 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_frequency(st, this_attr->address, val); st 194 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_phase(st, this_attr->address, val); st 198 drivers/staging/iio/frequency/ad9832.c st->ctrl_ss &= ~AD9832_SELSRC; st 200 drivers/staging/iio/frequency/ad9832.c st->ctrl_ss |= AD9832_SELSRC; st 201 drivers/staging/iio/frequency/ad9832.c st->data = cpu_to_be16((AD9832_CMD_SYNCSELSRC << CMD_SHIFT) | st 202 drivers/staging/iio/frequency/ad9832.c st->ctrl_ss); st 203 drivers/staging/iio/frequency/ad9832.c ret = spi_sync(st->spi, &st->msg); st 207 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp |= AD9832_FREQ; st 209 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp &= ~AD9832_FREQ; st 214 drivers/staging/iio/frequency/ad9832.c st->data = cpu_to_be16((AD9832_CMD_FPSELECT << CMD_SHIFT) | st 215 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp); st 216 drivers/staging/iio/frequency/ad9832.c ret = spi_sync(st->spi, &st->msg); st 224 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp &= ~AD9832_PHASE(3); st 225 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp |= AD9832_PHASE(val); st 227 drivers/staging/iio/frequency/ad9832.c st->data = cpu_to_be16((AD9832_CMD_FPSELECT << CMD_SHIFT) | st 228 drivers/staging/iio/frequency/ad9832.c st->ctrl_fp); st 229 drivers/staging/iio/frequency/ad9832.c ret = spi_sync(st->spi, &st->msg); st 233 drivers/staging/iio/frequency/ad9832.c st->ctrl_src &= ~(AD9832_RESET | AD9832_SLEEP | st 236 drivers/staging/iio/frequency/ad9832.c st->ctrl_src |= AD9832_RESET; st 238 drivers/staging/iio/frequency/ad9832.c st->data = cpu_to_be16((AD9832_CMD_SLEEPRESCLR << CMD_SHIFT) | st 239 drivers/staging/iio/frequency/ad9832.c st->ctrl_src); st 240 drivers/staging/iio/frequency/ad9832.c ret = spi_sync(st->spi, &st->msg); st 245 drivers/staging/iio/frequency/ad9832.c mutex_unlock(&st->lock); st 301 drivers/staging/iio/frequency/ad9832.c struct ad9832_state *st; st 309 drivers/staging/iio/frequency/ad9832.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 314 drivers/staging/iio/frequency/ad9832.c st = iio_priv(indio_dev); st 316 drivers/staging/iio/frequency/ad9832.c st->avdd = devm_regulator_get(&spi->dev, "avdd"); st 317 drivers/staging/iio/frequency/ad9832.c if (IS_ERR(st->avdd)) st 318 drivers/staging/iio/frequency/ad9832.c return PTR_ERR(st->avdd); st 320 drivers/staging/iio/frequency/ad9832.c ret = regulator_enable(st->avdd); st 326 drivers/staging/iio/frequency/ad9832.c st->dvdd = devm_regulator_get(&spi->dev, "dvdd"); st 327 drivers/staging/iio/frequency/ad9832.c if (IS_ERR(st->dvdd)) { st 328 drivers/staging/iio/frequency/ad9832.c ret = PTR_ERR(st->dvdd); st 332 drivers/staging/iio/frequency/ad9832.c ret = regulator_enable(st->dvdd); st 338 drivers/staging/iio/frequency/ad9832.c st->mclk = devm_clk_get(&spi->dev, "mclk"); st 339 drivers/staging/iio/frequency/ad9832.c if (IS_ERR(st->mclk)) { st 340 drivers/staging/iio/frequency/ad9832.c ret = PTR_ERR(st->mclk); st 344 drivers/staging/iio/frequency/ad9832.c ret = clk_prepare_enable(st->mclk); st 348 drivers/staging/iio/frequency/ad9832.c st->spi = spi; st 349 drivers/staging/iio/frequency/ad9832.c mutex_init(&st->lock); st 358 drivers/staging/iio/frequency/ad9832.c st->xfer.tx_buf = &st->data; st 359 drivers/staging/iio/frequency/ad9832.c st->xfer.len = 2; st 361 drivers/staging/iio/frequency/ad9832.c spi_message_init(&st->msg); st 362 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->xfer, &st->msg); st 364 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[0].tx_buf = &st->freq_data[0]; st 365 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[0].len = 2; st 366 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[0].cs_change = 1; st 367 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[1].tx_buf = &st->freq_data[1]; st 368 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[1].len = 2; st 369 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[1].cs_change = 1; st 370 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[2].tx_buf = &st->freq_data[2]; st 371 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[2].len = 2; st 372 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[2].cs_change = 1; st 373 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[3].tx_buf = &st->freq_data[3]; st 374 drivers/staging/iio/frequency/ad9832.c st->freq_xfer[3].len = 2; st 376 drivers/staging/iio/frequency/ad9832.c spi_message_init(&st->freq_msg); st 377 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->freq_xfer[0], &st->freq_msg); st 378 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->freq_xfer[1], &st->freq_msg); st 379 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->freq_xfer[2], &st->freq_msg); st 380 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->freq_xfer[3], &st->freq_msg); st 382 drivers/staging/iio/frequency/ad9832.c st->phase_xfer[0].tx_buf = &st->phase_data[0]; st 383 drivers/staging/iio/frequency/ad9832.c st->phase_xfer[0].len = 2; st 384 drivers/staging/iio/frequency/ad9832.c st->phase_xfer[0].cs_change = 1; st 385 drivers/staging/iio/frequency/ad9832.c st->phase_xfer[1].tx_buf = &st->phase_data[1]; st 386 drivers/staging/iio/frequency/ad9832.c st->phase_xfer[1].len = 2; st 388 drivers/staging/iio/frequency/ad9832.c spi_message_init(&st->phase_msg); st 389 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->phase_xfer[0], &st->phase_msg); st 390 drivers/staging/iio/frequency/ad9832.c spi_message_add_tail(&st->phase_xfer[1], &st->phase_msg); st 392 drivers/staging/iio/frequency/ad9832.c st->ctrl_src = AD9832_SLEEP | AD9832_RESET | AD9832_CLR; st 393 drivers/staging/iio/frequency/ad9832.c st->data = cpu_to_be16((AD9832_CMD_SLEEPRESCLR << CMD_SHIFT) | st 394 drivers/staging/iio/frequency/ad9832.c st->ctrl_src); st 395 drivers/staging/iio/frequency/ad9832.c ret = spi_sync(st->spi, &st->msg); st 401 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_frequency(st, AD9832_FREQ0HM, pdata->freq0); st 405 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_frequency(st, AD9832_FREQ1HM, pdata->freq1); st 409 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_phase(st, AD9832_PHASE0H, pdata->phase0); st 413 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_phase(st, AD9832_PHASE1H, pdata->phase1); st 417 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_phase(st, AD9832_PHASE2H, pdata->phase2); st 421 drivers/staging/iio/frequency/ad9832.c ret = ad9832_write_phase(st, AD9832_PHASE3H, pdata->phase3); st 432 drivers/staging/iio/frequency/ad9832.c clk_disable_unprepare(st->mclk); st 434 drivers/staging/iio/frequency/ad9832.c regulator_disable(st->dvdd); st 436 drivers/staging/iio/frequency/ad9832.c regulator_disable(st->avdd); st 444 drivers/staging/iio/frequency/ad9832.c struct ad9832_state *st = iio_priv(indio_dev); st 447 drivers/staging/iio/frequency/ad9832.c clk_disable_unprepare(st->mclk); st 448 drivers/staging/iio/frequency/ad9832.c regulator_disable(st->dvdd); st 449 drivers/staging/iio/frequency/ad9832.c regulator_disable(st->avdd); st 110 drivers/staging/iio/frequency/ad9834.c static int ad9834_write_frequency(struct ad9834_state *st, st 116 drivers/staging/iio/frequency/ad9834.c clk_freq = clk_get_rate(st->mclk); st 123 drivers/staging/iio/frequency/ad9834.c st->freq_data[0] = cpu_to_be16(addr | (regval & st 125 drivers/staging/iio/frequency/ad9834.c st->freq_data[1] = cpu_to_be16(addr | ((regval >> st 129 drivers/staging/iio/frequency/ad9834.c return spi_sync(st->spi, &st->freq_msg); st 132 drivers/staging/iio/frequency/ad9834.c static int ad9834_write_phase(struct ad9834_state *st, st 137 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(addr | phase); st 139 drivers/staging/iio/frequency/ad9834.c return spi_sync(st->spi, &st->msg); st 148 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st = iio_priv(indio_dev); st 157 drivers/staging/iio/frequency/ad9834.c mutex_lock(&st->lock); st 161 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_frequency(st, this_attr->address, val); st 165 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_phase(st, this_attr->address, val); st 168 drivers/staging/iio/frequency/ad9834.c if (st->control & AD9834_MODE) { st 174 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_OPBITEN; st 176 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_OPBITEN; st 178 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 179 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 183 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_PIN_SW; st 185 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_PIN_SW; st 186 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 187 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 192 drivers/staging/iio/frequency/ad9834.c st->control &= ~(this_attr->address | AD9834_PIN_SW); st 194 drivers/staging/iio/frequency/ad9834.c st->control |= this_attr->address; st 195 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_PIN_SW; st 200 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 201 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 205 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_RESET; st 207 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_RESET; st 209 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 210 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 215 drivers/staging/iio/frequency/ad9834.c mutex_unlock(&st->lock); st 226 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st = iio_priv(indio_dev); st 229 drivers/staging/iio/frequency/ad9834.c bool is_ad9833_7 = (st->devid == ID_AD9833) || (st->devid == ID_AD9837); st 231 drivers/staging/iio/frequency/ad9834.c mutex_lock(&st->lock); st 236 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_MODE; st 238 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_OPBITEN; st 241 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_OPBITEN; st 242 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_MODE; st 243 drivers/staging/iio/frequency/ad9834.c } else if (st->control & AD9834_OPBITEN) { st 246 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_MODE; st 249 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_MODE; st 250 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_OPBITEN; st 258 drivers/staging/iio/frequency/ad9834.c !(st->control & AD9834_MODE)) { st 259 drivers/staging/iio/frequency/ad9834.c st->control &= ~AD9834_MODE; st 260 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_OPBITEN; st 271 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 272 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 274 drivers/staging/iio/frequency/ad9834.c mutex_unlock(&st->lock); st 285 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st = iio_priv(indio_dev); st 288 drivers/staging/iio/frequency/ad9834.c if (st->devid == ID_AD9833 || st->devid == ID_AD9837) st 290 drivers/staging/iio/frequency/ad9834.c else if (st->control & AD9834_OPBITEN) st 307 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st = iio_priv(indio_dev); st 310 drivers/staging/iio/frequency/ad9834.c if (st->control & AD9834_MODE) st 395 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st; st 411 drivers/staging/iio/frequency/ad9834.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 417 drivers/staging/iio/frequency/ad9834.c st = iio_priv(indio_dev); st 418 drivers/staging/iio/frequency/ad9834.c mutex_init(&st->lock); st 419 drivers/staging/iio/frequency/ad9834.c st->mclk = devm_clk_get(&spi->dev, NULL); st 420 drivers/staging/iio/frequency/ad9834.c if (IS_ERR(st->mclk)) { st 421 drivers/staging/iio/frequency/ad9834.c ret = PTR_ERR(st->mclk); st 425 drivers/staging/iio/frequency/ad9834.c ret = clk_prepare_enable(st->mclk); st 431 drivers/staging/iio/frequency/ad9834.c st->spi = spi; st 432 drivers/staging/iio/frequency/ad9834.c st->devid = spi_get_device_id(spi)->driver_data; st 433 drivers/staging/iio/frequency/ad9834.c st->reg = reg; st 436 drivers/staging/iio/frequency/ad9834.c switch (st->devid) { st 449 drivers/staging/iio/frequency/ad9834.c st->xfer.tx_buf = &st->data; st 450 drivers/staging/iio/frequency/ad9834.c st->xfer.len = 2; st 452 drivers/staging/iio/frequency/ad9834.c spi_message_init(&st->msg); st 453 drivers/staging/iio/frequency/ad9834.c spi_message_add_tail(&st->xfer, &st->msg); st 455 drivers/staging/iio/frequency/ad9834.c st->freq_xfer[0].tx_buf = &st->freq_data[0]; st 456 drivers/staging/iio/frequency/ad9834.c st->freq_xfer[0].len = 2; st 457 drivers/staging/iio/frequency/ad9834.c st->freq_xfer[0].cs_change = 1; st 458 drivers/staging/iio/frequency/ad9834.c st->freq_xfer[1].tx_buf = &st->freq_data[1]; st 459 drivers/staging/iio/frequency/ad9834.c st->freq_xfer[1].len = 2; st 461 drivers/staging/iio/frequency/ad9834.c spi_message_init(&st->freq_msg); st 462 drivers/staging/iio/frequency/ad9834.c spi_message_add_tail(&st->freq_xfer[0], &st->freq_msg); st 463 drivers/staging/iio/frequency/ad9834.c spi_message_add_tail(&st->freq_xfer[1], &st->freq_msg); st 465 drivers/staging/iio/frequency/ad9834.c st->control = AD9834_B28 | AD9834_RESET; st 466 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_DIV2; st 468 drivers/staging/iio/frequency/ad9834.c if (st->devid == ID_AD9834) st 469 drivers/staging/iio/frequency/ad9834.c st->control |= AD9834_SIGN_PIB; st 471 drivers/staging/iio/frequency/ad9834.c st->data = cpu_to_be16(AD9834_REG_CMD | st->control); st 472 drivers/staging/iio/frequency/ad9834.c ret = spi_sync(st->spi, &st->msg); st 478 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_frequency(st, AD9834_REG_FREQ0, 1000000); st 482 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_frequency(st, AD9834_REG_FREQ1, 5000000); st 486 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_phase(st, AD9834_REG_PHASE0, 512); st 490 drivers/staging/iio/frequency/ad9834.c ret = ad9834_write_phase(st, AD9834_REG_PHASE1, 1024); st 500 drivers/staging/iio/frequency/ad9834.c clk_disable_unprepare(st->mclk); st 510 drivers/staging/iio/frequency/ad9834.c struct ad9834_state *st = iio_priv(indio_dev); st 513 drivers/staging/iio/frequency/ad9834.c clk_disable_unprepare(st->mclk); st 514 drivers/staging/iio/frequency/ad9834.c regulator_disable(st->reg); st 155 drivers/staging/iio/impedance-analyzer/ad5933.c static int ad5933_cmd(struct ad5933_state *st, unsigned char cmd) st 157 drivers/staging/iio/impedance-analyzer/ad5933.c unsigned char dat = st->ctrl_hb | cmd; st 159 drivers/staging/iio/impedance-analyzer/ad5933.c return ad5933_i2c_write(st->client, st 163 drivers/staging/iio/impedance-analyzer/ad5933.c static int ad5933_reset(struct ad5933_state *st) st 165 drivers/staging/iio/impedance-analyzer/ad5933.c unsigned char dat = st->ctrl_lb | AD5933_CTRL_RESET; st 167 drivers/staging/iio/impedance-analyzer/ad5933.c return ad5933_i2c_write(st->client, st 171 drivers/staging/iio/impedance-analyzer/ad5933.c static int ad5933_wait_busy(struct ad5933_state *st, unsigned char event) st 177 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_read(st->client, AD5933_REG_STATUS, 1, &val); st 189 drivers/staging/iio/impedance-analyzer/ad5933.c static int ad5933_set_freq(struct ad5933_state *st, st 199 drivers/staging/iio/impedance-analyzer/ad5933.c do_div(freqreg, st->mclk_hz / 4); st 203 drivers/staging/iio/impedance-analyzer/ad5933.c st->freq_start = freq; st 206 drivers/staging/iio/impedance-analyzer/ad5933.c st->freq_inc = freq; st 213 drivers/staging/iio/impedance-analyzer/ad5933.c return ad5933_i2c_write(st->client, reg, 3, &dat.d8[1]); st 216 drivers/staging/iio/impedance-analyzer/ad5933.c static int ad5933_setup(struct ad5933_state *st) st 221 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_reset(st); st 225 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_set_freq(st, AD5933_REG_FREQ_START, 10000); st 229 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_set_freq(st, AD5933_REG_FREQ_INC, 200); st 233 drivers/staging/iio/impedance-analyzer/ad5933.c st->settling_cycles = 10; st 234 drivers/staging/iio/impedance-analyzer/ad5933.c dat = cpu_to_be16(st->settling_cycles); st 236 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_write(st->client, st 242 drivers/staging/iio/impedance-analyzer/ad5933.c st->freq_points = 100; st 243 drivers/staging/iio/impedance-analyzer/ad5933.c dat = cpu_to_be16(st->freq_points); st 245 drivers/staging/iio/impedance-analyzer/ad5933.c return ad5933_i2c_write(st->client, AD5933_REG_INC_NUM, 2, (u8 *)&dat); st 248 drivers/staging/iio/impedance-analyzer/ad5933.c static void ad5933_calc_out_ranges(struct ad5933_state *st) st 254 drivers/staging/iio/impedance-analyzer/ad5933.c st->range_avail[i] = normalized_3v3[i] * st->vref_mv / 3300; st 266 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 278 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_read(st->client, this_attr->address, 3, &dat.d8[1]); st 285 drivers/staging/iio/impedance-analyzer/ad5933.c freqreg = (u64)freqreg * (u64)(st->mclk_hz / 4); st 297 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 312 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_set_freq(st, this_attr->address, val); st 333 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 337 drivers/staging/iio/impedance-analyzer/ad5933.c mutex_lock(&st->lock); st 341 drivers/staging/iio/impedance-analyzer/ad5933.c st->range_avail[(st->ctrl_hb >> 1) & 0x3]); st 344 drivers/staging/iio/impedance-analyzer/ad5933.c len = sprintf(buf, "%u %u %u %u\n", st->range_avail[0], st 345 drivers/staging/iio/impedance-analyzer/ad5933.c st->range_avail[3], st->range_avail[2], st 346 drivers/staging/iio/impedance-analyzer/ad5933.c st->range_avail[1]); st 349 drivers/staging/iio/impedance-analyzer/ad5933.c len = sprintf(buf, "%d\n", st->settling_cycles); st 353 drivers/staging/iio/impedance-analyzer/ad5933.c (st->ctrl_hb & AD5933_CTRL_PGA_GAIN_1) ? st 360 drivers/staging/iio/impedance-analyzer/ad5933.c len = sprintf(buf, "%d\n", st->freq_points); st 366 drivers/staging/iio/impedance-analyzer/ad5933.c mutex_unlock(&st->lock); st 376 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 391 drivers/staging/iio/impedance-analyzer/ad5933.c mutex_lock(&st->lock); st 396 drivers/staging/iio/impedance-analyzer/ad5933.c if (val == st->range_avail[i]) { st 397 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_hb &= ~AD5933_CTRL_RANGE(0x3); st 398 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_hb |= AD5933_CTRL_RANGE(i); st 399 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_cmd(st, 0); st 405 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_hb |= AD5933_CTRL_PGA_GAIN_1; st 407 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_hb &= ~AD5933_CTRL_PGA_GAIN_1; st 412 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_cmd(st, 0); st 416 drivers/staging/iio/impedance-analyzer/ad5933.c st->settling_cycles = val; st 425 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_write(st->client, st 431 drivers/staging/iio/impedance-analyzer/ad5933.c st->freq_points = val; st 434 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_write(st->client, AD5933_REG_INC_NUM, 2, st 441 drivers/staging/iio/impedance-analyzer/ad5933.c mutex_unlock(&st->lock); st 504 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 513 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_cmd(st, AD5933_CTRL_MEASURE_TEMP); st 516 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_wait_busy(st, AD5933_STAT_TEMP_VALID); st 520 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_read(st->client, st 548 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 554 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_reset(st); st 558 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_cmd(st, AD5933_CTRL_STANDBY); st 562 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_cmd(st, AD5933_CTRL_INIT_START_FREQ); st 566 drivers/staging/iio/impedance-analyzer/ad5933.c st->state = AD5933_CTRL_INIT_START_FREQ; st 573 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 586 drivers/staging/iio/impedance-analyzer/ad5933.c schedule_delayed_work(&st->work, st 593 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 595 drivers/staging/iio/impedance-analyzer/ad5933.c cancel_delayed_work_sync(&st->work); st 596 drivers/staging/iio/impedance-analyzer/ad5933.c return ad5933_cmd(st, AD5933_CTRL_POWER_DOWN); st 623 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = container_of(work, st 625 drivers/staging/iio/impedance-analyzer/ad5933.c struct iio_dev *indio_dev = i2c_get_clientdata(st->client); st 631 drivers/staging/iio/impedance-analyzer/ad5933.c if (st->state == AD5933_CTRL_INIT_START_FREQ) { st 633 drivers/staging/iio/impedance-analyzer/ad5933.c ad5933_cmd(st, AD5933_CTRL_START_SWEEP); st 634 drivers/staging/iio/impedance-analyzer/ad5933.c st->state = AD5933_CTRL_START_SWEEP; st 635 drivers/staging/iio/impedance-analyzer/ad5933.c schedule_delayed_work(&st->work, st->poll_time_jiffies); st 639 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_read(st->client, AD5933_REG_STATUS, 1, &status); st 646 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_i2c_read(st->client, st 662 drivers/staging/iio/impedance-analyzer/ad5933.c schedule_delayed_work(&st->work, st->poll_time_jiffies); st 671 drivers/staging/iio/impedance-analyzer/ad5933.c ad5933_cmd(st, AD5933_CTRL_POWER_DOWN); st 674 drivers/staging/iio/impedance-analyzer/ad5933.c ad5933_cmd(st, AD5933_CTRL_INC_FREQ); st 675 drivers/staging/iio/impedance-analyzer/ad5933.c schedule_delayed_work(&st->work, st->poll_time_jiffies); st 683 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st; st 687 drivers/staging/iio/impedance-analyzer/ad5933.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 691 drivers/staging/iio/impedance-analyzer/ad5933.c st = iio_priv(indio_dev); st 693 drivers/staging/iio/impedance-analyzer/ad5933.c st->client = client; st 695 drivers/staging/iio/impedance-analyzer/ad5933.c mutex_init(&st->lock); st 697 drivers/staging/iio/impedance-analyzer/ad5933.c st->reg = devm_regulator_get(&client->dev, "vdd"); st 698 drivers/staging/iio/impedance-analyzer/ad5933.c if (IS_ERR(st->reg)) st 699 drivers/staging/iio/impedance-analyzer/ad5933.c return PTR_ERR(st->reg); st 701 drivers/staging/iio/impedance-analyzer/ad5933.c ret = regulator_enable(st->reg); st 706 drivers/staging/iio/impedance-analyzer/ad5933.c ret = regulator_get_voltage(st->reg); st 711 drivers/staging/iio/impedance-analyzer/ad5933.c st->vref_mv = ret / 1000; st 713 drivers/staging/iio/impedance-analyzer/ad5933.c st->mclk = devm_clk_get(&client->dev, "mclk"); st 714 drivers/staging/iio/impedance-analyzer/ad5933.c if (IS_ERR(st->mclk) && PTR_ERR(st->mclk) != -ENOENT) { st 715 drivers/staging/iio/impedance-analyzer/ad5933.c ret = PTR_ERR(st->mclk); st 719 drivers/staging/iio/impedance-analyzer/ad5933.c if (!IS_ERR(st->mclk)) { st 720 drivers/staging/iio/impedance-analyzer/ad5933.c ret = clk_prepare_enable(st->mclk); st 723 drivers/staging/iio/impedance-analyzer/ad5933.c ext_clk_hz = clk_get_rate(st->mclk); st 727 drivers/staging/iio/impedance-analyzer/ad5933.c st->mclk_hz = ext_clk_hz; st 728 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_lb = AD5933_CTRL_EXT_SYSCLK; st 730 drivers/staging/iio/impedance-analyzer/ad5933.c st->mclk_hz = AD5933_INT_OSC_FREQ_Hz; st 731 drivers/staging/iio/impedance-analyzer/ad5933.c st->ctrl_lb = AD5933_CTRL_INT_SYSCLK; st 734 drivers/staging/iio/impedance-analyzer/ad5933.c ad5933_calc_out_ranges(st); st 735 drivers/staging/iio/impedance-analyzer/ad5933.c INIT_DELAYED_WORK(&st->work, ad5933_work); st 736 drivers/staging/iio/impedance-analyzer/ad5933.c st->poll_time_jiffies = msecs_to_jiffies(AD5933_POLL_TIME_ms); st 749 drivers/staging/iio/impedance-analyzer/ad5933.c ret = ad5933_setup(st); st 762 drivers/staging/iio/impedance-analyzer/ad5933.c clk_disable_unprepare(st->mclk); st 764 drivers/staging/iio/impedance-analyzer/ad5933.c regulator_disable(st->reg); st 772 drivers/staging/iio/impedance-analyzer/ad5933.c struct ad5933_state *st = iio_priv(indio_dev); st 776 drivers/staging/iio/impedance-analyzer/ad5933.c regulator_disable(st->reg); st 777 drivers/staging/iio/impedance-analyzer/ad5933.c clk_disable_unprepare(st->mclk); st 25 drivers/staging/iio/meter/ade7854-i2c.c struct ade7854_state *st = iio_priv(indio_dev); st 27 drivers/staging/iio/meter/ade7854-i2c.c mutex_lock(&st->buf_lock); st 28 drivers/staging/iio/meter/ade7854-i2c.c st->tx[0] = (reg_address >> 8) & 0xFF; st 29 drivers/staging/iio/meter/ade7854-i2c.c st->tx[1] = reg_address & 0xFF; st 33 drivers/staging/iio/meter/ade7854-i2c.c st->tx[2] = val & 0xFF; st 37 drivers/staging/iio/meter/ade7854-i2c.c st->tx[2] = (val >> 8) & 0xFF; st 38 drivers/staging/iio/meter/ade7854-i2c.c st->tx[3] = val & 0xFF; st 42 drivers/staging/iio/meter/ade7854-i2c.c st->tx[2] = (val >> 16) & 0xFF; st 43 drivers/staging/iio/meter/ade7854-i2c.c st->tx[3] = (val >> 8) & 0xFF; st 44 drivers/staging/iio/meter/ade7854-i2c.c st->tx[4] = val & 0xFF; st 48 drivers/staging/iio/meter/ade7854-i2c.c st->tx[2] = (val >> 24) & 0xFF; st 49 drivers/staging/iio/meter/ade7854-i2c.c st->tx[3] = (val >> 16) & 0xFF; st 50 drivers/staging/iio/meter/ade7854-i2c.c st->tx[4] = (val >> 8) & 0xFF; st 51 drivers/staging/iio/meter/ade7854-i2c.c st->tx[5] = val & 0xFF; st 59 drivers/staging/iio/meter/ade7854-i2c.c ret = i2c_master_send(st->i2c, st->tx, count); st 62 drivers/staging/iio/meter/ade7854-i2c.c mutex_unlock(&st->buf_lock); st 73 drivers/staging/iio/meter/ade7854-i2c.c struct ade7854_state *st = iio_priv(indio_dev); st 76 drivers/staging/iio/meter/ade7854-i2c.c mutex_lock(&st->buf_lock); st 77 drivers/staging/iio/meter/ade7854-i2c.c st->tx[0] = (reg_address >> 8) & 0xFF; st 78 drivers/staging/iio/meter/ade7854-i2c.c st->tx[1] = reg_address & 0xFF; st 80 drivers/staging/iio/meter/ade7854-i2c.c ret = i2c_master_send(st->i2c, st->tx, 2); st 84 drivers/staging/iio/meter/ade7854-i2c.c ret = i2c_master_recv(st->i2c, st->rx, bits); st 90 drivers/staging/iio/meter/ade7854-i2c.c *val = st->rx[0]; st 93 drivers/staging/iio/meter/ade7854-i2c.c *val = (st->rx[0] << 8) | st->rx[1]; st 96 drivers/staging/iio/meter/ade7854-i2c.c *val = (st->rx[0] << 16) | (st->rx[1] << 8) | st->rx[2]; st 99 drivers/staging/iio/meter/ade7854-i2c.c *val = (st->rx[0] << 24) | (st->rx[1] << 16) | st 100 drivers/staging/iio/meter/ade7854-i2c.c (st->rx[2] << 8) | st->rx[3]; st 108 drivers/staging/iio/meter/ade7854-i2c.c mutex_unlock(&st->buf_lock); st 115 drivers/staging/iio/meter/ade7854-i2c.c struct ade7854_state *st; st 118 drivers/staging/iio/meter/ade7854-i2c.c indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); st 121 drivers/staging/iio/meter/ade7854-i2c.c st = iio_priv(indio_dev); st 123 drivers/staging/iio/meter/ade7854-i2c.c st->read_reg = ade7854_i2c_read_reg; st 124 drivers/staging/iio/meter/ade7854-i2c.c st->write_reg = ade7854_i2c_write_reg; st 125 drivers/staging/iio/meter/ade7854-i2c.c st->i2c = client; st 126 drivers/staging/iio/meter/ade7854-i2c.c st->irq = client->irq; st 24 drivers/staging/iio/meter/ade7854-spi.c struct ade7854_state *st = iio_priv(indio_dev); st 26 drivers/staging/iio/meter/ade7854-spi.c .tx_buf = st->tx, st 31 drivers/staging/iio/meter/ade7854-spi.c mutex_lock(&st->buf_lock); st 32 drivers/staging/iio/meter/ade7854-spi.c st->tx[0] = ADE7854_WRITE_REG; st 33 drivers/staging/iio/meter/ade7854-spi.c st->tx[1] = (reg_address >> 8) & 0xFF; st 34 drivers/staging/iio/meter/ade7854-spi.c st->tx[2] = reg_address & 0xFF; st 37 drivers/staging/iio/meter/ade7854-spi.c st->tx[3] = val & 0xFF; st 41 drivers/staging/iio/meter/ade7854-spi.c st->tx[3] = (val >> 8) & 0xFF; st 42 drivers/staging/iio/meter/ade7854-spi.c st->tx[4] = val & 0xFF; st 46 drivers/staging/iio/meter/ade7854-spi.c st->tx[3] = (val >> 16) & 0xFF; st 47 drivers/staging/iio/meter/ade7854-spi.c st->tx[4] = (val >> 8) & 0xFF; st 48 drivers/staging/iio/meter/ade7854-spi.c st->tx[5] = val & 0xFF; st 52 drivers/staging/iio/meter/ade7854-spi.c st->tx[3] = (val >> 24) & 0xFF; st 53 drivers/staging/iio/meter/ade7854-spi.c st->tx[4] = (val >> 16) & 0xFF; st 54 drivers/staging/iio/meter/ade7854-spi.c st->tx[5] = (val >> 8) & 0xFF; st 55 drivers/staging/iio/meter/ade7854-spi.c st->tx[6] = val & 0xFF; st 62 drivers/staging/iio/meter/ade7854-spi.c ret = spi_sync_transfer(st->spi, &xfer, 1); st 64 drivers/staging/iio/meter/ade7854-spi.c mutex_unlock(&st->buf_lock); st 75 drivers/staging/iio/meter/ade7854-spi.c struct ade7854_state *st = iio_priv(indio_dev); st 79 drivers/staging/iio/meter/ade7854-spi.c .tx_buf = st->tx, st 83 drivers/staging/iio/meter/ade7854-spi.c .rx_buf = st->rx, st 89 drivers/staging/iio/meter/ade7854-spi.c mutex_lock(&st->buf_lock); st 91 drivers/staging/iio/meter/ade7854-spi.c st->tx[0] = ADE7854_READ_REG; st 92 drivers/staging/iio/meter/ade7854-spi.c st->tx[1] = (reg_address >> 8) & 0xFF; st 93 drivers/staging/iio/meter/ade7854-spi.c st->tx[2] = reg_address & 0xFF; st 95 drivers/staging/iio/meter/ade7854-spi.c ret = spi_sync_transfer(st->spi, xfers, ARRAY_SIZE(xfers)); st 97 drivers/staging/iio/meter/ade7854-spi.c dev_err(&st->spi->dev, "problem when reading register 0x%02X", st 104 drivers/staging/iio/meter/ade7854-spi.c *val = st->rx[0]; st 107 drivers/staging/iio/meter/ade7854-spi.c *val = be16_to_cpup((const __be16 *)st->rx); st 110 drivers/staging/iio/meter/ade7854-spi.c *val = (st->rx[0] << 16) | (st->rx[1] << 8) | st->rx[2]; st 113 drivers/staging/iio/meter/ade7854-spi.c *val = be32_to_cpup((const __be32 *)st->rx); st 118 drivers/staging/iio/meter/ade7854-spi.c mutex_unlock(&st->buf_lock); st 124 drivers/staging/iio/meter/ade7854-spi.c struct ade7854_state *st; st 127 drivers/staging/iio/meter/ade7854-spi.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 130 drivers/staging/iio/meter/ade7854-spi.c st = iio_priv(indio_dev); st 132 drivers/staging/iio/meter/ade7854-spi.c st->read_reg = ade7854_spi_read_reg; st 133 drivers/staging/iio/meter/ade7854-spi.c st->write_reg = ade7854_spi_write_reg; st 134 drivers/staging/iio/meter/ade7854-spi.c st->irq = spi->irq; st 135 drivers/staging/iio/meter/ade7854-spi.c st->spi = spi; st 31 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 34 drivers/staging/iio/meter/ade7854.c ret = st->read_reg(dev, this_attr->address, &val, 8); st 48 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 51 drivers/staging/iio/meter/ade7854.c ret = st->read_reg(dev, this_attr->address, &val, 16); st 65 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 68 drivers/staging/iio/meter/ade7854.c ret = st->read_reg(dev, this_attr->address, &val, 24); st 83 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 85 drivers/staging/iio/meter/ade7854.c ret = st->read_reg(dev, this_attr->address, &val, 32); st 99 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 107 drivers/staging/iio/meter/ade7854.c ret = st->write_reg(dev, this_attr->address, val, 8); st 120 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 128 drivers/staging/iio/meter/ade7854.c ret = st->write_reg(dev, this_attr->address, val, 16); st 141 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 149 drivers/staging/iio/meter/ade7854.c ret = st->write_reg(dev, this_attr->address, val, 24); st 162 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 170 drivers/staging/iio/meter/ade7854.c ret = st->write_reg(dev, this_attr->address, val, 32); st 179 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 182 drivers/staging/iio/meter/ade7854.c st->read_reg(dev, ADE7854_CONFIG, &val, 16); st 185 drivers/staging/iio/meter/ade7854.c return st->write_reg(dev, ADE7854_CONFIG, val, 16); st 412 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 417 drivers/staging/iio/meter/ade7854.c ret = st->read_reg(dev, ADE7854_MASK0, &irqen, 32); st 428 drivers/staging/iio/meter/ade7854.c return st->write_reg(dev, ADE7854_MASK0, irqen, 32); st 537 drivers/staging/iio/meter/ade7854.c struct ade7854_state *st = iio_priv(indio_dev); st 539 drivers/staging/iio/meter/ade7854.c mutex_init(&st->buf_lock); st 108 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st) st 110 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_A0], ad2s1210_mode_vals[mode][0]); st 111 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_A1], ad2s1210_mode_vals[mode][1]); st 112 drivers/staging/iio/resolver/ad2s1210.c st->mode = mode; st 116 drivers/staging/iio/resolver/ad2s1210.c static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) st 120 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_mode(MOD_CONFIG, st); st 121 drivers/staging/iio/resolver/ad2s1210.c st->tx[0] = data; st 122 drivers/staging/iio/resolver/ad2s1210.c ret = spi_write(st->sdev, st->tx, 1); st 130 drivers/staging/iio/resolver/ad2s1210.c static int ad2s1210_config_read(struct ad2s1210_state *st, st 136 drivers/staging/iio/resolver/ad2s1210.c .rx_buf = &st->rx[0], st 137 drivers/staging/iio/resolver/ad2s1210.c .tx_buf = &st->tx[0], st 141 drivers/staging/iio/resolver/ad2s1210.c .rx_buf = &st->rx[1], st 142 drivers/staging/iio/resolver/ad2s1210.c .tx_buf = &st->tx[1], st 147 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_mode(MOD_CONFIG, st); st 148 drivers/staging/iio/resolver/ad2s1210.c st->tx[0] = address | AD2S1210_MSB_IS_HIGH; st 149 drivers/staging/iio/resolver/ad2s1210.c st->tx[1] = AD2S1210_REG_FAULT; st 150 drivers/staging/iio/resolver/ad2s1210.c ret = spi_sync_transfer(st->sdev, xfers, 2); st 154 drivers/staging/iio/resolver/ad2s1210.c return st->rx[1]; st 158 drivers/staging/iio/resolver/ad2s1210.c int ad2s1210_update_frequency_control_word(struct ad2s1210_state *st) st 163 drivers/staging/iio/resolver/ad2s1210.c fcw = (unsigned char)(st->fexcit * (1 << 15) / st->fclkin); st 165 drivers/staging/iio/resolver/ad2s1210.c dev_err(&st->sdev->dev, "ad2s1210: FCW out of range\n"); st 169 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, AD2S1210_REG_EXCIT_FREQ); st 173 drivers/staging/iio/resolver/ad2s1210.c return ad2s1210_config_write(st, fcw); st 180 drivers/staging/iio/resolver/ad2s1210.c static inline void ad2s1210_set_resolution_pin(struct ad2s1210_state *st) st 182 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_RES0], st 183 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_res_pins[(st->resolution - 10) / 2][0]); st 184 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_RES1], st 185 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_res_pins[(st->resolution - 10) / 2][1]); st 188 drivers/staging/iio/resolver/ad2s1210.c static inline int ad2s1210_soft_reset(struct ad2s1210_state *st) st 192 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, AD2S1210_REG_SOFT_RESET); st 196 drivers/staging/iio/resolver/ad2s1210.c return ad2s1210_config_write(st, 0x0); st 203 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 205 drivers/staging/iio/resolver/ad2s1210.c return sprintf(buf, "%u\n", st->fclkin); st 213 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 225 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 226 drivers/staging/iio/resolver/ad2s1210.c st->fclkin = fclkin; st 228 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_update_frequency_control_word(st); st 231 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_soft_reset(st); st 233 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 242 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 244 drivers/staging/iio/resolver/ad2s1210.c return sprintf(buf, "%u\n", st->fexcit); st 251 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 263 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 264 drivers/staging/iio/resolver/ad2s1210.c st->fexcit = fexcit; st 265 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_update_frequency_control_word(st); st 268 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_soft_reset(st); st 270 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 279 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 282 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 283 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_CONTROL); st 284 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 292 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 301 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 302 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, AD2S1210_REG_CONTROL); st 306 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, data); st 310 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_CONTROL); st 319 drivers/staging/iio/resolver/ad2s1210.c st->resolution = st 321 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_resolution_pin(st); st 323 drivers/staging/iio/resolver/ad2s1210.c st->hysteresis = !!(data & AD2S1210_ENABLE_HYSTERESIS); st 326 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 334 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 336 drivers/staging/iio/resolver/ad2s1210.c return sprintf(buf, "%d\n", st->resolution); st 343 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 353 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 354 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_CONTROL); st 360 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, AD2S1210_REG_CONTROL); st 363 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, data & AD2S1210_MSB_IS_LOW); st 366 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_CONTROL); st 375 drivers/staging/iio/resolver/ad2s1210.c st->resolution = st 377 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_resolution_pin(st); st 380 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 388 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 391 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 392 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_FAULT); st 393 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 403 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 406 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 407 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 0); st 410 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 1); st 411 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_FAULT); st 414 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 0); st 415 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 1); st 417 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 426 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 430 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 431 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, iattr->address); st 432 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 441 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev)); st 449 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 450 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, iattr->address); st 453 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, data & AD2S1210_MSB_IS_LOW); st 455 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 465 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st = iio_priv(indio_dev); st 471 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 472 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 0); st 478 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_mode(MOD_POS, st); st 481 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_mode(MOD_VEL, st); st 489 drivers/staging/iio/resolver/ad2s1210.c ret = spi_read(st->sdev, st->rx, 2); st 495 drivers/staging/iio/resolver/ad2s1210.c pos = be16_to_cpup((__be16 *)st->rx); st 496 drivers/staging/iio/resolver/ad2s1210.c if (st->hysteresis) st 497 drivers/staging/iio/resolver/ad2s1210.c pos >>= 16 - st->resolution; st 502 drivers/staging/iio/resolver/ad2s1210.c negative = st->rx[0] & 0x80; st 503 drivers/staging/iio/resolver/ad2s1210.c vel = be16_to_cpup((__be16 *)st->rx); st 504 drivers/staging/iio/resolver/ad2s1210.c vel >>= 16 - st->resolution; st 506 drivers/staging/iio/resolver/ad2s1210.c negative = (0xffff >> st->resolution) << st->resolution; st 513 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 518 drivers/staging/iio/resolver/ad2s1210.c gpiod_set_value(st->gpios[AD2S1210_SAMPLE], 1); st 521 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 592 drivers/staging/iio/resolver/ad2s1210.c static int ad2s1210_initial(struct ad2s1210_state *st) st 597 drivers/staging/iio/resolver/ad2s1210.c mutex_lock(&st->lock); st 598 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_set_resolution_pin(st); st 600 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, AD2S1210_REG_CONTROL); st 604 drivers/staging/iio/resolver/ad2s1210.c data |= (st->resolution - 10) >> 1; st 605 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_write(st, data); st 608 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_config_read(st, AD2S1210_REG_CONTROL); st 617 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_update_frequency_control_word(st); st 620 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_soft_reset(st); st 622 drivers/staging/iio/resolver/ad2s1210.c mutex_unlock(&st->lock); st 631 drivers/staging/iio/resolver/ad2s1210.c static int ad2s1210_setup_gpios(struct ad2s1210_state *st) st 633 drivers/staging/iio/resolver/ad2s1210.c struct spi_device *spi = st->sdev; st 637 drivers/staging/iio/resolver/ad2s1210.c st->gpios[i] = devm_gpiod_get(&spi->dev, gpios[i].name, st 639 drivers/staging/iio/resolver/ad2s1210.c if (IS_ERR(st->gpios[i])) { st 640 drivers/staging/iio/resolver/ad2s1210.c ret = PTR_ERR(st->gpios[i]); st 654 drivers/staging/iio/resolver/ad2s1210.c struct ad2s1210_state *st; st 657 drivers/staging/iio/resolver/ad2s1210.c indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); st 660 drivers/staging/iio/resolver/ad2s1210.c st = iio_priv(indio_dev); st 661 drivers/staging/iio/resolver/ad2s1210.c ret = ad2s1210_setup_gpios(st); st 667 drivers/staging/iio/resolver/ad2s1210.c mutex_init(&st->lock); st 668 drivers/staging/iio/resolver/ad2s1210.c st->sdev = spi; st 669 drivers/staging/iio/resolver/ad2s1210.c st->hysteresis = true; st 670 drivers/staging/iio/resolver/ad2s1210.c st->mode = MOD_CONFIG; st 671 drivers/staging/iio/resolver/ad2s1210.c st->resolution = 12; st 672 drivers/staging/iio/resolver/ad2s1210.c st->fexcit = AD2S1210_DEF_EXCIT; st 685 drivers/staging/iio/resolver/ad2s1210.c st->fclkin = spi->max_speed_hz; st 688 drivers/staging/iio/resolver/ad2s1210.c ad2s1210_initial(st); st 155 drivers/staging/most/dim2/dim2.c struct dim_ch_state_t st; st 166 drivers/staging/most/dim2/dim2.c if (!dim_get_channel_state(&hdm_ch->ch, &st)->ready) { st 253 drivers/staging/most/dim2/dim2.c struct dim_ch_state_t st; st 265 drivers/staging/most/dim2/dim2.c done_buffers = dim_get_channel_state(&hdm_ch->ch, &st)->done_buffers; st 335 drivers/staging/rtl8723bs/include/rtw_security.h #define PUTU32(ct, st) { \ st 336 drivers/staging/rtl8723bs/include/rtw_security.h (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); \ st 337 drivers/staging/rtl8723bs/include/rtw_security.h (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } st 831 drivers/target/iscsi/cxgbit/cxgbit_target.c struct skb_seq_state st; st 838 drivers/target/iscsi/cxgbit/cxgbit_target.c &st); st 841 drivers/target/iscsi/cxgbit/cxgbit_target.c buf_len = skb_seq_read(consumed, &buf, &st); st 843 drivers/target/iscsi/cxgbit/cxgbit_target.c skb_abort_seq_read(&st); st 872 drivers/thermal/tegra/soctherm.c u32 st, ex = 0, cp = 0, gp = 0, pl = 0, me = 0; st 874 drivers/thermal/tegra/soctherm.c st = readl(ts->regs + THERMCTL_INTR_STATUS); st 877 drivers/thermal/tegra/soctherm.c cp |= st & TH_INTR_CD0_MASK; st 878 drivers/thermal/tegra/soctherm.c cp |= st & TH_INTR_CU0_MASK; st 880 drivers/thermal/tegra/soctherm.c gp |= st & TH_INTR_GD0_MASK; st 881 drivers/thermal/tegra/soctherm.c gp |= st & TH_INTR_GU0_MASK; st 883 drivers/thermal/tegra/soctherm.c pl |= st & TH_INTR_PD0_MASK; st 884 drivers/thermal/tegra/soctherm.c pl |= st & TH_INTR_PU0_MASK; st 886 drivers/thermal/tegra/soctherm.c me |= st & TH_INTR_MD0_MASK; st 887 drivers/thermal/tegra/soctherm.c me |= st & TH_INTR_MU0_MASK; st 892 drivers/thermal/tegra/soctherm.c st &= ~ex; st 921 drivers/thermal/tegra/soctherm.c st &= ~ex; st 923 drivers/thermal/tegra/soctherm.c if (st) { st 925 drivers/thermal/tegra/soctherm.c pr_err("soctherm: Ignored unexpected INTRs 0x%08x\n", st); st 926 drivers/thermal/tegra/soctherm.c writel(st, ts->regs + THERMCTL_INTR_STATUS); st 1032 drivers/thermal/tegra/soctherm.c u32 st, ex, oc1, oc2, oc3, oc4; st 1034 drivers/thermal/tegra/soctherm.c st = readl(ts->regs + OC_INTR_STATUS); st 1037 drivers/thermal/tegra/soctherm.c oc1 = st & OC_INTR_OC1_MASK; st 1038 drivers/thermal/tegra/soctherm.c oc2 = st & OC_INTR_OC2_MASK; st 1039 drivers/thermal/tegra/soctherm.c oc3 = st & OC_INTR_OC3_MASK; st 1040 drivers/thermal/tegra/soctherm.c oc4 = st & OC_INTR_OC4_MASK; st 1045 drivers/thermal/tegra/soctherm.c writel(st, ts->regs + OC_INTR_STATUS); st 1046 drivers/thermal/tegra/soctherm.c st &= ~ex; st 1077 drivers/thermal/tegra/soctherm.c if (st) { st 1078 drivers/thermal/tegra/soctherm.c pr_err("soctherm: Ignored unexpected OC ALARM 0x%08x\n", st); st 1079 drivers/thermal/tegra/soctherm.c writel(st, ts->regs + OC_INTR_STATUS); st 48 drivers/thunderbolt/switch.c struct nvm_auth_status *st; st 50 drivers/thunderbolt/switch.c list_for_each_entry(st, &nvm_auth_status_cache, list) { st 51 drivers/thunderbolt/switch.c if (uuid_equal(&st->uuid, sw->uuid)) st 52 drivers/thunderbolt/switch.c return st; st 60 drivers/thunderbolt/switch.c struct nvm_auth_status *st; st 63 drivers/thunderbolt/switch.c st = __nvm_get_auth_status(sw); st 66 drivers/thunderbolt/switch.c *status = st ? st->status : 0; st 71 drivers/thunderbolt/switch.c struct nvm_auth_status *st; st 77 drivers/thunderbolt/switch.c st = __nvm_get_auth_status(sw); st 79 drivers/thunderbolt/switch.c if (!st) { st 80 drivers/thunderbolt/switch.c st = kzalloc(sizeof(*st), GFP_KERNEL); st 81 drivers/thunderbolt/switch.c if (!st) st 84 drivers/thunderbolt/switch.c memcpy(&st->uuid, sw->uuid, sizeof(st->uuid)); st 85 drivers/thunderbolt/switch.c INIT_LIST_HEAD(&st->list); st 86 drivers/thunderbolt/switch.c list_add_tail(&st->list, &nvm_auth_status_cache); st 89 drivers/thunderbolt/switch.c st->status = status; st 96 drivers/thunderbolt/switch.c struct nvm_auth_status *st; st 99 drivers/thunderbolt/switch.c st = __nvm_get_auth_status(sw); st 100 drivers/thunderbolt/switch.c if (st) { st 101 drivers/thunderbolt/switch.c list_del(&st->list); st 102 drivers/thunderbolt/switch.c kfree(st); st 161 drivers/tty/serial/mvebu-uart.c unsigned int st; st 164 drivers/tty/serial/mvebu-uart.c st = readl(port->membase + UART_STAT); st 167 drivers/tty/serial/mvebu-uart.c return (st & STAT_TX_FIFO_EMP) ? TIOCSER_TEMT : 0; st 302 drivers/tty/serial/mvebu-uart.c unsigned int st; st 324 drivers/tty/serial/mvebu-uart.c st = readl(port->membase + UART_STAT); st 325 drivers/tty/serial/mvebu-uart.c if (st & STAT_TX_FIFO_FUL) st 339 drivers/tty/serial/mvebu-uart.c unsigned int st = readl(port->membase + UART_STAT); st 341 drivers/tty/serial/mvebu-uart.c if (st & (STAT_RX_RDY(port) | STAT_OVR_ERR | STAT_FRM_ERR | st 343 drivers/tty/serial/mvebu-uart.c mvebu_uart_rx_chars(port, st); st 345 drivers/tty/serial/mvebu-uart.c if (st & STAT_TX_RDY(port)) st 346 drivers/tty/serial/mvebu-uart.c mvebu_uart_tx_chars(port, st); st 354 drivers/tty/serial/mvebu-uart.c unsigned int st = readl(port->membase + UART_STAT); st 356 drivers/tty/serial/mvebu-uart.c if (st & (STAT_RX_RDY(port) | STAT_OVR_ERR | STAT_FRM_ERR | st 358 drivers/tty/serial/mvebu-uart.c mvebu_uart_rx_chars(port, st); st 366 drivers/tty/serial/mvebu-uart.c unsigned int st = readl(port->membase + UART_STAT); st 368 drivers/tty/serial/mvebu-uart.c if (st & STAT_TX_RDY(port)) st 369 drivers/tty/serial/mvebu-uart.c mvebu_uart_tx_chars(port, st); st 549 drivers/tty/serial/mvebu-uart.c unsigned int st = readl(port->membase + UART_STAT); st 551 drivers/tty/serial/mvebu-uart.c if (!(st & STAT_RX_RDY(port))) st 559 drivers/tty/serial/mvebu-uart.c unsigned int st; st 562 drivers/tty/serial/mvebu-uart.c st = readl(port->membase + UART_STAT); st 564 drivers/tty/serial/mvebu-uart.c if (!(st & STAT_TX_FIFO_FUL)) st 600 drivers/tty/serial/mvebu-uart.c unsigned int st; st 603 drivers/tty/serial/mvebu-uart.c st = readl(port->membase + UART_STAT); st 604 drivers/tty/serial/mvebu-uart.c if (!(st & STAT_TX_FIFO_FUL)) st 612 drivers/tty/serial/mvebu-uart.c st = readl(port->membase + UART_STAT); st 613 drivers/tty/serial/mvebu-uart.c if (st & STAT_TX_FIFO_EMP) st 415 drivers/usb/atm/ueagle-atm.c #define E4_MAKEFUNCTION(t, st, s) (((t) & 0xf) << 8 | \ st 416 drivers/usb/atm/ueagle-atm.c ((st) & 0xf) << 4 | ((s) & 0xf)) st 69 drivers/usb/host/imx21-dbg.c static void debug_urb_completed(struct imx21 *imx21, struct urb *urb, int st) st 71 drivers/usb/host/imx21-dbg.c if (st) st 215 drivers/usb/serial/iuu_phoenix.c u8 *st; st 224 drivers/usb/serial/iuu_phoenix.c st = urb->transfer_buffer; st 227 drivers/usb/serial/iuu_phoenix.c switch (st[0]) { st 126 drivers/video/backlight/lms283gf05.c struct lms283gf05_state *st = lcd_get_data(ld); st 127 drivers/video/backlight/lms283gf05.c struct spi_device *spi = st->spi; st 152 drivers/video/backlight/lms283gf05.c struct lms283gf05_state *st; st 166 drivers/video/backlight/lms283gf05.c st = devm_kzalloc(&spi->dev, sizeof(struct lms283gf05_state), st 168 drivers/video/backlight/lms283gf05.c if (st == NULL) st 171 drivers/video/backlight/lms283gf05.c ld = devm_lcd_device_register(&spi->dev, "lms283gf05", &spi->dev, st, st 176 drivers/video/backlight/lms283gf05.c st->spi = spi; st 177 drivers/video/backlight/lms283gf05.c st->ld = ld; st 179 drivers/video/backlight/lms283gf05.c spi_set_drvdata(spi, st); st 108 drivers/video/fbdev/atafb.c } tt, st; st 1799 drivers/video/fbdev/atafb.c mode = par->hw.st.mode & 3; st 1830 drivers/video/fbdev/atafb.c par->hw.st.mode = ST_HIGH; st 1840 drivers/video/fbdev/atafb.c par->hw.st.mode = ST_LOW; st 1847 drivers/video/fbdev/atafb.c par->hw.st.mode = ST_MID; st 1859 drivers/video/fbdev/atafb.c par->hw.st.sync = (par->hw.st.sync & ~1) | 1; st 1861 drivers/video/fbdev/atafb.c par->hw.st.sync = (par->hw.st.sync & ~1); st 1896 drivers/video/fbdev/atafb.c if (!(par->hw.st.sync & 1)) st 1901 drivers/video/fbdev/atafb.c switch (par->hw.st.mode & 3) { st 1954 drivers/video/fbdev/atafb.c par->hw.st.mode = shifter_tt.st_shiftmode; st 1955 drivers/video/fbdev/atafb.c par->hw.st.sync = shifter_st.syncmode; st 1965 drivers/video/fbdev/atafb.c shifter_tt.st_shiftmode = par->hw.st.mode; st 1966 drivers/video/fbdev/atafb.c shifter_st.syncmode = par->hw.st.sync; st 250 drivers/video/fbdev/savage/savagefb.h #define BCI_BD_SET_STRIDE(bd, st) ((bd) |= ((st) & 0xFFFF)) st 271 drivers/w1/masters/ds2490.c static int ds_recv_status(struct ds_device *dev, struct ds_status *st, st 276 drivers/w1/masters/ds2490.c if (st) st 277 drivers/w1/masters/ds2490.c memset(st, 0, sizeof(*st)); st 294 drivers/w1/masters/ds2490.c if (st && count >= sizeof(*st)) st 295 drivers/w1/masters/ds2490.c memcpy(st, dev->st_buf, sizeof(*st)); st 372 drivers/w1/masters/ds2490.c struct ds_status st; st 382 drivers/w1/masters/ds2490.c err = ds_recv_status(dev, &st, false); st 386 drivers/w1/masters/ds2490.c if ((st.status & ST_SPUA) == 0) { st 396 drivers/w1/masters/ds2490.c int ds_detect(struct ds_device *dev, struct ds_status *st) st 416 drivers/w1/masters/ds2490.c err = ds_dump_status(dev, st); st 423 drivers/w1/masters/ds2490.c static int ds_wait_status(struct ds_device *dev, struct ds_status *st) st 428 drivers/w1/masters/ds2490.c st->status = 0; st 429 drivers/w1/masters/ds2490.c err = ds_recv_status(dev, st, false); st 439 drivers/w1/masters/ds2490.c } while (!(st->status & ST_IDLE) && !(err < 0) && ++count < 100); st 441 drivers/w1/masters/ds2490.c if (err >= 16 && st->status & ST_EPOF) { st 535 drivers/w1/masters/ds2490.c struct ds_status st; st 542 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 555 drivers/w1/masters/ds2490.c struct ds_status st; st 566 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 575 drivers/w1/masters/ds2490.c struct ds_status st; st 584 drivers/w1/masters/ds2490.c err = ds_wait_status(dev, &st); st 598 drivers/w1/masters/ds2490.c struct ds_status st; st 604 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 615 drivers/w1/masters/ds2490.c struct ds_status st; st 631 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 642 drivers/w1/masters/ds2490.c struct ds_status st; st 655 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 678 drivers/w1/masters/ds2490.c struct ds_status st; st 716 drivers/w1/masters/ds2490.c err = ds_recv_status(dev, &st, false); st 717 drivers/w1/masters/ds2490.c if (err < 0 || err < sizeof(st)) st 720 drivers/w1/masters/ds2490.c if (st.data_in_buffer_status) { st 744 drivers/w1/masters/ds2490.c } while (!(st.status & (ST_IDLE | ST_HALT))); st 775 drivers/w1/masters/ds2490.c struct ds_status st; st 781 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 787 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 795 drivers/w1/masters/ds2490.c struct ds_status st; st 805 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 811 drivers/w1/masters/ds2490.c ds_wait_status(dev, &st); st 568 drivers/xen/balloon.c enum bp_state st; st 571 drivers/xen/balloon.c st = reserve_additional_memory(); st 572 drivers/xen/balloon.c if (st != BP_ECANCELED) { st 584 drivers/xen/balloon.c st = decrease_reservation(nr_pages, GFP_USER); st 585 drivers/xen/balloon.c if (st != BP_DONE) st 226 drivers/xen/privcmd.c struct mmap_gfn_state *st = state; st 227 drivers/xen/privcmd.c struct vm_area_struct *vma = st->vma; st 232 drivers/xen/privcmd.c ((unsigned long)(msg->npages << PAGE_SHIFT) >= -st->va)) st 236 drivers/xen/privcmd.c if ((msg->va != st->va) || st 244 drivers/xen/privcmd.c st->domain, NULL); st 248 drivers/xen/privcmd.c st->va += msg->npages << PAGE_SHIFT; st 340 drivers/xen/privcmd.c struct mmap_batch_state *st = state; st 341 drivers/xen/privcmd.c struct vm_area_struct *vma = st->vma; st 347 drivers/xen/privcmd.c cur_pages = &pages[st->index]; st 350 drivers/xen/privcmd.c ret = xen_remap_domain_gfn_array(st->vma, st->va & PAGE_MASK, gfnp, nr, st 351 drivers/xen/privcmd.c (int *)gfnp, st->vma->vm_page_prot, st 352 drivers/xen/privcmd.c st->domain, cur_pages); st 357 drivers/xen/privcmd.c st->global_error = -ENOENT; st 360 drivers/xen/privcmd.c if (st->global_error == 0) st 361 drivers/xen/privcmd.c st->global_error = 1; st 364 drivers/xen/privcmd.c st->va += XEN_PAGE_SIZE * nr; st 365 drivers/xen/privcmd.c st->index += nr / XEN_PFN_PER_PAGE; st 370 drivers/xen/privcmd.c static int mmap_return_error(int err, struct mmap_batch_state *st) st 374 drivers/xen/privcmd.c if (st->version == 1) { st 378 drivers/xen/privcmd.c ret = get_user(gfn, st->user_gfn); st 389 drivers/xen/privcmd.c return __put_user(gfn, st->user_gfn++); st 391 drivers/xen/privcmd.c st->user_gfn++; st 394 drivers/xen/privcmd.c return __put_user(err, st->user_err++); st 396 drivers/xen/privcmd.c st->user_err++; st 404 drivers/xen/privcmd.c struct mmap_batch_state *st = state; st 410 drivers/xen/privcmd.c ret = mmap_return_error(errs[i], st); st 89 fs/9p/vfs_dir.c struct p9_wstat st; st 124 fs/9p/vfs_dir.c rdir->tail - rdir->head, &st); st 130 fs/9p/vfs_dir.c over = !dir_emit(ctx, st.name, strlen(st.name), st 131 fs/9p/vfs_dir.c v9fs_qid2ino(&st.qid), dt_type(&st)); st 132 fs/9p/vfs_dir.c p9stat_free(&st); st 450 fs/9p/vfs_inode.c struct p9_wstat *st = (struct p9_wstat *)data; st 453 fs/9p/vfs_inode.c umode = p9mode2unixmode(v9ses, st, &rdev); st 460 fs/9p/vfs_inode.c &st->qid.version, sizeof(v9inode->qid.version))) st 463 fs/9p/vfs_inode.c if (v9inode->qid.type != st->qid.type) st 466 fs/9p/vfs_inode.c if (v9inode->qid.path != st->qid.path) st 479 fs/9p/vfs_inode.c struct p9_wstat *st = (struct p9_wstat *)data; st 481 fs/9p/vfs_inode.c memcpy(&v9inode->qid, &st->qid, sizeof(st->qid)); st 487 fs/9p/vfs_inode.c struct p9_wstat *st, st 504 fs/9p/vfs_inode.c inode = iget5_locked(sb, i_ino, test, v9fs_set_inode, st); st 515 fs/9p/vfs_inode.c umode = p9mode2unixmode(v9ses, st, &rdev); st 520 fs/9p/vfs_inode.c v9fs_stat2inode(st, inode, sb, 0); st 534 fs/9p/vfs_inode.c struct p9_wstat *st; st 537 fs/9p/vfs_inode.c st = p9_client_stat(fid); st 538 fs/9p/vfs_inode.c if (IS_ERR(st)) st 539 fs/9p/vfs_inode.c return ERR_CAST(st); st 541 fs/9p/vfs_inode.c inode = v9fs_qid_iget(sb, &st->qid, st, new); st 542 fs/9p/vfs_inode.c p9stat_free(st); st 543 fs/9p/vfs_inode.c kfree(st); st 1058 fs/9p/vfs_inode.c struct p9_wstat *st; st 1070 fs/9p/vfs_inode.c st = p9_client_stat(fid); st 1071 fs/9p/vfs_inode.c if (IS_ERR(st)) st 1072 fs/9p/vfs_inode.c return PTR_ERR(st); st 1074 fs/9p/vfs_inode.c v9fs_stat2inode(st, d_inode(dentry), dentry->d_sb, 0); st 1077 fs/9p/vfs_inode.c p9stat_free(st); st 1078 fs/9p/vfs_inode.c kfree(st); st 1240 fs/9p/vfs_inode.c struct p9_wstat *st; st 1256 fs/9p/vfs_inode.c st = p9_client_stat(fid); st 1257 fs/9p/vfs_inode.c if (IS_ERR(st)) st 1258 fs/9p/vfs_inode.c return ERR_CAST(st); st 1260 fs/9p/vfs_inode.c if (!(st->mode & P9_DMSYMLINK)) { st 1261 fs/9p/vfs_inode.c p9stat_free(st); st 1262 fs/9p/vfs_inode.c kfree(st); st 1265 fs/9p/vfs_inode.c res = st->extension; st 1266 fs/9p/vfs_inode.c st->extension = NULL; st 1270 fs/9p/vfs_inode.c p9stat_free(st); st 1271 fs/9p/vfs_inode.c kfree(st); st 1400 fs/9p/vfs_inode.c struct p9_wstat *st; st 1405 fs/9p/vfs_inode.c st = p9_client_stat(fid); st 1406 fs/9p/vfs_inode.c if (IS_ERR(st)) st 1407 fs/9p/vfs_inode.c return PTR_ERR(st); st 1411 fs/9p/vfs_inode.c umode = p9mode2unixmode(v9ses, st, &rdev); st 1421 fs/9p/vfs_inode.c v9fs_stat2inode(st, inode, inode->i_sb, flags); st 1423 fs/9p/vfs_inode.c p9stat_free(st); st 1424 fs/9p/vfs_inode.c kfree(st); st 59 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st = (struct p9_stat_dotl *)data; st 62 fs/9p/vfs_inode_dotl.c if ((inode->i_mode & S_IFMT) != (st->st_mode & S_IFMT)) st 65 fs/9p/vfs_inode_dotl.c if (inode->i_generation != st->st_gen) st 70 fs/9p/vfs_inode_dotl.c &st->qid.version, sizeof(v9inode->qid.version))) st 73 fs/9p/vfs_inode_dotl.c if (v9inode->qid.type != st->qid.type) st 76 fs/9p/vfs_inode_dotl.c if (v9inode->qid.path != st->qid.path) st 90 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st = (struct p9_stat_dotl *)data; st 92 fs/9p/vfs_inode_dotl.c memcpy(&v9inode->qid, &st->qid, sizeof(st->qid)); st 93 fs/9p/vfs_inode_dotl.c inode->i_generation = st->st_gen; st 100 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st, st 115 fs/9p/vfs_inode_dotl.c inode = iget5_locked(sb, i_ino, test, v9fs_set_inode_dotl, st); st 127 fs/9p/vfs_inode_dotl.c st->st_mode, new_decode_dev(st->st_rdev)); st 131 fs/9p/vfs_inode_dotl.c v9fs_stat2inode_dotl(st, inode, 0); st 149 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st; st 152 fs/9p/vfs_inode_dotl.c st = p9_client_getattr_dotl(fid, P9_STATS_BASIC | P9_STATS_GEN); st 153 fs/9p/vfs_inode_dotl.c if (IS_ERR(st)) st 154 fs/9p/vfs_inode_dotl.c return ERR_CAST(st); st 156 fs/9p/vfs_inode_dotl.c inode = v9fs_qid_iget_dotl(sb, &st->qid, fid, st, new); st 157 fs/9p/vfs_inode_dotl.c kfree(st); st 464 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st; st 480 fs/9p/vfs_inode_dotl.c st = p9_client_getattr_dotl(fid, P9_STATS_ALL); st 481 fs/9p/vfs_inode_dotl.c if (IS_ERR(st)) st 482 fs/9p/vfs_inode_dotl.c return PTR_ERR(st); st 484 fs/9p/vfs_inode_dotl.c v9fs_stat2inode_dotl(st, d_inode(dentry), 0); st 487 fs/9p/vfs_inode_dotl.c stat->blksize = st->st_blksize; st 489 fs/9p/vfs_inode_dotl.c kfree(st); st 920 fs/9p/vfs_inode_dotl.c struct p9_stat_dotl *st; st 925 fs/9p/vfs_inode_dotl.c st = p9_client_getattr_dotl(fid, P9_STATS_ALL); st 926 fs/9p/vfs_inode_dotl.c if (IS_ERR(st)) st 927 fs/9p/vfs_inode_dotl.c return PTR_ERR(st); st 931 fs/9p/vfs_inode_dotl.c if ((inode->i_mode & S_IFMT) != (st->st_mode & S_IFMT)) st 940 fs/9p/vfs_inode_dotl.c v9fs_stat2inode_dotl(st, inode, flags); st 942 fs/9p/vfs_inode_dotl.c kfree(st); st 157 fs/9p/vfs_super.c struct p9_stat_dotl *st = NULL; st 158 fs/9p/vfs_super.c st = p9_client_getattr_dotl(fid, P9_STATS_BASIC); st 159 fs/9p/vfs_super.c if (IS_ERR(st)) { st 160 fs/9p/vfs_super.c retval = PTR_ERR(st); st 163 fs/9p/vfs_super.c d_inode(root)->i_ino = v9fs_qid2ino(&st->qid); st 164 fs/9p/vfs_super.c v9fs_stat2inode_dotl(st, d_inode(root), 0); st 165 fs/9p/vfs_super.c kfree(st); st 167 fs/9p/vfs_super.c struct p9_wstat *st = NULL; st 168 fs/9p/vfs_super.c st = p9_client_stat(fid); st 169 fs/9p/vfs_super.c if (IS_ERR(st)) { st 170 fs/9p/vfs_super.c retval = PTR_ERR(st); st 174 fs/9p/vfs_super.c d_inode(root)->i_ino = v9fs_qid2ino(&st->qid); st 175 fs/9p/vfs_super.c v9fs_stat2inode(st, d_inode(root), sb, 0); st 177 fs/9p/vfs_super.c p9stat_free(st); st 178 fs/9p/vfs_super.c kfree(st); st 17 fs/affs/affs.h #define GET_END_PTR(st,p,sz) ((st *)((char *)(p)+((sz)-sizeof(st)))) st 50 fs/ceph/super.c struct ceph_statfs st; st 62 fs/ceph/super.c err = ceph_monc_do_statfs(monc, data_pool, &st); st 88 fs/ceph/super.c buf->f_blocks = le64_to_cpu(st.kb) >> (CEPH_BLOCK_SHIFT-10); st 89 fs/ceph/super.c buf->f_bfree = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); st 90 fs/ceph/super.c buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10); st 93 fs/ceph/super.c buf->f_files = le64_to_cpu(st.num_objects); st 952 fs/cifs/netmisc.c SMB_TIME *st = (SMB_TIME *)&time; st 957 fs/cifs/netmisc.c sec = 2 * st->TwoSeconds; st 958 fs/cifs/netmisc.c min = st->Minutes; st 962 fs/cifs/netmisc.c sec += 60 * 60 * st->Hours; st 963 fs/cifs/netmisc.c if (st->Hours > 24) st 964 fs/cifs/netmisc.c cifs_dbg(VFS, "illegal hours %d\n", st->Hours); st 433 fs/fuse/inode.c convert_fuse_statfs(buf, &outarg.st); st 1921 fs/gfs2/rgrp.c struct gfs2_lkstats *st; st 1931 fs/gfs2/rgrp.c st = &per_cpu_ptr(sdp->sd_lkstats, cpu)->lkstats[LM_TYPE_RGRP]; st 1932 fs/gfs2/rgrp.c if (st->stats[GFS2_LKS_SRTTB]) { st 1933 fs/gfs2/rgrp.c a_srttb += st->stats[GFS2_LKS_SRTTB]; st 1937 fs/gfs2/rgrp.c st = &this_cpu_ptr(sdp->sd_lkstats)->lkstats[LM_TYPE_RGRP]; st 1940 fs/gfs2/rgrp.c r_dcount = st->stats[GFS2_LKS_DCOUNT]; st 1941 fs/gfs2/rgrp.c var = st->stats[GFS2_LKS_SRTTVARB] + st 515 fs/hostfs/hostfs_kern.c struct hostfs_stat st; st 516 fs/hostfs/hostfs_kern.c int err = stat_file(name, &st, -1); st 521 fs/hostfs/hostfs_kern.c rdev = MKDEV(st.maj, st.min); st 523 fs/hostfs/hostfs_kern.c switch (st.mode & S_IFMT) { st 535 fs/hostfs/hostfs_kern.c init_special_inode(ino, st.mode & S_IFMT, rdev); st 547 fs/hostfs/hostfs_kern.c ino->i_ino = st.ino; st 548 fs/hostfs/hostfs_kern.c ino->i_mode = st.mode; st 549 fs/hostfs/hostfs_kern.c set_nlink(ino, st.nlink); st 550 fs/hostfs/hostfs_kern.c i_uid_write(ino, st.uid); st 551 fs/hostfs/hostfs_kern.c i_gid_write(ino, st.gid); st 552 fs/hostfs/hostfs_kern.c ino->i_atime = timespec_to_timespec64(st.atime); st 553 fs/hostfs/hostfs_kern.c ino->i_mtime = timespec_to_timespec64(st.mtime); st 554 fs/hostfs/hostfs_kern.c ino->i_ctime = timespec_to_timespec64(st.ctime); st 555 fs/hostfs/hostfs_kern.c ino->i_size = st.size; st 556 fs/hostfs/hostfs_kern.c ino->i_blocks = st.blocks; st 196 fs/hostfs/hostfs_user.c struct hostfs_stat st; st 240 fs/hostfs/hostfs_user.c err = stat_file(file, &st, fd); st 244 fs/hostfs/hostfs_user.c times[0].tv_sec = st.atime.tv_sec; st 245 fs/hostfs/hostfs_user.c times[0].tv_usec = st.atime.tv_nsec / 1000; st 246 fs/hostfs/hostfs_user.c times[1].tv_sec = st.mtime.tv_sec; st 247 fs/hostfs/hostfs_user.c times[1].tv_usec = st.mtime.tv_nsec / 1000; st 268 fs/hostfs/hostfs_user.c err = stat_file(file, &st, fd); st 269 fs/hostfs/hostfs_user.c attrs->ia_atime = st.atime; st 270 fs/hostfs/hostfs_user.c attrs->ia_mtime = st.mtime; st 17 fs/nfsd/nfs2acl.c #define RETURN_STATUS(st) { resp->status = (st); return (st); } st 16 fs/nfsd/nfs3acl.c #define RETURN_STATUS(st) { resp->status = (st); return (st); } st 18 fs/nfsd/nfs3proc.c #define RETURN_STATUS(st) { resp->status = (st); return (st); } st 2367 fs/nfsd/nfs4state.c static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) st 2375 fs/nfsd/nfs4state.c if (st->sc_type != NFS4_OPEN_STID && st->sc_type != NFS4_LOCK_STID) st 2377 fs/nfsd/nfs4state.c ols = openlockstateid(st); st 2379 fs/nfsd/nfs4state.c nf = st->sc_file; st 2382 fs/nfsd/nfs4state.c seq_printf(s, "- 0x%16phN: { type: open, ", &st->sc_stateid); st 2403 fs/nfsd/nfs4state.c static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st) st 2410 fs/nfsd/nfs4state.c ols = openlockstateid(st); st 2412 fs/nfsd/nfs4state.c nf = st->sc_file; st 2415 fs/nfsd/nfs4state.c seq_printf(s, "- 0x%16phN: { type: lock, ", &st->sc_stateid); st 2434 fs/nfsd/nfs4state.c static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st) st 2440 fs/nfsd/nfs4state.c ds = delegstateid(st); st 2441 fs/nfsd/nfs4state.c nf = st->sc_file; st 2444 fs/nfsd/nfs4state.c seq_printf(s, "- 0x%16phN: { type: deleg, ", &st->sc_stateid); st 2458 fs/nfsd/nfs4state.c static int nfs4_show_layout(struct seq_file *s, struct nfs4_stid *st) st 2463 fs/nfsd/nfs4state.c ls = container_of(st, struct nfs4_layout_stateid, ls_stid); st 2466 fs/nfsd/nfs4state.c seq_printf(s, "- 0x%16phN: { type: layout, ", &st->sc_stateid); st 2478 fs/nfsd/nfs4state.c struct nfs4_stid *st = v; st 2480 fs/nfsd/nfs4state.c switch (st->sc_type) { st 2482 fs/nfsd/nfs4state.c return nfs4_show_open(s, st); st 2484 fs/nfsd/nfs4state.c return nfs4_show_lock(s, st); st 2486 fs/nfsd/nfs4state.c return nfs4_show_deleg(s, st); st 2488 fs/nfsd/nfs4state.c return nfs4_show_layout(s, st); st 176 fs/ocfs2/cluster/masklog.h #define mlog_errno(st) ({ \ st 177 fs/ocfs2/cluster/masklog.h int _st = (st); \ st 76 fs/ocfs2/dlm/dlmapi.h #define dlm_error(st) do { \ st 77 fs/ocfs2/dlm/dlmapi.h if ((st) != DLM_RECOVERING && \ st 78 fs/ocfs2/dlm/dlmapi.h (st) != DLM_MIGRATING && \ st 79 fs/ocfs2/dlm/dlmapi.h (st) != DLM_FORWARD) \ st 80 fs/ocfs2/dlm/dlmapi.h mlog(ML_ERROR, "dlm status = %s\n", dlm_errname((st))); \ st 75 fs/ocfs2/dlm/dlmrecovery.c static void dlm_reco_unlock_ast(void *astdata, enum dlm_status st); st 248 fs/ocfs2/dlm/dlmrecovery.c char *st = "unknown"; st 251 fs/ocfs2/dlm/dlmrecovery.c st = "init"; st 254 fs/ocfs2/dlm/dlmrecovery.c st = "requesting"; st 257 fs/ocfs2/dlm/dlmrecovery.c st = "dead"; st 260 fs/ocfs2/dlm/dlmrecovery.c st = "receiving"; st 263 fs/ocfs2/dlm/dlmrecovery.c st = "requested"; st 266 fs/ocfs2/dlm/dlmrecovery.c st = "done"; st 269 fs/ocfs2/dlm/dlmrecovery.c st = "finalize-sent"; st 272 fs/ocfs2/dlm/dlmrecovery.c st = "bad"; st 276 fs/ocfs2/dlm/dlmrecovery.c dlm->name, ndata->node_num, st); st 2537 fs/ocfs2/dlm/dlmrecovery.c static void dlm_reco_unlock_ast(void *astdata, enum dlm_status st) st 297 fs/stat.c # define INIT_STRUCT_STAT_PADDING(st) memset(&st, 0, sizeof(st)) st 440 fs/stat.c # define INIT_STRUCT_STAT64_PADDING(st) memset(&st, 0, sizeof(st)) st 72 fs/statfs.c struct kstatfs st; st 75 fs/statfs.c error = statfs_by_dentry(dentry, &st); st 79 fs/statfs.c *fsid = st.f_fsid; st 95 fs/statfs.c int user_statfs(const char __user *pathname, struct kstatfs *st) st 103 fs/statfs.c error = vfs_statfs(&path, st); st 113 fs/statfs.c int fd_statfs(int fd, struct kstatfs *st) st 118 fs/statfs.c error = vfs_statfs(&f.file->f_path, st); st 124 fs/statfs.c static int do_statfs_native(struct kstatfs *st, struct statfs __user *p) st 128 fs/statfs.c if (sizeof(buf) == sizeof(*st)) st 129 fs/statfs.c memcpy(&buf, st, sizeof(*st)); st 132 fs/statfs.c if ((st->f_blocks | st->f_bfree | st->f_bavail | st 133 fs/statfs.c st->f_bsize | st->f_frsize) & st 140 fs/statfs.c if (st->f_files != -1 && st 141 fs/statfs.c (st->f_files & 0xffffffff00000000ULL)) st 143 fs/statfs.c if (st->f_ffree != -1 && st 144 fs/statfs.c (st->f_ffree & 0xffffffff00000000ULL)) st 148 fs/statfs.c buf.f_type = st->f_type; st 149 fs/statfs.c buf.f_bsize = st->f_bsize; st 150 fs/statfs.c buf.f_blocks = st->f_blocks; st 151 fs/statfs.c buf.f_bfree = st->f_bfree; st 152 fs/statfs.c buf.f_bavail = st->f_bavail; st 153 fs/statfs.c buf.f_files = st->f_files; st 154 fs/statfs.c buf.f_ffree = st->f_ffree; st 155 fs/statfs.c buf.f_fsid = st->f_fsid; st 156 fs/statfs.c buf.f_namelen = st->f_namelen; st 157 fs/statfs.c buf.f_frsize = st->f_frsize; st 158 fs/statfs.c buf.f_flags = st->f_flags; st 166 fs/statfs.c static int do_statfs64(struct kstatfs *st, struct statfs64 __user *p) st 169 fs/statfs.c if (sizeof(buf) == sizeof(*st)) st 170 fs/statfs.c memcpy(&buf, st, sizeof(*st)); st 172 fs/statfs.c buf.f_type = st->f_type; st 173 fs/statfs.c buf.f_bsize = st->f_bsize; st 174 fs/statfs.c buf.f_blocks = st->f_blocks; st 175 fs/statfs.c buf.f_bfree = st->f_bfree; st 176 fs/statfs.c buf.f_bavail = st->f_bavail; st 177 fs/statfs.c buf.f_files = st->f_files; st 178 fs/statfs.c buf.f_ffree = st->f_ffree; st 179 fs/statfs.c buf.f_fsid = st->f_fsid; st 180 fs/statfs.c buf.f_namelen = st->f_namelen; st 181 fs/statfs.c buf.f_frsize = st->f_frsize; st 182 fs/statfs.c buf.f_flags = st->f_flags; st 192 fs/statfs.c struct kstatfs st; st 193 fs/statfs.c int error = user_statfs(pathname, &st); st 195 fs/statfs.c error = do_statfs_native(&st, buf); st 201 fs/statfs.c struct kstatfs st; st 205 fs/statfs.c error = user_statfs(pathname, &st); st 207 fs/statfs.c error = do_statfs64(&st, buf); st 213 fs/statfs.c struct kstatfs st; st 214 fs/statfs.c int error = fd_statfs(fd, &st); st 216 fs/statfs.c error = do_statfs_native(&st, buf); st 222 fs/statfs.c struct kstatfs st; st 228 fs/statfs.c error = fd_statfs(fd, &st); st 230 fs/statfs.c error = do_statfs64(&st, buf); st 116 fs/udf/partition.c struct sparingTable *st = NULL; st 128 fs/udf/partition.c st = (struct sparingTable *) st 134 fs/udf/partition.c if (st) { st 135 fs/udf/partition.c for (i = 0; i < le16_to_cpu(st->reallocationTableLen); i++) { st 136 fs/udf/partition.c struct sparingEntry *entry = &st->mapEntry[i]; st 155 fs/udf/partition.c struct sparingTable *st = NULL; st 175 fs/udf/partition.c st = (struct sparingTable *) st 180 fs/udf/partition.c if (!st) { st 186 fs/udf/partition.c le16_to_cpu(st->reallocationTableLen); st 188 fs/udf/partition.c struct sparingEntry *entry = &st->mapEntry[k]; st 198 fs/udf/partition.c st = (struct sparingTable *) st 206 fs/udf/partition.c udf_update_tag((char *)st, len); st 229 fs/udf/partition.c struct sparingEntry *entry = &st->mapEntry[l]; st 240 fs/udf/partition.c st = (struct sparingTable *)bh->b_data; st 241 fs/udf/partition.c mapEntry = st->mapEntry[l]; st 244 fs/udf/partition.c memmove(&st->mapEntry[k + 1], st 245 fs/udf/partition.c &st->mapEntry[k], st 248 fs/udf/partition.c st->mapEntry[k] = mapEntry; st 249 fs/udf/partition.c udf_update_tag((char *)st, st 257 fs/udf/partition.c st->mapEntry[k].mappedLocation) + st 1336 fs/udf/super.c struct sparingTable *st; st 1362 fs/udf/super.c st = (struct sparingTable *)bh->b_data; st 1364 fs/udf/super.c strncmp(st->sparingIdent.ident, UDF_ID_SPARING, st 1366 fs/udf/super.c sizeof(*st) + le16_to_cpu(st->reallocationTableLen) > st 21 include/crypto/sha3.h u64 st[25]; st 39 include/drm/drm_cache.h void drm_clflush_sg(struct sg_table *st); st 24 include/drm/intel-gtt.h void intel_gtt_insert_sg_entries(struct sg_table *st, st 184 include/linux/ceph/ceph_fs.h struct ceph_statfs st; st 65 include/linux/ceph/mon_client.h struct ceph_statfs *st; st 1292 include/linux/dmaengine.h dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue) st 1294 include/linux/dmaengine.h if (st) { st 1295 include/linux/dmaengine.h st->last = last; st 1296 include/linux/dmaengine.h st->used = used; st 1297 include/linux/dmaengine.h st->residue = residue; st 250 include/linux/hid-sensor-hub.h struct hid_sensor_common *st); st 251 include/linux/hid-sensor-hub.h int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st, st 253 include/linux/hid-sensor-hub.h int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st, st 255 include/linux/hid-sensor-hub.h int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st, st 257 include/linux/hid-sensor-hub.h int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st, st 267 include/linux/hid-sensor-hub.h s32 hid_sensor_read_poll_value(struct hid_sensor_common *st); st 269 include/linux/hid-sensor-hub.h int64_t hid_sensor_convert_timestamp(struct hid_sensor_common *st, st 271 include/linux/hid-sensor-hub.h bool hid_sensor_batch_mode_supported(struct hid_sensor_common *st); st 272 include/linux/hid-sensor-hub.h int hid_sensor_set_report_latency(struct hid_sensor_common *st, int latency); st 273 include/linux/hid-sensor-hub.h int hid_sensor_get_report_latency(struct hid_sensor_common *st); st 143 include/linux/iio/common/cros_ec_sensors_core.h int cros_ec_motion_send_host_cmd(struct cros_ec_sensors_core_state *st, st 156 include/linux/iio/common/cros_ec_sensors_core.h int cros_ec_sensors_core_read(struct cros_ec_sensors_core_state *st, st 188 include/linux/iio/common/cros_ec_sensors_core.h int cros_ec_sensors_core_write(struct cros_ec_sensors_core_state *st, st 473 include/linux/mISDNif.h struct mISDNstack *st; st 2595 include/linux/mlx5/mlx5_ifc.h u8 st[0x8]; st 3384 include/linux/mlx5/mlx5_ifc.h u8 st[0x4]; st 3534 include/linux/mlx5/mlx5_ifc.h u8 st[0x4]; st 212 include/linux/mlx5/mlx5_ifc_fpga.h u8 st[0x4]; st 55 include/linux/sched/cputime.h extern void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); st 56 include/linux/sched/cputime.h extern void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st); st 58 include/linux/sched/cputime.h u64 *ut, u64 *st); st 1161 include/linux/skbuff.h unsigned int to, struct skb_seq_state *st); st 1163 include/linux/skbuff.h struct skb_seq_state *st); st 1164 include/linux/skbuff.h void skb_abort_seq_read(struct skb_seq_state *st); st 82 include/linux/sunrpc/stats.h const struct svc_stat *st) {} st 44 include/linux/usb/musb.h #define MUSB_EP_FIFO(ep, st, m, pkt) \ st 47 include/linux/usb/musb.h .style = st, \ st 52 include/linux/usb/musb.h #define MUSB_EP_FIFO_SINGLE(ep, st, pkt) \ st 53 include/linux/usb/musb.h MUSB_EP_FIFO(ep, st, BUF_SINGLE, pkt) st 55 include/linux/usb/musb.h #define MUSB_EP_FIFO_DOUBLE(ep, st, pkt) \ st 56 include/linux/usb/musb.h MUSB_EP_FIFO(ep, st, BUF_DOUBLE, pkt) st 118 include/net/cfg802154.h wpan_phy_supported_bool(bool b, enum nl802154_supported_bool_states st) st 120 include/net/cfg802154.h switch (st) { st 375 include/net/dsa.h struct fixed_phy_status *st); st 59 include/net/gen_stats.h int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); st 5954 include/net/mac80211.h void *priv_sta, struct ieee80211_tx_status *st); st 460 include/soc/fsl/qman.h struct qm_fqd_stashing *st = &fqd->context_a.stashing; st 462 include/soc/fsl/qman.h st->cl = ((as & QM_FQD_XS_MASK) << QM_FQD_AS_OFF) | st 852 include/uapi/linux/dvb/frontend.h struct dtv_fe_stats st; st 641 include/uapi/linux/fuse.h struct fuse_kstatfs st; st 296 init/initramfs.c struct kstat st; st 298 init/initramfs.c if (!vfs_lstat(path, &st) && (st.mode ^ fmode) & S_IFMT) { st 299 init/initramfs.c if (S_ISDIR(st.mode)) st 590 init/initramfs.c struct kstat st; st 593 init/initramfs.c ret = vfs_lstat(dirp->d_name, &st); st 596 init/initramfs.c if (S_ISDIR(st.mode)) st 1384 kernel/bpf/syscall.c const struct bpf_prog_stats *st; st 1388 kernel/bpf/syscall.c st = per_cpu_ptr(prog->aux->stats, cpu); st 1390 kernel/bpf/syscall.c start = u64_stats_fetch_begin_irq(&st->syncp); st 1391 kernel/bpf/syscall.c tnsecs = st->nsecs; st 1392 kernel/bpf/syscall.c tcnt = st->cnt; st 1393 kernel/bpf/syscall.c } while (u64_stats_fetch_retry_irq(&st->syncp, start)); st 165 kernel/bpf/verifier.c struct bpf_verifier_state st; st 758 kernel/bpf/verifier.c static void update_branch_counts(struct bpf_verifier_env *env, struct bpf_verifier_state *st) st 760 kernel/bpf/verifier.c while (st) { st 761 kernel/bpf/verifier.c u32 br = --st->branches; st 771 kernel/bpf/verifier.c st = st->parent; st 786 kernel/bpf/verifier.c err = copy_verifier_state(cur, &head->st); st 795 kernel/bpf/verifier.c free_verifier_state(&head->st, false); st 819 kernel/bpf/verifier.c err = copy_verifier_state(&elem->st, cur); st 822 kernel/bpf/verifier.c elem->st.speculative |= speculative; st 828 kernel/bpf/verifier.c if (elem->st.parent) { st 829 kernel/bpf/verifier.c ++elem->st.parent->branches; st 840 kernel/bpf/verifier.c return &elem->st; st 1424 kernel/bpf/verifier.c static int get_prev_insn_idx(struct bpf_verifier_state *st, int i, st 1429 kernel/bpf/verifier.c if (cnt && st->jmp_history[cnt - 1].idx == i) { st 1430 kernel/bpf/verifier.c i = st->jmp_history[cnt - 1].prev_idx; st 1631 kernel/bpf/verifier.c struct bpf_verifier_state *st) st 1640 kernel/bpf/verifier.c for (; st; st = st->parent) st 1641 kernel/bpf/verifier.c for (i = 0; i <= st->curframe; i++) { st 1642 kernel/bpf/verifier.c func = st->frame[i]; st 1663 kernel/bpf/verifier.c struct bpf_verifier_state *st = env->cur_state; st 1664 kernel/bpf/verifier.c int first_idx = st->first_insn_idx; st 1678 kernel/bpf/verifier.c func = st->frame[st->curframe]; st 1716 kernel/bpf/verifier.c u32 history = st->jmp_history_cnt; st 1728 kernel/bpf/verifier.c mark_all_scalars_precise(env, st); st 1741 kernel/bpf/verifier.c i = get_prev_insn_idx(st, i, &history); st 1754 kernel/bpf/verifier.c st = st->parent; st 1755 kernel/bpf/verifier.c if (!st) st 1759 kernel/bpf/verifier.c func = st->frame[st->curframe]; st 1788 kernel/bpf/verifier.c mark_all_scalars_precise(env, st); st 1817 kernel/bpf/verifier.c last_idx = st->last_insn_idx; st 1818 kernel/bpf/verifier.c first_idx = st->first_insn_idx; st 6799 kernel/bpf/verifier.c struct bpf_func_state *st) st 6805 kernel/bpf/verifier.c live = st->regs[i].live; st 6807 kernel/bpf/verifier.c st->regs[i].live |= REG_LIVE_DONE; st 6812 kernel/bpf/verifier.c __mark_reg_not_init(env, &st->regs[i]); st 6815 kernel/bpf/verifier.c for (i = 0; i < st->allocated_stack / BPF_REG_SIZE; i++) { st 6816 kernel/bpf/verifier.c live = st->stack[i].spilled_ptr.live; st 6818 kernel/bpf/verifier.c st->stack[i].spilled_ptr.live |= REG_LIVE_DONE; st 6820 kernel/bpf/verifier.c __mark_reg_not_init(env, &st->stack[i].spilled_ptr); st 6822 kernel/bpf/verifier.c st->stack[i].slot_type[j] = STACK_INVALID; st 6828 kernel/bpf/verifier.c struct bpf_verifier_state *st) st 6832 kernel/bpf/verifier.c if (st->frame[0]->regs[0].live & REG_LIVE_DONE) st 6836 kernel/bpf/verifier.c for (i = 0; i <= st->curframe; i++) st 6837 kernel/bpf/verifier.c clean_func_state(env, st->frame[i]); st 151 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 157 kernel/cpu.c if (st->fail == state) { st 158 kernel/cpu.c st->fail = CPUHP_INVALID; st 171 kernel/cpu.c trace_cpuhp_enter(cpu, st->target, state, cb); st 173 kernel/cpu.c trace_cpuhp_exit(cpu, st->state, state, ret); st 183 kernel/cpu.c trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node); st 185 kernel/cpu.c trace_cpuhp_exit(cpu, st->state, state, ret); st 195 kernel/cpu.c trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node); st 197 kernel/cpu.c trace_cpuhp_exit(cpu, st->state, state, ret); st 220 kernel/cpu.c trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node); st 222 kernel/cpu.c trace_cpuhp_exit(cpu, st->state, state, ret); st 241 kernel/cpu.c static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup) st 243 kernel/cpu.c struct completion *done = bringup ? &st->done_up : &st->done_down; st 247 kernel/cpu.c static inline void complete_ap_thread(struct cpuhp_cpu_state *st, bool bringup) st 249 kernel/cpu.c struct completion *done = bringup ? &st->done_up : &st->done_down; st 453 kernel/cpu.c cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target) st 455 kernel/cpu.c enum cpuhp_state prev_state = st->state; st 457 kernel/cpu.c st->rollback = false; st 458 kernel/cpu.c st->last = NULL; st 460 kernel/cpu.c st->target = target; st 461 kernel/cpu.c st->single = false; st 462 kernel/cpu.c st->bringup = st->state < target; st 468 kernel/cpu.c cpuhp_reset_state(struct cpuhp_cpu_state *st, enum cpuhp_state prev_state) st 470 kernel/cpu.c st->rollback = true; st 476 kernel/cpu.c if (!st->last) { st 477 kernel/cpu.c if (st->bringup) st 478 kernel/cpu.c st->state--; st 480 kernel/cpu.c st->state++; st 483 kernel/cpu.c st->target = prev_state; st 484 kernel/cpu.c st->bringup = !st->bringup; st 488 kernel/cpu.c static void __cpuhp_kick_ap(struct cpuhp_cpu_state *st) st 490 kernel/cpu.c if (!st->single && st->state == st->target) st 493 kernel/cpu.c st->result = 0; st 499 kernel/cpu.c st->should_run = true; st 500 kernel/cpu.c wake_up_process(st->thread); st 501 kernel/cpu.c wait_for_ap_thread(st, st->bringup); st 504 kernel/cpu.c static int cpuhp_kick_ap(struct cpuhp_cpu_state *st, enum cpuhp_state target) st 509 kernel/cpu.c prev_state = cpuhp_set_state(st, target); st 510 kernel/cpu.c __cpuhp_kick_ap(st); st 511 kernel/cpu.c if ((ret = st->result)) { st 512 kernel/cpu.c cpuhp_reset_state(st, prev_state); st 513 kernel/cpu.c __cpuhp_kick_ap(st); st 521 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 524 kernel/cpu.c wait_for_ap_thread(st, true); st 529 kernel/cpu.c kthread_unpark(st->thread); st 541 kernel/cpu.c if (st->target <= CPUHP_AP_ONLINE_IDLE) st 544 kernel/cpu.c return cpuhp_kick_ap(st, st->target); st 571 kernel/cpu.c static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st) st 573 kernel/cpu.c for (st->state--; st->state > st->target; st->state--) st 574 kernel/cpu.c cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL); st 577 kernel/cpu.c static inline bool can_rollback_cpu(struct cpuhp_cpu_state *st) st 588 kernel/cpu.c return st->state <= CPUHP_BRINGUP_CPU; st 591 kernel/cpu.c static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, st 594 kernel/cpu.c enum cpuhp_state prev_state = st->state; st 597 kernel/cpu.c while (st->state < target) { st 598 kernel/cpu.c st->state++; st 599 kernel/cpu.c ret = cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL); st 601 kernel/cpu.c if (can_rollback_cpu(st)) { st 602 kernel/cpu.c st->target = prev_state; st 603 kernel/cpu.c undo_cpu_up(cpu, st); st 616 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 618 kernel/cpu.c init_completion(&st->done_up); st 619 kernel/cpu.c init_completion(&st->done_down); st 624 kernel/cpu.c struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); st 626 kernel/cpu.c return st->should_run; st 645 kernel/cpu.c struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); st 646 kernel/cpu.c bool bringup = st->bringup; st 649 kernel/cpu.c if (WARN_ON_ONCE(!st->should_run)) st 666 kernel/cpu.c if (st->single) { st 667 kernel/cpu.c state = st->cb_state; st 668 kernel/cpu.c st->should_run = false; st 671 kernel/cpu.c st->state++; st 672 kernel/cpu.c state = st->state; st 673 kernel/cpu.c st->should_run = (st->state < st->target); st 674 kernel/cpu.c WARN_ON_ONCE(st->state > st->target); st 676 kernel/cpu.c state = st->state; st 677 kernel/cpu.c st->state--; st 678 kernel/cpu.c st->should_run = (st->state > st->target); st 679 kernel/cpu.c WARN_ON_ONCE(st->state < st->target); st 687 kernel/cpu.c st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last); st 693 kernel/cpu.c WARN_ON_ONCE(st->result); st 695 kernel/cpu.c st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last); st 698 kernel/cpu.c if (st->result) { st 704 kernel/cpu.c WARN_ON_ONCE(st->rollback); st 705 kernel/cpu.c st->should_run = false; st 711 kernel/cpu.c if (!st->should_run) st 712 kernel/cpu.c complete_ap_thread(st, bringup); st 720 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 736 kernel/cpu.c if (!st->thread) st 739 kernel/cpu.c st->rollback = false; st 740 kernel/cpu.c st->last = NULL; st 742 kernel/cpu.c st->node = node; st 743 kernel/cpu.c st->bringup = bringup; st 744 kernel/cpu.c st->cb_state = state; st 745 kernel/cpu.c st->single = true; st 747 kernel/cpu.c __cpuhp_kick_ap(st); st 752 kernel/cpu.c if ((ret = st->result) && st->last) { st 753 kernel/cpu.c st->rollback = true; st 754 kernel/cpu.c st->bringup = !bringup; st 756 kernel/cpu.c __cpuhp_kick_ap(st); st 763 kernel/cpu.c st->node = st->last = NULL; st 769 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 770 kernel/cpu.c enum cpuhp_state prev_state = st->state; st 779 kernel/cpu.c trace_cpuhp_enter(cpu, st->target, prev_state, cpuhp_kick_ap_work); st 780 kernel/cpu.c ret = cpuhp_kick_ap(st, st->target); st 781 kernel/cpu.c trace_cpuhp_exit(cpu, st->state, prev_state, ret); st 846 kernel/cpu.c struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); st 847 kernel/cpu.c enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE); st 860 kernel/cpu.c WARN_ON(st->state != CPUHP_TEARDOWN_CPU); st 861 kernel/cpu.c st->state--; st 863 kernel/cpu.c for (; st->state > target; st->state--) { st 864 kernel/cpu.c ret = cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL); st 882 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 914 kernel/cpu.c wait_for_ap_thread(st, false); st 915 kernel/cpu.c BUG_ON(st->state != CPUHP_AP_IDLE_DEAD); st 931 kernel/cpu.c struct cpuhp_cpu_state *st = arg; st 933 kernel/cpu.c complete_ap_thread(st, false); st 938 kernel/cpu.c struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); st 940 kernel/cpu.c BUG_ON(st->state != CPUHP_AP_OFFLINE); st 942 kernel/cpu.c st->state = CPUHP_AP_IDLE_DEAD; st 948 kernel/cpu.c cpuhp_complete_idle_dead, st, 0); st 951 kernel/cpu.c static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st) st 953 kernel/cpu.c for (st->state++; st->state < st->target; st->state++) st 954 kernel/cpu.c cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL); st 957 kernel/cpu.c static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, st 960 kernel/cpu.c enum cpuhp_state prev_state = st->state; st 963 kernel/cpu.c for (; st->state > target; st->state--) { st 964 kernel/cpu.c ret = cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL); st 966 kernel/cpu.c st->target = prev_state; st 967 kernel/cpu.c if (st->state < prev_state) st 968 kernel/cpu.c undo_cpu_down(cpu, st); st 979 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 992 kernel/cpu.c prev_state = cpuhp_set_state(st, target); st 997 kernel/cpu.c if (st->state > CPUHP_TEARDOWN_CPU) { st 998 kernel/cpu.c st->target = max((int)target, CPUHP_TEARDOWN_CPU); st 1011 kernel/cpu.c if (st->state > CPUHP_TEARDOWN_CPU) st 1014 kernel/cpu.c st->target = target; st 1020 kernel/cpu.c ret = cpuhp_down_callbacks(cpu, st, target); st 1021 kernel/cpu.c if (ret && st->state == CPUHP_TEARDOWN_CPU && st->state < prev_state) { st 1022 kernel/cpu.c cpuhp_reset_state(st, prev_state); st 1023 kernel/cpu.c __cpuhp_kick_ap(st); st 1073 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1074 kernel/cpu.c enum cpuhp_state target = min((int)st->target, CPUHP_AP_ONLINE); st 1079 kernel/cpu.c while (st->state < target) { st 1080 kernel/cpu.c st->state++; st 1081 kernel/cpu.c ret = cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL); st 1096 kernel/cpu.c struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state); st 1108 kernel/cpu.c st->state = CPUHP_AP_ONLINE_IDLE; st 1109 kernel/cpu.c complete_ap_thread(st, true); st 1115 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1130 kernel/cpu.c if (st->state >= target) st 1133 kernel/cpu.c if (st->state == CPUHP_OFFLINE) { st 1144 kernel/cpu.c cpuhp_set_state(st, target); st 1149 kernel/cpu.c if (st->state > CPUHP_BRINGUP_CPU) { st 1165 kernel/cpu.c ret = cpuhp_up_callbacks(cpu, st, target); st 1662 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1663 kernel/cpu.c int cpustate = st->state; st 1698 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1699 kernel/cpu.c int cpustate = st->state; st 1781 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1782 kernel/cpu.c int cpustate = st->state; st 1845 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1846 kernel/cpu.c int cpustate = st->state; st 1897 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); st 1898 kernel/cpu.c int cpustate = st->state; st 1993 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id); st 1995 kernel/cpu.c return sprintf(buf, "%d\n", st->state); st 2003 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id); st 2030 kernel/cpu.c if (st->state < target) st 2042 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id); st 2044 kernel/cpu.c return sprintf(buf, "%d\n", st->target); st 2053 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id); st 2081 kernel/cpu.c st->fail = fail; st 2089 kernel/cpu.c struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id); st 2091 kernel/cpu.c return sprintf(buf, "%d\n", st->fail); st 445 kernel/sched/cputime.c u64 *ut, u64 *st) st 448 kernel/sched/cputime.c *st = curr->stime; st 451 kernel/sched/cputime.c void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) st 454 kernel/sched/cputime.c *st = p->stime; st 458 kernel/sched/cputime.c void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) st 465 kernel/sched/cputime.c *st = cputime.stime; st 592 kernel/sched/cputime.c u64 *ut, u64 *st) st 659 kernel/sched/cputime.c *st = prev->stime; st 663 kernel/sched/cputime.c void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) st 670 kernel/sched/cputime.c cputime_adjust(&cputime, &p->prev_cputime, ut, st); st 674 kernel/sched/cputime.c void thread_group_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st) st 679 kernel/sched/cputime.c cputime_adjust(&cputime, &p->signal->prev_cputime, ut, st); st 208 lib/textsearch.c struct ts_linear_state *st = (struct ts_linear_state *) state->cb; st 210 lib/textsearch.c if (likely(consumed < st->len)) { st 211 lib/textsearch.c *dst = st->data + consumed; st 212 lib/textsearch.c return st->len - consumed; st 235 lib/textsearch.c struct ts_linear_state *st = (struct ts_linear_state *) state->cb; st 238 lib/textsearch.c st->data = data; st 239 lib/textsearch.c st->len = len; st 545 net/9p/protocol.c int p9stat_read(struct p9_client *clnt, char *buf, int len, struct p9_wstat *st) st 555 net/9p/protocol.c ret = p9pdu_readf(&fake_pdu, clnt->proto_version, "S", st); st 1336 net/atm/lec.c static const char *get_status_string(unsigned char st) st 1338 net/atm/lec.c switch (st) { st 620 net/batman-adv/main.c struct skb_seq_state st; st 627 net/batman-adv/main.c skb_prepare_seq_read(skb, from, to, &st); st 628 net/batman-adv/main.c while ((len = skb_seq_read(consumed, &data, &st)) != 0) { st 142 net/bridge/netfilter/ebt_stp.c const struct stp_config_pdu *st; st 145 net/bridge/netfilter/ebt_stp.c st = skb_header_pointer(skb, sizeof(_stph), st 147 net/bridge/netfilter/ebt_stp.c if (st == NULL) st 149 net/bridge/netfilter/ebt_stp.c return ebt_filter_config(info, st); st 685 net/ceph/mon_client.c *req->u.st = reply->st; /* struct */ st 720 net/ceph/mon_client.c req->u.st = buf; st 370 net/core/gen_stats.c gnet_stats_copy_app(struct gnet_dump *d, void *st, int len) st 373 net/core/gen_stats.c d->xstats = kmemdup(st, len, GFP_ATOMIC); st 380 net/core/gen_stats.c return gnet_stats_copy(d, TCA_STATS_APP, st, len, st 2081 net/core/neighbour.c struct neigh_statistics *st; st 2083 net/core/neighbour.c st = per_cpu_ptr(tbl->stats, cpu); st 2084 net/core/neighbour.c ndst.ndts_allocs += st->allocs; st 2085 net/core/neighbour.c ndst.ndts_destroys += st->destroys; st 2086 net/core/neighbour.c ndst.ndts_hash_grows += st->hash_grows; st 2087 net/core/neighbour.c ndst.ndts_res_failed += st->res_failed; st 2088 net/core/neighbour.c ndst.ndts_lookups += st->lookups; st 2089 net/core/neighbour.c ndst.ndts_hits += st->hits; st 2090 net/core/neighbour.c ndst.ndts_rcv_probes_mcast += st->rcv_probes_mcast; st 2091 net/core/neighbour.c ndst.ndts_rcv_probes_ucast += st->rcv_probes_ucast; st 2092 net/core/neighbour.c ndst.ndts_periodic_gc_runs += st->periodic_gc_runs; st 2093 net/core/neighbour.c ndst.ndts_forced_gc_runs += st->forced_gc_runs; st 2094 net/core/neighbour.c ndst.ndts_table_fulls += st->table_fulls; st 3304 net/core/neighbour.c struct neigh_statistics *st = v; st 3315 net/core/neighbour.c st->allocs, st 3316 net/core/neighbour.c st->destroys, st 3317 net/core/neighbour.c st->hash_grows, st 3319 net/core/neighbour.c st->lookups, st 3320 net/core/neighbour.c st->hits, st 3322 net/core/neighbour.c st->res_failed, st 3324 net/core/neighbour.c st->rcv_probes_mcast, st 3325 net/core/neighbour.c st->rcv_probes_ucast, st 3327 net/core/neighbour.c st->periodic_gc_runs, st 3328 net/core/neighbour.c st->forced_gc_runs, st 3329 net/core/neighbour.c st->unres_discards, st 3330 net/core/neighbour.c st->table_fulls st 3430 net/core/skbuff.c unsigned int to, struct skb_seq_state *st) st 3432 net/core/skbuff.c st->lower_offset = from; st 3433 net/core/skbuff.c st->upper_offset = to; st 3434 net/core/skbuff.c st->root_skb = st->cur_skb = skb; st 3435 net/core/skbuff.c st->frag_idx = st->stepped_offset = 0; st 3436 net/core/skbuff.c st->frag_data = NULL; st 3466 net/core/skbuff.c struct skb_seq_state *st) st 3468 net/core/skbuff.c unsigned int block_limit, abs_offset = consumed + st->lower_offset; st 3471 net/core/skbuff.c if (unlikely(abs_offset >= st->upper_offset)) { st 3472 net/core/skbuff.c if (st->frag_data) { st 3473 net/core/skbuff.c kunmap_atomic(st->frag_data); st 3474 net/core/skbuff.c st->frag_data = NULL; st 3480 net/core/skbuff.c block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; st 3482 net/core/skbuff.c if (abs_offset < block_limit && !st->frag_data) { st 3483 net/core/skbuff.c *data = st->cur_skb->data + (abs_offset - st->stepped_offset); st 3487 net/core/skbuff.c if (st->frag_idx == 0 && !st->frag_data) st 3488 net/core/skbuff.c st->stepped_offset += skb_headlen(st->cur_skb); st 3490 net/core/skbuff.c while (st->frag_idx < skb_shinfo(st->cur_skb)->nr_frags) { st 3491 net/core/skbuff.c frag = &skb_shinfo(st->cur_skb)->frags[st->frag_idx]; st 3492 net/core/skbuff.c block_limit = skb_frag_size(frag) + st->stepped_offset; st 3495 net/core/skbuff.c if (!st->frag_data) st 3496 net/core/skbuff.c st->frag_data = kmap_atomic(skb_frag_page(frag)); st 3498 net/core/skbuff.c *data = (u8 *) st->frag_data + skb_frag_off(frag) + st 3499 net/core/skbuff.c (abs_offset - st->stepped_offset); st 3504 net/core/skbuff.c if (st->frag_data) { st 3505 net/core/skbuff.c kunmap_atomic(st->frag_data); st 3506 net/core/skbuff.c st->frag_data = NULL; st 3509 net/core/skbuff.c st->frag_idx++; st 3510 net/core/skbuff.c st->stepped_offset += skb_frag_size(frag); st 3513 net/core/skbuff.c if (st->frag_data) { st 3514 net/core/skbuff.c kunmap_atomic(st->frag_data); st 3515 net/core/skbuff.c st->frag_data = NULL; st 3518 net/core/skbuff.c if (st->root_skb == st->cur_skb && skb_has_frag_list(st->root_skb)) { st 3519 net/core/skbuff.c st->cur_skb = skb_shinfo(st->root_skb)->frag_list; st 3520 net/core/skbuff.c st->frag_idx = 0; st 3522 net/core/skbuff.c } else if (st->cur_skb->next) { st 3523 net/core/skbuff.c st->cur_skb = st->cur_skb->next; st 3524 net/core/skbuff.c st->frag_idx = 0; st 3539 net/core/skbuff.c void skb_abort_seq_read(struct skb_seq_state *st) st 3541 net/core/skbuff.c if (st->frag_data) st 3542 net/core/skbuff.c kunmap_atomic(st->frag_data); st 346 net/ipv4/ip_input.c struct ip_rt_acct *st = this_cpu_ptr(ip_rt_acct); st 348 net/ipv4/ip_input.c st[idx&0xFF].o_packets++; st 349 net/ipv4/ip_input.c st[idx&0xFF].o_bytes += skb->len; st 350 net/ipv4/ip_input.c st[(idx>>16)&0xFF].i_packets++; st 351 net/ipv4/ip_input.c st[(idx>>16)&0xFF].i_bytes += skb->len; st 285 net/ipv4/route.c struct rt_cache_stat *st = v; st 296 net/ipv4/route.c st->in_slow_tot, st 297 net/ipv4/route.c st->in_slow_mc, st 298 net/ipv4/route.c st->in_no_route, st 299 net/ipv4/route.c st->in_brd, st 300 net/ipv4/route.c st->in_martian_dst, st 301 net/ipv4/route.c st->in_martian_src, st 304 net/ipv4/route.c st->out_slow_tot, st 305 net/ipv4/route.c st->out_slow_mc, st 2149 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2157 net/ipv4/tcp_ipv4.c ilb = &tcp_hashinfo.listening_hash[st->bucket]; st 2160 net/ipv4/tcp_ipv4.c st->offset = 0; st 2163 net/ipv4/tcp_ipv4.c ilb = &tcp_hashinfo.listening_hash[st->bucket]; st 2164 net/ipv4/tcp_ipv4.c ++st->num; st 2165 net/ipv4/tcp_ipv4.c ++st->offset; st 2176 net/ipv4/tcp_ipv4.c st->offset = 0; st 2177 net/ipv4/tcp_ipv4.c if (++st->bucket < INET_LHTABLE_SIZE) st 2184 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2187 net/ipv4/tcp_ipv4.c st->bucket = 0; st 2188 net/ipv4/tcp_ipv4.c st->offset = 0; st 2198 net/ipv4/tcp_ipv4.c static inline bool empty_bucket(const struct tcp_iter_state *st) st 2200 net/ipv4/tcp_ipv4.c return hlist_nulls_empty(&tcp_hashinfo.ehash[st->bucket].chain); st 2210 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2214 net/ipv4/tcp_ipv4.c st->offset = 0; st 2215 net/ipv4/tcp_ipv4.c for (; st->bucket <= tcp_hashinfo.ehash_mask; ++st->bucket) { st 2218 net/ipv4/tcp_ipv4.c spinlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, st->bucket); st 2221 net/ipv4/tcp_ipv4.c if (empty_bucket(st)) st 2225 net/ipv4/tcp_ipv4.c sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { st 2244 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2247 net/ipv4/tcp_ipv4.c ++st->num; st 2248 net/ipv4/tcp_ipv4.c ++st->offset; st 2258 net/ipv4/tcp_ipv4.c spin_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket)); st 2259 net/ipv4/tcp_ipv4.c ++st->bucket; st 2265 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2268 net/ipv4/tcp_ipv4.c st->bucket = 0; st 2281 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2283 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_LISTENING; st 2287 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_ESTABLISHED; st 2296 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2297 net/ipv4/tcp_ipv4.c int offset = st->offset; st 2298 net/ipv4/tcp_ipv4.c int orig_num = st->num; st 2301 net/ipv4/tcp_ipv4.c switch (st->state) { st 2303 net/ipv4/tcp_ipv4.c if (st->bucket >= INET_LHTABLE_SIZE) st 2305 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_LISTENING; st 2311 net/ipv4/tcp_ipv4.c st->bucket = 0; st 2312 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_ESTABLISHED; st 2315 net/ipv4/tcp_ipv4.c if (st->bucket > tcp_hashinfo.ehash_mask) st 2322 net/ipv4/tcp_ipv4.c st->num = orig_num; st 2329 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2332 net/ipv4/tcp_ipv4.c if (*pos && *pos == st->last_pos) { st 2338 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_LISTENING; st 2339 net/ipv4/tcp_ipv4.c st->num = 0; st 2340 net/ipv4/tcp_ipv4.c st->bucket = 0; st 2341 net/ipv4/tcp_ipv4.c st->offset = 0; st 2345 net/ipv4/tcp_ipv4.c st->last_pos = *pos; st 2352 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2360 net/ipv4/tcp_ipv4.c switch (st->state) { st 2364 net/ipv4/tcp_ipv4.c st->state = TCP_SEQ_STATE_ESTABLISHED; st 2365 net/ipv4/tcp_ipv4.c st->bucket = 0; st 2366 net/ipv4/tcp_ipv4.c st->offset = 0; st 2376 net/ipv4/tcp_ipv4.c st->last_pos = *pos; st 2383 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st = seq->private; st 2385 net/ipv4/tcp_ipv4.c switch (st->state) { st 2388 net/ipv4/tcp_ipv4.c spin_unlock(&tcp_hashinfo.listening_hash[st->bucket].lock); st 2392 net/ipv4/tcp_ipv4.c spin_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket)); st 2509 net/ipv4/tcp_ipv4.c struct tcp_iter_state *st; st 2519 net/ipv4/tcp_ipv4.c st = seq->private; st 2522 net/ipv4/tcp_ipv4.c get_timewait4_sock(v, seq, st->num); st 2524 net/ipv4/tcp_ipv4.c get_openreq4(v, seq, st->num); st 2526 net/ipv4/tcp_ipv4.c get_tcp4_sock(v, seq, st->num); st 40 net/ipv6/addrconf_core.c __be32 st; st 42 net/ipv6/addrconf_core.c st = addr->s6_addr32[0]; st 47 net/ipv6/addrconf_core.c if ((st & htonl(0xE0000000)) != htonl(0x00000000) && st 48 net/ipv6/addrconf_core.c (st & htonl(0xE0000000)) != htonl(0xE0000000)) st 52 net/ipv6/addrconf_core.c if ((st & htonl(0xFF000000)) == htonl(0xFF000000)) { st 59 net/ipv6/addrconf_core.c if ((st & htonl(0xFFC00000)) == htonl(0xFE800000)) st 62 net/ipv6/addrconf_core.c if ((st & htonl(0xFFC00000)) == htonl(0xFEC00000)) st 65 net/ipv6/addrconf_core.c if ((st & htonl(0xFE000000)) == htonl(0xFC000000)) st 1957 net/ipv6/tcp_ipv6.c struct tcp_iter_state *st; st 1969 net/ipv6/tcp_ipv6.c st = seq->private; st 1972 net/ipv6/tcp_ipv6.c get_timewait6_sock(seq, v, st->num); st 1974 net/ipv6/tcp_ipv6.c get_openreq6(seq, v, st->num); st 1976 net/ipv6/tcp_ipv6.c get_tcp6_sock(seq, v, st->num); st 230 net/mac80211/mesh.h struct ieee80211_tx_status *st); st 297 net/mac80211/mesh_hwmp.c struct ieee80211_tx_status *st) st 299 net/mac80211/mesh_hwmp.c struct ieee80211_tx_info *txinfo = st->info; st 64 net/mac80211/rate.c struct ieee80211_tx_status *st) st 67 net/mac80211/rate.c struct sta_info *sta = container_of(st->sta, struct sta_info, sta); st 75 net/mac80211/rate.c ref->ops->tx_status_ext(ref->priv, sband, priv_sta, st); st 76 net/mac80211/rate.c else if (st->skb) st 77 net/mac80211/rate.c ref->ops->tx_status(ref->priv, sband, st->sta, priv_sta, st->skb); st 30 net/mac80211/rate.h struct ieee80211_tx_status *st); st 261 net/mac80211/rc80211_minstrel.c void *priv_sta, struct ieee80211_tx_status *st) st 263 net/mac80211/rc80211_minstrel.c struct ieee80211_tx_info *info = st->info; st 884 net/mac80211/rc80211_minstrel_ht.c void *priv_sta, struct ieee80211_tx_status *st) st 886 net/mac80211/rc80211_minstrel_ht.c struct ieee80211_tx_info *info = st->info; st 898 net/mac80211/rc80211_minstrel_ht.c &msp->legacy, st); st 552 net/netfilter/nf_conntrack_expect.c struct ct_expect_iter_state *st = seq->private; st 555 net/netfilter/nf_conntrack_expect.c for (st->bucket = 0; st->bucket < nf_ct_expect_hsize; st->bucket++) { st 556 net/netfilter/nf_conntrack_expect.c n = rcu_dereference(hlist_first_rcu(&nf_ct_expect_hash[st->bucket])); st 566 net/netfilter/nf_conntrack_expect.c struct ct_expect_iter_state *st = seq->private; st 570 net/netfilter/nf_conntrack_expect.c if (++st->bucket >= nf_ct_expect_hsize) st 572 net/netfilter/nf_conntrack_expect.c head = rcu_dereference(hlist_first_rcu(&nf_ct_expect_hash[st->bucket])); st 2200 net/netfilter/nf_conntrack_netlink.c __u16 cpu, const struct ip_conntrack_stat *st) st 2217 net/netfilter/nf_conntrack_netlink.c if (nla_put_be32(skb, CTA_STATS_FOUND, htonl(st->found)) || st 2218 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_INVALID, htonl(st->invalid)) || st 2219 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_IGNORE, htonl(st->ignore)) || st 2220 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_INSERT, htonl(st->insert)) || st 2222 net/netfilter/nf_conntrack_netlink.c htonl(st->insert_failed)) || st 2223 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_DROP, htonl(st->drop)) || st 2224 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_EARLY_DROP, htonl(st->early_drop)) || st 2225 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_ERROR, htonl(st->error)) || st 2227 net/netfilter/nf_conntrack_netlink.c htonl(st->search_restart))) st 2249 net/netfilter/nf_conntrack_netlink.c const struct ip_conntrack_stat *st; st 2254 net/netfilter/nf_conntrack_netlink.c st = per_cpu_ptr(net->ct.stat, cpu); st 2258 net/netfilter/nf_conntrack_netlink.c cpu, st) < 0) st 3431 net/netfilter/nf_conntrack_netlink.c const struct ip_conntrack_stat *st) st 3448 net/netfilter/nf_conntrack_netlink.c if (nla_put_be32(skb, CTA_STATS_EXP_NEW, htonl(st->expect_new)) || st 3449 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_EXP_CREATE, htonl(st->expect_create)) || st 3450 net/netfilter/nf_conntrack_netlink.c nla_put_be32(skb, CTA_STATS_EXP_DELETE, htonl(st->expect_delete))) st 3472 net/netfilter/nf_conntrack_netlink.c const struct ip_conntrack_stat *st; st 3477 net/netfilter/nf_conntrack_netlink.c st = per_cpu_ptr(net->ct.stat, cpu); st 3480 net/netfilter/nf_conntrack_netlink.c cpu, st) < 0) st 107 net/netfilter/nf_conntrack_standalone.c struct ct_iter_state *st = seq->private; st 110 net/netfilter/nf_conntrack_standalone.c for (st->bucket = 0; st 111 net/netfilter/nf_conntrack_standalone.c st->bucket < st->htable_size; st 112 net/netfilter/nf_conntrack_standalone.c st->bucket++) { st 114 net/netfilter/nf_conntrack_standalone.c hlist_nulls_first_rcu(&st->hash[st->bucket])); st 124 net/netfilter/nf_conntrack_standalone.c struct ct_iter_state *st = seq->private; st 128 net/netfilter/nf_conntrack_standalone.c if (likely(get_nulls_value(head) == st->bucket)) { st 129 net/netfilter/nf_conntrack_standalone.c if (++st->bucket >= st->htable_size) st 133 net/netfilter/nf_conntrack_standalone.c hlist_nulls_first_rcu(&st->hash[st->bucket])); st 151 net/netfilter/nf_conntrack_standalone.c struct ct_iter_state *st = seq->private; st 153 net/netfilter/nf_conntrack_standalone.c st->time_now = ktime_get_real_ns(); st 156 net/netfilter/nf_conntrack_standalone.c nf_conntrack_get_ht(&st->hash, &st->htable_size); st 225 net/netfilter/nf_conntrack_standalone.c struct ct_iter_state *st = s->private; st 231 net/netfilter/nf_conntrack_standalone.c delta_time = st->time_now - tstamp->start; st 426 net/netfilter/nf_conntrack_standalone.c const struct ip_conntrack_stat *st = v; st 437 net/netfilter/nf_conntrack_standalone.c st->found, st 439 net/netfilter/nf_conntrack_standalone.c st->invalid, st 440 net/netfilter/nf_conntrack_standalone.c st->ignore, st 443 net/netfilter/nf_conntrack_standalone.c st->insert, st 444 net/netfilter/nf_conntrack_standalone.c st->insert_failed, st 445 net/netfilter/nf_conntrack_standalone.c st->drop, st 446 net/netfilter/nf_conntrack_standalone.c st->early_drop, st 447 net/netfilter/nf_conntrack_standalone.c st->error, st 449 net/netfilter/nf_conntrack_standalone.c st->expect_new, st 450 net/netfilter/nf_conntrack_standalone.c st->expect_create, st 451 net/netfilter/nf_conntrack_standalone.c st->expect_delete, st 452 net/netfilter/nf_conntrack_standalone.c st->search_restart st 1016 net/netfilter/nfnetlink_log.c static struct hlist_node *get_first(struct net *net, struct iter_state *st) st 1019 net/netfilter/nfnetlink_log.c if (!st) st 1024 net/netfilter/nfnetlink_log.c for (st->bucket = 0; st->bucket < INSTANCE_BUCKETS; st->bucket++) { st 1025 net/netfilter/nfnetlink_log.c struct hlist_head *head = &log->instance_table[st->bucket]; st 1033 net/netfilter/nfnetlink_log.c static struct hlist_node *get_next(struct net *net, struct iter_state *st, st 1041 net/netfilter/nfnetlink_log.c if (++st->bucket >= INSTANCE_BUCKETS) st 1045 net/netfilter/nfnetlink_log.c head = &log->instance_table[st->bucket]; st 1051 net/netfilter/nfnetlink_log.c static struct hlist_node *get_idx(struct net *net, struct iter_state *st, st 1055 net/netfilter/nfnetlink_log.c head = get_first(net, st); st 1058 net/netfilter/nfnetlink_log.c while (pos && (head = get_next(net, st, head))) st 1410 net/netfilter/nfnetlink_queue.c struct iter_state *st = seq->private; st 1414 net/netfilter/nfnetlink_queue.c if (!st) st 1419 net/netfilter/nfnetlink_queue.c for (st->bucket = 0; st->bucket < INSTANCE_BUCKETS; st->bucket++) { st 1420 net/netfilter/nfnetlink_queue.c if (!hlist_empty(&q->instance_table[st->bucket])) st 1421 net/netfilter/nfnetlink_queue.c return q->instance_table[st->bucket].first; st 1428 net/netfilter/nfnetlink_queue.c struct iter_state *st = seq->private; st 1435 net/netfilter/nfnetlink_queue.c if (++st->bucket >= INSTANCE_BUCKETS) st 1439 net/netfilter/nfnetlink_queue.c h = q->instance_table[st->bucket].first; st 823 net/netfilter/x_tables.c const struct compat_xt_standard_target *st = (const void *)t; st 825 net/netfilter/x_tables.c if (COMPAT_XT_ALIGN(target_offset + sizeof(*st)) != next_offset) st 828 net/netfilter/x_tables.c if (!verdict_ok(st->verdict)) st 917 net/netfilter/x_tables.c const struct xt_standard_target *st = (const void *)t; st 919 net/netfilter/x_tables.c if (XT_ALIGN(target_offset + sizeof(*st)) != next_offset) st 922 net/netfilter/x_tables.c if (!verdict_ok(st->verdict)) st 474 net/netfilter/xt_recent.c struct recent_iter_state *st = seq->private; st 475 net/netfilter/xt_recent.c const struct recent_table *t = st->table; st 481 net/netfilter/xt_recent.c for (st->bucket = 0; st->bucket < ip_list_hash_size; st->bucket++) st 482 net/netfilter/xt_recent.c list_for_each_entry(e, &t->iphash[st->bucket], list) st 490 net/netfilter/xt_recent.c struct recent_iter_state *st = seq->private; st 491 net/netfilter/xt_recent.c const struct recent_table *t = st->table; st 496 net/netfilter/xt_recent.c while (head == &t->iphash[st->bucket]) { st 497 net/netfilter/xt_recent.c if (++st->bucket >= ip_list_hash_size) st 499 net/netfilter/xt_recent.c head = t->iphash[st->bucket].next; st 513 net/netfilter/xt_recent.c struct recent_iter_state *st = seq->private; st 514 net/netfilter/xt_recent.c const struct recent_table *t = st->table; st 540 net/netfilter/xt_recent.c struct recent_iter_state *st; st 542 net/netfilter/xt_recent.c st = __seq_open_private(file, &recent_seq_ops, sizeof(*st)); st 543 net/netfilter/xt_recent.c if (st == NULL) st 546 net/netfilter/xt_recent.c st->table = PDE_DATA(inode); st 3928 net/packet/af_packet.c union tpacket_stats_u st; st 3944 net/packet/af_packet.c memcpy(&st, &po->stats, sizeof(st)); st 3951 net/packet/af_packet.c st.stats3.tp_drops = drops; st 3952 net/packet/af_packet.c st.stats3.tp_packets += drops; st 3953 net/packet/af_packet.c data = &st.stats3; st 3956 net/packet/af_packet.c st.stats1.tp_drops = drops; st 3957 net/packet/af_packet.c st.stats1.tp_packets += drops; st 3958 net/packet/af_packet.c data = &st.stats1; st 470 net/sched/sch_choke.c struct tc_choke_xstats st = { st 478 net/sched/sch_choke.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 248 net/sched/sch_codel.c struct tc_codel_xstats st = { st 263 net/sched/sch_codel.c st.drop_next = codel_time_to_us(delta); st 265 net/sched/sch_codel.c st.drop_next = -codel_time_to_us(-delta); st 268 net/sched/sch_codel.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 940 net/sched/sch_fq.c struct tc_fq_qd_stats st; st 944 net/sched/sch_fq.c st.gc_flows = q->stat_gc_flows; st 945 net/sched/sch_fq.c st.highprio_packets = q->stat_internal_packets; st 946 net/sched/sch_fq.c st.tcp_retrans = 0; st 947 net/sched/sch_fq.c st.throttled = q->stat_throttled; st 948 net/sched/sch_fq.c st.flows_plimit = q->stat_flows_plimit; st 949 net/sched/sch_fq.c st.pkts_too_long = q->stat_pkts_too_long; st 950 net/sched/sch_fq.c st.allocation_errors = q->stat_allocation_errors; st 951 net/sched/sch_fq.c st.time_next_delayed_flow = q->time_next_delayed_flow - ktime_get_ns(); st 952 net/sched/sch_fq.c st.flows = q->flows; st 953 net/sched/sch_fq.c st.inactive_flows = q->inactive_flows; st 954 net/sched/sch_fq.c st.throttled_flows = q->throttled_flows; st 955 net/sched/sch_fq.c st.unthrottle_latency_ns = min_t(unsigned long, st 957 net/sched/sch_fq.c st.ce_mark = q->stat_ce_mark; st 960 net/sched/sch_fq.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 554 net/sched/sch_fq_codel.c struct tc_fq_codel_xstats st = { st 559 net/sched/sch_fq_codel.c st.qdisc_stats.maxpacket = q->cstats.maxpacket; st 560 net/sched/sch_fq_codel.c st.qdisc_stats.drop_overlimit = q->drop_overlimit; st 561 net/sched/sch_fq_codel.c st.qdisc_stats.ecn_mark = q->cstats.ecn_mark; st 562 net/sched/sch_fq_codel.c st.qdisc_stats.new_flow_count = q->new_flow_count; st 563 net/sched/sch_fq_codel.c st.qdisc_stats.ce_mark = q->cstats.ce_mark; st 564 net/sched/sch_fq_codel.c st.qdisc_stats.memory_usage = q->memory_usage; st 565 net/sched/sch_fq_codel.c st.qdisc_stats.drop_overmemory = q->drop_overmemory; st 569 net/sched/sch_fq_codel.c st.qdisc_stats.new_flows_len++; st 572 net/sched/sch_fq_codel.c st.qdisc_stats.old_flows_len++; st 575 net/sched/sch_fq_codel.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 683 net/sched/sch_hhf.c struct tc_hhf_xstats st = { st 690 net/sched/sch_hhf.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 513 net/sched/sch_pie.c struct tc_pie_xstats st = { st 527 net/sched/sch_pie.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 335 net/sched/sch_red.c struct tc_red_xstats st = {0}; st 349 net/sched/sch_red.c st.early = q->stats.prob_drop + q->stats.forced_drop; st 350 net/sched/sch_red.c st.pdrop = q->stats.pdrop; st 351 net/sched/sch_red.c st.other = q->stats.other; st 352 net/sched/sch_red.c st.marked = q->stats.prob_mark + q->stats.forced_mark; st 354 net/sched/sch_red.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 597 net/sched/sch_sfb.c struct tc_sfb_xstats st = { st 606 net/sched/sch_sfb.c st.maxqlen = sfb_compute_qlen(&st.maxprob, &st.avgprob, q); st 608 net/sched/sch_sfb.c return gnet_stats_copy_app(d, &st, sizeof(st)); st 1223 net/unix/af_unix.c int st; st 1302 net/unix/af_unix.c st = sk->sk_state; st 1304 net/unix/af_unix.c switch (st) { st 1319 net/unix/af_unix.c if (sk->sk_state != st) { st 562 scripts/asn1_compiler.c struct stat st; st 600 scripts/asn1_compiler.c if (fstat(fd, &st) < 0) { st 605 scripts/asn1_compiler.c if (!(buffer = malloc(st.st_size + 1))) { st 610 scripts/asn1_compiler.c if ((readlen = read(fd, buffer, st.st_size)) < 0) { st 620 scripts/asn1_compiler.c if (readlen != st.st_size) { st 268 scripts/basic/fixdep.c struct stat st; st 278 scripts/basic/fixdep.c if (fstat(fd, &st) < 0) { st 283 scripts/basic/fixdep.c buf = malloc(st.st_size + 1); st 288 scripts/basic/fixdep.c if (read(fd, buf, st.st_size) != st.st_size) { st 292 scripts/basic/fixdep.c buf[st.st_size] = '\0'; st 15 scripts/dtc/fstree.c struct stat st; st 33 scripts/dtc/fstree.c if (lstat(tmpname, &st) < 0) st 36 scripts/dtc/fstree.c if (S_ISREG(st.st_mode)) { st 48 scripts/dtc/fstree.c st.st_size), st 53 scripts/dtc/fstree.c } else if (S_ISDIR(st.st_mode)) { st 203 scripts/insert-sys-cert.c struct stat st; st 212 scripts/insert-sys-cert.c if (fstat(fd, &st)) { st 217 scripts/insert-sys-cert.c *size = st.st_size; st 230 scripts/insert-sys-cert.c struct stat st; st 239 scripts/insert-sys-cert.c if (fstat(fd, &st)) { st 244 scripts/insert-sys-cert.c *size = st.st_size; st 24 scripts/kconfig/confdata.c struct stat st; st 26 scripts/kconfig/confdata.c return !stat(path, &st); st 32 scripts/kconfig/confdata.c struct stat st; st 34 scripts/kconfig/confdata.c if (stat(path, &st)) st 37 scripts/kconfig/confdata.c return S_ISDIR(st.st_mode); st 206 scripts/kconfig/expr.h #define for_all_properties(sym, st, tok) \ st 207 scripts/kconfig/expr.h for (st = sym->prop; st; st = st->next) \ st 208 scripts/kconfig/expr.h if (st->type == (tok)) st 209 scripts/kconfig/expr.h #define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) st 210 scripts/kconfig/expr.h #define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) st 211 scripts/kconfig/expr.h #define for_all_prompts(sym, st) \ st 212 scripts/kconfig/expr.h for (st = sym->prop; st; st = st->next) \ st 213 scripts/kconfig/expr.h if (st->text) st 421 scripts/mod/modpost.c struct stat st; st 428 scripts/mod/modpost.c if (fstat(fd, &st)) st 431 scripts/mod/modpost.c *size = st.st_size; st 2396 scripts/mod/modpost.c struct stat st; st 2402 scripts/mod/modpost.c if (fstat(fileno(file), &st) < 0) st 2405 scripts/mod/modpost.c if (st.st_size != b->pos) st 1531 security/selinux/selinuxfs.c struct avc_cache_stats *st = v; st 1537 security/selinux/selinuxfs.c unsigned int lookups = st->lookups; st 1538 security/selinux/selinuxfs.c unsigned int misses = st->misses; st 1541 security/selinux/selinuxfs.c hits, misses, st->allocations, st 1542 security/selinux/selinuxfs.c st->reclaims, st->frees); st 158 sound/parisc/harmony.c harmony_write(h, HARMONY_GAINCTL, h->st.gain); st 171 sound/parisc/harmony.c (h->st.format << 6) | st 172 sound/parisc/harmony.c (h->st.stereo << 5) | st 173 sound/parisc/harmony.c (h->st.rate)); st 194 sound/parisc/harmony.c if (h->psubs && h->st.playing) { st 213 sound/parisc/harmony.c if (h->csubs && h->st.capturing) { st 297 sound/parisc/harmony.c if (h->st.capturing) st 303 sound/parisc/harmony.c h->st.playing = 1; st 310 sound/parisc/harmony.c h->st.playing = 0; st 333 sound/parisc/harmony.c if (h->st.playing) st 339 sound/parisc/harmony.c h->st.capturing = 1; st 346 sound/parisc/harmony.c h->st.capturing = 0; st 367 sound/parisc/harmony.c int o = h->st.format; st 400 sound/parisc/harmony.c if (h->st.capturing) st 407 sound/parisc/harmony.c h->st.playing = 0; st 409 sound/parisc/harmony.c h->st.rate = snd_harmony_rate_bits(rt->rate); st 410 sound/parisc/harmony.c h->st.format = snd_harmony_set_data_format(h, rt->format, 0); st 413 sound/parisc/harmony.c h->st.stereo = HARMONY_SS_STEREO; st 415 sound/parisc/harmony.c h->st.stereo = HARMONY_SS_MONO; st 430 sound/parisc/harmony.c if (h->st.playing) st 437 sound/parisc/harmony.c h->st.capturing = 0; st 439 sound/parisc/harmony.c h->st.rate = snd_harmony_rate_bits(rt->rate); st 440 sound/parisc/harmony.c h->st.format = snd_harmony_set_data_format(h, rt->format, 0); st 443 sound/parisc/harmony.c h->st.stereo = HARMONY_SS_STEREO; st 445 sound/parisc/harmony.c h->st.stereo = HARMONY_SS_MONO; st 462 sound/parisc/harmony.c if (!(h->st.playing) || (h->psubs == NULL)) st 491 sound/parisc/harmony.c if (!(h->st.capturing) || (h->csubs == NULL)) st 662 sound/parisc/harmony.c h->st.format = snd_harmony_set_data_format(h, st 672 sound/parisc/harmony.c harmony_write(h, HARMONY_GAINCTL, h->st.gain); st 705 sound/parisc/harmony.c left = (h->st.gain >> shift_left) & mask; st 706 sound/parisc/harmony.c right = (h->st.gain >> shift_right) & mask; st 731 sound/parisc/harmony.c int old_gain = h->st.gain; st 738 sound/parisc/harmony.c h->st.gain &= ~( (mask << shift_left ) ); st 739 sound/parisc/harmony.c h->st.gain |= (left << shift_left); st 745 sound/parisc/harmony.c h->st.gain &= ~( (mask << shift_right) ); st 746 sound/parisc/harmony.c h->st.gain |= (right << shift_right); st 753 sound/parisc/harmony.c return h->st.gain != old_gain; st 774 sound/parisc/harmony.c value = (h->st.gain >> HARMONY_GAIN_IS_SHIFT) & 1; st 788 sound/parisc/harmony.c int old_gain = h->st.gain; st 793 sound/parisc/harmony.c h->st.gain &= ~HARMONY_GAIN_IS_MASK; st 794 sound/parisc/harmony.c h->st.gain |= value << HARMONY_GAIN_IS_SHIFT; st 800 sound/parisc/harmony.c return h->st.gain != old_gain; st 839 sound/parisc/harmony.c h->st.gain = HARMONY_GAIN_DEFAULT; st 32 sound/parisc/harmony.h } st; st 124 sound/pci/ad1889.c u16 st; st 125 sound/pci/ad1889.c st = ad1889_readw(chip, AD_DS_WADA) & st 127 sound/pci/ad1889.c ad1889_writew(chip, AD_DS_WADA, st); st 134 sound/pci/ad1889.c u16 st; st 135 sound/pci/ad1889.c st = ad1889_readw(chip, AD_DS_WADA) | AD_DS_WADA_RWAM | AD_DS_WADA_LWAM; st 136 sound/pci/ad1889.c ad1889_writew(chip, AD_DS_WADA, st); st 587 sound/pci/ad1889.c unsigned long st; st 590 sound/pci/ad1889.c st = ad1889_readl(chip, AD_DMA_DISR); st 593 sound/pci/ad1889.c ad1889_writel(chip, AD_DMA_DISR, st); st 595 sound/pci/ad1889.c st &= AD_INTR_MASK; st 597 sound/pci/ad1889.c if (unlikely(!st)) st 600 sound/pci/ad1889.c if (st & (AD_DMA_DISR_PMAI|AD_DMA_DISR_PTAI)) st 604 sound/pci/ad1889.c if ((st & AD_DMA_DISR_WAVI) && chip->psubs) st 606 sound/pci/ad1889.c if ((st & AD_DMA_DISR_ADCI) && chip->csubs) st 95 sound/pci/ctxfi/cthardware.h int (*src_set_st)(void *blk, unsigned int st); st 248 sound/pci/ctxfi/cthw20k1.c static int src_set_st(void *blk, unsigned int st) st 252 sound/pci/ctxfi/cthw20k1.c set_field(&ctl->ctl, SRCCTL_ST, st); st 248 sound/pci/ctxfi/cthw20k2.c static int src_set_st(void *blk, unsigned int st) st 252 sound/pci/ctxfi/cthw20k2.c set_field(&ctl->ctl, SRCCTL_ST, st); st 94 sound/pci/ctxfi/ctsrc.c static int src_set_st(struct src *src, unsigned int st) st 99 sound/pci/ctxfi/ctsrc.c hw->src_set_st(src->rsc.ctrl_blk, st); st 60 sound/pci/ctxfi/ctsrc.h int (*set_st)(struct src *src, unsigned int st); st 1813 sound/pci/echoaudio/echoaudio.c int period, ss, st; st 1816 sound/pci/echoaudio/echoaudio.c st = service_irq(chip); st 1817 sound/pci/echoaudio/echoaudio.c if (st < 0) { st 1840 sound/pci/echoaudio/echoaudio.c if (st > 0 && chip->midi_in) { st 1841 sound/pci/echoaudio/echoaudio.c snd_rawmidi_receive(chip->midi_in, chip->midi_buffer, st); st 1842 sound/pci/echoaudio/echoaudio.c dev_dbg(chip->card->dev, "rawmidi_iread=%d\n", st); st 1029 sound/pci/echoaudio/echoaudio_dsp.c int st; st 1033 sound/pci/echoaudio/echoaudio_dsp.c st = 0; st 1037 sound/pci/echoaudio/echoaudio_dsp.c st = midi_service_irq(chip); /* Returns how many midi bytes we received */ st 1042 sound/pci/echoaudio/echoaudio_dsp.c return st; st 108 sound/pci/ice1712/psc724.c u32 st, bits; st 113 sound/pci/ice1712/psc724.c st = ((addr & 0x7f) << 9) | (data & 0x1ff); st 123 sound/pci/ice1712/psc724.c st <<= 1; st 124 sound/pci/ice1712/psc724.c if (st & 0x10000) st 122 sound/pci/ice1712/se.c unsigned int st; st 132 sound/pci/ice1712/se.c st = ((addr & 0x7f) << 9) | (data & 0x1ff); st 141 sound/pci/ice1712/se.c st = (st << 1); st 142 sound/pci/ice1712/se.c if (st & 0x10000) st 392 sound/soc/img/img-i2s-in.c static int img_i2s_in_dma_prepare_slave_config(struct snd_pcm_substream *st, st 396 sound/soc/img/img-i2s-in.c struct snd_soc_pcm_runtime *rtd = st->private_data; st 400 sound/soc/img/img-i2s-in.c dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, st); st 402 sound/soc/img/img-i2s-in.c ret = snd_hwparams_to_dma_slave_config(st, params, sc); st 398 sound/soc/img/img-i2s-out.c static int img_i2s_out_dma_prepare_slave_config(struct snd_pcm_substream *st, st 402 sound/soc/img/img-i2s-out.c struct snd_soc_pcm_runtime *rtd = st->private_data; st 406 sound/soc/img/img-i2s-out.c dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, st); st 408 sound/soc/img/img-i2s-out.c ret = snd_hwparams_to_dma_slave_config(st, params, sc); st 92 tools/bpf/bpf_exp.y | st st 199 tools/bpf/bpf_exp.y st st 459 tools/bpf/bpftool/common.c struct stat st; st 462 tools/bpf/bpftool/common.c err = stat("/proc/self/ns/net", &st); st 468 tools/bpf/bpftool/common.c if (st.st_dev != ns_dev || st.st_ino != ns_ino) st 123 tools/build/fixdep.c struct stat st; st 133 tools/build/fixdep.c if (fstat(fd, &st) < 0) { st 138 tools/build/fixdep.c if (st.st_size == 0) { st 143 tools/build/fixdep.c map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); st 150 tools/build/fixdep.c parse_dep_file(map, st.st_size); st 152 tools/build/fixdep.c munmap(map, st.st_size); st 75 tools/firmware/ihex2fw.c struct stat st; st 107 tools/firmware/ihex2fw.c if (fstat(infd, &st)) { st 111 tools/firmware/ihex2fw.c data = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, infd, 0); st 126 tools/firmware/ihex2fw.c if (process_ihex(data, st.st_size)) st 224 tools/io_uring/io_uring-bench.c struct stat st; st 226 tools/io_uring/io_uring-bench.c if (fstat(f->real_fd, &st) < 0) st 228 tools/io_uring/io_uring-bench.c if (S_ISBLK(st.st_mode)) { st 236 tools/io_uring/io_uring-bench.c } else if (S_ISREG(st.st_mode)) { st 237 tools/io_uring/io_uring-bench.c f->max_blocks = st.st_size / BS; st 49 tools/io_uring/io_uring-cp.c struct stat st; st 51 tools/io_uring/io_uring-cp.c if (fstat(fd, &st) < 0) st 53 tools/io_uring/io_uring-cp.c if (S_ISREG(st.st_mode)) { st 54 tools/io_uring/io_uring-cp.c *size = st.st_size; st 56 tools/io_uring/io_uring-cp.c } else if (S_ISBLK(st.st_mode)) { st 109 tools/laptop/freefall/freefall.c struct stat st; st 131 tools/laptop/freefall/freefall.c if (stat("/sys/class/leds/hp::hddprotect/brightness", &st)) st 2828 tools/lib/bpf/libbpf.c struct stat st; st 2832 tools/lib/bpf/libbpf.c if (stat(path, &st)) st 2835 tools/lib/bpf/libbpf.c data = malloc(st.st_size); st 2845 tools/lib/bpf/libbpf.c read_cnt = fread(data, 1, st.st_size, f); st 2847 tools/lib/bpf/libbpf.c if (read_cnt < st.st_size) { st 138 tools/lib/subcmd/help.c struct stat st; st 140 tools/lib/subcmd/help.c if (stat(name, &st) || /* stat, not lstat */ st 141 tools/lib/subcmd/help.c !S_ISREG(st.st_mode)) st 144 tools/lib/subcmd/help.c return st.st_mode & S_IXUSR; st 336 tools/lib/traceevent/event-plugin.c struct stat st; st 340 tools/lib/traceevent/event-plugin.c ret = stat(path, &st); st 344 tools/lib/traceevent/event-plugin.c if (!S_ISDIR(st.st_mode)) st 821 tools/perf/builtin-c2c.c int tot = 0, st = 0; st 830 tools/perf/builtin-c2c.c st = stats->rmt_hitm; st 834 tools/perf/builtin-c2c.c st = stats->lcl_hitm; st 838 tools/perf/builtin-c2c.c st = stats->tot_hitm; st 844 tools/perf/builtin-c2c.c p = tot ? (double) st / tot : 0; st 910 tools/perf/builtin-c2c.c static double percent(int st, int tot) st 912 tools/perf/builtin-c2c.c return tot ? 100. * (double) st / (double) tot : 0; st 389 tools/perf/builtin-help.c struct stat st; st 393 tools/perf/builtin-help.c if (stat(mkpath("%s/perf.html", html_path), &st) st 394 tools/perf/builtin-help.c || !S_ISREG(st.st_mode)) { st 126 tools/perf/builtin-lock.c struct thread_stat *st; st 130 tools/perf/builtin-lock.c st = container_of(node, struct thread_stat, rb); st 131 tools/perf/builtin-lock.c if (st->tid == tid) st 132 tools/perf/builtin-lock.c return st; st 133 tools/perf/builtin-lock.c else if (tid < st->tid) st 166 tools/perf/builtin-lock.c struct thread_stat *st; st 168 tools/perf/builtin-lock.c st = thread_stat_find(tid); st 169 tools/perf/builtin-lock.c if (st) st 170 tools/perf/builtin-lock.c return st; st 172 tools/perf/builtin-lock.c st = zalloc(sizeof(struct thread_stat)); st 173 tools/perf/builtin-lock.c if (!st) { st 178 tools/perf/builtin-lock.c st->tid = tid; st 179 tools/perf/builtin-lock.c INIT_LIST_HEAD(&st->seq_list); st 181 tools/perf/builtin-lock.c thread_stat_insert(st); st 183 tools/perf/builtin-lock.c return st; st 192 tools/perf/builtin-lock.c struct thread_stat *st; st 194 tools/perf/builtin-lock.c st = zalloc(sizeof(struct thread_stat)); st 195 tools/perf/builtin-lock.c if (!st) { st 199 tools/perf/builtin-lock.c st->tid = tid; st 200 tools/perf/builtin-lock.c INIT_LIST_HEAD(&st->seq_list); st 202 tools/perf/builtin-lock.c rb_link_node(&st->rb, NULL, &thread_stats.rb_node); st 203 tools/perf/builtin-lock.c rb_insert_color(&st->rb, &thread_stats); st 206 tools/perf/builtin-lock.c return st; st 282 tools/perf/builtin-lock.c static void insert_to_result(struct lock_stat *st, st 293 tools/perf/builtin-lock.c if (bigger(st, p)) st 299 tools/perf/builtin-lock.c rb_link_node(&st->rb, parent, rb); st 300 tools/perf/builtin-lock.c rb_insert_color(&st->rb, &result); st 710 tools/perf/builtin-lock.c struct lock_stat *st; st 726 tools/perf/builtin-lock.c while ((st = pop_from_result())) { st 728 tools/perf/builtin-lock.c if (st->discard) { st 734 tools/perf/builtin-lock.c if (strlen(st->name) < 16) { st 736 tools/perf/builtin-lock.c pr_info("%20s ", st->name); st 738 tools/perf/builtin-lock.c strncpy(cut_name, st->name, 16); st 747 tools/perf/builtin-lock.c pr_info("%10u ", st->nr_acquired); st 748 tools/perf/builtin-lock.c pr_info("%10u ", st->nr_contended); st 750 tools/perf/builtin-lock.c pr_info("%15" PRIu64 " ", st->avg_wait_time); st 751 tools/perf/builtin-lock.c pr_info("%15" PRIu64 " ", st->wait_time_total); st 752 tools/perf/builtin-lock.c pr_info("%15" PRIu64 " ", st->wait_time_max); st 753 tools/perf/builtin-lock.c pr_info("%15" PRIu64 " ", st->wait_time_min == ULLONG_MAX ? st 754 tools/perf/builtin-lock.c 0 : st->wait_time_min); st 765 tools/perf/builtin-lock.c struct thread_stat *st; st 773 tools/perf/builtin-lock.c st = container_of(node, struct thread_stat, rb); st 774 tools/perf/builtin-lock.c t = perf_session__findnew(session, st->tid); st 775 tools/perf/builtin-lock.c pr_info("%10d: %s\n", st->tid, thread__comm_str(t)); st 784 tools/perf/builtin-lock.c struct lock_stat *st; st 788 tools/perf/builtin-lock.c list_for_each_entry(st, &lockhash_table[i], hash_entry) { st 789 tools/perf/builtin-lock.c pr_info(" %p: %s\n", st->addr, st->name); st 842 tools/perf/builtin-lock.c struct lock_stat *st; st 845 tools/perf/builtin-lock.c list_for_each_entry(st, &lockhash_table[i], hash_entry) { st 846 tools/perf/builtin-lock.c insert_to_result(st, compare); st 390 tools/perf/builtin-mem.c struct stat st; st 447 tools/perf/builtin-mem.c if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode)) st 1030 tools/perf/builtin-report.c struct stat st; st 1268 tools/perf/builtin-report.c if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode)) st 299 tools/perf/builtin-script.c struct stat st; st 301 tools/perf/builtin-script.c fstat(fileno(es->fp), &st); st 303 tools/perf/builtin-script.c st.st_size / 1024.0 / 1024.0, es->filename, es->samples); st 404 tools/perf/builtin-stat.c struct stat st; st 416 tools/perf/builtin-stat.c if (!stat(path, &st)) st 1046 tools/perf/builtin-stat.c static int perf_stat_init_aggr_mode_file(struct perf_stat *st) st 1048 tools/perf/builtin-stat.c struct perf_env *env = &st->session->header.env; st 1483 tools/perf/builtin-stat.c struct perf_stat *st = container_of(tool, struct perf_stat, tool); st 1487 tools/perf/builtin-stat.c if (perf_cpu_map__empty(st->cpus)) { st 1488 tools/perf/builtin-stat.c if (st->aggr_mode != AGGR_UNSET) st 1493 tools/perf/builtin-stat.c if (st->aggr_mode != AGGR_UNSET) st 1494 tools/perf/builtin-stat.c stat_config.aggr_mode = st->aggr_mode; st 1499 tools/perf/builtin-stat.c perf_stat_init_aggr_mode_file(st); st 1504 tools/perf/builtin-stat.c static int set_maps(struct perf_stat *st) st 1506 tools/perf/builtin-stat.c if (!st->cpus || !st->threads) st 1509 tools/perf/builtin-stat.c if (WARN_ONCE(st->maps_allocated, "stats double allocation\n")) st 1512 tools/perf/builtin-stat.c perf_evlist__set_maps(&evsel_list->core, st->cpus, st->threads); st 1517 tools/perf/builtin-stat.c st->maps_allocated = true; st 1526 tools/perf/builtin-stat.c struct perf_stat *st = container_of(tool, struct perf_stat, tool); st 1528 tools/perf/builtin-stat.c if (st->threads) { st 1533 tools/perf/builtin-stat.c st->threads = thread_map__new_event(&event->thread_map); st 1534 tools/perf/builtin-stat.c if (!st->threads) st 1537 tools/perf/builtin-stat.c return set_maps(st); st 1545 tools/perf/builtin-stat.c struct perf_stat *st = container_of(tool, struct perf_stat, tool); st 1548 tools/perf/builtin-stat.c if (st->cpus) { st 1557 tools/perf/builtin-stat.c st->cpus = cpus; st 1558 tools/perf/builtin-stat.c return set_maps(st); st 1623 tools/perf/builtin-stat.c struct stat st; st 1629 tools/perf/builtin-stat.c if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode)) st 1156 tools/perf/builtin-trace.c struct stat st; st 1157 tools/perf/builtin-trace.c if (stat(pathname, &st) == 0) st 1158 tools/perf/builtin-trace.c file->dev_maj = major(st.st_rdev); st 1170 tools/perf/builtin-trace.c struct stat st; st 1181 tools/perf/builtin-trace.c if (lstat(linkname, &st) < 0 || st.st_size + 1 > (off_t)sizeof(pathname)) st 1186 tools/perf/builtin-trace.c if (ret < 0 || ret > st.st_size) st 3829 tools/perf/builtin-trace.c struct stat st; st 3831 tools/perf/builtin-trace.c if (!stat(filename, &st) && st.st_size) { st 298 tools/perf/perf.c struct stat st; st 322 tools/perf/perf.c if (fstat(fileno(stdout), &st)) st 325 tools/perf/perf.c if (S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode)) st 896 tools/perf/pmu-events/jevents.c struct stat st; st 899 tools/perf/pmu-events/jevents.c if (stat(path, &st)) st 902 tools/perf/pmu-events/jevents.c if (S_ISDIR(st.st_mode)) { st 47 tools/perf/pmu-events/json.c struct stat st; st 59 tools/perf/pmu-events/json.c err = fstat(fd, &st); st 62 tools/perf/pmu-events/json.c *size = st.st_size; st 64 tools/perf/pmu-events/json.c (st.st_size + ps - 1) & ~(ps - 1), st 182 tools/perf/tests/attr.c struct stat st; st 187 tools/perf/tests/attr.c if (!lstat("./tests", &st)) st 194 tools/perf/tests/attr.c if (!lstat(path_dir, &st) && st 195 tools/perf/tests/attr.c !lstat(path_perf, &st)) st 458 tools/perf/tests/builtin-test.c struct stat st; st 459 tools/perf/tests/builtin-test.c if (!lstat(devel_dirs[i], &st)) { st 461 tools/perf/tests/builtin-test.c if (!lstat(devel_dirs[i], &st)) st 513 tools/perf/tests/builtin-test.c struct shell_test *st = test->priv; st 515 tools/perf/tests/builtin-test.c path__join(script, sizeof(script), st->dir, st->file); st 529 tools/perf/tests/builtin-test.c struct shell_test st = { st 533 tools/perf/tests/builtin-test.c if (st.dir == NULL) st 536 tools/perf/tests/builtin-test.c dir = opendir(st.dir); st 540 tools/perf/tests/builtin-test.c for_each_shell_test(dir, st.dir, ent) { st 544 tools/perf/tests/builtin-test.c .desc = shell_test__description(desc, sizeof(desc), st.dir, ent->d_name), st 546 tools/perf/tests/builtin-test.c .priv = &st, st 552 tools/perf/tests/builtin-test.c st.file = ent->d_name; st 1855 tools/perf/tests/parse-events.c struct stat st; st 1862 tools/perf/tests/parse-events.c ret = stat(path, &st); st 1870 tools/perf/tests/parse-events.c struct stat st; st 1879 tools/perf/tests/parse-events.c ret = stat(path, &st); st 69 tools/perf/tests/stat.c struct perf_record_stat *st = &event->stat; st 71 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong cpu", st->cpu == 1); st 72 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong thread", st->thread == 2); st 73 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong id", st->id == 3); st 74 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong val", st->val == 100); st 75 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong run", st->ena == 200); st 76 tools/perf/tests/stat.c TEST_ASSERT_VAL("wrong ena", st->run == 300); st 18 tools/perf/util/branch.c void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags, st 24 tools/perf/util/branch.c st->counts[flags->type]++; st 28 tools/perf/util/branch.c st->cond_fwd++; st 30 tools/perf/util/branch.c st->cond_bwd++; st 34 tools/perf/util/branch.c st->cross_2m++; st 36 tools/perf/util/branch.c st->cross_4k++; st 61 tools/perf/util/branch.c void branch_type_stat_display(FILE *fp, struct branch_type_stat *st) st 67 tools/perf/util/branch.c total += st->counts[i]; st 76 tools/perf/util/branch.c if (st->cond_fwd > 0) { st 79 tools/perf/util/branch.c 100.0 * (double)st->cond_fwd / (double)total); st 82 tools/perf/util/branch.c if (st->cond_bwd > 0) { st 85 tools/perf/util/branch.c 100.0 * (double)st->cond_bwd / (double)total); st 88 tools/perf/util/branch.c if (st->cross_4k > 0) { st 91 tools/perf/util/branch.c 100.0 * (double)st->cross_4k / (double)total); st 94 tools/perf/util/branch.c if (st->cross_2m > 0) { st 97 tools/perf/util/branch.c 100.0 * (double)st->cross_2m / (double)total); st 101 tools/perf/util/branch.c if (st->counts[i] > 0) st 105 tools/perf/util/branch.c (double)st->counts[i] / (double)total); st 114 tools/perf/util/branch.c int branch_type_str(struct branch_type_stat *st, char *bf, int size) st 120 tools/perf/util/branch.c total += st->counts[i]; st 125 tools/perf/util/branch.c if (st->cond_fwd > 0) st 128 tools/perf/util/branch.c if (st->cond_bwd > 0) st 135 tools/perf/util/branch.c if (st->counts[i] > 0) st 139 tools/perf/util/branch.c if (st->cross_4k > 0) st 142 tools/perf/util/branch.c if (st->cross_2m > 0) st 54 tools/perf/util/branch.h void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags, st 58 tools/perf/util/branch.h void branch_type_stat_display(FILE *fp, struct branch_type_stat *st); st 59 tools/perf/util/branch.h int branch_type_str(struct branch_type_stat *st, char *bf, int bfsize); st 657 tools/perf/util/config.c struct stat st; st 683 tools/perf/util/config.c if (stat(user_config, &st) < 0) { st 691 tools/perf/util/config.c if (st.st_uid && (st.st_uid != geteuid())) { st 696 tools/perf/util/config.c if (st.st_size) st 77 tools/perf/util/copyfile.c struct stat st; st 83 tools/perf/util/copyfile.c err = stat(from, &st); st 104 tools/perf/util/copyfile.c if (st.st_size == 0) { /* /proc? do it slowly... */ st 120 tools/perf/util/copyfile.c err = copyfile_offset(fromfd, 0, tofd, 0, st.st_size); st 93 tools/perf/util/data.c struct stat st; st 96 tools/perf/util/data.c if (stat(path, &st)) st 99 tools/perf/util/data.c if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data", 4)) st 120 tools/perf/util/data.c file->size = st.st_size; st 144 tools/perf/util/data.c struct stat st; st 146 tools/perf/util/data.c if (fstat(file->fd, &st)) st 149 tools/perf/util/data.c file->size = st.st_size; st 157 tools/perf/util/data.c struct stat st; st 163 tools/perf/util/data.c if (!fstat(fd, &st) && S_ISFIFO(st.st_mode)) st 178 tools/perf/util/data.c struct stat st; st 183 tools/perf/util/data.c if (!stat(data->path, &st) && st.st_size) { st 212 tools/perf/util/data.c struct stat st; st 214 tools/perf/util/data.c if (stat(data->path, &st)) st 217 tools/perf/util/data.c return (st.st_mode & S_IFMT) == S_IFDIR; st 222 tools/perf/util/data.c struct stat st; st 238 tools/perf/util/data.c if (fstat(fd, &st) < 0) st 241 tools/perf/util/data.c if (!data->force && st.st_uid && (st.st_uid != geteuid())) { st 247 tools/perf/util/data.c if (!st.st_size) { st 253 tools/perf/util/data.c data->file.size = st.st_size; st 953 tools/perf/util/dso.c struct stat st; st 970 tools/perf/util/dso.c if (fstat(dso->data.fd, &st) < 0) { st 977 tools/perf/util/dso.c dso->data.file_size = st.st_size; st 1034 tools/perf/util/header.c struct stat st; st 1040 tools/perf/util/header.c if (stat(file, &st)) st 2914 tools/perf/util/header.c struct stat st; st 2921 tools/perf/util/header.c ret = fstat(fd, &st); st 2925 tools/perf/util/header.c stctime = st.st_ctime; st 394 tools/perf/util/jitdump.c struct stat st; st 449 tools/perf/util/jitdump.c if (stat(filename, &st)) st 450 tools/perf/util/jitdump.c memset(&st, 0, sizeof(st)); st 462 tools/perf/util/jitdump.c event->mmap2.ino = st.st_ino; st 463 tools/perf/util/jitdump.c event->mmap2.maj = major(st.st_dev); st 464 tools/perf/util/jitdump.c event->mmap2.min = minor(st.st_dev); st 465 tools/perf/util/jitdump.c event->mmap2.prot = st.st_mode; st 509 tools/perf/util/jitdump.c struct stat st; st 539 tools/perf/util/jitdump.c if (stat(filename, &st)) st 540 tools/perf/util/jitdump.c memset(&st, 0, sizeof(st)); st 554 tools/perf/util/jitdump.c event->mmap2.ino = st.st_ino; st 555 tools/perf/util/jitdump.c event->mmap2.maj = major(st.st_dev); st 556 tools/perf/util/jitdump.c event->mmap2.min = minor(st.st_dev); st 557 tools/perf/util/jitdump.c event->mmap2.prot = st.st_mode; st 1306 tools/perf/util/machine.c struct stat st; st 1310 tools/perf/util/machine.c if (stat(path, &st)) st 1313 tools/perf/util/machine.c if (S_ISDIR(st.st_mode)) { st 94 tools/perf/util/mem-events.c struct stat st; st 99 tools/perf/util/mem-events.c if (!stat(path, &st)) st 75 tools/perf/util/path.c struct stat st; st 77 tools/perf/util/path.c if (stat(file, &st)) st 80 tools/perf/util/path.c return S_ISREG(st.st_mode); st 87 tools/perf/util/path.c struct stat st; st 90 tools/perf/util/path.c if (stat(path, &st)) st 93 tools/perf/util/path.c return S_ISDIR(st.st_mode); st 85 tools/perf/util/pmu.c struct stat st; st 95 tools/perf/util/pmu.c if (stat(path, &st) < 0) st 143 tools/perf/util/pmu.c struct stat st; st 155 tools/perf/util/pmu.c if (fstat(fd, &st) < 0) st 473 tools/perf/util/pmu.c struct stat st; st 483 tools/perf/util/pmu.c if (stat(path, &st) < 0) st 523 tools/perf/util/pmu.c struct stat st; st 535 tools/perf/util/pmu.c if (stat(path, &st) < 0) st 643 tools/perf/util/pmu.c struct stat st; st 653 tools/perf/util/pmu.c if (stat(path, &st) == 0) st 1522 tools/perf/util/pmu.c struct stat st; st 1533 tools/perf/util/pmu.c if (stat(path, &st) < 0) st 875 tools/perf/util/probe-file.c struct stat st; st 880 tools/perf/util/probe-file.c ret = fstat(fd, &st); st 906 tools/perf/util/probe-file.c if (ftruncate(fd, st.st_size) < 0) st 98 tools/perf/util/srccode.c struct stat st; st 122 tools/perf/util/srccode.c if (fd < 0 || fstat(fd, &st) < 0) { st 135 tools/perf/util/srccode.c h->maplen = st.st_size; st 394 tools/perf/util/stat-display.c struct runtime_stat *st) st 485 tools/perf/util/stat-display.c &out, &config->metric_events, st); st 103 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 112 tools/perf/util/stat-shadow.c .stat = st, st 115 tools/perf/util/stat-shadow.c rblist = &st->value_list; st 129 tools/perf/util/stat-shadow.c void runtime_stat__init(struct runtime_stat *st) st 131 tools/perf/util/stat-shadow.c struct rblist *rblist = &st->value_list; st 139 tools/perf/util/stat-shadow.c void runtime_stat__exit(struct runtime_stat *st) st 141 tools/perf/util/stat-shadow.c rblist__exit(&st->value_list); st 167 tools/perf/util/stat-shadow.c static void reset_stat(struct runtime_stat *st) st 172 tools/perf/util/stat-shadow.c rblist = &st->value_list; st 189 tools/perf/util/stat-shadow.c void perf_stat__reset_shadow_per_stat(struct runtime_stat *st) st 191 tools/perf/util/stat-shadow.c reset_stat(st); st 194 tools/perf/util/stat-shadow.c static void update_runtime_stat(struct runtime_stat *st, st 199 tools/perf/util/stat-shadow.c type, ctx, st); st 211 tools/perf/util/stat-shadow.c int cpu, struct runtime_stat *st) st 220 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_NSECS, 0, cpu, count_ns); st 222 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_CYCLES, ctx, cpu, count); st 224 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_CYCLES_IN_TX, ctx, cpu, count); st 226 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TRANSACTION, ctx, cpu, count); st 228 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_ELISION, ctx, cpu, count); st 230 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TOPDOWN_TOTAL_SLOTS, st 233 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TOPDOWN_SLOTS_ISSUED, st 236 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TOPDOWN_SLOTS_RETIRED, st 239 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TOPDOWN_FETCH_BUBBLES, st 242 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_TOPDOWN_RECOVERY_BUBBLES, st 245 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_STALLED_CYCLES_FRONT, st 248 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_STALLED_CYCLES_BACK, st 251 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_BRANCHES, ctx, cpu, count); st 253 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_CACHEREFS, ctx, cpu, count); st 255 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_L1_DCACHE, ctx, cpu, count); st 257 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_L1_ICACHE, ctx, cpu, count); st 259 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_LL_CACHE, ctx, cpu, count); st 261 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_DTLB_CACHE, ctx, cpu, count); st 263 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_ITLB_CACHE, ctx, cpu, count); st 265 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_SMI_NUM, ctx, cpu, count); st 267 tools/perf/util/stat-shadow.c update_runtime_stat(st, STAT_APERF, ctx, cpu, count); st 270 tools/perf/util/stat-shadow.c v = saved_value_lookup(counter, cpu, true, STAT_NONE, 0, st); st 276 tools/perf/util/stat-shadow.c cpu, true, STAT_NONE, 0, st); st 399 tools/perf/util/stat-shadow.c static double runtime_stat_avg(struct runtime_stat *st, st 404 tools/perf/util/stat-shadow.c v = saved_value_lookup(NULL, cpu, false, type, ctx, st); st 411 tools/perf/util/stat-shadow.c static double runtime_stat_n(struct runtime_stat *st, st 416 tools/perf/util/stat-shadow.c v = saved_value_lookup(NULL, cpu, false, type, ctx, st); st 427 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 433 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 451 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 457 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 472 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 478 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_BRANCHES, ctx, cpu); st 493 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 500 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_L1_DCACHE, ctx, cpu); st 515 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 522 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_L1_ICACHE, ctx, cpu); st 536 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 542 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_DTLB_CACHE, ctx, cpu); st 556 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 562 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_ITLB_CACHE, ctx, cpu); st 576 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 582 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_LL_CACHE, ctx, cpu); st 640 tools/perf/util/stat-shadow.c static double td_total_slots(int ctx, int cpu, struct runtime_stat *st) st 642 tools/perf/util/stat-shadow.c return runtime_stat_avg(st, STAT_TOPDOWN_TOTAL_SLOTS, ctx, cpu); st 645 tools/perf/util/stat-shadow.c static double td_bad_spec(int ctx, int cpu, struct runtime_stat *st) st 651 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_ISSUED, ctx, cpu) - st 652 tools/perf/util/stat-shadow.c runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_RETIRED, ctx, cpu) + st 653 tools/perf/util/stat-shadow.c runtime_stat_avg(st, STAT_TOPDOWN_RECOVERY_BUBBLES, ctx, cpu); st 655 tools/perf/util/stat-shadow.c total_slots = td_total_slots(ctx, cpu, st); st 661 tools/perf/util/stat-shadow.c static double td_retiring(int ctx, int cpu, struct runtime_stat *st) st 664 tools/perf/util/stat-shadow.c double total_slots = td_total_slots(ctx, cpu, st); st 665 tools/perf/util/stat-shadow.c double ret_slots = runtime_stat_avg(st, STAT_TOPDOWN_SLOTS_RETIRED, st 673 tools/perf/util/stat-shadow.c static double td_fe_bound(int ctx, int cpu, struct runtime_stat *st) st 676 tools/perf/util/stat-shadow.c double total_slots = td_total_slots(ctx, cpu, st); st 677 tools/perf/util/stat-shadow.c double fetch_bub = runtime_stat_avg(st, STAT_TOPDOWN_FETCH_BUBBLES, st 685 tools/perf/util/stat-shadow.c static double td_be_bound(int ctx, int cpu, struct runtime_stat *st) st 687 tools/perf/util/stat-shadow.c double sum = (td_fe_bound(ctx, cpu, st) + st 688 tools/perf/util/stat-shadow.c td_bad_spec(ctx, cpu, st) + st 689 tools/perf/util/stat-shadow.c td_retiring(ctx, cpu, st)); st 698 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 704 tools/perf/util/stat-shadow.c smi_num = runtime_stat_avg(st, STAT_SMI_NUM, ctx, cpu); st 705 tools/perf/util/stat-shadow.c aperf = runtime_stat_avg(st, STAT_APERF, ctx, cpu); st 706 tools/perf/util/stat-shadow.c cycles = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 729 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 751 tools/perf/util/stat-shadow.c STAT_NONE, 0, st); st 820 tools/perf/util/stat-shadow.c struct runtime_stat *st) st 831 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 841 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_STALLED_CYCLES_FRONT, st 844 tools/perf/util/stat-shadow.c total = max(total, runtime_stat_avg(st, st 856 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_BRANCHES, ctx, cpu) != 0) st 857 tools/perf/util/stat-shadow.c print_branch_misses(config, cpu, evsel, avg, out, st); st 866 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_L1_DCACHE, ctx, cpu) != 0) st 867 tools/perf/util/stat-shadow.c print_l1_dcache_misses(config, cpu, evsel, avg, out, st); st 876 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_L1_ICACHE, ctx, cpu) != 0) st 877 tools/perf/util/stat-shadow.c print_l1_icache_misses(config, cpu, evsel, avg, out, st); st 886 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_DTLB_CACHE, ctx, cpu) != 0) st 887 tools/perf/util/stat-shadow.c print_dtlb_cache_misses(config, cpu, evsel, avg, out, st); st 896 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_ITLB_CACHE, ctx, cpu) != 0) st 897 tools/perf/util/stat-shadow.c print_itlb_cache_misses(config, cpu, evsel, avg, out, st); st 906 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_LL_CACHE, ctx, cpu) != 0) st 907 tools/perf/util/stat-shadow.c print_ll_cache_misses(config, cpu, evsel, avg, out, st); st 911 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CACHEREFS, ctx, cpu); st 916 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_CACHEREFS, ctx, cpu) != 0) st 922 tools/perf/util/stat-shadow.c print_stalled_cycles_frontend(config, cpu, evsel, avg, out, st); st 924 tools/perf/util/stat-shadow.c print_stalled_cycles_backend(config, cpu, evsel, avg, out, st); st 926 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_NSECS, 0, cpu); st 935 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 945 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES, ctx, cpu); st 946 tools/perf/util/stat-shadow.c total2 = runtime_stat_avg(st, STAT_CYCLES_IN_TX, ctx, cpu); st 956 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES_IN_TX, st 962 tools/perf/util/stat-shadow.c if (runtime_stat_n(st, STAT_CYCLES_IN_TX, ctx, cpu) != 0) st 969 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_CYCLES_IN_TX, st 983 tools/perf/util/stat-shadow.c double fe_bound = td_fe_bound(ctx, cpu, st); st 990 tools/perf/util/stat-shadow.c double retiring = td_retiring(ctx, cpu, st); st 997 tools/perf/util/stat-shadow.c double bad_spec = td_bad_spec(ctx, cpu, st); st 1004 tools/perf/util/stat-shadow.c double be_bound = td_be_bound(ctx, cpu, st); st 1017 tools/perf/util/stat-shadow.c if (td_total_slots(ctx, cpu, st) > 0) st 1024 tools/perf/util/stat-shadow.c evsel->metric_name, NULL, avg, cpu, out, st); st 1025 tools/perf/util/stat-shadow.c } else if (runtime_stat_n(st, STAT_NSECS, 0, cpu) != 0) { st 1029 tools/perf/util/stat-shadow.c total = runtime_stat_avg(st, STAT_NSECS, 0, cpu); st 1040 tools/perf/util/stat-shadow.c print_smi_cost(config, cpu, evsel, out, st); st 1053 tools/perf/util/stat-shadow.c mexp->metric_unit, avg, cpu, out, st); st 407 tools/perf/util/stat.c struct perf_record_stat *st = &event->stat; st 410 tools/perf/util/stat.c count.val = st->val; st 411 tools/perf/util/stat.c count.ena = st->ena; st 412 tools/perf/util/stat.c count.run = st->run; st 414 tools/perf/util/stat.c counter = perf_evlist__id2evsel(session->evlist, st->id); st 420 tools/perf/util/stat.c *perf_counts(counter->counts, st->cpu, st->thread) = count; st 427 tools/perf/util/stat.c struct perf_record_stat *st = (struct perf_record_stat *)event; st 431 tools/perf/util/stat.c st->id, st->cpu, st->thread); st 433 tools/perf/util/stat.c st->val, st->ena, st->run); st 171 tools/perf/util/stat.h void runtime_stat__init(struct runtime_stat *st); st 172 tools/perf/util/stat.h void runtime_stat__exit(struct runtime_stat *st); st 175 tools/perf/util/stat.h void perf_stat__reset_shadow_per_stat(struct runtime_stat *st); st 177 tools/perf/util/stat.h int cpu, struct runtime_stat *st); st 190 tools/perf/util/stat.h struct runtime_stat *st); st 194 tools/perf/util/synthetic-events.c struct stat64 st; st 198 tools/perf/util/synthetic-events.c if (stat64(proc_ns, &st) == 0) { st 199 tools/perf/util/synthetic-events.c ns_link_info->dev = st.st_dev; st 200 tools/perf/util/synthetic-events.c ns_link_info->ino = st.st_ino; st 103 tools/perf/util/thread_map.c struct stat st; st 105 tools/perf/util/thread_map.c if (stat(path, &st) != 0 || st.st_uid != uid) st 91 tools/perf/util/trace-event-info.c struct stat st; st 99 tools/perf/util/trace-event-info.c if (stat(path, &st) < 0) { st 123 tools/perf/util/trace-event-info.c if (stat(path, &st) < 0) { st 164 tools/perf/util/trace-event-info.c struct stat st; st 185 tools/perf/util/trace-event-info.c ret = stat(format, &st); st 207 tools/perf/util/trace-event-info.c ret = stat(format, &st); st 256 tools/perf/util/trace-event-info.c struct stat st; st 301 tools/perf/util/trace-event-info.c ret = stat(sys, &st); st 338 tools/perf/util/trace-event-info.c struct stat st; st 347 tools/perf/util/trace-event-info.c ret = stat(path, &st); st 366 tools/perf/util/trace-event-info.c struct stat st; st 375 tools/perf/util/trace-event-info.c ret = stat(path, &st); st 75 tools/perf/util/util.c struct stat st; st 82 tools/perf/util/util.c if (stat(path, &st) == 0) st 89 tools/perf/util/util.c err = stat(path, &st) && mkdir(path, mode); st 96 tools/perf/util/util.c return (stat(path, &st) && mkdir(path, mode)) ? -1 : 0; st 57 tools/testing/scatterlist/main.c struct sg_table st; st 62 tools/testing/scatterlist/main.c ret = __sg_alloc_table_from_pages(&st, pages, test->num_pages, st 70 tools/testing/scatterlist/main.c assert(st.nents == test->expected_segments); st 71 tools/testing/scatterlist/main.c assert(st.orig_nents == test->expected_segments); st 73 tools/testing/scatterlist/main.c sg_free_table(&st); st 343 tools/testing/selftests/cgroup/cgroup_util.c struct stat st; st 346 tools/testing/selftests/cgroup/cgroup_util.c if (fstat(fd, &st)) st 349 tools/testing/selftests/cgroup/cgroup_util.c size += st.st_size; st 27 tools/testing/selftests/memfd/fuse_mnt.c static int memfd_getattr(const char *path, struct stat *st) st 29 tools/testing/selftests/memfd/fuse_mnt.c memset(st, 0, sizeof(*st)); st 32 tools/testing/selftests/memfd/fuse_mnt.c st->st_mode = S_IFDIR | 0755; st 33 tools/testing/selftests/memfd/fuse_mnt.c st->st_nlink = 2; st 35 tools/testing/selftests/memfd/fuse_mnt.c st->st_mode = S_IFREG | 0444; st 36 tools/testing/selftests/memfd/fuse_mnt.c st->st_nlink = 1; st 37 tools/testing/selftests/memfd/fuse_mnt.c st->st_size = strlen(memfd_content); st 144 tools/testing/selftests/memfd/memfd_test.c struct stat st; st 147 tools/testing/selftests/memfd/memfd_test.c r = fstat(fd, &st); st 151 tools/testing/selftests/memfd/memfd_test.c } else if (st.st_size != size) { st 153 tools/testing/selftests/memfd/memfd_test.c (long long)st.st_size, (long long)size); st 173 tools/testing/selftests/net/tls.c struct stat st; st 176 tools/testing/selftests/net/tls.c fstat(filefd, &st); st 177 tools/testing/selftests/net/tls.c EXPECT_GE(sendfile(self->fd, filefd, 0, st.st_size), 0); st 186 tools/testing/selftests/net/tls.c struct stat st; st 190 tools/testing/selftests/net/tls.c fstat(filefd, &st); st 191 tools/testing/selftests/net/tls.c buf = (char *)malloc(st.st_size); st 197 tools/testing/selftests/net/tls.c EXPECT_GE(sendfile(self->fd, filefd, 0, st.st_size), 0); st 198 tools/testing/selftests/net/tls.c EXPECT_EQ(recv(self->cfd, buf, st.st_size, MSG_WAITALL), st.st_size); st 35 tools/testing/selftests/proc/fd-001-lookup.c struct stat st; st 38 tools/testing/selftests/proc/fd-001-lookup.c memset(&st, 0, sizeof(struct stat)); st 39 tools/testing/selftests/proc/fd-001-lookup.c rv = lstat(pathname, &st); st 41 tools/testing/selftests/proc/fd-001-lookup.c assert(S_ISLNK(st.st_mode)); st 46 tools/testing/selftests/proc/fd-001-lookup.c struct stat st; st 49 tools/testing/selftests/proc/fd-001-lookup.c rv = lstat(pathname, &st); st 296 tools/testing/selftests/proc/proc-pid-vm.c struct stat st; st 297 tools/testing/selftests/proc/proc-pid-vm.c if (fstat(exec_fd, &st) == -1) { st 307 tools/testing/selftests/proc/proc-pid-vm.c MAJOR(st.st_dev), MINOR(st.st_dev), st 308 tools/testing/selftests/proc/proc-pid-vm.c (unsigned long long)st.st_ino); st 311 tools/testing/selftests/proc/proc-pid-vm.c "/tmp/#%llu (deleted)\n", (unsigned long long)st.st_ino); st 102 tools/testing/vsock/vsock_diag_test.c static void print_vsock_stat(FILE *fp, struct vsock_stat *st) st 104 tools/testing/vsock/vsock_diag_test.c print_vsock_addr(fp, st->msg.vdiag_src_cid, st->msg.vdiag_src_port); st 106 tools/testing/vsock/vsock_diag_test.c print_vsock_addr(fp, st->msg.vdiag_dst_cid, st->msg.vdiag_dst_port); st 108 tools/testing/vsock/vsock_diag_test.c sock_type_str(st->msg.vdiag_type), st 109 tools/testing/vsock/vsock_diag_test.c sock_state_str(st->msg.vdiag_state), st 110 tools/testing/vsock/vsock_diag_test.c sock_shutdown_str(st->msg.vdiag_shutdown), st 111 tools/testing/vsock/vsock_diag_test.c st->msg.vdiag_ino); st 116 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 118 tools/testing/vsock/vsock_diag_test.c list_for_each_entry(st, head, list) st 119 tools/testing/vsock/vsock_diag_test.c print_vsock_stat(fp, st); st 124 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 132 tools/testing/vsock/vsock_diag_test.c list_for_each_entry(st, head, list) st 133 tools/testing/vsock/vsock_diag_test.c if (st->msg.vdiag_ino == stat.st_ino) st 134 tools/testing/vsock/vsock_diag_test.c return st; st 165 tools/testing/vsock/vsock_diag_test.c static void check_socket_state(struct vsock_stat *st, __u8 state) st 167 tools/testing/vsock/vsock_diag_test.c if (st->msg.vdiag_state != state) { st 169 tools/testing/vsock/vsock_diag_test.c state, st->msg.vdiag_state); st 249 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 251 tools/testing/vsock/vsock_diag_test.c st = malloc(sizeof(*st)); st 252 tools/testing/vsock/vsock_diag_test.c if (!st) { st 257 tools/testing/vsock/vsock_diag_test.c st->msg = *resp; st 258 tools/testing/vsock/vsock_diag_test.c list_add_tail(&st->list, sockets); st 331 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 334 tools/testing/vsock/vsock_diag_test.c list_for_each_entry_safe(st, next, sockets, list) st 335 tools/testing/vsock/vsock_diag_test.c free(st); st 362 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 380 tools/testing/vsock/vsock_diag_test.c st = find_vsock_stat(&sockets, fd); st 381 tools/testing/vsock/vsock_diag_test.c check_socket_state(st, TCP_LISTEN); st 402 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 423 tools/testing/vsock/vsock_diag_test.c st = find_vsock_stat(&sockets, fd); st 424 tools/testing/vsock/vsock_diag_test.c check_socket_state(st, TCP_ESTABLISHED); st 451 tools/testing/vsock/vsock_diag_test.c struct vsock_stat *st; st 495 tools/testing/vsock/vsock_diag_test.c st = find_vsock_stat(&sockets, client_fd); st 496 tools/testing/vsock/vsock_diag_test.c check_socket_state(st, TCP_ESTABLISHED); st 933 tools/vm/page-types.c static void show_file(const char *name, const struct stat *st) st 935 tools/vm/page-types.c unsigned long long size = st->st_size; st 940 tools/vm/page-types.c name, (unsigned)st->st_ino, st 943 tools/vm/page-types.c strftime(atime, sizeof(atime), "%c", localtime(&st->st_atime)); st 944 tools/vm/page-types.c strftime(mtime, sizeof(mtime), "%c", localtime(&st->st_mtime)); st 947 tools/vm/page-types.c mtime, now - st->st_mtime, st 948 tools/vm/page-types.c atime, now - st->st_atime); st 968 tools/vm/page-types.c static void walk_file(const char *name, const struct stat *st) st 975 tools/vm/page-types.c off_t off, end = st->st_size; st 1038 tools/vm/page-types.c show_file(name, st); st 1048 tools/vm/page-types.c int walk_tree(const char *name, const struct stat *st, int type, struct FTW *f) st 1053 tools/vm/page-types.c if (S_ISREG(st->st_mode)) st 1054 tools/vm/page-types.c walk_file(name, st); st 1065 tools/vm/page-types.c struct stat st; st 1071 tools/vm/page-types.c if (stat(opt_file, &st)) st 1074 tools/vm/page-types.c if (S_ISREG(st.st_mode)) { st 1075 tools/vm/page-types.c walk_file(opt_file, &st); st 1076 tools/vm/page-types.c } else if (S_ISDIR(st.st_mode)) { st 1100 tools/vm/page-types.c struct stat st; st 1102 tools/vm/page-types.c if (stat(path, &st)) st 1105 tools/vm/page-types.c if (!S_ISDIR(st.st_mode)) st 1108 tools/vm/page-types.c opt_cgroup = st.st_ino; st 93 tools/vm/page_owner_sort.c struct stat st; st 109 tools/vm/page_owner_sort.c fstat(fileno(fin), &st); st 110 tools/vm/page_owner_sort.c max_size = st.st_size / 100; /* hack ... */