chan               85 arch/arm/include/asm/cti.h 	int trig_in, int trig_out, int chan)
chan               91 arch/arm/include/asm/cti.h 	val |= BIT(chan);
chan               95 arch/arm/include/asm/cti.h 	val |= BIT(chan);
chan               54 arch/arm/include/asm/dma.h #define clear_dma_ff(chan)
chan               61 arch/arm/include/asm/dma.h extern void set_dma_page(unsigned int chan, char pagenr);
chan               67 arch/arm/include/asm/dma.h extern int  request_dma(unsigned int chan, const char * device_id);
chan               73 arch/arm/include/asm/dma.h extern void free_dma(unsigned int chan);
chan               80 arch/arm/include/asm/dma.h extern void enable_dma(unsigned int chan);
chan               87 arch/arm/include/asm/dma.h extern void disable_dma(unsigned int chan);
chan               91 arch/arm/include/asm/dma.h extern int dma_channel_active(unsigned int chan);
chan               99 arch/arm/include/asm/dma.h extern void set_dma_sg(unsigned int chan, struct scatterlist *sg, int nr_sg);
chan              107 arch/arm/include/asm/dma.h extern void __set_dma_addr(unsigned int chan, void *addr);
chan              108 arch/arm/include/asm/dma.h #define set_dma_addr(chan, addr)				\
chan              109 arch/arm/include/asm/dma.h 	__set_dma_addr(chan, (void *)__bus_to_virt(addr))
chan              117 arch/arm/include/asm/dma.h extern void set_dma_count(unsigned int chan, unsigned long count);
chan              126 arch/arm/include/asm/dma.h extern void set_dma_mode(unsigned int chan, unsigned int mode);
chan              130 arch/arm/include/asm/dma.h extern void set_dma_speed(unsigned int chan, int cycle_ns);
chan              138 arch/arm/include/asm/dma.h extern int  get_dma_residue(unsigned int chan);
chan               44 arch/arm/kernel/dma-isa.c static int isa_get_dma_residue(unsigned int chan, dma_t *dma)
chan               46 arch/arm/kernel/dma-isa.c 	unsigned int io_port = isa_dma_port[chan][ISA_DMA_COUNT];
chan               52 arch/arm/kernel/dma-isa.c 	return chan < 4 ? count : (count << 1);
chan               61 arch/arm/kernel/dma-isa.c static void isa_enable_dma(unsigned int chan, dma_t *dma)
chan               68 arch/arm/kernel/dma-isa.c 		mode = (chan & 3) | dma->dma_mode;
chan              103 arch/arm/kernel/dma-isa.c 		outb(address >> 16, isa_dma_port[chan][ISA_DMA_PGLO]);
chan              104 arch/arm/kernel/dma-isa.c 		outb(address >> 24, isa_dma_port[chan][ISA_DMA_PGHI]);
chan              106 arch/arm/kernel/dma-isa.c 		if (chan >= 4) {
chan              111 arch/arm/kernel/dma-isa.c 		outb(0, isa_dma_port[chan][ISA_DMA_CLRFF]);
chan              113 arch/arm/kernel/dma-isa.c 		outb(address, isa_dma_port[chan][ISA_DMA_ADDR]);
chan              114 arch/arm/kernel/dma-isa.c 		outb(address >> 8, isa_dma_port[chan][ISA_DMA_ADDR]);
chan              116 arch/arm/kernel/dma-isa.c 		outb(length, isa_dma_port[chan][ISA_DMA_COUNT]);
chan              117 arch/arm/kernel/dma-isa.c 		outb(length >> 8, isa_dma_port[chan][ISA_DMA_COUNT]);
chan              119 arch/arm/kernel/dma-isa.c 		outb(mode, isa_dma_port[chan][ISA_DMA_MODE]);
chan              122 arch/arm/kernel/dma-isa.c 	outb(chan & 3, isa_dma_port[chan][ISA_DMA_MASK]);
chan              125 arch/arm/kernel/dma-isa.c static void isa_disable_dma(unsigned int chan, dma_t *dma)
chan              127 arch/arm/kernel/dma-isa.c 	outb(chan | 4, isa_dma_port[chan][ISA_DMA_MASK]);
chan              178 arch/arm/kernel/dma-isa.c 		unsigned int chan, i;
chan              180 arch/arm/kernel/dma-isa.c 		for (chan = 0; chan < 8; chan++) {
chan              181 arch/arm/kernel/dma-isa.c 			isa_dma[chan].d_ops = &isa_dma_ops;
chan              182 arch/arm/kernel/dma-isa.c 			isa_disable_dma(chan, NULL);
chan              216 arch/arm/kernel/dma-isa.c 		for (chan = 0; chan < 8; chan++) {
chan              217 arch/arm/kernel/dma-isa.c 			int ret = isa_dma_add(chan, &isa_dma[chan]);
chan              220 arch/arm/kernel/dma-isa.c 				       chan, ret);
chan               28 arch/arm/kernel/dma.c static inline dma_t *dma_channel(unsigned int chan)
chan               30 arch/arm/kernel/dma.c 	if (chan >= MAX_DMA_CHANNELS)
chan               33 arch/arm/kernel/dma.c 	return dma_chan[chan];
chan               36 arch/arm/kernel/dma.c int __init isa_dma_add(unsigned int chan, dma_t *dma)
chan               43 arch/arm/kernel/dma.c 	if (dma_chan[chan])
chan               45 arch/arm/kernel/dma.c 	dma_chan[chan] = dma;
chan               54 arch/arm/kernel/dma.c int request_dma(unsigned int chan, const char *device_id)
chan               56 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan               71 arch/arm/kernel/dma.c 		ret = dma->d_ops->request(chan, dma);
chan               79 arch/arm/kernel/dma.c 	pr_err("dma: trying to allocate DMA%d\n", chan);
chan               92 arch/arm/kernel/dma.c void free_dma(unsigned int chan)
chan               94 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              100 arch/arm/kernel/dma.c 		pr_err("dma%d: freeing active DMA\n", chan);
chan              101 arch/arm/kernel/dma.c 		dma->d_ops->disable(chan, dma);
chan              107 arch/arm/kernel/dma.c 			dma->d_ops->free(chan, dma);
chan              111 arch/arm/kernel/dma.c 	pr_err("dma%d: trying to free free DMA\n", chan);
chan              115 arch/arm/kernel/dma.c 	pr_err("dma: trying to free DMA%d\n", chan);
chan              121 arch/arm/kernel/dma.c void set_dma_sg (unsigned int chan, struct scatterlist *sg, int nr_sg)
chan              123 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              126 arch/arm/kernel/dma.c 		pr_err("dma%d: altering DMA SG while DMA active\n", chan);
chan              138 arch/arm/kernel/dma.c void __set_dma_addr (unsigned int chan, void *addr)
chan              140 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              143 arch/arm/kernel/dma.c 		pr_err("dma%d: altering DMA address while DMA active\n", chan);
chan              155 arch/arm/kernel/dma.c void set_dma_count (unsigned int chan, unsigned long count)
chan              157 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              160 arch/arm/kernel/dma.c 		pr_err("dma%d: altering DMA count while DMA active\n", chan);
chan              170 arch/arm/kernel/dma.c void set_dma_mode (unsigned int chan, unsigned int mode)
chan              172 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              175 arch/arm/kernel/dma.c 		pr_err("dma%d: altering DMA mode while DMA active\n", chan);
chan              184 arch/arm/kernel/dma.c void enable_dma (unsigned int chan)
chan              186 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              193 arch/arm/kernel/dma.c 		dma->d_ops->enable(chan, dma);
chan              198 arch/arm/kernel/dma.c 	pr_err("dma%d: trying to enable free DMA\n", chan);
chan              205 arch/arm/kernel/dma.c void disable_dma (unsigned int chan)
chan              207 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              214 arch/arm/kernel/dma.c 		dma->d_ops->disable(chan, dma);
chan              219 arch/arm/kernel/dma.c 	pr_err("dma%d: trying to disable free DMA\n", chan);
chan              227 arch/arm/kernel/dma.c int dma_channel_active(unsigned int chan)
chan              229 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              234 arch/arm/kernel/dma.c void set_dma_page(unsigned int chan, char pagenr)
chan              236 arch/arm/kernel/dma.c 	pr_err("dma%d: trying to set_dma_page\n", chan);
chan              240 arch/arm/kernel/dma.c void set_dma_speed(unsigned int chan, int cycle_ns)
chan              242 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              246 arch/arm/kernel/dma.c 		ret = dma->d_ops->setspeed(chan, dma, cycle_ns);
chan              251 arch/arm/kernel/dma.c int get_dma_residue(unsigned int chan)
chan              253 arch/arm/kernel/dma.c 	dma_t *dma = dma_channel(chan);
chan              257 arch/arm/kernel/dma.c 		ret = dma->d_ops->residue(chan, dma);
chan               25 arch/arm/mach-footbridge/dma.c static int fb_dma_request(unsigned int chan, dma_t *dma)
chan               30 arch/arm/mach-footbridge/dma.c static void fb_dma_enable(unsigned int chan, dma_t *dma)
chan               34 arch/arm/mach-footbridge/dma.c static void fb_dma_disable(unsigned int chan, dma_t *dma)
chan              144 arch/arm/mach-iop32x/iop3xx.h #define IOP3XX_DMA_PHYS_BASE(chan) (IOP3XX_PERIPHERAL_PHYS_BASE + \
chan              145 arch/arm/mach-iop32x/iop3xx.h 					(0x400 + (chan << 6)))
chan              146 arch/arm/mach-iop32x/iop3xx.h #define IOP3XX_DMA_UPPER_PA(chan)  (IOP3XX_DMA_PHYS_BASE(chan) + 0x27)
chan              134 arch/arm/mach-rpc/dma.c static int iomd_request_dma(unsigned int chan, dma_t *dma)
chan              142 arch/arm/mach-rpc/dma.c static void iomd_free_dma(unsigned int chan, dma_t *dma)
chan              155 arch/arm/mach-rpc/dma.c static void iomd_enable_dma(unsigned int chan, dma_t *dma)
chan              192 arch/arm/mach-rpc/dma.c static void iomd_disable_dma(unsigned int chan, dma_t *dma)
chan              205 arch/arm/mach-rpc/dma.c static int iomd_set_dma_speed(unsigned int chan, dma_t *dma, int cycle)
chan              221 arch/arm/mach-rpc/dma.c 	switch (chan) {
chan              265 arch/arm/mach-rpc/dma.c static void floppy_enable_dma(unsigned int chan, dma_t *dma)
chan              299 arch/arm/mach-rpc/dma.c static void floppy_disable_dma(unsigned int chan, dma_t *dma)
chan              306 arch/arm/mach-rpc/dma.c static int floppy_get_residue(unsigned int chan, dma_t *dma)
chan              323 arch/arm/mach-rpc/dma.c static void sound_enable_disable_dma(unsigned int chan, dma_t *dma)
chan              609 arch/arm/plat-omap/dma.c 	struct omap_dma_lch *chan;
chan              625 arch/arm/plat-omap/dma.c 	chan = dma_chan + free_ch;
chan              626 arch/arm/plat-omap/dma.c 	chan->dev_id = dev_id;
chan              636 arch/arm/plat-omap/dma.c 	chan->dev_name = dev_name;
chan              637 arch/arm/plat-omap/dma.c 	chan->callback = callback;
chan              638 arch/arm/plat-omap/dma.c 	chan->data = data;
chan              639 arch/arm/plat-omap/dma.c 	chan->flags = 0;
chan              643 arch/arm/plat-omap/dma.c 		chan->chain_id = -1;
chan              644 arch/arm/plat-omap/dma.c 		chan->next_linked_ch = -1;
chan              648 arch/arm/plat-omap/dma.c 	chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;
chan              651 arch/arm/plat-omap/dma.c 		chan->enabled_irqs |= OMAP1_DMA_TOUT_IRQ;
chan              653 arch/arm/plat-omap/dma.c 		chan->enabled_irqs |= OMAP2_DMA_MISALIGNED_ERR_IRQ |
chan               18 arch/m68k/include/asm/mac_asc.h #define ASC_FREQ(chan,byte)	((0x810)+((chan)<<3)+(byte))
chan              333 arch/m68k/mac/iop.c int iop_listen(uint iop_num, uint chan,
chan              338 arch/m68k/mac/iop.c 	if (chan >= NUM_IOP_CHAN) return -EINVAL;
chan              339 arch/m68k/mac/iop.c 	if (iop_listeners[iop_num][chan].handler && handler) return -EINVAL;
chan              340 arch/m68k/mac/iop.c 	iop_listeners[iop_num][chan].devname = devname;
chan              341 arch/m68k/mac/iop.c 	iop_listeners[iop_num][chan].handler = handler;
chan              354 arch/m68k/mac/iop.c 	int chan = msg->channel;
chan              367 arch/m68k/mac/iop.c 		   IOP_ADDR_RECV_STATE + chan, IOP_MSG_COMPLETE);
chan              398 arch/m68k/mac/iop.c static void iop_handle_send(uint iop_num, uint chan)
chan              404 arch/m68k/mac/iop.c 	iop_pr_debug("iop_num %d chan %d\n", iop_num, chan);
chan              406 arch/m68k/mac/iop.c 	iop_writeb(iop, IOP_ADDR_SEND_STATE + chan, IOP_MSG_IDLE);
chan              408 arch/m68k/mac/iop.c 	if (!(msg = iop_send_queue[iop_num][chan])) return;
chan              411 arch/m68k/mac/iop.c 	offset = IOP_ADDR_SEND_MSG + (chan * IOP_MSG_LEN);
chan              418 arch/m68k/mac/iop.c 	iop_send_queue[iop_num][chan] = msg;
chan              427 arch/m68k/mac/iop.c static void iop_handle_recv(uint iop_num, uint chan)
chan              433 arch/m68k/mac/iop.c 	iop_pr_debug("iop_num %d chan %d\n", iop_num, chan);
chan              437 arch/m68k/mac/iop.c 	msg->channel = chan;
chan              439 arch/m68k/mac/iop.c 	msg->handler = iop_listeners[iop_num][chan].handler;
chan              441 arch/m68k/mac/iop.c 	offset = IOP_ADDR_RECV_MSG + (chan * IOP_MSG_LEN);
chan              447 arch/m68k/mac/iop.c 	iop_writeb(iop, IOP_ADDR_RECV_STATE + chan, IOP_MSG_RCVD);
chan              456 arch/m68k/mac/iop.c 		             iop_num, chan);
chan              470 arch/m68k/mac/iop.c int iop_send_message(uint iop_num, uint chan, void *privdata,
chan              477 arch/m68k/mac/iop.c 	if (chan >= NUM_IOP_CHAN) return -EINVAL;
chan              486 arch/m68k/mac/iop.c 	msg->channel = chan;
chan              491 arch/m68k/mac/iop.c 	if (!(q = iop_send_queue[iop_num][chan])) {
chan              492 arch/m68k/mac/iop.c 		iop_send_queue[iop_num][chan] = msg;
chan              499 arch/m68k/mac/iop.c 	    IOP_ADDR_SEND_STATE + chan) == IOP_MSG_IDLE) {
chan              256 arch/mips/alchemy/common/dbdma.c 	u32		used, chan;
chan              304 arch/mips/alchemy/common/dbdma.c 	chan = 0;
chan              320 arch/mips/alchemy/common/dbdma.c 		ctp->chan_index = chan = i;
chan              322 arch/mips/alchemy/common/dbdma.c 		dcp += (0x0100 * chan);
chan              350 arch/mips/alchemy/common/dbdma.c 		return (u32)(&chan_tab_ptr[chan]);
chan              104 arch/mips/alchemy/common/dma.c 	struct dma_chan *chan;
chan              107 arch/mips/alchemy/common/dma.c 		chan = get_dma_chan(i);
chan              108 arch/mips/alchemy/common/dma.c 		if (chan != NULL)
chan              110 arch/mips/alchemy/common/dma.c 				       i, chan->dev_str);
chan              136 arch/mips/alchemy/common/dma.c 	struct dma_chan *chan;
chan              140 arch/mips/alchemy/common/dma.c 	chan = &au1000_dma_table[dmanr];
chan              144 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_MODE_SET));
chan              146 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_PERIPHERAL_ADDR));
chan              148 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_BUFFER0_START));
chan              150 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_BUFFER1_START));
chan              152 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_BUFFER0_COUNT));
chan              154 arch/mips/alchemy/common/dma.c 	       __raw_readl(chan->io + DMA_BUFFER1_COUNT));
chan              167 arch/mips/alchemy/common/dma.c 	struct dma_chan *chan;
chan              186 arch/mips/alchemy/common/dma.c 	chan = &au1000_dma_table[i];
chan              195 arch/mips/alchemy/common/dma.c 		chan->irq_dev = irq_dev_id;
chan              196 arch/mips/alchemy/common/dma.c 		ret = request_irq(chan->irq, irqhandler, irqflags, dev_str,
chan              197 arch/mips/alchemy/common/dma.c 				  chan->irq_dev);
chan              199 arch/mips/alchemy/common/dma.c 			chan->irq_dev = NULL;
chan              203 arch/mips/alchemy/common/dma.c 		chan->irq_dev = NULL;
chan              207 arch/mips/alchemy/common/dma.c 	chan->io = (void __iomem *)(KSEG1ADDR(AU1000_DMA_PHYS_ADDR) +
chan              209 arch/mips/alchemy/common/dma.c 	chan->dev_id = dev_id;
chan              210 arch/mips/alchemy/common/dma.c 	chan->dev_str = dev_str;
chan              211 arch/mips/alchemy/common/dma.c 	chan->fifo_addr = dev->fifo_addr;
chan              212 arch/mips/alchemy/common/dma.c 	chan->mode = dev->dma_mode;
chan              223 arch/mips/alchemy/common/dma.c 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              225 arch/mips/alchemy/common/dma.c 	if (!chan) {
chan              231 arch/mips/alchemy/common/dma.c 	if (chan->irq_dev)
chan              232 arch/mips/alchemy/common/dma.c 		free_irq(chan->irq, chan->irq_dev);
chan              234 arch/mips/alchemy/common/dma.c 	chan->irq_dev = NULL;
chan              235 arch/mips/alchemy/common/dma.c 	chan->dev_id = -1;
chan              144 arch/mips/include/asm/ip32/mace.h 	} chan[3];
chan              156 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              158 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              160 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_BE0, chan->io + DMA_MODE_SET);
chan              165 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              167 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              169 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_BE1, chan->io + DMA_MODE_SET);
chan              173 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              175 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              177 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_BE0 | DMA_BE1, chan->io + DMA_MODE_SET);
chan              182 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              184 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              186 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_GO, chan->io + DMA_MODE_SET);
chan              193 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              196 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              198 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_GO, chan->io + DMA_MODE_CLEAR);
chan              202 arch/mips/include/asm/mach-au1x00/au1000_dma.h 		if (__raw_readl(chan->io + DMA_MODE_READ) & DMA_HALT)
chan              210 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              212 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              218 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(~DMA_GO, chan->io + DMA_MODE_CLEAR);
chan              223 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              225 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              227 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	return (__raw_readl(chan->io + DMA_MODE_READ) & DMA_HALT) ? 1 : 0;
chan              233 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              236 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              242 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(CPHYSADDR(chan->fifo_addr), chan->io + DMA_PERIPHERAL_ADDR);
chan              244 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	mode = chan->mode | (chan->dev_id << DMA_DID_BIT);
chan              245 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (chan->irq)
chan              248 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(~mode, chan->io + DMA_MODE_CLEAR);
chan              249 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(mode,	 chan->io + DMA_MODE_SET);
chan              257 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              259 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              267 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	chan->mode &= ~(DMA_BE | DMA_DR | DMA_TS8 | DMA_DW_MASK | DMA_NC);
chan              268 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	chan->mode |= mode;
chan              273 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              275 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              277 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	return chan->mode;
chan              282 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              284 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              286 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	return (__raw_readl(chan->io + DMA_MODE_READ) & DMA_AB) ? 1 : 0;
chan              296 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              298 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              301 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (chan->mode & DMA_DS)	/* second bank of device IDs */
chan              304 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (chan->dev_id != DMA_ID_GP04 && chan->dev_id != DMA_ID_GP05)
chan              307 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(CPHYSADDR(a), chan->io + DMA_PERIPHERAL_ADDR);
chan              315 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              317 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              319 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_D0, chan->io + DMA_MODE_CLEAR);
chan              324 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              326 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              328 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(DMA_D1, chan->io + DMA_MODE_CLEAR);
chan              343 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              345 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              347 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(a, chan->io + DMA_BUFFER0_START);
chan              355 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              357 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              359 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(a, chan->io + DMA_BUFFER1_START);
chan              368 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              370 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              373 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(count, chan->io + DMA_BUFFER0_COUNT);
chan              381 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              383 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              386 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(count, chan->io + DMA_BUFFER1_COUNT);
chan              394 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              396 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              399 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(count, chan->io + DMA_BUFFER0_COUNT);
chan              400 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	__raw_writel(count, chan->io + DMA_BUFFER1_COUNT);
chan              409 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              411 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              413 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	return __raw_readl(chan->io + DMA_MODE_READ) & (DMA_D0 | DMA_D1);
chan              422 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              424 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              426 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	return chan->irq;
chan              435 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	struct dma_chan *chan = get_dma_chan(dmanr);
chan              437 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if (!chan)
chan              440 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	curBufCntReg = (__raw_readl(chan->io + DMA_MODE_READ) & DMA_AB) ?
chan              443 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	count = __raw_readl(chan->io + curBufCntReg) & DMA_COUNT_MASK;
chan              445 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	if ((chan->mode & DMA_DW_MASK) == DMA_DW16)
chan              447 arch/mips/include/asm/mach-au1x00/au1000_dma.h 	else if ((chan->mode & DMA_DW_MASK) == DMA_DW32)
chan               24 arch/mips/include/asm/mach-loongson32/nand.h bool ls1x_dma_filter_fn(struct dma_chan *chan, void *param);
chan              207 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART(chan)		    ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1)
chan              210 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART_CHANREG(chan, reg)				\
chan              211 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(A_BCM1480_DUART(chan) +					\
chan              212 arch/mips/include/asm/sibyte/bcm1480_regs.h 	 BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg))
chan              213 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART_CTRLREG(chan, reg)				\
chan              214 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(A_BCM1480_DUART(chan) +					\
chan              220 arch/mips/include/asm/sibyte/bcm1480_regs.h #define R_BCM1480_DUART_IMRREG(chan)					\
chan              221 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
chan              222 arch/mips/include/asm/sibyte/bcm1480_regs.h #define R_BCM1480_DUART_ISRREG(chan)					\
chan              223 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
chan              224 arch/mips/include/asm/sibyte/bcm1480_regs.h #define R_BCM1480_DUART_INCHREG(chan)					\
chan              225 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(R_DUART_IN_CHNG_A + ((chan) & 1) * DUART_INCHNG_SPACING)
chan              227 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART_IMRREG(chan)					\
chan              228 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan)))
chan              229 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART_ISRREG(chan)					\
chan              230 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_ISRREG(chan)))
chan              232 arch/mips/include/asm/sibyte/bcm1480_regs.h #define A_BCM1480_DUART_IN_PORT(chan)					\
chan              233 arch/mips/include/asm/sibyte/bcm1480_regs.h 	(A_BCM1480_DUART_CTRLREG((chan), R_DUART_IN_PORT))
chan              163 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan)  \
chan              167 arch/mips/include/asm/sibyte/sb1250_regs.h 	     (MAC_DMA_CHANNEL_SPACING*(chan)))
chan              169 arch/mips/include/asm/sibyte/sb1250_regs.h #define R_MAC_DMA_CHANNEL_BASE(txrx, chan)		\
chan              172 arch/mips/include/asm/sibyte/sb1250_regs.h 	     (MAC_DMA_CHANNEL_SPACING*(chan)))
chan              174 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg)	      \
chan              175 arch/mips/include/asm/sibyte/sb1250_regs.h 	    (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) +    \
chan              178 arch/mips/include/asm/sibyte/sb1250_regs.h #define R_MAC_DMA_REGISTER(txrx, chan, reg)	      \
chan              179 arch/mips/include/asm/sibyte/sb1250_regs.h 	    (R_MAC_DMA_CHANNEL_BASE(txrx, chan) +    \
chan              269 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_DUART_CHANREG(chan, reg)					\
chan              270 arch/mips/include/asm/sibyte/sb1250_regs.h 	(A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg))
chan              300 arch/mips/include/asm/sibyte/sb1250_regs.h #define R_DUART_IMRREG(chan)						\
chan              301 arch/mips/include/asm/sibyte/sb1250_regs.h 	(R_DUART_IMR_A + (chan) * DUART_IMRISR_SPACING)
chan              302 arch/mips/include/asm/sibyte/sb1250_regs.h #define R_DUART_ISRREG(chan)						\
chan              303 arch/mips/include/asm/sibyte/sb1250_regs.h 	(R_DUART_ISR_A + (chan) * DUART_IMRISR_SPACING)
chan              304 arch/mips/include/asm/sibyte/sb1250_regs.h #define R_DUART_INCHREG(chan)						\
chan              305 arch/mips/include/asm/sibyte/sb1250_regs.h 	(R_DUART_IN_CHNG_A + (chan) * DUART_INCHNG_SPACING)
chan              307 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_DUART_IMRREG(chan)	    A_DUART_CTRLREG(R_DUART_IMRREG(chan))
chan              308 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_DUART_ISRREG(chan)	    A_DUART_CTRLREG(R_DUART_ISRREG(chan))
chan              309 arch/mips/include/asm/sibyte/sb1250_regs.h #define A_DUART_INCHREG(chan)	    A_DUART_CTRLREG(R_DUART_INCHREG(chan))
chan              324 arch/mips/include/asm/sibyte/sb1250_uart.h #define M_DUART_OUT_PIN_SET(chan) \
chan              325 arch/mips/include/asm/sibyte/sb1250_uart.h     (chan == 0 ? M_DUART_OUT_PIN_SET0 : M_DUART_OUT_PIN_SET1)
chan              326 arch/mips/include/asm/sibyte/sb1250_uart.h #define M_DUART_OUT_PIN_CLR(chan) \
chan              327 arch/mips/include/asm/sibyte/sb1250_uart.h     (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1)
chan               38 arch/mips/kernel/rtlx.c 		struct rtlx_channel *chan = &rtlx->channel[i];
chan               41 arch/mips/kernel/rtlx.c 			chan->rt_state, chan->lx_state, chan->buffer_size);
chan               44 arch/mips/kernel/rtlx.c 			chan->rt_read, chan->rt_write);
chan               47 arch/mips/kernel/rtlx.c 			chan->lx_read, chan->lx_write);
chan               49 arch/mips/kernel/rtlx.c 		pr_info(" rt_buffer <%s>\n", chan->rt_buffer);
chan               50 arch/mips/kernel/rtlx.c 		pr_info(" lx_buffer <%s>\n", chan->lx_buffer);
chan               94 arch/mips/kernel/rtlx.c 	struct rtlx_channel *chan;
chan              165 arch/mips/kernel/rtlx.c 	chan = &rtlx->channel[index];
chan              167 arch/mips/kernel/rtlx.c 	state = xchg(&chan->lx_state, RTLX_STATE_OPENED);
chan              194 arch/mips/kernel/rtlx.c 	struct rtlx_channel *chan;
chan              199 arch/mips/kernel/rtlx.c 	chan = &rtlx->channel[index];
chan              202 arch/mips/kernel/rtlx.c 	if (chan->lx_read == chan->lx_write) {
chan              206 arch/mips/kernel/rtlx.c 				(chan->lx_read != chan->lx_write) ||
chan              217 arch/mips/kernel/rtlx.c 	return (chan->lx_write + chan->buffer_size - chan->lx_read)
chan              218 arch/mips/kernel/rtlx.c 	       % chan->buffer_size;
chan              236 arch/mips/kernel/rtlx.c 	struct rtlx_channel *chan = &rtlx->channel[index];
chan              238 arch/mips/kernel/rtlx.c 	return write_spacefree(chan->rt_read, chan->rt_write,
chan              239 arch/mips/kernel/rtlx.c 				chan->buffer_size);
chan              497 arch/powerpc/include/asm/pasemi_dma.h extern void pasemi_dma_free_chan(struct pasemi_dmachan *chan);
chan              499 arch/powerpc/include/asm/pasemi_dma.h extern void pasemi_dma_start_chan(const struct pasemi_dmachan *chan,
chan              501 arch/powerpc/include/asm/pasemi_dma.h extern int pasemi_dma_stop_chan(const struct pasemi_dmachan *chan);
chan              505 arch/powerpc/include/asm/pasemi_dma.h extern int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size);
chan              506 arch/powerpc/include/asm/pasemi_dma.h extern void pasemi_dma_free_ring(struct pasemi_dmachan *chan);
chan              508 arch/powerpc/include/asm/pasemi_dma.h extern void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size,
chan              510 arch/powerpc/include/asm/pasemi_dma.h extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size,
chan               41 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	struct dma_chan *chan;
chan              140 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_unmap_single(lpbfifo.chan->device->dev,
chan              226 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_dev = lpbfifo.chan->device;
chan              243 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	if (dma_dev->device_config(lpbfifo.chan, &dma_conf)) {
chan              259 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_tx = dmaengine_prep_slave_sg(lpbfifo.chan, &sg,
chan              437 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	lpbfifo.chan = dma_request_slave_channel(&pdev->dev, "rx-tx");
chan              438 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	if (lpbfifo.chan == NULL)
chan              494 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_release_channel(lpbfifo.chan);
chan              501 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	struct dma_device *dma_dev = lpbfifo.chan->device;
chan              509 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_dev->device_terminate_all(lpbfifo.chan);
chan              514 arch/powerpc/platforms/512x/mpc512x_lpbfifo.c 	dma_release_channel(lpbfifo.chan);
chan              129 arch/powerpc/platforms/pasemi/dma_lib.c static void pasemi_free_tx_chan(int chan)
chan              131 arch/powerpc/platforms/pasemi/dma_lib.c 	BUG_ON(test_bit(chan, txch_free));
chan              132 arch/powerpc/platforms/pasemi/dma_lib.c 	set_bit(chan, txch_free);
chan              148 arch/powerpc/platforms/pasemi/dma_lib.c static void pasemi_free_rx_chan(int chan)
chan              150 arch/powerpc/platforms/pasemi/dma_lib.c 	BUG_ON(test_bit(chan, rxch_free));
chan              151 arch/powerpc/platforms/pasemi/dma_lib.c 	set_bit(chan, rxch_free);
chan              173 arch/powerpc/platforms/pasemi/dma_lib.c 	struct pasemi_dmachan *chan;
chan              182 arch/powerpc/platforms/pasemi/dma_lib.c 	chan = buf + offset;
chan              184 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->priv = buf;
chan              189 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->chno = chno;
chan              190 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->irq = irq_create_mapping(NULL,
chan              192 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->status = &dma_status->rx_sta[chno];
chan              196 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->chno = chno;
chan              197 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->irq = irq_create_mapping(NULL, base_hw_irq + chno);
chan              198 arch/powerpc/platforms/pasemi/dma_lib.c 		chan->status = &dma_status->tx_sta[chno];
chan              202 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->chan_type = type;
chan              204 arch/powerpc/platforms/pasemi/dma_lib.c 	return chan;
chan              214 arch/powerpc/platforms/pasemi/dma_lib.c void pasemi_dma_free_chan(struct pasemi_dmachan *chan)
chan              216 arch/powerpc/platforms/pasemi/dma_lib.c 	if (chan->ring_virt)
chan              217 arch/powerpc/platforms/pasemi/dma_lib.c 		pasemi_dma_free_ring(chan);
chan              219 arch/powerpc/platforms/pasemi/dma_lib.c 	switch (chan->chan_type & (RXCHAN|TXCHAN)) {
chan              221 arch/powerpc/platforms/pasemi/dma_lib.c 		pasemi_free_rx_chan(chan->chno);
chan              224 arch/powerpc/platforms/pasemi/dma_lib.c 		pasemi_free_tx_chan(chan->chno);
chan              228 arch/powerpc/platforms/pasemi/dma_lib.c 	kfree(chan->priv);
chan              240 arch/powerpc/platforms/pasemi/dma_lib.c int pasemi_dma_alloc_ring(struct pasemi_dmachan *chan, int ring_size)
chan              242 arch/powerpc/platforms/pasemi/dma_lib.c 	BUG_ON(chan->ring_virt);
chan              244 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->ring_size = ring_size;
chan              246 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->ring_virt = dma_alloc_coherent(&dma_pdev->dev,
chan              248 arch/powerpc/platforms/pasemi/dma_lib.c 					     &chan->ring_dma, GFP_KERNEL);
chan              250 arch/powerpc/platforms/pasemi/dma_lib.c 	if (!chan->ring_virt)
chan              262 arch/powerpc/platforms/pasemi/dma_lib.c void pasemi_dma_free_ring(struct pasemi_dmachan *chan)
chan              264 arch/powerpc/platforms/pasemi/dma_lib.c 	BUG_ON(!chan->ring_virt);
chan              266 arch/powerpc/platforms/pasemi/dma_lib.c 	dma_free_coherent(&dma_pdev->dev, chan->ring_size * sizeof(u64),
chan              267 arch/powerpc/platforms/pasemi/dma_lib.c 			  chan->ring_virt, chan->ring_dma);
chan              268 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->ring_virt = NULL;
chan              269 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->ring_size = 0;
chan              270 arch/powerpc/platforms/pasemi/dma_lib.c 	chan->ring_dma = 0;
chan              280 arch/powerpc/platforms/pasemi/dma_lib.c void pasemi_dma_start_chan(const struct pasemi_dmachan *chan, const u32 cmdsta)
chan              282 arch/powerpc/platforms/pasemi/dma_lib.c 	if (chan->chan_type == RXCHAN)
chan              283 arch/powerpc/platforms/pasemi/dma_lib.c 		pasemi_write_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(chan->chno),
chan              286 arch/powerpc/platforms/pasemi/dma_lib.c 		pasemi_write_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(chan->chno),
chan              304 arch/powerpc/platforms/pasemi/dma_lib.c int pasemi_dma_stop_chan(const struct pasemi_dmachan *chan)
chan              309 arch/powerpc/platforms/pasemi/dma_lib.c 	if (chan->chan_type == RXCHAN) {
chan              310 arch/powerpc/platforms/pasemi/dma_lib.c 		reg = PAS_DMA_RXCHAN_CCMDSTA(chan->chno);
chan              321 arch/powerpc/platforms/pasemi/dma_lib.c 		reg = PAS_DMA_TXCHAN_TCMDSTA(chan->chno);
chan              347 arch/powerpc/platforms/pasemi/dma_lib.c void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size,
chan              361 arch/powerpc/platforms/pasemi/dma_lib.c void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size,
chan              496 arch/powerpc/platforms/powermac/feature.c 		volatile struct dbdma_regs __iomem * chan = (void __iomem *)
chan              498 arch/powerpc/platforms/powermac/feature.c 		save[i].cmdptr_hi = in_le32(&chan->cmdptr_hi);
chan              499 arch/powerpc/platforms/powermac/feature.c 		save[i].cmdptr = in_le32(&chan->cmdptr);
chan              500 arch/powerpc/platforms/powermac/feature.c 		save[i].intr_sel = in_le32(&chan->intr_sel);
chan              501 arch/powerpc/platforms/powermac/feature.c 		save[i].br_sel = in_le32(&chan->br_sel);
chan              502 arch/powerpc/platforms/powermac/feature.c 		save[i].wait_sel = in_le32(&chan->wait_sel);
chan              512 arch/powerpc/platforms/powermac/feature.c 		volatile struct dbdma_regs __iomem * chan = (void __iomem *)
chan              514 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->control, (ACTIVE|DEAD|WAKE|FLUSH|PAUSE|RUN)<<16);
chan              515 arch/powerpc/platforms/powermac/feature.c 		while (in_le32(&chan->status) & ACTIVE)
chan              517 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->cmdptr_hi, save[i].cmdptr_hi);
chan              518 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->cmdptr, save[i].cmdptr);
chan              519 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->intr_sel, save[i].intr_sel);
chan              520 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->br_sel, save[i].br_sel);
chan              521 arch/powerpc/platforms/powermac/feature.c 		out_le32(&chan->wait_sel, save[i].wait_sel);
chan              219 arch/sh/boards/mach-ap325rxa/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan              343 arch/sh/boards/mach-ecovec24/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan              160 arch/sh/boards/mach-kfr2r09/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan              248 arch/sh/boards/mach-migor/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan              262 arch/sh/boards/mach-migor/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan              192 arch/sh/boards/mach-se/7724/setup.c 		.chan = LCDC_CHAN_MAINLCD,
chan               24 arch/sh/drivers/dma/dma-api.c struct dma_info *get_dma_info(unsigned int chan)
chan               33 arch/sh/drivers/dma/dma-api.c 		if ((chan <  info->first_vchannel_nr) ||
chan               34 arch/sh/drivers/dma/dma-api.c 		    (chan >= info->first_vchannel_nr + info->nr_channels))
chan               73 arch/sh/drivers/dma/dma-api.c struct dma_channel *get_dma_channel(unsigned int chan)
chan               75 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan               84 arch/sh/drivers/dma/dma-api.c 		if (channel->vchan == chan)
chan               92 arch/sh/drivers/dma/dma-api.c int get_dma_residue(unsigned int chan)
chan               94 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan               95 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              155 arch/sh/drivers/dma/dma-api.c 			if (request_dma(channel->chan, dev_id) == 0)
chan              156 arch/sh/drivers/dma/dma-api.c 				return channel->chan;
chan              185 arch/sh/drivers/dma/dma-api.c 		return channel->chan;
chan              191 arch/sh/drivers/dma/dma-api.c int request_dma(unsigned int chan, const char *dev_id)
chan              194 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              197 arch/sh/drivers/dma/dma-api.c 	channel = get_dma_channel(chan);
chan              215 arch/sh/drivers/dma/dma-api.c void free_dma(unsigned int chan)
chan              217 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              218 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              227 arch/sh/drivers/dma/dma-api.c void dma_wait_for_completion(unsigned int chan)
chan              229 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              230 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              272 arch/sh/drivers/dma/dma-api.c void dma_configure_channel(unsigned int chan, unsigned long flags)
chan              274 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              275 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              282 arch/sh/drivers/dma/dma-api.c int dma_xfer(unsigned int chan, unsigned long from,
chan              285 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              286 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              297 arch/sh/drivers/dma/dma-api.c int dma_extend(unsigned int chan, unsigned long op, void *param)
chan              299 arch/sh/drivers/dma/dma-api.c 	struct dma_info *info = get_dma_info(chan);
chan              300 arch/sh/drivers/dma/dma-api.c 	struct dma_channel *channel = get_dma_channel(chan);
chan              371 arch/sh/drivers/dma/dma-api.c 		struct dma_channel *chan = &info->channels[i];
chan              373 arch/sh/drivers/dma/dma-api.c 		atomic_set(&chan->busy, 0);
chan              375 arch/sh/drivers/dma/dma-api.c 		chan->chan  = info->first_channel_nr + i;
chan              376 arch/sh/drivers/dma/dma-api.c 		chan->vchan = info->first_channel_nr + i + total_channels;
chan              378 arch/sh/drivers/dma/dma-api.c 		memcpy(chan->dev_id, "Unused", 7);
chan              381 arch/sh/drivers/dma/dma-api.c 			chan->flags |= DMA_TEI_CAPABLE;
chan              383 arch/sh/drivers/dma/dma-api.c 		init_waitqueue_head(&chan->wait_queue);
chan              384 arch/sh/drivers/dma/dma-api.c 		dma_create_sysfs_files(chan, info);
chan               61 arch/sh/drivers/dma/dma-g2.c 				struct dma_channel *chan = info->channels + i;
chan               63 arch/sh/drivers/dma/dma-g2.c 				wake_up(&chan->wait_queue);
chan               73 arch/sh/drivers/dma/dma-g2.c static int g2_enable_dma(struct dma_channel *chan)
chan               75 arch/sh/drivers/dma/dma-g2.c 	unsigned int chan_nr = chan->chan;
chan               83 arch/sh/drivers/dma/dma-g2.c static int g2_disable_dma(struct dma_channel *chan)
chan               85 arch/sh/drivers/dma/dma-g2.c 	unsigned int chan_nr = chan->chan;
chan               93 arch/sh/drivers/dma/dma-g2.c static int g2_xfer_dma(struct dma_channel *chan)
chan               95 arch/sh/drivers/dma/dma-g2.c 	unsigned int chan_nr = chan->chan;
chan               97 arch/sh/drivers/dma/dma-g2.c 	if (chan->sar & 31) {
chan               98 arch/sh/drivers/dma/dma-g2.c 		printk("g2dma: unaligned source 0x%lx\n", chan->sar);
chan              102 arch/sh/drivers/dma/dma-g2.c 	if (chan->dar & 31) {
chan              103 arch/sh/drivers/dma/dma-g2.c 		printk("g2dma: unaligned dest 0x%lx\n", chan->dar);
chan              108 arch/sh/drivers/dma/dma-g2.c 	if (chan->count & 31)
chan              109 arch/sh/drivers/dma/dma-g2.c 		chan->count = (chan->count + (32 - 1)) & ~(32 - 1);
chan              112 arch/sh/drivers/dma/dma-g2.c 	chan->dar += 0xa0800000;
chan              115 arch/sh/drivers/dma/dma-g2.c 	chan->mode = !chan->mode;
chan              117 arch/sh/drivers/dma/dma-g2.c 	flush_icache_range((unsigned long)chan->sar, chan->count);
chan              119 arch/sh/drivers/dma/dma-g2.c 	g2_disable_dma(chan);
chan              121 arch/sh/drivers/dma/dma-g2.c 	g2_dma->channel[chan_nr].g2_addr   = chan->dar & 0x1fffffe0;
chan              122 arch/sh/drivers/dma/dma-g2.c 	g2_dma->channel[chan_nr].root_addr = chan->sar & 0x1fffffe0;
chan              123 arch/sh/drivers/dma/dma-g2.c 	g2_dma->channel[chan_nr].size	   = (chan->count & ~31) | 0x80000000;
chan              124 arch/sh/drivers/dma/dma-g2.c 	g2_dma->channel[chan_nr].direction = chan->mode;
chan              133 arch/sh/drivers/dma/dma-g2.c 	g2_enable_dma(chan);
chan              149 arch/sh/drivers/dma/dma-g2.c static int g2_get_residue(struct dma_channel *chan)
chan              151 arch/sh/drivers/dma/dma-g2.c 	return g2_bytes_remaining(chan->chan);
chan               38 arch/sh/drivers/dma/dma-pvr2.c static int pvr2_request_dma(struct dma_channel *chan)
chan               48 arch/sh/drivers/dma/dma-pvr2.c static int pvr2_get_dma_residue(struct dma_channel *chan)
chan               53 arch/sh/drivers/dma/dma-pvr2.c static int pvr2_xfer_dma(struct dma_channel *chan)
chan               55 arch/sh/drivers/dma/dma-pvr2.c 	if (chan->sar || !chan->dar)
chan               60 arch/sh/drivers/dma/dma-pvr2.c 	__raw_writel(chan->dar, PVR2_DMA_ADDR);
chan               61 arch/sh/drivers/dma/dma-pvr2.c 	__raw_writel(chan->count, PVR2_DMA_COUNT);
chan               62 arch/sh/drivers/dma/dma-pvr2.c 	__raw_writel(chan->mode & DMA_MODE_MASK, PVR2_DMA_MODE);
chan               27 arch/sh/drivers/dma/dma-sh.c static unsigned long dma_find_base(unsigned int chan)
chan               32 arch/sh/drivers/dma/dma-sh.c 	if (chan >= 6)
chan               39 arch/sh/drivers/dma/dma-sh.c static unsigned long dma_base_addr(unsigned int chan)
chan               41 arch/sh/drivers/dma/dma-sh.c 	unsigned long base = dma_find_base(chan);
chan               44 arch/sh/drivers/dma/dma-sh.c 	if (chan >= 9)
chan               45 arch/sh/drivers/dma/dma-sh.c 		chan -= 6;
chan               46 arch/sh/drivers/dma/dma-sh.c 	if (chan >= 4)
chan               49 arch/sh/drivers/dma/dma-sh.c 	return base + (chan * 0x10);
chan               53 arch/sh/drivers/dma/dma-sh.c static inline unsigned int get_dmte_irq(unsigned int chan)
chan               55 arch/sh/drivers/dma/dma-sh.c 	return chan >= 6 ? DMTE6_IRQ : DMTE0_IRQ;
chan               75 arch/sh/drivers/dma/dma-sh.c static inline unsigned int get_dmte_irq(unsigned int chan)
chan               77 arch/sh/drivers/dma/dma-sh.c 	return dmte_irq_map[chan];
chan               91 arch/sh/drivers/dma/dma-sh.c static inline unsigned int calc_xmit_shift(struct dma_channel *chan)
chan               93 arch/sh/drivers/dma/dma-sh.c 	u32 chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR);
chan              108 arch/sh/drivers/dma/dma-sh.c 	struct dma_channel *chan = dev_id;
chan              111 arch/sh/drivers/dma/dma-sh.c 	chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR);
chan              117 arch/sh/drivers/dma/dma-sh.c 	__raw_writel(chcr, (dma_base_addr(chan->chan) + CHCR));
chan              119 arch/sh/drivers/dma/dma-sh.c 	wake_up(&chan->wait_queue);
chan              124 arch/sh/drivers/dma/dma-sh.c static int sh_dmac_request_dma(struct dma_channel *chan)
chan              126 arch/sh/drivers/dma/dma-sh.c 	if (unlikely(!(chan->flags & DMA_TEI_CAPABLE)))
chan              129 arch/sh/drivers/dma/dma-sh.c 	return request_irq(get_dmte_irq(chan->chan), dma_tei, IRQF_SHARED,
chan              130 arch/sh/drivers/dma/dma-sh.c 			   chan->dev_id, chan);
chan              133 arch/sh/drivers/dma/dma-sh.c static void sh_dmac_free_dma(struct dma_channel *chan)
chan              135 arch/sh/drivers/dma/dma-sh.c 	free_irq(get_dmte_irq(chan->chan), chan);
chan              139 arch/sh/drivers/dma/dma-sh.c sh_dmac_configure_channel(struct dma_channel *chan, unsigned long chcr)
chan              146 arch/sh/drivers/dma/dma-sh.c 		chan->flags |= DMA_TEI_CAPABLE;
chan              148 arch/sh/drivers/dma/dma-sh.c 		chan->flags &= ~DMA_TEI_CAPABLE;
chan              151 arch/sh/drivers/dma/dma-sh.c 	__raw_writel(chcr, (dma_base_addr(chan->chan) + CHCR));
chan              153 arch/sh/drivers/dma/dma-sh.c 	chan->flags |= DMA_CONFIGURED;
chan              157 arch/sh/drivers/dma/dma-sh.c static void sh_dmac_enable_dma(struct dma_channel *chan)
chan              162 arch/sh/drivers/dma/dma-sh.c 	chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR);
chan              165 arch/sh/drivers/dma/dma-sh.c 	if (chan->flags & DMA_TEI_CAPABLE)
chan              168 arch/sh/drivers/dma/dma-sh.c 	__raw_writel(chcr, (dma_base_addr(chan->chan) + CHCR));
chan              170 arch/sh/drivers/dma/dma-sh.c 	if (chan->flags & DMA_TEI_CAPABLE) {
chan              171 arch/sh/drivers/dma/dma-sh.c 		irq = get_dmte_irq(chan->chan);
chan              176 arch/sh/drivers/dma/dma-sh.c static void sh_dmac_disable_dma(struct dma_channel *chan)
chan              181 arch/sh/drivers/dma/dma-sh.c 	if (chan->flags & DMA_TEI_CAPABLE) {
chan              182 arch/sh/drivers/dma/dma-sh.c 		irq = get_dmte_irq(chan->chan);
chan              186 arch/sh/drivers/dma/dma-sh.c 	chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR);
chan              188 arch/sh/drivers/dma/dma-sh.c 	__raw_writel(chcr, (dma_base_addr(chan->chan) + CHCR));
chan              191 arch/sh/drivers/dma/dma-sh.c static int sh_dmac_xfer_dma(struct dma_channel *chan)
chan              197 arch/sh/drivers/dma/dma-sh.c 	if (unlikely(!(chan->flags & DMA_CONFIGURED)))
chan              198 arch/sh/drivers/dma/dma-sh.c 		sh_dmac_configure_channel(chan, 0);
chan              200 arch/sh/drivers/dma/dma-sh.c 	sh_dmac_disable_dma(chan);
chan              217 arch/sh/drivers/dma/dma-sh.c 	if (chan->sar || (mach_is_dreamcast() &&
chan              218 arch/sh/drivers/dma/dma-sh.c 			  chan->chan == PVR2_CASCADE_CHAN))
chan              219 arch/sh/drivers/dma/dma-sh.c 		__raw_writel(chan->sar, (dma_base_addr(chan->chan) + SAR));
chan              220 arch/sh/drivers/dma/dma-sh.c 	if (chan->dar || (mach_is_dreamcast() &&
chan              221 arch/sh/drivers/dma/dma-sh.c 			  chan->chan == PVR2_CASCADE_CHAN))
chan              222 arch/sh/drivers/dma/dma-sh.c 		__raw_writel(chan->dar, (dma_base_addr(chan->chan) + DAR));
chan              224 arch/sh/drivers/dma/dma-sh.c 	__raw_writel(chan->count >> calc_xmit_shift(chan),
chan              225 arch/sh/drivers/dma/dma-sh.c 		(dma_base_addr(chan->chan) + TCR));
chan              227 arch/sh/drivers/dma/dma-sh.c 	sh_dmac_enable_dma(chan);
chan              232 arch/sh/drivers/dma/dma-sh.c static int sh_dmac_get_dma_residue(struct dma_channel *chan)
chan              234 arch/sh/drivers/dma/dma-sh.c 	if (!(__raw_readl(dma_base_addr(chan->chan) + CHCR) & CHCR_DE))
chan              237 arch/sh/drivers/dma/dma-sh.c 	return __raw_readl(dma_base_addr(chan->chan) + TCR)
chan              238 arch/sh/drivers/dma/dma-sh.c 		 << calc_xmit_shift(chan);
chan               37 arch/sh/drivers/dma/dma-sysfs.c 			       channel->chan, info->name,
chan              121 arch/sh/drivers/dma/dma-sysfs.c int dma_create_sysfs_files(struct dma_channel *chan, struct dma_info *info)
chan              123 arch/sh/drivers/dma/dma-sysfs.c 	struct device *dev = &chan->dev;
chan              127 arch/sh/drivers/dma/dma-sysfs.c 	dev->id  = chan->vchan;
chan              145 arch/sh/drivers/dma/dma-sysfs.c 	snprintf(name, sizeof(name), "dma%d", chan->chan);
chan              149 arch/sh/drivers/dma/dma-sysfs.c void dma_remove_sysfs_files(struct dma_channel *chan, struct dma_info *info)
chan              151 arch/sh/drivers/dma/dma-sysfs.c 	struct device *dev = &chan->dev;
chan              160 arch/sh/drivers/dma/dma-sysfs.c 	snprintf(name, sizeof(name), "dma%d", chan->chan);
chan               39 arch/sh/drivers/pci/fixups-landisk.c int pci_fixup_pcic(struct pci_channel *chan)
chan               45 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, bcr1, SH4_PCIBCR1);
chan               49 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, mcr, SH4_PCIMCR);
chan               51 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, 0x0c000000, SH7751_PCICONF5);
chan               52 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, 0xd0000000, SH7751_PCICONF6);
chan               53 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, 0x0c000000, SH4_PCILAR0);
chan               54 arch/sh/drivers/pci/fixups-landisk.c 	pci_write_reg(chan, 0x00000000, SH4_PCILAR1);
chan               39 arch/sh/drivers/pci/fixups-rts7751r2d.c int pci_fixup_pcic(struct pci_channel *chan)
chan               45 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, bcr1, SH4_PCIBCR1);
chan               48 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0x0000c3ff, SH4_PCIINTM);
chan               49 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0x0000380f, SH4_PCIAINTM);
chan               51 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0xfb900047, SH7751_PCICONF1);
chan               52 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0xab000001, SH7751_PCICONF4);
chan               56 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, mcr, SH4_PCIMCR);
chan               58 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0x0c000000, SH7751_PCICONF5);
chan               59 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0xd0000000, SH7751_PCICONF6);
chan               60 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0x0c000000, SH4_PCILAR0);
chan               61 arch/sh/drivers/pci/fixups-rts7751r2d.c 	pci_write_reg(chan, 0x00000000, SH4_PCILAR1);
chan               39 arch/sh/drivers/pci/fixups-se7751.c int pci_fixup_pcic(struct pci_channel *chan)
chan              102 arch/sh/drivers/pci/fixups-se7751.c 	BUG_ON(chan->resources[1].start != SH7751_PCI_MEMORY_BASE);
chan              104 arch/sh/drivers/pci/fixups-se7751.c 	PCIC_WRITE(SH7751_PCIMBR, chan->resources[1].start);
chan              107 arch/sh/drivers/pci/fixups-se7751.c 	PCIC_WRITE(SH7751_PCIIOBR, (chan->resources[0].start & SH7751_PCIIOBR_MASK));
chan               25 arch/sh/drivers/pci/ops-sh4.c 	struct pci_channel *chan = bus->sysdata;
chan               34 arch/sh/drivers/pci/ops-sh4.c 	pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR);
chan               35 arch/sh/drivers/pci/ops-sh4.c 	data = pci_read_reg(chan, SH4_PCIPDR);
chan               63 arch/sh/drivers/pci/ops-sh4.c 	struct pci_channel *chan = bus->sysdata;
chan               69 arch/sh/drivers/pci/ops-sh4.c 	pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR);
chan               70 arch/sh/drivers/pci/ops-sh4.c 	data = pci_read_reg(chan, SH4_PCIPDR);
chan               91 arch/sh/drivers/pci/ops-sh4.c 	pci_write_reg(chan, data, SH4_PCIPDR);
chan              101 arch/sh/drivers/pci/ops-sh4.c int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan)
chan               22 arch/sh/drivers/pci/ops-sh7786.c 	struct pci_channel *chan = bus->sysdata;
chan               51 arch/sh/drivers/pci/ops-sh7786.c 				*data = pci_read_reg(chan, PCI_REG(reg));
chan               53 arch/sh/drivers/pci/ops-sh7786.c 				pci_write_reg(chan, *data, PCI_REG(reg));
chan               61 arch/sh/drivers/pci/ops-sh7786.c 	pci_write_reg(chan, pci_read_reg(chan, SH4A_PCIEERRFR), SH4A_PCIEERRFR);
chan               64 arch/sh/drivers/pci/ops-sh7786.c 	pci_write_reg(chan, (bus->number << 24) | (dev << 19) |
chan               68 arch/sh/drivers/pci/ops-sh7786.c 	pci_write_reg(chan, (1 << 31) | (type << 8), SH4A_PCIEPCTLR);
chan               71 arch/sh/drivers/pci/ops-sh7786.c 	if (pci_read_reg(chan, SH4A_PCIEERRFR) & 0x10)
chan               75 arch/sh/drivers/pci/ops-sh7786.c 	if (pci_read_reg(chan, SH4A_PCIEPCICONF1) & ((1 << 29) | (1 << 28)))
chan               79 arch/sh/drivers/pci/ops-sh7786.c 		*data = pci_read_reg(chan, SH4A_PCIEPDR);
chan               81 arch/sh/drivers/pci/ops-sh7786.c 		pci_write_reg(chan, *data, SH4A_PCIEPDR);
chan               84 arch/sh/drivers/pci/ops-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIEPCTLR);
chan              158 arch/sh/drivers/pci/pci-sh4.h int pci_fixup_pcic(struct pci_channel *chan);
chan              170 arch/sh/drivers/pci/pci-sh4.h static inline void pci_write_reg(struct pci_channel *chan,
chan              173 arch/sh/drivers/pci/pci-sh4.h 	__raw_writel(val, chan->reg_base + reg);
chan              176 arch/sh/drivers/pci/pci-sh4.h static inline unsigned long pci_read_reg(struct pci_channel *chan,
chan              179 arch/sh/drivers/pci/pci-sh4.h 	return __raw_readl(chan->reg_base + reg);
chan               19 arch/sh/drivers/pci/pci-sh7751.c static int __init __area_sdram_check(struct pci_channel *chan,
chan               31 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIBCR1);
chan               40 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIBCR2);
chan               77 arch/sh/drivers/pci/pci-sh7751.c 	struct pci_channel *chan = &sh7751_pci_controller;
chan               83 arch/sh/drivers/pci/pci-sh7751.c 	chan->reg_base = 0xfe200000;
chan               86 arch/sh/drivers/pci/pci-sh7751.c 	id = pci_read_reg(chan, SH7751_PCICONF0);
chan               99 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, 0, SH4_PCICLKR);
chan              102 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIPINT);
chan              110 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH7751_PCICONF1);
chan              114 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH7751_PCICONF2);
chan              120 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCILSR0);
chan              123 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCILAR0);
chan              124 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH7751_PCICONF5);
chan              129 arch/sh/drivers/pci/pci-sh7751.c 	word = chan->resources[1].start & SH4_PCIMBR_MASK;
chan              131 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word , SH4_PCIMBR);
chan              135 arch/sh/drivers/pci/pci-sh7751.c 	word = chan->resources[0].start & SH4_PCIIOBR_MASK;
chan              137 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIIOBR);
chan              143 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS0_BASE_ADDR: word = __area_sdram_check(chan, 0); break;
chan              144 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS1_BASE_ADDR: word = __area_sdram_check(chan, 1); break;
chan              145 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS2_BASE_ADDR: word = __area_sdram_check(chan, 2); break;
chan              146 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS3_BASE_ADDR: word = __area_sdram_check(chan, 3); break;
chan              147 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS4_BASE_ADDR: word = __area_sdram_check(chan, 4); break;
chan              148 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS5_BASE_ADDR: word = __area_sdram_check(chan, 5); break;
chan              149 arch/sh/drivers/pci/pci-sh7751.c 	case SH7751_CS6_BASE_ADDR: word = __area_sdram_check(chan, 6); break;
chan              157 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIWCR1);
chan              159 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIWCR2);
chan              161 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIWCR3);
chan              163 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCIMCR);
chan              170 arch/sh/drivers/pci/pci-sh7751.c 	pci_fixup_pcic(chan);
chan              175 arch/sh/drivers/pci/pci-sh7751.c 	pci_write_reg(chan, word, SH4_PCICR);
chan              177 arch/sh/drivers/pci/pci-sh7751.c 	return register_pci_controller(chan);
chan              246 arch/sh/drivers/pci/pci-sh7780.c 	struct pci_channel *chan = &sh7780_pci_controller;
chan              255 arch/sh/drivers/pci/pci-sh7780.c 	chan->reg_base = 0xfe040000;
chan              262 arch/sh/drivers/pci/pci-sh7780.c 		     chan->reg_base + SH4_PCICR);
chan              271 arch/sh/drivers/pci/pci-sh7780.c 	id = __raw_readw(chan->reg_base + PCI_VENDOR_ID);
chan              277 arch/sh/drivers/pci/pci-sh7780.c 	id = __raw_readw(chan->reg_base + PCI_DEVICE_ID);
chan              291 arch/sh/drivers/pci/pci-sh7780.c 	       __raw_readb(chan->reg_base + PCI_REVISION_ID));
chan              298 arch/sh/drivers/pci/pci-sh7780.c 		     chan->reg_base + SH4_PCICR);
chan              308 arch/sh/drivers/pci/pci-sh7780.c 		__raw_writel(memphys + SZ_512M, chan->reg_base + SH4_PCILAR1);
chan              310 arch/sh/drivers/pci/pci-sh7780.c 			     chan->reg_base + SH4_PCILSR1);
chan              316 arch/sh/drivers/pci/pci-sh7780.c 		__raw_writel(0, chan->reg_base + SH4_PCILAR1);
chan              317 arch/sh/drivers/pci/pci-sh7780.c 		__raw_writel(0, chan->reg_base + SH4_PCILSR1);
chan              324 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(memphys, chan->reg_base + SH4_PCILAR0);
chan              326 arch/sh/drivers/pci/pci-sh7780.c 		     chan->reg_base + SH4_PCILSR0);
chan              331 arch/sh/drivers/pci/pci-sh7780.c 	ret = sh7780_pci_setup_irqs(chan);
chan              338 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCICSCR0);
chan              339 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCICSAR0);
chan              340 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCICSCR1);
chan              341 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCICSAR1);
chan              346 arch/sh/drivers/pci/pci-sh7780.c 	for (i = 1; i < chan->nr_resources; i++) {
chan              347 arch/sh/drivers/pci/pci-sh7780.c 		struct resource *res = chan->resources + i;
chan              358 arch/sh/drivers/pci/pci-sh7780.c 			chan->nr_resources--;
chan              369 arch/sh/drivers/pci/pci-sh7780.c 			     chan->reg_base + SH7780_PCIMBMR(i - 1));
chan              370 arch/sh/drivers/pci/pci-sh7780.c 		__raw_writel(res->start, chan->reg_base + SH7780_PCIMBR(i - 1));
chan              376 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + PCI_BASE_ADDRESS_0);
chan              377 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCIIOBR);
chan              378 arch/sh/drivers/pci/pci-sh7780.c 	__raw_writel(0, chan->reg_base + SH7780_PCIIOBMR);
chan              382 arch/sh/drivers/pci/pci-sh7780.c 		     PCI_COMMAND_MEMORY, chan->reg_base + PCI_COMMAND);
chan              390 arch/sh/drivers/pci/pci-sh7780.c 		     chan->reg_base + SH4_PCICR);
chan              392 arch/sh/drivers/pci/pci-sh7780.c 	ret = register_pci_controller(chan);
chan              396 arch/sh/drivers/pci/pci-sh7780.c 	sh7780_pci66_init(chan);
chan              399 arch/sh/drivers/pci/pci-sh7780.c 	       (__raw_readw(chan->reg_base + PCI_STATUS) & PCI_STATUS_66MHZ) ?
chan              405 arch/sh/drivers/pci/pci-sh7780.c 	sh7780_pci_teardown_irqs(chan);
chan              278 arch/sh/drivers/pci/pci.c 	struct pci_channel *chan = dev->sysdata;
chan              280 arch/sh/drivers/pci/pci.c 	if (unlikely(!chan->io_map_base)) {
chan              281 arch/sh/drivers/pci/pci.c 		chan->io_map_base = sh_io_port_base;
chan              288 arch/sh/drivers/pci/pci.c 	return (void __iomem *)(chan->io_map_base + port);
chan              152 arch/sh/drivers/pci/pcie-sh7786.c static int __init phy_wait_for_ack(struct pci_channel *chan)
chan              157 arch/sh/drivers/pci/pcie-sh7786.c 		if (pci_read_reg(chan, SH4A_PCIEPHYADRR) & (1 << BITS_ACK))
chan              166 arch/sh/drivers/pci/pcie-sh7786.c static int __init pci_wait_for_irq(struct pci_channel *chan, unsigned int mask)
chan              171 arch/sh/drivers/pci/pcie-sh7786.c 		if ((pci_read_reg(chan, SH4A_PCIEINTR) & mask) == mask)
chan              180 arch/sh/drivers/pci/pcie-sh7786.c static void __init phy_write_reg(struct pci_channel *chan, unsigned int addr,
chan              189 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEPHYDOUTR);
chan              190 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, phyaddr, SH4A_PCIEPHYADRR);
chan              192 arch/sh/drivers/pci/pcie-sh7786.c 	phy_wait_for_ack(chan);
chan              195 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIEPHYDOUTR);
chan              196 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIEPHYADRR);
chan              198 arch/sh/drivers/pci/pcie-sh7786.c 	phy_wait_for_ack(chan);
chan              203 arch/sh/drivers/pci/pcie-sh7786.c 	struct pci_channel *chan = port->hose;
chan              238 arch/sh/drivers/pci/pcie-sh7786.c 	clk->enable_reg = (void __iomem *)(chan->reg_base + SH4A_PCIEPHYCTLR);
chan              258 arch/sh/drivers/pci/pcie-sh7786.c 	struct pci_channel *chan = port->hose;
chan              264 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x60, 0xf, 0x004b008b);
chan              265 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x61, 0xf, 0x00007b41);
chan              266 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x64, 0xf, 0x00ff4f00);
chan              267 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x65, 0xf, 0x09070907);
chan              268 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x66, 0xf, 0x00000010);
chan              269 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x74, 0xf, 0x0007001c);
chan              270 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x79, 0xf, 0x01fc000d);
chan              271 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0xb0, 0xf, 0x00000610);
chan              274 arch/sh/drivers/pci/pcie-sh7786.c 	phy_write_reg(chan, 0x67, 0x1, 0x00000400);
chan              280 arch/sh/drivers/pci/pcie-sh7786.c 		if (pci_read_reg(chan, SH4A_PCIEPHYSR))
chan              291 arch/sh/drivers/pci/pcie-sh7786.c 	struct pci_channel *chan = port->hose;
chan              293 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 1, SH4A_PCIESRSTR);
chan              294 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIETCTLR);
chan              295 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIESRSTR);
chan              296 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0, SH4A_PCIETXVC0SR);
chan              301 arch/sh/drivers/pci/pcie-sh7786.c 	struct pci_channel *chan = port->hose;
chan              315 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, PCI_CLASS_BRIDGE_PCI << 16, SH4A_PCIEIDSETR1);
chan              318 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEEXPCAP0);
chan              327 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEEXPCAP0);
chan              330 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, PCI_EXP_LNKCAP_DLLLARC, SH4A_PCIEEXPCAP3);
chan              333 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEEXPCAP4);
chan              336 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEEXPCAP4);
chan              339 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEEXPCAP5);
chan              342 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEEXPCAP5);
chan              345 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIETLCTLR);
chan              348 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIETLCTLR);
chan              354 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEMACCTLR);
chan              357 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEMACCTLR);
chan              378 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, memstart + SZ_512M, SH4A_PCIELAR1);
chan              379 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, ((memsize - SZ_512M) - SZ_256) | 1,
chan              386 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, 0, SH4A_PCIELAR1);
chan              387 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, 0, SH4A_PCIELAMR1);
chan              394 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, memstart, SH4A_PCIELAR0);
chan              395 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, (memsize - SZ_256) | 1, SH4A_PCIELAMR0);
chan              398 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIETCTLR);
chan              400 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIETCTLR);
chan              406 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEDLINTENR);
chan              408 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEDLINTENR);
chan              411 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEMACCTLR);
chan              413 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEMACCTLR);
chan              420 arch/sh/drivers/pci/pcie-sh7786.c 	ret = pci_wait_for_irq(chan, MASK_INT_TX_CTRL);
chan              422 arch/sh/drivers/pci/pcie-sh7786.c 	data = pci_read_reg(chan, SH4A_PCIEPCICONF1);
chan              426 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, data, SH4A_PCIEPCICONF1);
chan              428 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0x80888000, SH4A_PCIETXVC0DCTLR);
chan              429 arch/sh/drivers/pci/pcie-sh7786.c 	pci_write_reg(chan, 0x00222000, SH4A_PCIERXVC0DCTLR);
chan              434 arch/sh/drivers/pci/pcie-sh7786.c 		data = pci_read_reg(chan, SH4A_PCIEMACSR);
chan              441 arch/sh/drivers/pci/pcie-sh7786.c 	for (i = win = 0; i < chan->nr_resources; i++) {
chan              442 arch/sh/drivers/pci/pcie-sh7786.c 		struct resource *res = chan->resources + i;
chan              456 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, 0x00000000, SH4A_PCIEPTCTLR(win));
chan              464 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, mask << 18, SH4A_PCIEPAMR(win));
chan              466 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, upper_32_bits(res->start),
chan              468 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, lower_32_bits(res->start),
chan              475 arch/sh/drivers/pci/pcie-sh7786.c 		pci_write_reg(chan, mask, SH4A_PCIEPTCTLR(win));
chan              566 arch/sh/drivers/pci/pcie-sh7786.h pci_write_reg(struct pci_channel *chan, unsigned long val, unsigned long reg)
chan              568 arch/sh/drivers/pci/pcie-sh7786.h 	__raw_writel(val, chan->reg_base + reg);
chan              572 arch/sh/drivers/pci/pcie-sh7786.h pci_read_reg(struct pci_channel *chan, unsigned long reg)
chan              574 arch/sh/drivers/pci/pcie-sh7786.h 	return __raw_readl(chan->reg_base + reg);
chan               54 arch/sh/include/asm/dma.h 	int (*request)(struct dma_channel *chan);
chan               55 arch/sh/include/asm/dma.h 	void (*free)(struct dma_channel *chan);
chan               57 arch/sh/include/asm/dma.h 	int (*get_residue)(struct dma_channel *chan);
chan               58 arch/sh/include/asm/dma.h 	int (*xfer)(struct dma_channel *chan);
chan               59 arch/sh/include/asm/dma.h 	int (*configure)(struct dma_channel *chan, unsigned long flags);
chan               60 arch/sh/include/asm/dma.h 	int (*extend)(struct dma_channel *chan, unsigned long op, void *param);
chan               66 arch/sh/include/asm/dma.h 	unsigned int chan;		/* DMAC channel number */
chan              109 arch/sh/include/asm/dma.h extern int dma_xfer(unsigned int chan, unsigned long from,
chan              112 arch/sh/include/asm/dma.h #define dma_write(chan, from, to, size)	\
chan              113 arch/sh/include/asm/dma.h 	dma_xfer(chan, from, to, size, DMA_MODE_WRITE)
chan              114 arch/sh/include/asm/dma.h #define dma_write_page(chan, from, to)	\
chan              115 arch/sh/include/asm/dma.h 	dma_write(chan, from, to, PAGE_SIZE)
chan              117 arch/sh/include/asm/dma.h #define dma_read(chan, from, to, size)	\
chan              118 arch/sh/include/asm/dma.h 	dma_xfer(chan, from, to, size, DMA_MODE_READ)
chan              119 arch/sh/include/asm/dma.h #define dma_read_page(chan, from, to)	\
chan              120 arch/sh/include/asm/dma.h 	dma_read(chan, from, to, PAGE_SIZE)
chan              124 arch/sh/include/asm/dma.h extern int get_dma_residue(unsigned int chan);
chan              125 arch/sh/include/asm/dma.h extern struct dma_info *get_dma_info(unsigned int chan);
chan              126 arch/sh/include/asm/dma.h extern struct dma_channel *get_dma_channel(unsigned int chan);
chan              127 arch/sh/include/asm/dma.h extern void dma_wait_for_completion(unsigned int chan);
chan              128 arch/sh/include/asm/dma.h extern void dma_configure_channel(unsigned int chan, unsigned long flags);
chan              134 arch/sh/include/asm/dma.h extern int dma_extend(unsigned int chan, unsigned long op, void *param);
chan               83 arch/sparc/include/asm/ldc.h #define	ldc_print(chan)	__ldc_print(chan, __func__)
chan               33 arch/um/drivers/chan.h extern int write_chan(struct chan *chan, const char *buf, int len,
chan               35 arch/um/drivers/chan.h extern int console_write_chan(struct chan *chan, const char *buf, 
chan               38 arch/um/drivers/chan.h extern void deactivate_chan(struct chan *chan, int irq);
chan               39 arch/um/drivers/chan.h extern void reactivate_chan(struct chan *chan, int irq);
chan               40 arch/um/drivers/chan.h extern void chan_enable_winch(struct chan *chan, struct tty_port *port);
chan               84 arch/um/drivers/chan_kern.c static int open_one_chan(struct chan *chan)
chan               88 arch/um/drivers/chan_kern.c 	if (chan->opened)
chan               91 arch/um/drivers/chan_kern.c 	if (chan->ops->open == NULL)
chan               93 arch/um/drivers/chan_kern.c 	else fd = (*chan->ops->open)(chan->input, chan->output, chan->primary,
chan               94 arch/um/drivers/chan_kern.c 				     chan->data, &chan->dev);
chan              100 arch/um/drivers/chan_kern.c 		(*chan->ops->close)(fd, chan->data);
chan              104 arch/um/drivers/chan_kern.c 	chan->fd = fd;
chan              106 arch/um/drivers/chan_kern.c 	chan->opened = 1;
chan              113 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              117 arch/um/drivers/chan_kern.c 		chan = list_entry(ele, struct chan, list);
chan              118 arch/um/drivers/chan_kern.c 		ret = open_one_chan(chan);
chan              119 arch/um/drivers/chan_kern.c 		if (chan->primary)
chan              125 arch/um/drivers/chan_kern.c void chan_enable_winch(struct chan *chan, struct tty_port *port)
chan              127 arch/um/drivers/chan_kern.c 	if (chan && chan->primary && chan->ops->winch)
chan              128 arch/um/drivers/chan_kern.c 		register_winch(chan->fd, port);
chan              142 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              148 arch/um/drivers/chan_kern.c 		chan = list_entry(ele, struct chan, list);
chan              149 arch/um/drivers/chan_kern.c 		err = open_one_chan(chan);
chan              151 arch/um/drivers/chan_kern.c 			if (chan->primary)
chan              157 arch/um/drivers/chan_kern.c 		if (chan->enabled)
chan              159 arch/um/drivers/chan_kern.c 		err = line_setup_irq(chan->fd, chan->input, chan->output, line,
chan              160 arch/um/drivers/chan_kern.c 				     chan);
chan              164 arch/um/drivers/chan_kern.c 		chan->enabled = 1;
chan              185 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              195 arch/um/drivers/chan_kern.c 		chan = list_entry(ele, struct chan, free_list);
chan              197 arch/um/drivers/chan_kern.c 		if (chan->input && chan->enabled)
chan              198 arch/um/drivers/chan_kern.c 			um_free_irq(chan->line->driver->read_irq, chan);
chan              199 arch/um/drivers/chan_kern.c 		if (chan->output && chan->enabled)
chan              200 arch/um/drivers/chan_kern.c 			um_free_irq(chan->line->driver->write_irq, chan);
chan              201 arch/um/drivers/chan_kern.c 		chan->enabled = 0;
chan              205 arch/um/drivers/chan_kern.c static void close_one_chan(struct chan *chan, int delay_free_irq)
chan              209 arch/um/drivers/chan_kern.c 	if (!chan->opened)
chan              214 arch/um/drivers/chan_kern.c 		list_add(&chan->free_list, &irqs_to_free);
chan              217 arch/um/drivers/chan_kern.c 		if (chan->input && chan->enabled)
chan              218 arch/um/drivers/chan_kern.c 			um_free_irq(chan->line->driver->read_irq, chan);
chan              219 arch/um/drivers/chan_kern.c 		if (chan->output && chan->enabled)
chan              220 arch/um/drivers/chan_kern.c 			um_free_irq(chan->line->driver->write_irq, chan);
chan              221 arch/um/drivers/chan_kern.c 		chan->enabled = 0;
chan              223 arch/um/drivers/chan_kern.c 	if (chan->ops->close != NULL)
chan              224 arch/um/drivers/chan_kern.c 		(*chan->ops->close)(chan->fd, chan->data);
chan              226 arch/um/drivers/chan_kern.c 	chan->opened = 0;
chan              227 arch/um/drivers/chan_kern.c 	chan->fd = -1;
chan              232 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              239 arch/um/drivers/chan_kern.c 	list_for_each_entry_reverse(chan, &line->chan_list, list) {
chan              240 arch/um/drivers/chan_kern.c 		close_one_chan(chan, 0);
chan              244 arch/um/drivers/chan_kern.c void deactivate_chan(struct chan *chan, int irq)
chan              246 arch/um/drivers/chan_kern.c 	if (chan && chan->enabled)
chan              247 arch/um/drivers/chan_kern.c 		deactivate_fd(chan->fd, irq);
chan              250 arch/um/drivers/chan_kern.c int write_chan(struct chan *chan, const char *buf, int len,
chan              255 arch/um/drivers/chan_kern.c 	if (len == 0 || !chan || !chan->ops->write)
chan              258 arch/um/drivers/chan_kern.c 	n = chan->ops->write(chan->fd, buf, len, chan->data);
chan              259 arch/um/drivers/chan_kern.c 	if (chan->primary) {
chan              265 arch/um/drivers/chan_kern.c int console_write_chan(struct chan *chan, const char *buf, int len)
chan              269 arch/um/drivers/chan_kern.c 	if (!chan || !chan->ops->console_write)
chan              272 arch/um/drivers/chan_kern.c 	n = chan->ops->console_write(chan->fd, buf, len);
chan              273 arch/um/drivers/chan_kern.c 	if (chan->primary)
chan              294 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              296 arch/um/drivers/chan_kern.c 	chan = line->chan_in;
chan              297 arch/um/drivers/chan_kern.c 	if (chan && chan->primary) {
chan              298 arch/um/drivers/chan_kern.c 		if (chan->ops->window_size == NULL)
chan              300 arch/um/drivers/chan_kern.c 		return chan->ops->window_size(chan->fd, chan->data,
chan              303 arch/um/drivers/chan_kern.c 	chan = line->chan_out;
chan              304 arch/um/drivers/chan_kern.c 	if (chan && chan->primary) {
chan              305 arch/um/drivers/chan_kern.c 		if (chan->ops->window_size == NULL)
chan              307 arch/um/drivers/chan_kern.c 		return chan->ops->window_size(chan->fd, chan->data,
chan              313 arch/um/drivers/chan_kern.c static void free_one_chan(struct chan *chan)
chan              315 arch/um/drivers/chan_kern.c 	list_del(&chan->list);
chan              317 arch/um/drivers/chan_kern.c 	close_one_chan(chan, 0);
chan              319 arch/um/drivers/chan_kern.c 	if (chan->ops->free != NULL)
chan              320 arch/um/drivers/chan_kern.c 		(*chan->ops->free)(chan->data);
chan              322 arch/um/drivers/chan_kern.c 	if (chan->primary && chan->output)
chan              323 arch/um/drivers/chan_kern.c 		ignore_sigio_fd(chan->fd);
chan              324 arch/um/drivers/chan_kern.c 	kfree(chan);
chan              330 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              333 arch/um/drivers/chan_kern.c 		chan = list_entry(ele, struct chan, list);
chan              334 arch/um/drivers/chan_kern.c 		free_one_chan(chan);
chan              338 arch/um/drivers/chan_kern.c static int one_chan_config_string(struct chan *chan, char *str, int size,
chan              343 arch/um/drivers/chan_kern.c 	if (chan == NULL) {
chan              348 arch/um/drivers/chan_kern.c 	CONFIG_CHUNK(str, size, n, chan->ops->type, 0);
chan              350 arch/um/drivers/chan_kern.c 	if (chan->dev == NULL) {
chan              356 arch/um/drivers/chan_kern.c 	CONFIG_CHUNK(str, size, n, chan->dev, 0);
chan              361 arch/um/drivers/chan_kern.c static int chan_pair_config_string(struct chan *in, struct chan *out,
chan              387 arch/um/drivers/chan_kern.c 	struct chan *in = line->chan_in, *out = line->chan_out;
chan              438 arch/um/drivers/chan_kern.c static struct chan *parse_chan(struct line *line, char *str, int device,
chan              443 arch/um/drivers/chan_kern.c 	struct chan *chan;
chan              468 arch/um/drivers/chan_kern.c 	chan = kmalloc(sizeof(*chan), GFP_ATOMIC);
chan              469 arch/um/drivers/chan_kern.c 	if (chan == NULL) {
chan              473 arch/um/drivers/chan_kern.c 	*chan = ((struct chan) { .list	 	= LIST_HEAD_INIT(chan->list),
chan              475 arch/um/drivers/chan_kern.c 				 	LIST_HEAD_INIT(chan->free_list),
chan              485 arch/um/drivers/chan_kern.c 	return chan;
chan              492 arch/um/drivers/chan_kern.c 	struct chan *new;
chan              541 arch/um/drivers/chan_kern.c 	struct chan *chan = line->chan_in;
chan              545 arch/um/drivers/chan_kern.c 	if (!chan || !chan->ops->read)
chan              553 arch/um/drivers/chan_kern.c 		err = chan->ops->read(chan->fd, &c, chan->data);
chan              559 arch/um/drivers/chan_kern.c 		if (chan->primary) {
chan              561 arch/um/drivers/chan_kern.c 			if (line->chan_out != chan)
chan              564 arch/um/drivers/chan_kern.c 		close_one_chan(chan, 1);
chan              565 arch/um/drivers/chan_kern.c 		if (chan->primary)
chan               21 arch/um/drivers/line.c 	struct chan *chan = data;
chan               22 arch/um/drivers/line.c 	struct line *line = chan->line;
chan              242 arch/um/drivers/line.c 	struct chan *chan = data;
chan              243 arch/um/drivers/line.c 	struct line *line = chan->line;
chan               40 arch/um/drivers/line.h 	struct chan *chan_in, *chan_out;
chan               36 crypto/async_tx/async_memcpy.c 	struct dma_chan *chan = async_tx_find_channel(submit, DMA_MEMCPY,
chan               38 crypto/async_tx/async_memcpy.c 	struct dma_device *device = chan ? chan->device : NULL;
chan               61 crypto/async_tx/async_memcpy.c 		tx = device->device_prep_dma_memcpy(chan, unmap->addr[1],
chan               70 crypto/async_tx/async_memcpy.c 		async_tx_submit(chan, tx, submit);
chan               35 crypto/async_tx/async_pq.c do_async_gen_syndrome(struct dma_chan *chan,
chan               42 crypto/async_tx/async_pq.c 	struct dma_device *dma = chan->device;
chan               78 crypto/async_tx/async_pq.c 			tx = dma->device_prep_dma_pq(chan, dma_dest,
chan               86 crypto/async_tx/async_pq.c 			dma_async_issue_pending(chan);
chan               90 crypto/async_tx/async_pq.c 		async_tx_submit(chan, tx, submit);
chan              167 crypto/async_tx/async_pq.c 	struct dma_chan *chan = async_tx_find_channel(submit, DMA_PQ,
chan              170 crypto/async_tx/async_pq.c 	struct dma_device *device = chan ? chan->device : NULL;
chan              228 crypto/async_tx/async_pq.c 		tx = do_async_gen_syndrome(chan, coefs, j, unmap, dma_flags, submit);
chan              285 crypto/async_tx/async_pq.c 	struct dma_chan *chan = pq_val_chan(submit, blocks, disks, len);
chan              286 crypto/async_tx/async_pq.c 	struct dma_device *device = chan ? chan->device : NULL;
chan              342 crypto/async_tx/async_pq.c 			tx = device->device_prep_dma_pq_val(chan, pq,
chan              351 crypto/async_tx/async_pq.c 			dma_async_issue_pending(chan);
chan              355 crypto/async_tx/async_pq.c 		async_tx_submit(chan, tx, submit);
chan               21 crypto/async_tx/async_raid6_recov.c 	struct dma_chan *chan = async_tx_find_channel(submit, DMA_PQ,
chan               23 crypto/async_tx/async_raid6_recov.c 	struct dma_device *dma = chan ? chan->device : NULL;
chan               50 crypto/async_tx/async_raid6_recov.c 		tx = dma->device_prep_dma_pq(chan, pq, unmap->addr, 2, coef,
chan               54 crypto/async_tx/async_raid6_recov.c 			async_tx_submit(chan, tx, submit);
chan               86 crypto/async_tx/async_raid6_recov.c 	struct dma_chan *chan = async_tx_find_channel(submit, DMA_PQ,
chan               88 crypto/async_tx/async_raid6_recov.c 	struct dma_device *dma = chan ? chan->device : NULL;
chan              115 crypto/async_tx/async_raid6_recov.c 		tx = dma->device_prep_dma_pq(chan, dma_dest, unmap->addr,
chan              121 crypto/async_tx/async_raid6_recov.c 			async_tx_submit(chan, tx, submit);
chan               50 crypto/async_tx/async_tx.c 	    dma_has_cap(tx_type, depend_tx->chan->device->cap_mask))
chan               51 crypto/async_tx/async_tx.c 		return depend_tx->chan;
chan               68 crypto/async_tx/async_tx.c 	struct dma_chan *chan = depend_tx->chan;
chan               69 crypto/async_tx/async_tx.c 	struct dma_device *device = chan->device;
chan               74 crypto/async_tx/async_tx.c 	if (txd_parent(depend_tx) && depend_tx->chan == tx->chan) {
chan               82 crypto/async_tx/async_tx.c 		device->device_issue_pending(chan);
chan               90 crypto/async_tx/async_tx.c 		intr_tx = device->device_prep_dma_interrupt(chan, 0);
chan              116 crypto/async_tx/async_tx.c 		device->device_issue_pending(chan);
chan              143 crypto/async_tx/async_tx.c async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
chan              172 crypto/async_tx/async_tx.c 			if (depend_tx->chan == chan) {
chan              181 crypto/async_tx/async_tx.c 			if (depend_tx->chan == chan)
chan              223 crypto/async_tx/async_tx.c 	struct dma_chan *chan;
chan              229 crypto/async_tx/async_tx.c 		chan = depend_tx->chan;
chan              230 crypto/async_tx/async_tx.c 		device = chan->device;
chan              238 crypto/async_tx/async_tx.c 		tx = device ? device->device_prep_dma_interrupt(chan, 0) : NULL;
chan              245 crypto/async_tx/async_tx.c 		async_tx_submit(chan, tx, submit);
chan               23 crypto/async_tx/async_xor.c do_async_xor(struct dma_chan *chan, struct dmaengine_unmap_data *unmap,
chan               26 crypto/async_tx/async_xor.c 	struct dma_device *dma = chan->device;
chan               65 crypto/async_tx/async_xor.c 		tx = dma->device_prep_dma_xor(chan, dma_dest, src_list,
chan               74 crypto/async_tx/async_xor.c 			dma_async_issue_pending(chan);
chan               75 crypto/async_tx/async_xor.c 			tx = dma->device_prep_dma_xor(chan, dma_dest,
chan               83 crypto/async_tx/async_xor.c 		async_tx_submit(chan, tx, submit);
chan              163 crypto/async_tx/async_xor.c 	struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR,
chan              166 crypto/async_tx/async_xor.c 	struct dma_device *device = chan ? chan->device : NULL;
chan              195 crypto/async_tx/async_xor.c 		tx = do_async_xor(chan, unmap, submit);
chan              202 crypto/async_tx/async_xor.c 		WARN_ONCE(chan, "%s: no space for dma address conversion\n",
chan              260 crypto/async_tx/async_xor.c 	struct dma_chan *chan = xor_val_chan(submit, dest, src_list, src_cnt, len);
chan              261 crypto/async_tx/async_xor.c 	struct dma_device *device = chan ? chan->device : NULL;
chan              289 crypto/async_tx/async_xor.c 		tx = device->device_prep_dma_xor_val(chan, unmap->addr, src_cnt,
chan              296 crypto/async_tx/async_xor.c 				dma_async_issue_pending(chan);
chan              297 crypto/async_tx/async_xor.c 				tx = device->device_prep_dma_xor_val(chan,
chan              303 crypto/async_tx/async_xor.c 		async_tx_submit(chan, tx, submit);
chan              398 drivers/ata/pata_arasan_cf.c 	struct dma_chan *chan = acdev->dma_chan;
chan              403 drivers/ata/pata_arasan_cf.c 	tx = chan->device->device_prep_dma_memcpy(chan, dest, src, len, flags);
chan              419 drivers/ata/pata_arasan_cf.c 	chan->device->device_issue_pending(chan);
chan              423 drivers/ata/pata_arasan_cf.c 		dmaengine_terminate_all(chan);
chan              639 drivers/ata/pata_ep93xx.c static bool ep93xx_pata_dma_filter(struct dma_chan *chan, void *filter_param)
chan              641 drivers/ata/pata_ep93xx.c 	if (ep93xx_dma_chan_is_m2p(chan))
chan              644 drivers/ata/pata_ep93xx.c 	chan->private = filter_param;
chan              179 drivers/ata/pdc_adma.c 	void __iomem *chan = ADMA_PORT_REGS(ap);
chan              182 drivers/ata/pdc_adma.c 	writew(aPIOMD4 | aNIEN | aRSTADM, chan + ADMA_CONTROL);
chan              184 drivers/ata/pdc_adma.c 	writew(aPIOMD4, chan + ADMA_CONTROL);
chan              191 drivers/ata/pdc_adma.c 	void __iomem *chan = ADMA_PORT_REGS(ap);
chan              201 drivers/ata/pdc_adma.c 	writew(0x100, chan + ADMA_FIFO_IN);
chan              204 drivers/ata/pdc_adma.c 	writel((u32)pp->pkt_dma, chan + ADMA_CPB_NEXT);
chan              207 drivers/ata/pdc_adma.c 	writew(0x100, chan + ADMA_FIFO_OUT);
chan              210 drivers/ata/pdc_adma.c 	writew(1, chan + ADMA_CPB_COUNT);
chan              213 drivers/ata/pdc_adma.c 	readb(chan + ADMA_STATUS);
chan              218 drivers/ata/pdc_adma.c 	void __iomem *chan = ADMA_PORT_REGS(ap);
chan              220 drivers/ata/pdc_adma.c 	writew(aPIOMD4, chan + ADMA_CONTROL);
chan              221 drivers/ata/pdc_adma.c 	readb(chan + ADMA_STATUS);	/* flush */
chan              226 drivers/ata/pdc_adma.c 	void __iomem *chan = ADMA_PORT_REGS(ap);
chan              233 drivers/ata/pdc_adma.c 	writew(aPIOMD4 | aNIEN | aRSTADM, chan + ADMA_CONTROL);
chan              235 drivers/ata/pdc_adma.c 	writew(aPIOMD4 | aNIEN, chan + ADMA_CONTROL);
chan              379 drivers/ata/pdc_adma.c 	void __iomem *chan = ADMA_PORT_REGS(ap);
chan              384 drivers/ata/pdc_adma.c 	writew(aPIOMD4 | aGO, chan + ADMA_CONTROL);
chan              417 drivers/ata/pdc_adma.c 		void __iomem *chan = ADMA_PORT_REGS(ap);
chan              418 drivers/ata/pdc_adma.c 		u8 status = readb(chan + ADMA_STATUS);
chan              156 drivers/ata/sata_dwc_460ex.c 	struct dma_chan			*chan;
chan              203 drivers/ata/sata_dwc_460ex.c static bool sata_dwc_dma_filter(struct dma_chan *chan, void *param)
chan              207 drivers/ata/sata_dwc_460ex.c 	if (dws->dma_dev != chan->device->dev)
chan              210 drivers/ata/sata_dwc_460ex.c 	chan->private = dws;
chan              226 drivers/ata/sata_dwc_460ex.c 	hsdevp->chan = dma_request_channel(mask, sata_dwc_dma_filter, hsdevp);
chan              227 drivers/ata/sata_dwc_460ex.c 	if (!hsdevp->chan) {
chan              385 drivers/ata/sata_dwc_460ex.c 	dmaengine_slave_config(hsdevp->chan, &sconf);
chan              388 drivers/ata/sata_dwc_460ex.c 	desc = dmaengine_prep_slave_sg(hsdevp->chan, qc->sg, qc->n_elem,
chan              861 drivers/ata/sata_dwc_460ex.c 	hsdevp->chan = dma_request_chan(dev, "sata-dma");
chan              862 drivers/ata/sata_dwc_460ex.c 	if (IS_ERR(hsdevp->chan)) {
chan              864 drivers/ata/sata_dwc_460ex.c 			PTR_ERR(hsdevp->chan));
chan              865 drivers/ata/sata_dwc_460ex.c 		return PTR_ERR(hsdevp->chan);
chan              952 drivers/ata/sata_dwc_460ex.c 	dmaengine_terminate_sync(hsdevp->chan);
chan              953 drivers/ata/sata_dwc_460ex.c 	dma_release_channel(hsdevp->chan);
chan             1052 drivers/ata/sata_dwc_460ex.c 		dma_async_issue_pending(hsdevp->chan);
chan              173 drivers/ata/sata_qstor.c 	u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
chan              177 drivers/ata/sata_qstor.c 	writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
chan              178 drivers/ata/sata_qstor.c 	readb(chan + QS_CCT_CTR0);        /* flush */
chan              183 drivers/ata/sata_qstor.c 	u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
chan              185 drivers/ata/sata_qstor.c 	writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1);
chan              186 drivers/ata/sata_qstor.c 	readb(chan + QS_CCT_CTR0);        /* flush */
chan              303 drivers/ata/sata_qstor.c 	u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000);
chan              307 drivers/ata/sata_qstor.c 	writeb(QS_CTR0_CLER, chan + QS_CCT_CTR0);
chan              309 drivers/ata/sata_qstor.c 	writel(QS_CCF_RUN_PKT, chan + QS_CCT_CFF);
chan              310 drivers/ata/sata_qstor.c 	readl(chan + QS_CCT_CFF);          /* flush */
chan              470 drivers/ata/sata_qstor.c 	void __iomem *chan = mmio_base + (ap->port_no * 0x4000);
chan              484 drivers/ata/sata_qstor.c 	writel((u32) addr,        chan + QS_CCF_CPBA);
chan              485 drivers/ata/sata_qstor.c 	writel((u32)(addr >> 32), chan + QS_CCF_CPBA + 4);
chan              507 drivers/ata/sata_qstor.c 		u8 __iomem *chan = mmio_base + (port_no * 0x4000);
chan              508 drivers/ata/sata_qstor.c 		writeb(QS_CTR1_RDEV|QS_CTR1_RCHN, chan + QS_CCT_CTR1);
chan              509 drivers/ata/sata_qstor.c 		writeb(QS_CTR0_REG, chan + QS_CCT_CTR0);
chan              510 drivers/ata/sata_qstor.c 		readb(chan + QS_CCT_CTR0);        /* flush */
chan              515 drivers/ata/sata_qstor.c 		u8 __iomem *chan = mmio_base + (port_no * 0x4000);
chan              517 drivers/ata/sata_qstor.c 		writew(32, chan + QS_CFC_HUFT);
chan              518 drivers/ata/sata_qstor.c 		writew(32, chan + QS_CFC_HDFT);
chan              519 drivers/ata/sata_qstor.c 		writew(10, chan + QS_CFC_DUFT);
chan              520 drivers/ata/sata_qstor.c 		writew( 8, chan + QS_CFC_DDFT);
chan              522 drivers/ata/sata_qstor.c 		writeb(QS_CPB_ORDER,    chan + QS_CCF_CSEP);
chan              584 drivers/ata/sata_qstor.c 		void __iomem *chan = host->iomap[QS_MMIO_BAR] + offset;
chan              586 drivers/ata/sata_qstor.c 		qs_ata_setup_port(&ap->ioaddr, chan);
chan              934 drivers/atm/eni.c static inline void put_dma(int chan,u32 *dma,int *j,dma_addr_t paddr,
chan              953 drivers/atm/eni.c 		    (chan << MID_DMA_CHAN_SHIFT);
chan              966 drivers/atm/eni.c 		    (chan << MID_DMA_CHAN_SHIFT);
chan              976 drivers/atm/eni.c 		    | (chan << MID_DMA_CHAN_SHIFT);
chan              987 drivers/atm/eni.c 		    | (chan << MID_DMA_CHAN_SHIFT);
chan              998 drivers/atm/eni.c 		    | (chan << MID_DMA_CHAN_SHIFT);
chan             1009 drivers/atm/eni.c 		    | (chan << MID_DMA_CHAN_SHIFT);
chan             1019 drivers/atm/eni.c 		    (chan << MID_DMA_CHAN_SHIFT);
chan             1027 drivers/atm/eni.c 		    (chan << MID_DMA_CHAN_SHIFT);
chan              440 drivers/atm/horizon.c static inline void update_tx_channel_config (hrz_dev * dev, short chan, u8 mode, u16 value) {
chan              442 drivers/atm/horizon.c 	   chan * TX_CHANNEL_CONFIG_MULT | mode);
chan             1445 drivers/atm/horizon.c     int chan = dev->tx_idle;
chan             1449 drivers/atm/horizon.c       if (idle_channels & (1<<chan)) {
chan             1450 drivers/atm/horizon.c 	tx_channel = chan;
chan             1453 drivers/atm/horizon.c       ++chan;
chan             1454 drivers/atm/horizon.c       if (chan == TX_CHANS)
chan             1455 drivers/atm/horizon.c 	chan = 0;
chan             1458 drivers/atm/horizon.c     dev->tx_idle = chan;
chan             1814 drivers/atm/horizon.c   u16 chan;
chan             1855 drivers/atm/horizon.c   for (chan = 0; chan < TX_CHANS; ++chan) {
chan             1856 drivers/atm/horizon.c     tx_ch_desc * tx_desc = &memmap->tx_descs[chan];
chan             1857 drivers/atm/horizon.c     cell_buf * buf = &memmap->inittxbufs[chan];
chan             1890 drivers/atm/horizon.c   for (chan = 0; chan < RX_CHANS; ++chan) {
chan             1891 drivers/atm/horizon.c     rx_ch_desc * rx_desc = &memmap->rx_descs[chan];
chan              375 drivers/atm/zatm.c 		int cells,size,chan;
chan              418 drivers/atm/zatm.c 		chan = (here[3] & uPD98401_AAL5_CHAN) >>
chan              420 drivers/atm/zatm.c 		if (chan < zatm_dev->chans && zatm_dev->rx_map[chan]) {
chan              422 drivers/atm/zatm.c 			vcc = zatm_dev->rx_map[chan];
chan              442 drivers/atm/zatm.c 				    "chan %d error %s\n",dev->number,chan,
chan              489 drivers/atm/zatm.c 	unsigned short chan;
chan              516 drivers/atm/zatm.c 	chan = (zin(CMR) & uPD98401_CHAN_ADDR) >> uPD98401_CHAN_ADDR_SHIFT;
chan              518 drivers/atm/zatm.c 	DPRINTK("chan is %d\n",chan);
chan              519 drivers/atm/zatm.c 	if (!chan) return -EAGAIN;
chan              525 drivers/atm/zatm.c 	    chan*VC_SIZE/4);
chan              527 drivers/atm/zatm.c 	    uPD98401_RXVC_AR : 0) | cells,chan*VC_SIZE/4+1);
chan              528 drivers/atm/zatm.c 	zpokel(zatm_dev,0,chan*VC_SIZE/4+2);
chan              529 drivers/atm/zatm.c 	zatm_vcc->rx_chan = chan;
chan              530 drivers/atm/zatm.c 	zatm_dev->rx_map[chan] = vcc;
chan              754 drivers/atm/zatm.c 		int chan;
chan              762 drivers/atm/zatm.c 		chan = (data & uPD98401_TXI_CONN) >> uPD98401_TXI_CONN_SHIFT;
chan              765 drivers/atm/zatm.c 		EVENT("chan = %d\n",chan,0);
chan              768 drivers/atm/zatm.c 		chan = (zatm_dev->mbx_start[mbx][pos >> 2] & uPD98401_TXI_CONN)
chan              771 drivers/atm/zatm.c 		if (chan < zatm_dev->chans && zatm_dev->tx_map[chan])
chan              772 drivers/atm/zatm.c 			dequeue_tx(zatm_dev->tx_map[chan]);
chan              775 drivers/atm/zatm.c 			    "for non-existing channel %d\n",dev->number,chan);
chan              876 drivers/atm/zatm.c 	int chan;
chan              880 drivers/atm/zatm.c 	chan = zatm_vcc->tx_chan;
chan              881 drivers/atm/zatm.c 	if (!chan) return;
chan              896 drivers/atm/zatm.c 	zout(uPD98401_DEACT_CHAN | (chan << uPD98401_CHAN_ADDR_SHIFT),CMR);
chan              899 drivers/atm/zatm.c 	zout(uPD98401_CLOSE_CHAN | (chan << uPD98401_CHAN_ADDR_SHIFT),CMR);
chan              903 drivers/atm/zatm.c 		    "%d\n",vcc->dev->number,chan);
chan              906 drivers/atm/zatm.c 	zatm_dev->tx_map[chan] = NULL;
chan              921 drivers/atm/zatm.c 	unsigned short chan;
chan              934 drivers/atm/zatm.c 	chan = (zin(CMR) & uPD98401_CHAN_ADDR) >> uPD98401_CHAN_ADDR_SHIFT;
chan              936 drivers/atm/zatm.c 	DPRINTK("chan is %d\n",chan);
chan              937 drivers/atm/zatm.c 	if (!chan) return -EAGAIN;
chan              955 drivers/atm/zatm.c 	zatm_vcc->tx_chan = chan;
chan              969 drivers/atm/zatm.c 	    chan*VC_SIZE/4+uPD98401_TXVC_QRP);
chan              180 drivers/block/ps3vram.c static void ps3vram_begin_ring(struct ps3vram_priv *priv, u32 chan, u32 tag,
chan              183 drivers/block/ps3vram.c 	ps3vram_out_ring(priv, (size << 18) | (chan << 13) | tag);
chan              167 drivers/bluetooth/hci_bcsp.c 	u8 hdr[4], chan;
chan              173 drivers/bluetooth/hci_bcsp.c 		chan = 6;	/* BCSP ACL channel */
chan              177 drivers/bluetooth/hci_bcsp.c 		chan = 5;	/* BCSP cmd/evt channel */
chan              181 drivers/bluetooth/hci_bcsp.c 		chan = 7;	/* BCSP SCO channel */
chan              185 drivers/bluetooth/hci_bcsp.c 		chan = 1;	/* BCSP LE channel */
chan              189 drivers/bluetooth/hci_bcsp.c 		chan = 0;	/* BCSP internal channel */
chan              197 drivers/bluetooth/hci_bcsp.c 	if (hciextn && chan == 5) {
chan              207 drivers/bluetooth/hci_bcsp.c 				chan = desc & 0x0f;
chan              239 drivers/bluetooth/hci_bcsp.c 	hdr[1] = ((len << 4) & 0xff) | chan;
chan             1617 drivers/char/ipmi/ipmi_msghandler.c 				      unsigned char chan)
chan             1623 drivers/char/ipmi/ipmi_msghandler.c 					&& (rcvr->chans & (1 << chan)))
chan             3137 drivers/char/ipmi/ipmi_msghandler.c send_guid_cmd(struct ipmi_smi *intf, int chan)
chan             3220 drivers/char/ipmi/ipmi_msghandler.c send_channel_info_cmd(struct ipmi_smi *intf, int chan)
chan             3234 drivers/char/ipmi/ipmi_msghandler.c 	data[0] = chan;
chan             3698 drivers/char/ipmi/ipmi_msghandler.c 	unsigned char            chan;
chan             3716 drivers/char/ipmi/ipmi_msghandler.c 	chan = msg->rsp[3] & 0xf;
chan             3719 drivers/char/ipmi/ipmi_msghandler.c 	rcvr = find_cmd_rcvr(intf, netfn, cmd, chan);
chan             3878 drivers/char/ipmi/ipmi_msghandler.c 	unsigned char            chan;
chan             3896 drivers/char/ipmi/ipmi_msghandler.c 	chan = msg->rsp[3] & 0xf;
chan             3899 drivers/char/ipmi/ipmi_msghandler.c 	rcvr = find_cmd_rcvr(intf, netfn, cmd, chan);
chan             3977 drivers/char/ipmi/ipmi_msghandler.c 	unsigned char         chan;
chan             4003 drivers/char/ipmi/ipmi_msghandler.c 	chan = msg->rsp[3] & 0xf;
chan             4006 drivers/char/ipmi/ipmi_msghandler.c 	rcvr = find_cmd_rcvr(intf, netfn, cmd, chan);
chan             4230 drivers/char/ipmi/ipmi_msghandler.c 	int chan;
chan             4322 drivers/char/ipmi/ipmi_msghandler.c 		chan = msg->data[2] & 0x0f;
chan             4323 drivers/char/ipmi/ipmi_msghandler.c 		if (chan >= IPMI_MAX_CHANNELS)
chan             4340 drivers/char/ipmi/ipmi_msghandler.c 		chan = msg->rsp[3] & 0xf;
chan             4341 drivers/char/ipmi/ipmi_msghandler.c 		if (chan >= IPMI_MAX_CHANNELS) {
chan             4360 drivers/char/ipmi/ipmi_msghandler.c 		switch (chans[chan].medium) {
chan             4397 drivers/char/ipmi/ipmi_msghandler.c 			if ((chans[chan].medium >= IPMI_CHANNEL_MEDIUM_OEM_MIN)
chan             4398 drivers/char/ipmi/ipmi_msghandler.c 			    && (chans[chan].medium
chan              241 drivers/char/ipmi/kcs_bmc_aspeed.c 	u32 chan, addr;
chan              244 drivers/char/ipmi/kcs_bmc_aspeed.c 	rc = of_property_read_u32(dev->of_node, "kcs_chan", &chan);
chan              245 drivers/char/ipmi/kcs_bmc_aspeed.c 	if ((rc != 0) || (chan == 0 || chan > KCS_CHANNEL_MAX)) {
chan              256 drivers/char/ipmi/kcs_bmc_aspeed.c 	kcs_bmc = kcs_bmc_alloc(dev, sizeof(*priv), chan);
chan              267 drivers/char/ipmi/kcs_bmc_aspeed.c 	kcs_bmc->ioreg = ast_kcs_bmc_ioregs[chan - 1];
chan              286 drivers/char/ipmi/kcs_bmc_aspeed.c 		chan, addr,
chan              140 drivers/char/ipmi/kcs_bmc_npcm7xx.c 	u32 chan;
chan              143 drivers/char/ipmi/kcs_bmc_npcm7xx.c 	rc = of_property_read_u32(dev->of_node, "kcs_chan", &chan);
chan              144 drivers/char/ipmi/kcs_bmc_npcm7xx.c 	if (rc != 0 || chan == 0 || chan > KCS_CHANNEL_MAX) {
chan              149 drivers/char/ipmi/kcs_bmc_npcm7xx.c 	kcs_bmc = kcs_bmc_alloc(dev, sizeof(*priv), chan);
chan              159 drivers/char/ipmi/kcs_bmc_npcm7xx.c 	priv->reg = &npcm7xx_kcs_reg_tbl[chan - 1];
chan              181 drivers/char/ipmi/kcs_bmc_npcm7xx.c 		chan,
chan              450 drivers/clk/st/clkgen-fsyn.c 	u32 chan;
chan              477 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, en[fs->chan], 1);
chan              478 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, en[fs->chan], 0);
chan              490 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, en[fs->chan], 0);
chan              492 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, mdiv[fs->chan], fs->md);
chan              493 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, pe[fs->chan], fs->pe);
chan              494 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, sdiv[fs->chan], fs->sdiv);
chan              500 drivers/clk/st/clkgen-fsyn.c 		CLKGEN_WRITE(fs, nsdiv[fs->chan], fs->nsdiv);
chan              518 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, nsb[fs->chan], !fs->data->standby_polarity);
chan              521 drivers/clk/st/clkgen-fsyn.c 		CLKGEN_WRITE(fs, nrst[fs->chan], 0);
chan              541 drivers/clk/st/clkgen-fsyn.c 	CLKGEN_WRITE(fs, nsb[fs->chan], fs->data->standby_polarity);
chan              550 drivers/clk/st/clkgen-fsyn.c 	u32 nsb = CLKGEN_READ(fs, nsb[fs->chan]);
chan              690 drivers/clk/st/clkgen-fsyn.c 	params->mdiv	= CLKGEN_READ(fs, mdiv[fs->chan]);
chan              691 drivers/clk/st/clkgen-fsyn.c 	params->pe	= CLKGEN_READ(fs, pe[fs->chan]);
chan              692 drivers/clk/st/clkgen-fsyn.c 	params->sdiv	= CLKGEN_READ(fs, sdiv[fs->chan]);
chan              695 drivers/clk/st/clkgen-fsyn.c 		params->nsdiv = CLKGEN_READ(fs, nsdiv[fs->chan]);
chan              822 drivers/clk/st/clkgen-fsyn.c 		struct clkgen_quadfs_data *quadfs, void __iomem *reg, u32 chan,
chan              847 drivers/clk/st/clkgen-fsyn.c 	fs->chan = chan;
chan               35 drivers/clocksource/samsung_pwm_timer.c #define REG_TCNTB(chan)			(0x0c + 12 * (chan))
chan               36 drivers/clocksource/samsung_pwm_timer.c #define REG_TCMPB(chan)			(0x10 + 12 * (chan))
chan               52 drivers/clocksource/samsung_pwm_timer.c #define TCON_START(chan)		(1 << (4 * (chan) + 0))
chan               53 drivers/clocksource/samsung_pwm_timer.c #define TCON_MANUALUPDATE(chan)		(1 << (4 * (chan) + 1))
chan               54 drivers/clocksource/samsung_pwm_timer.c #define TCON_INVERT(chan)		(1 << (4 * (chan) + 2))
chan               55 drivers/clocksource/samsung_pwm_timer.c #define _TCON_AUTORELOAD(chan)		(1 << (4 * (chan) + 3))
chan               56 drivers/clocksource/samsung_pwm_timer.c #define _TCON_AUTORELOAD4(chan)		(1 << (4 * (chan) + 2))
chan               57 drivers/clocksource/samsung_pwm_timer.c #define TCON_AUTORELOAD(chan)		\
chan               58 drivers/clocksource/samsung_pwm_timer.c 	((chan < 5) ? _TCON_AUTORELOAD(chan) : _TCON_AUTORELOAD4(chan))
chan               96 drivers/counter/104-quad-8.c 	struct iio_chan_spec const *chan, int *val, int *val2, long mask)
chan               99 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel;
chan              107 drivers/counter/104-quad-8.c 		if (chan->type == IIO_INDEX) {
chan              109 drivers/counter/104-quad-8.c 				& BIT(chan->channel));
chan              133 drivers/counter/104-quad-8.c 		*val = priv->ab_enable[chan->channel];
chan              137 drivers/counter/104-quad-8.c 		*val2 = priv->quadrature_scale[chan->channel];
chan              145 drivers/counter/104-quad-8.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              148 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel;
chan              154 drivers/counter/104-quad-8.c 		if (chan->type == IIO_INDEX)
chan              177 drivers/counter/104-quad-8.c 		val = priv->preset[chan->channel];
chan              196 drivers/counter/104-quad-8.c 		priv->ab_enable[chan->channel] = val;
chan              198 drivers/counter/104-quad-8.c 		ior_cfg = val | priv->preset_enable[chan->channel] << 1;
chan              210 drivers/counter/104-quad-8.c 		if (!priv->quadrature_mode[chan->channel] &&
chan              218 drivers/counter/104-quad-8.c 			priv->quadrature_scale[chan->channel] = 0;
chan              222 drivers/counter/104-quad-8.c 				priv->quadrature_scale[chan->channel] = 1;
chan              225 drivers/counter/104-quad-8.c 				priv->quadrature_scale[chan->channel] = 2;
chan              249 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, char *buf)
chan              253 drivers/counter/104-quad-8.c 	return snprintf(buf, PAGE_SIZE, "%u\n", priv->preset[chan->channel]);
chan              257 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, const char *buf, size_t len)
chan              260 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel;
chan              275 drivers/counter/104-quad-8.c 	priv->preset[chan->channel] = preset;
chan              290 drivers/counter/104-quad-8.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              295 drivers/counter/104-quad-8.c 		!priv->preset_enable[chan->channel]);
chan              299 drivers/counter/104-quad-8.c 	uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              303 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              317 drivers/counter/104-quad-8.c 	priv->preset_enable[chan->channel] = preset_enable;
chan              319 drivers/counter/104-quad-8.c 	ior_cfg = priv->ab_enable[chan->channel] |
chan              336 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              339 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              356 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              359 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              378 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, unsigned int cnt_mode)
chan              382 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              386 drivers/counter/104-quad-8.c 	priv->count_mode[chan->channel] = cnt_mode;
chan              389 drivers/counter/104-quad-8.c 	if (priv->quadrature_mode[chan->channel])
chan              390 drivers/counter/104-quad-8.c 		mode_cfg |= (priv->quadrature_scale[chan->channel] + 1) << 3;
chan              401 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              405 drivers/counter/104-quad-8.c 	return priv->count_mode[chan->channel];
chan              421 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, unsigned int synchronous_mode)
chan              424 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              429 drivers/counter/104-quad-8.c 	idr_cfg |= priv->index_polarity[chan->channel] << 1;
chan              432 drivers/counter/104-quad-8.c 	if (synchronous_mode && !priv->quadrature_mode[chan->channel]) {
chan              437 drivers/counter/104-quad-8.c 	priv->synchronous_mode[chan->channel] = synchronous_mode;
chan              448 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              452 drivers/counter/104-quad-8.c 	return priv->synchronous_mode[chan->channel];
chan              468 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, unsigned int quadrature_mode)
chan              471 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              476 drivers/counter/104-quad-8.c 	mode_cfg = priv->count_mode[chan->channel] << 1;
chan              479 drivers/counter/104-quad-8.c 		mode_cfg |= (priv->quadrature_scale[chan->channel] + 1) << 3;
chan              482 drivers/counter/104-quad-8.c 		priv->quadrature_scale[chan->channel] = 0;
chan              485 drivers/counter/104-quad-8.c 		if (priv->synchronous_mode[chan->channel])
chan              486 drivers/counter/104-quad-8.c 			quad8_set_synchronous_mode(indio_dev, chan, 0);
chan              489 drivers/counter/104-quad-8.c 	priv->quadrature_mode[chan->channel] = quadrature_mode;
chan              500 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              504 drivers/counter/104-quad-8.c 	return priv->quadrature_mode[chan->channel];
chan              520 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan, unsigned int index_polarity)
chan              523 drivers/counter/104-quad-8.c 	const int base_offset = priv->base + 2 * chan->channel + 1;
chan              528 drivers/counter/104-quad-8.c 	idr_cfg |= priv->synchronous_mode[chan->channel];
chan              530 drivers/counter/104-quad-8.c 	priv->index_polarity[chan->channel] = index_polarity;
chan              541 drivers/counter/104-quad-8.c 	const struct iio_chan_spec *chan)
chan              545 drivers/counter/104-quad-8.c 	return priv->index_polarity[chan->channel];
chan              111 drivers/counter/stm32-lptimer-cnt.c 				 struct iio_chan_spec const *chan,
chan              140 drivers/counter/stm32-lptimer-cnt.c 				struct iio_chan_spec const *chan,
chan              195 drivers/counter/stm32-lptimer-cnt.c 					   const struct iio_chan_spec *chan)
chan              203 drivers/counter/stm32-lptimer-cnt.c 					   const struct iio_chan_spec *chan,
chan              228 drivers/counter/stm32-lptimer-cnt.c 					const struct iio_chan_spec *chan)
chan              236 drivers/counter/stm32-lptimer-cnt.c 					const struct iio_chan_spec *chan,
chan              282 drivers/counter/stm32-lptimer-cnt.c 					      const struct iio_chan_spec *chan,
chan              292 drivers/counter/stm32-lptimer-cnt.c 					      const struct iio_chan_spec *chan,
chan              174 drivers/crypto/atmel-aes.c 	struct dma_chan		*chan;
chan              814 drivers/crypto/atmel-aes.c 	err = dmaengine_slave_config(dma->chan, &config);
chan              818 drivers/crypto/atmel-aes.c 	desc = dmaengine_prep_slave_sg(dma->chan, dma->sg, dma->sg_len, dir,
chan              826 drivers/crypto/atmel-aes.c 	dma_async_issue_pending(dma->chan);
chan              849 drivers/crypto/atmel-aes.c 	dmaengine_terminate_all(dma->chan);
chan             2374 drivers/crypto/atmel-aes.c static bool atmel_aes_filter(struct dma_chan *chan, void *slave)
chan             2378 drivers/crypto/atmel-aes.c 	if (sl && sl->dma_dev == chan->device->dev) {
chan             2379 drivers/crypto/atmel-aes.c 		chan->private = sl;
chan             2397 drivers/crypto/atmel-aes.c 	dd->src.chan = dma_request_slave_channel_compat(mask, atmel_aes_filter,
chan             2399 drivers/crypto/atmel-aes.c 	if (!dd->src.chan)
chan             2403 drivers/crypto/atmel-aes.c 	dd->dst.chan = dma_request_slave_channel_compat(mask, atmel_aes_filter,
chan             2405 drivers/crypto/atmel-aes.c 	if (!dd->dst.chan)
chan             2411 drivers/crypto/atmel-aes.c 	dma_release_channel(dd->src.chan);
chan             2419 drivers/crypto/atmel-aes.c 	dma_release_channel(dd->dst.chan);
chan             2420 drivers/crypto/atmel-aes.c 	dma_release_channel(dd->src.chan);
chan             2730 drivers/crypto/atmel-aes.c 			dma_chan_name(aes_dd->src.chan),
chan             2731 drivers/crypto/atmel-aes.c 			dma_chan_name(aes_dd->dst.chan));
chan              121 drivers/crypto/atmel-sha.c 	struct dma_chan			*chan;
chan              650 drivers/crypto/atmel-sha.c 	dmaengine_slave_config(dd->dma_lch_in.chan, &dd->dma_lch_in.dma_conf);
chan              658 drivers/crypto/atmel-sha.c 		in_desc = dmaengine_prep_slave_sg(dd->dma_lch_in.chan, sg, 2,
chan              664 drivers/crypto/atmel-sha.c 		in_desc = dmaengine_prep_slave_sg(dd->dma_lch_in.chan, sg, 1,
chan              687 drivers/crypto/atmel-sha.c 	dma_async_issue_pending(dd->dma_lch_in.chan);
chan             1496 drivers/crypto/atmel-sha.c 	dmaengine_terminate_all(dma->chan);
chan             1515 drivers/crypto/atmel-sha.c 	struct dma_chan *chan = dma->chan;
chan             1536 drivers/crypto/atmel-sha.c 	err = dmaengine_slave_config(chan, config);
chan             1540 drivers/crypto/atmel-sha.c 	desc = dmaengine_prep_slave_sg(chan, dma->sg, sg_len, DMA_MEM_TO_DEV,
chan             1554 drivers/crypto/atmel-sha.c 	dma_async_issue_pending(chan);
chan             2606 drivers/crypto/atmel-sha.c static bool atmel_sha_filter(struct dma_chan *chan, void *slave)
chan             2610 drivers/crypto/atmel-sha.c 	if (sl && sl->dma_dev == chan->device->dev) {
chan             2611 drivers/crypto/atmel-sha.c 		chan->private = sl;
chan             2627 drivers/crypto/atmel-sha.c 	dd->dma_lch_in.chan = dma_request_slave_channel_compat(mask_in,
chan             2629 drivers/crypto/atmel-sha.c 	if (!dd->dma_lch_in.chan) {
chan             2650 drivers/crypto/atmel-sha.c 	dma_release_channel(dd->dma_lch_in.chan);
chan             2830 drivers/crypto/atmel-sha.c 				dma_chan_name(sha_dd->dma_lch_in.chan));
chan               86 drivers/crypto/atmel-tdes.c 	struct dma_chan			*chan;
chan              466 drivers/crypto/atmel-tdes.c 	dmaengine_slave_config(dd->dma_lch_in.chan, &dd->dma_lch_in.dma_conf);
chan              467 drivers/crypto/atmel-tdes.c 	dmaengine_slave_config(dd->dma_lch_out.chan, &dd->dma_lch_out.dma_conf);
chan              479 drivers/crypto/atmel-tdes.c 	in_desc = dmaengine_prep_slave_sg(dd->dma_lch_in.chan, &sg[0],
chan              485 drivers/crypto/atmel-tdes.c 	out_desc = dmaengine_prep_slave_sg(dd->dma_lch_out.chan, &sg[1],
chan              495 drivers/crypto/atmel-tdes.c 	dma_async_issue_pending(dd->dma_lch_out.chan);
chan              498 drivers/crypto/atmel-tdes.c 	dma_async_issue_pending(dd->dma_lch_in.chan);
chan              705 drivers/crypto/atmel-tdes.c static bool atmel_tdes_filter(struct dma_chan *chan, void *slave)
chan              709 drivers/crypto/atmel-tdes.c 	if (sl && sl->dma_dev == chan->device->dev) {
chan              710 drivers/crypto/atmel-tdes.c 		chan->private = sl;
chan              726 drivers/crypto/atmel-tdes.c 	dd->dma_lch_in.chan = dma_request_slave_channel_compat(mask,
chan              728 drivers/crypto/atmel-tdes.c 	if (!dd->dma_lch_in.chan)
chan              742 drivers/crypto/atmel-tdes.c 	dd->dma_lch_out.chan = dma_request_slave_channel_compat(mask,
chan              744 drivers/crypto/atmel-tdes.c 	if (!dd->dma_lch_out.chan)
chan              761 drivers/crypto/atmel-tdes.c 	dma_release_channel(dd->dma_lch_in.chan);
chan              769 drivers/crypto/atmel-tdes.c 	dma_release_channel(dd->dma_lch_in.chan);
chan              770 drivers/crypto/atmel-tdes.c 	dma_release_channel(dd->dma_lch_out.chan);
chan             1323 drivers/crypto/atmel-tdes.c 				dma_chan_name(tdes_dd->dma_lch_in.chan),
chan             1324 drivers/crypto/atmel-tdes.c 				dma_chan_name(tdes_dd->dma_lch_out.chan));
chan               89 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan               93 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s - chan=%p\n", __func__, chan);
chan               95 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan               97 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->complete);
chan               98 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->active);
chan               99 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->pending);
chan              100 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->created);
chan              102 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              126 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = (struct ccp_dma_chan *)data;
chan              129 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s - chan=%s\n", __func__,
chan              130 drivers/crypto/ccp/ccp-dmaengine.c 		dma_chan_name(&chan->dma_chan));
chan              132 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan              134 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_cleanup_desc_resources(chan->ccp, &chan->complete);
chan              136 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              176 drivers/crypto/ccp/ccp-dmaengine.c static struct ccp_dma_desc *__ccp_next_dma_desc(struct ccp_dma_chan *chan,
chan              181 drivers/crypto/ccp/ccp-dmaengine.c 		list_move(&desc->entry, &chan->complete);
chan              184 drivers/crypto/ccp/ccp-dmaengine.c 	desc = list_first_entry_or_null(&chan->active, struct ccp_dma_desc,
chan              190 drivers/crypto/ccp/ccp-dmaengine.c static struct ccp_dma_desc *ccp_handle_active_desc(struct ccp_dma_chan *chan,
chan              217 drivers/crypto/ccp/ccp-dmaengine.c 		spin_lock_irqsave(&chan->lock, flags);
chan              231 drivers/crypto/ccp/ccp-dmaengine.c 		desc = __ccp_next_dma_desc(chan, desc);
chan              233 drivers/crypto/ccp/ccp-dmaengine.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              245 drivers/crypto/ccp/ccp-dmaengine.c static struct ccp_dma_desc *__ccp_pending_to_active(struct ccp_dma_chan *chan)
chan              249 drivers/crypto/ccp/ccp-dmaengine.c 	if (list_empty(&chan->pending))
chan              252 drivers/crypto/ccp/ccp-dmaengine.c 	desc = list_empty(&chan->active)
chan              253 drivers/crypto/ccp/ccp-dmaengine.c 		? list_first_entry(&chan->pending, struct ccp_dma_desc, entry)
chan              256 drivers/crypto/ccp/ccp-dmaengine.c 	list_splice_tail_init(&chan->pending, &chan->active);
chan              264 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan;
chan              270 drivers/crypto/ccp/ccp-dmaengine.c 	chan = container_of(desc->tx_desc.chan, struct ccp_dma_chan,
chan              273 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s - tx %d callback, err=%d\n",
chan              281 drivers/crypto/ccp/ccp-dmaengine.c 		desc = ccp_handle_active_desc(chan, desc);
chan              284 drivers/crypto/ccp/ccp-dmaengine.c 		if (!desc || (chan->status == DMA_PAUSED))
chan              294 drivers/crypto/ccp/ccp-dmaengine.c 	tasklet_schedule(&chan->cleanup_tasklet);
chan              301 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan;
chan              305 drivers/crypto/ccp/ccp-dmaengine.c 	chan = container_of(tx_desc->chan, struct ccp_dma_chan, dma_chan);
chan              307 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan              311 drivers/crypto/ccp/ccp-dmaengine.c 	list_add_tail(&desc->entry, &chan->pending);
chan              313 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              315 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s - added tx descriptor %d to pending list\n",
chan              321 drivers/crypto/ccp/ccp-dmaengine.c static struct ccp_dma_cmd *ccp_alloc_dma_cmd(struct ccp_dma_chan *chan)
chan              325 drivers/crypto/ccp/ccp-dmaengine.c 	cmd = kmem_cache_alloc(chan->ccp->dma_cmd_cache, GFP_NOWAIT);
chan              332 drivers/crypto/ccp/ccp-dmaengine.c static struct ccp_dma_desc *ccp_alloc_dma_desc(struct ccp_dma_chan *chan,
chan              337 drivers/crypto/ccp/ccp-dmaengine.c 	desc = kmem_cache_zalloc(chan->ccp->dma_desc_cache, GFP_NOWAIT);
chan              341 drivers/crypto/ccp/ccp-dmaengine.c 	dma_async_tx_descriptor_init(&desc->tx_desc, &chan->dma_chan);
chan              344 drivers/crypto/ccp/ccp-dmaengine.c 	desc->ccp = chan->ccp;
chan              360 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              362 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_device *ccp = chan->ccp;
chan              379 drivers/crypto/ccp/ccp-dmaengine.c 	desc = ccp_alloc_dma_desc(chan, flags);
chan              422 drivers/crypto/ccp/ccp-dmaengine.c 		cmd = ccp_alloc_dma_cmd(chan);
chan              427 drivers/crypto/ccp/ccp-dmaengine.c 		ccp_cmd->ccp = chan->ccp;
chan              464 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, sflags);
chan              466 drivers/crypto/ccp/ccp-dmaengine.c 	list_add_tail(&desc->entry, &chan->created);
chan              468 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, sflags);
chan              483 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              488 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev,
chan              510 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              514 drivers/crypto/ccp/ccp-dmaengine.c 	desc = ccp_alloc_dma_desc(chan, flags);
chan              523 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              528 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s\n", __func__);
chan              530 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan              532 drivers/crypto/ccp/ccp-dmaengine.c 	desc = __ccp_pending_to_active(chan);
chan              534 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              545 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              551 drivers/crypto/ccp/ccp-dmaengine.c 	if (chan->status == DMA_PAUSED) {
chan              558 drivers/crypto/ccp/ccp-dmaengine.c 		spin_lock_irqsave(&chan->lock, flags);
chan              561 drivers/crypto/ccp/ccp-dmaengine.c 		list_for_each_entry(desc, &chan->complete, entry) {
chan              569 drivers/crypto/ccp/ccp-dmaengine.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              573 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s - %u\n", __func__, ret);
chan              580 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              583 drivers/crypto/ccp/ccp-dmaengine.c 	chan->status = DMA_PAUSED;
chan              592 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              597 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan              599 drivers/crypto/ccp/ccp-dmaengine.c 	desc = list_first_entry_or_null(&chan->active, struct ccp_dma_desc,
chan              602 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              605 drivers/crypto/ccp/ccp-dmaengine.c 	chan->status = DMA_IN_PROGRESS;
chan              616 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan = container_of(dma_chan, struct ccp_dma_chan,
chan              620 drivers/crypto/ccp/ccp-dmaengine.c 	dev_dbg(chan->ccp->dev, "%s\n", __func__);
chan              624 drivers/crypto/ccp/ccp-dmaengine.c 	spin_lock_irqsave(&chan->lock, flags);
chan              627 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->active);
chan              628 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->pending);
chan              629 drivers/crypto/ccp/ccp-dmaengine.c 	ccp_free_desc_resources(chan->ccp, &chan->created);
chan              631 drivers/crypto/ccp/ccp-dmaengine.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              638 drivers/crypto/ccp/ccp-dmaengine.c 	struct ccp_dma_chan *chan;
chan              704 drivers/crypto/ccp/ccp-dmaengine.c 		chan = ccp->ccp_dma_chan + i;
chan              705 drivers/crypto/ccp/ccp-dmaengine.c 		dma_chan = &chan->dma_chan;
chan              707 drivers/crypto/ccp/ccp-dmaengine.c 		chan->ccp = ccp;
chan              709 drivers/crypto/ccp/ccp-dmaengine.c 		spin_lock_init(&chan->lock);
chan              710 drivers/crypto/ccp/ccp-dmaengine.c 		INIT_LIST_HEAD(&chan->created);
chan              711 drivers/crypto/ccp/ccp-dmaengine.c 		INIT_LIST_HEAD(&chan->pending);
chan              712 drivers/crypto/ccp/ccp-dmaengine.c 		INIT_LIST_HEAD(&chan->active);
chan              713 drivers/crypto/ccp/ccp-dmaengine.c 		INIT_LIST_HEAD(&chan->complete);
chan              715 drivers/crypto/ccp/ccp-dmaengine.c 		tasklet_init(&chan->cleanup_tasklet, ccp_do_cleanup,
chan              716 drivers/crypto/ccp/ccp-dmaengine.c 			     (unsigned long)chan);
chan             1123 drivers/crypto/chelsio/chtls/chtls_cm.c 			    unsigned int chan, unsigned int tid)
chan             1131 drivers/crypto/chelsio/chtls/chtls_cm.c 	set_wr_txq(skb, CPL_PRIORITY_SETUP, chan);
chan               91 drivers/crypto/mxs-dcp.c 	enum dcp_chan	chan;
chan              172 drivers/crypto/mxs-dcp.c 	const int chan = actx->chan;
chan              175 drivers/crypto/mxs-dcp.c 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
chan              180 drivers/crypto/mxs-dcp.c 	reinit_completion(&sdcp->completion[chan]);
chan              183 drivers/crypto/mxs-dcp.c 	writel(0xffffffff, sdcp->base + MXS_DCP_CH_N_STAT_CLR(chan));
chan              186 drivers/crypto/mxs-dcp.c 	writel(desc_phys, sdcp->base + MXS_DCP_CH_N_CMDPTR(chan));
chan              189 drivers/crypto/mxs-dcp.c 	writel(1, sdcp->base + MXS_DCP_CH_N_SEMA(chan));
chan              191 drivers/crypto/mxs-dcp.c 	ret = wait_for_completion_timeout(&sdcp->completion[chan],
chan              195 drivers/crypto/mxs-dcp.c 			chan, readl(sdcp->base + MXS_DCP_STAT));
chan              199 drivers/crypto/mxs-dcp.c 	stat = readl(sdcp->base + MXS_DCP_CH_N_STAT(chan));
chan              202 drivers/crypto/mxs-dcp.c 			chan, stat);
chan              218 drivers/crypto/mxs-dcp.c 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
chan              392 drivers/crypto/mxs-dcp.c 	const int chan = DCP_CHAN_CRYPTO;
chan              402 drivers/crypto/mxs-dcp.c 		spin_lock(&sdcp->lock[chan]);
chan              403 drivers/crypto/mxs-dcp.c 		backlog = crypto_get_backlog(&sdcp->queue[chan]);
chan              404 drivers/crypto/mxs-dcp.c 		arq = crypto_dequeue_request(&sdcp->queue[chan]);
chan              405 drivers/crypto/mxs-dcp.c 		spin_unlock(&sdcp->lock[chan]);
chan              461 drivers/crypto/mxs-dcp.c 	actx->chan = DCP_CHAN_CRYPTO;
chan              463 drivers/crypto/mxs-dcp.c 	spin_lock(&sdcp->lock[actx->chan]);
chan              464 drivers/crypto/mxs-dcp.c 	ret = crypto_enqueue_request(&sdcp->queue[actx->chan], &req->base);
chan              465 drivers/crypto/mxs-dcp.c 	spin_unlock(&sdcp->lock[actx->chan]);
chan              467 drivers/crypto/mxs-dcp.c 	wake_up_process(sdcp->thread[actx->chan]);
chan              562 drivers/crypto/mxs-dcp.c 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
chan              691 drivers/crypto/mxs-dcp.c 	const int chan = DCP_CHAN_HASH_SHA;
chan              700 drivers/crypto/mxs-dcp.c 		spin_lock(&sdcp->lock[chan]);
chan              701 drivers/crypto/mxs-dcp.c 		backlog = crypto_get_backlog(&sdcp->queue[chan]);
chan              702 drivers/crypto/mxs-dcp.c 		arq = crypto_dequeue_request(&sdcp->queue[chan]);
chan              703 drivers/crypto/mxs-dcp.c 		spin_unlock(&sdcp->lock[chan]);
chan              744 drivers/crypto/mxs-dcp.c 	actx->chan = DCP_CHAN_HASH_SHA;
chan              777 drivers/crypto/mxs-dcp.c 	spin_lock(&sdcp->lock[actx->chan]);
chan              778 drivers/crypto/mxs-dcp.c 	ret = crypto_enqueue_request(&sdcp->queue[actx->chan], &req->base);
chan              779 drivers/crypto/mxs-dcp.c 	spin_unlock(&sdcp->lock[actx->chan]);
chan              781 drivers/crypto/mxs-dcp.c 	wake_up_process(sdcp->thread[actx->chan]);
chan               74 drivers/crypto/qce/dma.c static int qce_dma_prep_sg(struct dma_chan *chan, struct scatterlist *sg,
chan               85 drivers/crypto/qce/dma.c 	desc = dmaengine_prep_slave_sg(chan, sg, nents, dir, flags);
chan              145 drivers/crypto/talitos.c 		setbits32(priv->chan[ch].reg + TALITOS_CCCR_LO,
chan              148 drivers/crypto/talitos.c 		while ((in_be32(priv->chan[ch].reg + TALITOS_CCCR_LO) &
chan              152 drivers/crypto/talitos.c 		setbits32(priv->chan[ch].reg + TALITOS_CCCR,
chan              155 drivers/crypto/talitos.c 		while ((in_be32(priv->chan[ch].reg + TALITOS_CCCR) &
chan              166 drivers/crypto/talitos.c 	setbits32(priv->chan[ch].reg + TALITOS_CCCR_LO, TALITOS_CCCR_LO_EAE |
chan              170 drivers/crypto/talitos.c 		setbits32(priv->chan[ch].reg + TALITOS_CCCR_LO,
chan              175 drivers/crypto/talitos.c 		setbits32(priv->chan[ch].reg + TALITOS_CCCR_LO,
chan              280 drivers/crypto/talitos.c 	spin_lock_irqsave(&priv->chan[ch].head_lock, flags);
chan              282 drivers/crypto/talitos.c 	if (!atomic_inc_not_zero(&priv->chan[ch].submit_count)) {
chan              284 drivers/crypto/talitos.c 		spin_unlock_irqrestore(&priv->chan[ch].head_lock, flags);
chan              288 drivers/crypto/talitos.c 	head = priv->chan[ch].head;
chan              289 drivers/crypto/talitos.c 	request = &priv->chan[ch].fifo[head];
chan              306 drivers/crypto/talitos.c 	priv->chan[ch].head = (priv->chan[ch].head + 1) & (priv->fifo_len - 1);
chan              313 drivers/crypto/talitos.c 	out_be32(priv->chan[ch].reg + TALITOS_FF,
chan              315 drivers/crypto/talitos.c 	out_be32(priv->chan[ch].reg + TALITOS_FF_LO,
chan              318 drivers/crypto/talitos.c 	spin_unlock_irqrestore(&priv->chan[ch].head_lock, flags);
chan              349 drivers/crypto/talitos.c 	spin_lock_irqsave(&priv->chan[ch].tail_lock, flags);
chan              351 drivers/crypto/talitos.c 	tail = priv->chan[ch].tail;
chan              352 drivers/crypto/talitos.c 	while (priv->chan[ch].fifo[tail].desc) {
chan              355 drivers/crypto/talitos.c 		request = &priv->chan[ch].fifo[tail];
chan              383 drivers/crypto/talitos.c 		priv->chan[ch].tail = (tail + 1) & (priv->fifo_len - 1);
chan              385 drivers/crypto/talitos.c 		spin_unlock_irqrestore(&priv->chan[ch].tail_lock, flags);
chan              387 drivers/crypto/talitos.c 		atomic_dec(&priv->chan[ch].submit_count);
chan              394 drivers/crypto/talitos.c 		spin_lock_irqsave(&priv->chan[ch].tail_lock, flags);
chan              395 drivers/crypto/talitos.c 		tail = priv->chan[ch].tail;
chan              398 drivers/crypto/talitos.c 	spin_unlock_irqrestore(&priv->chan[ch].tail_lock, flags);
chan              469 drivers/crypto/talitos.c 	cur_desc = ((u64)in_be32(priv->chan[ch].reg + TALITOS_CDPR)) << 32;
chan              470 drivers/crypto/talitos.c 	cur_desc |= in_be32(priv->chan[ch].reg + TALITOS_CDPR_LO);
chan              477 drivers/crypto/talitos.c 	tail = priv->chan[ch].tail;
chan              480 drivers/crypto/talitos.c 	while (priv->chan[ch].fifo[iter].dma_desc != cur_desc &&
chan              481 drivers/crypto/talitos.c 	       priv->chan[ch].fifo[iter].desc->next_desc != cur_desc) {
chan              489 drivers/crypto/talitos.c 	if (priv->chan[ch].fifo[iter].desc->next_desc == cur_desc) {
chan              492 drivers/crypto/talitos.c 		edesc = container_of(priv->chan[ch].fifo[iter].desc,
chan              498 drivers/crypto/talitos.c 	return priv->chan[ch].fifo[iter].desc->hdr;
chan              510 drivers/crypto/talitos.c 		desc_hdr = in_be32(priv->chan[ch].reg + TALITOS_DESCBUF);
chan              572 drivers/crypto/talitos.c 			in_be32(priv->chan[ch].reg + TALITOS_DESCBUF + 8*i),
chan              573 drivers/crypto/talitos.c 			in_be32(priv->chan[ch].reg + TALITOS_DESCBUF_LO + 8*i));
chan              601 drivers/crypto/talitos.c 		v_lo = in_be32(priv->chan[ch].reg + TALITOS_CCPSR_LO);
chan              644 drivers/crypto/talitos.c 			setbits32(priv->chan[ch].reg + TALITOS_CCCR,
chan              646 drivers/crypto/talitos.c 			setbits32(priv->chan[ch].reg + TALITOS_CCCR_LO, 0);
chan              647 drivers/crypto/talitos.c 			while ((in_be32(priv->chan[ch].reg + TALITOS_CCCR) &
chan             3396 drivers/crypto/talitos.c 	priv->chan = devm_kcalloc(dev,
chan             3400 drivers/crypto/talitos.c 	if (!priv->chan) {
chan             3409 drivers/crypto/talitos.c 		priv->chan[i].reg = priv->reg + stride * (i + 1);
chan             3411 drivers/crypto/talitos.c 			priv->chan[i].reg += TALITOS_CH_BASE_OFFSET;
chan             3413 drivers/crypto/talitos.c 		spin_lock_init(&priv->chan[i].head_lock);
chan             3414 drivers/crypto/talitos.c 		spin_lock_init(&priv->chan[i].tail_lock);
chan             3416 drivers/crypto/talitos.c 		priv->chan[i].fifo = devm_kcalloc(dev,
chan             3420 drivers/crypto/talitos.c 		if (!priv->chan[i].fifo) {
chan             3426 drivers/crypto/talitos.c 		atomic_set(&priv->chan[i].submit_count,
chan              142 drivers/crypto/talitos.h 	struct talitos_channel *chan;
chan              611 drivers/crypto/ux500/cryp/cryp_core.c 	struct dma_chan *chan;
chan              615 drivers/crypto/ux500/cryp/cryp_core.c 	chan = ctx->device->dma.chan_mem2cryp;
chan              616 drivers/crypto/ux500/cryp/cryp_core.c 	dmaengine_terminate_all(chan);
chan              617 drivers/crypto/ux500/cryp/cryp_core.c 	dma_unmap_sg(chan->device->dev, ctx->device->dma.sg_src,
chan              620 drivers/crypto/ux500/cryp/cryp_core.c 	chan = ctx->device->dma.chan_cryp2mem;
chan              621 drivers/crypto/ux500/cryp/cryp_core.c 	dmaengine_terminate_all(chan);
chan              622 drivers/crypto/ux500/cryp/cryp_core.c 	dma_unmap_sg(chan->device->dev, ctx->device->dma.sg_dst,
chan              187 drivers/crypto/ux500/hash/hash_core.c 	struct dma_chan *chan;
chan              189 drivers/crypto/ux500/hash/hash_core.c 	chan = ctx->device->dma.chan_mem2hash;
chan              190 drivers/crypto/ux500/hash/hash_core.c 	dmaengine_terminate_all(chan);
chan              191 drivers/crypto/ux500/hash/hash_core.c 	dma_unmap_sg(chan->device->dev, ctx->device->dma.sg,
chan              364 drivers/dma/acpi-dma.c 	struct dma_chan *chan = NULL;
chan              400 drivers/dma/acpi-dma.c 		chan = adma->acpi_dma_xlate(dma_spec, adma);
chan              406 drivers/dma/acpi-dma.c 		if (found > 0 || chan)
chan              411 drivers/dma/acpi-dma.c 	return chan ? chan : ERR_PTR(-EPROBE_DEFER);
chan              199 drivers/dma/altera-msgdma.c #define to_mdev(chan)	container_of(chan, struct msgdma_device, dmachan)
chan              303 drivers/dma/altera-msgdma.c 	struct msgdma_device *mdev = to_mdev(tx->chan);
chan              566 drivers/dma/altera-msgdma.c static void msgdma_issue_pending(struct dma_chan *chan)
chan              568 drivers/dma/altera-msgdma.c 	struct msgdma_device *mdev = to_mdev(chan);
chan              315 drivers/dma/amba-pl08x.c static inline struct pl08x_dma_chan *to_pl08x_chan(struct dma_chan *chan)
chan              317 drivers/dma/amba-pl08x.c 	return container_of(chan, struct pl08x_dma_chan, vc.chan);
chan              917 drivers/dma/amba-pl08x.c 	list_for_each_entry(p, &pl08x->memcpy.channels, vc.chan.device_node)
chan              925 drivers/dma/amba-pl08x.c 		list_for_each_entry(p, &pl08x->slave.channels, vc.chan.device_node)
chan             1511 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(vd->tx.chan);
chan             1532 drivers/dma/amba-pl08x.c static void pl08x_free_chan_resources(struct dma_chan *chan)
chan             1535 drivers/dma/amba-pl08x.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan             1539 drivers/dma/amba-pl08x.c 		struct dma_chan *chan, unsigned long flags)
chan             1551 drivers/dma/amba-pl08x.c static enum dma_status pl08x_dma_tx_status(struct dma_chan *chan,
chan             1554 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             1560 drivers/dma/amba-pl08x.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1575 drivers/dma/amba-pl08x.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1739 drivers/dma/amba-pl08x.c static void pl08x_issue_pending(struct dma_chan *chan)
chan             1741 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             1890 drivers/dma/amba-pl08x.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan             1893 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             1937 drivers/dma/amba-pl08x.c 		struct dma_chan *chan,
chan             1941 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2050 drivers/dma/amba-pl08x.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan             2054 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2064 drivers/dma/amba-pl08x.c 	txd = pl08x_init_txd(chan, direction, &slave_addr);
chan             2092 drivers/dma/amba-pl08x.c 		struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan             2096 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2108 drivers/dma/amba-pl08x.c 	txd = pl08x_init_txd(chan, direction, &slave_addr);
chan             2134 drivers/dma/amba-pl08x.c static int pl08x_config(struct dma_chan *chan,
chan             2137 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2160 drivers/dma/amba-pl08x.c static int pl08x_terminate_all(struct dma_chan *chan)
chan             2162 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2194 drivers/dma/amba-pl08x.c static void pl08x_synchronize(struct dma_chan *chan)
chan             2196 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2201 drivers/dma/amba-pl08x.c static int pl08x_pause(struct dma_chan *chan)
chan             2203 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2224 drivers/dma/amba-pl08x.c static int pl08x_resume(struct dma_chan *chan)
chan             2226 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2247 drivers/dma/amba-pl08x.c bool pl08x_filter_id(struct dma_chan *chan, void *chan_id)
chan             2253 drivers/dma/amba-pl08x.c 	if (chan->device->dev->driver != &pl08x_amba_driver.drv)
chan             2256 drivers/dma/amba-pl08x.c 	plchan = to_pl08x_chan(chan);
chan             2266 drivers/dma/amba-pl08x.c static bool pl08x_filter_fn(struct dma_chan *chan, void *chan_id)
chan             2268 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *plchan = to_pl08x_chan(chan);
chan             2357 drivers/dma/amba-pl08x.c static void pl08x_dma_slave_init(struct pl08x_dma_chan *chan)
chan             2359 drivers/dma/amba-pl08x.c 	chan->slave = true;
chan             2360 drivers/dma/amba-pl08x.c 	chan->name = chan->cd->bus_id;
chan             2361 drivers/dma/amba-pl08x.c 	chan->cfg.src_addr = chan->cd->addr;
chan             2362 drivers/dma/amba-pl08x.c 	chan->cfg.dst_addr = chan->cd->addr;
chan             2372 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *chan;
chan             2383 drivers/dma/amba-pl08x.c 		chan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan             2384 drivers/dma/amba-pl08x.c 		if (!chan)
chan             2387 drivers/dma/amba-pl08x.c 		chan->host = pl08x;
chan             2388 drivers/dma/amba-pl08x.c 		chan->state = PL08X_CHAN_IDLE;
chan             2389 drivers/dma/amba-pl08x.c 		chan->signal = -1;
chan             2392 drivers/dma/amba-pl08x.c 			chan->cd = &pl08x->pd->slave_channels[i];
chan             2398 drivers/dma/amba-pl08x.c 			chan->signal = i;
chan             2399 drivers/dma/amba-pl08x.c 			pl08x_dma_slave_init(chan);
chan             2401 drivers/dma/amba-pl08x.c 			chan->cd = kzalloc(sizeof(*chan->cd), GFP_KERNEL);
chan             2402 drivers/dma/amba-pl08x.c 			if (!chan->cd) {
chan             2403 drivers/dma/amba-pl08x.c 				kfree(chan);
chan             2406 drivers/dma/amba-pl08x.c 			chan->cd->bus_id = "memcpy";
chan             2407 drivers/dma/amba-pl08x.c 			chan->cd->periph_buses = pl08x->pd->mem_buses;
chan             2408 drivers/dma/amba-pl08x.c 			chan->name = kasprintf(GFP_KERNEL, "memcpy%d", i);
chan             2409 drivers/dma/amba-pl08x.c 			if (!chan->name) {
chan             2410 drivers/dma/amba-pl08x.c 				kfree(chan->cd);
chan             2411 drivers/dma/amba-pl08x.c 				kfree(chan);
chan             2417 drivers/dma/amba-pl08x.c 			 chan->name);
chan             2419 drivers/dma/amba-pl08x.c 		chan->vc.desc_free = pl08x_desc_free;
chan             2420 drivers/dma/amba-pl08x.c 		vchan_init(&chan->vc, dmadev);
chan             2429 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *chan = NULL;
chan             2432 drivers/dma/amba-pl08x.c 	list_for_each_entry_safe(chan,
chan             2433 drivers/dma/amba-pl08x.c 				 next, &dmadev->channels, vc.chan.device_node) {
chan             2434 drivers/dma/amba-pl08x.c 		list_del(&chan->vc.chan.device_node);
chan             2435 drivers/dma/amba-pl08x.c 		kfree(chan);
chan             2460 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *chan;
chan             2487 drivers/dma/amba-pl08x.c 	list_for_each_entry(chan, &pl08x->memcpy.channels, vc.chan.device_node) {
chan             2488 drivers/dma/amba-pl08x.c 		seq_printf(s, "%s\t\t%s\n", chan->name,
chan             2489 drivers/dma/amba-pl08x.c 			   pl08x_state_str(chan->state));
chan             2496 drivers/dma/amba-pl08x.c 		list_for_each_entry(chan, &pl08x->slave.channels,
chan             2497 drivers/dma/amba-pl08x.c 				    vc.chan.device_node) {
chan             2498 drivers/dma/amba-pl08x.c 			seq_printf(s, "%s\t\t%s\n", chan->name,
chan             2499 drivers/dma/amba-pl08x.c 				   pl08x_state_str(chan->state));
chan             2525 drivers/dma/amba-pl08x.c 	struct pl08x_dma_chan *chan;
chan             2531 drivers/dma/amba-pl08x.c 	list_for_each_entry(chan, &pl08x->slave.channels, vc.chan.device_node) {
chan             2532 drivers/dma/amba-pl08x.c 		if (chan->signal == id)
chan             2533 drivers/dma/amba-pl08x.c 			return &chan->vc.chan;
chan               60 drivers/dma/at_hdmac.c static void atc_issue_pending(struct dma_chan *chan);
chan              102 drivers/dma/at_hdmac.c static struct at_desc *atc_alloc_descriptor(struct dma_chan *chan,
chan              106 drivers/dma/at_hdmac.c 	struct at_dma	*atdma = to_at_dma(chan->device);
chan              112 drivers/dma/at_hdmac.c 		dma_async_tx_descriptor_init(&desc->txd, chan);
chan              303 drivers/dma/at_hdmac.c static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)
chan              305 drivers/dma/at_hdmac.c 	struct at_dma_chan      *atchan = to_at_dma_chan(chan);
chan              637 drivers/dma/at_hdmac.c 			atchan = &atdma->chan[i];
chan              670 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(tx->chan);
chan              678 drivers/dma/at_hdmac.c 		dev_vdbg(chan2dev(tx->chan), "tx_submit: started %u\n",
chan              683 drivers/dma/at_hdmac.c 		dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u\n",
chan              700 drivers/dma/at_hdmac.c atc_prep_dma_interleaved(struct dma_chan *chan,
chan              704 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan              719 drivers/dma/at_hdmac.c 	dev_info(chan2dev(chan),
chan              736 drivers/dma/at_hdmac.c 			dev_err(chan2dev(chan),
chan              750 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: buffer is too big\n", __func__);
chan              767 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan),
chan              801 drivers/dma/at_hdmac.c atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              804 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan              815 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "prep_dma_memcpy: d%pad s%pad l0x%zx f0x%lx\n",
chan              819 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
chan              872 drivers/dma/at_hdmac.c static struct at_desc *atc_create_memset_desc(struct dma_chan *chan,
chan              877 drivers/dma/at_hdmac.c 	struct at_dma_chan *atchan = to_at_dma_chan(chan);
chan              889 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: buffer is too big\n",
chan              896 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: can't get a descriptor\n",
chan              921 drivers/dma/at_hdmac.c atc_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value,
chan              924 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan              929 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s: d%pad v0x%x l0x%zx f0x%lx\n", __func__,
chan              933 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
chan              937 drivers/dma/at_hdmac.c 	if (!is_dma_fill_aligned(chan->device, dest, 0, len)) {
chan              938 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "%s: buffer is not aligned\n",
chan              945 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: couldn't allocate buffer\n",
chan              951 drivers/dma/at_hdmac.c 	desc = atc_create_memset_desc(chan, paddr, dest, len);
chan              953 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: couldn't get a descriptor\n",
chan              978 drivers/dma/at_hdmac.c atc_prep_dma_memset_sg(struct dma_chan *chan,
chan              983 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan              984 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan              992 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s: v0x%x l0x%zx f0x%lx\n", __func__,
chan              996 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "%s: scatterlist is empty!\n",
chan             1003 drivers/dma/at_hdmac.c 		dev_err(chan2dev(chan), "%s: couldn't allocate buffer\n",
chan             1013 drivers/dma/at_hdmac.c 		dev_vdbg(chan2dev(chan), "%s: d%pad, l0x%zx\n",
chan             1016 drivers/dma/at_hdmac.c 		if (!is_dma_fill_aligned(chan->device, dest, 0, len)) {
chan             1017 drivers/dma/at_hdmac.c 			dev_err(chan2dev(chan), "%s: buffer is not aligned\n",
chan             1022 drivers/dma/at_hdmac.c 		desc = atc_create_memset_desc(chan, paddr, dest, len);
chan             1064 drivers/dma/at_hdmac.c atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             1068 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1069 drivers/dma/at_hdmac.c 	struct at_dma_slave	*atslave = chan->private;
chan             1082 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "prep_slave_sg (%d): %s f0x%lx\n",
chan             1088 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "prep_slave_sg: sg length is zero!\n");
chan             1117 drivers/dma/at_hdmac.c 				dev_dbg(chan2dev(chan),
chan             1158 drivers/dma/at_hdmac.c 				dev_dbg(chan2dev(chan),
chan             1195 drivers/dma/at_hdmac.c 	dev_err(chan2dev(chan), "not enough descriptors available\n");
chan             1226 drivers/dma/at_hdmac.c atc_dma_cyclic_fill_desc(struct dma_chan *chan, struct at_desc *desc,
chan             1231 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1284 drivers/dma/at_hdmac.c atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan             1288 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1289 drivers/dma/at_hdmac.c 	struct at_dma_slave	*atslave = chan->private;
chan             1298 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "prep_dma_cyclic: %s buf@%pad - %d (%d/%d)\n",
chan             1304 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "prep_dma_cyclic: length is zero!\n");
chan             1310 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "prep_dma_cyclic: channel in use!\n");
chan             1334 drivers/dma/at_hdmac.c 		if (atc_dma_cyclic_fill_desc(chan, desc, i, buf_addr,
chan             1351 drivers/dma/at_hdmac.c 	dev_err(chan2dev(chan), "not enough descriptors available\n");
chan             1358 drivers/dma/at_hdmac.c static int atc_config(struct dma_chan *chan,
chan             1361 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1363 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan             1366 drivers/dma/at_hdmac.c 	if (!chan->private)
chan             1377 drivers/dma/at_hdmac.c static int atc_pause(struct dma_chan *chan)
chan             1379 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1380 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan             1384 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan             1396 drivers/dma/at_hdmac.c static int atc_resume(struct dma_chan *chan)
chan             1398 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1399 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan             1403 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan             1418 drivers/dma/at_hdmac.c static int atc_terminate_all(struct dma_chan *chan)
chan             1420 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1421 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan             1428 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan             1473 drivers/dma/at_hdmac.c atc_tx_status(struct dma_chan *chan,
chan             1477 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1482 drivers/dma/at_hdmac.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1495 drivers/dma/at_hdmac.c 	bytes = atc_get_bytes_left(chan, cookie);
chan             1500 drivers/dma/at_hdmac.c 		dev_vdbg(chan2dev(chan), "get residual bytes error\n");
chan             1506 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "tx_status %d: cookie = %d residue = %d\n",
chan             1516 drivers/dma/at_hdmac.c static void atc_issue_pending(struct dma_chan *chan)
chan             1518 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1521 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "issue_pending\n");
chan             1539 drivers/dma/at_hdmac.c static int atc_alloc_chan_resources(struct dma_chan *chan)
chan             1541 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1542 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan             1550 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "alloc_chan_resources\n");
chan             1554 drivers/dma/at_hdmac.c 		dev_dbg(chan2dev(chan), "DMA channel not idle ?\n");
chan             1560 drivers/dma/at_hdmac.c 	atslave = chan->private;
chan             1580 drivers/dma/at_hdmac.c 		desc = atc_alloc_descriptor(chan, GFP_KERNEL);
chan             1592 drivers/dma/at_hdmac.c 	dma_cookie_init(chan);
chan             1598 drivers/dma/at_hdmac.c 	dev_dbg(chan2dev(chan),
chan             1609 drivers/dma/at_hdmac.c static void atc_free_chan_resources(struct dma_chan *chan)
chan             1611 drivers/dma/at_hdmac.c 	struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             1612 drivers/dma/at_hdmac.c 	struct at_dma		*atdma = to_at_dma(chan->device);
chan             1616 drivers/dma/at_hdmac.c 	dev_dbg(chan2dev(chan), "free_chan_resources: (descs allocated=%u)\n",
chan             1625 drivers/dma/at_hdmac.c 		dev_vdbg(chan2dev(chan), "  freeing descriptor %p\n", desc);
chan             1637 drivers/dma/at_hdmac.c 	kfree(chan->private);
chan             1638 drivers/dma/at_hdmac.c 	chan->private = NULL;
chan             1640 drivers/dma/at_hdmac.c 	dev_vdbg(chan2dev(chan), "free_chan_resources: done\n");
chan             1644 drivers/dma/at_hdmac.c static bool at_dma_filter(struct dma_chan *chan, void *slave)
chan             1648 drivers/dma/at_hdmac.c 	if (atslave->dma_dev == chan->device->dev) {
chan             1649 drivers/dma/at_hdmac.c 		chan->private = atslave;
chan             1659 drivers/dma/at_hdmac.c 	struct dma_chan *chan;
chan             1704 drivers/dma/at_hdmac.c 	chan = dma_request_channel(mask, at_dma_filter, atslave);
chan             1705 drivers/dma/at_hdmac.c 	if (!chan)
chan             1708 drivers/dma/at_hdmac.c 	atchan = to_at_dma_chan(chan);
chan             1712 drivers/dma/at_hdmac.c 	return chan;
chan             1888 drivers/dma/at_hdmac.c 		struct at_dma_chan	*atchan = &atdma->chan[i];
chan             1995 drivers/dma/at_hdmac.c 	struct dma_chan		*chan, *_chan;
chan             2007 drivers/dma/at_hdmac.c 	list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels,
chan             2009 drivers/dma/at_hdmac.c 		struct at_dma_chan	*atchan = to_at_dma_chan(chan);
chan             2012 drivers/dma/at_hdmac.c 		atc_disable_chan_irq(atdma, chan->chan_id);
chan             2015 drivers/dma/at_hdmac.c 		list_del(&chan->device_node);
chan             2043 drivers/dma/at_hdmac.c 	struct dma_chan *chan, *_chan;
chan             2045 drivers/dma/at_hdmac.c 	list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels,
chan             2047 drivers/dma/at_hdmac.c 		struct at_dma_chan *atchan = to_at_dma_chan(chan);
chan             2057 drivers/dma/at_hdmac.c 	struct dma_chan	*chan = &atchan->chan_common;
chan             2062 drivers/dma/at_hdmac.c 		dev_warn(chan2dev(chan),
chan             2064 drivers/dma/at_hdmac.c 		atc_pause(chan);
chan             2077 drivers/dma/at_hdmac.c 	struct dma_chan *chan, *_chan;
chan             2080 drivers/dma/at_hdmac.c 	list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels,
chan             2082 drivers/dma/at_hdmac.c 		struct at_dma_chan *atchan = to_at_dma_chan(chan);
chan             2118 drivers/dma/at_hdmac.c 	struct dma_chan *chan, *_chan;
chan             2130 drivers/dma/at_hdmac.c 	list_for_each_entry_safe(chan, _chan, &atdma->dma_common.channels,
chan             2132 drivers/dma/at_hdmac.c 		struct at_dma_chan *atchan = to_at_dma_chan(chan);
chan              336 drivers/dma/at_hdmac_regs.h 	struct at_dma_chan	chan[0];
chan              352 drivers/dma/at_hdmac_regs.h static struct device *chan2dev(struct dma_chan *chan)
chan              354 drivers/dma/at_hdmac_regs.h 	return &chan->dev->device;
chan              184 drivers/dma/at_xdmac.c 	struct dma_chan			chan;
chan              215 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	chan[0];
chan              261 drivers/dma/at_xdmac.c 	return container_of(dchan, struct at_xdmac_chan, chan);
chan              264 drivers/dma/at_xdmac.c static struct device *chan2dev(struct dma_chan *chan)
chan              266 drivers/dma/at_xdmac.c 	return &chan->dev->device;
chan              336 drivers/dma/at_xdmac.c 	struct at_xdmac	*atxdmac = to_at_xdmac(atchan->chan.device);
chan              339 drivers/dma/at_xdmac.c 	dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);
chan              376 drivers/dma/at_xdmac.c 	dev_vdbg(chan2dev(&atchan->chan),
chan              404 drivers/dma/at_xdmac.c 	dev_vdbg(chan2dev(&atchan->chan),
chan              409 drivers/dma/at_xdmac.c 	dev_vdbg(chan2dev(&atchan->chan),
chan              423 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(tx->chan);
chan              430 drivers/dma/at_xdmac.c 	dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
chan              440 drivers/dma/at_xdmac.c static struct at_xdmac_desc *at_xdmac_alloc_desc(struct dma_chan *chan,
chan              444 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(chan->device);
chan              450 drivers/dma/at_xdmac.c 		dma_async_tx_descriptor_init(&desc->tx_dma_desc, chan);
chan              473 drivers/dma/at_xdmac.c 		desc = at_xdmac_alloc_desc(&atchan->chan, GFP_NOWAIT);
chan              484 drivers/dma/at_xdmac.c static void at_xdmac_queue_desc(struct dma_chan *chan,
chan              494 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),	"%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
chan              498 drivers/dma/at_xdmac.c static inline void at_xdmac_increment_block_count(struct dma_chan *chan,
chan              506 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),
chan              516 drivers/dma/at_xdmac.c 	struct dma_chan		*chan;
chan              524 drivers/dma/at_xdmac.c 	chan = dma_get_any_slave_channel(&atxdmac->dma);
chan              525 drivers/dma/at_xdmac.c 	if (!chan) {
chan              530 drivers/dma/at_xdmac.c 	atchan = to_at_xdmac_chan(chan);
chan              537 drivers/dma/at_xdmac.c 	return chan;
chan              540 drivers/dma/at_xdmac.c static int at_xdmac_compute_chan_conf(struct dma_chan *chan,
chan              543 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan              559 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "invalid src maxburst value\n");
chan              565 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "invalid src addr width value\n");
chan              582 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "invalid src maxburst value\n");
chan              588 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "invalid dst addr width value\n");
chan              594 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),	"%s: cfg=0x%08x\n", __func__, atchan->cfg);
chan              617 drivers/dma/at_xdmac.c static int at_xdmac_set_slave_config(struct dma_chan *chan,
chan              620 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan              623 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "invalid slave configuration\n");
chan              633 drivers/dma/at_xdmac.c at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              637 drivers/dma/at_xdmac.c 	struct at_xdmac_chan		*atchan = to_at_xdmac_chan(chan);
chan              649 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "invalid DMA direction\n");
chan              653 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: sg_len=%d, dir=%s, flags=0x%lx\n",
chan              661 drivers/dma/at_xdmac.c 	if (at_xdmac_compute_chan_conf(chan, direction))
chan              672 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "sg data length is zero\n");
chan              675 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: * sg%d len=%u, mem=0x%08x\n",
chan              680 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "can't get descriptor\n");
chan              704 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan              710 drivers/dma/at_xdmac.c 			at_xdmac_queue_desc(chan, prev, desc);
chan              716 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
chan              734 drivers/dma/at_xdmac.c at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
chan              739 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan              745 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: buf_addr=%pad, buf_len=%zd, period_len=%zd, dir=%s, flags=0x%lx\n",
chan              750 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "invalid DMA direction\n");
chan              755 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "channel currently used\n");
chan              759 drivers/dma/at_xdmac.c 	if (at_xdmac_compute_chan_conf(chan, direction))
chan              768 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "can't get descriptor\n");
chan              775 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan              792 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan              798 drivers/dma/at_xdmac.c 			at_xdmac_queue_desc(chan, prev, desc);
chan              804 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
chan              809 drivers/dma/at_xdmac.c 	at_xdmac_queue_desc(chan, prev, first);
chan              817 drivers/dma/at_xdmac.c static inline u32 at_xdmac_align_width(struct dma_chan *chan, dma_addr_t addr)
chan              831 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: dwidth: double word\n", __func__);
chan              834 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: dwidth: word\n", __func__);
chan              837 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: dwidth: half word\n", __func__);
chan              840 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: dwidth: byte\n", __func__);
chan              847 drivers/dma/at_xdmac.c at_xdmac_interleaved_queue_desc(struct dma_chan *chan,
chan              876 drivers/dma/at_xdmac.c 	dwidth = at_xdmac_align_width(chan, src | dst | chunk->size);
chan              878 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan              886 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan              907 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "can't get descriptor\n");
chan              926 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),
chan              933 drivers/dma/at_xdmac.c 		at_xdmac_queue_desc(chan, prev, desc);
chan              939 drivers/dma/at_xdmac.c at_xdmac_prep_interleaved(struct dma_chan *chan,
chan              943 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan              960 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: src=%pad, dest=%pad, numf=%zu, frame_size=%zu, flags=0x%lx\n",
chan              968 drivers/dma/at_xdmac.c 		first = at_xdmac_interleaved_queue_desc(chan, atchan,
chan              975 drivers/dma/at_xdmac.c 			at_xdmac_increment_block_count(chan, first);
chan              977 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
chan              993 drivers/dma/at_xdmac.c 			dev_dbg(chan2dev(chan),
chan              997 drivers/dma/at_xdmac.c 			desc = at_xdmac_interleaved_queue_desc(chan, atchan,
chan             1010 drivers/dma/at_xdmac.c 			dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
chan             1033 drivers/dma/at_xdmac.c at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan             1036 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1061 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: src=%pad, dest=%pad, len=%zd, flags=0x%lx\n",
chan             1067 drivers/dma/at_xdmac.c 	dwidth = at_xdmac_align_width(chan, src_addr | dst_addr);
chan             1073 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: remaining_size=%zu\n", __func__, remaining_size);
chan             1079 drivers/dma/at_xdmac.c 			dev_err(chan2dev(chan), "can't get descriptor\n");
chan             1094 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: xfer_size=%zu\n", __func__, xfer_size);
chan             1097 drivers/dma/at_xdmac.c 		dwidth = at_xdmac_align_width(chan,
chan             1113 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan),
chan             1119 drivers/dma/at_xdmac.c 			at_xdmac_queue_desc(chan, prev, desc);
chan             1125 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
chan             1136 drivers/dma/at_xdmac.c static struct at_xdmac_desc *at_xdmac_memset_create_desc(struct dma_chan *chan,
chan             1167 drivers/dma/at_xdmac.c 	dwidth = at_xdmac_align_width(chan, dst_addr);
chan             1170 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan),
chan             1180 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan), "can't get descriptor\n");
chan             1196 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),
chan             1205 drivers/dma/at_xdmac.c at_xdmac_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value,
chan             1208 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1211 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: dest=%pad, len=%zu, pattern=0x%x, flags=0x%lx\n",
chan             1217 drivers/dma/at_xdmac.c 	desc = at_xdmac_memset_create_desc(chan, atchan, dest, len, value);
chan             1228 drivers/dma/at_xdmac.c at_xdmac_prep_dma_memset_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             1232 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1242 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: sg_len=%d, value=0x%x, flags=0x%lx\n",
chan             1247 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: dest=%pad, len=%d, pattern=0x%x, flags=0x%lx\n",
chan             1250 drivers/dma/at_xdmac.c 		desc = at_xdmac_memset_create_desc(chan, atchan,
chan             1289 drivers/dma/at_xdmac.c 				dev_dbg(chan2dev(chan),
chan             1297 drivers/dma/at_xdmac.c 				at_xdmac_increment_block_count(chan, ppdesc);
chan             1328 drivers/dma/at_xdmac.c 				at_xdmac_queue_desc(chan, ppdesc, pdesc);
chan             1337 drivers/dma/at_xdmac.c 				dev_dbg(chan2dev(chan),
chan             1352 drivers/dma/at_xdmac.c 			dev_dbg(chan2dev(chan),
chan             1360 drivers/dma/at_xdmac.c 			at_xdmac_increment_block_count(chan, pdesc);
chan             1390 drivers/dma/at_xdmac.c at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan             1393 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1394 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(atchan->chan.device);
chan             1404 drivers/dma/at_xdmac.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1520 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan),
chan             1533 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
chan             1558 drivers/dma/at_xdmac.c 		dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
chan             1583 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(atchan->chan.device);
chan             1593 drivers/dma/at_xdmac.c 		dev_err(chan2dev(&atchan->chan), "read bus error!!!");
chan             1595 drivers/dma/at_xdmac.c 		dev_err(chan2dev(&atchan->chan), "write bus error!!!");
chan             1597 drivers/dma/at_xdmac.c 		dev_err(chan2dev(&atchan->chan), "request overflow error!!!");
chan             1613 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(&atchan->chan),
chan             1627 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
chan             1647 drivers/dma/at_xdmac.c 		dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
chan             1649 drivers/dma/at_xdmac.c 			dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
chan             1696 drivers/dma/at_xdmac.c 			atchan = &atxdmac->chan[i];
chan             1703 drivers/dma/at_xdmac.c 			dev_vdbg(chan2dev(&atchan->chan),
chan             1725 drivers/dma/at_xdmac.c static void at_xdmac_issue_pending(struct dma_chan *chan)
chan             1727 drivers/dma/at_xdmac.c 	struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan);
chan             1729 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(&atchan->chan), "%s\n", __func__);
chan             1737 drivers/dma/at_xdmac.c static int at_xdmac_device_config(struct dma_chan *chan,
chan             1740 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1744 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s\n", __func__);
chan             1747 drivers/dma/at_xdmac.c 	ret = at_xdmac_set_slave_config(chan, config);
chan             1753 drivers/dma/at_xdmac.c static int at_xdmac_device_pause(struct dma_chan *chan)
chan             1755 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1756 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(atchan->chan.device);
chan             1759 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s\n", __func__);
chan             1774 drivers/dma/at_xdmac.c static int at_xdmac_device_resume(struct dma_chan *chan)
chan             1776 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1777 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(atchan->chan.device);
chan             1780 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s\n", __func__);
chan             1795 drivers/dma/at_xdmac.c static int at_xdmac_device_terminate_all(struct dma_chan *chan)
chan             1798 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1799 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(atchan->chan.device);
chan             1802 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s\n", __func__);
chan             1820 drivers/dma/at_xdmac.c static int at_xdmac_alloc_chan_resources(struct dma_chan *chan)
chan             1822 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1830 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan),
chan             1837 drivers/dma/at_xdmac.c 		dev_err(chan2dev(chan),
chan             1844 drivers/dma/at_xdmac.c 		desc = at_xdmac_alloc_desc(chan, GFP_ATOMIC);
chan             1846 drivers/dma/at_xdmac.c 			dev_warn(chan2dev(chan),
chan             1853 drivers/dma/at_xdmac.c 	dma_cookie_init(chan);
chan             1855 drivers/dma/at_xdmac.c 	dev_dbg(chan2dev(chan), "%s: allocated %d descriptors\n", __func__, i);
chan             1862 drivers/dma/at_xdmac.c static void at_xdmac_free_chan_resources(struct dma_chan *chan)
chan             1864 drivers/dma/at_xdmac.c 	struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1865 drivers/dma/at_xdmac.c 	struct at_xdmac		*atxdmac = to_at_xdmac(chan->device);
chan             1869 drivers/dma/at_xdmac.c 		dev_dbg(chan2dev(chan), "%s: freeing descriptor %p\n", __func__, desc);
chan             1881 drivers/dma/at_xdmac.c 	struct dma_chan		*chan, *_chan;
chan             1883 drivers/dma/at_xdmac.c 	list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) {
chan             1884 drivers/dma/at_xdmac.c 		struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1900 drivers/dma/at_xdmac.c 	struct dma_chan		*chan, *_chan;
chan             1902 drivers/dma/at_xdmac.c 	list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) {
chan             1903 drivers/dma/at_xdmac.c 		struct at_xdmac_chan	*atchan = to_at_xdmac_chan(chan);
chan             1908 drivers/dma/at_xdmac.c 				at_xdmac_device_pause(chan);
chan             1925 drivers/dma/at_xdmac.c 	struct dma_chan		*chan, *_chan;
chan             1935 drivers/dma/at_xdmac.c 		atchan = &atxdmac->chan[i];
chan             1941 drivers/dma/at_xdmac.c 	list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) {
chan             1942 drivers/dma/at_xdmac.c 		atchan = to_at_xdmac_chan(chan);
chan             1946 drivers/dma/at_xdmac.c 				at_xdmac_device_resume(chan);
chan             2067 drivers/dma/at_xdmac.c 		struct at_xdmac_chan *atchan = &atxdmac->chan[i];
chan             2069 drivers/dma/at_xdmac.c 		atchan->chan.device = &atxdmac->dma;
chan             2070 drivers/dma/at_xdmac.c 		list_add_tail(&atchan->chan.device_node,
chan             2128 drivers/dma/at_xdmac.c 		struct at_xdmac_chan *atchan = &atxdmac->chan[i];
chan             2131 drivers/dma/at_xdmac.c 		at_xdmac_free_chan_resources(&atchan->chan);
chan              533 drivers/dma/bcm-sba-raid.c 	sba = to_sba_device(tx->chan);
chan              197 drivers/dma/bcm2835-dma.c 	return container_of(c, struct bcm2835_chan, vc.chan);
chan              224 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *chan,
chan              231 drivers/dma/bcm2835-dma.c 	size_t max_len = bcm2835_dma_max_frame_length(chan);
chan              303 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan, enum dma_transfer_direction direction,
chan              308 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              386 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan,
chan              392 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              434 drivers/dma/bcm2835-dma.c 		dev_err(c->vc.chan.device->dev,
chan              502 drivers/dma/bcm2835-dma.c static int bcm2835_dma_alloc_chan_resources(struct dma_chan *chan)
chan              504 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              505 drivers/dma/bcm2835-dma.c 	struct device *dev = c->vc.chan.device->dev;
chan              524 drivers/dma/bcm2835-dma.c static void bcm2835_dma_free_chan_resources(struct dma_chan *chan)
chan              526 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              532 drivers/dma/bcm2835-dma.c 	dev_dbg(c->vc.chan.device->dev, "Freeing DMA channel %u\n", c->ch);
chan              564 drivers/dma/bcm2835-dma.c static enum dma_status bcm2835_dma_tx_status(struct dma_chan *chan,
chan              567 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              572 drivers/dma/bcm2835-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              602 drivers/dma/bcm2835-dma.c static void bcm2835_dma_issue_pending(struct dma_chan *chan)
chan              604 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              615 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
chan              618 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              633 drivers/dma/bcm2835-dma.c 	d = bcm2835_dma_create_cb_chain(chan, DMA_MEM_TO_MEM, false,
chan              643 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan,
chan              648 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              656 drivers/dma/bcm2835-dma.c 		dev_err(chan->device->dev,
chan              680 drivers/dma/bcm2835-dma.c 	d = bcm2835_dma_create_cb_chain(chan, direction, false,
chan              688 drivers/dma/bcm2835-dma.c 	bcm2835_dma_fill_cb_chain_with_sg(chan, direction, d->cb_list,
chan              695 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              699 drivers/dma/bcm2835-dma.c 	struct bcm2835_dmadev *od = to_bcm2835_dma_dev(chan->device);
chan              700 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              710 drivers/dma/bcm2835-dma.c 		dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
chan              715 drivers/dma/bcm2835-dma.c 		dev_err(chan->device->dev,
chan              730 drivers/dma/bcm2835-dma.c 		dev_warn_once(chan->device->dev,
chan              767 drivers/dma/bcm2835-dma.c 	d = bcm2835_dma_create_cb_chain(chan, direction, true,
chan              780 drivers/dma/bcm2835-dma.c static int bcm2835_dma_slave_config(struct dma_chan *chan,
chan              783 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              790 drivers/dma/bcm2835-dma.c static int bcm2835_dma_terminate_all(struct dma_chan *chan)
chan              792 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              815 drivers/dma/bcm2835-dma.c static void bcm2835_dma_synchronize(struct dma_chan *chan)
chan              817 drivers/dma/bcm2835-dma.c 	struct bcm2835_chan *c = to_bcm2835_dma_chan(chan);
chan              852 drivers/dma/bcm2835-dma.c 				 vc.chan.device_node) {
chan              853 drivers/dma/bcm2835-dma.c 		list_del(&c->vc.chan.device_node);
chan              871 drivers/dma/bcm2835-dma.c 	struct dma_chan *chan;
chan              873 drivers/dma/bcm2835-dma.c 	chan = dma_get_any_slave_channel(&d->ddev);
chan              874 drivers/dma/bcm2835-dma.c 	if (!chan)
chan              878 drivers/dma/bcm2835-dma.c 	to_bcm2835_dma_chan(chan)->dreq = spec->args[0];
chan              880 drivers/dma/bcm2835-dma.c 	return chan;
chan             1260 drivers/dma/coh901318.c #define COHC_2_DEV(cohc) (&cohc->chan.dev->device)
chan             1298 drivers/dma/coh901318.c 	struct dma_chan chan;
chan             1399 drivers/dma/coh901318.c static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan)
chan             1401 drivers/dma/coh901318.c 	return container_of(chan, struct coh901318_chan, chan);
chan             1404 drivers/dma/coh901318.c static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
chan             1526 drivers/dma/coh901318.c 		dma_async_tx_descriptor_init(&desc->desc, &cohc->chan);
chan             1601 drivers/dma/coh901318.c static u32 coh901318_get_bytes_left(struct dma_chan *chan)
chan             1603 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             1683 drivers/dma/coh901318.c static int coh901318_pause(struct dma_chan *chan)
chan             1687 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             1729 drivers/dma/coh901318.c static int coh901318_resume(struct dma_chan *chan)
chan             1733 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             1757 drivers/dma/coh901318.c bool coh901318_filter_id(struct dma_chan *chan, void *chan_id)
chan             1761 drivers/dma/coh901318.c 	if (ch_nr == to_coh901318_chan(chan)->id)
chan             1773 drivers/dma/coh901318.c static bool coh901318_filter_base_and_id(struct dma_chan *chan, void *data)
chan             1777 drivers/dma/coh901318.c 	if (&args->base->dma_slave == chan->device &&
chan             1778 drivers/dma/coh901318.c 	    args->ch_nr == to_coh901318_chan(chan)->id)
chan             2097 drivers/dma/coh901318.c static int coh901318_terminate_all(struct dma_chan *chan)
chan             2100 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2105 drivers/dma/coh901318.c 	coh901318_pause(chan);
chan             2148 drivers/dma/coh901318.c static int coh901318_alloc_chan_resources(struct dma_chan *chan)
chan             2150 drivers/dma/coh901318.c 	struct coh901318_chan	*cohc = to_coh901318_chan(chan);
chan             2156 drivers/dma/coh901318.c 	if (chan->client_count > 1)
chan             2164 drivers/dma/coh901318.c 	dma_cookie_init(chan);
chan             2172 drivers/dma/coh901318.c coh901318_free_chan_resources(struct dma_chan *chan)
chan             2174 drivers/dma/coh901318.c 	struct coh901318_chan	*cohc = to_coh901318_chan(chan);
chan             2190 drivers/dma/coh901318.c 	coh901318_terminate_all(chan);
chan             2199 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(tx->chan);
chan             2214 drivers/dma/coh901318.c coh901318_prep_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan             2220 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2268 drivers/dma/coh901318.c coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             2272 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2357 drivers/dma/coh901318.c 	coh901318_dma_set_runtimeconfig(chan, &cohc->config, direction);
chan             2398 drivers/dma/coh901318.c coh901318_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan             2401 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2404 drivers/dma/coh901318.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             2408 drivers/dma/coh901318.c 	dma_set_residue(txstate, coh901318_get_bytes_left(chan));
chan             2417 drivers/dma/coh901318.c coh901318_issue_pending(struct dma_chan *chan)
chan             2419 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2497 drivers/dma/coh901318.c static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
chan             2501 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2579 drivers/dma/coh901318.c static int coh901318_dma_slave_config(struct dma_chan *chan,
chan             2582 drivers/dma/coh901318.c 	struct coh901318_chan *cohc = to_coh901318_chan(chan);
chan             2603 drivers/dma/coh901318.c 			cohc->chan.device = dma;
chan             2621 drivers/dma/coh901318.c 			list_add_tail(&cohc->chan.device_node,
chan              136 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan chan;
chan              141 drivers/dma/dma-axi-dmac.c static struct axi_dmac *chan_to_axi_dmac(struct axi_dmac_chan *chan)
chan              143 drivers/dma/dma-axi-dmac.c 	return container_of(chan->vchan.chan.device, struct axi_dmac,
chan              149 drivers/dma/dma-axi-dmac.c 	return container_of(c, struct axi_dmac_chan, vchan.chan);
chan              168 drivers/dma/dma-axi-dmac.c static int axi_dmac_src_is_mem(struct axi_dmac_chan *chan)
chan              170 drivers/dma/dma-axi-dmac.c 	return chan->src_type == AXI_DMAC_BUS_TYPE_AXI_MM;
chan              173 drivers/dma/dma-axi-dmac.c static int axi_dmac_dest_is_mem(struct axi_dmac_chan *chan)
chan              175 drivers/dma/dma-axi-dmac.c 	return chan->dest_type == AXI_DMAC_BUS_TYPE_AXI_MM;
chan              178 drivers/dma/dma-axi-dmac.c static bool axi_dmac_check_len(struct axi_dmac_chan *chan, unsigned int len)
chan              182 drivers/dma/dma-axi-dmac.c 	if ((len & chan->length_align_mask) != 0) /* Not aligned */
chan              187 drivers/dma/dma-axi-dmac.c static bool axi_dmac_check_addr(struct axi_dmac_chan *chan, dma_addr_t addr)
chan              189 drivers/dma/dma-axi-dmac.c 	if ((addr & chan->address_align_mask) != 0) /* Not aligned */
chan              194 drivers/dma/dma-axi-dmac.c static void axi_dmac_start_transfer(struct axi_dmac_chan *chan)
chan              196 drivers/dma/dma-axi-dmac.c 	struct axi_dmac *dmac = chan_to_axi_dmac(chan);
chan              207 drivers/dma/dma-axi-dmac.c 	desc = chan->next_desc;
chan              210 drivers/dma/dma-axi-dmac.c 		vdesc = vchan_next_desc(&chan->vchan);
chan              213 drivers/dma/dma-axi-dmac.c 		list_move_tail(&vdesc->node, &chan->active_descs);
chan              230 drivers/dma/dma-axi-dmac.c 			chan->next_desc = NULL;
chan              233 drivers/dma/dma-axi-dmac.c 		chan->next_desc = desc;
chan              238 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_dest_is_mem(chan)) {
chan              243 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_src_is_mem(chan)) {
chan              253 drivers/dma/dma-axi-dmac.c 	if (chan->hw_cyclic && desc->cyclic && !desc->vdesc.tx.callback &&
chan              257 drivers/dma/dma-axi-dmac.c 	if (chan->hw_partial_xfer)
chan              266 drivers/dma/dma-axi-dmac.c static struct axi_dmac_desc *axi_dmac_active_desc(struct axi_dmac_chan *chan)
chan              268 drivers/dma/dma-axi-dmac.c 	return list_first_entry_or_null(&chan->active_descs,
chan              272 drivers/dma/dma-axi-dmac.c static inline unsigned int axi_dmac_total_sg_bytes(struct axi_dmac_chan *chan,
chan              275 drivers/dma/dma-axi-dmac.c 	if (chan->hw_2d)
chan              281 drivers/dma/dma-axi-dmac.c static void axi_dmac_dequeue_partial_xfers(struct axi_dmac_chan *chan)
chan              283 drivers/dma/dma-axi-dmac.c 	struct axi_dmac *dmac = chan_to_axi_dmac(chan);
chan              294 drivers/dma/dma-axi-dmac.c 		list_for_each_entry(desc, &chan->active_descs, vdesc.node) {
chan              327 drivers/dma/dma-axi-dmac.c static void axi_dmac_compute_residue(struct axi_dmac_chan *chan,
chan              344 drivers/dma/dma-axi-dmac.c 		total = axi_dmac_total_sg_bytes(chan, sg);
chan              349 drivers/dma/dma-axi-dmac.c static bool axi_dmac_transfer_done(struct axi_dmac_chan *chan,
chan              356 drivers/dma/dma-axi-dmac.c 	active = axi_dmac_active_desc(chan);
chan              360 drivers/dma/dma-axi-dmac.c 	if (chan->hw_partial_xfer &&
chan              362 drivers/dma/dma-axi-dmac.c 		axi_dmac_dequeue_partial_xfers(chan);
chan              378 drivers/dma/dma-axi-dmac.c 			axi_dmac_compute_residue(chan, active);
chan              390 drivers/dma/dma-axi-dmac.c 				active = axi_dmac_active_desc(chan);
chan              410 drivers/dma/dma-axi-dmac.c 	spin_lock(&dmac->chan.vchan.lock);
chan              416 drivers/dma/dma-axi-dmac.c 		start_next = axi_dmac_transfer_done(&dmac->chan, completed);
chan              420 drivers/dma/dma-axi-dmac.c 		axi_dmac_start_transfer(&dmac->chan);
chan              421 drivers/dma/dma-axi-dmac.c 	spin_unlock(&dmac->chan.vchan.lock);
chan              428 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              429 drivers/dma/dma-axi-dmac.c 	struct axi_dmac *dmac = chan_to_axi_dmac(chan);
chan              433 drivers/dma/dma-axi-dmac.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              435 drivers/dma/dma-axi-dmac.c 	chan->next_desc = NULL;
chan              436 drivers/dma/dma-axi-dmac.c 	vchan_get_all_descriptors(&chan->vchan, &head);
chan              437 drivers/dma/dma-axi-dmac.c 	list_splice_tail_init(&chan->active_descs, &head);
chan              438 drivers/dma/dma-axi-dmac.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              440 drivers/dma/dma-axi-dmac.c 	vchan_dma_desc_free_list(&chan->vchan, &head);
chan              447 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              449 drivers/dma/dma-axi-dmac.c 	vchan_synchronize(&chan->vchan);
chan              454 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              455 drivers/dma/dma-axi-dmac.c 	struct axi_dmac *dmac = chan_to_axi_dmac(chan);
chan              460 drivers/dma/dma-axi-dmac.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              461 drivers/dma/dma-axi-dmac.c 	if (vchan_issue_pending(&chan->vchan))
chan              462 drivers/dma/dma-axi-dmac.c 		axi_dmac_start_transfer(chan);
chan              463 drivers/dma/dma-axi-dmac.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              483 drivers/dma/dma-axi-dmac.c static struct axi_dmac_sg *axi_dmac_fill_linear_sg(struct axi_dmac_chan *chan,
chan              493 drivers/dma/dma-axi-dmac.c 	num_segments = DIV_ROUND_UP(period_len, chan->max_length);
chan              496 drivers/dma/dma-axi-dmac.c 	segment_size = ((segment_size - 1) | chan->length_align_mask) + 1;
chan              531 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              538 drivers/dma/dma-axi-dmac.c 	if (direction != chan->direction)
chan              543 drivers/dma/dma-axi-dmac.c 		num_sgs += DIV_ROUND_UP(sg_dma_len(sg), chan->max_length);
chan              552 drivers/dma/dma-axi-dmac.c 		if (!axi_dmac_check_addr(chan, sg_dma_address(sg)) ||
chan              553 drivers/dma/dma-axi-dmac.c 		    !axi_dmac_check_len(chan, sg_dma_len(sg))) {
chan              558 drivers/dma/dma-axi-dmac.c 		dsg = axi_dmac_fill_linear_sg(chan, direction, sg_dma_address(sg), 1,
chan              564 drivers/dma/dma-axi-dmac.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              572 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              576 drivers/dma/dma-axi-dmac.c 	if (direction != chan->direction)
chan              579 drivers/dma/dma-axi-dmac.c 	if (!axi_dmac_check_len(chan, buf_len) ||
chan              580 drivers/dma/dma-axi-dmac.c 	    !axi_dmac_check_addr(chan, buf_addr))
chan              587 drivers/dma/dma-axi-dmac.c 	num_segments = DIV_ROUND_UP(period_len, chan->max_length);
chan              593 drivers/dma/dma-axi-dmac.c 	axi_dmac_fill_linear_sg(chan, direction, buf_addr, num_periods,
chan              598 drivers/dma/dma-axi-dmac.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              605 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
chan              612 drivers/dma/dma-axi-dmac.c 	if (xt->dir != chan->direction)
chan              615 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_src_is_mem(chan)) {
chan              616 drivers/dma/dma-axi-dmac.c 		if (!xt->src_inc || !axi_dmac_check_addr(chan, xt->src_start))
chan              620 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_dest_is_mem(chan)) {
chan              621 drivers/dma/dma-axi-dmac.c 		if (!xt->dst_inc || !axi_dmac_check_addr(chan, xt->dst_start))
chan              628 drivers/dma/dma-axi-dmac.c 	if (chan->hw_2d) {
chan              629 drivers/dma/dma-axi-dmac.c 		if (!axi_dmac_check_len(chan, xt->sgl[0].size) ||
chan              632 drivers/dma/dma-axi-dmac.c 		if (xt->sgl[0].size + dst_icg > chan->max_length ||
chan              633 drivers/dma/dma-axi-dmac.c 		    xt->sgl[0].size + src_icg > chan->max_length)
chan              638 drivers/dma/dma-axi-dmac.c 		if (chan->max_length / xt->sgl[0].size < xt->numf)
chan              640 drivers/dma/dma-axi-dmac.c 		if (!axi_dmac_check_len(chan, xt->sgl[0].size * xt->numf))
chan              648 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_src_is_mem(chan)) {
chan              653 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_dest_is_mem(chan)) {
chan              658 drivers/dma/dma-axi-dmac.c 	if (chan->hw_2d) {
chan              669 drivers/dma/dma-axi-dmac.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              726 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan)
chan              744 drivers/dma/dma-axi-dmac.c 	chan->src_type = val;
chan              751 drivers/dma/dma-axi-dmac.c 	chan->dest_type = val;
chan              756 drivers/dma/dma-axi-dmac.c 	chan->src_width = val / 8;
chan              761 drivers/dma/dma-axi-dmac.c 	chan->dest_width = val / 8;
chan              763 drivers/dma/dma-axi-dmac.c 	chan->address_align_mask = max(chan->dest_width, chan->src_width) - 1;
chan              765 drivers/dma/dma-axi-dmac.c 	if (axi_dmac_dest_is_mem(chan) && axi_dmac_src_is_mem(chan))
chan              766 drivers/dma/dma-axi-dmac.c 		chan->direction = DMA_MEM_TO_MEM;
chan              767 drivers/dma/dma-axi-dmac.c 	else if (!axi_dmac_dest_is_mem(chan) && axi_dmac_src_is_mem(chan))
chan              768 drivers/dma/dma-axi-dmac.c 		chan->direction = DMA_MEM_TO_DEV;
chan              769 drivers/dma/dma-axi-dmac.c 	else if (axi_dmac_dest_is_mem(chan) && !axi_dmac_src_is_mem(chan))
chan              770 drivers/dma/dma-axi-dmac.c 		chan->direction = DMA_DEV_TO_MEM;
chan              772 drivers/dma/dma-axi-dmac.c 		chan->direction = DMA_DEV_TO_DEV;
chan              779 drivers/dma/dma-axi-dmac.c 	struct axi_dmac_chan *chan = &dmac->chan;
chan              786 drivers/dma/dma-axi-dmac.c 		chan->hw_cyclic = true;
chan              790 drivers/dma/dma-axi-dmac.c 		chan->hw_2d = true;
chan              793 drivers/dma/dma-axi-dmac.c 	chan->max_length = axi_dmac_read(dmac, AXI_DMAC_REG_X_LENGTH);
chan              794 drivers/dma/dma-axi-dmac.c 	if (chan->max_length != UINT_MAX)
chan              795 drivers/dma/dma-axi-dmac.c 		chan->max_length++;
chan              799 drivers/dma/dma-axi-dmac.c 	    chan->dest_type == AXI_DMAC_BUS_TYPE_AXI_MM) {
chan              807 drivers/dma/dma-axi-dmac.c 	    chan->src_type == AXI_DMAC_BUS_TYPE_AXI_MM) {
chan              814 drivers/dma/dma-axi-dmac.c 		chan->hw_partial_xfer = true;
chan              818 drivers/dma/dma-axi-dmac.c 		chan->length_align_mask =
chan              821 drivers/dma/dma-axi-dmac.c 		chan->length_align_mask = chan->address_align_mask;
chan              855 drivers/dma/dma-axi-dmac.c 	INIT_LIST_HEAD(&dmac->chan.active_descs);
chan              862 drivers/dma/dma-axi-dmac.c 		ret = axi_dmac_parse_chan_dt(of_chan, &dmac->chan);
chan              888 drivers/dma/dma-axi-dmac.c 	dma_dev->src_addr_widths = BIT(dmac->chan.src_width);
chan              889 drivers/dma/dma-axi-dmac.c 	dma_dev->dst_addr_widths = BIT(dmac->chan.dest_width);
chan              890 drivers/dma/dma-axi-dmac.c 	dma_dev->directions = BIT(dmac->chan.direction);
chan              894 drivers/dma/dma-axi-dmac.c 	dmac->chan.vchan.desc_free = axi_dmac_desc_free;
chan              895 drivers/dma/dma-axi-dmac.c 	vchan_init(&dmac->chan.vchan, dma_dev);
chan              905 drivers/dma/dma-axi-dmac.c 	dma_dev->copy_align = (dmac->chan.address_align_mask + 1);
chan              952 drivers/dma/dma-axi-dmac.c 	tasklet_kill(&dmac->chan.vchan.task);
chan              156 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan chan[];
chan              164 drivers/dma/dma-jz4780.c static inline struct jz4780_dma_chan *to_jz4780_dma_chan(struct dma_chan *chan)
chan              166 drivers/dma/dma-jz4780.c 	return container_of(chan, struct jz4780_dma_chan, vchan.chan);
chan              178 drivers/dma/dma-jz4780.c 	return container_of(jzchan->vchan.chan.device, struct jz4780_dma_dev,
chan              257 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(vdesc->tx.chan);
chan              354 drivers/dma/dma-jz4780.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len,
chan              358 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              399 drivers/dma/dma-jz4780.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              403 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              451 drivers/dma/dma-jz4780.c 	struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              454 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              553 drivers/dma/dma-jz4780.c static void jz4780_dma_issue_pending(struct dma_chan *chan)
chan              555 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              566 drivers/dma/dma-jz4780.c static int jz4780_dma_terminate_all(struct dma_chan *chan)
chan              568 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              592 drivers/dma/dma-jz4780.c static void jz4780_dma_synchronize(struct dma_chan *chan)
chan              594 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              601 drivers/dma/dma-jz4780.c static int jz4780_dma_config(struct dma_chan *chan,
chan              604 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              633 drivers/dma/dma-jz4780.c static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
chan              636 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              642 drivers/dma/dma-jz4780.c 	status = dma_cookie_status(chan, cookie, txstate);
chan              681 drivers/dma/dma-jz4780.c 		dev_warn(&jzchan->vchan.chan.dev->device,
chan              686 drivers/dma/dma-jz4780.c 		dev_warn(&jzchan->vchan.chan.dev->device,
chan              715 drivers/dma/dma-jz4780.c 		dev_err(&jzchan->vchan.chan.dev->device,
chan              735 drivers/dma/dma-jz4780.c 		if (jz4780_dma_chan_irq(jzdma, &jzdma->chan[i]))
chan              750 drivers/dma/dma-jz4780.c static int jz4780_dma_alloc_chan_resources(struct dma_chan *chan)
chan              752 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              754 drivers/dma/dma-jz4780.c 	jzchan->desc_pool = dma_pool_create(dev_name(&chan->dev->device),
chan              755 drivers/dma/dma-jz4780.c 					    chan->device->dev,
chan              759 drivers/dma/dma-jz4780.c 		dev_err(&chan->dev->device,
chan              767 drivers/dma/dma-jz4780.c static void jz4780_dma_free_chan_resources(struct dma_chan *chan)
chan              769 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              776 drivers/dma/dma-jz4780.c static bool jz4780_dma_filter_fn(struct dma_chan *chan, void *param)
chan              778 drivers/dma/dma-jz4780.c 	struct jz4780_dma_chan *jzchan = to_jz4780_dma_chan(chan);
chan              824 drivers/dma/dma-jz4780.c 		jzdma->chan[data.channel].transfer_type = data.transfer_type;
chan              827 drivers/dma/dma-jz4780.c 			&jzdma->chan[data.channel].vchan.chan);
chan              853 drivers/dma/dma-jz4780.c 	jzdma = devm_kzalloc(dev, struct_size(jzdma, chan,
chan              951 drivers/dma/dma-jz4780.c 		jzchan = &jzdma->chan[i];
chan              993 drivers/dma/dma-jz4780.c 		tasklet_kill(&jzdma->chan[i].vchan.task);
chan               74 drivers/dma/dmaengine.c 	return chan_dev->chan;
chan               80 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan               86 drivers/dma/dmaengine.c 	chan = dev_to_dma_chan(dev);
chan               87 drivers/dma/dmaengine.c 	if (chan) {
chan               89 drivers/dma/dmaengine.c 			count += per_cpu_ptr(chan->local, i)->memcpy_count;
chan              102 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              108 drivers/dma/dmaengine.c 	chan = dev_to_dma_chan(dev);
chan              109 drivers/dma/dmaengine.c 	if (chan) {
chan              111 drivers/dma/dmaengine.c 			count += per_cpu_ptr(chan->local, i)->bytes_transferred;
chan              124 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              128 drivers/dma/dmaengine.c 	chan = dev_to_dma_chan(dev);
chan              129 drivers/dma/dmaengine.c 	if (chan)
chan              130 drivers/dma/dmaengine.c 		err = sprintf(buf, "%d\n", chan->client_count);
chan              180 drivers/dma/dmaengine.c static struct module *dma_chan_to_owner(struct dma_chan *chan)
chan              182 drivers/dma/dmaengine.c 	return chan->device->owner;
chan              191 drivers/dma/dmaengine.c static void balance_ref_count(struct dma_chan *chan)
chan              193 drivers/dma/dmaengine.c 	struct module *owner = dma_chan_to_owner(chan);
chan              195 drivers/dma/dmaengine.c 	while (chan->client_count < dmaengine_ref_count) {
chan              197 drivers/dma/dmaengine.c 		chan->client_count++;
chan              207 drivers/dma/dmaengine.c static int dma_chan_get(struct dma_chan *chan)
chan              209 drivers/dma/dmaengine.c 	struct module *owner = dma_chan_to_owner(chan);
chan              213 drivers/dma/dmaengine.c 	if (chan->client_count) {
chan              222 drivers/dma/dmaengine.c 	if (chan->device->device_alloc_chan_resources) {
chan              223 drivers/dma/dmaengine.c 		ret = chan->device->device_alloc_chan_resources(chan);
chan              228 drivers/dma/dmaengine.c 	if (!dma_has_cap(DMA_PRIVATE, chan->device->cap_mask))
chan              229 drivers/dma/dmaengine.c 		balance_ref_count(chan);
chan              232 drivers/dma/dmaengine.c 	chan->client_count++;
chan              246 drivers/dma/dmaengine.c static void dma_chan_put(struct dma_chan *chan)
chan              249 drivers/dma/dmaengine.c 	if (!chan->client_count)
chan              252 drivers/dma/dmaengine.c 	chan->client_count--;
chan              253 drivers/dma/dmaengine.c 	module_put(dma_chan_to_owner(chan));
chan              256 drivers/dma/dmaengine.c 	if (!chan->client_count && chan->device->device_free_chan_resources) {
chan              258 drivers/dma/dmaengine.c 		dmaengine_synchronize(chan);
chan              259 drivers/dma/dmaengine.c 		chan->device->device_free_chan_resources(chan);
chan              263 drivers/dma/dmaengine.c 	if (chan->router && chan->router->route_free) {
chan              264 drivers/dma/dmaengine.c 		chan->router->route_free(chan->router->dev, chan->route_data);
chan              265 drivers/dma/dmaengine.c 		chan->router = NULL;
chan              266 drivers/dma/dmaengine.c 		chan->route_data = NULL;
chan              270 drivers/dma/dmaengine.c enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
chan              275 drivers/dma/dmaengine.c 	dma_async_issue_pending(chan);
chan              277 drivers/dma/dmaengine.c 		status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
chan              279 drivers/dma/dmaengine.c 			dev_err(chan->device->dev, "%s: timeout!\n", __func__);
chan              301 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              348 drivers/dma/dmaengine.c 	return this_cpu_read(channel_table[tx_type]->chan);
chan              358 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              364 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node)
chan              365 drivers/dma/dmaengine.c 			if (chan->client_count)
chan              366 drivers/dma/dmaengine.c 				device->device_issue_pending(chan);
chan              375 drivers/dma/dmaengine.c static bool dma_chan_is_local(struct dma_chan *chan, int cpu)
chan              377 drivers/dma/dmaengine.c 	int node = dev_to_node(chan->device->dev);
chan              395 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              403 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node) {
chan              404 drivers/dma/dmaengine.c 			if (!chan->client_count)
chan              406 drivers/dma/dmaengine.c 			if (!min || chan->table_count < min->table_count)
chan              407 drivers/dma/dmaengine.c 				min = chan;
chan              409 drivers/dma/dmaengine.c 			if (dma_chan_is_local(chan, cpu))
chan              411 drivers/dma/dmaengine.c 				    chan->table_count < localmin->table_count)
chan              412 drivers/dma/dmaengine.c 					localmin = chan;
chan              416 drivers/dma/dmaengine.c 	chan = localmin ? localmin : min;
chan              418 drivers/dma/dmaengine.c 	if (chan)
chan              419 drivers/dma/dmaengine.c 		chan->table_count++;
chan              421 drivers/dma/dmaengine.c 	return chan;
chan              434 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              442 drivers/dma/dmaengine.c 			per_cpu_ptr(channel_table[cap], cpu)->chan = NULL;
chan              447 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node)
chan              448 drivers/dma/dmaengine.c 			chan->table_count = 0;
chan              458 drivers/dma/dmaengine.c 			chan = min_chan(cap, cpu);
chan              459 drivers/dma/dmaengine.c 			per_cpu_ptr(channel_table[cap], cpu)->chan = chan;
chan              463 drivers/dma/dmaengine.c int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
chan              467 drivers/dma/dmaengine.c 	if (!chan || !caps)
chan              470 drivers/dma/dmaengine.c 	device = chan->device;
chan              503 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              513 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &dev->channels, device_node) {
chan              515 drivers/dma/dmaengine.c 			if (chan->client_count)
chan              519 drivers/dma/dmaengine.c 	list_for_each_entry(chan, &dev->channels, device_node) {
chan              520 drivers/dma/dmaengine.c 		if (chan->client_count) {
chan              522 drivers/dma/dmaengine.c 				 __func__, dma_chan_name(chan));
chan              525 drivers/dma/dmaengine.c 		if (fn && !fn(chan, fn_param)) {
chan              527 drivers/dma/dmaengine.c 				 __func__, dma_chan_name(chan));
chan              530 drivers/dma/dmaengine.c 		return chan;
chan              540 drivers/dma/dmaengine.c 	struct dma_chan *chan = private_candidate(mask, device, fn, fn_param);
chan              543 drivers/dma/dmaengine.c 	if (chan) {
chan              551 drivers/dma/dmaengine.c 		err = dma_chan_get(chan);
chan              556 drivers/dma/dmaengine.c 					__func__, dma_chan_name(chan));
chan              561 drivers/dma/dmaengine.c 					 __func__, dma_chan_name(chan), err);
chan              566 drivers/dma/dmaengine.c 			chan = ERR_PTR(err);
chan              570 drivers/dma/dmaengine.c 	return chan ? chan : ERR_PTR(-EPROBE_DEFER);
chan              577 drivers/dma/dmaengine.c struct dma_chan *dma_get_slave_channel(struct dma_chan *chan)
chan              584 drivers/dma/dmaengine.c 	if (chan->client_count == 0) {
chan              585 drivers/dma/dmaengine.c 		struct dma_device *device = chan->device;
chan              589 drivers/dma/dmaengine.c 		err = dma_chan_get(chan);
chan              591 drivers/dma/dmaengine.c 			dev_dbg(chan->device->dev,
chan              593 drivers/dma/dmaengine.c 				__func__, dma_chan_name(chan), err);
chan              594 drivers/dma/dmaengine.c 			chan = NULL;
chan              599 drivers/dma/dmaengine.c 		chan = NULL;
chan              604 drivers/dma/dmaengine.c 	return chan;
chan              611 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              619 drivers/dma/dmaengine.c 	chan = find_candidate(device, &mask, NULL, NULL);
chan              623 drivers/dma/dmaengine.c 	return IS_ERR(chan) ? NULL : chan;
chan              641 drivers/dma/dmaengine.c 	struct dma_chan *chan = NULL;
chan              650 drivers/dma/dmaengine.c 		chan = find_candidate(device, mask, fn, fn_param);
chan              651 drivers/dma/dmaengine.c 		if (!IS_ERR(chan))
chan              654 drivers/dma/dmaengine.c 		chan = NULL;
chan              660 drivers/dma/dmaengine.c 		 chan ? "success" : "fail",
chan              661 drivers/dma/dmaengine.c 		 chan ? dma_chan_name(chan) : NULL);
chan              663 drivers/dma/dmaengine.c 	return chan;
chan              697 drivers/dma/dmaengine.c 	struct dma_chan *chan = NULL;
chan              701 drivers/dma/dmaengine.c 		chan = of_dma_request_slave_channel(dev->of_node, name);
chan              704 drivers/dma/dmaengine.c 	if (has_acpi_companion(dev) && !chan)
chan              705 drivers/dma/dmaengine.c 		chan = acpi_dma_request_slave_chan_by_name(dev, name);
chan              707 drivers/dma/dmaengine.c 	if (chan) {
chan              709 drivers/dma/dmaengine.c 		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
chan              710 drivers/dma/dmaengine.c 			return chan;
chan              725 drivers/dma/dmaengine.c 		chan = find_candidate(d, &mask, d->filter.fn, map->param);
chan              726 drivers/dma/dmaengine.c 		if (!IS_ERR(chan))
chan              731 drivers/dma/dmaengine.c 	return chan ? chan : ERR_PTR(-EPROBE_DEFER);
chan              761 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              766 drivers/dma/dmaengine.c 	chan = __dma_request_channel(mask, NULL, NULL, NULL);
chan              767 drivers/dma/dmaengine.c 	if (!chan) {
chan              770 drivers/dma/dmaengine.c 			chan = ERR_PTR(-EPROBE_DEFER);
chan              772 drivers/dma/dmaengine.c 			chan = ERR_PTR(-ENODEV);
chan              776 drivers/dma/dmaengine.c 	return chan;
chan              780 drivers/dma/dmaengine.c void dma_release_channel(struct dma_chan *chan)
chan              783 drivers/dma/dmaengine.c 	WARN_ONCE(chan->client_count != 1,
chan              784 drivers/dma/dmaengine.c 		  "chan reference count %d != 1\n", chan->client_count);
chan              785 drivers/dma/dmaengine.c 	dma_chan_put(chan);
chan              787 drivers/dma/dmaengine.c 	if (--chan->device->privatecnt == 0)
chan              788 drivers/dma/dmaengine.c 		dma_cap_clear(DMA_PRIVATE, chan->device->cap_mask);
chan              799 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              809 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node) {
chan              810 drivers/dma/dmaengine.c 			err = dma_chan_get(chan);
chan              816 drivers/dma/dmaengine.c 				dev_dbg(chan->device->dev,
chan              818 drivers/dma/dmaengine.c 					__func__, dma_chan_name(chan), err);
chan              838 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan              847 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node)
chan              848 drivers/dma/dmaengine.c 			dma_chan_put(chan);
chan              910 drivers/dma/dmaengine.c 	struct dma_chan* chan;
chan             1017 drivers/dma/dmaengine.c 	list_for_each_entry(chan, &device->channels, device_node) {
chan             1019 drivers/dma/dmaengine.c 		chan->local = alloc_percpu(typeof(*chan->local));
chan             1020 drivers/dma/dmaengine.c 		if (chan->local == NULL)
chan             1022 drivers/dma/dmaengine.c 		chan->dev = kzalloc(sizeof(*chan->dev), GFP_KERNEL);
chan             1023 drivers/dma/dmaengine.c 		if (chan->dev == NULL) {
chan             1024 drivers/dma/dmaengine.c 			free_percpu(chan->local);
chan             1025 drivers/dma/dmaengine.c 			chan->local = NULL;
chan             1029 drivers/dma/dmaengine.c 		chan->chan_id = chancnt++;
chan             1030 drivers/dma/dmaengine.c 		chan->dev->device.class = &dma_devclass;
chan             1031 drivers/dma/dmaengine.c 		chan->dev->device.parent = device->dev;
chan             1032 drivers/dma/dmaengine.c 		chan->dev->chan = chan;
chan             1033 drivers/dma/dmaengine.c 		chan->dev->idr_ref = idr_ref;
chan             1034 drivers/dma/dmaengine.c 		chan->dev->dev_id = device->dev_id;
chan             1036 drivers/dma/dmaengine.c 		dev_set_name(&chan->dev->device, "dma%dchan%d",
chan             1037 drivers/dma/dmaengine.c 			     device->dev_id, chan->chan_id);
chan             1039 drivers/dma/dmaengine.c 		rc = device_register(&chan->dev->device);
chan             1041 drivers/dma/dmaengine.c 			free_percpu(chan->local);
chan             1042 drivers/dma/dmaengine.c 			chan->local = NULL;
chan             1043 drivers/dma/dmaengine.c 			kfree(chan->dev);
chan             1047 drivers/dma/dmaengine.c 		chan->client_count = 0;
chan             1061 drivers/dma/dmaengine.c 		list_for_each_entry(chan, &device->channels, device_node) {
chan             1065 drivers/dma/dmaengine.c 			if (dma_chan_get(chan) == -ENODEV) {
chan             1091 drivers/dma/dmaengine.c 	list_for_each_entry(chan, &device->channels, device_node) {
chan             1092 drivers/dma/dmaengine.c 		if (chan->local == NULL)
chan             1095 drivers/dma/dmaengine.c 		chan->dev->chan = NULL;
chan             1097 drivers/dma/dmaengine.c 		device_unregister(&chan->dev->device);
chan             1098 drivers/dma/dmaengine.c 		free_percpu(chan->local);
chan             1113 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan             1120 drivers/dma/dmaengine.c 	list_for_each_entry(chan, &device->channels, device_node) {
chan             1121 drivers/dma/dmaengine.c 		WARN_ONCE(chan->client_count,
chan             1123 drivers/dma/dmaengine.c 			  __func__, chan->client_count);
chan             1125 drivers/dma/dmaengine.c 		chan->dev->chan = NULL;
chan             1127 drivers/dma/dmaengine.c 		device_unregister(&chan->dev->device);
chan             1128 drivers/dma/dmaengine.c 		free_percpu(chan->local);
chan             1298 drivers/dma/dmaengine.c 	struct dma_chan *chan)
chan             1300 drivers/dma/dmaengine.c 	tx->chan = chan;
chan             1320 drivers/dma/dmaengine.c 			dev_err(tx->chan->device->dev,
chan             1327 drivers/dma/dmaengine.c 	return dma_sync_wait(tx->chan, tx->cookie);
chan             1339 drivers/dma/dmaengine.c 	struct dma_chan *chan;
chan             1346 drivers/dma/dmaengine.c 	chan = dep->chan;
chan             1356 drivers/dma/dmaengine.c 		if (dep_next && dep_next->chan == chan)
chan             1365 drivers/dma/dmaengine.c 	chan->device->device_issue_pending(chan);
chan               16 drivers/dma/dmaengine.h static inline void dma_cookie_init(struct dma_chan *chan)
chan               18 drivers/dma/dmaengine.h 	chan->cookie = DMA_MIN_COOKIE;
chan               19 drivers/dma/dmaengine.h 	chan->completed_cookie = DMA_MIN_COOKIE;
chan               31 drivers/dma/dmaengine.h 	struct dma_chan *chan = tx->chan;
chan               34 drivers/dma/dmaengine.h 	cookie = chan->cookie + 1;
chan               37 drivers/dma/dmaengine.h 	tx->cookie = chan->cookie = cookie;
chan               55 drivers/dma/dmaengine.h 	tx->chan->completed_cookie = tx->cookie;
chan               68 drivers/dma/dmaengine.h static inline enum dma_status dma_cookie_status(struct dma_chan *chan,
chan               73 drivers/dma/dmaengine.h 	used = chan->cookie;
chan               74 drivers/dma/dmaengine.h 	complete = chan->completed_cookie;
chan              216 drivers/dma/dmatest.c 	struct dma_chan		*chan;
chan              228 drivers/dma/dmatest.c 	struct dma_chan		*chan;
chan              286 drivers/dma/dmatest.c 		struct dma_chan *chan)
chan              290 drivers/dma/dmatest.c 	return strcmp(dma_chan_name(chan), params->channel) == 0;
chan              558 drivers/dma/dmatest.c 	struct dma_chan		*chan;
chan              591 drivers/dma/dmatest.c 	chan = thread->chan;
chan              592 drivers/dma/dmatest.c 	dev = chan->device;
chan              762 drivers/dma/dmatest.c 			tx = dev->device_prep_dma_memcpy(chan,
chan              766 drivers/dma/dmatest.c 			tx = dev->device_prep_dma_memset(chan,
chan              771 drivers/dma/dmatest.c 			tx = dev->device_prep_dma_xor(chan,
chan              778 drivers/dma/dmatest.c 			tx = dev->device_prep_dma_pq(chan, dma_pq, srcs,
chan              805 drivers/dma/dmatest.c 			status = dma_sync_wait(chan, cookie);
chan              806 drivers/dma/dmatest.c 			dmaengine_terminate_sync(chan);
chan              810 drivers/dma/dmatest.c 			dma_async_issue_pending(chan);
chan              816 drivers/dma/dmatest.c 			status = dma_async_is_tx_complete(chan, cookie, NULL,
chan              905 drivers/dma/dmatest.c 		dmaengine_terminate_sync(chan);
chan              929 drivers/dma/dmatest.c 	dmaengine_terminate_sync(dtc->chan);
chan              939 drivers/dma/dmatest.c 	struct dma_chan *chan = dtc->chan;
chan              958 drivers/dma/dmatest.c 				dma_chan_name(chan), op, i);
chan              962 drivers/dma/dmatest.c 		thread->chan = dtc->chan;
chan              968 drivers/dma/dmatest.c 				dma_chan_name(chan), op, i);
chan              971 drivers/dma/dmatest.c 				dma_chan_name(chan), op, i);
chan              986 drivers/dma/dmatest.c 		struct dma_chan *chan)
chan              989 drivers/dma/dmatest.c 	struct dma_device	*dma_dev = chan->device;
chan              995 drivers/dma/dmatest.c 		pr_warn("No memory for %s\n", dma_chan_name(chan));
chan              999 drivers/dma/dmatest.c 	dtc->chan = chan;
chan             1026 drivers/dma/dmatest.c 		thread_count, dma_chan_name(chan));
chan             1034 drivers/dma/dmatest.c static bool filter(struct dma_chan *chan, void *param)
chan             1038 drivers/dma/dmatest.c 	if (!dmatest_match_channel(params, chan) ||
chan             1039 drivers/dma/dmatest.c 	    !dmatest_match_device(params, chan->device))
chan             1054 drivers/dma/dmatest.c 		struct dma_chan *chan;
chan             1056 drivers/dma/dmatest.c 		chan = dma_request_channel(mask, filter, params);
chan             1057 drivers/dma/dmatest.c 		if (chan) {
chan             1058 drivers/dma/dmatest.c 			if (dmatest_add_channel(info, chan)) {
chan             1059 drivers/dma/dmatest.c 				dma_release_channel(chan);
chan             1110 drivers/dma/dmatest.c 			thread_count, dma_chan_name(dtc->chan));
chan             1117 drivers/dma/dmatest.c 	struct dma_chan *chan;
chan             1121 drivers/dma/dmatest.c 		chan = dtc->chan;
chan             1123 drivers/dma/dmatest.c 		pr_debug("dropped channel %s\n", dma_chan_name(chan));
chan             1124 drivers/dma/dmatest.c 		dma_release_channel(chan);
chan             1202 drivers/dma/dmatest.c 			if (strcmp(dma_chan_name(dtc->chan),
chan             1208 drivers/dma/dmatest.c 					dma_chan_name(dtc->chan),
chan             1221 drivers/dma/dmatest.c 	if (dtc->chan) {
chan             1228 drivers/dma/dmatest.c 		if ((strcmp(dma_chan_name(dtc->chan), strim(test_channel)) != 0)
chan             1231 drivers/dma/dmatest.c 			strlcpy(chan_reset_val, dma_chan_name(dtc->chan),
chan             1282 drivers/dma/dmatest.c 			thread_count, dma_chan_name(dtc->chan));
chan               56 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_chan_iowrite32(struct axi_dma_chan *chan, u32 reg, u32 val)
chan               58 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	iowrite32(val, chan->chan_regs + reg);
chan               61 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline u32 axi_chan_ioread32(struct axi_dma_chan *chan, u32 reg)
chan               63 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	return ioread32(chan->chan_regs + reg);
chan               67 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_chan_iowrite64(struct axi_dma_chan *chan, u32 reg, u64 val)
chan               73 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	iowrite32(lower_32_bits(val), chan->chan_regs + reg);
chan               74 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	iowrite32(upper_32_bits(val), chan->chan_regs + reg + 4);
chan              113 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_irq_disable(struct axi_dma_chan *chan, u32 irq_mask)
chan              118 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_iowrite32(chan, CH_INTSTATUS_ENA, DWAXIDMAC_IRQ_NONE);
chan              120 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		val = axi_chan_ioread32(chan, CH_INTSTATUS_ENA);
chan              122 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_iowrite32(chan, CH_INTSTATUS_ENA, val);
chan              126 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_irq_set(struct axi_dma_chan *chan, u32 irq_mask)
chan              128 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite32(chan, CH_INTSTATUS_ENA, irq_mask);
chan              131 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_irq_sig_set(struct axi_dma_chan *chan, u32 irq_mask)
chan              133 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite32(chan, CH_INTSIGNAL_ENA, irq_mask);
chan              136 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_irq_clear(struct axi_dma_chan *chan, u32 irq_mask)
chan              138 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite32(chan, CH_INTCLEAR, irq_mask);
chan              141 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline u32 axi_chan_irq_read(struct axi_dma_chan *chan)
chan              143 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	return axi_chan_ioread32(chan, CH_INTSTATUS);
chan              146 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_disable(struct axi_dma_chan *chan)
chan              150 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val = axi_dma_ioread32(chan->chip, DMAC_CHEN);
chan              151 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val &= ~(BIT(chan->id) << DMAC_CHAN_EN_SHIFT);
chan              152 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val |=   BIT(chan->id) << DMAC_CHAN_EN_WE_SHIFT;
chan              153 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_dma_iowrite32(chan->chip, DMAC_CHEN, val);
chan              156 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_enable(struct axi_dma_chan *chan)
chan              160 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val = axi_dma_ioread32(chan->chip, DMAC_CHEN);
chan              161 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val |= BIT(chan->id) << DMAC_CHAN_EN_SHIFT |
chan              162 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	       BIT(chan->id) << DMAC_CHAN_EN_WE_SHIFT;
chan              163 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_dma_iowrite32(chan->chip, DMAC_CHEN, val);
chan              166 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline bool axi_chan_is_hw_enable(struct axi_dma_chan *chan)
chan              170 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val = axi_dma_ioread32(chan->chip, DMAC_CHEN);
chan              172 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	return !!(val & (BIT(chan->id) << DMAC_CHAN_EN_SHIFT));
chan              180 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
chan              181 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_disable(&chip->dw->chan[i]);
chan              185 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static u32 axi_chan_get_xfer_width(struct axi_dma_chan *chan, dma_addr_t src,
chan              188 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	u32 max_width = chan->chip->dw->hdata->m_data_width;
chan              193 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline const char *axi_chan_name(struct axi_dma_chan *chan)
chan              195 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	return dma_chan_name(&chan->vc.chan);
chan              198 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static struct axi_dma_desc *axi_desc_get(struct axi_dma_chan *chan)
chan              200 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct dw_axi_dma *dw = chan->chip->dw;
chan              206 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		dev_err(chan2dev(chan), "%s: not enough descriptors available\n",
chan              207 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan));
chan              211 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	atomic_inc(&chan->descs_allocated);
chan              214 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	desc->chan = chan;
chan              221 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = desc->chan;
chan              222 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct dw_axi_dma *dw = chan->chip->dw;
chan              235 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	atomic_sub(descs_put, &chan->descs_allocated);
chan              236 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_vdbg(chan2dev(chan), "%s: %d descs put, %d still allocated\n",
chan              237 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_name(chan), descs_put,
chan              238 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		atomic_read(&chan->descs_allocated));
chan              250 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              255 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (chan->is_paused && ret == DMA_IN_PROGRESS)
chan              266 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void write_chan_llp(struct axi_dma_chan *chan, dma_addr_t adr)
chan              268 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite64(chan, CH_LLP, adr);
chan              272 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void axi_chan_block_xfer_start(struct axi_dma_chan *chan,
chan              275 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	u32 priority = chan->chip->dw->hdata->priority[chan->id];
chan              279 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (unlikely(axi_chan_is_hw_enable(chan))) {
chan              280 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		dev_err(chan2dev(chan), "%s is non-idle!\n",
chan              281 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan));
chan              286 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_dma_enable(chan->chip);
chan              290 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite32(chan, CH_CFG_L, reg);
chan              296 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_iowrite32(chan, CH_CFG_H, reg);
chan              298 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	write_chan_llp(chan, first->vd.tx.phys | lms);
chan              301 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_irq_sig_set(chan, irq_mask);
chan              305 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_irq_set(chan, irq_mask);
chan              307 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_enable(chan);
chan              310 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void axi_chan_start_first_queued(struct axi_dma_chan *chan)
chan              315 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vd = vchan_next_desc(&chan->vc);
chan              320 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_vdbg(chan2dev(chan), "%s: started %u\n", axi_chan_name(chan),
chan              322 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_block_xfer_start(chan, desc);
chan              327 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              330 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              331 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (vchan_issue_pending(&chan->vc))
chan              332 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_start_first_queued(chan);
chan              333 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              338 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              341 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (axi_chan_is_hw_enable(chan)) {
chan              342 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		dev_err(chan2dev(chan), "%s is non-idle!\n",
chan              343 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan));
chan              347 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_vdbg(dchan2dev(dchan), "%s: allocating\n", axi_chan_name(chan));
chan              349 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	pm_runtime_get(chan->chip->dev);
chan              356 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              359 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (axi_chan_is_hw_enable(chan))
chan              361 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan));
chan              363 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_disable(chan);
chan              364 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_irq_disable(chan, DWAXIDMAC_IRQ_ALL);
chan              366 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vchan_free_chan_resources(&chan->vc);
chan              370 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		 axi_chan_name(chan), atomic_read(&chan->descs_allocated));
chan              372 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	pm_runtime_put(chan->chip->dev);
chan              416 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (desc->chan->chip->dw->hdata->nr_masters > 1)
chan              429 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              434 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_dbg(chan2dev(chan), "%s: memcpy: src: %pad dst: %pad length: %zd flags: %#lx",
chan              435 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_name(chan), &src_adr, &dst_adr, len, flags);
chan              437 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
chan              447 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		xfer_width = axi_chan_get_xfer_width(chan, src_adr, dst_adr, xfer_len);
chan              460 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		desc = axi_desc_get(chan);
chan              469 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		if (chan->chip->dw->hdata->restrict_axi_burst_len) {
chan              470 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			u32 burst_len = chan->chip->dw->hdata->axi_rw_burst_len;
chan              512 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	return vchan_tx_prep(&chan->vc, &first->vd, flags);
chan              520 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void axi_chan_dump_lli(struct axi_dma_chan *chan,
chan              523 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_err(dchan2dev(&chan->vc.chan),
chan              533 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void axi_chan_list_dump_lli(struct axi_dma_chan *chan,
chan              538 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_dump_lli(chan, desc_head);
chan              540 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_dump_lli(chan, desc);
chan              543 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static noinline void axi_chan_handle_err(struct axi_dma_chan *chan, u32 status)
chan              548 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              550 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_disable(chan);
chan              553 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vd = vchan_next_desc(&chan->vc);
chan              558 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_err(chan2dev(chan),
chan              560 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_name(chan), vd->tx.cookie, status);
chan              561 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_list_dump_lli(chan, vd_to_axi_desc(vd));
chan              566 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_start_first_queued(chan);
chan              568 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              571 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
chan              576 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              577 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (unlikely(axi_chan_is_hw_enable(chan))) {
chan              578 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		dev_err(chan2dev(chan), "BUG: %s caught DWAXIDMAC_IRQ_DMA_TRF, but channel not idle!\n",
chan              579 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan));
chan              580 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_disable(chan);
chan              584 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vd = vchan_next_desc(&chan->vc);
chan              590 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_start_first_queued(chan);
chan              592 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              599 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan;
chan              608 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		chan = &dw->chan[i];
chan              609 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		status = axi_chan_irq_read(chan);
chan              610 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_irq_clear(chan, status);
chan              613 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_name(chan), i, status);
chan              616 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_handle_err(chan, status);
chan              618 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			axi_chan_block_xfer_complete(chan);
chan              629 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              633 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              635 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_disable(chan);
chan              637 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vchan_get_all_descriptors(&chan->vc, &head);
chan              643 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	vchan_dma_desc_free_list(&chan->vc, &head);
chan              645 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              647 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dev_vdbg(dchan2dev(dchan), "terminated: %s\n", axi_chan_name(chan));
chan              654 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              659 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              661 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val = axi_dma_ioread32(chan->chip, DMAC_CHEN);
chan              662 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val |= BIT(chan->id) << DMAC_CHAN_SUSP_SHIFT |
chan              663 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	       BIT(chan->id) << DMAC_CHAN_SUSP_WE_SHIFT;
chan              664 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_dma_iowrite32(chan->chip, DMAC_CHEN, val);
chan              667 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		if (axi_chan_irq_read(chan) & DWAXIDMAC_IRQ_SUSPENDED)
chan              673 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_chan_irq_clear(chan, DWAXIDMAC_IRQ_SUSPENDED);
chan              675 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	chan->is_paused = true;
chan              677 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              683 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c static inline void axi_chan_resume(struct axi_dma_chan *chan)
chan              687 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val = axi_dma_ioread32(chan->chip, DMAC_CHEN);
chan              688 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val &= ~(BIT(chan->id) << DMAC_CHAN_SUSP_SHIFT);
chan              689 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	val |=  (BIT(chan->id) << DMAC_CHAN_SUSP_WE_SHIFT);
chan              690 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	axi_dma_iowrite32(chan->chip, DMAC_CHEN, val);
chan              692 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	chan->is_paused = false;
chan              697 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
chan              700 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              702 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (chan->is_paused)
chan              703 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_resume(chan);
chan              705 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              867 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	dw->chan = devm_kcalloc(chip->dev, hdata->nr_channels,
chan              868 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 				sizeof(*dw->chan), GFP_KERNEL);
chan              869 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	if (!dw->chan)
chan              887 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		struct axi_dma_chan *chan = &dw->chan[i];
chan              889 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		chan->chip = chip;
chan              890 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		chan->id = i;
chan              891 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		chan->chan_regs = chip->regs + COMMON_REG_LEN + i * CHAN_REG_LEN;
chan              892 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		atomic_set(&chan->descs_allocated, 0);
chan              894 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		chan->vc.desc_free = vchan_desc_put;
chan              895 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		vchan_init(&chan->vc, &dw->dma);
chan              957 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	struct axi_dma_chan *chan, *_chan;
chan              965 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_disable(&chip->dw->chan[i]);
chan              966 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		axi_chan_irq_disable(&chip->dw->chan[i], DWAXIDMAC_IRQ_ALL);
chan              975 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 	list_for_each_entry_safe(chan, _chan, &dw->dma.channels,
chan              976 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 			vc.chan.device_node) {
chan              977 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		list_del(&chan->vc.chan.device_node);
chan              978 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c 		tasklet_kill(&chan->vc.task);
chan               54 drivers/dma/dw-axi-dmac/dw-axi-dmac.h 	struct axi_dma_chan	*chan;
chan               87 drivers/dma/dw-axi-dmac/dw-axi-dmac.h 	struct axi_dma_chan		*chan;
chan               96 drivers/dma/dw-axi-dmac/dw-axi-dmac.h static inline struct device *chan2dev(struct axi_dma_chan *chan)
chan               98 drivers/dma/dw-axi-dmac/dw-axi-dmac.h 	return &chan->vc.chan.dev->device;
chan               31 drivers/dma/dw-edma/dw-edma-core.c struct device *chan2dev(struct dw_edma_chan *chan)
chan               33 drivers/dma/dw-edma/dw-edma-core.c 	return &chan->vc.chan.dev->device;
chan               66 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = desc->chan;
chan               67 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma *dw = chan->chip->dw;
chan               75 drivers/dma/dw-edma/dw-edma-core.c 	chunk->chan = chan;
chan               83 drivers/dma/dw-edma/dw-edma-core.c 	chunk->ll_region.paddr = dw->ll_region.paddr + chan->ll_off;
chan               84 drivers/dma/dw-edma/dw-edma-core.c 	chunk->ll_region.vaddr = dw->ll_region.vaddr + chan->ll_off;
chan              104 drivers/dma/dw-edma/dw-edma-core.c static struct dw_edma_desc *dw_edma_alloc_desc(struct dw_edma_chan *chan)
chan              112 drivers/dma/dw-edma/dw-edma-core.c 	desc->chan = chan;
chan              168 drivers/dma/dw-edma/dw-edma-core.c static void dw_edma_start_transfer(struct dw_edma_chan *chan)
chan              174 drivers/dma/dw-edma/dw-edma-core.c 	vd = vchan_next_desc(&chan->vc);
chan              198 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              200 drivers/dma/dw-edma/dw-edma-core.c 	memcpy(&chan->config, config, sizeof(*config));
chan              201 drivers/dma/dw-edma/dw-edma-core.c 	chan->configured = true;
chan              208 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              211 drivers/dma/dw-edma/dw-edma-core.c 	if (!chan->configured)
chan              213 drivers/dma/dw-edma/dw-edma-core.c 	else if (chan->status != EDMA_ST_BUSY)
chan              215 drivers/dma/dw-edma/dw-edma-core.c 	else if (chan->request != EDMA_REQ_NONE)
chan              218 drivers/dma/dw-edma/dw-edma-core.c 		chan->request = EDMA_REQ_PAUSE;
chan              225 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              228 drivers/dma/dw-edma/dw-edma-core.c 	if (!chan->configured) {
chan              230 drivers/dma/dw-edma/dw-edma-core.c 	} else if (chan->status != EDMA_ST_PAUSE) {
chan              232 drivers/dma/dw-edma/dw-edma-core.c 	} else if (chan->request != EDMA_REQ_NONE) {
chan              235 drivers/dma/dw-edma/dw-edma-core.c 		chan->status = EDMA_ST_BUSY;
chan              236 drivers/dma/dw-edma/dw-edma-core.c 		dw_edma_start_transfer(chan);
chan              244 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              248 drivers/dma/dw-edma/dw-edma-core.c 	if (!chan->configured) {
chan              250 drivers/dma/dw-edma/dw-edma-core.c 	} else if (chan->status == EDMA_ST_PAUSE) {
chan              251 drivers/dma/dw-edma/dw-edma-core.c 		chan->status = EDMA_ST_IDLE;
chan              252 drivers/dma/dw-edma/dw-edma-core.c 		chan->configured = false;
chan              253 drivers/dma/dw-edma/dw-edma-core.c 	} else if (chan->status == EDMA_ST_IDLE) {
chan              254 drivers/dma/dw-edma/dw-edma-core.c 		chan->configured = false;
chan              255 drivers/dma/dw-edma/dw-edma-core.c 	} else if (dw_edma_v0_core_ch_status(chan) == DMA_COMPLETE) {
chan              260 drivers/dma/dw-edma/dw-edma-core.c 		chan->status = EDMA_ST_IDLE;
chan              261 drivers/dma/dw-edma/dw-edma-core.c 		chan->configured = false;
chan              262 drivers/dma/dw-edma/dw-edma-core.c 	} else if (chan->request > EDMA_REQ_PAUSE) {
chan              265 drivers/dma/dw-edma/dw-edma-core.c 		chan->request = EDMA_REQ_STOP;
chan              273 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              276 drivers/dma/dw-edma/dw-edma-core.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              277 drivers/dma/dw-edma/dw-edma-core.c 	if (chan->configured && chan->request == EDMA_REQ_NONE &&
chan              278 drivers/dma/dw-edma/dw-edma-core.c 	    chan->status == EDMA_ST_IDLE && vchan_issue_pending(&chan->vc)) {
chan              279 drivers/dma/dw-edma/dw-edma-core.c 		chan->status = EDMA_ST_BUSY;
chan              280 drivers/dma/dw-edma/dw-edma-core.c 		dw_edma_start_transfer(chan);
chan              282 drivers/dma/dw-edma/dw-edma-core.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              289 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              300 drivers/dma/dw-edma/dw-edma-core.c 	if (ret == DMA_IN_PROGRESS && chan->status == EDMA_ST_PAUSE)
chan              306 drivers/dma/dw-edma/dw-edma-core.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              307 drivers/dma/dw-edma/dw-edma-core.c 	vd = vchan_find_desc(&chan->vc, cookie);
chan              313 drivers/dma/dw-edma/dw-edma-core.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              324 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(xfer->dchan);
chan              334 drivers/dma/dw-edma/dw-edma-core.c 	if ((direction == DMA_MEM_TO_DEV && chan->dir == EDMA_DIR_WRITE) ||
chan              335 drivers/dma/dw-edma/dw-edma-core.c 	    (direction == DMA_DEV_TO_MEM && chan->dir == EDMA_DIR_READ))
chan              346 drivers/dma/dw-edma/dw-edma-core.c 	if (!chan->configured)
chan              349 drivers/dma/dw-edma/dw-edma-core.c 	desc = dw_edma_alloc_desc(chan);
chan              357 drivers/dma/dw-edma/dw-edma-core.c 	src_addr = chan->config.src_addr;
chan              358 drivers/dma/dw-edma/dw-edma-core.c 	dst_addr = chan->config.dst_addr;
chan              371 drivers/dma/dw-edma/dw-edma-core.c 		if (chunk->bursts_alloc == chan->ll_max) {
chan              425 drivers/dma/dw-edma/dw-edma-core.c 	return vchan_tx_prep(&chan->vc, &desc->vd, xfer->flags);
chan              471 drivers/dma/dw-edma/dw-edma-core.c static void dw_edma_done_interrupt(struct dw_edma_chan *chan)
chan              477 drivers/dma/dw-edma/dw-edma-core.c 	dw_edma_v0_core_clear_done_int(chan);
chan              479 drivers/dma/dw-edma/dw-edma-core.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              480 drivers/dma/dw-edma/dw-edma-core.c 	vd = vchan_next_desc(&chan->vc);
chan              482 drivers/dma/dw-edma/dw-edma-core.c 		switch (chan->request) {
chan              486 drivers/dma/dw-edma/dw-edma-core.c 				chan->status = EDMA_ST_BUSY;
chan              487 drivers/dma/dw-edma/dw-edma-core.c 				dw_edma_start_transfer(chan);
chan              491 drivers/dma/dw-edma/dw-edma-core.c 				chan->status = EDMA_ST_IDLE;
chan              498 drivers/dma/dw-edma/dw-edma-core.c 			chan->request = EDMA_REQ_NONE;
chan              499 drivers/dma/dw-edma/dw-edma-core.c 			chan->status = EDMA_ST_IDLE;
chan              503 drivers/dma/dw-edma/dw-edma-core.c 			chan->request = EDMA_REQ_NONE;
chan              504 drivers/dma/dw-edma/dw-edma-core.c 			chan->status = EDMA_ST_PAUSE;
chan              511 drivers/dma/dw-edma/dw-edma-core.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              514 drivers/dma/dw-edma/dw-edma-core.c static void dw_edma_abort_interrupt(struct dw_edma_chan *chan)
chan              519 drivers/dma/dw-edma/dw-edma-core.c 	dw_edma_v0_core_clear_abort_int(chan);
chan              521 drivers/dma/dw-edma/dw-edma-core.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              522 drivers/dma/dw-edma/dw-edma-core.c 	vd = vchan_next_desc(&chan->vc);
chan              527 drivers/dma/dw-edma/dw-edma-core.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              528 drivers/dma/dw-edma/dw-edma-core.c 	chan->request = EDMA_REQ_NONE;
chan              529 drivers/dma/dw-edma/dw-edma-core.c 	chan->status = EDMA_ST_IDLE;
chan              555 drivers/dma/dw-edma/dw-edma-core.c 		struct dw_edma_chan *chan = &dw->chan[pos + off];
chan              557 drivers/dma/dw-edma/dw-edma-core.c 		dw_edma_done_interrupt(chan);
chan              565 drivers/dma/dw-edma/dw-edma-core.c 		struct dw_edma_chan *chan = &dw->chan[pos + off];
chan              567 drivers/dma/dw-edma/dw-edma-core.c 		dw_edma_abort_interrupt(chan);
chan              593 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              595 drivers/dma/dw-edma/dw-edma-core.c 	if (chan->status != EDMA_ST_IDLE)
chan              598 drivers/dma/dw-edma/dw-edma-core.c 	pm_runtime_get(chan->chip->dev);
chan              606 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan = dchan2dw_edma_chan(dchan);
chan              620 drivers/dma/dw-edma/dw-edma-core.c 	pm_runtime_put(chan->chip->dev);
chan              629 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan;
chan              664 drivers/dma/dw-edma/dw-edma-core.c 		chan = &dw->chan[i];
chan              670 drivers/dma/dw-edma/dw-edma-core.c 		chan->vc.chan.private = dt_region;
chan              672 drivers/dma/dw-edma/dw-edma-core.c 		chan->chip = chip;
chan              673 drivers/dma/dw-edma/dw-edma-core.c 		chan->id = j;
chan              674 drivers/dma/dw-edma/dw-edma-core.c 		chan->dir = write ? EDMA_DIR_WRITE : EDMA_DIR_READ;
chan              675 drivers/dma/dw-edma/dw-edma-core.c 		chan->configured = false;
chan              676 drivers/dma/dw-edma/dw-edma-core.c 		chan->request = EDMA_REQ_NONE;
chan              677 drivers/dma/dw-edma/dw-edma-core.c 		chan->status = EDMA_ST_IDLE;
chan              679 drivers/dma/dw-edma/dw-edma-core.c 		chan->ll_off = (ll_chunk * i);
chan              680 drivers/dma/dw-edma/dw-edma-core.c 		chan->ll_max = (ll_chunk / EDMA_LL_SZ) - 1;
chan              682 drivers/dma/dw-edma/dw-edma-core.c 		chan->dt_off = (dt_chunk * i);
chan              686 drivers/dma/dw-edma/dw-edma-core.c 			 chan->ll_off, chan->ll_max);
chan              701 drivers/dma/dw-edma/dw-edma-core.c 		memcpy(&chan->msi, &irq->msi, sizeof(chan->msi));
chan              705 drivers/dma/dw-edma/dw-edma-core.c 			 chan->msi.address_hi, chan->msi.address_lo,
chan              706 drivers/dma/dw-edma/dw-edma-core.c 			 chan->msi.data);
chan              708 drivers/dma/dw-edma/dw-edma-core.c 		chan->vc.desc_free = vchan_free_desc;
chan              709 drivers/dma/dw-edma/dw-edma-core.c 		vchan_init(&chan->vc, dma);
chan              711 drivers/dma/dw-edma/dw-edma-core.c 		dt_region->paddr = dw->dt_region.paddr + chan->dt_off;
chan              712 drivers/dma/dw-edma/dw-edma-core.c 		dt_region->vaddr = dw->dt_region.vaddr + chan->dt_off;
chan              716 drivers/dma/dw-edma/dw-edma-core.c 			 write ? "write" : "read", j, chan->dt_off);
chan              718 drivers/dma/dw-edma/dw-edma-core.c 		dw_edma_v0_core_device_config(chan);
chan              852 drivers/dma/dw-edma/dw-edma-core.c 	dw->chan = devm_kcalloc(dev, dw->wr_ch_cnt + dw->rd_ch_cnt,
chan              853 drivers/dma/dw-edma/dw-edma-core.c 				sizeof(*dw->chan), GFP_KERNEL);
chan              854 drivers/dma/dw-edma/dw-edma-core.c 	if (!dw->chan)
chan              897 drivers/dma/dw-edma/dw-edma-core.c 	struct dw_edma_chan *chan, *_chan;
chan              912 drivers/dma/dw-edma/dw-edma-core.c 	list_for_each_entry_safe(chan, _chan, &dw->wr_edma.channels,
chan              913 drivers/dma/dw-edma/dw-edma-core.c 				 vc.chan.device_node) {
chan              914 drivers/dma/dw-edma/dw-edma-core.c 		list_del(&chan->vc.chan.device_node);
chan              915 drivers/dma/dw-edma/dw-edma-core.c 		tasklet_kill(&chan->vc.task);
chan              918 drivers/dma/dw-edma/dw-edma-core.c 	list_for_each_entry_safe(chan, _chan, &dw->rd_edma.channels,
chan              919 drivers/dma/dw-edma/dw-edma-core.c 				 vc.chan.device_node) {
chan              920 drivers/dma/dw-edma/dw-edma-core.c 		list_del(&chan->vc.chan.device_node);
chan              921 drivers/dma/dw-edma/dw-edma-core.c 		tasklet_kill(&chan->vc.task);
chan               59 drivers/dma/dw-edma/dw-edma-core.h 	struct dw_edma_chan		*chan;
chan               70 drivers/dma/dw-edma/dw-edma-core.h 	struct dw_edma_chan		*chan;
chan              125 drivers/dma/dw-edma/dw-edma-core.h 	struct dw_edma_chan		*chan;
chan              150 drivers/dma/dw-edma/dw-edma-v0-core.c enum dma_status dw_edma_v0_core_ch_status(struct dw_edma_chan *chan)
chan              152 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma *dw = chan->chip->dw;
chan              156 drivers/dma/dw-edma/dw-edma-v0-core.c 			GET_CH(dw, chan->dir, chan->id, ch_control1));
chan              166 drivers/dma/dw-edma/dw-edma-v0-core.c void dw_edma_v0_core_clear_done_int(struct dw_edma_chan *chan)
chan              168 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma *dw = chan->chip->dw;
chan              170 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, int_clear,
chan              171 drivers/dma/dw-edma/dw-edma-v0-core.c 	       FIELD_PREP(EDMA_V0_DONE_INT_MASK, BIT(chan->id)));
chan              174 drivers/dma/dw-edma/dw-edma-v0-core.c void dw_edma_v0_core_clear_abort_int(struct dw_edma_chan *chan)
chan              176 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma *dw = chan->chip->dw;
chan              178 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, int_clear,
chan              179 drivers/dma/dw-edma/dw-edma-v0-core.c 	       FIELD_PREP(EDMA_V0_ABORT_INT_MASK, BIT(chan->id)));
chan              238 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma_chan *chan = chunk->chan;
chan              239 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma *dw = chan->chip->dw;
chan              246 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, engine_en, BIT(0));
chan              248 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, int_mask);
chan              249 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp &= ~FIELD_PREP(EDMA_V0_DONE_INT_MASK, BIT(chan->id));
chan              250 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp &= ~FIELD_PREP(EDMA_V0_ABORT_INT_MASK, BIT(chan->id));
chan              251 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, int_mask, tmp);
chan              253 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, linked_list_err_en);
chan              254 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp |= FIELD_PREP(EDMA_V0_LINKED_LIST_ERR_MASK, BIT(chan->id));
chan              255 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, linked_list_err_en, tmp);
chan              257 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_CH(dw, chan->dir, chan->id, ch_control1,
chan              260 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_CH(dw, chan->dir, chan->id, llp_low,
chan              262 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_CH(dw, chan->dir, chan->id, llp_high,
chan              266 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, doorbell,
chan              267 drivers/dma/dw-edma/dw-edma-v0-core.c 	       FIELD_PREP(EDMA_V0_DOORBELL_CH_MASK, chan->id));
chan              270 drivers/dma/dw-edma/dw-edma-v0-core.c int dw_edma_v0_core_device_config(struct dw_edma_chan *chan)
chan              272 drivers/dma/dw-edma/dw-edma-v0-core.c 	struct dw_edma *dw = chan->chip->dw;
chan              276 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, done_imwr_low, chan->msi.address_lo);
chan              277 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, done_imwr_high, chan->msi.address_hi);
chan              279 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, abort_imwr_low, chan->msi.address_lo);
chan              280 drivers/dma/dw-edma/dw-edma-v0-core.c 	SET_RW(dw, chan->dir, abort_imwr_high, chan->msi.address_hi);
chan              282 drivers/dma/dw-edma/dw-edma-v0-core.c 	switch (chan->id) {
chan              285 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, ch01_imwr_data);
chan              290 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, ch23_imwr_data);
chan              295 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, ch45_imwr_data);
chan              300 drivers/dma/dw-edma/dw-edma-v0-core.c 		tmp = GET_RW(dw, chan->dir, ch67_imwr_data);
chan              304 drivers/dma/dw-edma/dw-edma-v0-core.c 	if (chan->id & BIT(0)) {
chan              308 drivers/dma/dw-edma/dw-edma-v0-core.c 				  chan->msi.data);
chan              313 drivers/dma/dw-edma/dw-edma-v0-core.c 				  chan->msi.data);
chan              316 drivers/dma/dw-edma/dw-edma-v0-core.c 	switch (chan->id) {
chan              319 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, ch01_imwr_data, tmp);
chan              324 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, ch23_imwr_data, tmp);
chan              329 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, ch45_imwr_data, tmp);
chan              334 drivers/dma/dw-edma/dw-edma-v0-core.c 		SET_RW(dw, chan->dir, ch67_imwr_data, tmp);
chan               15 drivers/dma/dw-edma/dw-edma-v0-core.h void dw_edma_v0_core_off(struct dw_edma *chan);
chan               16 drivers/dma/dw-edma/dw-edma-v0-core.h u16 dw_edma_v0_core_ch_count(struct dw_edma *chan, enum dw_edma_dir dir);
chan               17 drivers/dma/dw-edma/dw-edma-v0-core.h enum dma_status dw_edma_v0_core_ch_status(struct dw_edma_chan *chan);
chan               18 drivers/dma/dw-edma/dw-edma-v0-core.h void dw_edma_v0_core_clear_done_int(struct dw_edma_chan *chan);
chan               19 drivers/dma/dw-edma/dw-edma-v0-core.h void dw_edma_v0_core_clear_abort_int(struct dw_edma_chan *chan);
chan               20 drivers/dma/dw-edma/dw-edma-v0-core.h u32 dw_edma_v0_core_status_done_int(struct dw_edma *chan, enum dw_edma_dir dir);
chan               21 drivers/dma/dw-edma/dw-edma-v0-core.h u32 dw_edma_v0_core_status_abort_int(struct dw_edma *chan, enum dw_edma_dir dir);
chan               23 drivers/dma/dw-edma/dw-edma-v0-core.h int dw_edma_v0_core_device_config(struct dw_edma_chan *chan);
chan                9 drivers/dma/dw/acpi.c static bool dw_dma_acpi_filter(struct dma_chan *chan, void *param)
chan               20 drivers/dma/dw/acpi.c 	return dw_dma_filter(chan, &slave);
chan               46 drivers/dma/dw/core.c static struct device *chan2dev(struct dma_chan *chan)
chan               48 drivers/dma/dw/core.c 	return &chan->dev->device;
chan               59 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(tx->chan);
chan               74 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n",
chan               82 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan               92 drivers/dma/dw/core.c 	dma_async_tx_descriptor_init(&desc->txd, &dwc->chan);
chan              101 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan              119 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan              137 drivers/dma/dw/core.c 	dev_err(chan2dev(&dwc->chan),
chan              159 drivers/dma/dw/core.c 	struct dw_dma	*dw = to_dw_dma(dwc->chan.device);
chan              181 drivers/dma/dw/core.c 	struct dw_dma	*dw = to_dw_dma(dwc->chan.device);
chan              187 drivers/dma/dw/core.c 		dev_err(chan2dev(&dwc->chan),
chan              200 drivers/dma/dw/core.c 			dev_err(chan2dev(&dwc->chan),
chan              233 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(&dwc->chan), "%s: started %u\n", __func__, desc->txd.cookie);
chan              248 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie);
chan              275 drivers/dma/dw/core.c 		dev_err(chan2dev(&dwc->chan),
chan              298 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan              363 drivers/dma/dw/core.c 		dev_vdbg(chan2dev(&dwc->chan), "%s: soft LLP mode\n", __func__);
chan              368 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(&dwc->chan), "%s: llp=%pad\n", __func__, &llp);
chan              408 drivers/dma/dw/core.c 	dev_err(chan2dev(&dwc->chan),
chan              420 drivers/dma/dw/core.c 	dev_crit(chan2dev(&dwc->chan), "  desc: s0x%x d0x%x l0x%x c0x%x:%x\n",
chan              459 drivers/dma/dw/core.c 	dev_WARN(chan2dev(&dwc->chan), "Bad descriptor submitted for DMA!\n"
chan              485 drivers/dma/dw/core.c 		dwc = &dw->chan[i];
chan              545 drivers/dma/dw/core.c dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              548 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              549 drivers/dma/dw/core.c 	struct dw_dma		*dw = to_dw_dma(chan->device);
chan              562 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(chan),
chan              567 drivers/dma/dw/core.c 		dev_dbg(chan2dev(chan), "%s: length is zero!\n", __func__);
chan              622 drivers/dma/dw/core.c dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              626 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              627 drivers/dma/dw/core.c 	struct dw_dma		*dw = to_dw_dma(chan->device);
chan              642 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan              766 drivers/dma/dw/core.c 	dev_err(chan2dev(chan),
chan              772 drivers/dma/dw/core.c bool dw_dma_filter(struct dma_chan *chan, void *param)
chan              774 drivers/dma/dw/core.c 	struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
chan              777 drivers/dma/dw/core.c 	if (dws->dma_dev != chan->device->dev)
chan              787 drivers/dma/dw/core.c static int dwc_config(struct dma_chan *chan, struct dma_slave_config *sconfig)
chan              789 drivers/dma/dw/core.c 	struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
chan              790 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(chan->device);
chan              802 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan              813 drivers/dma/dw/core.c static int dwc_pause(struct dma_chan *chan)
chan              815 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              827 drivers/dma/dw/core.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan              834 drivers/dma/dw/core.c static int dwc_resume(struct dma_chan *chan)
chan              836 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              849 drivers/dma/dw/core.c static int dwc_terminate_all(struct dma_chan *chan)
chan              851 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              852 drivers/dma/dw/core.c 	struct dw_dma		*dw = to_dw_dma(chan->device);
chan              917 drivers/dma/dw/core.c dwc_tx_status(struct dma_chan *chan,
chan              921 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              924 drivers/dma/dw/core.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              928 drivers/dma/dw/core.c 	dwc_scan_descriptors(to_dw_dma(chan->device), dwc);
chan              930 drivers/dma/dw/core.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              942 drivers/dma/dw/core.c static void dwc_issue_pending(struct dma_chan *chan)
chan              944 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              971 drivers/dma/dw/core.c 		clear_bit(DW_DMA_IS_INITIALIZED, &dw->chan[i].flags);
chan              979 drivers/dma/dw/core.c static int dwc_alloc_chan_resources(struct dma_chan *chan)
chan              981 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan              982 drivers/dma/dw/core.c 	struct dw_dma		*dw = to_dw_dma(chan->device);
chan              984 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(chan), "%s\n", __func__);
chan              988 drivers/dma/dw/core.c 		dev_dbg(chan2dev(chan), "DMA channel not idle?\n");
chan              992 drivers/dma/dw/core.c 	dma_cookie_init(chan);
chan             1003 drivers/dma/dw/core.c 	if (chan->private && !dw_dma_filter(chan, chan->private)) {
chan             1004 drivers/dma/dw/core.c 		dev_warn(chan2dev(chan), "Wrong controller-specific data\n");
chan             1016 drivers/dma/dw/core.c static void dwc_free_chan_resources(struct dma_chan *chan)
chan             1018 drivers/dma/dw/core.c 	struct dw_dma_chan	*dwc = to_dw_dma_chan(chan);
chan             1019 drivers/dma/dw/core.c 	struct dw_dma		*dw = to_dw_dma(chan->device);
chan             1022 drivers/dma/dw/core.c 	dev_dbg(chan2dev(chan), "%s: descs allocated=%u\n", __func__,
chan             1028 drivers/dma/dw/core.c 	BUG_ON(dma_readl(to_dw_dma(chan->device), CH_EN) & dwc->mask);
chan             1049 drivers/dma/dw/core.c 	dev_vdbg(chan2dev(chan), "%s: done\n", __func__);
chan             1104 drivers/dma/dw/core.c 	dw->chan = devm_kcalloc(chip->dev, pdata->nr_channels, sizeof(*dw->chan),
chan             1106 drivers/dma/dw/core.c 	if (!dw->chan) {
chan             1138 drivers/dma/dw/core.c 		struct dw_dma_chan	*dwc = &dw->chan[i];
chan             1140 drivers/dma/dw/core.c 		dwc->chan.device = &dw->dma;
chan             1141 drivers/dma/dw/core.c 		dma_cookie_init(&dwc->chan);
chan             1143 drivers/dma/dw/core.c 			list_add_tail(&dwc->chan.device_node,
chan             1146 drivers/dma/dw/core.c 			list_add(&dwc->chan.device_node, &dw->dma.channels);
chan             1255 drivers/dma/dw/core.c 			chan.device_node) {
chan             1256 drivers/dma/dw/core.c 		list_del(&dwc->chan.device_node);
chan               16 drivers/dma/dw/dw.c 	struct dw_dma *dw = to_dw_dma(dwc->chan.device);
chan               24 drivers/dma/dw/internal.h extern bool dw_dma_filter(struct dma_chan *chan, void *param);
chan              265 drivers/dma/dw/regs.h 	struct dma_chan			chan;
chan              305 drivers/dma/dw/regs.h static inline struct dw_dma_chan *to_dw_dma_chan(struct dma_chan *chan)
chan              307 drivers/dma/dw/regs.h 	return container_of(chan, struct dw_dma_chan, chan);
chan              318 drivers/dma/dw/regs.h 	struct dw_dma_chan	*chan;
chan              108 drivers/dma/ep93xx_dma.c static int ep93xx_dma_slave_config_write(struct dma_chan *chan,
chan              164 drivers/dma/ep93xx_dma.c 	struct dma_chan			chan;
chan              219 drivers/dma/ep93xx_dma.c 	return &edmac->chan.dev->device;
chan              222 drivers/dma/ep93xx_dma.c static struct ep93xx_dma_chan *to_ep93xx_dma_chan(struct dma_chan *chan)
chan              224 drivers/dma/ep93xx_dma.c 	return container_of(chan, struct ep93xx_dma_chan, chan);
chan              319 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_data *data = edmac->chan.private;
chan              372 drivers/dma/ep93xx_dma.c 	if (ep93xx_dma_chan_direction(&edmac->chan) == DMA_MEM_TO_DEV)
chan              459 drivers/dma/ep93xx_dma.c 	const struct ep93xx_dma_data *data = edmac->chan.private;
chan              549 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_data *data = edmac->chan.private;
chan              637 drivers/dma/ep93xx_dma.c 			if (done && !edmac->chan.private) {
chan              831 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(tx->chan);
chan              865 drivers/dma/ep93xx_dma.c static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
chan              867 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan              868 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_data *data = chan->private;
chan              869 drivers/dma/ep93xx_dma.c 	const char *name = dma_chan_name(chan);
chan              879 drivers/dma/ep93xx_dma.c 		if (data->direction != ep93xx_dma_chan_direction(chan))
chan              907 drivers/dma/ep93xx_dma.c 	dma_cookie_init(&edmac->chan);
chan              925 drivers/dma/ep93xx_dma.c 		dma_async_tx_descriptor_init(&desc->txd, chan);
chan              949 drivers/dma/ep93xx_dma.c static void ep93xx_dma_free_chan_resources(struct dma_chan *chan)
chan              951 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan              985 drivers/dma/ep93xx_dma.c ep93xx_dma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest,
chan              988 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1033 drivers/dma/ep93xx_dma.c ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             1037 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1042 drivers/dma/ep93xx_dma.c 	if (!edmac->edma->m2m && dir != ep93xx_dma_chan_direction(chan)) {
chan             1054 drivers/dma/ep93xx_dma.c 	ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config);
chan             1115 drivers/dma/ep93xx_dma.c ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
chan             1119 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1123 drivers/dma/ep93xx_dma.c 	if (!edmac->edma->m2m && dir != ep93xx_dma_chan_direction(chan)) {
chan             1141 drivers/dma/ep93xx_dma.c 	ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config);
chan             1189 drivers/dma/ep93xx_dma.c static void ep93xx_dma_synchronize(struct dma_chan *chan)
chan             1191 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1204 drivers/dma/ep93xx_dma.c static int ep93xx_dma_terminate_all(struct dma_chan *chan)
chan             1206 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1230 drivers/dma/ep93xx_dma.c static int ep93xx_dma_slave_config(struct dma_chan *chan,
chan             1233 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1240 drivers/dma/ep93xx_dma.c static int ep93xx_dma_slave_config_write(struct dma_chan *chan,
chan             1244 drivers/dma/ep93xx_dma.c 	struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
chan             1297 drivers/dma/ep93xx_dma.c static enum dma_status ep93xx_dma_tx_status(struct dma_chan *chan,
chan             1301 drivers/dma/ep93xx_dma.c 	return dma_cookie_status(chan, cookie, state);
chan             1311 drivers/dma/ep93xx_dma.c static void ep93xx_dma_issue_pending(struct dma_chan *chan)
chan             1313 drivers/dma/ep93xx_dma.c 	ep93xx_dma_advance_work(to_ep93xx_dma_chan(chan));
chan             1338 drivers/dma/ep93xx_dma.c 		edmac->chan.device = dma_dev;
chan             1357 drivers/dma/ep93xx_dma.c 		list_add_tail(&edmac->chan.device_node,
chan               48 drivers/dma/fsl-edma-common.c 	u32 ch = fsl_chan->vchan.chan.chan_id;
chan               65 drivers/dma/fsl-edma-common.c 	u32 ch = fsl_chan->vchan.chan.chan_id;
chan              109 drivers/dma/fsl-edma-common.c 	u32 ch = fsl_chan->vchan.chan.chan_id;
chan              115 drivers/dma/fsl-edma-common.c 	ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux;
chan              155 drivers/dma/fsl-edma-common.c int fsl_edma_terminate_all(struct dma_chan *chan)
chan              157 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              172 drivers/dma/fsl-edma-common.c int fsl_edma_pause(struct dma_chan *chan)
chan              174 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              188 drivers/dma/fsl-edma-common.c int fsl_edma_resume(struct dma_chan *chan)
chan              190 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              207 drivers/dma/fsl-edma-common.c 		dma_unmap_resource(fsl_chan->vchan.chan.device->dev,
chan              217 drivers/dma/fsl-edma-common.c 	struct device *dev = fsl_chan->vchan.chan.device->dev;
chan              253 drivers/dma/fsl-edma-common.c int fsl_edma_slave_config(struct dma_chan *chan,
chan              256 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              270 drivers/dma/fsl-edma-common.c 	u32 ch = fsl_chan->vchan.chan.chan_id;
chan              308 drivers/dma/fsl-edma-common.c enum dma_status fsl_edma_tx_status(struct dma_chan *chan,
chan              311 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              316 drivers/dma/fsl-edma-common.c 	status = dma_cookie_status(chan, cookie, txstate);
chan              345 drivers/dma/fsl-edma-common.c 	u32 ch = fsl_chan->vchan.chan.chan_id;
chan              443 drivers/dma/fsl-edma-common.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              447 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              512 drivers/dma/fsl-edma-common.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              516 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              598 drivers/dma/fsl-edma-common.c void fsl_edma_issue_pending(struct dma_chan *chan)
chan              600 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              618 drivers/dma/fsl-edma-common.c int fsl_edma_alloc_chan_resources(struct dma_chan *chan)
chan              620 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              622 drivers/dma/fsl-edma-common.c 	fsl_chan->tcd_pool = dma_pool_create("tcd_pool", chan->device->dev,
chan              629 drivers/dma/fsl-edma-common.c void fsl_edma_free_chan_resources(struct dma_chan *chan)
chan              631 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              651 drivers/dma/fsl-edma-common.c 	struct fsl_edma_chan *chan, *_chan;
chan              653 drivers/dma/fsl-edma-common.c 	list_for_each_entry_safe(chan, _chan,
chan              654 drivers/dma/fsl-edma-common.c 				&dmadev->channels, vchan.chan.device_node) {
chan              655 drivers/dma/fsl-edma-common.c 		list_del(&chan->vchan.chan.device_node);
chan              656 drivers/dma/fsl-edma-common.c 		tasklet_kill(&chan->vchan.task);
chan              213 drivers/dma/fsl-edma-common.h static inline struct fsl_edma_chan *to_fsl_edma_chan(struct dma_chan *chan)
chan              215 drivers/dma/fsl-edma-common.h 	return container_of(chan, struct fsl_edma_chan, vchan.chan);
chan              227 drivers/dma/fsl-edma-common.h int fsl_edma_terminate_all(struct dma_chan *chan);
chan              228 drivers/dma/fsl-edma-common.h int fsl_edma_pause(struct dma_chan *chan);
chan              229 drivers/dma/fsl-edma-common.h int fsl_edma_resume(struct dma_chan *chan);
chan              230 drivers/dma/fsl-edma-common.h int fsl_edma_slave_config(struct dma_chan *chan,
chan              232 drivers/dma/fsl-edma-common.h enum dma_status fsl_edma_tx_status(struct dma_chan *chan,
chan              235 drivers/dma/fsl-edma-common.h 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              239 drivers/dma/fsl-edma-common.h 		struct dma_chan *chan, struct scatterlist *sgl,
chan              243 drivers/dma/fsl-edma-common.h void fsl_edma_issue_pending(struct dma_chan *chan);
chan              244 drivers/dma/fsl-edma-common.h int fsl_edma_alloc_chan_resources(struct dma_chan *chan);
chan              245 drivers/dma/fsl-edma-common.h void fsl_edma_free_chan_resources(struct dma_chan *chan);
chan               23 drivers/dma/fsl-edma.c static void fsl_edma_synchronize(struct dma_chan *chan)
chan               25 drivers/dma/fsl-edma.c 	struct fsl_edma_chan *fsl_chan = to_fsl_edma_chan(chan);
chan              100 drivers/dma/fsl-edma.c 	struct dma_chan *chan, *_chan;
chan              109 drivers/dma/fsl-edma.c 	list_for_each_entry_safe(chan, _chan, &fsl_edma->dma_dev.channels, device_node) {
chan              110 drivers/dma/fsl-edma.c 		if (chan->client_count)
chan              112 drivers/dma/fsl-edma.c 		if ((chan->chan_id / chans_per_mux) == dma_spec->args[0]) {
chan              113 drivers/dma/fsl-edma.c 			chan = dma_get_slave_channel(chan);
chan              114 drivers/dma/fsl-edma.c 			if (chan) {
chan              115 drivers/dma/fsl-edma.c 				chan->device->privatecnt++;
chan              116 drivers/dma/fsl-edma.c 				fsl_chan = to_fsl_edma_chan(chan);
chan              121 drivers/dma/fsl-edma.c 				return chan;
chan              282 drivers/dma/fsl-qdma.c static struct fsl_qdma_chan *to_fsl_qdma_chan(struct dma_chan *chan)
chan              284 drivers/dma/fsl-qdma.c 	return container_of(chan, struct fsl_qdma_chan, vchan.chan);
chan              292 drivers/dma/fsl-qdma.c static void fsl_qdma_free_chan_resources(struct dma_chan *chan)
chan              294 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan              921 drivers/dma/fsl-qdma.c fsl_qdma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst,
chan              925 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan              981 drivers/dma/fsl-qdma.c static void fsl_qdma_issue_pending(struct dma_chan *chan)
chan              984 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan              995 drivers/dma/fsl-qdma.c static void fsl_qdma_synchronize(struct dma_chan *chan)
chan              997 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan             1002 drivers/dma/fsl-qdma.c static int fsl_qdma_terminate_all(struct dma_chan *chan)
chan             1006 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan             1015 drivers/dma/fsl-qdma.c static int fsl_qdma_alloc_chan_resources(struct dma_chan *chan)
chan             1018 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *fsl_chan = to_fsl_qdma_chan(chan);
chan             1032 drivers/dma/fsl-qdma.c 			chan->device->dev,
chan             1043 drivers/dma/fsl-qdma.c 			chan->device->dev,
chan             1051 drivers/dma/fsl-qdma.c 		dev_err(chan->device->dev,
chan             1209 drivers/dma/fsl-qdma.c 	struct fsl_qdma_chan *chan, *_chan;
chan             1211 drivers/dma/fsl-qdma.c 	list_for_each_entry_safe(chan, _chan,
chan             1212 drivers/dma/fsl-qdma.c 				 &dmadev->channels, vchan.chan.device_node) {
chan             1213 drivers/dma/fsl-qdma.c 		list_del(&chan->vchan.chan.device_node);
chan             1214 drivers/dma/fsl-qdma.c 		tasklet_kill(&chan->vchan.task);
chan               94 drivers/dma/fsl_raid.c 	re_chan = container_of(tx->chan, struct fsl_re_chan, chan);
chan              105 drivers/dma/fsl_raid.c static void fsl_re_issue_pending(struct dma_chan *chan)
chan              112 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              154 drivers/dma/fsl_raid.c 	fsl_re_issue_pending(&re_chan->chan);
chan              233 drivers/dma/fsl_raid.c static enum dma_status fsl_re_tx_status(struct dma_chan *chan,
chan              237 drivers/dma/fsl_raid.c 	return dma_cookie_status(chan, cookie, txstate);
chan              257 drivers/dma/fsl_raid.c 	dma_async_tx_descriptor_init(&desc->async_tx, &re_chan->chan);
chan              317 drivers/dma/fsl_raid.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              330 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              392 drivers/dma/fsl_raid.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              396 drivers/dma/fsl_raid.c 	return fsl_re_prep_dma_genq(chan, dest, src, src_cnt, NULL, len, flags);
chan              404 drivers/dma/fsl_raid.c 		struct dma_chan *chan, dma_addr_t *dest, dma_addr_t *src,
chan              417 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              438 drivers/dma/fsl_raid.c 		tx = fsl_re_prep_dma_genq(chan, dest[1], dma_src, 2, coef, len,
chan              455 drivers/dma/fsl_raid.c 		return fsl_re_prep_dma_genq(chan, dest[1], src, src_cnt,
chan              527 drivers/dma/fsl_raid.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              537 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              573 drivers/dma/fsl_raid.c static int fsl_re_alloc_chan_resources(struct dma_chan *chan)
chan              581 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              603 drivers/dma/fsl_raid.c static void fsl_re_free_chan_resources(struct dma_chan *chan)
chan              608 drivers/dma/fsl_raid.c 	re_chan = container_of(chan, struct fsl_re_chan, chan);
chan              629 drivers/dma/fsl_raid.c 	struct fsl_re_chan *chan;
chan              640 drivers/dma/fsl_raid.c 	chan = devm_kzalloc(dev, sizeof(*chan), GFP_KERNEL);
chan              641 drivers/dma/fsl_raid.c 	if (!chan)
chan              660 drivers/dma/fsl_raid.c 	chan->jrregs = (struct fsl_re_chan_cfg *)((u8 *)re_priv->re_regs +
chan              664 drivers/dma/fsl_raid.c 	chan->irq = irq_of_parse_and_map(np, 0);
chan              665 drivers/dma/fsl_raid.c 	if (!chan->irq) {
chan              671 drivers/dma/fsl_raid.c 	snprintf(chan->name, sizeof(chan->name), "re_jr%02d", q);
chan              674 drivers/dma/fsl_raid.c 	tasklet_init(&chan->irqtask, fsl_re_dequeue, (unsigned long)chandev);
chan              676 drivers/dma/fsl_raid.c 	ret = request_irq(chan->irq, fsl_re_isr, 0, chan->name, chandev);
chan              683 drivers/dma/fsl_raid.c 	re_priv->re_jrs[q] = chan;
chan              684 drivers/dma/fsl_raid.c 	chan->chan.device = dma_dev;
chan              685 drivers/dma/fsl_raid.c 	chan->chan.private = chan;
chan              686 drivers/dma/fsl_raid.c 	chan->dev = chandev;
chan              687 drivers/dma/fsl_raid.c 	chan->re_dev = re_priv;
chan              689 drivers/dma/fsl_raid.c 	spin_lock_init(&chan->desc_lock);
chan              690 drivers/dma/fsl_raid.c 	INIT_LIST_HEAD(&chan->ack_q);
chan              691 drivers/dma/fsl_raid.c 	INIT_LIST_HEAD(&chan->active_q);
chan              692 drivers/dma/fsl_raid.c 	INIT_LIST_HEAD(&chan->submit_q);
chan              693 drivers/dma/fsl_raid.c 	INIT_LIST_HEAD(&chan->free_q);
chan              695 drivers/dma/fsl_raid.c 	chan->inb_ring_virt_addr = dma_pool_alloc(chan->re_dev->hw_desc_pool,
chan              696 drivers/dma/fsl_raid.c 		GFP_KERNEL, &chan->inb_phys_addr);
chan              697 drivers/dma/fsl_raid.c 	if (!chan->inb_ring_virt_addr) {
chan              703 drivers/dma/fsl_raid.c 	chan->oub_ring_virt_addr = dma_pool_alloc(chan->re_dev->hw_desc_pool,
chan              704 drivers/dma/fsl_raid.c 		GFP_KERNEL, &chan->oub_phys_addr);
chan              705 drivers/dma/fsl_raid.c 	if (!chan->oub_ring_virt_addr) {
chan              712 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->inbring_base_h,
chan              713 drivers/dma/fsl_raid.c 		 chan->inb_phys_addr & FSL_RE_ADDR_BIT_MASK);
chan              714 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->oubring_base_h,
chan              715 drivers/dma/fsl_raid.c 		 chan->oub_phys_addr & FSL_RE_ADDR_BIT_MASK);
chan              716 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->inbring_base_l,
chan              717 drivers/dma/fsl_raid.c 		 chan->inb_phys_addr >> FSL_RE_ADDR_BIT_SHIFT);
chan              718 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->oubring_base_l,
chan              719 drivers/dma/fsl_raid.c 		 chan->oub_phys_addr >> FSL_RE_ADDR_BIT_SHIFT);
chan              720 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->inbring_size,
chan              722 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->oubring_size,
chan              726 drivers/dma/fsl_raid.c 	status = in_be32(&chan->jrregs->jr_config_1) & FSL_RE_REG_LIODN_MASK;
chan              729 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->jr_config_1,
chan              732 drivers/dma/fsl_raid.c 	dev_set_drvdata(chandev, chan);
chan              735 drivers/dma/fsl_raid.c 	out_be32(&chan->jrregs->jr_command, FSL_RE_ENABLE);
chan              740 drivers/dma/fsl_raid.c 	dma_pool_free(chan->re_dev->hw_desc_pool, chan->inb_ring_virt_addr,
chan              741 drivers/dma/fsl_raid.c 		      chan->inb_phys_addr);
chan              850 drivers/dma/fsl_raid.c static void fsl_re_remove_chan(struct fsl_re_chan *chan)
chan              852 drivers/dma/fsl_raid.c 	tasklet_kill(&chan->irqtask);
chan              854 drivers/dma/fsl_raid.c 	dma_pool_free(chan->re_dev->hw_desc_pool, chan->inb_ring_virt_addr,
chan              855 drivers/dma/fsl_raid.c 		      chan->inb_phys_addr);
chan              857 drivers/dma/fsl_raid.c 	dma_pool_free(chan->re_dev->hw_desc_pool, chan->oub_ring_virt_addr,
chan              858 drivers/dma/fsl_raid.c 		      chan->oub_phys_addr);
chan              275 drivers/dma/fsl_raid.h 	struct dma_chan chan;
chan               38 drivers/dma/fsldma.c #define chan_dbg(chan, fmt, arg...)					\
chan               39 drivers/dma/fsldma.c 	dev_dbg(chan->dev, "%s: " fmt, chan->name, ##arg)
chan               40 drivers/dma/fsldma.c #define chan_err(chan, fmt, arg...)					\
chan               41 drivers/dma/fsldma.c 	dev_err(chan->dev, "%s: " fmt, chan->name, ##arg)
chan               49 drivers/dma/fsldma.c static void set_sr(struct fsldma_chan *chan, u32 val)
chan               51 drivers/dma/fsldma.c 	FSL_DMA_OUT(chan, &chan->regs->sr, val, 32);
chan               54 drivers/dma/fsldma.c static u32 get_sr(struct fsldma_chan *chan)
chan               56 drivers/dma/fsldma.c 	return FSL_DMA_IN(chan, &chan->regs->sr, 32);
chan               59 drivers/dma/fsldma.c static void set_mr(struct fsldma_chan *chan, u32 val)
chan               61 drivers/dma/fsldma.c 	FSL_DMA_OUT(chan, &chan->regs->mr, val, 32);
chan               64 drivers/dma/fsldma.c static u32 get_mr(struct fsldma_chan *chan)
chan               66 drivers/dma/fsldma.c 	return FSL_DMA_IN(chan, &chan->regs->mr, 32);
chan               69 drivers/dma/fsldma.c static void set_cdar(struct fsldma_chan *chan, dma_addr_t addr)
chan               71 drivers/dma/fsldma.c 	FSL_DMA_OUT(chan, &chan->regs->cdar, addr | FSL_DMA_SNEN, 64);
chan               74 drivers/dma/fsldma.c static dma_addr_t get_cdar(struct fsldma_chan *chan)
chan               76 drivers/dma/fsldma.c 	return FSL_DMA_IN(chan, &chan->regs->cdar, 64) & ~FSL_DMA_SNEN;
chan               79 drivers/dma/fsldma.c static void set_bcr(struct fsldma_chan *chan, u32 val)
chan               81 drivers/dma/fsldma.c 	FSL_DMA_OUT(chan, &chan->regs->bcr, val, 32);
chan               84 drivers/dma/fsldma.c static u32 get_bcr(struct fsldma_chan *chan)
chan               86 drivers/dma/fsldma.c 	return FSL_DMA_IN(chan, &chan->regs->bcr, 32);
chan               93 drivers/dma/fsldma.c static void set_desc_cnt(struct fsldma_chan *chan,
chan               96 drivers/dma/fsldma.c 	hw->count = CPU_TO_DMA(chan, count, 32);
chan               99 drivers/dma/fsldma.c static void set_desc_src(struct fsldma_chan *chan,
chan              104 drivers/dma/fsldma.c 	snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX)
chan              106 drivers/dma/fsldma.c 	hw->src_addr = CPU_TO_DMA(chan, snoop_bits | src, 64);
chan              109 drivers/dma/fsldma.c static void set_desc_dst(struct fsldma_chan *chan,
chan              114 drivers/dma/fsldma.c 	snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX)
chan              116 drivers/dma/fsldma.c 	hw->dst_addr = CPU_TO_DMA(chan, snoop_bits | dst, 64);
chan              119 drivers/dma/fsldma.c static void set_desc_next(struct fsldma_chan *chan,
chan              124 drivers/dma/fsldma.c 	snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_83XX)
chan              126 drivers/dma/fsldma.c 	hw->next_ln_addr = CPU_TO_DMA(chan, snoop_bits | next, 64);
chan              129 drivers/dma/fsldma.c static void set_ld_eol(struct fsldma_chan *chan, struct fsl_desc_sw *desc)
chan              133 drivers/dma/fsldma.c 	snoop_bits = ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_83XX)
chan              136 drivers/dma/fsldma.c 	desc->hw.next_ln_addr = CPU_TO_DMA(chan,
chan              137 drivers/dma/fsldma.c 		DMA_TO_CPU(chan, desc->hw.next_ln_addr, 64) | FSL_DMA_EOL
chan              145 drivers/dma/fsldma.c static void dma_init(struct fsldma_chan *chan)
chan              148 drivers/dma/fsldma.c 	set_mr(chan, 0);
chan              150 drivers/dma/fsldma.c 	switch (chan->feature & FSL_DMA_IP_MASK) {
chan              157 drivers/dma/fsldma.c 		set_mr(chan, FSL_DMA_MR_BWC | FSL_DMA_MR_EIE
chan              165 drivers/dma/fsldma.c 		set_mr(chan, FSL_DMA_MR_EOTIE | FSL_DMA_MR_PRC_RM);
chan              170 drivers/dma/fsldma.c static int dma_is_idle(struct fsldma_chan *chan)
chan              172 drivers/dma/fsldma.c 	u32 sr = get_sr(chan);
chan              183 drivers/dma/fsldma.c static void dma_start(struct fsldma_chan *chan)
chan              187 drivers/dma/fsldma.c 	mode = get_mr(chan);
chan              189 drivers/dma/fsldma.c 	if (chan->feature & FSL_DMA_CHAN_PAUSE_EXT) {
chan              190 drivers/dma/fsldma.c 		set_bcr(chan, 0);
chan              196 drivers/dma/fsldma.c 	if (chan->feature & FSL_DMA_CHAN_START_EXT) {
chan              203 drivers/dma/fsldma.c 	set_mr(chan, mode);
chan              206 drivers/dma/fsldma.c static void dma_halt(struct fsldma_chan *chan)
chan              212 drivers/dma/fsldma.c 	mode = get_mr(chan);
chan              219 drivers/dma/fsldma.c 	if ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX) {
chan              221 drivers/dma/fsldma.c 		set_mr(chan, mode);
chan              228 drivers/dma/fsldma.c 	set_mr(chan, mode);
chan              232 drivers/dma/fsldma.c 		if (dma_is_idle(chan))
chan              238 drivers/dma/fsldma.c 	if (!dma_is_idle(chan))
chan              239 drivers/dma/fsldma.c 		chan_err(chan, "DMA halt timeout!\n");
chan              253 drivers/dma/fsldma.c static void fsl_chan_set_src_loop_size(struct fsldma_chan *chan, int size)
chan              257 drivers/dma/fsldma.c 	mode = get_mr(chan);
chan              272 drivers/dma/fsldma.c 	set_mr(chan, mode);
chan              286 drivers/dma/fsldma.c static void fsl_chan_set_dst_loop_size(struct fsldma_chan *chan, int size)
chan              290 drivers/dma/fsldma.c 	mode = get_mr(chan);
chan              305 drivers/dma/fsldma.c 	set_mr(chan, mode);
chan              320 drivers/dma/fsldma.c static void fsl_chan_set_request_count(struct fsldma_chan *chan, int size)
chan              326 drivers/dma/fsldma.c 	mode = get_mr(chan);
chan              330 drivers/dma/fsldma.c 	set_mr(chan, mode);
chan              342 drivers/dma/fsldma.c static void fsl_chan_toggle_ext_pause(struct fsldma_chan *chan, int enable)
chan              345 drivers/dma/fsldma.c 		chan->feature |= FSL_DMA_CHAN_PAUSE_EXT;
chan              347 drivers/dma/fsldma.c 		chan->feature &= ~FSL_DMA_CHAN_PAUSE_EXT;
chan              360 drivers/dma/fsldma.c static void fsl_chan_toggle_ext_start(struct fsldma_chan *chan, int enable)
chan              363 drivers/dma/fsldma.c 		chan->feature |= FSL_DMA_CHAN_START_EXT;
chan              365 drivers/dma/fsldma.c 		chan->feature &= ~FSL_DMA_CHAN_START_EXT;
chan              370 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan              375 drivers/dma/fsldma.c 	chan = to_fsl_chan(dchan);
chan              377 drivers/dma/fsldma.c 	fsl_chan_toggle_ext_start(chan, enable);
chan              382 drivers/dma/fsldma.c static void append_ld_queue(struct fsldma_chan *chan, struct fsl_desc_sw *desc)
chan              384 drivers/dma/fsldma.c 	struct fsl_desc_sw *tail = to_fsl_desc(chan->ld_pending.prev);
chan              386 drivers/dma/fsldma.c 	if (list_empty(&chan->ld_pending))
chan              396 drivers/dma/fsldma.c 	set_desc_next(chan, &tail->hw, desc->async_tx.phys);
chan              403 drivers/dma/fsldma.c 	list_splice_tail_init(&desc->tx_list, &chan->ld_pending);
chan              408 drivers/dma/fsldma.c 	struct fsldma_chan *chan = to_fsl_chan(tx->chan);
chan              413 drivers/dma/fsldma.c 	spin_lock_bh(&chan->desc_lock);
chan              416 drivers/dma/fsldma.c 	if (unlikely(chan->pm_state != RUNNING)) {
chan              417 drivers/dma/fsldma.c 		chan_dbg(chan, "cannot submit due to suspend\n");
chan              418 drivers/dma/fsldma.c 		spin_unlock_bh(&chan->desc_lock);
chan              432 drivers/dma/fsldma.c 	append_ld_queue(chan, desc);
chan              434 drivers/dma/fsldma.c 	spin_unlock_bh(&chan->desc_lock);
chan              444 drivers/dma/fsldma.c static void fsl_dma_free_descriptor(struct fsldma_chan *chan,
chan              448 drivers/dma/fsldma.c 	chan_dbg(chan, "LD %p free\n", desc);
chan              449 drivers/dma/fsldma.c 	dma_pool_free(chan->desc_pool, desc, desc->async_tx.phys);
chan              458 drivers/dma/fsldma.c static struct fsl_desc_sw *fsl_dma_alloc_descriptor(struct fsldma_chan *chan)
chan              463 drivers/dma/fsldma.c 	desc = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &pdesc);
chan              465 drivers/dma/fsldma.c 		chan_dbg(chan, "out of memory for link descriptor\n");
chan              470 drivers/dma/fsldma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan              474 drivers/dma/fsldma.c 	chan_dbg(chan, "LD %p allocated\n", desc);
chan              487 drivers/dma/fsldma.c static void fsldma_clean_completed_descriptor(struct fsldma_chan *chan)
chan              492 drivers/dma/fsldma.c 	list_for_each_entry_safe(desc, _desc, &chan->ld_completed, node)
chan              494 drivers/dma/fsldma.c 			fsl_dma_free_descriptor(chan, desc);
chan              506 drivers/dma/fsldma.c static dma_cookie_t fsldma_run_tx_complete_actions(struct fsldma_chan *chan,
chan              537 drivers/dma/fsldma.c static void fsldma_clean_running_descriptor(struct fsldma_chan *chan,
chan              552 drivers/dma/fsldma.c 		list_add_tail(&desc->node, &chan->ld_completed);
chan              556 drivers/dma/fsldma.c 	dma_pool_free(chan->desc_pool, desc, desc->async_tx.phys);
chan              566 drivers/dma/fsldma.c static void fsl_chan_xfer_ld_queue(struct fsldma_chan *chan)
chan              574 drivers/dma/fsldma.c 	if (list_empty(&chan->ld_pending)) {
chan              575 drivers/dma/fsldma.c 		chan_dbg(chan, "no pending LDs\n");
chan              584 drivers/dma/fsldma.c 	if (!chan->idle) {
chan              585 drivers/dma/fsldma.c 		chan_dbg(chan, "DMA controller still busy\n");
chan              598 drivers/dma/fsldma.c 	chan_dbg(chan, "idle, starting controller\n");
chan              599 drivers/dma/fsldma.c 	desc = list_first_entry(&chan->ld_pending, struct fsl_desc_sw, node);
chan              600 drivers/dma/fsldma.c 	list_splice_tail_init(&chan->ld_pending, &chan->ld_running);
chan              607 drivers/dma/fsldma.c 	if ((chan->feature & FSL_DMA_IP_MASK) == FSL_DMA_IP_85XX) {
chan              610 drivers/dma/fsldma.c 		mode = get_mr(chan);
chan              612 drivers/dma/fsldma.c 		set_mr(chan, mode);
chan              619 drivers/dma/fsldma.c 	set_cdar(chan, desc->async_tx.phys);
chan              620 drivers/dma/fsldma.c 	get_cdar(chan);
chan              622 drivers/dma/fsldma.c 	dma_start(chan);
chan              623 drivers/dma/fsldma.c 	chan->idle = false;
chan              635 drivers/dma/fsldma.c static void fsldma_cleanup_descriptors(struct fsldma_chan *chan)
chan              639 drivers/dma/fsldma.c 	dma_addr_t curr_phys = get_cdar(chan);
chan              642 drivers/dma/fsldma.c 	fsldma_clean_completed_descriptor(chan);
chan              645 drivers/dma/fsldma.c 	list_for_each_entry_safe(desc, _desc, &chan->ld_running, node) {
chan              660 drivers/dma/fsldma.c 			if (!dma_is_idle(chan))
chan              664 drivers/dma/fsldma.c 		cookie = fsldma_run_tx_complete_actions(chan, desc, cookie);
chan              666 drivers/dma/fsldma.c 		fsldma_clean_running_descriptor(chan, desc);
chan              675 drivers/dma/fsldma.c 	fsl_chan_xfer_ld_queue(chan);
chan              678 drivers/dma/fsldma.c 		chan->common.completed_cookie = cookie;
chan              691 drivers/dma/fsldma.c 	struct fsldma_chan *chan = to_fsl_chan(dchan);
chan              694 drivers/dma/fsldma.c 	if (chan->desc_pool)
chan              701 drivers/dma/fsldma.c 	chan->desc_pool = dma_pool_create(chan->name, chan->dev,
chan              704 drivers/dma/fsldma.c 	if (!chan->desc_pool) {
chan              705 drivers/dma/fsldma.c 		chan_err(chan, "unable to allocate descriptor pool\n");
chan              720 drivers/dma/fsldma.c static void fsldma_free_desc_list(struct fsldma_chan *chan,
chan              726 drivers/dma/fsldma.c 		fsl_dma_free_descriptor(chan, desc);
chan              729 drivers/dma/fsldma.c static void fsldma_free_desc_list_reverse(struct fsldma_chan *chan,
chan              735 drivers/dma/fsldma.c 		fsl_dma_free_descriptor(chan, desc);
chan              744 drivers/dma/fsldma.c 	struct fsldma_chan *chan = to_fsl_chan(dchan);
chan              746 drivers/dma/fsldma.c 	chan_dbg(chan, "free all channel resources\n");
chan              747 drivers/dma/fsldma.c 	spin_lock_bh(&chan->desc_lock);
chan              748 drivers/dma/fsldma.c 	fsldma_cleanup_descriptors(chan);
chan              749 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_pending);
chan              750 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_running);
chan              751 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_completed);
chan              752 drivers/dma/fsldma.c 	spin_unlock_bh(&chan->desc_lock);
chan              754 drivers/dma/fsldma.c 	dma_pool_destroy(chan->desc_pool);
chan              755 drivers/dma/fsldma.c 	chan->desc_pool = NULL;
chan              763 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan              773 drivers/dma/fsldma.c 	chan = to_fsl_chan(dchan);
chan              778 drivers/dma/fsldma.c 		new = fsl_dma_alloc_descriptor(chan);
chan              780 drivers/dma/fsldma.c 			chan_err(chan, "%s\n", msg_ld_oom);
chan              786 drivers/dma/fsldma.c 		set_desc_cnt(chan, &new->hw, copy);
chan              787 drivers/dma/fsldma.c 		set_desc_src(chan, &new->hw, dma_src);
chan              788 drivers/dma/fsldma.c 		set_desc_dst(chan, &new->hw, dma_dst);
chan              793 drivers/dma/fsldma.c 			set_desc_next(chan, &prev->hw, new->async_tx.phys);
chan              811 drivers/dma/fsldma.c 	set_ld_eol(chan, new);
chan              819 drivers/dma/fsldma.c 	fsldma_free_desc_list_reverse(chan, &first->tx_list);
chan              825 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan              830 drivers/dma/fsldma.c 	chan = to_fsl_chan(dchan);
chan              832 drivers/dma/fsldma.c 	spin_lock_bh(&chan->desc_lock);
chan              835 drivers/dma/fsldma.c 	dma_halt(chan);
chan              838 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_pending);
chan              839 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_running);
chan              840 drivers/dma/fsldma.c 	fsldma_free_desc_list(chan, &chan->ld_completed);
chan              841 drivers/dma/fsldma.c 	chan->idle = true;
chan              843 drivers/dma/fsldma.c 	spin_unlock_bh(&chan->desc_lock);
chan              850 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan              856 drivers/dma/fsldma.c 	chan = to_fsl_chan(dchan);
chan              859 drivers/dma/fsldma.c 	if (!chan->set_request_count)
chan              868 drivers/dma/fsldma.c 	chan->set_request_count(chan, size);
chan              879 drivers/dma/fsldma.c 	struct fsldma_chan *chan = to_fsl_chan(dchan);
chan              881 drivers/dma/fsldma.c 	spin_lock_bh(&chan->desc_lock);
chan              882 drivers/dma/fsldma.c 	fsl_chan_xfer_ld_queue(chan);
chan              883 drivers/dma/fsldma.c 	spin_unlock_bh(&chan->desc_lock);
chan              894 drivers/dma/fsldma.c 	struct fsldma_chan *chan = to_fsl_chan(dchan);
chan              901 drivers/dma/fsldma.c 	spin_lock_bh(&chan->desc_lock);
chan              902 drivers/dma/fsldma.c 	fsldma_cleanup_descriptors(chan);
chan              903 drivers/dma/fsldma.c 	spin_unlock_bh(&chan->desc_lock);
chan              914 drivers/dma/fsldma.c 	struct fsldma_chan *chan = data;
chan              918 drivers/dma/fsldma.c 	stat = get_sr(chan);
chan              919 drivers/dma/fsldma.c 	set_sr(chan, stat);
chan              920 drivers/dma/fsldma.c 	chan_dbg(chan, "irq: stat = 0x%x\n", stat);
chan              928 drivers/dma/fsldma.c 		chan_err(chan, "Transfer Error!\n");
chan              936 drivers/dma/fsldma.c 		chan_dbg(chan, "irq: Programming Error INT\n");
chan              938 drivers/dma/fsldma.c 		if (get_bcr(chan) != 0)
chan              939 drivers/dma/fsldma.c 			chan_err(chan, "Programming Error!\n");
chan              947 drivers/dma/fsldma.c 		chan_dbg(chan, "irq: End-of-Chain link INT\n");
chan              957 drivers/dma/fsldma.c 		chan_dbg(chan, "irq: End-of-link INT\n");
chan              962 drivers/dma/fsldma.c 	if (!dma_is_idle(chan))
chan              963 drivers/dma/fsldma.c 		chan_err(chan, "irq: controller not idle!\n");
chan              967 drivers/dma/fsldma.c 		chan_err(chan, "irq: unhandled sr 0x%08x\n", stat);
chan              974 drivers/dma/fsldma.c 	tasklet_schedule(&chan->tasklet);
chan              975 drivers/dma/fsldma.c 	chan_dbg(chan, "irq: Exit\n");
chan              981 drivers/dma/fsldma.c 	struct fsldma_chan *chan = (struct fsldma_chan *)data;
chan              983 drivers/dma/fsldma.c 	chan_dbg(chan, "tasklet entry\n");
chan              985 drivers/dma/fsldma.c 	spin_lock(&chan->desc_lock);
chan              988 drivers/dma/fsldma.c 	chan->idle = true;
chan              991 drivers/dma/fsldma.c 	fsldma_cleanup_descriptors(chan);
chan              993 drivers/dma/fsldma.c 	spin_unlock(&chan->desc_lock);
chan              995 drivers/dma/fsldma.c 	chan_dbg(chan, "tasklet exit\n");
chan             1001 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1012 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1013 drivers/dma/fsldma.c 		if (!chan)
chan             1017 drivers/dma/fsldma.c 			dev_dbg(fdev->dev, "IRQ: chan %d\n", chan->id);
chan             1018 drivers/dma/fsldma.c 			fsldma_chan_irq(irq, chan);
chan             1031 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1041 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1042 drivers/dma/fsldma.c 		if (chan && chan->irq) {
chan             1043 drivers/dma/fsldma.c 			chan_dbg(chan, "free per-channel IRQ\n");
chan             1044 drivers/dma/fsldma.c 			free_irq(chan->irq, chan);
chan             1051 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1065 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1066 drivers/dma/fsldma.c 		if (!chan)
chan             1069 drivers/dma/fsldma.c 		if (!chan->irq) {
chan             1070 drivers/dma/fsldma.c 			chan_err(chan, "interrupts property missing in device tree\n");
chan             1075 drivers/dma/fsldma.c 		chan_dbg(chan, "request per-channel IRQ\n");
chan             1076 drivers/dma/fsldma.c 		ret = request_irq(chan->irq, fsldma_chan_irq, IRQF_SHARED,
chan             1077 drivers/dma/fsldma.c 				  "fsldma-chan", chan);
chan             1079 drivers/dma/fsldma.c 			chan_err(chan, "unable to request per-channel IRQ\n");
chan             1088 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1089 drivers/dma/fsldma.c 		if (!chan)
chan             1092 drivers/dma/fsldma.c 		if (!chan->irq)
chan             1095 drivers/dma/fsldma.c 		free_irq(chan->irq, chan);
chan             1108 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1113 drivers/dma/fsldma.c 	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan             1114 drivers/dma/fsldma.c 	if (!chan) {
chan             1120 drivers/dma/fsldma.c 	chan->regs = of_iomap(node, 0);
chan             1121 drivers/dma/fsldma.c 	if (!chan->regs) {
chan             1133 drivers/dma/fsldma.c 	chan->feature = feature;
chan             1135 drivers/dma/fsldma.c 		fdev->feature = chan->feature;
chan             1141 drivers/dma/fsldma.c 	WARN_ON(fdev->feature != chan->feature);
chan             1143 drivers/dma/fsldma.c 	chan->dev = fdev->dev;
chan             1144 drivers/dma/fsldma.c 	chan->id = (res.start & 0xfff) < 0x300 ?
chan             1147 drivers/dma/fsldma.c 	if (chan->id >= FSL_DMA_MAX_CHANS_PER_DEVICE) {
chan             1153 drivers/dma/fsldma.c 	fdev->chan[chan->id] = chan;
chan             1154 drivers/dma/fsldma.c 	tasklet_init(&chan->tasklet, dma_do_tasklet, (unsigned long)chan);
chan             1155 drivers/dma/fsldma.c 	snprintf(chan->name, sizeof(chan->name), "chan%d", chan->id);
chan             1158 drivers/dma/fsldma.c 	dma_init(chan);
chan             1161 drivers/dma/fsldma.c 	set_cdar(chan, 0);
chan             1163 drivers/dma/fsldma.c 	switch (chan->feature & FSL_DMA_IP_MASK) {
chan             1165 drivers/dma/fsldma.c 		chan->toggle_ext_pause = fsl_chan_toggle_ext_pause;
chan             1168 drivers/dma/fsldma.c 		chan->toggle_ext_start = fsl_chan_toggle_ext_start;
chan             1169 drivers/dma/fsldma.c 		chan->set_src_loop_size = fsl_chan_set_src_loop_size;
chan             1170 drivers/dma/fsldma.c 		chan->set_dst_loop_size = fsl_chan_set_dst_loop_size;
chan             1171 drivers/dma/fsldma.c 		chan->set_request_count = fsl_chan_set_request_count;
chan             1174 drivers/dma/fsldma.c 	spin_lock_init(&chan->desc_lock);
chan             1175 drivers/dma/fsldma.c 	INIT_LIST_HEAD(&chan->ld_pending);
chan             1176 drivers/dma/fsldma.c 	INIT_LIST_HEAD(&chan->ld_running);
chan             1177 drivers/dma/fsldma.c 	INIT_LIST_HEAD(&chan->ld_completed);
chan             1178 drivers/dma/fsldma.c 	chan->idle = true;
chan             1180 drivers/dma/fsldma.c 	chan->pm_state = RUNNING;
chan             1183 drivers/dma/fsldma.c 	chan->common.device = &fdev->common;
chan             1184 drivers/dma/fsldma.c 	dma_cookie_init(&chan->common);
chan             1187 drivers/dma/fsldma.c 	chan->irq = irq_of_parse_and_map(node, 0);
chan             1190 drivers/dma/fsldma.c 	list_add_tail(&chan->common.device_node, &fdev->common.channels);
chan             1192 drivers/dma/fsldma.c 	dev_info(fdev->dev, "#%d (%s), irq %d\n", chan->id, compatible,
chan             1193 drivers/dma/fsldma.c 		 chan->irq ? chan->irq : fdev->irq);
chan             1198 drivers/dma/fsldma.c 	iounmap(chan->regs);
chan             1200 drivers/dma/fsldma.c 	kfree(chan);
chan             1205 drivers/dma/fsldma.c static void fsl_dma_chan_remove(struct fsldma_chan *chan)
chan             1207 drivers/dma/fsldma.c 	irq_dispose_mapping(chan->irq);
chan             1208 drivers/dma/fsldma.c 	list_del(&chan->common.device_node);
chan             1209 drivers/dma/fsldma.c 	iounmap(chan->regs);
chan             1210 drivers/dma/fsldma.c 	kfree(chan);
chan             1314 drivers/dma/fsldma.c 		if (fdev->chan[i])
chan             1315 drivers/dma/fsldma.c 			fsl_dma_chan_remove(fdev->chan[i]);
chan             1328 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1332 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1333 drivers/dma/fsldma.c 		if (!chan)
chan             1336 drivers/dma/fsldma.c 		spin_lock_bh(&chan->desc_lock);
chan             1337 drivers/dma/fsldma.c 		if (unlikely(!chan->idle))
chan             1339 drivers/dma/fsldma.c 		chan->regs_save.mr = get_mr(chan);
chan             1340 drivers/dma/fsldma.c 		chan->pm_state = SUSPENDED;
chan             1341 drivers/dma/fsldma.c 		spin_unlock_bh(&chan->desc_lock);
chan             1347 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1348 drivers/dma/fsldma.c 		if (!chan)
chan             1350 drivers/dma/fsldma.c 		chan->pm_state = RUNNING;
chan             1351 drivers/dma/fsldma.c 		spin_unlock_bh(&chan->desc_lock);
chan             1359 drivers/dma/fsldma.c 	struct fsldma_chan *chan;
chan             1364 drivers/dma/fsldma.c 		chan = fdev->chan[i];
chan             1365 drivers/dma/fsldma.c 		if (!chan)
chan             1368 drivers/dma/fsldma.c 		spin_lock_bh(&chan->desc_lock);
chan             1369 drivers/dma/fsldma.c 		mode = chan->regs_save.mr
chan             1371 drivers/dma/fsldma.c 		set_mr(chan, mode);
chan             1372 drivers/dma/fsldma.c 		chan->pm_state = RUNNING;
chan             1373 drivers/dma/fsldma.c 		spin_unlock_bh(&chan->desc_lock);
chan              124 drivers/dma/fsldma.h 	struct fsldma_chan *chan[FSL_DMA_MAX_CHANS_PER_DEVICE];
chan              190 drivers/dma/fsldma.h #define to_fsl_chan(chan) container_of(chan, struct fsldma_chan, common)
chan              154 drivers/dma/hsu/hsu.c 	hsuc = &chip->hsu->chan[nr];
chan              212 drivers/dma/hsu/hsu.c 	hsuc = &chip->hsu->chan[nr];
chan              259 drivers/dma/hsu/hsu.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              263 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              287 drivers/dma/hsu/hsu.c static void hsu_dma_issue_pending(struct dma_chan *chan)
chan              289 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              315 drivers/dma/hsu/hsu.c static enum dma_status hsu_dma_tx_status(struct dma_chan *chan,
chan              318 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              324 drivers/dma/hsu/hsu.c 	status = dma_cookie_status(chan, cookie, state);
chan              343 drivers/dma/hsu/hsu.c static int hsu_dma_slave_config(struct dma_chan *chan,
chan              346 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              353 drivers/dma/hsu/hsu.c static int hsu_dma_pause(struct dma_chan *chan)
chan              355 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              368 drivers/dma/hsu/hsu.c static int hsu_dma_resume(struct dma_chan *chan)
chan              370 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              383 drivers/dma/hsu/hsu.c static int hsu_dma_terminate_all(struct dma_chan *chan)
chan              385 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              404 drivers/dma/hsu/hsu.c static void hsu_dma_free_chan_resources(struct dma_chan *chan)
chan              406 drivers/dma/hsu/hsu.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan              409 drivers/dma/hsu/hsu.c static void hsu_dma_synchronize(struct dma_chan *chan)
chan              411 drivers/dma/hsu/hsu.c 	struct hsu_dma_chan *hsuc = to_hsu_dma_chan(chan);
chan              432 drivers/dma/hsu/hsu.c 	hsu->chan = devm_kcalloc(chip->dev, hsu->nr_channels,
chan              433 drivers/dma/hsu/hsu.c 				 sizeof(*hsu->chan), GFP_KERNEL);
chan              434 drivers/dma/hsu/hsu.c 	if (!hsu->chan)
chan              439 drivers/dma/hsu/hsu.c 		struct hsu_dma_chan *hsuc = &hsu->chan[i];
chan              490 drivers/dma/hsu/hsu.c 		struct hsu_dma_chan *hsuc = &hsu->chan[i];
chan               94 drivers/dma/hsu/hsu.h static inline struct hsu_dma_chan *to_hsu_dma_chan(struct dma_chan *chan)
chan               96 drivers/dma/hsu/hsu.h 	return container_of(chan, struct hsu_dma_chan, vchan.chan);
chan              114 drivers/dma/hsu/hsu.h 	struct hsu_dma_chan		*chan;
chan               28 drivers/dma/idma64.c static struct device *chan2dev(struct dma_chan *chan)
chan               30 drivers/dma/idma64.c 	return &chan->dev->device;
chan              107 drivers/dma/idma64.c 	struct idma64 *idma64 = to_idma64(idma64c->vchan.chan.device);
chan              114 drivers/dma/idma64.c 	struct idma64 *idma64 = to_idma64(idma64c->vchan.chan.device);
chan              139 drivers/dma/idma64.c 	struct idma64_chan *idma64c = &idma64->chan[c];
chan              224 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(vdesc->tx.chan);
chan              293 drivers/dma/idma64.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              297 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              329 drivers/dma/idma64.c static void idma64_issue_pending(struct dma_chan *chan)
chan              331 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              365 drivers/dma/idma64.c static enum dma_status idma64_tx_status(struct dma_chan *chan,
chan              368 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              374 drivers/dma/idma64.c 	status = dma_cookie_status(chan, cookie, state);
chan              401 drivers/dma/idma64.c static int idma64_slave_config(struct dma_chan *chan,
chan              404 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              440 drivers/dma/idma64.c static int idma64_pause(struct dma_chan *chan)
chan              442 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              455 drivers/dma/idma64.c static int idma64_resume(struct dma_chan *chan)
chan              457 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              470 drivers/dma/idma64.c static int idma64_terminate_all(struct dma_chan *chan)
chan              472 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              490 drivers/dma/idma64.c static void idma64_synchronize(struct dma_chan *chan)
chan              492 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              497 drivers/dma/idma64.c static int idma64_alloc_chan_resources(struct dma_chan *chan)
chan              499 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              502 drivers/dma/idma64.c 	idma64c->pool = dma_pool_create(dev_name(chan2dev(chan)),
chan              503 drivers/dma/idma64.c 					chan->device->dev,
chan              506 drivers/dma/idma64.c 		dev_err(chan2dev(chan), "No memory for descriptors\n");
chan              513 drivers/dma/idma64.c static void idma64_free_chan_resources(struct dma_chan *chan)
chan              515 drivers/dma/idma64.c 	struct idma64_chan *idma64c = to_idma64_chan(chan);
chan              517 drivers/dma/idma64.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan              543 drivers/dma/idma64.c 	idma64->chan = devm_kcalloc(chip->dev, nr_chan, sizeof(*idma64->chan),
chan              545 drivers/dma/idma64.c 	if (!idma64->chan)
chan              560 drivers/dma/idma64.c 		struct idma64_chan *idma64c = &idma64->chan[i];
chan              617 drivers/dma/idma64.c 		struct idma64_chan *idma64c = &idma64->chan[i];
chan              141 drivers/dma/idma64.h static inline struct idma64_chan *to_idma64_chan(struct dma_chan *chan)
chan              143 drivers/dma/idma64.h 	return container_of(chan, struct idma64_chan, vchan.chan);
chan              190 drivers/dma/idma64.h 	struct idma64_chan *chan;
chan              105 drivers/dma/img-mdc-dma.c 	struct mdc_chan *chan;
chan              262 drivers/dma/img-mdc-dma.c 	struct mdc_dma *mdma = mdesc->chan->mdma;
chan              286 drivers/dma/img-mdc-dma.c 	struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, size_t len,
chan              289 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              301 drivers/dma/img-mdc-dma.c 	mdesc->chan = mchan;
chan              367 drivers/dma/img-mdc-dma.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              371 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              389 drivers/dma/img-mdc-dma.c 	mdesc->chan = mchan;
chan              448 drivers/dma/img-mdc-dma.c 	struct dma_chan *chan, struct scatterlist *sgl,
chan              452 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              472 drivers/dma/img-mdc-dma.c 	mdesc->chan = mchan;
chan              560 drivers/dma/img-mdc-dma.c static void mdc_issue_pending(struct dma_chan *chan)
chan              562 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              571 drivers/dma/img-mdc-dma.c static enum dma_status mdc_tx_status(struct dma_chan *chan,
chan              574 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              581 drivers/dma/img-mdc-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              691 drivers/dma/img-mdc-dma.c static int mdc_terminate_all(struct dma_chan *chan)
chan              693 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              717 drivers/dma/img-mdc-dma.c static void mdc_synchronize(struct dma_chan *chan)
chan              719 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              724 drivers/dma/img-mdc-dma.c static int mdc_slave_config(struct dma_chan *chan,
chan              727 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              737 drivers/dma/img-mdc-dma.c static int mdc_alloc_chan_resources(struct dma_chan *chan)
chan              739 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              745 drivers/dma/img-mdc-dma.c static void mdc_free_chan_resources(struct dma_chan *chan)
chan              747 drivers/dma/img-mdc-dma.c 	struct mdc_chan *mchan = to_mdc_chan(chan);
chan              751 drivers/dma/img-mdc-dma.c 	mdc_terminate_all(chan);
chan              812 drivers/dma/img-mdc-dma.c 	struct dma_chan *chan;
chan              817 drivers/dma/img-mdc-dma.c 	list_for_each_entry(chan, &mdma->dma_dev.channels, device_node) {
chan              818 drivers/dma/img-mdc-dma.c 		struct mdc_chan *mchan = to_mdc_chan(chan);
chan              822 drivers/dma/img-mdc-dma.c 		if (dma_get_slave_channel(chan)) {
chan              825 drivers/dma/img-mdc-dma.c 			return chan;
chan             1032 drivers/dma/img-mdc-dma.c 				 vc.chan.device_node) {
chan             1033 drivers/dma/img-mdc-dma.c 		list_del(&mchan->vc.chan.device_node);
chan              155 drivers/dma/imx-dma.c 	struct dma_chan			chan;
chan              237 drivers/dma/imx-dma.c static struct imxdma_channel *to_imxdma_chan(struct dma_chan *chan)
chan              239 drivers/dma/imx-dma.c 	return container_of(chan, struct imxdma_channel, chan);
chan              283 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
chan              310 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
chan              513 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan);
chan              663 drivers/dma/imx-dma.c static int imxdma_terminate_all(struct dma_chan *chan)
chan              665 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              678 drivers/dma/imx-dma.c static int imxdma_config_write(struct dma_chan *chan,
chan              682 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              727 drivers/dma/imx-dma.c static int imxdma_config(struct dma_chan *chan,
chan              730 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              737 drivers/dma/imx-dma.c static enum dma_status imxdma_tx_status(struct dma_chan *chan,
chan              741 drivers/dma/imx-dma.c 	return dma_cookie_status(chan, cookie, txstate);
chan              746 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(tx->chan);
chan              759 drivers/dma/imx-dma.c static int imxdma_alloc_chan_resources(struct dma_chan *chan)
chan              761 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              762 drivers/dma/imx-dma.c 	struct imx_dma_data *data = chan->private;
chan              774 drivers/dma/imx-dma.c 		dma_async_tx_descriptor_init(&desc->desc, chan);
chan              790 drivers/dma/imx-dma.c static void imxdma_free_chan_resources(struct dma_chan *chan)
chan              792 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              816 drivers/dma/imx-dma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              820 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              867 drivers/dma/imx-dma.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              871 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              919 drivers/dma/imx-dma.c 	imxdma_config_write(chan, &imxdmac->config, direction);
chan              925 drivers/dma/imx-dma.c 	struct dma_chan *chan, dma_addr_t dest,
chan              928 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              956 drivers/dma/imx-dma.c 	struct dma_chan *chan, struct dma_interleaved_template *xt,
chan              959 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan              999 drivers/dma/imx-dma.c static void imxdma_issue_pending(struct dma_chan *chan)
chan             1001 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
chan             1024 drivers/dma/imx-dma.c static bool imxdma_filter_fn(struct dma_chan *chan, void *param)
chan             1027 drivers/dma/imx-dma.c 	struct imxdma_channel *imxdma_chan = to_imxdma_chan(chan);
chan             1029 drivers/dma/imx-dma.c 	if (chan->device->dev != fdata->imxdma->dev)
chan             1033 drivers/dma/imx-dma.c 	chan->private = NULL;
chan             1174 drivers/dma/imx-dma.c 		imxdmac->chan.device = &imxdma->dma_device;
chan             1175 drivers/dma/imx-dma.c 		dma_cookie_init(&imxdmac->chan);
chan             1179 drivers/dma/imx-dma.c 		list_add_tail(&imxdmac->chan.device_node,
chan              449 drivers/dma/imx-sdma.c static int sdma_config_write(struct dma_chan *chan,
chan             1041 drivers/dma/imx-sdma.c static struct sdma_channel *to_sdma_chan(struct dma_chan *chan)
chan             1043 drivers/dma/imx-sdma.c 	return container_of(chan, struct sdma_channel, vc.chan);
chan             1046 drivers/dma/imx-sdma.c static int sdma_disable_channel(struct dma_chan *chan)
chan             1048 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1080 drivers/dma/imx-sdma.c static int sdma_disable_channel_async(struct dma_chan *chan)
chan             1082 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1084 drivers/dma/imx-sdma.c 	sdma_disable_channel(chan);
chan             1092 drivers/dma/imx-sdma.c static void sdma_channel_synchronize(struct dma_chan *chan)
chan             1094 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1141 drivers/dma/imx-sdma.c static int sdma_config_channel(struct dma_chan *chan)
chan             1143 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1146 drivers/dma/imx-sdma.c 	sdma_disable_channel(chan);
chan             1258 drivers/dma/imx-sdma.c static int sdma_alloc_chan_resources(struct dma_chan *chan)
chan             1260 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1261 drivers/dma/imx-sdma.c 	struct imx_dma_data *data = chan->private;
chan             1322 drivers/dma/imx-sdma.c static void sdma_free_chan_resources(struct dma_chan *chan)
chan             1324 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1327 drivers/dma/imx-sdma.c 	sdma_disable_channel_async(chan);
chan             1329 drivers/dma/imx-sdma.c 	sdma_channel_synchronize(chan);
chan             1385 drivers/dma/imx-sdma.c 		struct dma_chan *chan, dma_addr_t dma_dst,
chan             1388 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1396 drivers/dma/imx-sdma.c 	if (!chan || !len)
chan             1441 drivers/dma/imx-sdma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan             1445 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1452 drivers/dma/imx-sdma.c 	sdma_config_write(chan, &sdmac->slave_config, direction);
chan             1525 drivers/dma/imx-sdma.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan             1529 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1538 drivers/dma/imx-sdma.c 	sdma_config_write(chan, &sdmac->slave_config, direction);
chan             1595 drivers/dma/imx-sdma.c static int sdma_config_write(struct dma_chan *chan,
chan             1599 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1621 drivers/dma/imx-sdma.c 	return sdma_config_channel(chan);
chan             1624 drivers/dma/imx-sdma.c static int sdma_config(struct dma_chan *chan,
chan             1627 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1647 drivers/dma/imx-sdma.c static enum dma_status sdma_tx_status(struct dma_chan *chan,
chan             1651 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1658 drivers/dma/imx-sdma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1678 drivers/dma/imx-sdma.c 	dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie,
chan             1684 drivers/dma/imx-sdma.c static void sdma_issue_pending(struct dma_chan *chan)
chan             1686 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1939 drivers/dma/imx-sdma.c static bool sdma_filter_fn(struct dma_chan *chan, void *fn_param)
chan             1941 drivers/dma/imx-sdma.c 	struct sdma_channel *sdmac = to_sdma_chan(chan);
chan             1944 drivers/dma/imx-sdma.c 	if (!imx_dma_is_general_purpose(chan))
chan             1948 drivers/dma/imx-sdma.c 	chan->private = &sdmac->data;
chan             2198 drivers/dma/imx-sdma.c 		sdma_free_chan_resources(&sdmac->vc.chan);
chan              300 drivers/dma/ioat/dma.c 	struct dma_chan *c = tx->chan;
chan              325 drivers/dma/ioat/dma.c ioat_alloc_ring_ent(struct dma_chan *chan, int idx, gfp_t flags)
chan              329 drivers/dma/ioat/dma.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              347 drivers/dma/ioat/dma.c 	dma_async_tx_descriptor_init(&desc->txd, chan);
chan              354 drivers/dma/ioat/dma.c void ioat_free_ring_ent(struct ioat_ring_ent *desc, struct dma_chan *chan)
chan              363 drivers/dma/ioat/dma.h ioat_prep_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              366 drivers/dma/ioat/dma.h ioat_prep_xor_val(struct dma_chan *chan, dma_addr_t *src,
chan              370 drivers/dma/ioat/dma.h ioat_prep_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
chan              374 drivers/dma/ioat/dma.h ioat_prep_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
chan              378 drivers/dma/ioat/dma.h ioat_prep_pqxor(struct dma_chan *chan, dma_addr_t dst, dma_addr_t *src,
chan              381 drivers/dma/ioat/dma.h ioat_prep_pqxor_val(struct dma_chan *chan, dma_addr_t *src,
chan              391 drivers/dma/ioat/dma.h void ioat_free_ring_ent(struct ioat_ring_ent *desc, struct dma_chan *chan);
chan              399 drivers/dma/ioat/dma.h void ioat_issue_pending(struct dma_chan *chan);
chan              245 drivers/dma/ioat/prep.c ioat_prep_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              248 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              253 drivers/dma/ioat/prep.c 	return __ioat_prep_xor_lock(chan, NULL, dest, src, src_cnt, len, flags);
chan              257 drivers/dma/ioat/prep.c ioat_prep_xor_val(struct dma_chan *chan, dma_addr_t *src,
chan              261 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              271 drivers/dma/ioat/prep.c 	return __ioat_prep_xor_lock(chan, result, src[0], &src[1],
chan              574 drivers/dma/ioat/prep.c ioat_prep_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
chan              578 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              603 drivers/dma/ioat/prep.c 			__ioat_prep_pq16_lock(chan, NULL, dst, single_source,
chan              606 drivers/dma/ioat/prep.c 			__ioat_prep_pq_lock(chan, NULL, dst, single_source, 2,
chan              611 drivers/dma/ioat/prep.c 			__ioat_prep_pq16_lock(chan, NULL, dst, src, src_cnt,
chan              613 drivers/dma/ioat/prep.c 			__ioat_prep_pq_lock(chan, NULL, dst, src, src_cnt,
chan              619 drivers/dma/ioat/prep.c ioat_prep_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
chan              623 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              640 drivers/dma/ioat/prep.c 		__ioat_prep_pq16_lock(chan, pqres, pq, src, src_cnt, scf, len,
chan              642 drivers/dma/ioat/prep.c 		__ioat_prep_pq_lock(chan, pqres, pq, src, src_cnt, scf, len,
chan              647 drivers/dma/ioat/prep.c ioat_prep_pqxor(struct dma_chan *chan, dma_addr_t dst, dma_addr_t *src,
chan              652 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              666 drivers/dma/ioat/prep.c 		__ioat_prep_pq16_lock(chan, NULL, pq, src, src_cnt, scf, len,
chan              668 drivers/dma/ioat/prep.c 		__ioat_prep_pq_lock(chan, NULL, pq, src, src_cnt, scf, len,
chan              673 drivers/dma/ioat/prep.c ioat_prep_pqxor_val(struct dma_chan *chan, dma_addr_t *src,
chan              679 drivers/dma/ioat/prep.c 	struct ioatdma_chan *ioat_chan = to_ioat_chan(chan);
chan              698 drivers/dma/ioat/prep.c 		__ioat_prep_pq16_lock(chan, result, pq, &src[1], src_cnt - 1,
chan              700 drivers/dma/ioat/prep.c 		__ioat_prep_pq_lock(chan, result, pq, &src[1], src_cnt - 1,
chan               28 drivers/dma/iop-adma.c #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common)
chan              364 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(tx->chan);
chan              417 drivers/dma/iop-adma.c static int iop_adma_alloc_chan_resources(struct dma_chan *chan)
chan              421 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              443 drivers/dma/iop-adma.c 		dma_async_tx_descriptor_init(&slot->async_tx, chan);
chan              484 drivers/dma/iop-adma.c iop_adma_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags)
chan              486 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              506 drivers/dma/iop-adma.c iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
chan              509 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              537 drivers/dma/iop-adma.c iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest,
chan              541 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              572 drivers/dma/iop-adma.c iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src,
chan              576 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              607 drivers/dma/iop-adma.c iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
chan              611 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              671 drivers/dma/iop-adma.c iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
chan              676 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              714 drivers/dma/iop-adma.c static void iop_adma_free_chan_resources(struct dma_chan *chan)
chan              716 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              752 drivers/dma/iop-adma.c static enum dma_status iop_adma_status(struct dma_chan *chan,
chan              756 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan              759 drivers/dma/iop-adma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              765 drivers/dma/iop-adma.c 	return dma_cookie_status(chan, cookie, txstate);
chan              770 drivers/dma/iop-adma.c 	struct iop_adma_chan *chan = data;
chan              772 drivers/dma/iop-adma.c 	dev_dbg(chan->device->common.dev, "%s\n", __func__);
chan              774 drivers/dma/iop-adma.c 	tasklet_schedule(&chan->irq_tasklet);
chan              776 drivers/dma/iop-adma.c 	iop_adma_device_clear_eot_status(chan);
chan              783 drivers/dma/iop-adma.c 	struct iop_adma_chan *chan = data;
chan              785 drivers/dma/iop-adma.c 	dev_dbg(chan->device->common.dev, "%s\n", __func__);
chan              787 drivers/dma/iop-adma.c 	tasklet_schedule(&chan->irq_tasklet);
chan              789 drivers/dma/iop-adma.c 	iop_adma_device_clear_eoc_status(chan);
chan              796 drivers/dma/iop-adma.c 	struct iop_adma_chan *chan = data;
chan              797 drivers/dma/iop-adma.c 	unsigned long status = iop_chan_get_status(chan);
chan              799 drivers/dma/iop-adma.c 	dev_err(chan->device->common.dev,
chan              801 drivers/dma/iop-adma.c 		iop_is_err_int_parity(status, chan) ? "int_parity " : "",
chan              802 drivers/dma/iop-adma.c 		iop_is_err_mcu_abort(status, chan) ? "mcu_abort " : "",
chan              803 drivers/dma/iop-adma.c 		iop_is_err_int_tabort(status, chan) ? "int_tabort " : "",
chan              804 drivers/dma/iop-adma.c 		iop_is_err_int_mabort(status, chan) ? "int_mabort " : "",
chan              805 drivers/dma/iop-adma.c 		iop_is_err_pci_tabort(status, chan) ? "pci_tabort " : "",
chan              806 drivers/dma/iop-adma.c 		iop_is_err_pci_mabort(status, chan) ? "pci_mabort " : "",
chan              807 drivers/dma/iop-adma.c 		iop_is_err_split_tx(status, chan) ? "split_tx " : "");
chan              809 drivers/dma/iop-adma.c 	iop_adma_device_clear_err_status(chan);
chan              816 drivers/dma/iop-adma.c static void iop_adma_issue_pending(struct dma_chan *chan)
chan              818 drivers/dma/iop-adma.c 	struct iop_adma_chan *iop_chan = to_iop_adma_chan(chan);
chan             1245 drivers/dma/iop-adma.c 	struct dma_chan *chan, *_chan;
chan             1254 drivers/dma/iop-adma.c 	list_for_each_entry_safe(chan, _chan, &device->common.channels,
chan             1256 drivers/dma/iop-adma.c 		iop_chan = to_iop_adma_chan(chan);
chan             1257 drivers/dma/iop-adma.c 		list_del(&chan->device_node);
chan               12 drivers/dma/iop-adma.h #define DMA_CCR(chan)		(chan->mmr_base + 0x0)
chan               13 drivers/dma/iop-adma.h #define DMA_CSR(chan)		(chan->mmr_base + 0x4)
chan               14 drivers/dma/iop-adma.h #define DMA_DAR(chan)		(chan->mmr_base + 0xc)
chan               15 drivers/dma/iop-adma.h #define DMA_NDAR(chan)		(chan->mmr_base + 0x10)
chan               16 drivers/dma/iop-adma.h #define DMA_PADR(chan)		(chan->mmr_base + 0x14)
chan               17 drivers/dma/iop-adma.h #define DMA_PUADR(chan)	(chan->mmr_base + 0x18)
chan               18 drivers/dma/iop-adma.h #define DMA_LADR(chan)		(chan->mmr_base + 0x1c)
chan               19 drivers/dma/iop-adma.h #define DMA_BCR(chan)		(chan->mmr_base + 0x20)
chan               20 drivers/dma/iop-adma.h #define DMA_DCR(chan)		(chan->mmr_base + 0x24)
chan               23 drivers/dma/iop-adma.h #define AAU_ACR(chan)		(chan->mmr_base + 0x0)
chan               24 drivers/dma/iop-adma.h #define AAU_ASR(chan)		(chan->mmr_base + 0x4)
chan               25 drivers/dma/iop-adma.h #define AAU_ADAR(chan)		(chan->mmr_base + 0x8)
chan               26 drivers/dma/iop-adma.h #define AAU_ANDAR(chan)	(chan->mmr_base + 0xc)
chan               27 drivers/dma/iop-adma.h #define AAU_SAR(src, chan)	(chan->mmr_base + (0x10 + ((src) << 2)))
chan               28 drivers/dma/iop-adma.h #define AAU_DAR(chan)		(chan->mmr_base + 0x20)
chan               29 drivers/dma/iop-adma.h #define AAU_ABCR(chan)		(chan->mmr_base + 0x24)
chan               30 drivers/dma/iop-adma.h #define AAU_ADCR(chan)		(chan->mmr_base + 0x28)
chan               31 drivers/dma/iop-adma.h #define AAU_SAR_EDCR(src_edc)	(chan->mmr_base + (0x02c + ((src_edc-4) << 2)))
chan              240 drivers/dma/iop-adma.h static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
chan              242 drivers/dma/iop-adma.h 	int id = chan->device->id;
chan              247 drivers/dma/iop-adma.h 		return __raw_readl(DMA_DAR(chan));
chan              249 drivers/dma/iop-adma.h 		return __raw_readl(AAU_ADAR(chan));
chan              256 drivers/dma/iop-adma.h static inline void iop_chan_set_next_descriptor(struct iop_adma_chan *chan,
chan              259 drivers/dma/iop-adma.h 	int id = chan->device->id;
chan              264 drivers/dma/iop-adma.h 		__raw_writel(next_desc_addr, DMA_NDAR(chan));
chan              267 drivers/dma/iop-adma.h 		__raw_writel(next_desc_addr, AAU_ANDAR(chan));
chan              278 drivers/dma/iop-adma.h static inline int iop_chan_is_busy(struct iop_adma_chan *chan)
chan              280 drivers/dma/iop-adma.h 	u32 status = __raw_readl(DMA_CSR(chan));
chan              323 drivers/dma/iop-adma.h iop_chan_interrupt_slot_count(int *slots_per_op, struct iop_adma_chan *chan)
chan              325 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              379 drivers/dma/iop-adma.h 					struct iop_adma_chan *chan)
chan              383 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              412 drivers/dma/iop-adma.h 					struct iop_adma_chan *chan,
chan              417 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              629 drivers/dma/iop-adma.h 					struct iop_adma_chan *chan,
chan              634 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              649 drivers/dma/iop-adma.h 			struct iop_adma_chan *chan)
chan              653 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              696 drivers/dma/iop-adma.h 					struct iop_adma_chan *chan,
chan              701 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              793 drivers/dma/iop-adma.h static inline void iop_chan_append(struct iop_adma_chan *chan)
chan              797 drivers/dma/iop-adma.h 	dma_chan_ctrl = __raw_readl(DMA_CCR(chan));
chan              799 drivers/dma/iop-adma.h 	__raw_writel(dma_chan_ctrl, DMA_CCR(chan));
chan              802 drivers/dma/iop-adma.h static inline u32 iop_chan_get_status(struct iop_adma_chan *chan)
chan              804 drivers/dma/iop-adma.h 	return __raw_readl(DMA_CSR(chan));
chan              807 drivers/dma/iop-adma.h static inline void iop_chan_disable(struct iop_adma_chan *chan)
chan              809 drivers/dma/iop-adma.h 	u32 dma_chan_ctrl = __raw_readl(DMA_CCR(chan));
chan              811 drivers/dma/iop-adma.h 	__raw_writel(dma_chan_ctrl, DMA_CCR(chan));
chan              814 drivers/dma/iop-adma.h static inline void iop_chan_enable(struct iop_adma_chan *chan)
chan              816 drivers/dma/iop-adma.h 	u32 dma_chan_ctrl = __raw_readl(DMA_CCR(chan));
chan              819 drivers/dma/iop-adma.h 	__raw_writel(dma_chan_ctrl, DMA_CCR(chan));
chan              822 drivers/dma/iop-adma.h static inline void iop_adma_device_clear_eot_status(struct iop_adma_chan *chan)
chan              824 drivers/dma/iop-adma.h 	u32 status = __raw_readl(DMA_CSR(chan));
chan              826 drivers/dma/iop-adma.h 	__raw_writel(status, DMA_CSR(chan));
chan              829 drivers/dma/iop-adma.h static inline void iop_adma_device_clear_eoc_status(struct iop_adma_chan *chan)
chan              831 drivers/dma/iop-adma.h 	u32 status = __raw_readl(DMA_CSR(chan));
chan              833 drivers/dma/iop-adma.h 	__raw_writel(status, DMA_CSR(chan));
chan              836 drivers/dma/iop-adma.h static inline void iop_adma_device_clear_err_status(struct iop_adma_chan *chan)
chan              838 drivers/dma/iop-adma.h 	u32 status = __raw_readl(DMA_CSR(chan));
chan              840 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              852 drivers/dma/iop-adma.h 	__raw_writel(status, DMA_CSR(chan));
chan              856 drivers/dma/iop-adma.h iop_is_err_int_parity(unsigned long status, struct iop_adma_chan *chan)
chan              862 drivers/dma/iop-adma.h iop_is_err_mcu_abort(unsigned long status, struct iop_adma_chan *chan)
chan              868 drivers/dma/iop-adma.h iop_is_err_int_tabort(unsigned long status, struct iop_adma_chan *chan)
chan              874 drivers/dma/iop-adma.h iop_is_err_int_mabort(unsigned long status, struct iop_adma_chan *chan)
chan              880 drivers/dma/iop-adma.h iop_is_err_pci_tabort(unsigned long status, struct iop_adma_chan *chan)
chan              882 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              892 drivers/dma/iop-adma.h iop_is_err_pci_mabort(unsigned long status, struct iop_adma_chan *chan)
chan              894 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              904 drivers/dma/iop-adma.h iop_is_err_split_tx(unsigned long status, struct iop_adma_chan *chan)
chan              906 drivers/dma/iop-adma.h 	switch (chan->device->id) {
chan              822 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(tx->chan);
chan              823 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(tx->chan->device);
chan             1333 drivers/dma/ipu/ipu_idmac.c static struct dma_async_tx_descriptor *idmac_prep_slave_sg(struct dma_chan *chan,
chan             1338 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1344 drivers/dma/ipu/ipu_idmac.c 	if (chan->chan_id != IDMAC_SDC_0 && chan->chan_id != IDMAC_SDC_1 &&
chan             1345 drivers/dma/ipu/ipu_idmac.c 	    chan->chan_id != IDMAC_IC_7)
chan             1349 drivers/dma/ipu/ipu_idmac.c 		dev_err(chan->device->dev, "Invalid DMA direction %d!\n", direction);
chan             1371 drivers/dma/ipu/ipu_idmac.c 	tasklet_schedule(&to_ipu(to_idmac(chan->device))->tasklet);
chan             1377 drivers/dma/ipu/ipu_idmac.c static void idmac_issue_pending(struct dma_chan *chan)
chan             1379 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1380 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(chan->device);
chan             1386 drivers/dma/ipu/ipu_idmac.c 	ipu_select_buffer(chan->chan_id, ichan->active_buffer);
chan             1397 drivers/dma/ipu/ipu_idmac.c static int idmac_pause(struct dma_chan *chan)
chan             1399 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1400 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(chan->device);
chan             1408 drivers/dma/ipu/ipu_idmac.c 	ipu_ic_disable_task(ipu, chan->chan_id);
chan             1426 drivers/dma/ipu/ipu_idmac.c static int __idmac_terminate_all(struct dma_chan *chan)
chan             1428 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1429 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(chan->device);
chan             1464 drivers/dma/ipu/ipu_idmac.c static int idmac_terminate_all(struct dma_chan *chan)
chan             1466 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1471 drivers/dma/ipu/ipu_idmac.c 	ret = __idmac_terminate_all(chan);
chan             1500 drivers/dma/ipu/ipu_idmac.c static int idmac_alloc_chan_resources(struct dma_chan *chan)
chan             1502 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1503 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(chan->device);
chan             1507 drivers/dma/ipu/ipu_idmac.c 	BUG_ON(chan->client_count > 1);
chan             1510 drivers/dma/ipu/ipu_idmac.c 	dma_cookie_init(chan);
chan             1512 drivers/dma/ipu/ipu_idmac.c 	ret = ipu_irq_map(chan->chan_id);
chan             1534 drivers/dma/ipu/ipu_idmac.c 	if (chan->chan_id == IDMAC_IC_7) {
chan             1539 drivers/dma/ipu/ipu_idmac.c 				dev_err(&chan->dev->device, "request irq failed for IC SOF");
chan             1545 drivers/dma/ipu/ipu_idmac.c 				dev_err(&chan->dev->device, "request irq failed for IC EOF");
chan             1552 drivers/dma/ipu/ipu_idmac.c 	dev_dbg(&chan->dev->device, "Found channel 0x%x, irq %d\n",
chan             1553 drivers/dma/ipu/ipu_idmac.c 		chan->chan_id, ichan->eof_irq);
chan             1560 drivers/dma/ipu/ipu_idmac.c 	ipu_irq_unmap(chan->chan_id);
chan             1565 drivers/dma/ipu/ipu_idmac.c static void idmac_free_chan_resources(struct dma_chan *chan)
chan             1567 drivers/dma/ipu/ipu_idmac.c 	struct idmac_channel *ichan = to_idmac_chan(chan);
chan             1568 drivers/dma/ipu/ipu_idmac.c 	struct idmac *idmac = to_idmac(chan->device);
chan             1572 drivers/dma/ipu/ipu_idmac.c 	__idmac_terminate_all(chan);
chan             1576 drivers/dma/ipu/ipu_idmac.c 		if (chan->chan_id == IDMAC_IC_7) {
chan             1590 drivers/dma/ipu/ipu_idmac.c 		ipu_irq_unmap(chan->chan_id);
chan             1602 drivers/dma/ipu/ipu_idmac.c static enum dma_status idmac_tx_status(struct dma_chan *chan,
chan             1605 drivers/dma/ipu/ipu_idmac.c 	return dma_cookie_status(chan, cookie, txstate);
chan              125 drivers/dma/k3dma.c static int k3_dma_config_write(struct dma_chan *chan,
chan              129 drivers/dma/k3dma.c static struct k3_dma_chan *to_k3_chan(struct dma_chan *chan)
chan              131 drivers/dma/k3dma.c 	return container_of(chan, struct k3_dma_chan, vc.chan);
chan              267 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(c->vc.chan.device);
chan              308 drivers/dma/k3dma.c 	list_for_each_entry_safe(c, cn, &d->slave.channels, vc.chan.device_node) {
chan              361 drivers/dma/k3dma.c static void k3_dma_free_chan_resources(struct dma_chan *chan)
chan              363 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              364 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              375 drivers/dma/k3dma.c static enum dma_status k3_dma_tx_status(struct dma_chan *chan,
chan              378 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              379 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              386 drivers/dma/k3dma.c 	ret = dma_cookie_status(&c->vc.chan, cookie, state);
chan              423 drivers/dma/k3dma.c static void k3_dma_issue_pending(struct dma_chan *chan)
chan              425 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              426 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              463 drivers/dma/k3dma.c 							struct dma_chan *chan)
chan              465 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              467 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              471 drivers/dma/k3dma.c 		dev_dbg(chan->device->dev, "vch %p: sg num %d exceed max %d\n",
chan              482 drivers/dma/k3dma.c 		dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
chan              491 drivers/dma/k3dma.c 	struct dma_chan *chan,	dma_addr_t dst, dma_addr_t src,
chan              494 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              504 drivers/dma/k3dma.c 	ds = k3_dma_alloc_desc_resource(num, chan);
chan              533 drivers/dma/k3dma.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned int sglen,
chan              536 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              554 drivers/dma/k3dma.c 	ds = k3_dma_alloc_desc_resource(num, chan);
chan              558 drivers/dma/k3dma.c 	k3_dma_config_write(chan, dir, &c->slave_config);
chan              589 drivers/dma/k3dma.c k3_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
chan              594 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              602 drivers/dma/k3dma.c 	dev_dbg(chan->device->dev, "%s: buf %pad, dst %pad, buf len %zu, period_len = %zu, dir %d\n",
chan              603 drivers/dma/k3dma.c 	       __func__, &buf_addr, &to_k3_chan(chan)->dev_addr,
chan              610 drivers/dma/k3dma.c 	ds = k3_dma_alloc_desc_resource(num, chan);
chan              619 drivers/dma/k3dma.c 	k3_dma_config_write(chan, dir, &c->slave_config);
chan              656 drivers/dma/k3dma.c static int k3_dma_config(struct dma_chan *chan,
chan              659 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              666 drivers/dma/k3dma.c static int k3_dma_config_write(struct dma_chan *chan,
chan              670 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              706 drivers/dma/k3dma.c 	c->ccfg |= c->vc.chan.chan_id << 4;
chan              715 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(vd->tx.chan->device);
chan              721 drivers/dma/k3dma.c static int k3_dma_terminate_all(struct dma_chan *chan)
chan              723 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              724 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              756 drivers/dma/k3dma.c static void k3_dma_synchronize(struct dma_chan *chan)
chan              758 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              763 drivers/dma/k3dma.c static int k3_dma_transfer_pause(struct dma_chan *chan)
chan              765 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              766 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              784 drivers/dma/k3dma.c static int k3_dma_transfer_resume(struct dma_chan *chan)
chan              786 drivers/dma/k3dma.c 	struct k3_dma_chan *c = to_k3_chan(chan);
chan              787 drivers/dma/k3dma.c 	struct k3_dma_dev *d = to_k3_dma(chan->device);
chan              836 drivers/dma/k3dma.c 	return dma_get_slave_channel(&(d->chans[request].vc.chan));
chan              993 drivers/dma/k3dma.c 	list_for_each_entry_safe(c, cn, &d->slave.channels, vc.chan.device_node) {
chan              994 drivers/dma/k3dma.c 		list_del(&c->vc.chan.device_node);
chan              297 drivers/dma/mcf-edma.c bool mcf_edma_filter_fn(struct dma_chan *chan, void *param)
chan              299 drivers/dma/mcf-edma.c 	if (chan->device->dev->driver == &mcf_edma_driver.driver) {
chan              300 drivers/dma/mcf-edma.c 		struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan);
chan              149 drivers/dma/mediatek/mtk-cqdma.c static struct mtk_cqdma_device *to_cqdma_dev(struct dma_chan *chan)
chan              151 drivers/dma/mediatek/mtk-cqdma.c 	return container_of(chan->device, struct mtk_cqdma_device, ddev);
chan              154 drivers/dma/mediatek/mtk-cqdma.c static struct mtk_cqdma_vchan *to_cqdma_vchan(struct dma_chan *chan)
chan              156 drivers/dma/mediatek/mtk-cqdma.c 	return container_of(chan, struct mtk_cqdma_vchan, vc.chan);
chan              913 drivers/dma/mediatek/mtk-cqdma.c 		list_del(&vc->vc.chan.device_node);
chan              249 drivers/dma/mediatek/mtk-hsdma.c static struct mtk_hsdma_device *to_hsdma_dev(struct dma_chan *chan)
chan              251 drivers/dma/mediatek/mtk-hsdma.c 	return container_of(chan->device, struct mtk_hsdma_device, ddev);
chan              254 drivers/dma/mediatek/mtk-hsdma.c static inline struct mtk_hsdma_vchan *to_hsdma_vchan(struct dma_chan *chan)
chan              256 drivers/dma/mediatek/mtk-hsdma.c 	return container_of(chan, struct mtk_hsdma_vchan, vc.chan);
chan              584 drivers/dma/mediatek/mtk-hsdma.c 			hvc = to_hsdma_vchan(cb->vd->tx.chan);
chan             1025 drivers/dma/mediatek/mtk-hsdma.c 		list_del(&vc->vc.chan.device_node);
chan              112 drivers/dma/mediatek/mtk-uart-apdma.c 	return container_of(c, struct mtk_chan, vc.chan);
chan              134 drivers/dma/mediatek/mtk-uart-apdma.c 	struct dma_chan *chan = vd->tx.chan;
chan              135 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              143 drivers/dma/mediatek/mtk-uart-apdma.c 				to_mtk_uart_apdma_dev(c->vc.chan.device);
chan              161 drivers/dma/mediatek/mtk-uart-apdma.c 		dev_err(c->vc.chan.device->dev, "Enable TX fail\n");
chan              186 drivers/dma/mediatek/mtk-uart-apdma.c 				to_mtk_uart_apdma_dev(c->vc.chan.device);
chan              205 drivers/dma/mediatek/mtk-uart-apdma.c 		dev_err(c->vc.chan.device->dev, "Enable RX fail\n");
chan              255 drivers/dma/mediatek/mtk-uart-apdma.c 	struct dma_chan *chan = (struct dma_chan *)dev_id;
chan              256 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              269 drivers/dma/mediatek/mtk-uart-apdma.c static int mtk_uart_apdma_alloc_chan_resources(struct dma_chan *chan)
chan              271 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = to_mtk_uart_apdma_dev(chan->device);
chan              272 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              278 drivers/dma/mediatek/mtk-uart-apdma.c 		pm_runtime_put_noidle(chan->device->dev);
chan              293 drivers/dma/mediatek/mtk-uart-apdma.c 			  IRQF_TRIGGER_NONE, KBUILD_MODNAME, chan);
chan              295 drivers/dma/mediatek/mtk-uart-apdma.c 		dev_err(chan->device->dev, "Can't request dma IRQ\n");
chan              305 drivers/dma/mediatek/mtk-uart-apdma.c static void mtk_uart_apdma_free_chan_resources(struct dma_chan *chan)
chan              307 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_uart_apdmadev *mtkd = to_mtk_uart_apdma_dev(chan->device);
chan              308 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              310 drivers/dma/mediatek/mtk-uart-apdma.c 	free_irq(c->irq, chan);
chan              319 drivers/dma/mediatek/mtk-uart-apdma.c static enum dma_status mtk_uart_apdma_tx_status(struct dma_chan *chan,
chan              323 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              326 drivers/dma/mediatek/mtk-uart-apdma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              340 drivers/dma/mediatek/mtk-uart-apdma.c 	(struct dma_chan *chan, struct scatterlist *sgl,
chan              344 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              362 drivers/dma/mediatek/mtk-uart-apdma.c static void mtk_uart_apdma_issue_pending(struct dma_chan *chan)
chan              364 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              382 drivers/dma/mediatek/mtk-uart-apdma.c static int mtk_uart_apdma_slave_config(struct dma_chan *chan,
chan              385 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              392 drivers/dma/mediatek/mtk-uart-apdma.c static int mtk_uart_apdma_terminate_all(struct dma_chan *chan)
chan              394 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              405 drivers/dma/mediatek/mtk-uart-apdma.c 		dev_err(c->vc.chan.device->dev, "flush: fail, status=0x%x\n",
chan              418 drivers/dma/mediatek/mtk-uart-apdma.c 		dev_err(c->vc.chan.device->dev, "stop: fail, status=0x%x\n",
chan              439 drivers/dma/mediatek/mtk-uart-apdma.c static int mtk_uart_apdma_device_pause(struct dma_chan *chan)
chan              441 drivers/dma/mediatek/mtk-uart-apdma.c 	struct mtk_chan *c = to_mtk_uart_apdma_chan(chan);
chan              460 drivers/dma/mediatek/mtk-uart-apdma.c 			struct mtk_chan, vc.chan.device_node);
chan              462 drivers/dma/mediatek/mtk-uart-apdma.c 		list_del(&c->vc.chan.device_node);
chan              240 drivers/dma/mic_x100_dma.c 	struct mic_dma_chan *mic_ch = to_mic_dma_chan(tx->chan);
chan               92 drivers/dma/mmp_pdma.c 	struct dma_chan chan;
chan              137 drivers/dma/mmp_pdma.c 	container_of(dchan, struct mmp_pdma_chan, chan)
chan              243 drivers/dma/mmp_pdma.c 	struct mmp_pdma_device *pdev = to_mmp_pdma_dev(pchan->chan.device);
chan              276 drivers/dma/mmp_pdma.c 	struct mmp_pdma_device *pdev = to_mmp_pdma_dev(pchan->chan.device);
chan              297 drivers/dma/mmp_pdma.c static void start_pending_queue(struct mmp_pdma_chan *chan)
chan              302 drivers/dma/mmp_pdma.c 	if (!chan->idle) {
chan              303 drivers/dma/mmp_pdma.c 		dev_dbg(chan->dev, "DMA controller still busy\n");
chan              307 drivers/dma/mmp_pdma.c 	if (list_empty(&chan->chain_pending)) {
chan              309 drivers/dma/mmp_pdma.c 		mmp_pdma_free_phy(chan);
chan              310 drivers/dma/mmp_pdma.c 		dev_dbg(chan->dev, "no pending list\n");
chan              314 drivers/dma/mmp_pdma.c 	if (!chan->phy) {
chan              315 drivers/dma/mmp_pdma.c 		chan->phy = lookup_phy(chan);
chan              316 drivers/dma/mmp_pdma.c 		if (!chan->phy) {
chan              317 drivers/dma/mmp_pdma.c 			dev_dbg(chan->dev, "no free dma channel\n");
chan              326 drivers/dma/mmp_pdma.c 	desc = list_first_entry(&chan->chain_pending,
chan              328 drivers/dma/mmp_pdma.c 	list_splice_tail_init(&chan->chain_pending, &chan->chain_running);
chan              334 drivers/dma/mmp_pdma.c 	set_desc(chan->phy, desc->async_tx.phys);
chan              335 drivers/dma/mmp_pdma.c 	enable_chan(chan->phy);
chan              336 drivers/dma/mmp_pdma.c 	chan->idle = false;
chan              343 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(tx->chan);
chan              349 drivers/dma/mmp_pdma.c 	spin_lock_irqsave(&chan->desc_lock, flags);
chan              356 drivers/dma/mmp_pdma.c 	list_splice_tail_init(&desc->tx_list, &chan->chain_pending);
chan              358 drivers/dma/mmp_pdma.c 	spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              364 drivers/dma/mmp_pdma.c mmp_pdma_alloc_descriptor(struct mmp_pdma_chan *chan)
chan              369 drivers/dma/mmp_pdma.c 	desc = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &pdesc);
chan              371 drivers/dma/mmp_pdma.c 		dev_err(chan->dev, "out of memory for link descriptor\n");
chan              376 drivers/dma/mmp_pdma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->chan);
chan              394 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              396 drivers/dma/mmp_pdma.c 	if (chan->desc_pool)
chan              399 drivers/dma/mmp_pdma.c 	chan->desc_pool = dma_pool_create(dev_name(&dchan->dev->device),
chan              400 drivers/dma/mmp_pdma.c 					  chan->dev,
chan              404 drivers/dma/mmp_pdma.c 	if (!chan->desc_pool) {
chan              405 drivers/dma/mmp_pdma.c 		dev_err(chan->dev, "unable to allocate descriptor pool\n");
chan              409 drivers/dma/mmp_pdma.c 	mmp_pdma_free_phy(chan);
chan              410 drivers/dma/mmp_pdma.c 	chan->idle = true;
chan              411 drivers/dma/mmp_pdma.c 	chan->dev_addr = 0;
chan              415 drivers/dma/mmp_pdma.c static void mmp_pdma_free_desc_list(struct mmp_pdma_chan *chan,
chan              422 drivers/dma/mmp_pdma.c 		dma_pool_free(chan->desc_pool, desc, desc->async_tx.phys);
chan              428 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              431 drivers/dma/mmp_pdma.c 	spin_lock_irqsave(&chan->desc_lock, flags);
chan              432 drivers/dma/mmp_pdma.c 	mmp_pdma_free_desc_list(chan, &chan->chain_pending);
chan              433 drivers/dma/mmp_pdma.c 	mmp_pdma_free_desc_list(chan, &chan->chain_running);
chan              434 drivers/dma/mmp_pdma.c 	spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              436 drivers/dma/mmp_pdma.c 	dma_pool_destroy(chan->desc_pool);
chan              437 drivers/dma/mmp_pdma.c 	chan->desc_pool = NULL;
chan              438 drivers/dma/mmp_pdma.c 	chan->idle = true;
chan              439 drivers/dma/mmp_pdma.c 	chan->dev_addr = 0;
chan              440 drivers/dma/mmp_pdma.c 	mmp_pdma_free_phy(chan);
chan              449 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan;
chan              459 drivers/dma/mmp_pdma.c 	chan = to_mmp_pdma_chan(dchan);
chan              460 drivers/dma/mmp_pdma.c 	chan->byte_align = false;
chan              462 drivers/dma/mmp_pdma.c 	if (!chan->dir) {
chan              463 drivers/dma/mmp_pdma.c 		chan->dir = DMA_MEM_TO_MEM;
chan              464 drivers/dma/mmp_pdma.c 		chan->dcmd = DCMD_INCTRGADDR | DCMD_INCSRCADDR;
chan              465 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_BURST32;
chan              470 drivers/dma/mmp_pdma.c 		new = mmp_pdma_alloc_descriptor(chan);
chan              472 drivers/dma/mmp_pdma.c 			dev_err(chan->dev, "no memory for desc\n");
chan              478 drivers/dma/mmp_pdma.c 			chan->byte_align = true;
chan              480 drivers/dma/mmp_pdma.c 		new->desc.dcmd = chan->dcmd | (DCMD_LENGTH & copy);
chan              495 drivers/dma/mmp_pdma.c 		if (chan->dir == DMA_MEM_TO_DEV) {
chan              497 drivers/dma/mmp_pdma.c 		} else if (chan->dir == DMA_DEV_TO_MEM) {
chan              499 drivers/dma/mmp_pdma.c 		} else if (chan->dir == DMA_MEM_TO_MEM) {
chan              515 drivers/dma/mmp_pdma.c 	chan->cyclic_first = NULL;
chan              521 drivers/dma/mmp_pdma.c 		mmp_pdma_free_desc_list(chan, &first->tx_list);
chan              530 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              540 drivers/dma/mmp_pdma.c 	chan->byte_align = false;
chan              542 drivers/dma/mmp_pdma.c 	mmp_pdma_config_write(dchan, &chan->slave_config, dir);
chan              551 drivers/dma/mmp_pdma.c 				chan->byte_align = true;
chan              554 drivers/dma/mmp_pdma.c 			new = mmp_pdma_alloc_descriptor(chan);
chan              556 drivers/dma/mmp_pdma.c 				dev_err(chan->dev, "no memory for desc\n");
chan              560 drivers/dma/mmp_pdma.c 			new->desc.dcmd = chan->dcmd | (DCMD_LENGTH & len);
chan              563 drivers/dma/mmp_pdma.c 				new->desc.dtadr = chan->dev_addr;
chan              565 drivers/dma/mmp_pdma.c 				new->desc.dsadr = chan->dev_addr;
chan              594 drivers/dma/mmp_pdma.c 	chan->dir = dir;
chan              595 drivers/dma/mmp_pdma.c 	chan->cyclic_first = NULL;
chan              601 drivers/dma/mmp_pdma.c 		mmp_pdma_free_desc_list(chan, &first->tx_list);
chan              611 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan;
chan              625 drivers/dma/mmp_pdma.c 	chan = to_mmp_pdma_chan(dchan);
chan              626 drivers/dma/mmp_pdma.c 	mmp_pdma_config_write(dchan, &chan->slave_config, direction);
chan              631 drivers/dma/mmp_pdma.c 		dma_dst = chan->dev_addr;
chan              635 drivers/dma/mmp_pdma.c 		dma_src = chan->dev_addr;
chan              638 drivers/dma/mmp_pdma.c 		dev_err(chan->dev, "Unsupported direction for cyclic DMA\n");
chan              642 drivers/dma/mmp_pdma.c 	chan->dir = direction;
chan              646 drivers/dma/mmp_pdma.c 		new = mmp_pdma_alloc_descriptor(chan);
chan              648 drivers/dma/mmp_pdma.c 			dev_err(chan->dev, "no memory for desc\n");
chan              652 drivers/dma/mmp_pdma.c 		new->desc.dcmd = (chan->dcmd | DCMD_ENDIRQEN |
chan              668 drivers/dma/mmp_pdma.c 		if (chan->dir == DMA_MEM_TO_DEV)
chan              682 drivers/dma/mmp_pdma.c 	chan->cyclic_first = first;
chan              688 drivers/dma/mmp_pdma.c 		mmp_pdma_free_desc_list(chan, &first->tx_list);
chan              696 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              704 drivers/dma/mmp_pdma.c 		chan->dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC;
chan              709 drivers/dma/mmp_pdma.c 		chan->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG;
chan              716 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_WIDTH1;
chan              718 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_WIDTH2;
chan              720 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_WIDTH4;
chan              723 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_BURST8;
chan              725 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_BURST16;
chan              727 drivers/dma/mmp_pdma.c 		chan->dcmd |= DCMD_BURST32;
chan              729 drivers/dma/mmp_pdma.c 	chan->dir = direction;
chan              730 drivers/dma/mmp_pdma.c 	chan->dev_addr = addr;
chan              736 drivers/dma/mmp_pdma.c 		chan->drcmr = cfg->slave_id;
chan              744 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              746 drivers/dma/mmp_pdma.c 	memcpy(&chan->slave_config, cfg, sizeof(*cfg));
chan              752 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              758 drivers/dma/mmp_pdma.c 	disable_chan(chan->phy);
chan              759 drivers/dma/mmp_pdma.c 	mmp_pdma_free_phy(chan);
chan              760 drivers/dma/mmp_pdma.c 	spin_lock_irqsave(&chan->desc_lock, flags);
chan              761 drivers/dma/mmp_pdma.c 	mmp_pdma_free_desc_list(chan, &chan->chain_pending);
chan              762 drivers/dma/mmp_pdma.c 	mmp_pdma_free_desc_list(chan, &chan->chain_running);
chan              763 drivers/dma/mmp_pdma.c 	spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              764 drivers/dma/mmp_pdma.c 	chan->idle = true;
chan              769 drivers/dma/mmp_pdma.c static unsigned int mmp_pdma_residue(struct mmp_pdma_chan *chan,
chan              775 drivers/dma/mmp_pdma.c 	bool cyclic = chan->cyclic_first != NULL;
chan              781 drivers/dma/mmp_pdma.c 	if (!chan->phy)
chan              784 drivers/dma/mmp_pdma.c 	if (chan->dir == DMA_DEV_TO_MEM)
chan              785 drivers/dma/mmp_pdma.c 		curr = readl(chan->phy->base + DTADR(chan->phy->idx));
chan              787 drivers/dma/mmp_pdma.c 		curr = readl(chan->phy->base + DSADR(chan->phy->idx));
chan              789 drivers/dma/mmp_pdma.c 	list_for_each_entry(sw, &chan->chain_running, node) {
chan              792 drivers/dma/mmp_pdma.c 		if (chan->dir == DMA_DEV_TO_MEM)
chan              847 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              852 drivers/dma/mmp_pdma.c 		dma_set_residue(txstate, mmp_pdma_residue(chan, cookie));
chan              863 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
chan              866 drivers/dma/mmp_pdma.c 	spin_lock_irqsave(&chan->desc_lock, flags);
chan              867 drivers/dma/mmp_pdma.c 	start_pending_queue(chan);
chan              868 drivers/dma/mmp_pdma.c 	spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              878 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan = (struct mmp_pdma_chan *)data;
chan              884 drivers/dma/mmp_pdma.c 	if (chan->cyclic_first) {
chan              885 drivers/dma/mmp_pdma.c 		spin_lock_irqsave(&chan->desc_lock, flags);
chan              886 drivers/dma/mmp_pdma.c 		desc = chan->cyclic_first;
chan              888 drivers/dma/mmp_pdma.c 		spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              896 drivers/dma/mmp_pdma.c 	spin_lock_irqsave(&chan->desc_lock, flags);
chan              898 drivers/dma/mmp_pdma.c 	list_for_each_entry_safe(desc, _desc, &chan->chain_running, node) {
chan              913 drivers/dma/mmp_pdma.c 			dev_dbg(chan->dev, "completed_cookie=%d\n", cookie);
chan              922 drivers/dma/mmp_pdma.c 	chan->idle = list_empty(&chan->chain_running);
chan              925 drivers/dma/mmp_pdma.c 	start_pending_queue(chan);
chan              926 drivers/dma/mmp_pdma.c 	spin_unlock_irqrestore(&chan->desc_lock, flags);
chan              938 drivers/dma/mmp_pdma.c 		dma_pool_free(chan->desc_pool, desc, txd->phys);
chan              972 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *chan;
chan              975 drivers/dma/mmp_pdma.c 	chan = devm_kzalloc(pdev->dev, sizeof(*chan), GFP_KERNEL);
chan              976 drivers/dma/mmp_pdma.c 	if (chan == NULL)
chan              991 drivers/dma/mmp_pdma.c 	spin_lock_init(&chan->desc_lock);
chan              992 drivers/dma/mmp_pdma.c 	chan->dev = pdev->dev;
chan              993 drivers/dma/mmp_pdma.c 	chan->chan.device = &pdev->device;
chan              994 drivers/dma/mmp_pdma.c 	tasklet_init(&chan->tasklet, dma_do_tasklet, (unsigned long)chan);
chan              995 drivers/dma/mmp_pdma.c 	INIT_LIST_HEAD(&chan->chain_pending);
chan              996 drivers/dma/mmp_pdma.c 	INIT_LIST_HEAD(&chan->chain_running);
chan              999 drivers/dma/mmp_pdma.c 	list_add_tail(&chan->chan.device_node, &pdev->device.channels);
chan             1014 drivers/dma/mmp_pdma.c 	struct dma_chan *chan;
chan             1016 drivers/dma/mmp_pdma.c 	chan = dma_get_any_slave_channel(&d->device);
chan             1017 drivers/dma/mmp_pdma.c 	if (!chan)
chan             1020 drivers/dma/mmp_pdma.c 	to_mmp_pdma_chan(chan)->drcmr = dma_spec->args[0];
chan             1022 drivers/dma/mmp_pdma.c 	return chan;
chan             1149 drivers/dma/mmp_pdma.c bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param)
chan             1151 drivers/dma/mmp_pdma.c 	struct mmp_pdma_chan *c = to_mmp_pdma_chan(chan);
chan             1153 drivers/dma/mmp_pdma.c 	if (chan->device->dev->driver != &mmp_pdma_driver.driver)
chan              103 drivers/dma/mmp_tdma.c 	struct dma_chan			chan;
chan              137 drivers/dma/mmp_tdma.c #define to_mmp_tdma_chan(dchan) container_of(dchan, struct mmp_tdma_chan, chan)
chan              139 drivers/dma/mmp_tdma.c static int mmp_tdma_config_write(struct dma_chan *chan,
chan              166 drivers/dma/mmp_tdma.c static int mmp_tdma_disable_chan(struct dma_chan *chan)
chan              168 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              181 drivers/dma/mmp_tdma.c static int mmp_tdma_resume_chan(struct dma_chan *chan)
chan              183 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              192 drivers/dma/mmp_tdma.c static int mmp_tdma_pause_chan(struct dma_chan *chan)
chan              194 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              203 drivers/dma/mmp_tdma.c static int mmp_tdma_config_chan(struct dma_chan *chan)
chan              205 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              208 drivers/dma/mmp_tdma.c 	mmp_tdma_disable_chan(chan);
chan              374 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(tx->chan);
chan              381 drivers/dma/mmp_tdma.c static int mmp_tdma_alloc_chan_resources(struct dma_chan *chan)
chan              383 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              386 drivers/dma/mmp_tdma.c 	dma_async_tx_descriptor_init(&tdmac->desc, chan);
chan              398 drivers/dma/mmp_tdma.c static void mmp_tdma_free_chan_resources(struct dma_chan *chan)
chan              400 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              423 drivers/dma/mmp_tdma.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              427 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              448 drivers/dma/mmp_tdma.c 	if (mmp_tdma_config_write(chan, direction, &tdmac->slave_config))
chan              488 drivers/dma/mmp_tdma.c static int mmp_tdma_terminate_all(struct dma_chan *chan)
chan              490 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              492 drivers/dma/mmp_tdma.c 	mmp_tdma_disable_chan(chan);
chan              499 drivers/dma/mmp_tdma.c static int mmp_tdma_config(struct dma_chan *chan,
chan              502 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              509 drivers/dma/mmp_tdma.c static int mmp_tdma_config_write(struct dma_chan *chan,
chan              513 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              526 drivers/dma/mmp_tdma.c 	return mmp_tdma_config_chan(chan);
chan              529 drivers/dma/mmp_tdma.c static enum dma_status mmp_tdma_tx_status(struct dma_chan *chan,
chan              532 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              535 drivers/dma/mmp_tdma.c 	dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie,
chan              541 drivers/dma/mmp_tdma.c static void mmp_tdma_issue_pending(struct dma_chan *chan)
chan              543 drivers/dma/mmp_tdma.c 	struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
chan              572 drivers/dma/mmp_tdma.c 	tdmac->chan.device = &tdev->device;
chan              582 drivers/dma/mmp_tdma.c 	list_add_tail(&tdmac->chan.device_node,
chan              591 drivers/dma/mmp_tdma.c static bool mmp_tdma_filter_fn(struct dma_chan *chan, void *fn_param)
chan              595 drivers/dma/mmp_tdma.c 	if (chan->chan_id != param->chan_id)
chan              165 drivers/dma/moxart-dma.c static struct device *chan2dev(struct dma_chan *chan)
chan              167 drivers/dma/moxart-dma.c 	return &chan->dev->device;
chan              172 drivers/dma/moxart-dma.c 	return container_of(c, struct moxart_chan, vc.chan);
chan              186 drivers/dma/moxart-dma.c static int moxart_terminate_all(struct dma_chan *chan)
chan              188 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              193 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(chan), "%s: ch=%p\n", __func__, ch);
chan              213 drivers/dma/moxart-dma.c static int moxart_slave_config(struct dma_chan *chan,
chan              216 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              270 drivers/dma/moxart-dma.c 	struct dma_chan *chan, struct scatterlist *sgl,
chan              274 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              283 drivers/dma/moxart-dma.c 		dev_err(chan2dev(chan), "%s: invalid DMA direction\n",
chan              307 drivers/dma/moxart-dma.c 		dev_err(chan2dev(chan), "%s: unsupported data width (%u)\n",
chan              336 drivers/dma/moxart-dma.c 	struct dma_chan *chan;
chan              339 drivers/dma/moxart-dma.c 	chan = dma_get_any_slave_channel(&mdc->dma_slave);
chan              340 drivers/dma/moxart-dma.c 	if (!chan)
chan              343 drivers/dma/moxart-dma.c 	ch = to_moxart_dma_chan(chan);
chan              346 drivers/dma/moxart-dma.c 	return chan;
chan              349 drivers/dma/moxart-dma.c static int moxart_alloc_chan_resources(struct dma_chan *chan)
chan              351 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              353 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(chan), "%s: allocating channel #%u\n",
chan              360 drivers/dma/moxart-dma.c static void moxart_free_chan_resources(struct dma_chan *chan)
chan              362 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              366 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(chan), "%s: freeing channel #%u\n",
chan              391 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(&ch->vc.chan), "%s: set %u DMA cycles (len=%u)\n",
chan              419 drivers/dma/moxart-dma.c static void moxart_dma_start_desc(struct dma_chan *chan)
chan              421 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              439 drivers/dma/moxart-dma.c static void moxart_issue_pending(struct dma_chan *chan)
chan              441 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              446 drivers/dma/moxart-dma.c 		moxart_dma_start_desc(chan);
chan              472 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(&ch->vc.chan), "%s: size=%zu\n", __func__, size);
chan              477 drivers/dma/moxart-dma.c static enum dma_status moxart_tx_status(struct dma_chan *chan,
chan              481 drivers/dma/moxart-dma.c 	struct moxart_chan *ch = to_moxart_dma_chan(chan);
chan              490 drivers/dma/moxart-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              530 drivers/dma/moxart-dma.c 	dev_dbg(chan2dev(&ch->vc.chan), "%s\n", __func__);
chan              538 drivers/dma/moxart-dma.c 		dev_dbg(chan2dev(&ch->vc.chan), "%s: ch=%p ch->base=%p ctrl=%x\n",
chan              549 drivers/dma/moxart-dma.c 					moxart_dma_start_desc(&ch->vc.chan);
chan              194 drivers/dma/mpc512x_dma.c 	struct dma_chan			chan;
chan              235 drivers/dma/mpc512x_dma.c 	return container_of(c, struct mpc_dma_chan, chan);
chan              256 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(&mchan->chan);
chan              260 drivers/dma/mpc512x_dma.c 	int cid = mchan->chan.chan_id;
chan              411 drivers/dma/mpc512x_dma.c 		mchan->chan.completed_cookie = last_cookie;
chan              462 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(txd->chan);
chan              486 drivers/dma/mpc512x_dma.c static int mpc_dma_alloc_chan_resources(struct dma_chan *chan)
chan              488 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(chan);
chan              489 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              513 drivers/dma/mpc512x_dma.c 		dma_async_tx_descriptor_init(&mdesc->desc, chan);
chan              538 drivers/dma/mpc512x_dma.c 	out_8(&mdma->regs->dmaseei, chan->chan_id);
chan              544 drivers/dma/mpc512x_dma.c static void mpc_dma_free_chan_resources(struct dma_chan *chan)
chan              546 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(chan);
chan              547 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              579 drivers/dma/mpc512x_dma.c 	out_8(&mdma->regs->dmaceei, chan->chan_id);
chan              583 drivers/dma/mpc512x_dma.c static void mpc_dma_issue_pending(struct dma_chan *chan)
chan              593 drivers/dma/mpc512x_dma.c mpc_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              596 drivers/dma/mpc512x_dma.c 	return dma_cookie_status(chan, cookie, txstate);
chan              601 drivers/dma/mpc512x_dma.c mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
chan              604 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(chan);
chan              605 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              684 drivers/dma/mpc512x_dma.c mpc_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              688 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(chan);
chan              689 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              828 drivers/dma/mpc512x_dma.c static int mpc_dma_device_config(struct dma_chan *chan,
chan              831 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              832 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(&mchan->chan);
chan              878 drivers/dma/mpc512x_dma.c static int mpc_dma_device_terminate_all(struct dma_chan *chan)
chan              880 drivers/dma/mpc512x_dma.c 	struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(chan);
chan              881 drivers/dma/mpc512x_dma.c 	struct mpc_dma *mdma = dma_chan_to_mpc_dma(chan);
chan              887 drivers/dma/mpc512x_dma.c 	out_8(&mdma->regs->dmacerq, chan->chan_id);
chan              999 drivers/dma/mpc512x_dma.c 		mchan->chan.device = dma;
chan             1000 drivers/dma/mpc512x_dma.c 		dma_cookie_init(&mchan->chan);
chan             1009 drivers/dma/mpc512x_dma.c 		list_add_tail(&mchan->chan.device_node, &dma->channels);
chan               37 drivers/dma/mv_xor.c static void mv_xor_issue_pending(struct dma_chan *chan);
chan               39 drivers/dma/mv_xor.c #define to_mv_xor_chan(chan)		\
chan               40 drivers/dma/mv_xor.c 	container_of(chan, struct mv_xor_chan, dmachan)
chan               45 drivers/dma/mv_xor.c #define mv_chan_to_devp(chan)           \
chan               46 drivers/dma/mv_xor.c 	((chan)->dmadev.dev)
chan               98 drivers/dma/mv_xor.c static u32 mv_chan_get_current_desc(struct mv_xor_chan *chan)
chan              100 drivers/dma/mv_xor.c 	return readl_relaxed(XOR_CURR_DESC(chan));
chan              103 drivers/dma/mv_xor.c static void mv_chan_set_next_descriptor(struct mv_xor_chan *chan,
chan              106 drivers/dma/mv_xor.c 	writel_relaxed(next_desc_addr, XOR_NEXT_DESC(chan));
chan              109 drivers/dma/mv_xor.c static void mv_chan_unmask_interrupts(struct mv_xor_chan *chan)
chan              111 drivers/dma/mv_xor.c 	u32 val = readl_relaxed(XOR_INTR_MASK(chan));
chan              112 drivers/dma/mv_xor.c 	val |= XOR_INTR_MASK_VALUE << (chan->idx * 16);
chan              113 drivers/dma/mv_xor.c 	writel_relaxed(val, XOR_INTR_MASK(chan));
chan              116 drivers/dma/mv_xor.c static u32 mv_chan_get_intr_cause(struct mv_xor_chan *chan)
chan              118 drivers/dma/mv_xor.c 	u32 intr_cause = readl_relaxed(XOR_INTR_CAUSE(chan));
chan              119 drivers/dma/mv_xor.c 	intr_cause = (intr_cause >> (chan->idx * 16)) & 0xFFFF;
chan              123 drivers/dma/mv_xor.c static void mv_chan_clear_eoc_cause(struct mv_xor_chan *chan)
chan              128 drivers/dma/mv_xor.c 	val = ~(val << (chan->idx * 16));
chan              129 drivers/dma/mv_xor.c 	dev_dbg(mv_chan_to_devp(chan), "%s, val 0x%08x\n", __func__, val);
chan              130 drivers/dma/mv_xor.c 	writel_relaxed(val, XOR_INTR_CAUSE(chan));
chan              133 drivers/dma/mv_xor.c static void mv_chan_clear_err_status(struct mv_xor_chan *chan)
chan              135 drivers/dma/mv_xor.c 	u32 val = 0xFFFF0000 >> (chan->idx * 16);
chan              136 drivers/dma/mv_xor.c 	writel_relaxed(val, XOR_INTR_CAUSE(chan));
chan              139 drivers/dma/mv_xor.c static void mv_chan_set_mode(struct mv_xor_chan *chan,
chan              142 drivers/dma/mv_xor.c 	u32 config = readl_relaxed(XOR_CONFIG(chan));
chan              153 drivers/dma/mv_xor.c 	writel_relaxed(config, XOR_CONFIG(chan));
chan              156 drivers/dma/mv_xor.c static void mv_chan_activate(struct mv_xor_chan *chan)
chan              158 drivers/dma/mv_xor.c 	dev_dbg(mv_chan_to_devp(chan), " activate chan.\n");
chan              161 drivers/dma/mv_xor.c 	writel(BIT(0), XOR_ACTIVATION(chan));
chan              164 drivers/dma/mv_xor.c static char mv_chan_is_busy(struct mv_xor_chan *chan)
chan              166 drivers/dma/mv_xor.c 	u32 state = readl_relaxed(XOR_ACTIVATION(chan));
chan              341 drivers/dma/mv_xor.c 	struct mv_xor_chan *chan = (struct mv_xor_chan *) data;
chan              343 drivers/dma/mv_xor.c 	spin_lock(&chan->lock);
chan              344 drivers/dma/mv_xor.c 	mv_chan_slot_cleanup(chan);
chan              345 drivers/dma/mv_xor.c 	spin_unlock(&chan->lock);
chan              385 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(tx->chan);
chan              434 drivers/dma/mv_xor.c static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
chan              439 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan              456 drivers/dma/mv_xor.c 		dma_async_tx_descriptor_init(&slot->async_tx, chan);
chan              555 drivers/dma/mv_xor.c mv_xor_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              558 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan              599 drivers/dma/mv_xor.c mv_xor_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              606 drivers/dma/mv_xor.c 	return mv_xor_prep_dma_xor(chan, dest, &src, 1, len, flags);
chan              610 drivers/dma/mv_xor.c mv_xor_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags)
chan              612 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan              624 drivers/dma/mv_xor.c 	return mv_xor_prep_dma_xor(chan, dest, &src, 1, len, flags);
chan              627 drivers/dma/mv_xor.c static void mv_xor_free_chan_resources(struct dma_chan *chan)
chan              629 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan              674 drivers/dma/mv_xor.c static enum dma_status mv_xor_status(struct dma_chan *chan,
chan              678 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan              681 drivers/dma/mv_xor.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              689 drivers/dma/mv_xor.c 	return dma_cookie_status(chan, cookie, txstate);
chan              692 drivers/dma/mv_xor.c static void mv_chan_dump_regs(struct mv_xor_chan *chan)
chan              696 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_CONFIG(chan));
chan              697 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "config       0x%08x\n", val);
chan              699 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_ACTIVATION(chan));
chan              700 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "activation   0x%08x\n", val);
chan              702 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_INTR_CAUSE(chan));
chan              703 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "intr cause   0x%08x\n", val);
chan              705 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_INTR_MASK(chan));
chan              706 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "intr mask    0x%08x\n", val);
chan              708 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_ERROR_CAUSE(chan));
chan              709 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "error cause  0x%08x\n", val);
chan              711 drivers/dma/mv_xor.c 	val = readl_relaxed(XOR_ERROR_ADDR(chan));
chan              712 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "error addr   0x%08x\n", val);
chan              715 drivers/dma/mv_xor.c static void mv_chan_err_interrupt_handler(struct mv_xor_chan *chan,
chan              719 drivers/dma/mv_xor.c 		dev_dbg(mv_chan_to_devp(chan), "ignoring address decode error\n");
chan              723 drivers/dma/mv_xor.c 	dev_err(mv_chan_to_devp(chan), "error on chan %d. intr cause 0x%08x\n",
chan              724 drivers/dma/mv_xor.c 		chan->idx, intr_cause);
chan              726 drivers/dma/mv_xor.c 	mv_chan_dump_regs(chan);
chan              732 drivers/dma/mv_xor.c 	struct mv_xor_chan *chan = data;
chan              733 drivers/dma/mv_xor.c 	u32 intr_cause = mv_chan_get_intr_cause(chan);
chan              735 drivers/dma/mv_xor.c 	dev_dbg(mv_chan_to_devp(chan), "intr cause %x\n", intr_cause);
chan              738 drivers/dma/mv_xor.c 		mv_chan_err_interrupt_handler(chan, intr_cause);
chan              740 drivers/dma/mv_xor.c 	tasklet_schedule(&chan->irq_tasklet);
chan              742 drivers/dma/mv_xor.c 	mv_chan_clear_eoc_cause(chan);
chan              747 drivers/dma/mv_xor.c static void mv_xor_issue_pending(struct dma_chan *chan)
chan              749 drivers/dma/mv_xor.c 	struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan);
chan             1011 drivers/dma/mv_xor.c 	struct dma_chan *chan, *_chan;
chan             1023 drivers/dma/mv_xor.c 	list_for_each_entry_safe(chan, _chan, &mv_chan->dmadev.channels,
chan             1025 drivers/dma/mv_xor.c 		list_del(&chan->device_node);
chan             1382 drivers/dma/mv_xor.c 			struct mv_xor_chan *chan;
chan             1400 drivers/dma/mv_xor.c 			chan = mv_xor_channel_add(xordev, pdev, i,
chan             1402 drivers/dma/mv_xor.c 			if (IS_ERR(chan)) {
chan             1403 drivers/dma/mv_xor.c 				ret = PTR_ERR(chan);
chan             1408 drivers/dma/mv_xor.c 			xordev->channels[i] = chan;
chan             1414 drivers/dma/mv_xor.c 			struct mv_xor_chan *chan;
chan             1424 drivers/dma/mv_xor.c 			chan = mv_xor_channel_add(xordev, pdev, i,
chan             1426 drivers/dma/mv_xor.c 			if (IS_ERR(chan)) {
chan             1427 drivers/dma/mv_xor.c 				ret = PTR_ERR(chan);
chan             1431 drivers/dma/mv_xor.c 			xordev->channels[i] = chan;
chan               36 drivers/dma/mv_xor.h #define XOR_CURR_DESC(chan)	(chan->mmr_high_base + 0x10 + (chan->idx * 4))
chan               37 drivers/dma/mv_xor.h #define XOR_NEXT_DESC(chan)	(chan->mmr_high_base + 0x00 + (chan->idx * 4))
chan               38 drivers/dma/mv_xor.h #define XOR_BYTE_COUNT(chan)	(chan->mmr_high_base + 0x20 + (chan->idx * 4))
chan               39 drivers/dma/mv_xor.h #define XOR_DEST_POINTER(chan)	(chan->mmr_high_base + 0xB0 + (chan->idx * 4))
chan               40 drivers/dma/mv_xor.h #define XOR_BLOCK_SIZE(chan)	(chan->mmr_high_base + 0xC0 + (chan->idx * 4))
chan               41 drivers/dma/mv_xor.h #define XOR_INIT_VALUE_LOW(chan)	(chan->mmr_high_base + 0xE0)
chan               42 drivers/dma/mv_xor.h #define XOR_INIT_VALUE_HIGH(chan)	(chan->mmr_high_base + 0xE4)
chan               44 drivers/dma/mv_xor.h #define XOR_CONFIG(chan)	(chan->mmr_base + 0x10 + (chan->idx * 4))
chan               45 drivers/dma/mv_xor.h #define XOR_ACTIVATION(chan)	(chan->mmr_base + 0x20 + (chan->idx * 4))
chan               46 drivers/dma/mv_xor.h #define XOR_INTR_CAUSE(chan)	(chan->mmr_base + 0x30)
chan               47 drivers/dma/mv_xor.h #define XOR_INTR_MASK(chan)	(chan->mmr_base + 0x40)
chan               48 drivers/dma/mv_xor.h #define XOR_ERROR_CAUSE(chan)	(chan->mmr_base + 0x50)
chan               49 drivers/dma/mv_xor.h #define XOR_ERROR_ADDR(chan)	(chan->mmr_base + 0x60)
chan               72 drivers/dma/mv_xor.h #define WINDOW_BAR_ENABLE(chan)	(0x40 + ((chan) << 2))
chan               73 drivers/dma/mv_xor.h #define WINDOW_OVERRIDE_CTRL(chan)	(0xA0 + ((chan) << 2))
chan              306 drivers/dma/mv_xor_v2.c 		container_of(tx->chan, struct mv_xor_v2_device, dmachan);
chan              374 drivers/dma/mv_xor_v2.c mv_xor_v2_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest,
chan              381 drivers/dma/mv_xor_v2.c 	xor_dev = container_of(chan, struct mv_xor_v2_device, dmachan);
chan              427 drivers/dma/mv_xor_v2.c mv_xor_v2_prep_dma_xor(struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
chan              433 drivers/dma/mv_xor_v2.c 		container_of(chan, struct mv_xor_v2_device, dmachan);
chan              486 drivers/dma/mv_xor_v2.c mv_xor_v2_prep_dma_interrupt(struct dma_chan *chan, unsigned long flags)
chan              491 drivers/dma/mv_xor_v2.c 		container_of(chan, struct mv_xor_v2_device, dmachan);
chan              515 drivers/dma/mv_xor_v2.c static void mv_xor_v2_issue_pending(struct dma_chan *chan)
chan              518 drivers/dma/mv_xor_v2.c 		container_of(chan, struct mv_xor_v2_device, dmachan);
chan              111 drivers/dma/mxs-dma.c 	struct dma_chan			chan;
chan              198 drivers/dma/mxs-dma.c static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan)
chan              200 drivers/dma/mxs-dma.c 	return container_of(chan, struct mxs_dma_chan, chan);
chan              203 drivers/dma/mxs-dma.c static void mxs_dma_reset_chan(struct dma_chan *chan)
chan              205 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              207 drivers/dma/mxs-dma.c 	int chan_id = mxs_chan->chan.chan_id;
chan              252 drivers/dma/mxs-dma.c static void mxs_dma_enable_chan(struct dma_chan *chan)
chan              254 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              256 drivers/dma/mxs-dma.c 	int chan_id = mxs_chan->chan.chan_id;
chan              275 drivers/dma/mxs-dma.c static void mxs_dma_disable_chan(struct dma_chan *chan)
chan              277 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              282 drivers/dma/mxs-dma.c static int mxs_dma_pause_chan(struct dma_chan *chan)
chan              284 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              286 drivers/dma/mxs-dma.c 	int chan_id = mxs_chan->chan.chan_id;
chan              300 drivers/dma/mxs-dma.c static int mxs_dma_resume_chan(struct dma_chan *chan)
chan              302 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              304 drivers/dma/mxs-dma.c 	int chan_id = mxs_chan->chan.chan_id;
chan              347 drivers/dma/mxs-dma.c 	int chan = mxs_dma_irq_to_chan(mxs_dma, irq);
chan              349 drivers/dma/mxs-dma.c 	if (chan < 0)
chan              354 drivers/dma/mxs-dma.c 	completed = (completed >> chan) & 0x1;
chan              357 drivers/dma/mxs-dma.c 	writel((1 << chan),
chan              362 drivers/dma/mxs-dma.c 	err &= (1 << (MXS_DMA_CHANNELS + chan)) | (1 << chan);
chan              369 drivers/dma/mxs-dma.c 	err = (err >> (MXS_DMA_CHANNELS + chan)) + (err >> chan);
chan              372 drivers/dma/mxs-dma.c 	writel((1 << chan),
chan              384 drivers/dma/mxs-dma.c 	mxs_chan = &mxs_dma->mxs_chans[chan];
chan              389 drivers/dma/mxs-dma.c 			chan);
chan              391 drivers/dma/mxs-dma.c 		mxs_dma_reset_chan(&mxs_chan->chan);
chan              397 drivers/dma/mxs-dma.c 					HW_APBHX_CHn_SEMA(mxs_dma, chan));
chan              415 drivers/dma/mxs-dma.c static int mxs_dma_alloc_chan_resources(struct dma_chan *chan)
chan              417 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              438 drivers/dma/mxs-dma.c 	mxs_dma_reset_chan(chan);
chan              440 drivers/dma/mxs-dma.c 	dma_async_tx_descriptor_init(&mxs_chan->desc, chan);
chan              457 drivers/dma/mxs-dma.c static void mxs_dma_free_chan_resources(struct dma_chan *chan)
chan              459 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              462 drivers/dma/mxs-dma.c 	mxs_dma_disable_chan(chan);
chan              495 drivers/dma/mxs-dma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              499 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              594 drivers/dma/mxs-dma.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              598 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              658 drivers/dma/mxs-dma.c static int mxs_dma_terminate_all(struct dma_chan *chan)
chan              660 drivers/dma/mxs-dma.c 	mxs_dma_reset_chan(chan);
chan              661 drivers/dma/mxs-dma.c 	mxs_dma_disable_chan(chan);
chan              666 drivers/dma/mxs-dma.c static enum dma_status mxs_dma_tx_status(struct dma_chan *chan,
chan              669 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              682 drivers/dma/mxs-dma.c 				HW_APBHX_CHn_BAR(mxs_dma, chan->chan_id));
chan              686 drivers/dma/mxs-dma.c 	dma_set_tx_state(txstate, chan->completed_cookie, chan->cookie,
chan              725 drivers/dma/mxs-dma.c static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param)
chan              728 drivers/dma/mxs-dma.c 	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);
chan              732 drivers/dma/mxs-dma.c 	if (chan->chan_id != param->chan_id)
chan              812 drivers/dma/mxs-dma.c 		mxs_chan->chan.device = &mxs_dma->dma_device;
chan              813 drivers/dma/mxs-dma.c 		dma_cookie_init(&mxs_chan->chan);
chan              820 drivers/dma/mxs-dma.c 		list_add_tail(&mxs_chan->chan.device_node,
chan              154 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan;
chan              230 drivers/dma/nbpfaxi.c 	struct nbpf_channel chan[];
chan              298 drivers/dma/nbpfaxi.c static inline u32 nbpf_chan_read(struct nbpf_channel *chan,
chan              301 drivers/dma/nbpfaxi.c 	u32 data = ioread32(chan->base + offset);
chan              302 drivers/dma/nbpfaxi.c 	dev_dbg(chan->dma_chan.device->dev, "%s(0x%p + 0x%x) = 0x%x\n",
chan              303 drivers/dma/nbpfaxi.c 		__func__, chan->base, offset, data);
chan              307 drivers/dma/nbpfaxi.c static inline void nbpf_chan_write(struct nbpf_channel *chan,
chan              310 drivers/dma/nbpfaxi.c 	iowrite32(data, chan->base + offset);
chan              311 drivers/dma/nbpfaxi.c 	dev_dbg(chan->dma_chan.device->dev, "%s(0x%p + 0x%x) = 0x%x\n",
chan              312 drivers/dma/nbpfaxi.c 		__func__, chan->base, offset, data);
chan              332 drivers/dma/nbpfaxi.c static void nbpf_chan_halt(struct nbpf_channel *chan)
chan              334 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_CLREN);
chan              337 drivers/dma/nbpfaxi.c static bool nbpf_status_get(struct nbpf_channel *chan)
chan              339 drivers/dma/nbpfaxi.c 	u32 status = nbpf_read(chan->nbpf, NBPF_DSTAT_END);
chan              341 drivers/dma/nbpfaxi.c 	return status & BIT(chan - chan->nbpf->chan);
chan              344 drivers/dma/nbpfaxi.c static void nbpf_status_ack(struct nbpf_channel *chan)
chan              346 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_CLREND);
chan              356 drivers/dma/nbpfaxi.c 	return nbpf->chan + __ffs(error);
chan              359 drivers/dma/nbpfaxi.c static void nbpf_error_clear(struct nbpf_channel *chan)
chan              365 drivers/dma/nbpfaxi.c 	nbpf_chan_halt(chan);
chan              368 drivers/dma/nbpfaxi.c 		status = nbpf_chan_read(chan, NBPF_CHAN_STAT);
chan              375 drivers/dma/nbpfaxi.c 		dev_err(chan->dma_chan.device->dev,
chan              378 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_SWRST);
chan              383 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = desc->chan;
chan              386 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_NXLA, (u32)ldesc->hwdesc_dma_addr);
chan              387 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_SETEN | NBPF_CHAN_CTRL_CLRSUS);
chan              388 drivers/dma/nbpfaxi.c 	chan->paused = false;
chan              392 drivers/dma/nbpfaxi.c 		nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_STG);
chan              394 drivers/dma/nbpfaxi.c 	dev_dbg(chan->nbpf->dma_dev.dev, "%s(): next 0x%x, cur 0x%x\n", __func__,
chan              395 drivers/dma/nbpfaxi.c 		nbpf_chan_read(chan, NBPF_CHAN_NXLA), nbpf_chan_read(chan, NBPF_CHAN_CRLA));
chan              400 drivers/dma/nbpfaxi.c static void nbpf_chan_prepare(struct nbpf_channel *chan)
chan              402 drivers/dma/nbpfaxi.c 	chan->dmarq_cfg = (chan->flags & NBPF_SLAVE_RQ_HIGH ? NBPF_CHAN_CFG_HIEN : 0) |
chan              403 drivers/dma/nbpfaxi.c 		(chan->flags & NBPF_SLAVE_RQ_LOW ? NBPF_CHAN_CFG_LOEN : 0) |
chan              404 drivers/dma/nbpfaxi.c 		(chan->flags & NBPF_SLAVE_RQ_LEVEL ?
chan              406 drivers/dma/nbpfaxi.c 		chan->terminal;
chan              409 drivers/dma/nbpfaxi.c static void nbpf_chan_prepare_default(struct nbpf_channel *chan)
chan              412 drivers/dma/nbpfaxi.c 	chan->dmarq_cfg = NBPF_CHAN_CFG_AM & 0x400;
chan              413 drivers/dma/nbpfaxi.c 	chan->terminal = 0;
chan              414 drivers/dma/nbpfaxi.c 	chan->flags = 0;
chan              417 drivers/dma/nbpfaxi.c static void nbpf_chan_configure(struct nbpf_channel *chan)
chan              424 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CFG, NBPF_CHAN_CFG_DMS | chan->dmarq_cfg);
chan              505 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = desc->chan;
chan              506 drivers/dma/nbpfaxi.c 	struct device *dev = chan->dma_chan.device->dev;
chan              533 drivers/dma/nbpfaxi.c 	mem_xfer = nbpf_xfer_ds(chan->nbpf, size, direction);
chan              537 drivers/dma/nbpfaxi.c 		can_burst = chan->slave_src_width >= 3;
chan              539 drivers/dma/nbpfaxi.c 				 chan->slave_src_burst : chan->slave_src_width);
chan              544 drivers/dma/nbpfaxi.c 		if (mem_xfer > chan->slave_src_burst && !can_burst)
chan              545 drivers/dma/nbpfaxi.c 			mem_xfer = chan->slave_src_burst;
chan              553 drivers/dma/nbpfaxi.c 		slave_xfer = min(mem_xfer, chan->slave_dst_width >= 3 ?
chan              554 drivers/dma/nbpfaxi.c 				 chan->slave_dst_burst : chan->slave_dst_width);
chan              569 drivers/dma/nbpfaxi.c 	hwdesc->config |= chan->dmarq_cfg | (last ? 0 : NBPF_CHAN_CFG_DEM) |
chan              582 drivers/dma/nbpfaxi.c static size_t nbpf_bytes_left(struct nbpf_channel *chan)
chan              584 drivers/dma/nbpfaxi.c 	return nbpf_chan_read(chan, NBPF_CHAN_CUR_TR_BYTE);
chan              597 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan              602 drivers/dma/nbpfaxi.c 	spin_lock_irqsave(&chan->lock, flags);
chan              603 drivers/dma/nbpfaxi.c 	if (list_empty(&chan->queued))
chan              606 drivers/dma/nbpfaxi.c 	list_splice_tail_init(&chan->queued, &chan->active);
chan              608 drivers/dma/nbpfaxi.c 	if (!chan->running) {
chan              609 drivers/dma/nbpfaxi.c 		struct nbpf_desc *desc = list_first_entry(&chan->active,
chan              612 drivers/dma/nbpfaxi.c 			chan->running = desc;
chan              616 drivers/dma/nbpfaxi.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              622 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan              629 drivers/dma/nbpfaxi.c 		spin_lock_irqsave(&chan->lock, flags);
chan              630 drivers/dma/nbpfaxi.c 		running = chan->running ? chan->running->async_tx.cookie : -EINVAL;
chan              633 drivers/dma/nbpfaxi.c 			state->residue = nbpf_bytes_left(chan);
chan              640 drivers/dma/nbpfaxi.c 			list_for_each_entry(desc, &chan->active, node)
chan              647 drivers/dma/nbpfaxi.c 				list_for_each_entry(desc, &chan->queued, node)
chan              657 drivers/dma/nbpfaxi.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              660 drivers/dma/nbpfaxi.c 	if (chan->paused)
chan              669 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = desc->chan;
chan              673 drivers/dma/nbpfaxi.c 	spin_lock_irqsave(&chan->lock, flags);
chan              675 drivers/dma/nbpfaxi.c 	list_add_tail(&desc->node, &chan->queued);
chan              676 drivers/dma/nbpfaxi.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              678 drivers/dma/nbpfaxi.c 	dev_dbg(chan->dma_chan.device->dev, "Entry %s(%d)\n", __func__, cookie);
chan              683 drivers/dma/nbpfaxi.c static int nbpf_desc_page_alloc(struct nbpf_channel *chan)
chan              685 drivers/dma/nbpfaxi.c 	struct dma_chan *dchan = &chan->dma_chan;
chan              718 drivers/dma/nbpfaxi.c 		desc->chan = chan;
chan              727 drivers/dma/nbpfaxi.c 	spin_lock_irq(&chan->lock);
chan              728 drivers/dma/nbpfaxi.c 	list_splice_tail(&lhead, &chan->free_links);
chan              729 drivers/dma/nbpfaxi.c 	list_splice_tail(&head, &chan->free);
chan              730 drivers/dma/nbpfaxi.c 	list_add(&dpage->node, &chan->desc_page);
chan              731 drivers/dma/nbpfaxi.c 	spin_unlock_irq(&chan->lock);
chan              738 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = desc->chan;
chan              742 drivers/dma/nbpfaxi.c 	spin_lock_irqsave(&chan->lock, flags);
chan              744 drivers/dma/nbpfaxi.c 		list_move(&ldesc->node, &chan->free_links);
chan              746 drivers/dma/nbpfaxi.c 	list_add(&desc->node, &chan->free);
chan              747 drivers/dma/nbpfaxi.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              750 drivers/dma/nbpfaxi.c static void nbpf_scan_acked(struct nbpf_channel *chan)
chan              756 drivers/dma/nbpfaxi.c 	spin_lock_irqsave(&chan->lock, flags);
chan              757 drivers/dma/nbpfaxi.c 	list_for_each_entry_safe(desc, tmp, &chan->done, node)
chan              762 drivers/dma/nbpfaxi.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              776 drivers/dma/nbpfaxi.c static struct nbpf_desc *nbpf_desc_get(struct nbpf_channel *chan, size_t len)
chan              781 drivers/dma/nbpfaxi.c 	nbpf_scan_acked(chan);
chan              783 drivers/dma/nbpfaxi.c 	spin_lock_irq(&chan->lock);
chan              788 drivers/dma/nbpfaxi.c 		if (list_empty(&chan->free)) {
chan              790 drivers/dma/nbpfaxi.c 			spin_unlock_irq(&chan->lock);
chan              791 drivers/dma/nbpfaxi.c 			ret = nbpf_desc_page_alloc(chan);
chan              794 drivers/dma/nbpfaxi.c 			spin_lock_irq(&chan->lock);
chan              797 drivers/dma/nbpfaxi.c 		desc = list_first_entry(&chan->free, struct nbpf_desc, node);
chan              801 drivers/dma/nbpfaxi.c 			if (list_empty(&chan->free_links)) {
chan              803 drivers/dma/nbpfaxi.c 				spin_unlock_irq(&chan->lock);
chan              804 drivers/dma/nbpfaxi.c 				ret = nbpf_desc_page_alloc(chan);
chan              809 drivers/dma/nbpfaxi.c 				spin_lock_irq(&chan->lock);
chan              813 drivers/dma/nbpfaxi.c 			ldesc = list_first_entry(&chan->free_links,
chan              828 drivers/dma/nbpfaxi.c 	spin_unlock_irq(&chan->lock);
chan              833 drivers/dma/nbpfaxi.c static void nbpf_chan_idle(struct nbpf_channel *chan)
chan              839 drivers/dma/nbpfaxi.c 	spin_lock_irqsave(&chan->lock, flags);
chan              841 drivers/dma/nbpfaxi.c 	list_splice_init(&chan->done, &head);
chan              842 drivers/dma/nbpfaxi.c 	list_splice_init(&chan->active, &head);
chan              843 drivers/dma/nbpfaxi.c 	list_splice_init(&chan->queued, &head);
chan              845 drivers/dma/nbpfaxi.c 	chan->running = NULL;
chan              847 drivers/dma/nbpfaxi.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              850 drivers/dma/nbpfaxi.c 		dev_dbg(chan->nbpf->dma_dev.dev, "%s(): force-free desc %p cookie %d\n",
chan              859 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan              863 drivers/dma/nbpfaxi.c 	chan->paused = true;
chan              864 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_SETSUS);
chan              866 drivers/dma/nbpfaxi.c 	nbpf_chan_write(chan, NBPF_CHAN_CTRL, NBPF_CHAN_CTRL_CLREN);
chan              873 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan              878 drivers/dma/nbpfaxi.c 	nbpf_chan_halt(chan);
chan              879 drivers/dma/nbpfaxi.c 	nbpf_chan_idle(chan);
chan              887 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan              897 drivers/dma/nbpfaxi.c 	chan->slave_dst_addr = config->dst_addr;
chan              898 drivers/dma/nbpfaxi.c 	chan->slave_dst_width = nbpf_xfer_size(chan->nbpf,
chan              900 drivers/dma/nbpfaxi.c 	chan->slave_dst_burst = nbpf_xfer_size(chan->nbpf,
chan              903 drivers/dma/nbpfaxi.c 	chan->slave_src_addr = config->src_addr;
chan              904 drivers/dma/nbpfaxi.c 	chan->slave_src_width = nbpf_xfer_size(chan->nbpf,
chan              906 drivers/dma/nbpfaxi.c 	chan->slave_src_burst = nbpf_xfer_size(chan->nbpf,
chan              913 drivers/dma/nbpfaxi.c static struct dma_async_tx_descriptor *nbpf_prep_sg(struct nbpf_channel *chan,
chan              945 drivers/dma/nbpfaxi.c 	desc = nbpf_desc_get(chan, len);
chan              986 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan             1002 drivers/dma/nbpfaxi.c 	return nbpf_prep_sg(chan, &src_sg, &dst_sg, 1,
chan             1010 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan             1019 drivers/dma/nbpfaxi.c 		sg_dma_address(&slave_sg) = chan->slave_dst_addr;
chan             1020 drivers/dma/nbpfaxi.c 		return nbpf_prep_sg(chan, sgl, &slave_sg, sg_len,
chan             1024 drivers/dma/nbpfaxi.c 		sg_dma_address(&slave_sg) = chan->slave_src_addr;
chan             1025 drivers/dma/nbpfaxi.c 		return nbpf_prep_sg(chan, &slave_sg, sgl, sg_len,
chan             1035 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan             1038 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->free);
chan             1039 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->free_links);
chan             1040 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->queued);
chan             1041 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->active);
chan             1042 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->done);
chan             1044 drivers/dma/nbpfaxi.c 	ret = nbpf_desc_page_alloc(chan);
chan             1049 drivers/dma/nbpfaxi.c 		chan->terminal);
chan             1051 drivers/dma/nbpfaxi.c 	nbpf_chan_configure(chan);
chan             1058 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf_to_chan(dchan);
chan             1063 drivers/dma/nbpfaxi.c 	nbpf_chan_halt(chan);
chan             1064 drivers/dma/nbpfaxi.c 	nbpf_chan_idle(chan);
chan             1066 drivers/dma/nbpfaxi.c 	nbpf_chan_prepare_default(chan);
chan             1068 drivers/dma/nbpfaxi.c 	list_for_each_entry_safe(dpage, tmp, &chan->desc_page, node) {
chan             1086 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan;
chan             1098 drivers/dma/nbpfaxi.c 	chan = nbpf_to_chan(dchan);
chan             1100 drivers/dma/nbpfaxi.c 	chan->terminal = dma_spec->args[0];
chan             1101 drivers/dma/nbpfaxi.c 	chan->flags = dma_spec->args[1];
chan             1103 drivers/dma/nbpfaxi.c 	nbpf_chan_prepare(chan);
chan             1104 drivers/dma/nbpfaxi.c 	nbpf_chan_configure(chan);
chan             1111 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = (struct nbpf_channel *)data;
chan             1115 drivers/dma/nbpfaxi.c 	while (!list_empty(&chan->done)) {
chan             1118 drivers/dma/nbpfaxi.c 		spin_lock_irq(&chan->lock);
chan             1120 drivers/dma/nbpfaxi.c 		list_for_each_entry_safe(desc, tmp, &chan->done, node) {
chan             1131 drivers/dma/nbpfaxi.c 				spin_unlock_irq(&chan->lock);
chan             1143 drivers/dma/nbpfaxi.c 			spin_unlock_irq(&chan->lock);
chan             1164 drivers/dma/nbpfaxi.c 		spin_unlock_irq(&chan->lock);
chan             1175 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = dev;
chan             1176 drivers/dma/nbpfaxi.c 	bool done = nbpf_status_get(chan);
chan             1184 drivers/dma/nbpfaxi.c 	nbpf_status_ack(chan);
chan             1186 drivers/dma/nbpfaxi.c 	dev_dbg(&chan->dma_chan.dev->device, "%s()\n", __func__);
chan             1188 drivers/dma/nbpfaxi.c 	spin_lock(&chan->lock);
chan             1189 drivers/dma/nbpfaxi.c 	desc = chan->running;
chan             1198 drivers/dma/nbpfaxi.c 	list_move_tail(&desc->node, &chan->done);
chan             1199 drivers/dma/nbpfaxi.c 	chan->running = NULL;
chan             1201 drivers/dma/nbpfaxi.c 	if (!list_empty(&chan->active)) {
chan             1202 drivers/dma/nbpfaxi.c 		desc = list_first_entry(&chan->active,
chan             1205 drivers/dma/nbpfaxi.c 			chan->running = desc;
chan             1209 drivers/dma/nbpfaxi.c 	spin_unlock(&chan->lock);
chan             1212 drivers/dma/nbpfaxi.c 		tasklet_schedule(&chan->tasklet);
chan             1228 drivers/dma/nbpfaxi.c 		struct nbpf_channel *chan = nbpf_error_get_channel(nbpf, error);
chan             1230 drivers/dma/nbpfaxi.c 		nbpf_error_clear(chan);
chan             1231 drivers/dma/nbpfaxi.c 		nbpf_chan_idle(chan);
chan             1241 drivers/dma/nbpfaxi.c 	struct nbpf_channel *chan = nbpf->chan + n;
chan             1244 drivers/dma/nbpfaxi.c 	chan->nbpf = nbpf;
chan             1245 drivers/dma/nbpfaxi.c 	chan->base = nbpf->base + NBPF_REG_CHAN_OFFSET + NBPF_REG_CHAN_SIZE * n;
chan             1246 drivers/dma/nbpfaxi.c 	INIT_LIST_HEAD(&chan->desc_page);
chan             1247 drivers/dma/nbpfaxi.c 	spin_lock_init(&chan->lock);
chan             1248 drivers/dma/nbpfaxi.c 	chan->dma_chan.device = dma_dev;
chan             1249 drivers/dma/nbpfaxi.c 	dma_cookie_init(&chan->dma_chan);
chan             1250 drivers/dma/nbpfaxi.c 	nbpf_chan_prepare_default(chan);
chan             1252 drivers/dma/nbpfaxi.c 	dev_dbg(dma_dev->dev, "%s(): channel %d: -> %p\n", __func__, n, chan->base);
chan             1254 drivers/dma/nbpfaxi.c 	snprintf(chan->name, sizeof(chan->name), "nbpf %d", n);
chan             1256 drivers/dma/nbpfaxi.c 	tasklet_init(&chan->tasklet, nbpf_chan_tasklet, (unsigned long)chan);
chan             1257 drivers/dma/nbpfaxi.c 	ret = devm_request_irq(dma_dev->dev, chan->irq,
chan             1259 drivers/dma/nbpfaxi.c 			chan->name, chan);
chan             1264 drivers/dma/nbpfaxi.c 	list_add_tail(&chan->dma_chan.device_node,
chan             1306 drivers/dma/nbpfaxi.c 	nbpf = devm_kzalloc(dev, struct_size(nbpf, chan, num_channels),
chan             1353 drivers/dma/nbpfaxi.c 			nbpf->chan[i].irq = irqbuf[0];
chan             1360 drivers/dma/nbpfaxi.c 			struct nbpf_channel *chan;
chan             1362 drivers/dma/nbpfaxi.c 			for (i = 0, chan = nbpf->chan; i <= num_channels;
chan             1363 drivers/dma/nbpfaxi.c 			     i++, chan++) {
chan             1367 drivers/dma/nbpfaxi.c 				chan->irq = irqbuf[i];
chan             1370 drivers/dma/nbpfaxi.c 			if (chan != nbpf->chan + num_channels)
chan             1380 drivers/dma/nbpfaxi.c 				nbpf->chan[i].irq = irq;
chan             1463 drivers/dma/nbpfaxi.c 		struct nbpf_channel *chan = nbpf->chan + i;
chan             1465 drivers/dma/nbpfaxi.c 		devm_free_irq(&pdev->dev, chan->irq, chan);
chan             1467 drivers/dma/nbpfaxi.c 		tasklet_kill(&chan->tasklet);
chan               56 drivers/dma/of-dma.c 	struct dma_chan		*chan;
chan               71 drivers/dma/of-dma.c 	chan = ofdma_target->of_dma_xlate(&dma_spec_target, ofdma_target);
chan               72 drivers/dma/of-dma.c 	if (chan) {
chan               73 drivers/dma/of-dma.c 		chan->router = ofdma->dma_router;
chan               74 drivers/dma/of-dma.c 		chan->route_data = route_data;
chan               85 drivers/dma/of-dma.c 	return chan;
chan              239 drivers/dma/of-dma.c 	struct dma_chan		*chan;
chan              275 drivers/dma/of-dma.c 			chan = ofdma->of_dma_xlate(&dma_spec, ofdma);
chan              278 drivers/dma/of-dma.c 			chan = NULL;
chan              285 drivers/dma/of-dma.c 		if (chan)
chan              286 drivers/dma/of-dma.c 			return chan;
chan              338 drivers/dma/of-dma.c 	struct dma_chan *chan, *candidate = NULL;
chan              343 drivers/dma/of-dma.c 	list_for_each_entry(chan, &dev->channels, device_node)
chan              344 drivers/dma/of-dma.c 		if (chan->chan_id == dma_spec->args[0]) {
chan              345 drivers/dma/of-dma.c 			candidate = chan;
chan              283 drivers/dma/owl-dma.c static struct device *chan2dev(struct dma_chan *chan)
chan              285 drivers/dma/owl-dma.c 	return &chan->dev->device;
chan              288 drivers/dma/owl-dma.c static inline struct owl_dma_vchan *to_owl_vchan(struct dma_chan *chan)
chan              290 drivers/dma/owl-dma.c 	return container_of(chan, struct owl_dma_vchan, vc.chan);
chan              497 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(vchan->vc.chan.device);
chan              536 drivers/dma/owl-dma.c 	dev_dbg(chan2dev(&vchan->vc.chan), "starting pchan %d\n", pchan->id);
chan              651 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(vd->tx.chan->device);
chan              657 drivers/dma/owl-dma.c static int owl_dma_terminate_all(struct dma_chan *chan)
chan              659 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(chan->device);
chan              660 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              682 drivers/dma/owl-dma.c static int owl_dma_config(struct dma_chan *chan,
chan              685 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              697 drivers/dma/owl-dma.c static int owl_dma_pause(struct dma_chan *chan)
chan              699 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              711 drivers/dma/owl-dma.c static int owl_dma_resume(struct dma_chan *chan)
chan              713 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              719 drivers/dma/owl-dma.c 	dev_dbg(chan2dev(chan), "vchan %p: resume\n", &vchan->vc);
chan              763 drivers/dma/owl-dma.c static enum dma_status owl_dma_tx_status(struct dma_chan *chan,
chan              767 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              775 drivers/dma/owl-dma.c 	ret = dma_cookie_status(chan, cookie, state);
chan              799 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(vchan->vc.chan.device);
chan              812 drivers/dma/owl-dma.c static void owl_dma_issue_pending(struct dma_chan *chan)
chan              814 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              826 drivers/dma/owl-dma.c 		*owl_dma_prep_memcpy(struct dma_chan *chan,
chan              830 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(chan->device);
chan              831 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              850 drivers/dma/owl-dma.c 			dev_warn(chan2dev(chan), "failed to allocate lli\n");
chan              860 drivers/dma/owl-dma.c 			dev_warn(chan2dev(chan), "failed to config lli\n");
chan              875 drivers/dma/owl-dma.c 		*owl_dma_prep_slave_sg(struct dma_chan *chan,
chan              881 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(chan->device);
chan              882 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              909 drivers/dma/owl-dma.c 			dev_err(chan2dev(chan), "failed to allocate lli");
chan              924 drivers/dma/owl-dma.c 			dev_warn(chan2dev(chan), "failed to config lli");
chan              940 drivers/dma/owl-dma.c 		*owl_prep_dma_cyclic(struct dma_chan *chan,
chan              946 drivers/dma/owl-dma.c 	struct owl_dma *od = to_owl_dma(chan->device);
chan              947 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan              965 drivers/dma/owl-dma.c 			dev_warn(chan2dev(chan), "failed to allocate lli");
chan              980 drivers/dma/owl-dma.c 			dev_warn(chan2dev(chan), "failed to config lli");
chan             1001 drivers/dma/owl-dma.c static void owl_dma_free_chan_resources(struct dma_chan *chan)
chan             1003 drivers/dma/owl-dma.c 	struct owl_dma_vchan *vchan = to_owl_vchan(chan);
chan             1015 drivers/dma/owl-dma.c 				 next, &od->dma.channels, vc.chan.device_node) {
chan             1016 drivers/dma/owl-dma.c 		list_del(&vchan->vc.chan.device_node);
chan             1026 drivers/dma/owl-dma.c 	struct dma_chan *chan;
chan             1032 drivers/dma/owl-dma.c 	chan = dma_get_any_slave_channel(&od->dma);
chan             1033 drivers/dma/owl-dma.c 	if (!chan)
chan             1036 drivers/dma/owl-dma.c 	vchan = to_owl_vchan(chan);
chan             1039 drivers/dma/owl-dma.c 	return chan;
chan               91 drivers/dma/pch_dma.c 	struct dma_chan		chan;
chan              143 drivers/dma/pch_dma.c static inline struct pch_dma_chan *to_pd_chan(struct dma_chan *chan)
chan              145 drivers/dma/pch_dma.c 	return container_of(chan, struct pch_dma_chan, chan);
chan              153 drivers/dma/pch_dma.c static inline struct device *chan2dev(struct dma_chan *chan)
chan              155 drivers/dma/pch_dma.c 	return &chan->dev->device;
chan              158 drivers/dma/pch_dma.c static inline struct device *chan2parent(struct dma_chan *chan)
chan              160 drivers/dma/pch_dma.c 	return chan->dev->device.parent;
chan              177 drivers/dma/pch_dma.c static void pdc_enable_irq(struct dma_chan *chan, int enable)
chan              179 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(chan->device);
chan              183 drivers/dma/pch_dma.c 	if (chan->chan_id < 8)
chan              184 drivers/dma/pch_dma.c 		pos = chan->chan_id;
chan              186 drivers/dma/pch_dma.c 		pos = chan->chan_id + 8;
chan              197 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(chan), "pdc_enable_irq: chan %d -> %x\n",
chan              198 drivers/dma/pch_dma.c 		chan->chan_id, val);
chan              201 drivers/dma/pch_dma.c static void pdc_set_dir(struct dma_chan *chan)
chan              203 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              204 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(chan->device);
chan              209 drivers/dma/pch_dma.c 	if (chan->chan_id < 8) {
chan              213 drivers/dma/pch_dma.c 					(DMA_CTL0_BITS_PER_CH * chan->chan_id);
chan              215 drivers/dma/pch_dma.c 				       (DMA_CTL0_BITS_PER_CH * chan->chan_id));
chan              218 drivers/dma/pch_dma.c 			val |= 0x1 << (DMA_CTL0_BITS_PER_CH * chan->chan_id +
chan              221 drivers/dma/pch_dma.c 			val &= ~(0x1 << (DMA_CTL0_BITS_PER_CH * chan->chan_id +
chan              227 drivers/dma/pch_dma.c 		int ch = chan->chan_id - 8; /* ch8-->0 ch9-->1 ... ch11->3 */
chan              245 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(chan), "pdc_set_dir: chan %d -> %x\n",
chan              246 drivers/dma/pch_dma.c 		chan->chan_id, val);
chan              249 drivers/dma/pch_dma.c static void pdc_set_mode(struct dma_chan *chan, u32 mode)
chan              251 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(chan->device);
chan              256 drivers/dma/pch_dma.c 	if (chan->chan_id < 8) {
chan              258 drivers/dma/pch_dma.c 			   (DMA_CTL0_BITS_PER_CH * chan->chan_id));
chan              259 drivers/dma/pch_dma.c 		mask_dir = 1 << (DMA_CTL0_BITS_PER_CH * chan->chan_id +\
chan              263 drivers/dma/pch_dma.c 		val |= mode << (DMA_CTL0_BITS_PER_CH * chan->chan_id);
chan              267 drivers/dma/pch_dma.c 		int ch = chan->chan_id - 8; /* ch8-->0 ch9-->1 ... ch11->3 */
chan              279 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(chan), "pdc_set_mode: chan %d -> %x\n",
chan              280 drivers/dma/pch_dma.c 		chan->chan_id, val);
chan              285 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(pd_chan->chan.device);
chan              290 drivers/dma/pch_dma.c 			DMA_STATUS_BITS_PER_CH * pd_chan->chan.chan_id));
chan              295 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(pd_chan->chan.device);
chan              300 drivers/dma/pch_dma.c 			DMA_STATUS_BITS_PER_CH * (pd_chan->chan.chan_id - 8)));
chan              307 drivers/dma/pch_dma.c 	if (pd_chan->chan.chan_id < 8)
chan              322 drivers/dma/pch_dma.c 		dev_err(chan2dev(&pd_chan->chan),
chan              327 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> dev_addr: %x\n",
chan              328 drivers/dma/pch_dma.c 		pd_chan->chan.chan_id, desc->regs.dev_addr);
chan              329 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> mem_addr: %x\n",
chan              330 drivers/dma/pch_dma.c 		pd_chan->chan.chan_id, desc->regs.mem_addr);
chan              331 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> size: %x\n",
chan              332 drivers/dma/pch_dma.c 		pd_chan->chan.chan_id, desc->regs.size);
chan              333 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(&pd_chan->chan), "chan %d -> next: %x\n",
chan              334 drivers/dma/pch_dma.c 		pd_chan->chan.chan_id, desc->regs.next);
chan              341 drivers/dma/pch_dma.c 		pdc_set_mode(&pd_chan->chan, DMA_CTL0_ONESHOT);
chan              344 drivers/dma/pch_dma.c 		pdc_set_mode(&pd_chan->chan, DMA_CTL0_SG);
chan              390 drivers/dma/pch_dma.c 	dev_crit(chan2dev(&pd_chan->chan), "Bad descriptor submitted\n");
chan              391 drivers/dma/pch_dma.c 	dev_crit(chan2dev(&pd_chan->chan), "descriptor cookie: %d\n",
chan              411 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(txd->chan);
chan              426 drivers/dma/pch_dma.c static struct pch_dma_desc *pdc_alloc_desc(struct dma_chan *chan, gfp_t flags)
chan              429 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(chan->device);
chan              435 drivers/dma/pch_dma.c 		dma_async_tx_descriptor_init(&desc->txd, chan);
chan              458 drivers/dma/pch_dma.c 		dev_dbg(chan2dev(&pd_chan->chan), "desc %p not ACKed\n", desc);
chan              461 drivers/dma/pch_dma.c 	dev_dbg(chan2dev(&pd_chan->chan), "scanned %d descriptors\n", i);
chan              464 drivers/dma/pch_dma.c 		ret = pdc_alloc_desc(&pd_chan->chan, GFP_ATOMIC);
chan              470 drivers/dma/pch_dma.c 			dev_err(chan2dev(&pd_chan->chan),
chan              489 drivers/dma/pch_dma.c static int pd_alloc_chan_resources(struct dma_chan *chan)
chan              491 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              497 drivers/dma/pch_dma.c 		dev_dbg(chan2dev(chan), "DMA channel not idle ?\n");
chan              505 drivers/dma/pch_dma.c 		desc = pdc_alloc_desc(chan, GFP_KERNEL);
chan              508 drivers/dma/pch_dma.c 			dev_warn(chan2dev(chan),
chan              519 drivers/dma/pch_dma.c 	dma_cookie_init(chan);
chan              522 drivers/dma/pch_dma.c 	pdc_enable_irq(chan, 1);
chan              527 drivers/dma/pch_dma.c static void pd_free_chan_resources(struct dma_chan *chan)
chan              529 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              530 drivers/dma/pch_dma.c 	struct pch_dma *pd = to_pd(chan->device);
chan              546 drivers/dma/pch_dma.c 	pdc_enable_irq(chan, 0);
chan              549 drivers/dma/pch_dma.c static enum dma_status pd_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              552 drivers/dma/pch_dma.c 	return dma_cookie_status(chan, cookie, txstate);
chan              555 drivers/dma/pch_dma.c static void pd_issue_pending(struct dma_chan *chan)
chan              557 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              566 drivers/dma/pch_dma.c static struct dma_async_tx_descriptor *pd_prep_slave_sg(struct dma_chan *chan,
chan              571 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              572 drivers/dma/pch_dma.c 	struct pch_dma_slave *pd_slave = chan->private;
chan              581 drivers/dma/pch_dma.c 		dev_info(chan2dev(chan), "prep_slave_sg: length is zero!\n");
chan              593 drivers/dma/pch_dma.c 	pdc_set_dir(chan);
chan              647 drivers/dma/pch_dma.c 	dev_err(chan2dev(chan), "failed to get desc or wrong parameters\n");
chan              652 drivers/dma/pch_dma.c static int pd_device_terminate_all(struct dma_chan *chan)
chan              654 drivers/dma/pch_dma.c 	struct pch_dma_chan *pd_chan = to_pd_chan(chan);
chan              660 drivers/dma/pch_dma.c 	pdc_set_mode(&pd_chan->chan, DMA_CTL0_DISABLE);
chan              679 drivers/dma/pch_dma.c 		dev_err(chan2dev(&pd_chan->chan),
chan              742 drivers/dma/pch_dma.c 	struct dma_chan *chan, *_c;
chan              750 drivers/dma/pch_dma.c 	list_for_each_entry_safe(chan, _c, &pd->dma.channels, device_node) {
chan              751 drivers/dma/pch_dma.c 		pd_chan = to_pd_chan(chan);
chan              765 drivers/dma/pch_dma.c 	struct dma_chan *chan, *_c;
chan              773 drivers/dma/pch_dma.c 	list_for_each_entry_safe(chan, _c, &pd->dma.channels, device_node) {
chan              774 drivers/dma/pch_dma.c 		pd_chan = to_pd_chan(chan);
chan              890 drivers/dma/pch_dma.c 		pd_chan->chan.device = &pd->dma;
chan              891 drivers/dma/pch_dma.c 		dma_cookie_init(&pd_chan->chan);
chan              903 drivers/dma/pch_dma.c 		list_add_tail(&pd_chan->chan.device_node, &pd->dma.channels);
chan              944 drivers/dma/pch_dma.c 	struct dma_chan *chan, *_c;
chan              951 drivers/dma/pch_dma.c 		list_for_each_entry_safe(chan, _c, &pd->dma.channels,
chan              953 drivers/dma/pch_dma.c 			pd_chan = to_pd_chan(chan);
chan              417 drivers/dma/pl330.c 	struct dma_chan chan;
chan              547 drivers/dma/pl330.c static int pl330_config_write(struct dma_chan *chan,
chan              834 drivers/dma/pl330.c 	u8 chan;
chan              842 drivers/dma/pl330.c 	u8 chan = arg->chan;
chan              851 drivers/dma/pl330.c 	buf[1] = chan & 0x7;
chan             1035 drivers/dma/pl330.c 	go.chan = thrd->id;
chan             2021 drivers/dma/pl330.c 	return container_of(ch, struct dma_pl330_chan, chan);
chan             2147 drivers/dma/pl330.c 	return dma_get_slave_channel(&pl330->peripherals[chan_id].chan);
chan             2150 drivers/dma/pl330.c static int pl330_alloc_chan_resources(struct dma_chan *chan)
chan             2152 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2158 drivers/dma/pl330.c 	dma_cookie_init(chan);
chan             2196 drivers/dma/pl330.c 		dma_unmap_resource(pch->chan.device->dev, pch->fifo_dma,
chan             2205 drivers/dma/pl330.c 	struct device *dev = pch->chan.device->dev;
chan             2234 drivers/dma/pl330.c static int pl330_config_write(struct dma_chan *chan,
chan             2238 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2260 drivers/dma/pl330.c static int pl330_config(struct dma_chan *chan,
chan             2263 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2270 drivers/dma/pl330.c static int pl330_terminate_all(struct dma_chan *chan)
chan             2272 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2321 drivers/dma/pl330.c static int pl330_pause(struct dma_chan *chan)
chan             2323 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2341 drivers/dma/pl330.c static void pl330_free_chan_resources(struct dma_chan *chan)
chan             2343 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2392 drivers/dma/pl330.c pl330_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan             2398 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2401 drivers/dma/pl330.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             2462 drivers/dma/pl330.c static void pl330_issue_pending(struct dma_chan *chan)
chan             2464 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2492 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(tx->chan);
chan             2580 drivers/dma/pl330.c 	u8 *peri_id = pch->chan.private;
chan             2603 drivers/dma/pl330.c 	desc->peri = peri_id ? pch->chan.chan_id : 0;
chan             2606 drivers/dma/pl330.c 	dma_async_tx_descriptor_init(&desc->txd, &pch->chan);
chan             2665 drivers/dma/pl330.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t len,
chan             2670 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2685 drivers/dma/pl330.c 	pl330_config_write(chan, &pch->slave_config, direction);
chan             2755 drivers/dma/pl330.c pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
chan             2759 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2829 drivers/dma/pl330.c pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             2834 drivers/dma/pl330.c 	struct dma_pl330_chan *pch = to_pchan(chan);
chan             2841 drivers/dma/pl330.c 	pl330_config_write(chan, &pch->slave_config, direction);
chan             3102 drivers/dma/pl330.c 		pch->chan.private = adev->dev.of_node;
chan             3108 drivers/dma/pl330.c 		pch->chan.device = pd;
chan             3113 drivers/dma/pl330.c 		list_add_tail(&pch->chan.device_node, &pd->channels);
chan             3184 drivers/dma/pl330.c 			chan.device_node) {
chan             3187 drivers/dma/pl330.c 		list_del(&pch->chan.device_node);
chan             3191 drivers/dma/pl330.c 			pl330_terminate_all(&pch->chan);
chan             3192 drivers/dma/pl330.c 			pl330_free_chan_resources(&pch->chan);
chan             3227 drivers/dma/pl330.c 			chan.device_node) {
chan             3230 drivers/dma/pl330.c 		list_del(&pch->chan.device_node);
chan             3234 drivers/dma/pl330.c 			pl330_terminate_all(&pch->chan);
chan             3235 drivers/dma/pl330.c 			pl330_free_chan_resources(&pch->chan);
chan               67 drivers/dma/ppc4xx/adma.c 	struct dma_chan *chan;
chan              129 drivers/dma/ppc4xx/adma.c static void print_cb(struct ppc440spe_adma_chan *chan, void *block)
chan              135 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              145 drivers/dma/ppc4xx/adma.c 			cdb, chan->device->id,
chan              159 drivers/dma/ppc4xx/adma.c 			cb, chan->device->id,
chan              173 drivers/dma/ppc4xx/adma.c static void print_cb_list(struct ppc440spe_adma_chan *chan,
chan              177 drivers/dma/ppc4xx/adma.c 		print_cb(chan, iter->hw_desc);
chan              232 drivers/dma/ppc4xx/adma.c 					  struct ppc440spe_adma_chan *chan)
chan              236 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              250 drivers/dma/ppc4xx/adma.c 		printk(KERN_ERR "Unsupported id %d in %s\n", chan->device->id,
chan              523 drivers/dma/ppc4xx/adma.c 					struct ppc440spe_adma_chan *chan,
chan              531 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              558 drivers/dma/ppc4xx/adma.c 			struct ppc440spe_adma_chan *chan, u32 mult_index,
chan              565 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              604 drivers/dma/ppc4xx/adma.c 				struct ppc440spe_adma_chan *chan,
chan              613 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              645 drivers/dma/ppc4xx/adma.c 				struct ppc440spe_adma_chan *chan,
chan              651 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              680 drivers/dma/ppc4xx/adma.c 				struct ppc440spe_adma_chan *chan, u8 *qword)
chan              684 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              723 drivers/dma/ppc4xx/adma.c static void ppc440spe_desc_set_link(struct ppc440spe_adma_chan *chan,
chan              747 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              772 drivers/dma/ppc4xx/adma.c 					struct ppc440spe_adma_chan *chan)
chan              892 drivers/dma/ppc4xx/adma.c ppc440spe_chan_get_current_descriptor(struct ppc440spe_adma_chan *chan);
chan              893 drivers/dma/ppc4xx/adma.c static void ppc440spe_chan_append(struct ppc440spe_adma_chan *chan);
chan              899 drivers/dma/ppc4xx/adma.c 					struct ppc440spe_adma_chan *chan)
chan              903 drivers/dma/ppc4xx/adma.c 	u8 *p = chan->device->dma_desc_pool_virt;
chan              907 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan              911 drivers/dma/ppc4xx/adma.c 		dma_reg = chan->device->dma_reg;
chan              915 drivers/dma/ppc4xx/adma.c 			    (u32)chan->device->dma_desc_pool];
chan              947 drivers/dma/ppc4xx/adma.c 				list_for_each_entry(iter, &chan->chain,
chan              956 drivers/dma/ppc4xx/adma.c 				BUG_ON(&iter->chain_node == &chan->chain);
chan              977 drivers/dma/ppc4xx/adma.c 			       chan->device->id, rv);
chan              984 drivers/dma/ppc4xx/adma.c 		xor_reg = chan->device->xor_reg;
chan             1010 drivers/dma/ppc4xx/adma.c 			ppc440spe_chan_append(chan);
chan             1018 drivers/dma/ppc4xx/adma.c static int ppc440spe_chan_is_busy(struct ppc440spe_adma_chan *chan)
chan             1024 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             1027 drivers/dma/ppc4xx/adma.c 		dma_reg = chan->device->dma_reg;
chan             1038 drivers/dma/ppc4xx/adma.c 		xor_reg = chan->device->xor_reg;
chan             1050 drivers/dma/ppc4xx/adma.c 				struct ppc440spe_adma_chan *chan,
chan             1053 drivers/dma/ppc4xx/adma.c 	struct xor_regs *xor_reg = chan->device->xor_reg;
chan             1069 drivers/dma/ppc4xx/adma.c 	chan->hw_chain_inited = 1;
chan             1076 drivers/dma/ppc4xx/adma.c static void ppc440spe_dma_put_desc(struct ppc440spe_adma_chan *chan,
chan             1080 drivers/dma/ppc4xx/adma.c 	struct dma_regs *dma_reg = chan->device->dma_reg;
chan             1086 drivers/dma/ppc4xx/adma.c 	chan_last_sub[chan->device->id] = desc;
chan             1088 drivers/dma/ppc4xx/adma.c 	ADMA_LL_DBG(print_cb(chan, desc->hw_desc));
chan             1096 drivers/dma/ppc4xx/adma.c static void ppc440spe_chan_append(struct ppc440spe_adma_chan *chan)
chan             1106 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             1109 drivers/dma/ppc4xx/adma.c 		cur_desc = ppc440spe_chan_get_current_descriptor(chan);
chan             1112 drivers/dma/ppc4xx/adma.c 			iter = chan_last_sub[chan->device->id];
chan             1116 drivers/dma/ppc4xx/adma.c 			iter = chan_first_cdb[chan->device->id];
chan             1118 drivers/dma/ppc4xx/adma.c 			ppc440spe_dma_put_desc(chan, iter);
chan             1119 drivers/dma/ppc4xx/adma.c 			chan->hw_chain_inited = 1;
chan             1127 drivers/dma/ppc4xx/adma.c 		list_for_each_entry_continue(iter, &chan->chain, chain_node) {
chan             1128 drivers/dma/ppc4xx/adma.c 			ppc440spe_dma_put_desc(chan, iter);
chan             1138 drivers/dma/ppc4xx/adma.c 		xor_reg = chan->device->xor_reg;
chan             1153 drivers/dma/ppc4xx/adma.c 			ADMA_LL_DBG(print_cb_list(chan,
chan             1175 drivers/dma/ppc4xx/adma.c ppc440spe_chan_get_current_descriptor(struct ppc440spe_adma_chan *chan)
chan             1180 drivers/dma/ppc4xx/adma.c 	if (unlikely(!chan->hw_chain_inited))
chan             1184 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             1187 drivers/dma/ppc4xx/adma.c 		dma_reg = chan->device->dma_reg;
chan             1190 drivers/dma/ppc4xx/adma.c 		xor_reg = chan->device->xor_reg;
chan             1199 drivers/dma/ppc4xx/adma.c static void ppc440spe_chan_run(struct ppc440spe_adma_chan *chan)
chan             1203 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             1210 drivers/dma/ppc4xx/adma.c 		xor_reg = chan->device->xor_reg;
chan             1223 drivers/dma/ppc4xx/adma.c static void ppc440spe_chan_start_null_xor(struct ppc440spe_adma_chan *chan);
chan             1224 drivers/dma/ppc4xx/adma.c static int ppc440spe_adma_alloc_chan_resources(struct dma_chan *chan);
chan             1328 drivers/dma/ppc4xx/adma.c static int ppc440spe_adma_estimate(struct dma_chan *chan,
chan             1351 drivers/dma/ppc4xx/adma.c 	if (cap == DMA_PQ && chan->chan_id == PPC440SPE_XOR_ID) {
chan             1363 drivers/dma/ppc4xx/adma.c 	    !ppc440spe_chan_is_busy(to_ppc440spe_adma_chan(chan)))
chan             1402 drivers/dma/ppc4xx/adma.c 		if (dma_has_cap(cap, ref->chan->device->cap_mask)) {
chan             1405 drivers/dma/ppc4xx/adma.c 			rank = ppc440spe_adma_estimate(ref->chan, cap, dst_lst,
chan             1409 drivers/dma/ppc4xx/adma.c 				best_chan = ref->chan;
chan             1447 drivers/dma/ppc4xx/adma.c 				      struct ppc440spe_adma_chan *chan)
chan             1465 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan,
chan             1490 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan)
chan             1501 drivers/dma/ppc4xx/adma.c 	if (list_is_last(&desc->chain_node, &chan->chain) ||
chan             1502 drivers/dma/ppc4xx/adma.c 	    desc->phys == ppc440spe_chan_get_current_descriptor(chan))
chan             1505 drivers/dma/ppc4xx/adma.c 	if (chan->device->id != PPC440SPE_XOR_ID) {
chan             1520 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev, "\tfree slot %llx: %d stride: %d\n",
chan             1524 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_free_slots(desc, chan);
chan             1535 drivers/dma/ppc4xx/adma.c static void __ppc440spe_adma_slot_cleanup(struct ppc440spe_adma_chan *chan)
chan             1539 drivers/dma/ppc4xx/adma.c 	u32 current_desc = ppc440spe_chan_get_current_descriptor(chan);
chan             1540 drivers/dma/ppc4xx/adma.c 	int busy = ppc440spe_chan_is_busy(chan);
chan             1543 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev, "ppc440spe adma%d: %s\n",
chan             1544 drivers/dma/ppc4xx/adma.c 		chan->device->id, __func__);
chan             1556 drivers/dma/ppc4xx/adma.c 	list_for_each_entry_safe(iter, _iter, &chan->chain,
chan             1558 drivers/dma/ppc4xx/adma.c 		dev_dbg(chan->device->common.dev, "\tcookie: %d slot: %d "
chan             1562 drivers/dma/ppc4xx/adma.c 		    ppc440spe_desc_get_link(iter, chan), current_desc,
chan             1580 drivers/dma/ppc4xx/adma.c 			if (busy || ppc440spe_desc_get_link(iter, chan)) {
chan             1613 drivers/dma/ppc4xx/adma.c 				&chan->chain, chain_node) {
chan             1616 drivers/dma/ppc4xx/adma.c 					grp_iter, chan, cookie);
chan             1620 drivers/dma/ppc4xx/adma.c 				    grp_iter, chan);
chan             1624 drivers/dma/ppc4xx/adma.c 						chan->common.completed_cookie = cookie;
chan             1644 drivers/dma/ppc4xx/adma.c 		cookie = ppc440spe_adma_run_tx_complete_actions(iter, chan,
chan             1647 drivers/dma/ppc4xx/adma.c 		if (ppc440spe_adma_clean_slot(iter, chan))
chan             1654 drivers/dma/ppc4xx/adma.c 		chan->common.completed_cookie = cookie;
chan             1665 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan = (struct ppc440spe_adma_chan *) data;
chan             1667 drivers/dma/ppc4xx/adma.c 	spin_lock_nested(&chan->lock, SINGLE_DEPTH_NESTING);
chan             1668 drivers/dma/ppc4xx/adma.c 	__ppc440spe_adma_slot_cleanup(chan);
chan             1669 drivers/dma/ppc4xx/adma.c 	spin_unlock(&chan->lock);
chan             1675 drivers/dma/ppc4xx/adma.c static void ppc440spe_adma_slot_cleanup(struct ppc440spe_adma_chan *chan)
chan             1677 drivers/dma/ppc4xx/adma.c 	spin_lock_bh(&chan->lock);
chan             1678 drivers/dma/ppc4xx/adma.c 	__ppc440spe_adma_slot_cleanup(chan);
chan             1679 drivers/dma/ppc4xx/adma.c 	spin_unlock_bh(&chan->lock);
chan             1686 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan, int num_slots,
chan             1703 drivers/dma/ppc4xx/adma.c 		iter = chan->last_used;
chan             1705 drivers/dma/ppc4xx/adma.c 		iter = list_entry(&chan->all_slots,
chan             1708 drivers/dma/ppc4xx/adma.c 	list_for_each_entry_safe_continue(iter, _iter, &chan->all_slots,
chan             1751 drivers/dma/ppc4xx/adma.c 			chan->last_used = last_used;
chan             1759 drivers/dma/ppc4xx/adma.c 	tasklet_schedule(&chan->irq_tasklet);
chan             1766 drivers/dma/ppc4xx/adma.c static int ppc440spe_adma_alloc_chan_resources(struct dma_chan *chan)
chan             1774 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             1776 drivers/dma/ppc4xx/adma.c 	chan->chan_id = ppc440spe_chan->device->id;
chan             1796 drivers/dma/ppc4xx/adma.c 		dma_async_tx_descriptor_init(&slot->async_tx, chan);
chan             1881 drivers/dma/ppc4xx/adma.c static void ppc440spe_adma_check_threshold(struct ppc440spe_adma_chan *chan)
chan             1883 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev, "ppc440spe adma%d: pending: %d\n",
chan             1884 drivers/dma/ppc4xx/adma.c 		chan->device->id, chan->pending);
chan             1886 drivers/dma/ppc4xx/adma.c 	if (chan->pending >= PPC440SPE_ADMA_THRESHOLD) {
chan             1887 drivers/dma/ppc4xx/adma.c 		chan->pending = 0;
chan             1888 drivers/dma/ppc4xx/adma.c 		ppc440spe_chan_append(chan);
chan             1900 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan = to_ppc440spe_adma_chan(tx->chan);
chan             1912 drivers/dma/ppc4xx/adma.c 	spin_lock_bh(&chan->lock);
chan             1915 drivers/dma/ppc4xx/adma.c 	if (unlikely(list_empty(&chan->chain))) {
chan             1917 drivers/dma/ppc4xx/adma.c 		list_splice_init(&sw_desc->group_list, &chan->chain);
chan             1918 drivers/dma/ppc4xx/adma.c 		chan_first_cdb[chan->device->id] = group_start;
chan             1921 drivers/dma/ppc4xx/adma.c 		old_chain_tail = list_entry(chan->chain.prev,
chan             1927 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_link(chan, old_chain_tail, group_start);
chan             1931 drivers/dma/ppc4xx/adma.c 	chan->pending += slot_cnt / slots_per_op;
chan             1932 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_check_threshold(chan);
chan             1933 drivers/dma/ppc4xx/adma.c 	spin_unlock_bh(&chan->lock);
chan             1935 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev,
chan             1937 drivers/dma/ppc4xx/adma.c 		chan->device->id, __func__,
chan             1947 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, unsigned long flags)
chan             1953 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             1978 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, dma_addr_t dma_dest,
chan             1985 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             2019 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, dma_addr_t dma_dest,
chan             2027 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             2102 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan;
chan             2106 drivers/dma/ppc4xx/adma.c 		chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             2125 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan,
chan             2127 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan, 0, dst[1], 1);
chan             2128 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(iter, chan, 0, DMA_CUED_XOR_HB,
chan             2149 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(iter, chan, 0,
chan             2151 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan,
chan             2154 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_mult(iter, chan, DMA_CUED_MULT1_OFF,
chan             2188 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan;
chan             2192 drivers/dma/ppc4xx/adma.c 		chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             2208 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan, DMA_CUED_XOR_BASE,
chan             2210 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan, 0,
chan             2212 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(iter, chan, 0, DMA_CUED_XOR_HB,
chan             2234 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(iter, chan, 0, DMA_CUED_XOR_HB,
chan             2236 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan, DMA_CUED_XOR_BASE,
chan             2238 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_mult(iter, chan,	DMA_CUED_MULT1_OFF,
chan             2259 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(iter, chan, 0, DMA_CUED_XOR_HB,
chan             2261 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_dest_addr(iter, chan, DMA_CUED_XOR_BASE,
chan             2263 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_mult(iter, chan, DMA_CUED_MULT1_OFF,
chan             2510 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
chan             2518 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             2586 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
chan             2595 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             2637 drivers/dma/ppc4xx/adma.c 			struct ppc440spe_adma_chan *chan;
chan             2640 drivers/dma/ppc4xx/adma.c 			chan = to_ppc440spe_adma_chan(iter->async_tx.chan);
chan             2649 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan, 0,
chan             2651 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_src_addr(iter, chan, 0, 0, pdest);
chan             2660 drivers/dma/ppc4xx/adma.c 			struct ppc440spe_adma_chan *chan;
chan             2665 drivers/dma/ppc4xx/adma.c 			chan = to_ppc440spe_adma_chan(iter->async_tx.chan);
chan             2681 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan, 0,
chan             2683 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_src_addr(iter, chan, 0, 0, qdest);
chan             2737 drivers/dma/ppc4xx/adma.c 			struct ppc440spe_adma_chan *chan;
chan             2740 drivers/dma/ppc4xx/adma.c 			chan = to_ppc440spe_adma_chan(iter->async_tx.chan);
chan             2741 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_src_addr(iter, chan, 0,
chan             2747 drivers/dma/ppc4xx/adma.c 				ppc440spe_desc_set_src_mult(iter, chan,
chan             2765 drivers/dma/ppc4xx/adma.c 		struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt,
chan             2776 drivers/dma/ppc4xx/adma.c 	tx = ppc440spe_adma_prep_dma_pqzero_sum(chan, pq, &src[1],
chan             2788 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             2792 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             2794 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             2801 drivers/dma/ppc4xx/adma.c 			chan, 0, addr, index);
chan             2806 drivers/dma/ppc4xx/adma.c 			chan, 0, addr, index);
chan             2812 drivers/dma/ppc4xx/adma.c 		struct ppc440spe_adma_chan *chan, dma_addr_t addr)
chan             2818 drivers/dma/ppc4xx/adma.c 	ppc440spe_desc_set_dest_addr(iter, chan, DMA_CUED_XOR_BASE, addr, 0);
chan             2821 drivers/dma/ppc4xx/adma.c 	ppc440spe_desc_set_src_addr(iter, chan, 0, DMA_CUED_XOR_HB, addr);
chan             2824 drivers/dma/ppc4xx/adma.c 	ppc440spe_desc_set_src_mult(iter, chan, DMA_CUED_MULT1_OFF,
chan             2836 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             2841 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             2856 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             2874 drivers/dma/ppc4xx/adma.c 					ppc440spe_desc_set_dest_addr(iter, chan,
chan             2880 drivers/dma/ppc4xx/adma.c 					ppc440spe_desc_set_dest_addr(iter, chan,
chan             2882 drivers/dma/ppc4xx/adma.c 					ppc440spe_desc_set_dest_addr(iter, chan,
chan             2896 drivers/dma/ppc4xx/adma.c 					ppc440spe_adma_pq_zero_op(iter, chan,
chan             2904 drivers/dma/ppc4xx/adma.c 					ppc440spe_adma_pq_zero_op(iter, chan,
chan             2927 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan,
chan             2934 drivers/dma/ppc4xx/adma.c 				ppc440spe_desc_set_dest_addr(iter, chan,
chan             2950 drivers/dma/ppc4xx/adma.c 							iter, chan,
chan             2960 drivers/dma/ppc4xx/adma.c 							iter, chan,
chan             2964 drivers/dma/ppc4xx/adma.c 							iter, chan,
chan             2992 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan,
chan             3006 drivers/dma/ppc4xx/adma.c 					chan, qpath, qaddr, 0);
chan             3026 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             3030 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             3052 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan,
chan             3054 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan,
chan             3064 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_dest_addr(iter, chan,
chan             3073 drivers/dma/ppc4xx/adma.c 	ppc440spe_desc_set_src_addr(end, chan, 0, 0, addr ? addr : paddr);
chan             3078 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(end, chan, 0, 0, qaddr);
chan             3101 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             3105 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             3107 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             3173 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_src_addr(iter, chan, 0, haddr, addr);
chan             3182 drivers/dma/ppc4xx/adma.c 				ppc440spe_desc_set_src_addr(iter, chan, 0,
chan             3211 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             3213 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             3217 drivers/dma/ppc4xx/adma.c 		ppc440spe_desc_set_src_addr(sw_desc, chan, index, 0, addr);
chan             3453 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             3457 drivers/dma/ppc4xx/adma.c 	chan = to_ppc440spe_adma_chan(sw_desc->async_tx.chan);
chan             3459 drivers/dma/ppc4xx/adma.c 	switch (chan->device->id) {
chan             3503 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_src_mult(iter, chan,
chan             3510 drivers/dma/ppc4xx/adma.c 				ppc440spe_desc_set_src_mult(iter1, chan,
chan             3535 drivers/dma/ppc4xx/adma.c static void ppc440spe_adma_free_chan_resources(struct dma_chan *chan)
chan             3541 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             3576 drivers/dma/ppc4xx/adma.c static enum dma_status ppc440spe_adma_tx_status(struct dma_chan *chan,
chan             3582 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             3583 drivers/dma/ppc4xx/adma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             3589 drivers/dma/ppc4xx/adma.c 	return dma_cookie_status(chan, cookie, txstate);
chan             3597 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan = data;
chan             3599 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev,
chan             3600 drivers/dma/ppc4xx/adma.c 		"ppc440spe adma%d: %s\n", chan->device->id, __func__);
chan             3602 drivers/dma/ppc4xx/adma.c 	tasklet_schedule(&chan->irq_tasklet);
chan             3603 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_device_clear_eot_status(chan);
chan             3614 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan = data;
chan             3616 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev,
chan             3617 drivers/dma/ppc4xx/adma.c 		"ppc440spe adma%d: %s\n", chan->device->id, __func__);
chan             3619 drivers/dma/ppc4xx/adma.c 	tasklet_schedule(&chan->irq_tasklet);
chan             3620 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_device_clear_eot_status(chan);
chan             3636 drivers/dma/ppc4xx/adma.c static void ppc440spe_adma_issue_pending(struct dma_chan *chan)
chan             3640 drivers/dma/ppc4xx/adma.c 	ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             3656 drivers/dma/ppc4xx/adma.c static void ppc440spe_chan_start_null_xor(struct ppc440spe_adma_chan *chan)
chan             3662 drivers/dma/ppc4xx/adma.c 	dev_dbg(chan->device->common.dev,
chan             3663 drivers/dma/ppc4xx/adma.c 		"ppc440spe adma%d: %s\n", chan->device->id, __func__);
chan             3665 drivers/dma/ppc4xx/adma.c 	spin_lock_bh(&chan->lock);
chan             3667 drivers/dma/ppc4xx/adma.c 	sw_desc = ppc440spe_adma_alloc_slots(chan, slot_cnt, slots_per_op);
chan             3670 drivers/dma/ppc4xx/adma.c 		list_splice_init(&sw_desc->group_list, &chan->chain);
chan             3679 drivers/dma/ppc4xx/adma.c 		chan->common.completed_cookie = cookie - 1;
chan             3682 drivers/dma/ppc4xx/adma.c 		BUG_ON(ppc440spe_chan_is_busy(chan));
chan             3685 drivers/dma/ppc4xx/adma.c 		ppc440spe_chan_set_first_xor_descriptor(chan, sw_desc);
chan             3688 drivers/dma/ppc4xx/adma.c 		ppc440spe_chan_run(chan);
chan             3692 drivers/dma/ppc4xx/adma.c 			chan->device->id);
chan             3693 drivers/dma/ppc4xx/adma.c 	spin_unlock_bh(&chan->lock);
chan             3702 drivers/dma/ppc4xx/adma.c static int ppc440spe_test_raid6(struct ppc440spe_adma_chan *chan)
chan             3717 drivers/dma/ppc4xx/adma.c 	spin_lock_bh(&chan->lock);
chan             3718 drivers/dma/ppc4xx/adma.c 	sw_desc = ppc440spe_adma_alloc_slots(chan, 1, 1);
chan             3723 drivers/dma/ppc4xx/adma.c 			ppc440spe_desc_set_byte_count(iter, chan, PAGE_SIZE);
chan             3728 drivers/dma/ppc4xx/adma.c 		spin_unlock_bh(&chan->lock);
chan             3731 drivers/dma/ppc4xx/adma.c 	spin_unlock_bh(&chan->lock);
chan             3735 drivers/dma/ppc4xx/adma.c 	dma_addr = dma_map_page(chan->device->dev, pg, 0,
chan             3752 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_issue_pending(&chan->common);
chan             3868 drivers/dma/ppc4xx/adma.c 				     struct ppc440spe_adma_chan *chan,
chan             3900 drivers/dma/ppc4xx/adma.c 			  0, dev_driver_string(adev->dev), chan);
chan             3918 drivers/dma/ppc4xx/adma.c 				  chan);
chan             3963 drivers/dma/ppc4xx/adma.c 	free_irq(adev->irq, chan);
chan             3975 drivers/dma/ppc4xx/adma.c 					struct ppc440spe_adma_chan *chan)
chan             3993 drivers/dma/ppc4xx/adma.c 	free_irq(adev->irq, chan);
chan             3996 drivers/dma/ppc4xx/adma.c 		free_irq(adev->err_irq, chan);
chan             4012 drivers/dma/ppc4xx/adma.c 	struct ppc440spe_adma_chan *chan;
chan             4130 drivers/dma/ppc4xx/adma.c 	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan             4131 drivers/dma/ppc4xx/adma.c 	if (!chan) {
chan             4137 drivers/dma/ppc4xx/adma.c 	spin_lock_init(&chan->lock);
chan             4138 drivers/dma/ppc4xx/adma.c 	INIT_LIST_HEAD(&chan->chain);
chan             4139 drivers/dma/ppc4xx/adma.c 	INIT_LIST_HEAD(&chan->all_slots);
chan             4140 drivers/dma/ppc4xx/adma.c 	chan->device = adev;
chan             4141 drivers/dma/ppc4xx/adma.c 	chan->common.device = &adev->common;
chan             4142 drivers/dma/ppc4xx/adma.c 	dma_cookie_init(&chan->common);
chan             4143 drivers/dma/ppc4xx/adma.c 	list_add_tail(&chan->common.device_node, &adev->common.channels);
chan             4144 drivers/dma/ppc4xx/adma.c 	tasklet_init(&chan->irq_tasklet, ppc440spe_adma_tasklet,
chan             4145 drivers/dma/ppc4xx/adma.c 		     (unsigned long)chan);
chan             4151 drivers/dma/ppc4xx/adma.c 		chan->pdest_page = alloc_page(GFP_KERNEL);
chan             4152 drivers/dma/ppc4xx/adma.c 		chan->qdest_page = alloc_page(GFP_KERNEL);
chan             4153 drivers/dma/ppc4xx/adma.c 		if (!chan->pdest_page ||
chan             4154 drivers/dma/ppc4xx/adma.c 		    !chan->qdest_page) {
chan             4155 drivers/dma/ppc4xx/adma.c 			if (chan->pdest_page)
chan             4156 drivers/dma/ppc4xx/adma.c 				__free_page(chan->pdest_page);
chan             4157 drivers/dma/ppc4xx/adma.c 			if (chan->qdest_page)
chan             4158 drivers/dma/ppc4xx/adma.c 				__free_page(chan->qdest_page);
chan             4162 drivers/dma/ppc4xx/adma.c 		chan->pdest = dma_map_page(&ofdev->dev, chan->pdest_page, 0,
chan             4164 drivers/dma/ppc4xx/adma.c 		chan->qdest = dma_map_page(&ofdev->dev, chan->qdest_page, 0,
chan             4170 drivers/dma/ppc4xx/adma.c 		ref->chan = &chan->common;
chan             4179 drivers/dma/ppc4xx/adma.c 	ret = ppc440spe_adma_setup_irqs(adev, chan, &initcode);
chan             4195 drivers/dma/ppc4xx/adma.c 	ppc440spe_adma_release_irqs(adev, chan);
chan             4198 drivers/dma/ppc4xx/adma.c 		if (chan == to_ppc440spe_adma_chan(ref->chan)) {
chan             4205 drivers/dma/ppc4xx/adma.c 		dma_unmap_page(&ofdev->dev, chan->pdest,
chan             4207 drivers/dma/ppc4xx/adma.c 		dma_unmap_page(&ofdev->dev, chan->qdest,
chan             4209 drivers/dma/ppc4xx/adma.c 		__free_page(chan->pdest_page);
chan             4210 drivers/dma/ppc4xx/adma.c 		__free_page(chan->qdest_page);
chan             4213 drivers/dma/ppc4xx/adma.c 	kfree(chan);
chan             4242 drivers/dma/ppc4xx/adma.c 	struct dma_chan *chan, *_chan;
chan             4251 drivers/dma/ppc4xx/adma.c 	list_for_each_entry_safe(chan, _chan, &adev->common.channels,
chan             4253 drivers/dma/ppc4xx/adma.c 		ppc440spe_chan = to_ppc440spe_adma_chan(chan);
chan             4267 drivers/dma/ppc4xx/adma.c 			    to_ppc440spe_adma_chan(ref->chan)) {
chan             4272 drivers/dma/ppc4xx/adma.c 		list_del(&chan->device_node);
chan               18 drivers/dma/ppc4xx/adma.h #define to_ppc440spe_adma_chan(chan) \
chan               19 drivers/dma/ppc4xx/adma.h 		container_of(chan, struct ppc440spe_adma_chan, common)
chan              139 drivers/dma/pxa_dma.c 	container_of(dchan, struct pxad_chan, vc.chan)
chan              151 drivers/dma/pxa_dma.c 		dev_vdbg(&phy->vchan->vc.chan.dev->device,		\
chan              159 drivers/dma/pxa_dma.c 		dev_vdbg(&phy->vchan->vc.chan.dev->device,		\
chan              166 drivers/dma/pxa_dma.c 		dev_vdbg(&phy->vchan->vc.chan.dev->device,		\
chan              178 drivers/dma/pxa_dma.c static bool pxad_filter_fn(struct dma_chan *chan, void *param);
chan              325 drivers/dma/pxa_dma.c 	struct dentry *chan;
chan              329 drivers/dma/pxa_dma.c 	chan = debugfs_create_dir(chan_name, chandir);
chan              332 drivers/dma/pxa_dma.c 	debugfs_create_file("state", 0400, chan, dt, &chan_state_fops);
chan              333 drivers/dma/pxa_dma.c 	debugfs_create_file("descriptors", 0400, chan, dt, &descriptors_fops);
chan              334 drivers/dma/pxa_dma.c 	debugfs_create_file("requesters", 0400, chan, dt, &requester_chan_fops);
chan              336 drivers/dma/pxa_dma.c 	return chan;
chan              372 drivers/dma/pxa_dma.c 	struct pxad_device *pdev = to_pxad_dev(pchan->vc.chan.device);
chan              400 drivers/dma/pxa_dma.c 	dev_dbg(&pchan->vc.chan.dev->device,
chan              407 drivers/dma/pxa_dma.c static void pxad_free_phy(struct pxad_chan *chan)
chan              409 drivers/dma/pxa_dma.c 	struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
chan              413 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              415 drivers/dma/pxa_dma.c 	if (!chan->phy)
chan              419 drivers/dma/pxa_dma.c 	if (chan->drcmr <= pdev->nr_requestors) {
chan              420 drivers/dma/pxa_dma.c 		reg = pxad_drcmr(chan->drcmr);
chan              421 drivers/dma/pxa_dma.c 		writel_relaxed(0, chan->phy->base + reg);
chan              425 drivers/dma/pxa_dma.c 	chan->phy->vchan = NULL;
chan              426 drivers/dma/pxa_dma.c 	chan->phy = NULL;
chan              430 drivers/dma/pxa_dma.c static bool is_chan_running(struct pxad_chan *chan)
chan              433 drivers/dma/pxa_dma.c 	struct pxad_phy *phy = chan->phy;
chan              441 drivers/dma/pxa_dma.c static bool is_running_chan_misaligned(struct pxad_chan *chan)
chan              445 drivers/dma/pxa_dma.c 	BUG_ON(!chan->phy);
chan              446 drivers/dma/pxa_dma.c 	dalgn = phy_readl_relaxed(chan->phy, DALGN);
chan              447 drivers/dma/pxa_dma.c 	return dalgn & (BIT(chan->phy->idx));
chan              458 drivers/dma/pxa_dma.c 	dev_dbg(&phy->vchan->vc.chan.dev->device,
chan              462 drivers/dma/pxa_dma.c 	pdev = to_pxad_dev(phy->vchan->vc.chan.device);
chan              487 drivers/dma/pxa_dma.c 	dev_dbg(&phy->vchan->vc.chan.dev->device,
chan              492 drivers/dma/pxa_dma.c static void pxad_launch_chan(struct pxad_chan *chan,
chan              495 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              497 drivers/dma/pxa_dma.c 	if (!chan->phy) {
chan              498 drivers/dma/pxa_dma.c 		chan->phy = lookup_phy(chan);
chan              499 drivers/dma/pxa_dma.c 		if (!chan->phy) {
chan              500 drivers/dma/pxa_dma.c 			dev_dbg(&chan->vc.chan.dev->device,
chan              505 drivers/dma/pxa_dma.c 	chan->bus_error = 0;
chan              511 drivers/dma/pxa_dma.c 	phy_writel(chan->phy, desc->first, DDADR);
chan              512 drivers/dma/pxa_dma.c 	phy_enable(chan->phy, chan->misaligned);
chan              513 drivers/dma/pxa_dma.c 	wake_up(&chan->wq_state);
chan              558 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(&vc->chan);
chan              567 drivers/dma/pxa_dma.c 	if (is_chan_running(chan)) {
chan              570 drivers/dma/pxa_dma.c 		if (!is_running_chan_misaligned(chan) &&
chan              577 drivers/dma/pxa_dma.c 		if (is_chan_running(chan) || is_desc_completed(vd))
chan              596 drivers/dma/pxa_dma.c 		dev_warn(&phy->vchan->vc.chan.dev->device,
chan              606 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = phy->vchan;
chan              613 drivers/dma/pxa_dma.c 	BUG_ON(!chan);
chan              619 drivers/dma/pxa_dma.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              620 drivers/dma/pxa_dma.c 	list_for_each_entry_safe(vd, tmp, &chan->vc.desc_issued, node) {
chan              622 drivers/dma/pxa_dma.c 		dev_dbg(&chan->vc.chan.dev->device,
chan              640 drivers/dma/pxa_dma.c 		chan->bus_error = last_started;
chan              644 drivers/dma/pxa_dma.c 	if (!chan->bus_error && dcsr & PXA_DCSR_STOPSTATE) {
chan              645 drivers/dma/pxa_dma.c 		dev_dbg(&chan->vc.chan.dev->device,
chan              648 drivers/dma/pxa_dma.c 			list_empty(&chan->vc.desc_submitted),
chan              649 drivers/dma/pxa_dma.c 			list_empty(&chan->vc.desc_issued));
chan              652 drivers/dma/pxa_dma.c 		if (list_empty(&chan->vc.desc_issued)) {
chan              653 drivers/dma/pxa_dma.c 			chan->misaligned =
chan              654 drivers/dma/pxa_dma.c 				!list_empty(&chan->vc.desc_submitted);
chan              656 drivers/dma/pxa_dma.c 			vd = list_first_entry(&chan->vc.desc_issued,
chan              658 drivers/dma/pxa_dma.c 			pxad_launch_chan(chan, to_pxad_sw_desc(vd));
chan              661 drivers/dma/pxa_dma.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              662 drivers/dma/pxa_dma.c 	wake_up(&chan->wq_state);
chan              687 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan              688 drivers/dma/pxa_dma.c 	struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
chan              690 drivers/dma/pxa_dma.c 	if (chan->desc_pool)
chan              693 drivers/dma/pxa_dma.c 	chan->desc_pool = dma_pool_create(dma_chan_name(dchan),
chan              698 drivers/dma/pxa_dma.c 	if (!chan->desc_pool) {
chan              699 drivers/dma/pxa_dma.c 		dev_err(&chan->vc.chan.dev->device,
chan              710 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan              712 drivers/dma/pxa_dma.c 	vchan_free_chan_resources(&chan->vc);
chan              713 drivers/dma/pxa_dma.c 	dma_pool_destroy(chan->desc_pool);
chan              714 drivers/dma/pxa_dma.c 	chan->desc_pool = NULL;
chan              716 drivers/dma/pxa_dma.c 	chan->drcmr = U32_MAX;
chan              717 drivers/dma/pxa_dma.c 	chan->prio = PXAD_PRIO_LOWEST;
chan              740 drivers/dma/pxa_dma.c pxad_alloc_desc(struct pxad_chan *chan, unsigned int nb_hw_desc)
chan              751 drivers/dma/pxa_dma.c 	sw_desc->desc_pool = chan->desc_pool;
chan              757 drivers/dma/pxa_dma.c 			dev_err(&chan->vc.chan.dev->device,
chan              778 drivers/dma/pxa_dma.c 	struct virt_dma_chan *vc = to_virt_chan(tx->chan);
chan              779 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(&vc->chan);
chan              792 drivers/dma/pxa_dma.c 		dev_dbg(&chan->vc.chan.dev->device,
chan              810 drivers/dma/pxa_dma.c 		if (chan->misaligned || !to_pxad_sw_desc(vd)->misaligned)
chan              815 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              819 drivers/dma/pxa_dma.c 	chan->misaligned |= to_pxad_sw_desc(vd)->misaligned;
chan              828 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan              832 drivers/dma/pxa_dma.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              833 drivers/dma/pxa_dma.c 	if (list_empty(&chan->vc.desc_submitted))
chan              836 drivers/dma/pxa_dma.c 	vd_first = list_first_entry(&chan->vc.desc_submitted,
chan              838 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              841 drivers/dma/pxa_dma.c 	vchan_issue_pending(&chan->vc);
chan              842 drivers/dma/pxa_dma.c 	if (!pxad_try_hotchain(&chan->vc, vd_first))
chan              843 drivers/dma/pxa_dma.c 		pxad_launch_chan(chan, to_pxad_sw_desc(vd_first));
chan              845 drivers/dma/pxa_dma.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              853 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = container_of(vc, struct pxad_chan, vc);
chan              858 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              866 drivers/dma/pxa_dma.c static void pxad_get_config(struct pxad_chan *chan,
chan              872 drivers/dma/pxa_dma.c 	struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
chan              876 drivers/dma/pxa_dma.c 		maxburst = chan->cfg.src_maxburst;
chan              877 drivers/dma/pxa_dma.c 		width = chan->cfg.src_addr_width;
chan              878 drivers/dma/pxa_dma.c 		dev_addr = chan->cfg.src_addr;
chan              881 drivers/dma/pxa_dma.c 		if (chan->drcmr <= pdev->nr_requestors)
chan              885 drivers/dma/pxa_dma.c 		maxburst = chan->cfg.dst_maxburst;
chan              886 drivers/dma/pxa_dma.c 		width = chan->cfg.dst_addr_width;
chan              887 drivers/dma/pxa_dma.c 		dev_addr = chan->cfg.dst_addr;
chan              890 drivers/dma/pxa_dma.c 		if (chan->drcmr <= pdev->nr_requestors)
chan              897 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              919 drivers/dma/pxa_dma.c 	if (chan->cfg.slave_id)
chan              920 drivers/dma/pxa_dma.c 		chan->drcmr = chan->cfg.slave_id;
chan              928 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan              938 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              942 drivers/dma/pxa_dma.c 	pxad_get_config(chan, DMA_MEM_TO_MEM, &dcmd, NULL, NULL);
chan              945 drivers/dma/pxa_dma.c 	sw_desc = pxad_alloc_desc(chan, nb_desc + 1);
chan              967 drivers/dma/pxa_dma.c 	return pxad_tx_prep(&chan->vc, &sw_desc->vd, flags);
chan              975 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan              986 drivers/dma/pxa_dma.c 	pxad_get_config(chan, dir, &dcmd, &dsadr, &dtadr);
chan              987 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan              992 drivers/dma/pxa_dma.c 	sw_desc = pxad_alloc_desc(chan, nb_desc + 1);
chan             1017 drivers/dma/pxa_dma.c 	return pxad_tx_prep(&chan->vc, &sw_desc->vd, flags);
chan             1025 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan             1035 drivers/dma/pxa_dma.c 		dev_err(&chan->vc.chan.dev->device,
chan             1044 drivers/dma/pxa_dma.c 	pxad_get_config(chan, dir, &dcmd, &dsadr, &dtadr);
chan             1046 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan             1052 drivers/dma/pxa_dma.c 	sw_desc = pxad_alloc_desc(chan, nb_desc + 1);
chan             1070 drivers/dma/pxa_dma.c 	return pxad_tx_prep(&chan->vc, &sw_desc->vd, flags);
chan             1076 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan             1081 drivers/dma/pxa_dma.c 	chan->cfg = *cfg;
chan             1087 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan             1088 drivers/dma/pxa_dma.c 	struct pxad_device *pdev = to_pxad_dev(chan->vc.chan.device);
chan             1094 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan             1095 drivers/dma/pxa_dma.c 		"%s(): vchan %p: terminate all\n", __func__, &chan->vc);
chan             1097 drivers/dma/pxa_dma.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan             1098 drivers/dma/pxa_dma.c 	vchan_get_all_descriptors(&chan->vc, &head);
chan             1101 drivers/dma/pxa_dma.c 		dev_dbg(&chan->vc.chan.dev->device,
chan             1106 drivers/dma/pxa_dma.c 	phy = chan->phy;
chan             1108 drivers/dma/pxa_dma.c 		phy_disable(chan->phy);
chan             1109 drivers/dma/pxa_dma.c 		pxad_free_phy(chan);
chan             1110 drivers/dma/pxa_dma.c 		chan->phy = NULL;
chan             1115 drivers/dma/pxa_dma.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan             1116 drivers/dma/pxa_dma.c 	vchan_dma_desc_free_list(&chan->vc, &head);
chan             1121 drivers/dma/pxa_dma.c static unsigned int pxad_residue(struct pxad_chan *chan,
chan             1136 drivers/dma/pxa_dma.c 	if (!chan->phy)
chan             1139 drivers/dma/pxa_dma.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan             1141 drivers/dma/pxa_dma.c 	vd = vchan_find_desc(&chan->vc, cookie);
chan             1147 drivers/dma/pxa_dma.c 		curr = phy_readl_relaxed(chan->phy, DSADR);
chan             1149 drivers/dma/pxa_dma.c 		curr = phy_readl_relaxed(chan->phy, DTADR);
chan             1190 drivers/dma/pxa_dma.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan             1191 drivers/dma/pxa_dma.c 	dev_dbg(&chan->vc.chan.dev->device,
chan             1201 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan             1204 drivers/dma/pxa_dma.c 	if (cookie == chan->bus_error)
chan             1209 drivers/dma/pxa_dma.c 		dma_set_residue(txstate, pxad_residue(chan, cookie));
chan             1216 drivers/dma/pxa_dma.c 	struct pxad_chan *chan = to_pxad_chan(dchan);
chan             1218 drivers/dma/pxa_dma.c 	wait_event(chan->wq_state, !is_chan_running(chan));
chan             1219 drivers/dma/pxa_dma.c 	vchan_synchronize(&chan->vc);
chan             1227 drivers/dma/pxa_dma.c 				 vc.chan.device_node) {
chan             1228 drivers/dma/pxa_dma.c 		list_del(&c->vc.chan.device_node);
chan             1296 drivers/dma/pxa_dma.c 	struct dma_chan *chan;
chan             1298 drivers/dma/pxa_dma.c 	chan = dma_get_any_slave_channel(&d->slave);
chan             1299 drivers/dma/pxa_dma.c 	if (!chan)
chan             1302 drivers/dma/pxa_dma.c 	to_pxad_chan(chan)->drcmr = dma_spec->args[0];
chan             1303 drivers/dma/pxa_dma.c 	to_pxad_chan(chan)->prio = dma_spec->args[1];
chan             1305 drivers/dma/pxa_dma.c 	return chan;
chan             1454 drivers/dma/pxa_dma.c static bool pxad_filter_fn(struct dma_chan *chan, void *param)
chan             1456 drivers/dma/pxa_dma.c 	struct pxad_chan *c = to_pxad_chan(chan);
chan             1459 drivers/dma/pxa_dma.c 	if (chan->device->dev->driver != &pxad_driver.driver)
chan              344 drivers/dma/qcom/bam_dma.c #define IS_BUSY(chan)	(CIRC_SPACE(bchan->tail, bchan->head,\
chan              377 drivers/dma/qcom/bam_dma.c 	return container_of(common, struct bam_chan, vc.chan);
chan              499 drivers/dma/qcom/bam_dma.c static int bam_alloc_chan(struct dma_chan *chan)
chan              501 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              534 drivers/dma/qcom/bam_dma.c static void bam_free_chan(struct dma_chan *chan)
chan              536 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              546 drivers/dma/qcom/bam_dma.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan              582 drivers/dma/qcom/bam_dma.c static int bam_slave_config(struct dma_chan *chan,
chan              585 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              606 drivers/dma/qcom/bam_dma.c static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
chan              611 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              688 drivers/dma/qcom/bam_dma.c static int bam_dma_terminate_all(struct dma_chan *chan)
chan              690 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              735 drivers/dma/qcom/bam_dma.c static int bam_pause(struct dma_chan *chan)
chan              737 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              761 drivers/dma/qcom/bam_dma.c static int bam_resume(struct dma_chan *chan)
chan              763 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              907 drivers/dma/qcom/bam_dma.c static enum dma_status bam_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              910 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan              918 drivers/dma/qcom/bam_dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             1103 drivers/dma/qcom/bam_dma.c static void bam_issue_pending(struct dma_chan *chan)
chan             1105 drivers/dma/qcom/bam_dma.c 	struct bam_chan *bchan = to_bam_chan(chan);
chan             1144 drivers/dma/qcom/bam_dma.c 	return dma_get_slave_channel(&(bdev->channels[request].vc.chan));
chan             1402 drivers/dma/qcom/bam_dma.c 		bam_dma_terminate_all(&bdev->channels[i].vc.chan);
chan               90 drivers/dma/qcom/hidma.c 	return container_of(dmach, struct hidma_chan, chan);
chan              116 drivers/dma/qcom/hidma.c 	struct dma_device *ddev = mchan->chan.device;
chan              174 drivers/dma/qcom/hidma.c 	struct hidma_chan *mchan = to_hidma_chan(mdesc->desc.chan);
chan              175 drivers/dma/qcom/hidma.c 	struct dma_device *ddev = mchan->chan.device;
chan              212 drivers/dma/qcom/hidma.c 	mchan->chan.device = ddev;
chan              213 drivers/dma/qcom/hidma.c 	dma_cookie_init(&mchan->chan);
chan              222 drivers/dma/qcom/hidma.c 	list_add_tail(&mchan->chan.device_node, &ddev->channels);
chan              319 drivers/dma/qcom/hidma.c 	struct hidma_chan *mchan = to_hidma_chan(txd->chan);
chan              465 drivers/dma/qcom/hidma.c static int hidma_terminate_channel(struct dma_chan *chan)
chan              467 drivers/dma/qcom/hidma.c 	struct hidma_chan *mchan = to_hidma_chan(chan);
chan              468 drivers/dma/qcom/hidma.c 	struct hidma_dev *dmadev = to_hidma_dev(mchan->chan.device);
chan              512 drivers/dma/qcom/hidma.c static int hidma_terminate_all(struct dma_chan *chan)
chan              514 drivers/dma/qcom/hidma.c 	struct hidma_chan *mchan = to_hidma_chan(chan);
chan              515 drivers/dma/qcom/hidma.c 	struct hidma_dev *dmadev = to_hidma_dev(mchan->chan.device);
chan              518 drivers/dma/qcom/hidma.c 	rc = hidma_terminate_channel(chan);
chan              557 drivers/dma/qcom/hidma.c static int hidma_pause(struct dma_chan *chan)
chan              562 drivers/dma/qcom/hidma.c 	mchan = to_hidma_chan(chan);
chan              563 drivers/dma/qcom/hidma.c 	dmadev = to_hidma_dev(mchan->chan.device);
chan              575 drivers/dma/qcom/hidma.c static int hidma_resume(struct dma_chan *chan)
chan              581 drivers/dma/qcom/hidma.c 	mchan = to_hidma_chan(chan);
chan              582 drivers/dma/qcom/hidma.c 	dmadev = to_hidma_dev(mchan->chan.device);
chan               99 drivers/dma/qcom/hidma.h 	struct dma_chan			chan;
chan              151 drivers/dma/qcom/hidma_dbg.c 		struct hidma_chan *chan;
chan              153 drivers/dma/qcom/hidma_dbg.c 		chan = list_entry(position, struct hidma_chan,
chan              154 drivers/dma/qcom/hidma_dbg.c 				  chan.device_node);
chan              155 drivers/dma/qcom/hidma_dbg.c 		sprintf(chan->dbg_name, "chan%d", chidx);
chan              156 drivers/dma/qcom/hidma_dbg.c 		dir = debugfs_create_dir(chan->dbg_name,
chan              158 drivers/dma/qcom/hidma_dbg.c 		debugfs_create_file("stats", S_IRUGO, dir, chan,
chan              365 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *to_s3c24xx_dma_chan(struct dma_chan *chan)
chan              367 drivers/dma/s3c24xx-dma.c 	return container_of(chan, struct s3c24xx_dma_chan, vc.chan);
chan              379 drivers/dma/s3c24xx-dma.c static int s3c24xx_dma_set_runtime_config(struct dma_chan *chan,
chan              382 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              590 drivers/dma/s3c24xx-dma.c 	list_for_each_entry(p, &s3cdma->memcpy.channels, vc.chan.device_node)
chan              598 drivers/dma/s3c24xx-dma.c 				    vc.chan.device_node)
chan              638 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(vd->tx.chan);
chan              708 drivers/dma/s3c24xx-dma.c static int s3c24xx_dma_terminate_all(struct dma_chan *chan)
chan              710 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              744 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_synchronize(struct dma_chan *chan)
chan              746 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              751 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_free_chan_resources(struct dma_chan *chan)
chan              754 drivers/dma/s3c24xx-dma.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan              757 drivers/dma/s3c24xx-dma.c static enum dma_status s3c24xx_dma_tx_status(struct dma_chan *chan,
chan              760 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              769 drivers/dma/s3c24xx-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              816 drivers/dma/s3c24xx-dma.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              819 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              878 drivers/dma/s3c24xx-dma.c 	struct dma_chan *chan, dma_addr_t addr, size_t size, size_t period,
chan              881 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan              975 drivers/dma/s3c24xx-dma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              979 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan             1067 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_issue_pending(struct dma_chan *chan)
chan             1069 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan);
chan             1091 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *chan;
chan             1102 drivers/dma/s3c24xx-dma.c 		chan = devm_kzalloc(dmadev->dev, sizeof(*chan), GFP_KERNEL);
chan             1103 drivers/dma/s3c24xx-dma.c 		if (!chan)
chan             1106 drivers/dma/s3c24xx-dma.c 		chan->id = i;
chan             1107 drivers/dma/s3c24xx-dma.c 		chan->host = s3cdma;
chan             1108 drivers/dma/s3c24xx-dma.c 		chan->state = S3C24XX_DMA_CHAN_IDLE;
chan             1111 drivers/dma/s3c24xx-dma.c 			chan->slave = true;
chan             1112 drivers/dma/s3c24xx-dma.c 			chan->name = kasprintf(GFP_KERNEL, "slave%d", i);
chan             1113 drivers/dma/s3c24xx-dma.c 			if (!chan->name)
chan             1116 drivers/dma/s3c24xx-dma.c 			chan->name = kasprintf(GFP_KERNEL, "memcpy%d", i);
chan             1117 drivers/dma/s3c24xx-dma.c 			if (!chan->name)
chan             1122 drivers/dma/s3c24xx-dma.c 			 chan->name);
chan             1124 drivers/dma/s3c24xx-dma.c 		chan->vc.desc_free = s3c24xx_dma_desc_free;
chan             1125 drivers/dma/s3c24xx-dma.c 		vchan_init(&chan->vc, dmadev);
chan             1134 drivers/dma/s3c24xx-dma.c 	struct s3c24xx_dma_chan *chan = NULL;
chan             1137 drivers/dma/s3c24xx-dma.c 	list_for_each_entry_safe(chan,
chan             1138 drivers/dma/s3c24xx-dma.c 				 next, &dmadev->channels, vc.chan.device_node) {
chan             1139 drivers/dma/s3c24xx-dma.c 		list_del(&chan->vc.chan.device_node);
chan             1140 drivers/dma/s3c24xx-dma.c 		tasklet_kill(&chan->vc.task);
chan             1413 drivers/dma/s3c24xx-dma.c bool s3c24xx_dma_filter(struct dma_chan *chan, void *param)
chan             1417 drivers/dma/s3c24xx-dma.c 	if (chan->device->dev->driver != &s3c24xx_dma_driver.driver)
chan             1420 drivers/dma/s3c24xx-dma.c 	s3cchan = to_s3c24xx_dma_chan(chan);
chan              126 drivers/dma/sa11x0-dma.c static struct sa11x0_dma_chan *to_sa11x0_dma_chan(struct dma_chan *chan)
chan              128 drivers/dma/sa11x0-dma.c 	return container_of(chan, struct sa11x0_dma_chan, vc.chan);
chan              335 drivers/dma/sa11x0-dma.c 	list_for_each_entry(c, &d->slave.channels, vc.chan.device_node) {
chan              388 drivers/dma/sa11x0-dma.c static void sa11x0_dma_free_chan_resources(struct dma_chan *chan)
chan              390 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              391 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              417 drivers/dma/sa11x0-dma.c static enum dma_status sa11x0_dma_tx_status(struct dma_chan *chan,
chan              420 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              421 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              427 drivers/dma/sa11x0-dma.c 	ret = dma_cookie_status(&c->vc.chan, cookie, state);
chan              500 drivers/dma/sa11x0-dma.c static void sa11x0_dma_issue_pending(struct dma_chan *chan)
chan              502 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              503 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              523 drivers/dma/sa11x0-dma.c 	struct dma_chan *chan, struct scatterlist *sg, unsigned int sglen,
chan              526 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              534 drivers/dma/sa11x0-dma.c 		dev_err(chan->device->dev, "vchan %p: bad DMA direction: DDAR:%08x dir:%u\n",
chan              550 drivers/dma/sa11x0-dma.c 			dev_dbg(chan->device->dev, "vchan %p: bad buffer alignment: %pad\n",
chan              558 drivers/dma/sa11x0-dma.c 		dev_dbg(chan->device->dev, "vchan %p: kzalloc failed\n", &c->vc);
chan              598 drivers/dma/sa11x0-dma.c 	dev_dbg(chan->device->dev, "vchan %p: txd %p: size %zu nr %u\n",
chan              605 drivers/dma/sa11x0-dma.c 	struct dma_chan *chan, dma_addr_t addr, size_t size, size_t period,
chan              608 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              614 drivers/dma/sa11x0-dma.c 		dev_err(chan->device->dev, "vchan %p: bad DMA direction: DDAR:%08x dir:%u\n",
chan              628 drivers/dma/sa11x0-dma.c 		dev_dbg(chan->device->dev, "vchan %p: kzalloc failed\n", &c->vc);
chan              663 drivers/dma/sa11x0-dma.c static int sa11x0_dma_device_config(struct dma_chan *chan,
chan              666 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              692 drivers/dma/sa11x0-dma.c 	dev_dbg(c->vc.chan.device->dev, "vchan %p: dma_slave_config addr %pad width %u burst %u\n",
chan              700 drivers/dma/sa11x0-dma.c static int sa11x0_dma_device_pause(struct dma_chan *chan)
chan              702 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              703 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              726 drivers/dma/sa11x0-dma.c static int sa11x0_dma_device_resume(struct dma_chan *chan)
chan              728 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              729 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              752 drivers/dma/sa11x0-dma.c static int sa11x0_dma_device_terminate_all(struct dma_chan *chan)
chan              754 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              755 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device);
chan              827 drivers/dma/sa11x0-dma.c static bool sa11x0_dma_filter_fn(struct dma_chan *chan, void *param)
chan              829 drivers/dma/sa11x0-dma.c 	struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan);
chan              894 drivers/dma/sa11x0-dma.c 	list_for_each_entry_safe(c, cn, &dmadev->channels, vc.chan.device_node) {
chan              895 drivers/dma/sa11x0-dma.c 		list_del(&c->vc.chan.device_node);
chan              160 drivers/dma/sh/rcar-dmac.c 	struct dma_chan chan;
chan              186 drivers/dma/sh/rcar-dmac.c #define to_rcar_dmac_chan(c)	container_of(c, struct rcar_dmac_chan, chan)
chan              312 drivers/dma/sh/rcar-dmac.c static u32 rcar_dmac_chan_read(struct rcar_dmac_chan *chan, u32 reg)
chan              315 drivers/dma/sh/rcar-dmac.c 		return readw(chan->iomem + reg);
chan              317 drivers/dma/sh/rcar-dmac.c 		return readl(chan->iomem + reg);
chan              320 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chan_write(struct rcar_dmac_chan *chan, u32 reg, u32 data)
chan              323 drivers/dma/sh/rcar-dmac.c 		writew(data, chan->iomem + reg);
chan              325 drivers/dma/sh/rcar-dmac.c 		writel(data, chan->iomem + reg);
chan              332 drivers/dma/sh/rcar-dmac.c static bool rcar_dmac_chan_is_busy(struct rcar_dmac_chan *chan)
chan              334 drivers/dma/sh/rcar-dmac.c 	u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
chan              339 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chan_start_xfer(struct rcar_dmac_chan *chan)
chan              341 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_desc *desc = chan->desc.running;
chan              344 drivers/dma/sh/rcar-dmac.c 	WARN_ON_ONCE(rcar_dmac_chan_is_busy(chan));
chan              346 drivers/dma/sh/rcar-dmac.c 	if (chan->mid_rid >= 0)
chan              347 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMARS, chan->mid_rid);
chan              354 drivers/dma/sh/rcar-dmac.c 		dev_dbg(chan->chan.device->dev,
chan              356 drivers/dma/sh/rcar-dmac.c 			chan->index, desc, desc->nchunks, &desc->hwdescs.dma);
chan              359 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMAFIXSAR,
chan              361 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMAFIXDAR,
chan              363 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMAFIXDPBASE,
chan              366 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMADPBASE,
chan              369 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMACHCRB,
chan              380 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMADAR,
chan              387 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMADPCR, RCAR_DMADPCR_DIPT(1));
chan              413 drivers/dma/sh/rcar-dmac.c 		dev_dbg(chan->chan.device->dev,
chan              415 drivers/dma/sh/rcar-dmac.c 			chan->index, chunk, chunk->size, &chunk->src_addr,
chan              419 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMAFIXSAR,
chan              421 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMAFIXDAR,
chan              424 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMASAR,
chan              426 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMADAR,
chan              428 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_write(chan, RCAR_DMATCR,
chan              434 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_write(chan, RCAR_DMACHCR,
chan              462 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *chan = to_rcar_dmac_chan(tx->chan);
chan              467 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              471 drivers/dma/sh/rcar-dmac.c 	dev_dbg(chan->chan.device->dev, "chan%u: submit #%d@%p\n",
chan              472 drivers/dma/sh/rcar-dmac.c 		chan->index, tx->cookie, desc);
chan              474 drivers/dma/sh/rcar-dmac.c 	list_add_tail(&desc->node, &chan->desc.pending);
chan              478 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              492 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_desc_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
chan              506 drivers/dma/sh/rcar-dmac.c 		dma_async_tx_descriptor_init(&desc->async_tx, &chan->chan);
chan              513 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              514 drivers/dma/sh/rcar-dmac.c 	list_splice_tail(&list, &chan->desc.free);
chan              515 drivers/dma/sh/rcar-dmac.c 	list_add_tail(&page->node, &chan->desc.pages);
chan              516 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              533 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_desc_put(struct rcar_dmac_chan *chan,
chan              538 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              539 drivers/dma/sh/rcar-dmac.c 	list_splice_tail_init(&desc->chunks, &chan->desc.chunks_free);
chan              540 drivers/dma/sh/rcar-dmac.c 	list_add(&desc->node, &chan->desc.free);
chan              541 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              544 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_desc_recycle_acked(struct rcar_dmac_chan *chan)
chan              556 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              557 drivers/dma/sh/rcar-dmac.c 	list_splice_init(&chan->desc.wait, &list);
chan              558 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              563 drivers/dma/sh/rcar-dmac.c 			rcar_dmac_desc_put(chan, desc);
chan              571 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              572 drivers/dma/sh/rcar-dmac.c 	list_splice(&list, &chan->desc.wait);
chan              573 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              585 drivers/dma/sh/rcar-dmac.c static struct rcar_dmac_desc *rcar_dmac_desc_get(struct rcar_dmac_chan *chan)
chan              592 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_desc_recycle_acked(chan);
chan              594 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              596 drivers/dma/sh/rcar-dmac.c 	while (list_empty(&chan->desc.free)) {
chan              603 drivers/dma/sh/rcar-dmac.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              604 drivers/dma/sh/rcar-dmac.c 		ret = rcar_dmac_desc_alloc(chan, GFP_NOWAIT);
chan              607 drivers/dma/sh/rcar-dmac.c 		spin_lock_irqsave(&chan->lock, flags);
chan              610 drivers/dma/sh/rcar-dmac.c 	desc = list_first_entry(&chan->desc.free, struct rcar_dmac_desc, node);
chan              613 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              623 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_xfer_chunk_alloc(struct rcar_dmac_chan *chan, gfp_t gfp)
chan              640 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              641 drivers/dma/sh/rcar-dmac.c 	list_splice_tail(&list, &chan->desc.chunks_free);
chan              642 drivers/dma/sh/rcar-dmac.c 	list_add_tail(&page->node, &chan->desc.pages);
chan              643 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              658 drivers/dma/sh/rcar-dmac.c rcar_dmac_xfer_chunk_get(struct rcar_dmac_chan *chan)
chan              664 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              666 drivers/dma/sh/rcar-dmac.c 	while (list_empty(&chan->desc.chunks_free)) {
chan              673 drivers/dma/sh/rcar-dmac.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              674 drivers/dma/sh/rcar-dmac.c 		ret = rcar_dmac_xfer_chunk_alloc(chan, GFP_NOWAIT);
chan              677 drivers/dma/sh/rcar-dmac.c 		spin_lock_irqsave(&chan->lock, flags);
chan              680 drivers/dma/sh/rcar-dmac.c 	chunk = list_first_entry(&chan->desc.chunks_free,
chan              684 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              689 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_realloc_hwdesc(struct rcar_dmac_chan *chan,
chan              704 drivers/dma/sh/rcar-dmac.c 		dma_free_coherent(chan->chan.device->dev, desc->hwdescs.size,
chan              713 drivers/dma/sh/rcar-dmac.c 	desc->hwdescs.mem = dma_alloc_coherent(chan->chan.device->dev, size,
chan              721 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_fill_hwdesc(struct rcar_dmac_chan *chan,
chan              727 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_realloc_hwdesc(chan, desc, desc->nchunks * sizeof(*hwdesc));
chan              746 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chcr_de_barrier(struct rcar_dmac_chan *chan)
chan              756 drivers/dma/sh/rcar-dmac.c 		chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
chan              762 drivers/dma/sh/rcar-dmac.c 	dev_err(chan->chan.device->dev, "CHCR DE check error\n");
chan              765 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_clear_chcr_de(struct rcar_dmac_chan *chan)
chan              767 drivers/dma/sh/rcar-dmac.c 	u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
chan              770 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_write(chan, RCAR_DMACHCR, (chcr & ~RCAR_DMACHCR_DE));
chan              773 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chcr_de_barrier(chan);
chan              776 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chan_halt(struct rcar_dmac_chan *chan)
chan              778 drivers/dma/sh/rcar-dmac.c 	u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
chan              783 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_write(chan, RCAR_DMACHCR, chcr);
chan              784 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chcr_de_barrier(chan);
chan              787 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chan_reinit(struct rcar_dmac_chan *chan)
chan              793 drivers/dma/sh/rcar-dmac.c 	spin_lock_irqsave(&chan->lock, flags);
chan              796 drivers/dma/sh/rcar-dmac.c 	list_splice_init(&chan->desc.pending, &descs);
chan              797 drivers/dma/sh/rcar-dmac.c 	list_splice_init(&chan->desc.active, &descs);
chan              798 drivers/dma/sh/rcar-dmac.c 	list_splice_init(&chan->desc.done, &descs);
chan              799 drivers/dma/sh/rcar-dmac.c 	list_splice_init(&chan->desc.wait, &descs);
chan              801 drivers/dma/sh/rcar-dmac.c 	chan->desc.running = NULL;
chan              803 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              807 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_desc_put(chan, desc);
chan              817 drivers/dma/sh/rcar-dmac.c 		struct rcar_dmac_chan *chan = &dmac->channels[i];
chan              823 drivers/dma/sh/rcar-dmac.c 		spin_lock_irq(&chan->lock);
chan              824 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_halt(chan);
chan              825 drivers/dma/sh/rcar-dmac.c 		spin_unlock_irq(&chan->lock);
chan              829 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_chan_pause(struct dma_chan *chan)
chan              832 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan              845 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_chan_configure_desc(struct rcar_dmac_chan *chan,
chan              862 drivers/dma/sh/rcar-dmac.c 		xfer_size = chan->src.xfer_size;
chan              868 drivers/dma/sh/rcar-dmac.c 		xfer_size = chan->dst.xfer_size;
chan              894 drivers/dma/sh/rcar-dmac.c rcar_dmac_chan_prep_sg(struct rcar_dmac_chan *chan, struct scatterlist *sgl,
chan              912 drivers/dma/sh/rcar-dmac.c 	desc = rcar_dmac_desc_get(chan);
chan              922 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_configure_desc(chan, desc);
chan              964 drivers/dma/sh/rcar-dmac.c 			chunk = rcar_dmac_xfer_chunk_get(chan);
chan              966 drivers/dma/sh/rcar-dmac.c 				rcar_dmac_desc_put(chan, desc);
chan              980 drivers/dma/sh/rcar-dmac.c 			dev_dbg(chan->chan.device->dev,
chan              982 drivers/dma/sh/rcar-dmac.c 				chan->index, chunk, desc, i, sg, size, len,
chan             1009 drivers/dma/sh/rcar-dmac.c 		if (rcar_dmac_fill_hwdesc(chan, desc) < 0)
chan             1020 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_alloc_chan_resources(struct dma_chan *chan)
chan             1022 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1037 drivers/dma/sh/rcar-dmac.c 	return pm_runtime_get_sync(chan->device->dev);
chan             1040 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_free_chan_resources(struct dma_chan *chan)
chan             1042 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1043 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac *dmac = to_rcar_dmac(chan->device);
chan             1084 drivers/dma/sh/rcar-dmac.c 		dma_unmap_resource(chan->device->dev, map->addr,
chan             1089 drivers/dma/sh/rcar-dmac.c 	pm_runtime_put(chan->device->dev);
chan             1093 drivers/dma/sh/rcar-dmac.c rcar_dmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
chan             1096 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1112 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_map_slave_addr(struct dma_chan *chan,
chan             1115 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1139 drivers/dma/sh/rcar-dmac.c 		dma_unmap_resource(chan->device->dev, map->addr,
chan             1144 drivers/dma/sh/rcar-dmac.c 	map->addr = dma_map_resource(chan->device->dev, dev_addr, dev_size,
chan             1147 drivers/dma/sh/rcar-dmac.c 	if (dma_mapping_error(chan->device->dev, map->addr)) {
chan             1148 drivers/dma/sh/rcar-dmac.c 		dev_err(chan->device->dev,
chan             1154 drivers/dma/sh/rcar-dmac.c 	dev_dbg(chan->device->dev, "chan%u: map %zx@%pap to %pad dir: %s\n",
chan             1166 drivers/dma/sh/rcar-dmac.c rcar_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             1170 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1174 drivers/dma/sh/rcar-dmac.c 		dev_warn(chan->device->dev,
chan             1180 drivers/dma/sh/rcar-dmac.c 	if (rcar_dmac_map_slave_addr(chan, dir))
chan             1190 drivers/dma/sh/rcar-dmac.c rcar_dmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
chan             1194 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1202 drivers/dma/sh/rcar-dmac.c 		dev_warn(chan->device->dev,
chan             1208 drivers/dma/sh/rcar-dmac.c 	if (rcar_dmac_map_slave_addr(chan, dir))
chan             1213 drivers/dma/sh/rcar-dmac.c 		dev_err(chan->device->dev,
chan             1245 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_device_config(struct dma_chan *chan,
chan             1248 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1262 drivers/dma/sh/rcar-dmac.c static int rcar_dmac_chan_terminate_all(struct dma_chan *chan)
chan             1264 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1281 drivers/dma/sh/rcar-dmac.c static unsigned int rcar_dmac_chan_get_residue(struct rcar_dmac_chan *chan,
chan             1284 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_desc *desc = chan->desc.running;
chan             1303 drivers/dma/sh/rcar-dmac.c 	status = dma_cookie_status(&chan->chan, cookie, NULL);
chan             1318 drivers/dma/sh/rcar-dmac.c 		list_for_each_entry(desc, &chan->desc.done, node) {
chan             1322 drivers/dma/sh/rcar-dmac.c 		list_for_each_entry(desc, &chan->desc.pending, node) {
chan             1326 drivers/dma/sh/rcar-dmac.c 		list_for_each_entry(desc, &chan->desc.active, node) {
chan             1348 drivers/dma/sh/rcar-dmac.c 		chcrb = rcar_dmac_chan_read(chan, RCAR_DMACHCRB) &
chan             1350 drivers/dma/sh/rcar-dmac.c 		tcrb = rcar_dmac_chan_read(chan, RCAR_DMATCRB);
chan             1352 drivers/dma/sh/rcar-dmac.c 		if (chcrb == (rcar_dmac_chan_read(chan, RCAR_DMACHCRB) &
chan             1388 drivers/dma/sh/rcar-dmac.c static enum dma_status rcar_dmac_tx_status(struct dma_chan *chan,
chan             1392 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1398 drivers/dma/sh/rcar-dmac.c 	status = dma_cookie_status(chan, cookie, txstate);
chan             1416 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_issue_pending(struct dma_chan *chan)
chan             1418 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1447 drivers/dma/sh/rcar-dmac.c static void rcar_dmac_device_synchronize(struct dma_chan *chan)
chan             1449 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *rchan = to_rcar_dmac_chan(chan);
chan             1458 drivers/dma/sh/rcar-dmac.c static irqreturn_t rcar_dmac_isr_desc_stage_end(struct rcar_dmac_chan *chan)
chan             1460 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_desc *desc = chan->desc.running;
chan             1473 drivers/dma/sh/rcar-dmac.c 	stage = (rcar_dmac_chan_read(chan, RCAR_DMACHCRB) &
chan             1475 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_write(chan, RCAR_DMADPCR, RCAR_DMADPCR_DIPT(stage));
chan             1480 drivers/dma/sh/rcar-dmac.c static irqreturn_t rcar_dmac_isr_transfer_end(struct rcar_dmac_chan *chan)
chan             1482 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_desc *desc = chan->desc.running;
chan             1526 drivers/dma/sh/rcar-dmac.c 	list_move_tail(&desc->node, &chan->desc.done);
chan             1529 drivers/dma/sh/rcar-dmac.c 	if (!list_empty(&chan->desc.active))
chan             1530 drivers/dma/sh/rcar-dmac.c 		chan->desc.running = list_first_entry(&chan->desc.active,
chan             1534 drivers/dma/sh/rcar-dmac.c 		chan->desc.running = NULL;
chan             1537 drivers/dma/sh/rcar-dmac.c 	if (chan->desc.running)
chan             1538 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_start_xfer(chan);
chan             1546 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *chan = dev;
chan             1551 drivers/dma/sh/rcar-dmac.c 	spin_lock(&chan->lock);
chan             1553 drivers/dma/sh/rcar-dmac.c 	chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
chan             1555 drivers/dma/sh/rcar-dmac.c 		struct rcar_dmac *dmac = to_rcar_dmac(chan->chan.device);
chan             1562 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_write(dmac, RCAR_DMACHCLR, 1 << chan->index);
chan             1563 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chcr_de_barrier(chan);
chan             1570 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_chan_write(chan, RCAR_DMACHCR, chcr & ~mask);
chan             1572 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chcr_de_barrier(chan);
chan             1575 drivers/dma/sh/rcar-dmac.c 		ret |= rcar_dmac_isr_desc_stage_end(chan);
chan             1578 drivers/dma/sh/rcar-dmac.c 		ret |= rcar_dmac_isr_transfer_end(chan);
chan             1581 drivers/dma/sh/rcar-dmac.c 	spin_unlock(&chan->lock);
chan             1584 drivers/dma/sh/rcar-dmac.c 		dev_err(chan->chan.device->dev, "Channel Address Error\n");
chan             1586 drivers/dma/sh/rcar-dmac.c 		rcar_dmac_chan_reinit(chan);
chan             1595 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac_chan *chan = dev;
chan             1599 drivers/dma/sh/rcar-dmac.c 	spin_lock_irq(&chan->lock);
chan             1602 drivers/dma/sh/rcar-dmac.c 	if (chan->desc.running && chan->desc.running->cyclic) {
chan             1603 drivers/dma/sh/rcar-dmac.c 		desc = chan->desc.running;
chan             1607 drivers/dma/sh/rcar-dmac.c 			spin_unlock_irq(&chan->lock);
chan             1609 drivers/dma/sh/rcar-dmac.c 			spin_lock_irq(&chan->lock);
chan             1617 drivers/dma/sh/rcar-dmac.c 	while (!list_empty(&chan->desc.done)) {
chan             1618 drivers/dma/sh/rcar-dmac.c 		desc = list_first_entry(&chan->desc.done, struct rcar_dmac_desc,
chan             1625 drivers/dma/sh/rcar-dmac.c 			spin_unlock_irq(&chan->lock);
chan             1632 drivers/dma/sh/rcar-dmac.c 			spin_lock_irq(&chan->lock);
chan             1635 drivers/dma/sh/rcar-dmac.c 		list_add_tail(&desc->node, &chan->desc.wait);
chan             1638 drivers/dma/sh/rcar-dmac.c 	spin_unlock_irq(&chan->lock);
chan             1641 drivers/dma/sh/rcar-dmac.c 	rcar_dmac_desc_recycle_acked(chan);
chan             1650 drivers/dma/sh/rcar-dmac.c static bool rcar_dmac_chan_filter(struct dma_chan *chan, void *arg)
chan             1652 drivers/dma/sh/rcar-dmac.c 	struct rcar_dmac *dmac = to_rcar_dmac(chan->device);
chan             1662 drivers/dma/sh/rcar-dmac.c 	if (chan->device->device_config != rcar_dmac_device_config)
chan             1672 drivers/dma/sh/rcar-dmac.c 	struct dma_chan *chan;
chan             1682 drivers/dma/sh/rcar-dmac.c 	chan = __dma_request_channel(&mask, rcar_dmac_chan_filter, dma_spec,
chan             1684 drivers/dma/sh/rcar-dmac.c 	if (!chan)
chan             1687 drivers/dma/sh/rcar-dmac.c 	rchan = to_rcar_dmac_chan(chan);
chan             1690 drivers/dma/sh/rcar-dmac.c 	return chan;
chan             1732 drivers/dma/sh/rcar-dmac.c 	struct dma_chan *chan = &rchan->chan;
chan             1764 drivers/dma/sh/rcar-dmac.c 	chan->device = &dmac->engine;
chan             1765 drivers/dma/sh/rcar-dmac.c 	dma_cookie_init(chan);
chan             1767 drivers/dma/sh/rcar-dmac.c 	list_add_tail(&chan->device_node, &dmac->engine.channels);
chan               74 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(tx->chan);
chan              203 drivers/dma/sh/shdma-base.c static int shdma_alloc_chan_resources(struct dma_chan *chan)
chan              205 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              209 drivers/dma/sh/shdma-base.c 	struct shdma_slave *slave = chan->private;
chan              251 drivers/dma/sh/shdma-base.c 	chan->private = NULL;
chan              274 drivers/dma/sh/shdma-base.c bool shdma_chan_filter(struct dma_chan *chan, void *arg)
chan              282 drivers/dma/sh/shdma-base.c 	if (chan->device->device_alloc_chan_resources !=
chan              286 drivers/dma/sh/shdma-base.c 	schan = to_shdma_chan(chan);
chan              287 drivers/dma/sh/shdma-base.c 	sdev = to_shdma_dev(chan->device);
chan              450 drivers/dma/sh/shdma-base.c static void shdma_free_chan_resources(struct dma_chan *chan)
chan              452 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              453 drivers/dma/sh/shdma-base.c 	struct shdma_dev *sdev = to_shdma_dev(chan->device);
chan              471 drivers/dma/sh/shdma-base.c 		chan->private = NULL;
chan              640 drivers/dma/sh/shdma-base.c 	struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src,
chan              643 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              646 drivers/dma/sh/shdma-base.c 	if (!chan || !len)
chan              662 drivers/dma/sh/shdma-base.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len,
chan              665 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              671 drivers/dma/sh/shdma-base.c 	if (!chan)
chan              692 drivers/dma/sh/shdma-base.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              696 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              706 drivers/dma/sh/shdma-base.c 	if (!chan)
chan              753 drivers/dma/sh/shdma-base.c static int shdma_terminate_all(struct dma_chan *chan)
chan              755 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              756 drivers/dma/sh/shdma-base.c 	struct shdma_dev *sdev = to_shdma_dev(chan->device);
chan              777 drivers/dma/sh/shdma-base.c static int shdma_config(struct dma_chan *chan,
chan              780 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              806 drivers/dma/sh/shdma-base.c static void shdma_issue_pending(struct dma_chan *chan)
chan              808 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              818 drivers/dma/sh/shdma-base.c static enum dma_status shdma_tx_status(struct dma_chan *chan,
chan              822 drivers/dma/sh/shdma-base.c 	struct shdma_chan *schan = to_shdma_chan(chan);
chan              830 drivers/dma/sh/shdma-base.c 	status = dma_cookie_status(chan, cookie, txstate);
chan               24 drivers/dma/sh/shdma-of.c 	struct dma_chan *chan;
chan               33 drivers/dma/sh/shdma-of.c 	chan = dma_request_channel(mask, shdma_chan_filter,
chan               35 drivers/dma/sh/shdma-of.c 	if (chan)
chan               36 drivers/dma/sh/shdma-of.c 		to_shdma_chan(chan)->hw_req = id;
chan               38 drivers/dma/sh/shdma-of.c 	return chan;
chan               35 drivers/dma/sh/shdma.h 	struct sh_dmae_chan *chan[SH_DMAE_MAX_CHANNELS];
chan               55 drivers/dma/sh/shdma.h #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, shdma_chan)
chan               58 drivers/dma/sh/shdma.h #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\
chan              152 drivers/dma/sh/shdmac.c 			struct sh_dmae_chan *sh_chan = shdev->chan[i];
chan              555 drivers/dma/sh/shdmac.c 	shdev->chan[id] = sh_chan;
chan              612 drivers/dma/sh/shdmac.c 		struct sh_dmae_chan *sh_chan = shdev->chan[i];
chan              681 drivers/dma/sh/shdmac.c 	struct resource *chan, *dmars, *errirq_res, *chanirq_res;
chan              692 drivers/dma/sh/shdmac.c 	chan = platform_get_resource(pdev, IORESOURCE_MEM, 0);
chan              712 drivers/dma/sh/shdmac.c 	if (!chan || !errirq_res)
chan              722 drivers/dma/sh/shdmac.c 	shdev->chan_reg = devm_ioremap_resource(&pdev->dev, chan);
chan               87 drivers/dma/sh/usb-dmac.c #define to_usb_dmac_chan(c) container_of(c, struct usb_dmac_chan, vc.chan)
chan              161 drivers/dma/sh/usb-dmac.c static u32 usb_dmac_chan_read(struct usb_dmac_chan *chan, u32 reg)
chan              163 drivers/dma/sh/usb-dmac.c 	return readl(chan->iomem + reg);
chan              166 drivers/dma/sh/usb-dmac.c static void usb_dmac_chan_write(struct usb_dmac_chan *chan, u32 reg, u32 data)
chan              168 drivers/dma/sh/usb-dmac.c 	writel(data, chan->iomem + reg);
chan              175 drivers/dma/sh/usb-dmac.c static bool usb_dmac_chan_is_busy(struct usb_dmac_chan *chan)
chan              177 drivers/dma/sh/usb-dmac.c 	u32 chcr = usb_dmac_chan_read(chan, USB_DMACHCR);
chan              193 drivers/dma/sh/usb-dmac.c static void usb_dmac_chan_start_sg(struct usb_dmac_chan *chan,
chan              196 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_desc *desc = chan->desc;
chan              200 drivers/dma/sh/usb-dmac.c 	WARN_ON_ONCE(usb_dmac_chan_is_busy(chan));
chan              207 drivers/dma/sh/usb-dmac.c 	dev_dbg(chan->vc.chan.device->dev,
chan              209 drivers/dma/sh/usb-dmac.c 		chan->index, sg, sg->size, &src_addr, &dst_addr);
chan              211 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMASAR, src_addr & 0xffffffff);
chan              212 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMADAR, dst_addr & 0xffffffff);
chan              213 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMATCR,
chan              215 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMATEND, usb_dmac_calc_tend(sg->size));
chan              217 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMACHCR, USB_DMAC_CHCR_TS |
chan              222 drivers/dma/sh/usb-dmac.c static void usb_dmac_chan_start_desc(struct usb_dmac_chan *chan)
chan              226 drivers/dma/sh/usb-dmac.c 	vd = vchan_next_desc(&chan->vc);
chan              228 drivers/dma/sh/usb-dmac.c 		chan->desc = NULL;
chan              239 drivers/dma/sh/usb-dmac.c 	chan->desc = to_usb_dmac_desc(vd);
chan              240 drivers/dma/sh/usb-dmac.c 	chan->desc->sg_index = 0;
chan              241 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_start_sg(chan, 0);
chan              263 drivers/dma/sh/usb-dmac.c static int usb_dmac_desc_alloc(struct usb_dmac_chan *chan, unsigned int sg_len,
chan              276 drivers/dma/sh/usb-dmac.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              277 drivers/dma/sh/usb-dmac.c 	list_add_tail(&desc->node, &chan->desc_freed);
chan              278 drivers/dma/sh/usb-dmac.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              283 drivers/dma/sh/usb-dmac.c static void usb_dmac_desc_free(struct usb_dmac_chan *chan)
chan              288 drivers/dma/sh/usb-dmac.c 	list_splice_init(&chan->desc_freed, &list);
chan              289 drivers/dma/sh/usb-dmac.c 	list_splice_init(&chan->desc_got, &list);
chan              295 drivers/dma/sh/usb-dmac.c 	chan->descs_allocated = 0;
chan              298 drivers/dma/sh/usb-dmac.c static struct usb_dmac_desc *usb_dmac_desc_get(struct usb_dmac_chan *chan,
chan              305 drivers/dma/sh/usb-dmac.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              306 drivers/dma/sh/usb-dmac.c 	list_for_each_entry(desc, &chan->desc_freed, node) {
chan              308 drivers/dma/sh/usb-dmac.c 			list_move_tail(&desc->node, &chan->desc_got);
chan              309 drivers/dma/sh/usb-dmac.c 			spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              313 drivers/dma/sh/usb-dmac.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              316 drivers/dma/sh/usb-dmac.c 	if (!usb_dmac_desc_alloc(chan, sg_len, gfp)) {
chan              318 drivers/dma/sh/usb-dmac.c 		spin_lock_irqsave(&chan->vc.lock, flags);
chan              319 drivers/dma/sh/usb-dmac.c 		desc = list_last_entry(&chan->desc_freed, struct usb_dmac_desc,
chan              321 drivers/dma/sh/usb-dmac.c 		list_move_tail(&desc->node, &chan->desc_got);
chan              322 drivers/dma/sh/usb-dmac.c 		spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              329 drivers/dma/sh/usb-dmac.c static void usb_dmac_desc_put(struct usb_dmac_chan *chan,
chan              334 drivers/dma/sh/usb-dmac.c 	spin_lock_irqsave(&chan->vc.lock, flags);
chan              335 drivers/dma/sh/usb-dmac.c 	list_move_tail(&desc->node, &chan->desc_freed);
chan              336 drivers/dma/sh/usb-dmac.c 	spin_unlock_irqrestore(&chan->vc.lock, flags);
chan              345 drivers/dma/sh/usb-dmac.c 	struct dma_chan *chan = &uchan->vc.chan;
chan              346 drivers/dma/sh/usb-dmac.c 	struct usb_dmac *dmac = to_usb_dmac(chan->device);
chan              362 drivers/dma/sh/usb-dmac.c static void usb_dmac_chan_halt(struct usb_dmac_chan *chan)
chan              364 drivers/dma/sh/usb-dmac.c 	u32 chcr = usb_dmac_chan_read(chan, USB_DMACHCR);
chan              367 drivers/dma/sh/usb-dmac.c 	usb_dmac_chan_write(chan, USB_DMACHCR, chcr);
chan              369 drivers/dma/sh/usb-dmac.c 	usb_dmac_soft_reset(chan);
chan              381 drivers/dma/sh/usb-dmac.c static int usb_dmac_alloc_chan_resources(struct dma_chan *chan)
chan              383 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              396 drivers/dma/sh/usb-dmac.c 	return pm_runtime_get_sync(chan->device->dev);
chan              399 drivers/dma/sh/usb-dmac.c static void usb_dmac_free_chan_resources(struct dma_chan *chan)
chan              401 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              412 drivers/dma/sh/usb-dmac.c 	pm_runtime_put(chan->device->dev);
chan              416 drivers/dma/sh/usb-dmac.c usb_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              420 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              426 drivers/dma/sh/usb-dmac.c 		dev_warn(chan->device->dev,
chan              445 drivers/dma/sh/usb-dmac.c static int usb_dmac_chan_terminate_all(struct dma_chan *chan)
chan              447 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              467 drivers/dma/sh/usb-dmac.c static unsigned int usb_dmac_get_current_residue(struct usb_dmac_chan *chan,
chan              480 drivers/dma/sh/usb-dmac.c 		residue -= usb_dmac_chan_read(chan, USB_DMADAR) - mem_addr;
chan              482 drivers/dma/sh/usb-dmac.c 		residue -= usb_dmac_chan_read(chan, USB_DMASAR) - mem_addr;
chan              487 drivers/dma/sh/usb-dmac.c static u32 usb_dmac_chan_get_residue_if_complete(struct usb_dmac_chan *chan,
chan              493 drivers/dma/sh/usb-dmac.c 	list_for_each_entry_reverse(desc, &chan->desc_freed, node) {
chan              503 drivers/dma/sh/usb-dmac.c static u32 usb_dmac_chan_get_residue(struct usb_dmac_chan *chan,
chan              508 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_desc *desc = chan->desc;
chan              512 drivers/dma/sh/usb-dmac.c 		vd = vchan_find_desc(&chan->vc, cookie);
chan              523 drivers/dma/sh/usb-dmac.c 	residue += usb_dmac_get_current_residue(chan, desc, desc->sg_index);
chan              528 drivers/dma/sh/usb-dmac.c static enum dma_status usb_dmac_tx_status(struct dma_chan *chan,
chan              532 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              537 drivers/dma/sh/usb-dmac.c 	status = dma_cookie_status(chan, cookie, txstate);
chan              554 drivers/dma/sh/usb-dmac.c static void usb_dmac_issue_pending(struct dma_chan *chan)
chan              556 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              568 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *chan = to_usb_dmac_chan(vd->tx.chan);
chan              570 drivers/dma/sh/usb-dmac.c 	usb_dmac_desc_put(chan, desc);
chan              577 drivers/dma/sh/usb-dmac.c static void usb_dmac_isr_transfer_end(struct usb_dmac_chan *chan)
chan              579 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_desc *desc = chan->desc;
chan              584 drivers/dma/sh/usb-dmac.c 		usb_dmac_chan_start_sg(chan, desc->sg_index);
chan              586 drivers/dma/sh/usb-dmac.c 		desc->residue = usb_dmac_get_current_residue(chan, desc,
chan              592 drivers/dma/sh/usb-dmac.c 		usb_dmac_chan_start_desc(chan);
chan              598 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *chan = dev;
chan              604 drivers/dma/sh/usb-dmac.c 	spin_lock(&chan->vc.lock);
chan              606 drivers/dma/sh/usb-dmac.c 	chcr = usb_dmac_chan_read(chan, USB_DMACHCR);
chan              620 drivers/dma/sh/usb-dmac.c 		usb_dmac_chan_write(chan, USB_DMACHCR, chcr & ~mask);
chan              623 drivers/dma/sh/usb-dmac.c 		usb_dmac_isr_transfer_end(chan);
chan              625 drivers/dma/sh/usb-dmac.c 	spin_unlock(&chan->vc.lock);
chan              634 drivers/dma/sh/usb-dmac.c static bool usb_dmac_chan_filter(struct dma_chan *chan, void *arg)
chan              636 drivers/dma/sh/usb-dmac.c 	struct usb_dmac_chan *uchan = to_usb_dmac_chan(chan);
chan              649 drivers/dma/sh/usb-dmac.c 	struct dma_chan *chan;
chan              659 drivers/dma/sh/usb-dmac.c 	chan = __dma_request_channel(&mask, usb_dmac_chan_filter, dma_spec,
chan              661 drivers/dma/sh/usb-dmac.c 	if (!chan)
chan              664 drivers/dma/sh/usb-dmac.c 	return chan;
chan               98 drivers/dma/sirf-dma.c 	struct dma_chan			chan;
chan              152 drivers/dma/sirf-dma.c 	return container_of(c, struct sirfsoc_dma_chan, chan);
chan              238 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(&schan->chan);
chan              239 drivers/dma/sirf-dma.c 	int cid = schan->chan.chan_id;
chan              370 drivers/dma/sirf-dma.c 			schan->chan.completed_cookie = last_cookie;
chan              406 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(txd->chan);
chan              425 drivers/dma/sirf-dma.c static int sirfsoc_dma_slave_config(struct dma_chan *chan,
chan              428 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              442 drivers/dma/sirf-dma.c static int sirfsoc_dma_terminate_all(struct dma_chan *chan)
chan              444 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              445 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(&schan->chan);
chan              446 drivers/dma/sirf-dma.c 	int cid = schan->chan.chan_id;
chan              488 drivers/dma/sirf-dma.c static int sirfsoc_dma_pause_chan(struct dma_chan *chan)
chan              490 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              491 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(&schan->chan);
chan              492 drivers/dma/sirf-dma.c 	int cid = schan->chan.chan_id;
chan              522 drivers/dma/sirf-dma.c static int sirfsoc_dma_resume_chan(struct dma_chan *chan)
chan              524 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              525 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(&schan->chan);
chan              526 drivers/dma/sirf-dma.c 	int cid = schan->chan.chan_id;
chan              556 drivers/dma/sirf-dma.c static int sirfsoc_dma_alloc_chan_resources(struct dma_chan *chan)
chan              558 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(chan);
chan              559 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              576 drivers/dma/sirf-dma.c 		dma_async_tx_descriptor_init(&sdesc->desc, chan);
chan              596 drivers/dma/sirf-dma.c static void sirfsoc_dma_free_chan_resources(struct dma_chan *chan)
chan              598 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              599 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(chan);
chan              625 drivers/dma/sirf-dma.c static void sirfsoc_dma_issue_pending(struct dma_chan *chan)
chan              627 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              640 drivers/dma/sirf-dma.c sirfsoc_dma_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              643 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(chan);
chan              644 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              648 drivers/dma/sirf-dma.c 	int cid = schan->chan.chan_id;
chan              656 drivers/dma/sirf-dma.c 		ret = dma_cookie_status(chan, cookie, txstate);
chan              668 drivers/dma/sirf-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              689 drivers/dma/sirf-dma.c 	struct dma_chan *chan, struct dma_interleaved_template *xt,
chan              692 drivers/dma/sirf-dma.c 	struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(chan);
chan              693 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              757 drivers/dma/sirf-dma.c sirfsoc_dma_prep_cyclic(struct dma_chan *chan, dma_addr_t addr,
chan              761 drivers/dma/sirf-dma.c 	struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
chan              808 drivers/dma/sirf-dma.c bool sirfsoc_dma_filter_id(struct dma_chan *chan, void *chan_id)
chan              812 drivers/dma/sirf-dma.c 	if (ch_nr == chan->chan_id +
chan              813 drivers/dma/sirf-dma.c 		chan->device->dev_id * SIRFSOC_DMA_CHANNELS)
chan              836 drivers/dma/sirf-dma.c 	return dma_get_slave_channel(&sdma->channels[request].chan);
chan              928 drivers/dma/sirf-dma.c 		schan->chan.device = dma;
chan              929 drivers/dma/sirf-dma.c 		dma_cookie_init(&schan->chan);
chan              938 drivers/dma/sirf-dma.c 		list_add_tail(&schan->chan.device_node, &dma->channels);
chan              216 drivers/dma/sprd-dma.c static bool sprd_dma_filter_fn(struct dma_chan *chan, void *param);
chan              223 drivers/dma/sprd-dma.c 	return container_of(c, struct sprd_dma_chn, vc.chan);
chan              289 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan);
chan              302 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan);
chan              339 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan);
chan              398 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan);
chan              433 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan);
chan              609 drivers/dma/sprd-dma.c static int sprd_dma_alloc_chan_resources(struct dma_chan *chan)
chan              611 drivers/dma/sprd-dma.c 	return pm_runtime_get_sync(chan->device->dev);
chan              614 drivers/dma/sprd-dma.c static void sprd_dma_free_chan_resources(struct dma_chan *chan)
chan              616 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              631 drivers/dma/sprd-dma.c 	pm_runtime_put(chan->device->dev);
chan              634 drivers/dma/sprd-dma.c static enum dma_status sprd_dma_tx_status(struct dma_chan *chan,
chan              638 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              644 drivers/dma/sprd-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              678 drivers/dma/sprd-dma.c static void sprd_dma_issue_pending(struct dma_chan *chan)
chan              680 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              717 drivers/dma/sprd-dma.c static int sprd_dma_fill_desc(struct dma_chan *chan,
chan              725 drivers/dma/sprd-dma.c 	struct sprd_dma_dev *sdev = to_sprd_dma_dev(chan);
chan              726 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              844 drivers/dma/sprd-dma.c static int sprd_dma_fill_linklist_desc(struct dma_chan *chan,
chan              851 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              860 drivers/dma/sprd-dma.c 	return sprd_dma_fill_desc(chan, hw, sglen, sg_index, src, dst, len,
chan              865 drivers/dma/sprd-dma.c sprd_dma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              868 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              920 drivers/dma/sprd-dma.c sprd_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              924 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan              987 drivers/dma/sprd-dma.c 		ret = sprd_dma_fill_linklist_desc(chan, sglen, i, src, dst, len,
chan              995 drivers/dma/sprd-dma.c 	ret = sprd_dma_fill_desc(chan, &sdesc->chn_hw, 0, 0, start_src,
chan             1005 drivers/dma/sprd-dma.c static int sprd_dma_slave_config(struct dma_chan *chan,
chan             1008 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan             1015 drivers/dma/sprd-dma.c static int sprd_dma_pause(struct dma_chan *chan)
chan             1017 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan             1027 drivers/dma/sprd-dma.c static int sprd_dma_resume(struct dma_chan *chan)
chan             1029 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan             1039 drivers/dma/sprd-dma.c static int sprd_dma_terminate_all(struct dma_chan *chan)
chan             1041 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan             1069 drivers/dma/sprd-dma.c static bool sprd_dma_filter_fn(struct dma_chan *chan, void *param)
chan             1071 drivers/dma/sprd-dma.c 	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
chan             1215 drivers/dma/sprd-dma.c 				 vc.chan.device_node) {
chan             1216 drivers/dma/sprd-dma.c 		list_del(&c->vc.chan.device_node);
chan               23 drivers/dma/st_fdma.c 	return container_of(c, struct st_fdma_chan, vchan.chan);
chan               84 drivers/dma/st_fdma.c 	cmd = FDMA_CMD_START(fchan->vchan.chan.chan_id);
chan               93 drivers/dma/st_fdma.c 	dev_dbg(fchan->fdev->dev, "start chan:%d\n", fchan->vchan.chan.chan_id);
chan              100 drivers/dma/st_fdma.c 	int ch_id = fchan->vchan.chan.chan_id;
chan              169 drivers/dma/st_fdma.c 	struct dma_chan *chan;
chan              185 drivers/dma/st_fdma.c 	chan = dma_get_any_slave_channel(&fdev->dma_device);
chan              186 drivers/dma/st_fdma.c 	if (!chan)
chan              189 drivers/dma/st_fdma.c 	fchan = to_st_fdma_chan(chan);
chan              208 drivers/dma/st_fdma.c 			chan = ERR_PTR(fchan->dreq_line);
chan              216 drivers/dma/st_fdma.c 	return chan;
chan              220 drivers/dma/st_fdma.c 	return chan;
chan              264 drivers/dma/st_fdma.c static int st_fdma_alloc_chan_res(struct dma_chan *chan)
chan              266 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              269 drivers/dma/st_fdma.c 	fchan->node_pool = dma_pool_create(dev_name(&chan->dev->device),
chan              281 drivers/dma/st_fdma.c 		fchan->vchan.chan.chan_id, fchan->cfg.type);
chan              286 drivers/dma/st_fdma.c static void st_fdma_free_chan_res(struct dma_chan *chan)
chan              288 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              293 drivers/dma/st_fdma.c 		__func__, fchan->vchan.chan.chan_id);
chan              310 drivers/dma/st_fdma.c 	struct dma_chan *chan,	dma_addr_t dst, dma_addr_t src,
chan              320 drivers/dma/st_fdma.c 	fchan = to_st_fdma_chan(chan);
chan              350 drivers/dma/st_fdma.c 	int ch_id = fchan->vchan.chan.chan_id;
chan              428 drivers/dma/st_fdma.c static inline struct st_fdma_chan *st_fdma_prep_common(struct dma_chan *chan,
chan              433 drivers/dma/st_fdma.c 	if (!chan || !len)
chan              436 drivers/dma/st_fdma.c 	fchan = to_st_fdma_chan(chan);
chan              447 drivers/dma/st_fdma.c 		struct dma_chan *chan, dma_addr_t buf_addr, size_t len,
chan              455 drivers/dma/st_fdma.c 	fchan = st_fdma_prep_common(chan, len, direction);
chan              506 drivers/dma/st_fdma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              516 drivers/dma/st_fdma.c 	fchan = st_fdma_prep_common(chan, sg_len, direction);
chan              579 drivers/dma/st_fdma.c static enum dma_status st_fdma_tx_status(struct dma_chan *chan,
chan              583 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              588 drivers/dma/st_fdma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              606 drivers/dma/st_fdma.c static void st_fdma_issue_pending(struct dma_chan *chan)
chan              608 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              619 drivers/dma/st_fdma.c static int st_fdma_pause(struct dma_chan *chan)
chan              622 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              623 drivers/dma/st_fdma.c 	int ch_id = fchan->vchan.chan.chan_id;
chan              636 drivers/dma/st_fdma.c static int st_fdma_resume(struct dma_chan *chan)
chan              640 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              641 drivers/dma/st_fdma.c 	int ch_id = fchan->vchan.chan.chan_id;
chan              656 drivers/dma/st_fdma.c static int st_fdma_terminate_all(struct dma_chan *chan)
chan              660 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              661 drivers/dma/st_fdma.c 	int ch_id = fchan->vchan.chan.chan_id;
chan              676 drivers/dma/st_fdma.c static int st_fdma_slave_config(struct dma_chan *chan,
chan              679 drivers/dma/st_fdma.c 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
chan              733 drivers/dma/st_fdma.c 		list_del(&fchan->vchan.chan.device_node);
chan              186 drivers/dma/st_fdma.h 			+ (fchan)->vchan.chan.chan_id * 0x4 \
chan              191 drivers/dma/st_fdma.h 			+ (fchan)->vchan.chan.chan_id * 0x4 \
chan              208 drivers/dma/st_fdma.h 			+ (fchan)->vchan.chan.chan_id * FDMA_NODE_SZ \
chan              213 drivers/dma/st_fdma.h 			+ (fchan)->vchan.chan.chan_id * FDMA_NODE_SZ \
chan               35 drivers/dma/ste_dma40.c #define D40_CHAN_POS(chan)  (2 * (chan / 2))
chan               36 drivers/dma/ste_dma40.c #define D40_CHAN_POS_MASK(chan) (0x3 << D40_CHAN_POS(chan))
chan              463 drivers/dma/ste_dma40.c 	struct dma_chan			 chan;
chan              605 drivers/dma/ste_dma40.c 	return &d40c->chan.dev->device;
chan              608 drivers/dma/ste_dma40.c static bool chan_is_physical(struct d40_chan *chan)
chan              610 drivers/dma/ste_dma40.c 	return chan->log_num == D40_PHY_CHAN;
chan              613 drivers/dma/ste_dma40.c static bool chan_is_logical(struct d40_chan *chan)
chan              615 drivers/dma/ste_dma40.c 	return !chan_is_physical(chan);
chan              618 drivers/dma/ste_dma40.c static void __iomem *chan_base(struct d40_chan *chan)
chan              620 drivers/dma/ste_dma40.c 	return chan->base->virtbase + D40_DREG_PCBASE +
chan              621 drivers/dma/ste_dma40.c 	       chan->phy_chan->num * D40_DREG_PCDELTA;
chan              630 drivers/dma/ste_dma40.c static int d40_set_runtime_config_write(struct dma_chan *chan,
chan              806 drivers/dma/ste_dma40.c static void d40_phy_lli_load(struct d40_chan *chan, struct d40_desc *desc)
chan              810 drivers/dma/ste_dma40.c 	void __iomem *base = chan_base(chan);
chan              828 drivers/dma/ste_dma40.c static void d40_log_lli_to_lcxa(struct d40_chan *chan, struct d40_desc *desc)
chan              830 drivers/dma/ste_dma40.c 	struct d40_lcla_pool *pool = &chan->base->lcla_pool;
chan              837 drivers/dma/ste_dma40.c 	bool use_esram_lcla = chan->base->plat_data->use_esram_lcla;
chan              857 drivers/dma/ste_dma40.c 		if (!(chan->phy_chan->use_soft_lli &&
chan              858 drivers/dma/ste_dma40.c 			chan->dma_cfg.dir == DMA_DEV_TO_MEM))
chan              859 drivers/dma/ste_dma40.c 			curr_lcla = d40_lcla_alloc_one(chan, desc);
chan              876 drivers/dma/ste_dma40.c 		d40_log_lli_lcpa_write(chan->lcpa,
chan              888 drivers/dma/ste_dma40.c 		unsigned int lcla_offset = chan->phy_chan->num * 1024 +
chan              895 drivers/dma/ste_dma40.c 			next_lcla = d40_lcla_alloc_one(chan, desc);
chan              904 drivers/dma/ste_dma40.c 			d40_log_lli_lcpa_write(chan->lcpa,
chan              924 drivers/dma/ste_dma40.c 			dma_sync_single_range_for_device(chan->base->dev,
chan             1413 drivers/dma/ste_dma40.c static int d40_pause(struct dma_chan *chan)
chan             1415 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             1438 drivers/dma/ste_dma40.c static int d40_resume(struct dma_chan *chan)
chan             1440 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             1467 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(tx->chan,
chan             1469 drivers/dma/ste_dma40.c 					     chan);
chan             1644 drivers/dma/ste_dma40.c 	long chan = -1;
chan             1660 drivers/dma/ste_dma40.c 		chan = find_next_bit((unsigned long *)regs,
chan             1661 drivers/dma/ste_dma40.c 				     BITS_PER_LONG * il_size, chan + 1);
chan             1664 drivers/dma/ste_dma40.c 		if (chan == BITS_PER_LONG * il_size)
chan             1667 drivers/dma/ste_dma40.c 		row = chan / BITS_PER_LONG;
chan             1668 drivers/dma/ste_dma40.c 		idx = chan & (BITS_PER_LONG - 1);
chan             1692 drivers/dma/ste_dma40.c 				chan, il[row].offset, idx);
chan             1961 drivers/dma/ste_dma40.c 	dma_cap_mask_t cap = d40c->chan.device->cap_mask;
chan             1965 drivers/dma/ste_dma40.c 		d40c->dma_cfg.dev_type = dma40_memcpy_channels[d40c->chan.chan_id];
chan             2095 drivers/dma/ste_dma40.c static u32 stedma40_residue(struct dma_chan *chan)
chan             2098 drivers/dma/ste_dma40.c 		container_of(chan, struct d40_chan, chan);
chan             2110 drivers/dma/ste_dma40.c d40_prep_sg_log(struct d40_chan *chan, struct d40_desc *desc,
chan             2115 drivers/dma/ste_dma40.c 	struct stedma40_chan_cfg *cfg = &chan->dma_cfg;
chan             2123 drivers/dma/ste_dma40.c 				chan->log_def.lcsp1,
chan             2130 drivers/dma/ste_dma40.c 				chan->log_def.lcsp3,
chan             2138 drivers/dma/ste_dma40.c d40_prep_sg_phy(struct d40_chan *chan, struct d40_desc *desc,
chan             2143 drivers/dma/ste_dma40.c 	struct stedma40_chan_cfg *cfg = &chan->dma_cfg;
chan             2155 drivers/dma/ste_dma40.c 				chan->src_def_cfg,
chan             2161 drivers/dma/ste_dma40.c 				chan->dst_def_cfg,
chan             2164 drivers/dma/ste_dma40.c 	dma_sync_single_for_device(chan->base->dev, desc->lli_pool.dma_addr,
chan             2171 drivers/dma/ste_dma40.c d40_prep_desc(struct d40_chan *chan, struct scatterlist *sg,
chan             2178 drivers/dma/ste_dma40.c 	desc = d40_desc_get(chan);
chan             2182 drivers/dma/ste_dma40.c 	cfg = &chan->dma_cfg;
chan             2186 drivers/dma/ste_dma40.c 		chan_err(chan, "Unaligned size\n");
chan             2190 drivers/dma/ste_dma40.c 	ret = d40_pool_lli_alloc(chan, desc, desc->lli_len);
chan             2192 drivers/dma/ste_dma40.c 		chan_err(chan, "Could not allocate lli\n");
chan             2200 drivers/dma/ste_dma40.c 	dma_async_tx_descriptor_init(&desc->txd, &chan->chan);
chan             2204 drivers/dma/ste_dma40.c 	d40_desc_free(chan, desc);
chan             2213 drivers/dma/ste_dma40.c 	struct d40_chan *chan = container_of(dchan, struct d40_chan, chan);
chan             2220 drivers/dma/ste_dma40.c 	if (!chan->phy_chan) {
chan             2221 drivers/dma/ste_dma40.c 		chan_err(chan, "Cannot prepare unallocated channel\n");
chan             2225 drivers/dma/ste_dma40.c 	d40_set_runtime_config_write(dchan, &chan->slave_config, direction);
chan             2227 drivers/dma/ste_dma40.c 	spin_lock_irqsave(&chan->lock, flags);
chan             2229 drivers/dma/ste_dma40.c 	desc = d40_prep_desc(chan, sg_src, sg_len, dma_flags);
chan             2239 drivers/dma/ste_dma40.c 		src_dev_addr = chan->runtime_addr;
chan             2241 drivers/dma/ste_dma40.c 		dst_dev_addr = chan->runtime_addr;
chan             2243 drivers/dma/ste_dma40.c 	if (chan_is_logical(chan))
chan             2244 drivers/dma/ste_dma40.c 		ret = d40_prep_sg_log(chan, desc, sg_src, sg_dst,
chan             2247 drivers/dma/ste_dma40.c 		ret = d40_prep_sg_phy(chan, desc, sg_src, sg_dst,
chan             2251 drivers/dma/ste_dma40.c 		chan_err(chan, "Failed to prepare %s sg job: %d\n",
chan             2252 drivers/dma/ste_dma40.c 			 chan_is_logical(chan) ? "log" : "phy", ret);
chan             2260 drivers/dma/ste_dma40.c 	list_add_tail(&desc->node, &chan->prepare_queue);
chan             2262 drivers/dma/ste_dma40.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             2266 drivers/dma/ste_dma40.c 	d40_desc_free(chan, desc);
chan             2268 drivers/dma/ste_dma40.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             2272 drivers/dma/ste_dma40.c bool stedma40_filter(struct dma_chan *chan, void *data)
chan             2276 drivers/dma/ste_dma40.c 		container_of(chan, struct d40_chan, chan);
chan             2389 drivers/dma/ste_dma40.c static int d40_alloc_chan_resources(struct dma_chan *chan)
chan             2394 drivers/dma/ste_dma40.c 		container_of(chan, struct d40_chan, chan);
chan             2398 drivers/dma/ste_dma40.c 	dma_cookie_init(chan);
chan             2454 drivers/dma/ste_dma40.c static void d40_free_chan_resources(struct dma_chan *chan)
chan             2457 drivers/dma/ste_dma40.c 		container_of(chan, struct d40_chan, chan);
chan             2475 drivers/dma/ste_dma40.c static struct dma_async_tx_descriptor *d40_prep_memcpy(struct dma_chan *chan,
chan             2493 drivers/dma/ste_dma40.c 	return d40_prep_sg(chan, &src_sg, &dst_sg, 1,
chan             2498 drivers/dma/ste_dma40.c d40_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan             2505 drivers/dma/ste_dma40.c 	return d40_prep_sg(chan, sgl, sgl, sg_len, direction, dma_flags);
chan             2509 drivers/dma/ste_dma40.c dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
chan             2530 drivers/dma/ste_dma40.c 	txd = d40_prep_sg(chan, sg, sg, periods, direction,
chan             2538 drivers/dma/ste_dma40.c static enum dma_status d40_tx_status(struct dma_chan *chan,
chan             2542 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             2550 drivers/dma/ste_dma40.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             2552 drivers/dma/ste_dma40.c 		dma_set_residue(txstate, stedma40_residue(chan));
chan             2560 drivers/dma/ste_dma40.c static void d40_issue_pending(struct dma_chan *chan)
chan             2562 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             2581 drivers/dma/ste_dma40.c static int d40_terminate_all(struct dma_chan *chan)
chan             2584 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             2645 drivers/dma/ste_dma40.c static int d40_set_runtime_config(struct dma_chan *chan,
chan             2648 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             2656 drivers/dma/ste_dma40.c static int d40_set_runtime_config_write(struct dma_chan *chan,
chan             2660 drivers/dma/ste_dma40.c 	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);
chan             2772 drivers/dma/ste_dma40.c 		dma_chan_name(chan),
chan             2794 drivers/dma/ste_dma40.c 		d40c->chan.device = dma;
chan             2810 drivers/dma/ste_dma40.c 		list_add_tail(&d40c->chan.device_node,
chan             3057 drivers/dma/ste_dma40.c 		int chan = base->plat_data->disabled_channels[i];
chan             3059 drivers/dma/ste_dma40.c 		base->phy_res[chan].allocated_src = D40_ALLOC_PHY;
chan             3060 drivers/dma/ste_dma40.c 		base->phy_res[chan].allocated_dst = D40_ALLOC_PHY;
chan             3061 drivers/dma/ste_dma40.c 		base->phy_res[chan].reserved = true;
chan             3062 drivers/dma/ste_dma40.c 		gcc |= D40_DREG_GCC_EVTGRP_ENA(D40_PHYS_TO_GROUP(chan),
chan             3064 drivers/dma/ste_dma40.c 		gcc |= D40_DREG_GCC_EVTGRP_ENA(D40_PHYS_TO_GROUP(chan),
chan             3071 drivers/dma/ste_dma40.c 		int chan = base->plat_data->soft_lli_chans[i];
chan             3073 drivers/dma/ste_dma40.c 		base->phy_res[chan].use_soft_lli = true;
chan              212 drivers/dma/stm32-dma.c 	struct stm32_dma_chan chan[STM32_DMA_MAX_CHANNELS];
chan              215 drivers/dma/stm32-dma.c static struct stm32_dma_device *stm32_dma_get_dev(struct stm32_dma_chan *chan)
chan              217 drivers/dma/stm32-dma.c 	return container_of(chan->vchan.chan.device, struct stm32_dma_device,
chan              223 drivers/dma/stm32-dma.c 	return container_of(c, struct stm32_dma_chan, vchan.chan);
chan              231 drivers/dma/stm32-dma.c static struct device *chan2dev(struct stm32_dma_chan *chan)
chan              233 drivers/dma/stm32-dma.c 	return &chan->vchan.chan.dev->device;
chan              246 drivers/dma/stm32-dma.c static int stm32_dma_get_width(struct stm32_dma_chan *chan,
chan              257 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Dma bus width not supported\n");
chan              333 drivers/dma/stm32-dma.c static int stm32_dma_get_burst(struct stm32_dma_chan *chan, u32 maxburst)
chan              346 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Dma burst size not supported\n");
chan              351 drivers/dma/stm32-dma.c static void stm32_dma_set_fifo_config(struct stm32_dma_chan *chan,
chan              354 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_sfcr &= ~STM32_DMA_SFCR_MASK;
chan              355 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr &= ~STM32_DMA_SCR_DMEIE;
chan              359 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_scr |= STM32_DMA_SCR_DMEIE;
chan              362 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_sfcr |= STM32_DMA_SFCR_MASK;
chan              369 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              371 drivers/dma/stm32-dma.c 	memcpy(&chan->dma_sconfig, config, sizeof(*config));
chan              373 drivers/dma/stm32-dma.c 	chan->config_init = true;
chan              378 drivers/dma/stm32-dma.c static u32 stm32_dma_irq_status(struct stm32_dma_chan *chan)
chan              380 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              391 drivers/dma/stm32-dma.c 	if (chan->id & 4)
chan              396 drivers/dma/stm32-dma.c 	flags = dma_isr >> (((chan->id & 2) << 3) | ((chan->id & 1) * 6));
chan              401 drivers/dma/stm32-dma.c static void stm32_dma_irq_clear(struct stm32_dma_chan *chan, u32 flags)
chan              403 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              414 drivers/dma/stm32-dma.c 	dma_ifcr = flags << (((chan->id & 2) << 3) | ((chan->id & 1) * 6));
chan              416 drivers/dma/stm32-dma.c 	if (chan->id & 4)
chan              422 drivers/dma/stm32-dma.c static int stm32_dma_disable_chan(struct stm32_dma_chan *chan)
chan              424 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              428 drivers/dma/stm32-dma.c 	id = chan->id;
chan              442 drivers/dma/stm32-dma.c 				dev_err(chan2dev(chan), "%s: timeout!\n",
chan              453 drivers/dma/stm32-dma.c static void stm32_dma_stop(struct stm32_dma_chan *chan)
chan              455 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              460 drivers/dma/stm32-dma.c 	dma_scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
chan              462 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), dma_scr);
chan              463 drivers/dma/stm32-dma.c 	dma_sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
chan              465 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SFCR(chan->id), dma_sfcr);
chan              468 drivers/dma/stm32-dma.c 	ret = stm32_dma_disable_chan(chan);
chan              473 drivers/dma/stm32-dma.c 	status = stm32_dma_irq_status(chan);
chan              475 drivers/dma/stm32-dma.c 		dev_dbg(chan2dev(chan), "%s(): clearing interrupt: 0x%08x\n",
chan              477 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, status);
chan              480 drivers/dma/stm32-dma.c 	chan->busy = false;
chan              485 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              489 drivers/dma/stm32-dma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              491 drivers/dma/stm32-dma.c 	if (chan->busy) {
chan              492 drivers/dma/stm32-dma.c 		stm32_dma_stop(chan);
chan              493 drivers/dma/stm32-dma.c 		chan->desc = NULL;
chan              496 drivers/dma/stm32-dma.c 	vchan_get_all_descriptors(&chan->vchan, &head);
chan              497 drivers/dma/stm32-dma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              498 drivers/dma/stm32-dma.c 	vchan_dma_desc_free_list(&chan->vchan, &head);
chan              505 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              507 drivers/dma/stm32-dma.c 	vchan_synchronize(&chan->vchan);
chan              510 drivers/dma/stm32-dma.c static void stm32_dma_dump_reg(struct stm32_dma_chan *chan)
chan              512 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              513 drivers/dma/stm32-dma.c 	u32 scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
chan              514 drivers/dma/stm32-dma.c 	u32 ndtr = stm32_dma_read(dmadev, STM32_DMA_SNDTR(chan->id));
chan              515 drivers/dma/stm32-dma.c 	u32 spar = stm32_dma_read(dmadev, STM32_DMA_SPAR(chan->id));
chan              516 drivers/dma/stm32-dma.c 	u32 sm0ar = stm32_dma_read(dmadev, STM32_DMA_SM0AR(chan->id));
chan              517 drivers/dma/stm32-dma.c 	u32 sm1ar = stm32_dma_read(dmadev, STM32_DMA_SM1AR(chan->id));
chan              518 drivers/dma/stm32-dma.c 	u32 sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
chan              520 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "SCR:   0x%08x\n", scr);
chan              521 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "NDTR:  0x%08x\n", ndtr);
chan              522 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "SPAR:  0x%08x\n", spar);
chan              523 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "SM0AR: 0x%08x\n", sm0ar);
chan              524 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "SM1AR: 0x%08x\n", sm1ar);
chan              525 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "SFCR:  0x%08x\n", sfcr);
chan              528 drivers/dma/stm32-dma.c static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan);
chan              530 drivers/dma/stm32-dma.c static void stm32_dma_start_transfer(struct stm32_dma_chan *chan)
chan              532 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              539 drivers/dma/stm32-dma.c 	ret = stm32_dma_disable_chan(chan);
chan              543 drivers/dma/stm32-dma.c 	if (!chan->desc) {
chan              544 drivers/dma/stm32-dma.c 		vdesc = vchan_next_desc(&chan->vchan);
chan              548 drivers/dma/stm32-dma.c 		chan->desc = to_stm32_dma_desc(vdesc);
chan              549 drivers/dma/stm32-dma.c 		chan->next_sg = 0;
chan              552 drivers/dma/stm32-dma.c 	if (chan->next_sg == chan->desc->num_sgs)
chan              553 drivers/dma/stm32-dma.c 		chan->next_sg = 0;
chan              555 drivers/dma/stm32-dma.c 	sg_req = &chan->desc->sg_req[chan->next_sg];
chan              558 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), reg->dma_scr);
chan              559 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SPAR(chan->id), reg->dma_spar);
chan              560 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SM0AR(chan->id), reg->dma_sm0ar);
chan              561 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SFCR(chan->id), reg->dma_sfcr);
chan              562 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SM1AR(chan->id), reg->dma_sm1ar);
chan              563 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SNDTR(chan->id), reg->dma_sndtr);
chan              565 drivers/dma/stm32-dma.c 	chan->next_sg++;
chan              568 drivers/dma/stm32-dma.c 	status = stm32_dma_irq_status(chan);
chan              570 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, status);
chan              572 drivers/dma/stm32-dma.c 	if (chan->desc->cyclic)
chan              573 drivers/dma/stm32-dma.c 		stm32_dma_configure_next_sg(chan);
chan              575 drivers/dma/stm32-dma.c 	stm32_dma_dump_reg(chan);
chan              579 drivers/dma/stm32-dma.c 	stm32_dma_write(dmadev, STM32_DMA_SCR(chan->id), reg->dma_scr);
chan              581 drivers/dma/stm32-dma.c 	chan->busy = true;
chan              583 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan);
chan              586 drivers/dma/stm32-dma.c static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan)
chan              588 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              592 drivers/dma/stm32-dma.c 	id = chan->id;
chan              596 drivers/dma/stm32-dma.c 		if (chan->next_sg == chan->desc->num_sgs)
chan              597 drivers/dma/stm32-dma.c 			chan->next_sg = 0;
chan              599 drivers/dma/stm32-dma.c 		sg_req = &chan->desc->sg_req[chan->next_sg];
chan              604 drivers/dma/stm32-dma.c 			dev_dbg(chan2dev(chan), "CT=1 <=> SM0AR: 0x%08x\n",
chan              609 drivers/dma/stm32-dma.c 			dev_dbg(chan2dev(chan), "CT=0 <=> SM1AR: 0x%08x\n",
chan              615 drivers/dma/stm32-dma.c static void stm32_dma_handle_chan_done(struct stm32_dma_chan *chan)
chan              617 drivers/dma/stm32-dma.c 	if (chan->desc) {
chan              618 drivers/dma/stm32-dma.c 		if (chan->desc->cyclic) {
chan              619 drivers/dma/stm32-dma.c 			vchan_cyclic_callback(&chan->desc->vdesc);
chan              620 drivers/dma/stm32-dma.c 			chan->next_sg++;
chan              621 drivers/dma/stm32-dma.c 			stm32_dma_configure_next_sg(chan);
chan              623 drivers/dma/stm32-dma.c 			chan->busy = false;
chan              624 drivers/dma/stm32-dma.c 			if (chan->next_sg == chan->desc->num_sgs) {
chan              625 drivers/dma/stm32-dma.c 				list_del(&chan->desc->vdesc.node);
chan              626 drivers/dma/stm32-dma.c 				vchan_cookie_complete(&chan->desc->vdesc);
chan              627 drivers/dma/stm32-dma.c 				chan->desc = NULL;
chan              629 drivers/dma/stm32-dma.c 			stm32_dma_start_transfer(chan);
chan              636 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = devid;
chan              637 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan              640 drivers/dma/stm32-dma.c 	spin_lock(&chan->vchan.lock);
chan              642 drivers/dma/stm32-dma.c 	status = stm32_dma_irq_status(chan);
chan              643 drivers/dma/stm32-dma.c 	scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
chan              644 drivers/dma/stm32-dma.c 	sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
chan              647 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, STM32_DMA_TCI);
chan              649 drivers/dma/stm32-dma.c 			stm32_dma_handle_chan_done(chan);
chan              653 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, STM32_DMA_HTI);
chan              657 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, STM32_DMA_FEI);
chan              661 drivers/dma/stm32-dma.c 				dev_err(chan2dev(chan), "FIFO Error\n");
chan              663 drivers/dma/stm32-dma.c 				dev_dbg(chan2dev(chan), "FIFO over/underrun\n");
chan              667 drivers/dma/stm32-dma.c 		stm32_dma_irq_clear(chan, status);
chan              668 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "DMA error: status=0x%08x\n", status);
chan              670 drivers/dma/stm32-dma.c 			dev_err(chan2dev(chan), "chan disabled by HW\n");
chan              673 drivers/dma/stm32-dma.c 	spin_unlock(&chan->vchan.lock);
chan              680 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              683 drivers/dma/stm32-dma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              684 drivers/dma/stm32-dma.c 	if (vchan_issue_pending(&chan->vchan) && !chan->desc && !chan->busy) {
chan              685 drivers/dma/stm32-dma.c 		dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan);
chan              686 drivers/dma/stm32-dma.c 		stm32_dma_start_transfer(chan);
chan              689 drivers/dma/stm32-dma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              692 drivers/dma/stm32-dma.c static int stm32_dma_set_xfer_param(struct stm32_dma_chan *chan,
chan              703 drivers/dma/stm32-dma.c 	src_addr_width = chan->dma_sconfig.src_addr_width;
chan              704 drivers/dma/stm32-dma.c 	dst_addr_width = chan->dma_sconfig.dst_addr_width;
chan              705 drivers/dma/stm32-dma.c 	src_maxburst = chan->dma_sconfig.src_maxburst;
chan              706 drivers/dma/stm32-dma.c 	dst_maxburst = chan->dma_sconfig.dst_maxburst;
chan              707 drivers/dma/stm32-dma.c 	threshold = chan->threshold;
chan              712 drivers/dma/stm32-dma.c 		dst_bus_width = stm32_dma_get_width(chan, dst_addr_width);
chan              722 drivers/dma/stm32-dma.c 		dst_burst_size = stm32_dma_get_burst(chan, dst_best_burst);
chan              728 drivers/dma/stm32-dma.c 		chan->mem_width = src_addr_width;
chan              729 drivers/dma/stm32-dma.c 		src_bus_width = stm32_dma_get_width(chan, src_addr_width);
chan              739 drivers/dma/stm32-dma.c 		src_burst_size = stm32_dma_get_burst(chan, src_best_burst);
chan              750 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_sfcr &= ~STM32_DMA_SFCR_FTH_MASK;
chan              751 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_sfcr |= STM32_DMA_SFCR_FTH(threshold);
chan              754 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_spar = chan->dma_sconfig.dst_addr;
chan              760 drivers/dma/stm32-dma.c 		src_bus_width = stm32_dma_get_width(chan, src_addr_width);
chan              769 drivers/dma/stm32-dma.c 		chan->mem_burst = src_best_burst;
chan              770 drivers/dma/stm32-dma.c 		src_burst_size = stm32_dma_get_burst(chan, src_best_burst);
chan              776 drivers/dma/stm32-dma.c 		chan->mem_width = dst_addr_width;
chan              777 drivers/dma/stm32-dma.c 		dst_bus_width = stm32_dma_get_width(chan, dst_addr_width);
chan              787 drivers/dma/stm32-dma.c 		chan->mem_burst = dst_best_burst;
chan              788 drivers/dma/stm32-dma.c 		dst_burst_size = stm32_dma_get_burst(chan, dst_best_burst);
chan              799 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_sfcr &= ~STM32_DMA_SFCR_FTH_MASK;
chan              800 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_sfcr |= STM32_DMA_SFCR_FTH(threshold);
chan              803 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_spar = chan->dma_sconfig.src_addr;
chan              804 drivers/dma/stm32-dma.c 		*buswidth = chan->dma_sconfig.src_addr_width;
chan              808 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Dma direction is not supported\n");
chan              812 drivers/dma/stm32-dma.c 	stm32_dma_set_fifo_config(chan, src_best_burst, dst_best_burst);
chan              815 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr &= ~(STM32_DMA_SCR_DIR_MASK |
chan              818 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr |= dma_scr;
chan              833 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              840 drivers/dma/stm32-dma.c 	if (!chan->config_init) {
chan              841 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "dma channel is not configured\n");
chan              846 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Invalid segment length %d\n", sg_len);
chan              855 drivers/dma/stm32-dma.c 	if (chan->dma_sconfig.device_fc)
chan              856 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_scr |= STM32_DMA_SCR_PFCTRL;
chan              858 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_scr &= ~STM32_DMA_SCR_PFCTRL;
chan              861 drivers/dma/stm32-dma.c 		ret = stm32_dma_set_xfer_param(chan, direction, &buswidth,
chan              870 drivers/dma/stm32-dma.c 			dev_err(chan2dev(chan), "nb items not supported\n");
chan              875 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_scr = chan->chan_reg.dma_scr;
chan              876 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_sfcr = chan->chan_reg.dma_sfcr;
chan              877 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_spar = chan->chan_reg.dma_spar;
chan              886 drivers/dma/stm32-dma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              898 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              905 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Invalid buffer/period len\n");
chan              909 drivers/dma/stm32-dma.c 	if (!chan->config_init) {
chan              910 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "dma channel is not configured\n");
chan              915 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "buf_len not multiple of period_len\n");
chan              925 drivers/dma/stm32-dma.c 	if (chan->busy) {
chan              926 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "Request not allowed when dma busy\n");
chan              930 drivers/dma/stm32-dma.c 	ret = stm32_dma_set_xfer_param(chan, direction, &buswidth, period_len);
chan              936 drivers/dma/stm32-dma.c 		dev_err(chan2dev(chan), "number of items not supported\n");
chan              942 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_scr |= STM32_DMA_SCR_CIRC;
chan              944 drivers/dma/stm32-dma.c 		chan->chan_reg.dma_scr |= STM32_DMA_SCR_DBM;
chan              947 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr &= ~STM32_DMA_SCR_PFCTRL;
chan              959 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_scr = chan->chan_reg.dma_scr;
chan              960 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_sfcr = chan->chan_reg.dma_sfcr;
chan              961 drivers/dma/stm32-dma.c 		desc->sg_req[i].chan_reg.dma_spar = chan->chan_reg.dma_spar;
chan              971 drivers/dma/stm32-dma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              978 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan              990 drivers/dma/stm32-dma.c 	threshold = chan->threshold;
chan             1000 drivers/dma/stm32-dma.c 		dma_burst = stm32_dma_get_burst(chan, best_burst);
chan             1023 drivers/dma/stm32-dma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan             1026 drivers/dma/stm32-dma.c static u32 stm32_dma_get_remaining_bytes(struct stm32_dma_chan *chan)
chan             1029 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan             1031 drivers/dma/stm32-dma.c 	dma_scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
chan             1033 drivers/dma/stm32-dma.c 	ndtr = stm32_dma_read(dmadev, STM32_DMA_SNDTR(chan->id));
chan             1050 drivers/dma/stm32-dma.c static bool stm32_dma_is_current_sg(struct stm32_dma_chan *chan)
chan             1052 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan             1056 drivers/dma/stm32-dma.c 	id = chan->id;
chan             1062 drivers/dma/stm32-dma.c 	sg_req = &chan->desc->sg_req[chan->next_sg];
chan             1074 drivers/dma/stm32-dma.c static size_t stm32_dma_desc_residue(struct stm32_dma_chan *chan,
chan             1081 drivers/dma/stm32-dma.c 	struct stm32_dma_sg_req *sg_req = &chan->desc->sg_req[chan->next_sg];
chan             1109 drivers/dma/stm32-dma.c 	residue = stm32_dma_get_remaining_bytes(chan);
chan             1111 drivers/dma/stm32-dma.c 	if (!stm32_dma_is_current_sg(chan)) {
chan             1113 drivers/dma/stm32-dma.c 		if (n_sg == chan->desc->num_sgs)
chan             1125 drivers/dma/stm32-dma.c 	if (!chan->desc->cyclic || n_sg != 0)
chan             1129 drivers/dma/stm32-dma.c 	if (!chan->mem_burst)
chan             1132 drivers/dma/stm32-dma.c 	burst_size = chan->mem_burst * chan->mem_width;
chan             1144 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan             1154 drivers/dma/stm32-dma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1155 drivers/dma/stm32-dma.c 	vdesc = vchan_find_desc(&chan->vchan, cookie);
chan             1156 drivers/dma/stm32-dma.c 	if (chan->desc && cookie == chan->desc->vdesc.tx.cookie)
chan             1157 drivers/dma/stm32-dma.c 		residue = stm32_dma_desc_residue(chan, chan->desc,
chan             1158 drivers/dma/stm32-dma.c 						 chan->next_sg);
chan             1160 drivers/dma/stm32-dma.c 		residue = stm32_dma_desc_residue(chan,
chan             1164 drivers/dma/stm32-dma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1171 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan             1172 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan             1175 drivers/dma/stm32-dma.c 	chan->config_init = false;
chan             1181 drivers/dma/stm32-dma.c 	ret = stm32_dma_disable_chan(chan);
chan             1190 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
chan             1191 drivers/dma/stm32-dma.c 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
chan             1194 drivers/dma/stm32-dma.c 	dev_dbg(chan2dev(chan), "Freeing channel %d\n", chan->id);
chan             1196 drivers/dma/stm32-dma.c 	if (chan->busy) {
chan             1197 drivers/dma/stm32-dma.c 		spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1198 drivers/dma/stm32-dma.c 		stm32_dma_stop(chan);
chan             1199 drivers/dma/stm32-dma.c 		chan->desc = NULL;
chan             1200 drivers/dma/stm32-dma.c 		spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1213 drivers/dma/stm32-dma.c static void stm32_dma_set_config(struct stm32_dma_chan *chan,
chan             1216 drivers/dma/stm32-dma.c 	stm32_dma_clear_reg(&chan->chan_reg);
chan             1218 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr = cfg->stream_config & STM32_DMA_SCR_CFG_MASK;
chan             1219 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr |= STM32_DMA_SCR_REQ(cfg->request_line);
chan             1222 drivers/dma/stm32-dma.c 	chan->chan_reg.dma_scr |= STM32_DMA_SCR_TEIE | STM32_DMA_SCR_TCIE;
chan             1224 drivers/dma/stm32-dma.c 	chan->threshold = STM32_DMA_THRESHOLD_FTR_GET(cfg->features);
chan             1233 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan;
chan             1252 drivers/dma/stm32-dma.c 	chan = &dmadev->chan[cfg.channel_id];
chan             1254 drivers/dma/stm32-dma.c 	c = dma_get_slave_channel(&chan->vchan.chan);
chan             1260 drivers/dma/stm32-dma.c 	stm32_dma_set_config(chan, &cfg);
chan             1273 drivers/dma/stm32-dma.c 	struct stm32_dma_chan *chan;
chan             1350 drivers/dma/stm32-dma.c 		chan = &dmadev->chan[i];
chan             1351 drivers/dma/stm32-dma.c 		chan->id = i;
chan             1352 drivers/dma/stm32-dma.c 		chan->vchan.desc_free = stm32_dma_desc_free;
chan             1353 drivers/dma/stm32-dma.c 		vchan_init(&chan->vchan, dd);
chan             1361 drivers/dma/stm32-dma.c 		chan = &dmadev->chan[i];
chan             1365 drivers/dma/stm32-dma.c 		chan->irq = ret;
chan             1367 drivers/dma/stm32-dma.c 		ret = devm_request_irq(&pdev->dev, chan->irq,
chan             1369 drivers/dma/stm32-dma.c 				       dev_name(chan2dev(chan)), chan);
chan              280 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan chan[STM32_MDMA_MAX_CHANNELS];
chan              285 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan)
chan              287 drivers/dma/stm32-mdma.c 	return container_of(chan->vchan.chan.device, struct stm32_mdma_device,
chan              293 drivers/dma/stm32-mdma.c 	return container_of(c, struct stm32_mdma_chan, vchan.chan);
chan              301 drivers/dma/stm32-mdma.c static struct device *chan2dev(struct stm32_mdma_chan *chan)
chan              303 drivers/dma/stm32-mdma.c 	return &chan->vchan.chan.dev->device;
chan              338 drivers/dma/stm32-mdma.c 		struct stm32_mdma_chan *chan, u32 count)
chan              349 drivers/dma/stm32-mdma.c 			dma_pool_alloc(chan->desc_pool, GFP_NOWAIT,
chan              360 drivers/dma/stm32-mdma.c 	dev_err(chan2dev(chan), "Failed to allocate descriptor\n");
chan              362 drivers/dma/stm32-mdma.c 		dma_pool_free(chan->desc_pool, desc->node[i].hwdesc,
chan              371 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(vdesc->tx.chan);
chan              375 drivers/dma/stm32-mdma.c 		dma_pool_free(chan->desc_pool, desc->node[i].hwdesc,
chan              380 drivers/dma/stm32-mdma.c static int stm32_mdma_get_width(struct stm32_mdma_chan *chan,
chan              390 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "Dma bus width %i not supported\n",
chan              427 drivers/dma/stm32-mdma.c static int stm32_mdma_disable_chan(struct stm32_mdma_chan *chan)
chan              429 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              433 drivers/dma/stm32-mdma.c 	id = chan->id;
chan              448 drivers/dma/stm32-mdma.c 			dev_err(chan2dev(chan), "%s: timeout!\n", __func__);
chan              456 drivers/dma/stm32-mdma.c static void stm32_mdma_stop(struct stm32_mdma_chan *chan)
chan              458 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              463 drivers/dma/stm32-mdma.c 	ret = stm32_mdma_disable_chan(chan);
chan              468 drivers/dma/stm32-mdma.c 	status = stm32_mdma_read(dmadev, STM32_MDMA_CISR(chan->id));
chan              470 drivers/dma/stm32-mdma.c 		dev_dbg(chan2dev(chan), "%s(): clearing interrupt: 0x%08x\n",
chan              472 drivers/dma/stm32-mdma.c 		stm32_mdma_set_bits(dmadev, STM32_MDMA_CIFCR(chan->id), status);
chan              475 drivers/dma/stm32-mdma.c 	chan->busy = false;
chan              495 drivers/dma/stm32-mdma.c static int stm32_mdma_set_xfer_param(struct stm32_mdma_chan *chan,
chan              501 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              502 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan_config *chan_config = &chan->chan_config;
chan              509 drivers/dma/stm32-mdma.c 	src_addr_width = chan->dma_config.src_addr_width;
chan              510 drivers/dma/stm32-mdma.c 	dst_addr_width = chan->dma_config.dst_addr_width;
chan              511 drivers/dma/stm32-mdma.c 	src_maxburst = chan->dma_config.src_maxburst;
chan              512 drivers/dma/stm32-mdma.c 	dst_maxburst = chan->dma_config.dst_maxburst;
chan              514 drivers/dma/stm32-mdma.c 	ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id));
chan              515 drivers/dma/stm32-mdma.c 	ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
chan              516 drivers/dma/stm32-mdma.c 	ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
chan              539 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan),
chan              547 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "burst size must be a power of 2\n");
chan              567 drivers/dma/stm32-mdma.c 		dst_addr = chan->dma_config.dst_addr;
chan              570 drivers/dma/stm32-mdma.c 		dst_bus_width = stm32_mdma_get_width(chan, dst_addr_width);
chan              580 drivers/dma/stm32-mdma.c 		chan->mem_burst = dst_best_burst;
chan              586 drivers/dma/stm32-mdma.c 		chan->mem_width = src_addr_width;
chan              587 drivers/dma/stm32-mdma.c 		src_bus_width = stm32_mdma_get_width(chan, src_addr_width);
chan              600 drivers/dma/stm32-mdma.c 		chan->mem_burst = src_best_burst;
chan              612 drivers/dma/stm32-mdma.c 		stm32_mdma_write(dmadev, STM32_MDMA_CDAR(chan->id), dst_addr);
chan              616 drivers/dma/stm32-mdma.c 		src_addr = chan->dma_config.src_addr;
chan              619 drivers/dma/stm32-mdma.c 		src_bus_width = stm32_mdma_get_width(chan, src_addr_width);
chan              634 drivers/dma/stm32-mdma.c 		chan->mem_width = dst_addr_width;
chan              635 drivers/dma/stm32-mdma.c 		dst_bus_width = stm32_mdma_get_width(chan, dst_addr_width);
chan              659 drivers/dma/stm32-mdma.c 		stm32_mdma_write(dmadev, STM32_MDMA_CSAR(chan->id), src_addr);
chan              663 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "Dma direction is not supported\n");
chan              674 drivers/dma/stm32-mdma.c static void stm32_mdma_dump_hwdesc(struct stm32_mdma_chan *chan,
chan              677 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "hwdesc:  %pad\n", &node->hwdesc_phys);
chan              678 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CTCR:    0x%08x\n", node->hwdesc->ctcr);
chan              679 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CBNDTR:  0x%08x\n", node->hwdesc->cbndtr);
chan              680 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CSAR:    0x%08x\n", node->hwdesc->csar);
chan              681 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CDAR:    0x%08x\n", node->hwdesc->cdar);
chan              682 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CBRUR:   0x%08x\n", node->hwdesc->cbrur);
chan              683 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CLAR:    0x%08x\n", node->hwdesc->clar);
chan              684 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CTBR:    0x%08x\n", node->hwdesc->ctbr);
chan              685 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CMAR:    0x%08x\n", node->hwdesc->cmar);
chan              686 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CMDR:    0x%08x\n\n", node->hwdesc->cmdr);
chan              689 drivers/dma/stm32-mdma.c static void stm32_mdma_setup_hwdesc(struct stm32_mdma_chan *chan,
chan              696 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan_config *config = &chan->chan_config;
chan              723 drivers/dma/stm32-mdma.c 	stm32_mdma_dump_hwdesc(chan, &desc->node[count]);
chan              726 drivers/dma/stm32-mdma.c static int stm32_mdma_setup_xfer(struct stm32_mdma_chan *chan,
chan              731 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              732 drivers/dma/stm32-mdma.c 	struct dma_slave_config *dma_config = &chan->dma_config;
chan              740 drivers/dma/stm32-mdma.c 			dev_err(chan2dev(chan), "Invalid block len\n");
chan              747 drivers/dma/stm32-mdma.c 			ret = stm32_mdma_set_xfer_param(chan, direction, &ccr,
chan              755 drivers/dma/stm32-mdma.c 			ret = stm32_mdma_set_xfer_param(chan, direction, &ccr,
chan              765 drivers/dma/stm32-mdma.c 		stm32_mdma_setup_hwdesc(chan, desc, direction, i, src_addr,
chan              785 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan              794 drivers/dma/stm32-mdma.c 	if (chan->desc && chan->desc->cyclic) {
chan              795 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan),
chan              800 drivers/dma/stm32-mdma.c 	desc = stm32_mdma_alloc_desc(chan, sg_len);
chan              804 drivers/dma/stm32-mdma.c 	ret = stm32_mdma_setup_xfer(chan, desc, sgl, sg_len, direction);
chan              810 drivers/dma/stm32-mdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              814 drivers/dma/stm32-mdma.c 		dma_pool_free(chan->desc_pool, desc->node[i].hwdesc,
chan              826 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan              827 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              828 drivers/dma/stm32-mdma.c 	struct dma_slave_config *dma_config = &chan->dma_config;
chan              839 drivers/dma/stm32-mdma.c 	if (chan->desc && chan->desc->cyclic) {
chan              840 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan),
chan              846 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "Invalid buffer/period len\n");
chan              851 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "buf_len not multiple of period_len\n");
chan              857 drivers/dma/stm32-mdma.c 	desc = stm32_mdma_alloc_desc(chan, count);
chan              864 drivers/dma/stm32-mdma.c 		ret = stm32_mdma_set_xfer_param(chan, direction, &ccr, &ctcr,
chan              870 drivers/dma/stm32-mdma.c 		ret = stm32_mdma_set_xfer_param(chan, direction, &ccr, &ctcr,
chan              894 drivers/dma/stm32-mdma.c 		stm32_mdma_setup_hwdesc(chan, desc, direction, i, src_addr,
chan              901 drivers/dma/stm32-mdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              905 drivers/dma/stm32-mdma.c 		dma_pool_free(chan->desc_pool, desc->node[i].hwdesc,
chan              915 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan              916 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan              931 drivers/dma/stm32-mdma.c 	if (chan->desc && chan->desc->cyclic) {
chan              932 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan),
chan              938 drivers/dma/stm32-mdma.c 	desc = stm32_mdma_alloc_desc(chan, count);
chan              942 drivers/dma/stm32-mdma.c 	ccr = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id));
chan              943 drivers/dma/stm32-mdma.c 	ctcr = stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id));
chan              944 drivers/dma/stm32-mdma.c 	ctbr = stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id));
chan              945 drivers/dma/stm32-mdma.c 	cbndtr = stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id));
chan              992 drivers/dma/stm32-mdma.c 		src_bus_width = stm32_mdma_get_width(chan, max_width);
chan             1005 drivers/dma/stm32-mdma.c 		dst_bus_width = stm32_mdma_get_width(chan, max_width);
chan             1031 drivers/dma/stm32-mdma.c 		stm32_mdma_dump_hwdesc(chan, &desc->node[0]);
chan             1046 drivers/dma/stm32-mdma.c 			src_bus_width = stm32_mdma_get_width(chan, max_width);
chan             1060 drivers/dma/stm32-mdma.c 			dst_bus_width = stm32_mdma_get_width(chan, max_width);
chan             1076 drivers/dma/stm32-mdma.c 			stm32_mdma_setup_hwdesc(chan, desc, DMA_MEM_TO_MEM, i,
chan             1087 drivers/dma/stm32-mdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan             1090 drivers/dma/stm32-mdma.c static void stm32_mdma_dump_reg(struct stm32_mdma_chan *chan)
chan             1092 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1094 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CCR:     0x%08x\n",
chan             1095 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id)));
chan             1096 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CTCR:    0x%08x\n",
chan             1097 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CTCR(chan->id)));
chan             1098 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CBNDTR:  0x%08x\n",
chan             1099 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id)));
chan             1100 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CSAR:    0x%08x\n",
chan             1101 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CSAR(chan->id)));
chan             1102 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CDAR:    0x%08x\n",
chan             1103 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CDAR(chan->id)));
chan             1104 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CBRUR:   0x%08x\n",
chan             1105 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CBRUR(chan->id)));
chan             1106 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CLAR:    0x%08x\n",
chan             1107 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CLAR(chan->id)));
chan             1108 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CTBR:    0x%08x\n",
chan             1109 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CTBR(chan->id)));
chan             1110 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CMAR:    0x%08x\n",
chan             1111 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CMAR(chan->id)));
chan             1112 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "CMDR:    0x%08x\n",
chan             1113 drivers/dma/stm32-mdma.c 		stm32_mdma_read(dmadev, STM32_MDMA_CMDR(chan->id)));
chan             1116 drivers/dma/stm32-mdma.c static void stm32_mdma_start_transfer(struct stm32_mdma_chan *chan)
chan             1118 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1121 drivers/dma/stm32-mdma.c 	u32 id = chan->id;
chan             1124 drivers/dma/stm32-mdma.c 	vdesc = vchan_next_desc(&chan->vchan);
chan             1126 drivers/dma/stm32-mdma.c 		chan->desc = NULL;
chan             1130 drivers/dma/stm32-mdma.c 	chan->desc = to_stm32_mdma_desc(vdesc);
chan             1131 drivers/dma/stm32-mdma.c 	hwdesc = chan->desc->node[0].hwdesc;
chan             1132 drivers/dma/stm32-mdma.c 	chan->curr_hwdesc = 0;
chan             1134 drivers/dma/stm32-mdma.c 	stm32_mdma_write(dmadev, STM32_MDMA_CCR(id), chan->desc->ccr);
chan             1150 drivers/dma/stm32-mdma.c 	stm32_mdma_dump_reg(chan);
chan             1161 drivers/dma/stm32-mdma.c 	chan->busy = true;
chan             1163 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan);
chan             1168 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1171 drivers/dma/stm32-mdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1173 drivers/dma/stm32-mdma.c 	if (!vchan_issue_pending(&chan->vchan))
chan             1176 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan);
chan             1178 drivers/dma/stm32-mdma.c 	if (!chan->desc && !chan->busy)
chan             1179 drivers/dma/stm32-mdma.c 		stm32_mdma_start_transfer(chan);
chan             1182 drivers/dma/stm32-mdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1187 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1191 drivers/dma/stm32-mdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1192 drivers/dma/stm32-mdma.c 	ret = stm32_mdma_disable_chan(chan);
chan             1193 drivers/dma/stm32-mdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1196 drivers/dma/stm32-mdma.c 		dev_dbg(chan2dev(chan), "vchan %pK: pause\n", &chan->vchan);
chan             1203 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1204 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1209 drivers/dma/stm32-mdma.c 	hwdesc = chan->desc->node[chan->curr_hwdesc].hwdesc;
chan             1211 drivers/dma/stm32-mdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1214 drivers/dma/stm32-mdma.c 	stm32_mdma_write(dmadev, STM32_MDMA_CCR(chan->id), chan->desc->ccr);
chan             1217 drivers/dma/stm32-mdma.c 	status = stm32_mdma_read(dmadev, STM32_MDMA_CISR(chan->id));
chan             1219 drivers/dma/stm32-mdma.c 		stm32_mdma_set_bits(dmadev, STM32_MDMA_CIFCR(chan->id), status);
chan             1221 drivers/dma/stm32-mdma.c 	stm32_mdma_dump_reg(chan);
chan             1224 drivers/dma/stm32-mdma.c 	reg = STM32_MDMA_CCR(chan->id);
chan             1231 drivers/dma/stm32-mdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1233 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "vchan %pK: resume\n", &chan->vchan);
chan             1240 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1244 drivers/dma/stm32-mdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1245 drivers/dma/stm32-mdma.c 	if (chan->busy) {
chan             1246 drivers/dma/stm32-mdma.c 		stm32_mdma_stop(chan);
chan             1247 drivers/dma/stm32-mdma.c 		chan->desc = NULL;
chan             1249 drivers/dma/stm32-mdma.c 	vchan_get_all_descriptors(&chan->vchan, &head);
chan             1250 drivers/dma/stm32-mdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1252 drivers/dma/stm32-mdma.c 	vchan_dma_desc_free_list(&chan->vchan, &head);
chan             1259 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1261 drivers/dma/stm32-mdma.c 	vchan_synchronize(&chan->vchan);
chan             1267 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1269 drivers/dma/stm32-mdma.c 	memcpy(&chan->dma_config, config, sizeof(*config));
chan             1274 drivers/dma/stm32-mdma.c static size_t stm32_mdma_desc_residue(struct stm32_mdma_chan *chan,
chan             1278 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1288 drivers/dma/stm32-mdma.c 	cbndtr = stm32_mdma_read(dmadev, STM32_MDMA_CBNDTR(chan->id));
chan             1291 drivers/dma/stm32-mdma.c 	if (!chan->mem_burst)
chan             1294 drivers/dma/stm32-mdma.c 	burst_size = chan->mem_burst * chan->mem_width;
chan             1306 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1316 drivers/dma/stm32-mdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1318 drivers/dma/stm32-mdma.c 	vdesc = vchan_find_desc(&chan->vchan, cookie);
chan             1319 drivers/dma/stm32-mdma.c 	if (chan->desc && cookie == chan->desc->vdesc.tx.cookie)
chan             1320 drivers/dma/stm32-mdma.c 		residue = stm32_mdma_desc_residue(chan, chan->desc,
chan             1321 drivers/dma/stm32-mdma.c 						  chan->curr_hwdesc);
chan             1323 drivers/dma/stm32-mdma.c 		residue = stm32_mdma_desc_residue(chan,
chan             1327 drivers/dma/stm32-mdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1332 drivers/dma/stm32-mdma.c static void stm32_mdma_xfer_end(struct stm32_mdma_chan *chan)
chan             1334 drivers/dma/stm32-mdma.c 	list_del(&chan->desc->vdesc.node);
chan             1335 drivers/dma/stm32-mdma.c 	vchan_cookie_complete(&chan->desc->vdesc);
chan             1336 drivers/dma/stm32-mdma.c 	chan->desc = NULL;
chan             1337 drivers/dma/stm32-mdma.c 	chan->busy = false;
chan             1340 drivers/dma/stm32-mdma.c 	stm32_mdma_start_transfer(chan);
chan             1346 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = devid;
chan             1367 drivers/dma/stm32-mdma.c 	chan = &dmadev->chan[id];
chan             1368 drivers/dma/stm32-mdma.c 	if (!chan) {
chan             1374 drivers/dma/stm32-mdma.c 	spin_lock(&chan->vchan.lock);
chan             1375 drivers/dma/stm32-mdma.c 	status = stm32_mdma_read(dmadev, STM32_MDMA_CISR(chan->id));
chan             1376 drivers/dma/stm32-mdma.c 	ien = stm32_mdma_read(dmadev, STM32_MDMA_CCR(chan->id));
chan             1381 drivers/dma/stm32-mdma.c 		spin_unlock(&chan->vchan.lock);
chan             1382 drivers/dma/stm32-mdma.c 		dev_dbg(chan2dev(chan),
chan             1389 drivers/dma/stm32-mdma.c 	reg = STM32_MDMA_CIFCR(chan->id);
chan             1393 drivers/dma/stm32-mdma.c 		id = chan->id;
chan             1395 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "Transfer Err: stat=0x%08x\n", status);
chan             1401 drivers/dma/stm32-mdma.c 		stm32_mdma_xfer_end(chan);
chan             1410 drivers/dma/stm32-mdma.c 		chan->curr_hwdesc++;
chan             1411 drivers/dma/stm32-mdma.c 		if (chan->desc && chan->desc->cyclic) {
chan             1412 drivers/dma/stm32-mdma.c 			if (chan->curr_hwdesc == chan->desc->count)
chan             1413 drivers/dma/stm32-mdma.c 				chan->curr_hwdesc = 0;
chan             1414 drivers/dma/stm32-mdma.c 			vchan_cyclic_callback(&chan->desc->vdesc);
chan             1423 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "it %d unhandled (status=0x%04x)\n",
chan             1427 drivers/dma/stm32-mdma.c 	spin_unlock(&chan->vchan.lock);
chan             1435 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1436 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1439 drivers/dma/stm32-mdma.c 	chan->desc_pool = dmam_pool_create(dev_name(&c->dev->device),
chan             1444 drivers/dma/stm32-mdma.c 	if (!chan->desc_pool) {
chan             1445 drivers/dma/stm32-mdma.c 		dev_err(chan2dev(chan), "failed to allocate descriptor pool\n");
chan             1453 drivers/dma/stm32-mdma.c 	ret = stm32_mdma_disable_chan(chan);
chan             1462 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);
chan             1463 drivers/dma/stm32-mdma.c 	struct stm32_mdma_device *dmadev = stm32_mdma_get_dev(chan);
chan             1466 drivers/dma/stm32-mdma.c 	dev_dbg(chan2dev(chan), "Freeing channel %d\n", chan->id);
chan             1468 drivers/dma/stm32-mdma.c 	if (chan->busy) {
chan             1469 drivers/dma/stm32-mdma.c 		spin_lock_irqsave(&chan->vchan.lock, flags);
chan             1470 drivers/dma/stm32-mdma.c 		stm32_mdma_stop(chan);
chan             1471 drivers/dma/stm32-mdma.c 		chan->desc = NULL;
chan             1472 drivers/dma/stm32-mdma.c 		spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan             1477 drivers/dma/stm32-mdma.c 	dmam_pool_destroy(chan->desc_pool);
chan             1478 drivers/dma/stm32-mdma.c 	chan->desc_pool = NULL;
chan             1485 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan;
chan             1516 drivers/dma/stm32-mdma.c 	chan = to_stm32_mdma_chan(c);
chan             1517 drivers/dma/stm32-mdma.c 	chan->chan_config = config;
chan             1530 drivers/dma/stm32-mdma.c 	struct stm32_mdma_chan *chan;
chan             1633 drivers/dma/stm32-mdma.c 		chan = &dmadev->chan[i];
chan             1634 drivers/dma/stm32-mdma.c 		chan->id = i;
chan             1635 drivers/dma/stm32-mdma.c 		chan->vchan.desc_free = stm32_mdma_desc_free;
chan             1636 drivers/dma/stm32-mdma.c 		vchan_init(&chan->vchan, dd);
chan              177 drivers/dma/sun4i-dma.c static struct sun4i_dma_vchan *to_sun4i_dma_vchan(struct dma_chan *chan)
chan              179 drivers/dma/sun4i-dma.c 	return container_of(chan, struct sun4i_dma_vchan, vc.chan);
chan              187 drivers/dma/sun4i-dma.c static struct device *chan2dev(struct dma_chan *chan)
chan              189 drivers/dma/sun4i-dma.c 	return &chan->dev->device;
chan              210 drivers/dma/sun4i-dma.c static void sun4i_dma_free_chan_resources(struct dma_chan *chan)
chan              212 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              340 drivers/dma/sun4i-dma.c 		dev_dbg(chan2dev(&vchan->vc.chan),
chan              350 drivers/dma/sun4i-dma.c 			dev_dbg(chan2dev(&vchan->vc.chan),
chan              361 drivers/dma/sun4i-dma.c 			dev_dbg(chan2dev(&vchan->vc.chan),
chan              432 drivers/dma/sun4i-dma.c generate_ndma_promise(struct dma_chan *chan, dma_addr_t src, dma_addr_t dest,
chan              453 drivers/dma/sun4i-dma.c 	dev_dbg(chan2dev(chan),
chan              499 drivers/dma/sun4i-dma.c generate_ddma_promise(struct dma_chan *chan, dma_addr_t src, dma_addr_t dest,
chan              611 drivers/dma/sun4i-dma.c sun4i_dma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest,
chan              614 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              634 drivers/dma/sun4i-dma.c 		promise = generate_ddma_promise(chan, src, dest, len, sconfig);
chan              636 drivers/dma/sun4i-dma.c 		promise = generate_ndma_promise(chan, src, dest, len, sconfig,
chan              661 drivers/dma/sun4i-dma.c sun4i_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf, size_t len,
chan              665 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              674 drivers/dma/sun4i-dma.c 		dev_err(chan2dev(chan), "Invalid DMA direction\n");
chan              685 drivers/dma/sun4i-dma.c 		dev_err(chan2dev(chan),
chan              750 drivers/dma/sun4i-dma.c 		promise = generate_ndma_promise(chan, src, dest,
chan              767 drivers/dma/sun4i-dma.c sun4i_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              771 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              785 drivers/dma/sun4i-dma.c 		dev_err(chan2dev(chan), "Invalid DMA direction\n");
chan              837 drivers/dma/sun4i-dma.c 			promise = generate_ddma_promise(chan, srcaddr, dstaddr,
chan              841 drivers/dma/sun4i-dma.c 			promise = generate_ndma_promise(chan, srcaddr, dstaddr,
chan              862 drivers/dma/sun4i-dma.c static int sun4i_dma_terminate_all(struct dma_chan *chan)
chan              864 drivers/dma/sun4i-dma.c 	struct sun4i_dma_dev *priv = to_sun4i_dma_dev(chan->device);
chan              865 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              897 drivers/dma/sun4i-dma.c static int sun4i_dma_config(struct dma_chan *chan,
chan              900 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              912 drivers/dma/sun4i-dma.c 	struct dma_chan *chan;
chan              925 drivers/dma/sun4i-dma.c 	chan = dma_get_any_slave_channel(&priv->slave);
chan              926 drivers/dma/sun4i-dma.c 	if (!chan)
chan              930 drivers/dma/sun4i-dma.c 	vchan = to_sun4i_dma_vchan(chan);
chan              934 drivers/dma/sun4i-dma.c 	return chan;
chan              937 drivers/dma/sun4i-dma.c static enum dma_status sun4i_dma_tx_status(struct dma_chan *chan,
chan              941 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              950 drivers/dma/sun4i-dma.c 	ret = dma_cookie_status(chan, cookie, state);
chan              986 drivers/dma/sun4i-dma.c static void sun4i_dma_issue_pending(struct dma_chan *chan)
chan              988 drivers/dma/sun4i-dma.c 	struct sun4i_dma_dev *priv = to_sun4i_dma_dev(chan->device);
chan              989 drivers/dma/sun4i-dma.c 	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);
chan              205 drivers/dma/sun6i-dma.c static struct device *chan2dev(struct dma_chan *chan)
chan              207 drivers/dma/sun6i-dma.c 	return &chan->dev->device;
chan              215 drivers/dma/sun6i-dma.c static inline struct sun6i_vchan *to_sun6i_vchan(struct dma_chan *chan)
chan              217 drivers/dma/sun6i-dma.c 	return container_of(chan, struct sun6i_vchan, vc.chan);
chan              392 drivers/dma/sun6i-dma.c 	dev_dbg(chan2dev(&vchan->vc.chan),
chan              404 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(vd->tx.chan->device);
chan              429 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(vchan->vc.chan.device);
chan              478 drivers/dma/sun6i-dma.c 	list_for_each_entry(vchan, &sdev->slave.channels, vc.chan.device_node) {
chan              630 drivers/dma/sun6i-dma.c 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              633 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              634 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              640 drivers/dma/sun6i-dma.c 	dev_dbg(chan2dev(chan),
chan              642 drivers/dma/sun6i-dma.c 		__func__, vchan->vc.chan.chan_id, &dest, &src, len, flags);
chan              683 drivers/dma/sun6i-dma.c 		struct dma_chan *chan, struct scatterlist *sgl,
chan              687 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              688 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              702 drivers/dma/sun6i-dma.c 		dev_err(chan2dev(chan), "Invalid DMA configuration\n");
chan              725 drivers/dma/sun6i-dma.c 			dev_dbg(chan2dev(chan),
chan              727 drivers/dma/sun6i-dma.c 				__func__, vchan->vc.chan.chan_id,
chan              738 drivers/dma/sun6i-dma.c 			dev_dbg(chan2dev(chan),
chan              740 drivers/dma/sun6i-dma.c 				__func__, vchan->vc.chan.chan_id,
chan              748 drivers/dma/sun6i-dma.c 	dev_dbg(chan2dev(chan), "First: %pad\n", &txd->p_lli);
chan              762 drivers/dma/sun6i-dma.c 					struct dma_chan *chan,
chan              769 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              770 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              781 drivers/dma/sun6i-dma.c 		dev_err(chan2dev(chan), "Invalid DMA configuration\n");
chan              829 drivers/dma/sun6i-dma.c static int sun6i_dma_config(struct dma_chan *chan,
chan              832 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              839 drivers/dma/sun6i-dma.c static int sun6i_dma_pause(struct dma_chan *chan)
chan              841 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              842 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              845 drivers/dma/sun6i-dma.c 	dev_dbg(chan2dev(chan), "vchan %p: pause\n", &vchan->vc);
chan              859 drivers/dma/sun6i-dma.c static int sun6i_dma_resume(struct dma_chan *chan)
chan              861 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              862 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              866 drivers/dma/sun6i-dma.c 	dev_dbg(chan2dev(chan), "vchan %p: resume\n", &vchan->vc);
chan              884 drivers/dma/sun6i-dma.c static int sun6i_dma_terminate_all(struct dma_chan *chan)
chan              886 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              887 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              927 drivers/dma/sun6i-dma.c static enum dma_status sun6i_dma_tx_status(struct dma_chan *chan,
chan              931 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              940 drivers/dma/sun6i-dma.c 	ret = dma_cookie_status(chan, cookie, state);
chan              965 drivers/dma/sun6i-dma.c static void sun6i_dma_issue_pending(struct dma_chan *chan)
chan              967 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              968 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan              979 drivers/dma/sun6i-dma.c 			dev_dbg(chan2dev(chan), "vchan %p: issued\n",
chan              985 drivers/dma/sun6i-dma.c 		dev_dbg(chan2dev(chan), "vchan %p: nothing to issue\n",
chan              992 drivers/dma/sun6i-dma.c static void sun6i_dma_free_chan_resources(struct dma_chan *chan)
chan              994 drivers/dma/sun6i-dma.c 	struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(chan->device);
chan              995 drivers/dma/sun6i-dma.c 	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
chan             1010 drivers/dma/sun6i-dma.c 	struct dma_chan *chan;
chan             1016 drivers/dma/sun6i-dma.c 	chan = dma_get_any_slave_channel(&sdev->slave);
chan             1017 drivers/dma/sun6i-dma.c 	if (!chan)
chan             1020 drivers/dma/sun6i-dma.c 	vchan = to_sun6i_vchan(chan);
chan             1023 drivers/dma/sun6i-dma.c 	return chan;
chan             1049 drivers/dma/sun6i-dma.c 		list_del(&vchan->vc.chan.device_node);
chan              709 drivers/dma/tegra20-apb-dma.c 	struct tegra_dma_channel *tdc = to_tegra_dma_chan(txd->chan);
chan             1323 drivers/dma/tegra20-apb-dma.c 	struct dma_chan *chan;
chan             1331 drivers/dma/tegra20-apb-dma.c 	chan = dma_get_any_slave_channel(&tdma->dma_dev);
chan             1332 drivers/dma/tegra20-apb-dma.c 	if (!chan)
chan             1335 drivers/dma/tegra20-apb-dma.c 	tdc = to_tegra_dma_chan(chan);
chan             1338 drivers/dma/tegra20-apb-dma.c 	return chan;
chan              192 drivers/dma/tegra210-adma.c 	return container_of(dc, struct tegra_adma_chan, vc.chan);
chan              278 drivers/dma/tegra210-adma.c 			 dma_chan_name(&tdc->vc.chan));
chan              306 drivers/dma/tegra210-adma.c 			 dma_chan_name(&tdc->vc.chan));
chan              665 drivers/dma/tegra210-adma.c 	dma_cookie_init(&tdc->vc.chan);
chan              689 drivers/dma/tegra210-adma.c 	struct dma_chan *chan;
chan              702 drivers/dma/tegra210-adma.c 	chan = dma_get_any_slave_channel(&tdma->dma_dev);
chan              703 drivers/dma/tegra210-adma.c 	if (!chan)
chan              706 drivers/dma/tegra210-adma.c 	tdc = to_tegra_adma_chan(chan);
chan              709 drivers/dma/tegra210-adma.c 	return chan;
chan               86 drivers/dma/ti/cppi41.c 	struct dma_chan chan;
chan              251 drivers/dma/ti/cppi41.c 	return container_of(c, struct cppi41_channel, chan);
chan              371 drivers/dma/ti/cppi41.c static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
chan              373 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              386 drivers/dma/ti/cppi41.c 	dma_cookie_init(chan);
chan              387 drivers/dma/ti/cppi41.c 	dma_async_tx_descriptor_init(&c->txd, chan);
chan              399 drivers/dma/ti/cppi41.c static void cppi41_dma_free_chan_resources(struct dma_chan *chan)
chan              401 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              418 drivers/dma/ti/cppi41.c static enum dma_status cppi41_dma_tx_status(struct dma_chan *chan,
chan              421 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              424 drivers/dma/ti/cppi41.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              490 drivers/dma/ti/cppi41.c static void cppi41_dma_issue_pending(struct dma_chan *chan)
chan              492 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              585 drivers/dma/ti/cppi41.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned sg_len,
chan              588 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              736 drivers/dma/ti/cppi41.c static int cppi41_stop_chan(struct dma_chan *chan)
chan              738 drivers/dma/ti/cppi41.c 	struct cppi41_channel *c = to_cpp41_chan(chan);
chan              807 drivers/dma/ti/cppi41.c 		cchan->chan.device = &cdd->ddev;
chan              808 drivers/dma/ti/cppi41.c 		list_add_tail(&cchan->chan.device_node, &cdd->ddev.channels);
chan              946 drivers/dma/ti/cppi41.c static bool cpp41_dma_filter_fn(struct dma_chan *chan, void *param)
chan              953 drivers/dma/ti/cppi41.c 	if (chan->device->dev->driver != &cpp41_dma_driver.driver)
chan              956 drivers/dma/ti/cppi41.c 	cchan = to_cpp41_chan(chan);
chan             1198 drivers/dma/ti/cppi41.c 	list_for_each_entry(c, &cdd->ddev.channels, chan.device_node)
chan              748 drivers/dma/ti/edma.c 	return container_of(c, struct edma_chan, vchan.chan);
chan              767 drivers/dma/ti/edma.c 	struct device *dev = echan->vchan.chan.device->dev;
chan              855 drivers/dma/ti/edma.c static int edma_terminate_all(struct dma_chan *chan)
chan              857 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              885 drivers/dma/ti/edma.c static void edma_synchronize(struct dma_chan *chan)
chan              887 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              892 drivers/dma/ti/edma.c static int edma_slave_config(struct dma_chan *chan,
chan              895 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              901 drivers/dma/ti/edma.c 	if (cfg->src_maxburst > chan->device->max_burst ||
chan              902 drivers/dma/ti/edma.c 	    cfg->dst_maxburst > chan->device->max_burst)
chan              910 drivers/dma/ti/edma.c static int edma_dma_pause(struct dma_chan *chan)
chan              912 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              921 drivers/dma/ti/edma.c static int edma_dma_resume(struct dma_chan *chan)
chan              923 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              940 drivers/dma/ti/edma.c static int edma_config_pset(struct dma_chan *chan, struct edma_pset *epset,
chan              945 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan              946 drivers/dma/ti/edma.c 	struct device *dev = chan->device->dev;
chan             1054 drivers/dma/ti/edma.c 	struct dma_chan *chan, struct scatterlist *sgl,
chan             1058 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1059 drivers/dma/ti/edma.c 	struct device *dev = chan->device->dev;
chan             1121 drivers/dma/ti/edma.c 		ret = edma_config_pset(chan, &edesc->pset[i], src_addr,
chan             1150 drivers/dma/ti/edma.c 	struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan             1155 drivers/dma/ti/edma.c 	struct device *dev = chan->device->dev;
chan             1156 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1214 drivers/dma/ti/edma.c 	ret = edma_config_pset(chan, &edesc->pset[0], src, dest, 1,
chan             1246 drivers/dma/ti/edma.c 		ret = edma_config_pset(chan, &edesc->pset[1], src, dest, 1,
chan             1266 drivers/dma/ti/edma.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan             1270 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1271 drivers/dma/ti/edma.c 	struct device *dev = chan->device->dev;
chan             1365 drivers/dma/ti/edma.c 		ret = edma_config_pset(chan, &edesc->pset[i], src_addr,
chan             1424 drivers/dma/ti/edma.c 	struct device *dev = echan->vchan.chan.device->dev;
chan             1508 drivers/dma/ti/edma.c 	struct device *dev = echan->vchan.chan.device->dev;
chan             1635 drivers/dma/ti/edma.c static int edma_alloc_chan_resources(struct dma_chan *chan)
chan             1637 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1668 drivers/dma/ti/edma.c 		EDMA_CHAN_SLOT(echan->ch_num), chan->chan_id,
chan             1679 drivers/dma/ti/edma.c static void edma_free_chan_resources(struct dma_chan *chan)
chan             1681 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1711 drivers/dma/ti/edma.c 		EDMA_CHAN_SLOT(echan->ch_num), chan->chan_id);
chan             1715 drivers/dma/ti/edma.c static void edma_issue_pending(struct dma_chan *chan)
chan             1717 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1774 drivers/dma/ti/edma.c 			dev_dbg_ratelimited(echan->vchan.chan.device->dev,
chan             1825 drivers/dma/ti/edma.c static enum dma_status edma_tx_status(struct dma_chan *chan,
chan             1829 drivers/dma/ti/edma.c 	struct edma_chan *echan = to_edma_chan(chan);
chan             1834 drivers/dma/ti/edma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan             2199 drivers/dma/ti/edma.c 	struct dma_chan *chan = NULL;
chan             2209 drivers/dma/ti/edma.c 			chan = &echan->vchan.chan;
chan             2214 drivers/dma/ti/edma.c 	if (!chan)
chan             2230 drivers/dma/ti/edma.c 	return dma_get_slave_channel(chan);
chan             2246 drivers/dma/ti/edma.c static bool edma_filter_fn(struct dma_chan *chan, void *param);
chan             2486 drivers/dma/ti/edma.c 			&dmadev->channels, vchan.chan.device_node) {
chan             2487 drivers/dma/ti/edma.c 		list_del(&echan->vchan.chan.device_node);
chan             2590 drivers/dma/ti/edma.c static bool edma_filter_fn(struct dma_chan *chan, void *param)
chan             2594 drivers/dma/ti/edma.c 	if (chan->device->dev->driver == &edma_driver.driver) {
chan             2595 drivers/dma/ti/edma.c 		struct edma_chan *echan = to_edma_chan(chan);
chan              206 drivers/dma/ti/omap-dma.c static bool omap_dma_filter_fn(struct dma_chan *chan, void *param);
chan              218 drivers/dma/ti/omap-dma.c 	return container_of(c, struct omap_chan, vc.chan);
chan              231 drivers/dma/ti/omap-dma.c 		struct omap_dmadev *od = to_omap_dma_dev(vd->tx.chan->device);
chan              389 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device);
chan              445 drivers/dma/ti/omap-dma.c 		dev_err(c->vc.chan.device->dev,
chan              452 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device);
chan              636 drivers/dma/ti/omap-dma.c static int omap_dma_alloc_chan_resources(struct dma_chan *chan)
chan              638 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan              639 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan              690 drivers/dma/ti/omap-dma.c static void omap_dma_free_chan_resources(struct dma_chan *chan)
chan              692 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan              693 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan              751 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device);
chan              763 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device);
chan              789 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(c->vc.chan.device);
chan              813 drivers/dma/ti/omap-dma.c static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
chan              816 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan              821 drivers/dma/ti/omap-dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              874 drivers/dma/ti/omap-dma.c static void omap_dma_issue_pending(struct dma_chan *chan)
chan              876 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan              886 drivers/dma/ti/omap-dma.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned sglen,
chan              889 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan              890 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan              911 drivers/dma/ti/omap-dma.c 		dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
chan             1038 drivers/dma/ti/omap-dma.c 				dev_err(chan->device->dev,
chan             1068 drivers/dma/ti/omap-dma.c 	struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan             1071 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan             1072 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1088 drivers/dma/ti/omap-dma.c 		dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
chan             1169 drivers/dma/ti/omap-dma.c 	struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan             1172 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1215 drivers/dma/ti/omap-dma.c 	struct dma_chan *chan, struct dma_interleaved_template *xt,
chan             1218 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1259 drivers/dma/ti/omap-dma.c 		dev_err(chan->device->dev,
chan             1274 drivers/dma/ti/omap-dma.c 		dev_err(chan->device->dev,
chan             1297 drivers/dma/ti/omap-dma.c static int omap_dma_slave_config(struct dma_chan *chan, struct dma_slave_config *cfg)
chan             1299 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1305 drivers/dma/ti/omap-dma.c 	if (cfg->src_maxburst > chan->device->max_burst ||
chan             1306 drivers/dma/ti/omap-dma.c 	    cfg->dst_maxburst > chan->device->max_burst)
chan             1314 drivers/dma/ti/omap-dma.c static int omap_dma_terminate_all(struct dma_chan *chan)
chan             1316 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1345 drivers/dma/ti/omap-dma.c static void omap_dma_synchronize(struct dma_chan *chan)
chan             1347 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1352 drivers/dma/ti/omap-dma.c static int omap_dma_pause(struct dma_chan *chan)
chan             1354 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1355 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan             1405 drivers/dma/ti/omap-dma.c static int omap_dma_resume(struct dma_chan *chan)
chan             1407 drivers/dma/ti/omap-dma.c 	struct omap_chan *c = to_omap_dma_chan(chan);
chan             1408 drivers/dma/ti/omap-dma.c 	struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan             1448 drivers/dma/ti/omap-dma.c 			struct omap_chan, vc.chan.device_node);
chan             1450 drivers/dma/ti/omap-dma.c 		list_del(&c->vc.chan.device_node);
chan             1659 drivers/dma/ti/omap-dma.c static bool omap_dma_filter_fn(struct dma_chan *chan, void *param)
chan             1661 drivers/dma/ti/omap-dma.c 	if (chan->device->dev->driver == &omap_dma_driver.driver) {
chan             1662 drivers/dma/ti/omap-dma.c 		struct omap_dmadev *od = to_omap_dma_dev(chan->device);
chan             1663 drivers/dma/ti/omap-dma.c 		struct omap_chan *c = to_omap_dma_chan(chan);
chan               71 drivers/dma/timb_dma.c 	struct dma_chan		chan;
chan               94 drivers/dma/timb_dma.c static struct device *chan2dev(struct dma_chan *chan)
chan               96 drivers/dma/timb_dma.c 	return &chan->dev->device;
chan               98 drivers/dma/timb_dma.c static struct device *chan2dmadev(struct dma_chan *chan)
chan              100 drivers/dma/timb_dma.c 	return chan2dev(chan)->parent->parent;
chan              105 drivers/dma/timb_dma.c 	int id = td_chan->chan.chan_id;
chan              113 drivers/dma/timb_dma.c 	int id = td_chan->chan.chan_id;
chan              120 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "Enabling irq: %d, IER: 0x%x\n", id,
chan              128 drivers/dma/timb_dma.c 	int id = td_chan->chan.chan_id;
chan              134 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "Checking irq: %d, td: %p\n", id, td);
chan              149 drivers/dma/timb_dma.c 		dev_err(chan2dev(&td_chan->chan), "Too big sg element\n");
chan              155 drivers/dma/timb_dma.c 		dev_err(chan2dev(&td_chan->chan), "Incorrect length: %d\n",
chan              160 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "desc: %p, addr: 0x%llx\n",
chan              183 drivers/dma/timb_dma.c 		dev_err(chan2dev(&td_chan->chan),
chan              191 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan),
chan              193 drivers/dma/timb_dma.c 		td_chan, td_chan->chan.chan_id, td_chan->membase);
chan              233 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "descriptor %u complete\n",
chan              287 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "%s: started %u\n",
chan              298 drivers/dma/timb_dma.c 	struct timb_dma_chan *td_chan = container_of(txd->chan,
chan              299 drivers/dma/timb_dma.c 		struct timb_dma_chan, chan);
chan              306 drivers/dma/timb_dma.c 		dev_dbg(chan2dev(txd->chan), "%s: started %u\n", __func__,
chan              311 drivers/dma/timb_dma.c 		dev_dbg(chan2dev(txd->chan), "tx_submit: queued %u\n",
chan              324 drivers/dma/timb_dma.c 	struct dma_chan *chan = &td_chan->chan;
chan              338 drivers/dma/timb_dma.c 	dma_async_tx_descriptor_init(&td_desc->txd, chan);
chan              342 drivers/dma/timb_dma.c 	td_desc->txd.phys = dma_map_single(chan2dmadev(chan),
chan              345 drivers/dma/timb_dma.c 	err = dma_mapping_error(chan2dmadev(chan), td_desc->txd.phys);
chan              347 drivers/dma/timb_dma.c 		dev_err(chan2dev(chan), "DMA mapping error: %d\n", err);
chan              362 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(td_desc->txd.chan), "Freeing desc: %p\n", td_desc);
chan              363 drivers/dma/timb_dma.c 	dma_unmap_single(chan2dmadev(td_desc->txd.chan), td_desc->txd.phys,
chan              373 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "Putting desc: %p\n", td_desc);
chan              393 drivers/dma/timb_dma.c 		dev_dbg(chan2dev(&td_chan->chan), "desc %p not ACKed\n",
chan              401 drivers/dma/timb_dma.c static int td_alloc_chan_resources(struct dma_chan *chan)
chan              404 drivers/dma/timb_dma.c 		container_of(chan, struct timb_dma_chan, chan);
chan              407 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: entry\n", __func__);
chan              416 drivers/dma/timb_dma.c 				dev_err(chan2dev(chan),
chan              426 drivers/dma/timb_dma.c 	dma_cookie_init(chan);
chan              432 drivers/dma/timb_dma.c static void td_free_chan_resources(struct dma_chan *chan)
chan              435 drivers/dma/timb_dma.c 		container_of(chan, struct timb_dma_chan, chan);
chan              439 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
chan              450 drivers/dma/timb_dma.c 		dev_dbg(chan2dev(chan), "%s: Freeing desc: %p\n", __func__,
chan              456 drivers/dma/timb_dma.c static enum dma_status td_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              461 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
chan              463 drivers/dma/timb_dma.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              465 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: exit, ret: %d\n", 	__func__, ret);
chan              470 drivers/dma/timb_dma.c static void td_issue_pending(struct dma_chan *chan)
chan              473 drivers/dma/timb_dma.c 		container_of(chan, struct timb_dma_chan, chan);
chan              475 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
chan              489 drivers/dma/timb_dma.c static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
chan              495 drivers/dma/timb_dma.c 		container_of(chan, struct timb_dma_chan, chan);
chan              502 drivers/dma/timb_dma.c 		dev_err(chan2dev(chan), "%s: No SG list\n", __func__);
chan              508 drivers/dma/timb_dma.c 		dev_err(chan2dev(chan),
chan              515 drivers/dma/timb_dma.c 		dev_err(chan2dev(chan), "Not enough descriptors available\n");
chan              524 drivers/dma/timb_dma.c 			dev_err(chan2dev(chan), "No descriptor space\n");
chan              531 drivers/dma/timb_dma.c 			dev_err(chan2dev(chan), "Failed to update desc: %d\n",
chan              539 drivers/dma/timb_dma.c 	dma_sync_single_for_device(chan2dmadev(chan), td_desc->txd.phys,
chan              545 drivers/dma/timb_dma.c static int td_terminate_all(struct dma_chan *chan)
chan              548 drivers/dma/timb_dma.c 		container_of(chan, struct timb_dma_chan, chan);
chan              551 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);
chan              695 drivers/dma/timb_dma.c 		td_chan->chan.device = &td->dma;
chan              696 drivers/dma/timb_dma.c 		dma_cookie_init(&td_chan->chan);
chan              715 drivers/dma/timb_dma.c 		list_add_tail(&td_chan->chan.device_node, &td->dma.channels);
chan               19 drivers/dma/txx9dmac.c static struct txx9dmac_chan *to_txx9dmac_chan(struct dma_chan *chan)
chan               21 drivers/dma/txx9dmac.c 	return container_of(chan, struct txx9dmac_chan, chan);
chan              129 drivers/dma/txx9dmac.c static struct device *chan2dev(struct dma_chan *chan)
chan              131 drivers/dma/txx9dmac.c 	return &chan->dev->device;
chan              133 drivers/dma/txx9dmac.c static struct device *chan2parent(struct dma_chan *chan)
chan              135 drivers/dma/txx9dmac.c 	return chan->dev->device.parent;
chan              199 drivers/dma/txx9dmac.c 	dma_async_tx_descriptor_init(&desc->txd, &dc->chan);
chan              203 drivers/dma/txx9dmac.c 	desc->txd.phys = dma_map_single(chan2parent(&dc->chan), &desc->hwdesc,
chan              221 drivers/dma/txx9dmac.c 		dev_dbg(chan2dev(&dc->chan), "desc %p not ACKed\n", desc);
chan              226 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "scanned %u descriptors on freelist\n",
chan              235 drivers/dma/txx9dmac.c 			dev_err(chan2dev(&dc->chan),
chan              248 drivers/dma/txx9dmac.c 		dma_sync_single_for_cpu(chan2parent(&dc->chan),
chan              251 drivers/dma/txx9dmac.c 	dma_sync_single_for_cpu(chan2parent(&dc->chan),
chan              270 drivers/dma/txx9dmac.c 			dev_vdbg(chan2dev(&dc->chan),
chan              274 drivers/dma/txx9dmac.c 		dev_vdbg(chan2dev(&dc->chan), "moving desc %p to freelist\n",
chan              286 drivers/dma/txx9dmac.c 		dev_err(chan2dev(&dc->chan),
chan              298 drivers/dma/txx9dmac.c 		dev_err(chan2dev(&dc->chan),
chan              333 drivers/dma/txx9dmac.c 	struct txx9dmac_slave *ds = dc->chan.private;
chan              336 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "dostart %u %p\n",
chan              340 drivers/dma/txx9dmac.c 		dev_err(chan2dev(&dc->chan),
chan              405 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "descriptor %u %p complete\n",
chan              435 drivers/dma/txx9dmac.c 			dma_sync_single_for_device(chan2parent(&dc->chan),
chan              472 drivers/dma/txx9dmac.c 		dev_crit(chan2dev(&dc->chan),
chan              476 drivers/dma/txx9dmac.c 		dev_crit(chan2dev(&dc->chan),
chan              485 drivers/dma/txx9dmac.c 		dev_crit(chan2dev(&dc->chan),
chan              489 drivers/dma/txx9dmac.c 		dev_crit(chan2dev(&dc->chan),
chan              509 drivers/dma/txx9dmac.c 	dev_crit(chan2dev(&dc->chan), "Abnormal Chain Completion\n");
chan              526 drivers/dma/txx9dmac.c 	dev_crit(chan2dev(&dc->chan),
chan              561 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "scan_descriptors: char=%#llx\n",
chan              592 drivers/dma/txx9dmac.c 	dev_err(chan2dev(&dc->chan),
chan              612 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr);
chan              628 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(&dc->chan), "interrupt: status=%#x\n",
chan              652 drivers/dma/txx9dmac.c 	dev_vdbg(ddev->chan[0]->dma.dev, "tasklet: mcr=%x\n", mcr);
chan              655 drivers/dma/txx9dmac.c 			dc = ddev->chan[i];
chan              657 drivers/dma/txx9dmac.c 			dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n",
chan              675 drivers/dma/txx9dmac.c 	dev_vdbg(ddev->chan[0]->dma.dev, "interrupt: status=%#x\n",
chan              693 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(tx->chan);
chan              699 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(tx->chan), "tx_submit: queued %u %p\n",
chan              709 drivers/dma/txx9dmac.c txx9dmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              712 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              720 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(chan), "prep_dma_memcpy d%#llx s%#llx l%#zx f%#lx\n",
chan              724 drivers/dma/txx9dmac.c 		dev_dbg(chan2dev(chan), "prep_dma_memcpy: length is zero!\n");
chan              779 drivers/dma/txx9dmac.c 			dma_sync_single_for_device(chan2parent(&dc->chan),
chan              792 drivers/dma/txx9dmac.c 	dma_sync_single_for_device(chan2parent(&dc->chan),
chan              803 drivers/dma/txx9dmac.c txx9dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              807 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              809 drivers/dma/txx9dmac.c 	struct txx9dmac_slave *ds = chan->private;
chan              815 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(chan), "prep_dma_slave\n");
chan              873 drivers/dma/txx9dmac.c 			dma_sync_single_for_device(chan2parent(&dc->chan),
chan              887 drivers/dma/txx9dmac.c 	dma_sync_single_for_device(chan2parent(&dc->chan),
chan              897 drivers/dma/txx9dmac.c static int txx9dmac_terminate_all(struct dma_chan *chan)
chan              899 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              903 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(chan), "terminate_all\n");
chan              922 drivers/dma/txx9dmac.c txx9dmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
chan              925 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              928 drivers/dma/txx9dmac.c 	ret = dma_cookie_status(chan, cookie, txstate);
chan              936 drivers/dma/txx9dmac.c 	return dma_cookie_status(chan, cookie, txstate);
chan              950 drivers/dma/txx9dmac.c 	dma_sync_single_for_device(chan2parent(&dc->chan),
chan              960 drivers/dma/txx9dmac.c static void txx9dmac_issue_pending(struct dma_chan *chan)
chan              962 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              984 drivers/dma/txx9dmac.c static int txx9dmac_alloc_chan_resources(struct dma_chan *chan)
chan              986 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan              987 drivers/dma/txx9dmac.c 	struct txx9dmac_slave *ds = chan->private;
chan              991 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(chan), "alloc_chan_resources\n");
chan              995 drivers/dma/txx9dmac.c 		dev_dbg(chan2dev(chan), "DMA channel not idle?\n");
chan              999 drivers/dma/txx9dmac.c 	dma_cookie_init(chan);
chan             1005 drivers/dma/txx9dmac.c 	if (chan->device->device_prep_dma_memcpy) {
chan             1025 drivers/dma/txx9dmac.c 			dev_info(chan2dev(chan),
chan             1037 drivers/dma/txx9dmac.c 	dev_dbg(chan2dev(chan),
chan             1043 drivers/dma/txx9dmac.c static void txx9dmac_free_chan_resources(struct dma_chan *chan)
chan             1045 drivers/dma/txx9dmac.c 	struct txx9dmac_chan *dc = to_txx9dmac_chan(chan);
chan             1050 drivers/dma/txx9dmac.c 	dev_dbg(chan2dev(chan), "free_chan_resources (descs allocated=%u)\n",
chan             1064 drivers/dma/txx9dmac.c 		dev_vdbg(chan2dev(chan), "  freeing descriptor %p\n", desc);
chan             1065 drivers/dma/txx9dmac.c 		dma_unmap_single(chan2parent(chan), desc->txd.phys,
chan             1070 drivers/dma/txx9dmac.c 	dev_vdbg(chan2dev(chan), "free_chan_resources done\n");
chan             1125 drivers/dma/txx9dmac.c 	dc->ddev->chan[ch] = dc;
chan             1126 drivers/dma/txx9dmac.c 	dc->chan.device = &dc->dma;
chan             1127 drivers/dma/txx9dmac.c 	list_add_tail(&dc->chan.device_node, &dc->chan.device->channels);
chan             1128 drivers/dma/txx9dmac.c 	dma_cookie_init(&dc->chan);
chan             1165 drivers/dma/txx9dmac.c 	dc->ddev->chan[pdev->id % TXX9_DMA_MAX_NR_CHANNELS] = NULL;
chan              161 drivers/dma/txx9dmac.h 	struct dma_chan		chan;
chan              183 drivers/dma/txx9dmac.h 	struct txx9dmac_chan	*chan[TXX9_DMA_MAX_NR_CHANNELS];
chan              224 drivers/dma/uniphier-mdmac.c static void uniphier_mdmac_free_chan_resources(struct dma_chan *chan)
chan              226 drivers/dma/uniphier-mdmac.c 	vchan_free_chan_resources(to_virt_chan(chan));
chan              230 drivers/dma/uniphier-mdmac.c uniphier_mdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
chan              235 drivers/dma/uniphier-mdmac.c 	struct virt_dma_chan *vc = to_virt_chan(chan);
chan              252 drivers/dma/uniphier-mdmac.c static int uniphier_mdmac_terminate_all(struct dma_chan *chan)
chan              254 drivers/dma/uniphier-mdmac.c 	struct virt_dma_chan *vc = to_virt_chan(chan);
chan              276 drivers/dma/uniphier-mdmac.c static void uniphier_mdmac_synchronize(struct dma_chan *chan)
chan              278 drivers/dma/uniphier-mdmac.c 	vchan_synchronize(to_virt_chan(chan));
chan              281 drivers/dma/uniphier-mdmac.c static enum dma_status uniphier_mdmac_tx_status(struct dma_chan *chan,
chan              293 drivers/dma/uniphier-mdmac.c 	stat = dma_cookie_status(chan, cookie, txstate);
chan              298 drivers/dma/uniphier-mdmac.c 	vc = to_virt_chan(chan);
chan              328 drivers/dma/uniphier-mdmac.c static void uniphier_mdmac_issue_pending(struct dma_chan *chan)
chan              330 drivers/dma/uniphier-mdmac.c 	struct virt_dma_chan *vc = to_virt_chan(chan);
chan              461 drivers/dma/uniphier-mdmac.c 	struct dma_chan *chan;
chan              471 drivers/dma/uniphier-mdmac.c 	list_for_each_entry(chan, &mdev->ddev.channels, device_node) {
chan              472 drivers/dma/uniphier-mdmac.c 		ret = dmaengine_terminate_sync(chan);
chan              475 drivers/dma/uniphier-mdmac.c 		uniphier_mdmac_free_chan_resources(chan);
chan               21 drivers/dma/virt-dma.c 	struct virt_dma_chan *vc = to_virt_chan(tx->chan);
chan               32 drivers/dma/virt-dma.c 	dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: submitted\n",
chan               51 drivers/dma/virt-dma.c 	struct virt_dma_chan *vc = to_virt_chan(tx->chan);
chan               59 drivers/dma/virt-dma.c 	dev_dbg(vc->chan.device->dev, "vchan %p: txd %p[%x]: freeing\n",
chan              120 drivers/dma/virt-dma.c 			dev_dbg(vc->chan.device->dev, "txd %p: freeing\n", vd);
chan              130 drivers/dma/virt-dma.c 	dma_cookie_init(&vc->chan);
chan              140 drivers/dma/virt-dma.c 	vc->chan.device = dmadev;
chan              141 drivers/dma/virt-dma.c 	list_add_tail(&vc->chan.device_node, &dmadev->channels);
chan               23 drivers/dma/virt-dma.h 	struct dma_chan	chan;
chan               39 drivers/dma/virt-dma.h static inline struct virt_dma_chan *to_virt_chan(struct dma_chan *chan)
chan               41 drivers/dma/virt-dma.h 	return container_of(chan, struct virt_dma_chan, chan);
chan               61 drivers/dma/virt-dma.h 	dma_async_tx_descriptor_init(&vd->tx, &vc->chan);
chan               96 drivers/dma/virt-dma.h 	struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan);
chan              101 drivers/dma/virt-dma.h 	dev_vdbg(vc->chan.device->dev, "txd %p[%x]: marked complete\n",
chan              114 drivers/dma/virt-dma.h 	struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan);
chan              128 drivers/dma/virt-dma.h 	struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan);
chan              142 drivers/dma/virt-dma.h 	struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan);
chan              193 drivers/dma/xgene-dma.c #define chan_dbg(chan, fmt, arg...)	\
chan              194 drivers/dma/xgene-dma.c 	dev_dbg(chan->dev, "%s: " fmt, chan->name, ##arg)
chan              195 drivers/dma/xgene-dma.c #define chan_err(chan, fmt, arg...)	\
chan              196 drivers/dma/xgene-dma.c 	dev_err(chan->dev, "%s: " fmt, chan->name, ##arg)
chan              309 drivers/dma/xgene-dma.c 	struct xgene_dma_chan chan[XGENE_DMA_MAX_CHANNEL];
chan              411 drivers/dma/xgene-dma.c static void xgene_dma_prep_xor_desc(struct xgene_dma_chan *chan,
chan              425 drivers/dma/xgene-dma.c 	xgene_dma_init_desc(desc1, chan->tx_ring.dst_ring_num);
chan              457 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan              463 drivers/dma/xgene-dma.c 	chan = to_dma_chan(tx->chan);
chan              466 drivers/dma/xgene-dma.c 	spin_lock_bh(&chan->lock);
chan              471 drivers/dma/xgene-dma.c 	list_splice_tail_init(&desc->tx_list, &chan->ld_pending);
chan              473 drivers/dma/xgene-dma.c 	spin_unlock_bh(&chan->lock);
chan              478 drivers/dma/xgene-dma.c static void xgene_dma_clean_descriptor(struct xgene_dma_chan *chan,
chan              482 drivers/dma/xgene-dma.c 	chan_dbg(chan, "LD %p free\n", desc);
chan              483 drivers/dma/xgene-dma.c 	dma_pool_free(chan->desc_pool, desc, desc->tx.phys);
chan              487 drivers/dma/xgene-dma.c 				 struct xgene_dma_chan *chan)
chan              492 drivers/dma/xgene-dma.c 	desc = dma_pool_zalloc(chan->desc_pool, GFP_NOWAIT, &phys);
chan              494 drivers/dma/xgene-dma.c 		chan_err(chan, "Failed to allocate LDs\n");
chan              501 drivers/dma/xgene-dma.c 	dma_async_tx_descriptor_init(&desc->tx, &chan->dma_chan);
chan              503 drivers/dma/xgene-dma.c 	chan_dbg(chan, "LD %p allocated\n", desc);
chan              515 drivers/dma/xgene-dma.c static void xgene_dma_clean_completed_descriptor(struct xgene_dma_chan *chan)
chan              520 drivers/dma/xgene-dma.c 	list_for_each_entry_safe(desc, _desc, &chan->ld_completed, node) {
chan              522 drivers/dma/xgene-dma.c 			xgene_dma_clean_descriptor(chan, desc);
chan              534 drivers/dma/xgene-dma.c static void xgene_dma_run_tx_complete_actions(struct xgene_dma_chan *chan,
chan              568 drivers/dma/xgene-dma.c static void xgene_dma_clean_running_descriptor(struct xgene_dma_chan *chan,
chan              583 drivers/dma/xgene-dma.c 		list_add_tail(&desc->node, &chan->ld_completed);
chan              587 drivers/dma/xgene-dma.c 	chan_dbg(chan, "LD %p free\n", desc);
chan              588 drivers/dma/xgene-dma.c 	dma_pool_free(chan->desc_pool, desc, desc->tx.phys);
chan              591 drivers/dma/xgene-dma.c static void xgene_chan_xfer_request(struct xgene_dma_chan *chan,
chan              594 drivers/dma/xgene-dma.c 	struct xgene_dma_ring *ring = &chan->tx_ring;
chan              624 drivers/dma/xgene-dma.c 	chan->pending += ((desc_sw->flags &
chan              638 drivers/dma/xgene-dma.c static void xgene_chan_xfer_ld_pending(struct xgene_dma_chan *chan)
chan              646 drivers/dma/xgene-dma.c 	if (list_empty(&chan->ld_pending)) {
chan              647 drivers/dma/xgene-dma.c 		chan_dbg(chan, "No pending LDs\n");
chan              655 drivers/dma/xgene-dma.c 	list_for_each_entry_safe(desc_sw, _desc_sw, &chan->ld_pending, node) {
chan              662 drivers/dma/xgene-dma.c 		if (chan->pending >= chan->max_outstanding)
chan              665 drivers/dma/xgene-dma.c 		xgene_chan_xfer_request(chan, desc_sw);
chan              671 drivers/dma/xgene-dma.c 		list_move_tail(&desc_sw->node, &chan->ld_running);
chan              684 drivers/dma/xgene-dma.c static void xgene_dma_cleanup_descriptors(struct xgene_dma_chan *chan)
chan              686 drivers/dma/xgene-dma.c 	struct xgene_dma_ring *ring = &chan->rx_ring;
chan              694 drivers/dma/xgene-dma.c 	spin_lock(&chan->lock);
chan              697 drivers/dma/xgene-dma.c 	xgene_dma_clean_completed_descriptor(chan);
chan              700 drivers/dma/xgene-dma.c 	list_for_each_entry_safe(desc_sw, _desc_sw, &chan->ld_running, node) {
chan              720 drivers/dma/xgene-dma.c 			chan_err(chan, "%s\n", xgene_dma_desc_err[status]);
chan              746 drivers/dma/xgene-dma.c 		chan->pending -= ((desc_sw->flags &
chan              761 drivers/dma/xgene-dma.c 	xgene_chan_xfer_ld_pending(chan);
chan              763 drivers/dma/xgene-dma.c 	spin_unlock(&chan->lock);
chan              767 drivers/dma/xgene-dma.c 		xgene_dma_run_tx_complete_actions(chan, desc_sw);
chan              768 drivers/dma/xgene-dma.c 		xgene_dma_clean_running_descriptor(chan, desc_sw);
chan              774 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = to_dma_chan(dchan);
chan              777 drivers/dma/xgene-dma.c 	if (chan->desc_pool)
chan              780 drivers/dma/xgene-dma.c 	chan->desc_pool = dma_pool_create(chan->name, chan->dev,
chan              783 drivers/dma/xgene-dma.c 	if (!chan->desc_pool) {
chan              784 drivers/dma/xgene-dma.c 		chan_err(chan, "Failed to allocate descriptor pool\n");
chan              788 drivers/dma/xgene-dma.c 	chan_dbg(chan, "Allocate descriptor pool\n");
chan              800 drivers/dma/xgene-dma.c static void xgene_dma_free_desc_list(struct xgene_dma_chan *chan,
chan              806 drivers/dma/xgene-dma.c 		xgene_dma_clean_descriptor(chan, desc);
chan              811 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = to_dma_chan(dchan);
chan              813 drivers/dma/xgene-dma.c 	chan_dbg(chan, "Free all resources\n");
chan              815 drivers/dma/xgene-dma.c 	if (!chan->desc_pool)
chan              819 drivers/dma/xgene-dma.c 	xgene_dma_cleanup_descriptors(chan);
chan              821 drivers/dma/xgene-dma.c 	spin_lock_bh(&chan->lock);
chan              824 drivers/dma/xgene-dma.c 	xgene_dma_free_desc_list(chan, &chan->ld_pending);
chan              825 drivers/dma/xgene-dma.c 	xgene_dma_free_desc_list(chan, &chan->ld_running);
chan              826 drivers/dma/xgene-dma.c 	xgene_dma_free_desc_list(chan, &chan->ld_completed);
chan              828 drivers/dma/xgene-dma.c 	spin_unlock_bh(&chan->lock);
chan              831 drivers/dma/xgene-dma.c 	dma_pool_destroy(chan->desc_pool);
chan              832 drivers/dma/xgene-dma.c 	chan->desc_pool = NULL;
chan              840 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan              847 drivers/dma/xgene-dma.c 	chan = to_dma_chan(dchan);
chan              851 drivers/dma/xgene-dma.c 		new = xgene_dma_alloc_descriptor(chan);
chan              856 drivers/dma/xgene-dma.c 		xgene_dma_prep_xor_desc(chan, new, &dst, src,
chan              879 drivers/dma/xgene-dma.c 	xgene_dma_free_desc_list(chan, &first->tx_list);
chan              888 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan              896 drivers/dma/xgene-dma.c 	chan = to_dma_chan(dchan);
chan              913 drivers/dma/xgene-dma.c 		new = xgene_dma_alloc_descriptor(chan);
chan              931 drivers/dma/xgene-dma.c 			xgene_dma_prep_xor_desc(chan, new, &dst[0], src,
chan              941 drivers/dma/xgene-dma.c 			xgene_dma_prep_xor_desc(chan, new, &dst[1], _src,
chan              956 drivers/dma/xgene-dma.c 	xgene_dma_free_desc_list(chan, &first->tx_list);
chan              962 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = to_dma_chan(dchan);
chan              964 drivers/dma/xgene-dma.c 	spin_lock_bh(&chan->lock);
chan              965 drivers/dma/xgene-dma.c 	xgene_chan_xfer_ld_pending(chan);
chan              966 drivers/dma/xgene-dma.c 	spin_unlock_bh(&chan->lock);
chan              978 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = (struct xgene_dma_chan *)data;
chan              981 drivers/dma/xgene-dma.c 	xgene_dma_cleanup_descriptors(chan);
chan              984 drivers/dma/xgene-dma.c 	enable_irq(chan->rx_irq);
chan              989 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = (struct xgene_dma_chan *)id;
chan              991 drivers/dma/xgene-dma.c 	BUG_ON(!chan);
chan              997 drivers/dma/xgene-dma.c 	disable_irq_nosync(chan->rx_irq);
chan             1004 drivers/dma/xgene-dma.c 	tasklet_schedule(&chan->tasklet);
chan             1133 drivers/dma/xgene-dma.c static int xgene_dma_get_ring_size(struct xgene_dma_chan *chan,
chan             1155 drivers/dma/xgene-dma.c 		chan_err(chan, "Unsupported cfg ring size %d\n", cfgsize);
chan             1175 drivers/dma/xgene-dma.c static void xgene_dma_delete_chan_rings(struct xgene_dma_chan *chan)
chan             1177 drivers/dma/xgene-dma.c 	xgene_dma_delete_ring_one(&chan->rx_ring);
chan             1178 drivers/dma/xgene-dma.c 	xgene_dma_delete_ring_one(&chan->tx_ring);
chan             1181 drivers/dma/xgene-dma.c static int xgene_dma_create_ring_one(struct xgene_dma_chan *chan,
chan             1188 drivers/dma/xgene-dma.c 	ring->pdma = chan->pdma;
chan             1190 drivers/dma/xgene-dma.c 	ring->num = chan->pdma->ring_num++;
chan             1193 drivers/dma/xgene-dma.c 	ret = xgene_dma_get_ring_size(chan, cfgsize);
chan             1199 drivers/dma/xgene-dma.c 	ring->desc_vaddr = dma_alloc_coherent(chan->dev, ring->size,
chan             1202 drivers/dma/xgene-dma.c 		chan_err(chan, "Failed to allocate ring desc\n");
chan             1213 drivers/dma/xgene-dma.c static int xgene_dma_create_chan_rings(struct xgene_dma_chan *chan)
chan             1215 drivers/dma/xgene-dma.c 	struct xgene_dma_ring *rx_ring = &chan->rx_ring;
chan             1216 drivers/dma/xgene-dma.c 	struct xgene_dma_ring *tx_ring = &chan->tx_ring;
chan             1221 drivers/dma/xgene-dma.c 	rx_ring->buf_num = XGENE_DMA_CPU_BUFNUM + chan->id;
chan             1223 drivers/dma/xgene-dma.c 	ret = xgene_dma_create_ring_one(chan, rx_ring,
chan             1228 drivers/dma/xgene-dma.c 	chan_dbg(chan, "Rx ring id 0x%X num %d desc 0x%p\n",
chan             1233 drivers/dma/xgene-dma.c 	tx_ring->buf_num = XGENE_DMA_BUFNUM + chan->id;
chan             1235 drivers/dma/xgene-dma.c 	ret = xgene_dma_create_ring_one(chan, tx_ring,
chan             1244 drivers/dma/xgene-dma.c 	chan_dbg(chan,
chan             1249 drivers/dma/xgene-dma.c 	chan->max_outstanding = tx_ring->slots;
chan             1259 drivers/dma/xgene-dma.c 		ret = xgene_dma_create_chan_rings(&pdma->chan[i]);
chan             1262 drivers/dma/xgene-dma.c 				xgene_dma_delete_chan_rings(&pdma->chan[j]);
chan             1430 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan             1444 drivers/dma/xgene-dma.c 		chan = &pdma->chan[i];
chan             1445 drivers/dma/xgene-dma.c 		irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
chan             1446 drivers/dma/xgene-dma.c 		ret = devm_request_irq(chan->dev, chan->rx_irq,
chan             1448 drivers/dma/xgene-dma.c 				       0, chan->name, chan);
chan             1450 drivers/dma/xgene-dma.c 			chan_err(chan, "Failed to register Rx IRQ %d\n",
chan             1451 drivers/dma/xgene-dma.c 				 chan->rx_irq);
chan             1455 drivers/dma/xgene-dma.c 				chan = &pdma->chan[i];
chan             1456 drivers/dma/xgene-dma.c 				irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
chan             1457 drivers/dma/xgene-dma.c 				devm_free_irq(chan->dev, chan->rx_irq, chan);
chan             1469 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan             1476 drivers/dma/xgene-dma.c 		chan = &pdma->chan[i];
chan             1477 drivers/dma/xgene-dma.c 		irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
chan             1478 drivers/dma/xgene-dma.c 		devm_free_irq(chan->dev, chan->rx_irq, chan);
chan             1482 drivers/dma/xgene-dma.c static void xgene_dma_set_caps(struct xgene_dma_chan *chan,
chan             1499 drivers/dma/xgene-dma.c 	if ((chan->id == XGENE_DMA_PQ_CHANNEL) &&
chan             1500 drivers/dma/xgene-dma.c 	    is_pq_enabled(chan->pdma)) {
chan             1503 drivers/dma/xgene-dma.c 	} else if ((chan->id == XGENE_DMA_XOR_CHANNEL) &&
chan             1504 drivers/dma/xgene-dma.c 		   !is_pq_enabled(chan->pdma)) {
chan             1509 drivers/dma/xgene-dma.c 	dma_dev->dev = chan->dev;
chan             1530 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan = &pdma->chan[id];
chan             1534 drivers/dma/xgene-dma.c 	chan->dma_chan.device = dma_dev;
chan             1536 drivers/dma/xgene-dma.c 	spin_lock_init(&chan->lock);
chan             1537 drivers/dma/xgene-dma.c 	INIT_LIST_HEAD(&chan->ld_pending);
chan             1538 drivers/dma/xgene-dma.c 	INIT_LIST_HEAD(&chan->ld_running);
chan             1539 drivers/dma/xgene-dma.c 	INIT_LIST_HEAD(&chan->ld_completed);
chan             1540 drivers/dma/xgene-dma.c 	tasklet_init(&chan->tasklet, xgene_dma_tasklet_cb,
chan             1541 drivers/dma/xgene-dma.c 		     (unsigned long)chan);
chan             1543 drivers/dma/xgene-dma.c 	chan->pending = 0;
chan             1544 drivers/dma/xgene-dma.c 	chan->desc_pool = NULL;
chan             1545 drivers/dma/xgene-dma.c 	dma_cookie_init(&chan->dma_chan);
chan             1548 drivers/dma/xgene-dma.c 	xgene_dma_set_caps(chan, dma_dev);
chan             1552 drivers/dma/xgene-dma.c 	list_add_tail(&chan->dma_chan.device_node, &dma_dev->channels);
chan             1557 drivers/dma/xgene-dma.c 		chan_err(chan, "Failed to register async device %d", ret);
chan             1558 drivers/dma/xgene-dma.c 		tasklet_kill(&chan->tasklet);
chan             1565 drivers/dma/xgene-dma.c 		 "%s: CAPABILITY ( %s%s)\n", dma_chan_name(&chan->dma_chan),
chan             1581 drivers/dma/xgene-dma.c 				tasklet_kill(&pdma->chan[j].tasklet);
chan             1601 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan             1607 drivers/dma/xgene-dma.c 		chan = &pdma->chan[i];
chan             1608 drivers/dma/xgene-dma.c 		chan->dev = pdma->dev;
chan             1609 drivers/dma/xgene-dma.c 		chan->pdma = pdma;
chan             1610 drivers/dma/xgene-dma.c 		chan->id = i;
chan             1611 drivers/dma/xgene-dma.c 		snprintf(chan->name, sizeof(chan->name), "dmachan%d", chan->id);
chan             1692 drivers/dma/xgene-dma.c 		pdma->chan[i - 1].rx_irq = irq;
chan             1767 drivers/dma/xgene-dma.c 		xgene_dma_delete_chan_rings(&pdma->chan[i]);
chan             1780 drivers/dma/xgene-dma.c 	struct xgene_dma_chan *chan;
chan             1791 drivers/dma/xgene-dma.c 		chan = &pdma->chan[i];
chan             1792 drivers/dma/xgene-dma.c 		tasklet_kill(&chan->tasklet);
chan             1793 drivers/dma/xgene-dma.c 		xgene_dma_delete_chan_rings(chan);
chan              384 drivers/dma/xilinx/xilinx_dma.c 	void (*start_transfer)(struct xilinx_dma_chan *chan);
chan              385 drivers/dma/xilinx/xilinx_dma.c 	int (*stop_transfer)(struct xilinx_dma_chan *chan);
chan              435 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan[XILINX_DMA_MAX_CHANS_PER_DEVICE];
chan              452 drivers/dma/xilinx/xilinx_dma.c #define to_xilinx_chan(chan) \
chan              453 drivers/dma/xilinx/xilinx_dma.c 	container_of(chan, struct xilinx_dma_chan, common)
chan              456 drivers/dma/xilinx/xilinx_dma.c #define xilinx_dma_poll_timeout(chan, reg, val, cond, delay_us, timeout_us) \
chan              457 drivers/dma/xilinx/xilinx_dma.c 	readl_poll_timeout(chan->xdev->regs + chan->ctrl_offset + reg, val, \
chan              461 drivers/dma/xilinx/xilinx_dma.c static inline u32 dma_read(struct xilinx_dma_chan *chan, u32 reg)
chan              463 drivers/dma/xilinx/xilinx_dma.c 	return ioread32(chan->xdev->regs + reg);
chan              466 drivers/dma/xilinx/xilinx_dma.c static inline void dma_write(struct xilinx_dma_chan *chan, u32 reg, u32 value)
chan              468 drivers/dma/xilinx/xilinx_dma.c 	iowrite32(value, chan->xdev->regs + reg);
chan              471 drivers/dma/xilinx/xilinx_dma.c static inline void vdma_desc_write(struct xilinx_dma_chan *chan, u32 reg,
chan              474 drivers/dma/xilinx/xilinx_dma.c 	dma_write(chan, chan->desc_offset + reg, value);
chan              477 drivers/dma/xilinx/xilinx_dma.c static inline u32 dma_ctrl_read(struct xilinx_dma_chan *chan, u32 reg)
chan              479 drivers/dma/xilinx/xilinx_dma.c 	return dma_read(chan, chan->ctrl_offset + reg);
chan              482 drivers/dma/xilinx/xilinx_dma.c static inline void dma_ctrl_write(struct xilinx_dma_chan *chan, u32 reg,
chan              485 drivers/dma/xilinx/xilinx_dma.c 	dma_write(chan, chan->ctrl_offset + reg, value);
chan              488 drivers/dma/xilinx/xilinx_dma.c static inline void dma_ctrl_clr(struct xilinx_dma_chan *chan, u32 reg,
chan              491 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, reg, dma_ctrl_read(chan, reg) & ~clr);
chan              494 drivers/dma/xilinx/xilinx_dma.c static inline void dma_ctrl_set(struct xilinx_dma_chan *chan, u32 reg,
chan              497 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, reg, dma_ctrl_read(chan, reg) | set);
chan              511 drivers/dma/xilinx/xilinx_dma.c static inline void vdma_desc_write_64(struct xilinx_dma_chan *chan, u32 reg,
chan              515 drivers/dma/xilinx/xilinx_dma.c 	writel(value_lsb, chan->xdev->regs + chan->desc_offset + reg);
chan              518 drivers/dma/xilinx/xilinx_dma.c 	writel(value_msb, chan->xdev->regs + chan->desc_offset + reg + 4);
chan              521 drivers/dma/xilinx/xilinx_dma.c static inline void dma_writeq(struct xilinx_dma_chan *chan, u32 reg, u64 value)
chan              523 drivers/dma/xilinx/xilinx_dma.c 	lo_hi_writeq(value, chan->xdev->regs + chan->ctrl_offset + reg);
chan              526 drivers/dma/xilinx/xilinx_dma.c static inline void xilinx_write(struct xilinx_dma_chan *chan, u32 reg,
chan              529 drivers/dma/xilinx/xilinx_dma.c 	if (chan->ext_addr)
chan              530 drivers/dma/xilinx/xilinx_dma.c 		dma_writeq(chan, reg, addr);
chan              532 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, reg, addr);
chan              535 drivers/dma/xilinx/xilinx_dma.c static inline void xilinx_axidma_buf(struct xilinx_dma_chan *chan,
chan              540 drivers/dma/xilinx/xilinx_dma.c 	if (chan->ext_addr) {
chan              560 drivers/dma/xilinx/xilinx_dma.c xilinx_vdma_alloc_tx_segment(struct xilinx_dma_chan *chan)
chan              565 drivers/dma/xilinx/xilinx_dma.c 	segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys);
chan              581 drivers/dma/xilinx/xilinx_dma.c xilinx_cdma_alloc_tx_segment(struct xilinx_dma_chan *chan)
chan              586 drivers/dma/xilinx/xilinx_dma.c 	segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys);
chan              602 drivers/dma/xilinx/xilinx_dma.c xilinx_axidma_alloc_tx_segment(struct xilinx_dma_chan *chan)
chan              607 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              608 drivers/dma/xilinx/xilinx_dma.c 	if (!list_empty(&chan->free_seg_list)) {
chan              609 drivers/dma/xilinx/xilinx_dma.c 		segment = list_first_entry(&chan->free_seg_list,
chan              614 drivers/dma/xilinx/xilinx_dma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              635 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_free_tx_segment(struct xilinx_dma_chan *chan,
chan              640 drivers/dma/xilinx/xilinx_dma.c 	list_add_tail(&segment->node, &chan->free_seg_list);
chan              648 drivers/dma/xilinx/xilinx_dma.c static void xilinx_cdma_free_tx_segment(struct xilinx_dma_chan *chan,
chan              651 drivers/dma/xilinx/xilinx_dma.c 	dma_pool_free(chan->desc_pool, segment, segment->phys);
chan              659 drivers/dma/xilinx/xilinx_dma.c static void xilinx_vdma_free_tx_segment(struct xilinx_dma_chan *chan,
chan              662 drivers/dma/xilinx/xilinx_dma.c 	dma_pool_free(chan->desc_pool, segment, segment->phys);
chan              672 drivers/dma/xilinx/xilinx_dma.c xilinx_dma_alloc_tx_descriptor(struct xilinx_dma_chan *chan)
chan              691 drivers/dma/xilinx/xilinx_dma.c xilinx_dma_free_tx_descriptor(struct xilinx_dma_chan *chan,
chan              701 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
chan              704 drivers/dma/xilinx/xilinx_dma.c 			xilinx_vdma_free_tx_segment(chan, segment);
chan              706 drivers/dma/xilinx/xilinx_dma.c 	} else if (chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) {
chan              710 drivers/dma/xilinx/xilinx_dma.c 			xilinx_cdma_free_tx_segment(chan, cdma_segment);
chan              716 drivers/dma/xilinx/xilinx_dma.c 			xilinx_dma_free_tx_segment(chan, axidma_segment);
chan              730 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_free_desc_list(struct xilinx_dma_chan *chan,
chan              737 drivers/dma/xilinx/xilinx_dma.c 		xilinx_dma_free_tx_descriptor(chan, desc);
chan              745 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_free_descriptors(struct xilinx_dma_chan *chan)
chan              749 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              751 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_desc_list(chan, &chan->pending_list);
chan              752 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_desc_list(chan, &chan->done_list);
chan              753 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_desc_list(chan, &chan->active_list);
chan              755 drivers/dma/xilinx/xilinx_dma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              764 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan              767 drivers/dma/xilinx/xilinx_dma.c 	dev_dbg(chan->dev, "Free all channel resources.\n");
chan              769 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_descriptors(chan);
chan              771 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
chan              772 drivers/dma/xilinx/xilinx_dma.c 		spin_lock_irqsave(&chan->lock, flags);
chan              773 drivers/dma/xilinx/xilinx_dma.c 		INIT_LIST_HEAD(&chan->free_seg_list);
chan              774 drivers/dma/xilinx/xilinx_dma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              777 drivers/dma/xilinx/xilinx_dma.c 		dma_free_coherent(chan->dev, sizeof(*chan->seg_v) *
chan              778 drivers/dma/xilinx/xilinx_dma.c 				  XILINX_DMA_NUM_DESCS, chan->seg_v,
chan              779 drivers/dma/xilinx/xilinx_dma.c 				  chan->seg_p);
chan              782 drivers/dma/xilinx/xilinx_dma.c 		dma_free_coherent(chan->dev, sizeof(*chan->cyclic_seg_v),
chan              783 drivers/dma/xilinx/xilinx_dma.c 				  chan->cyclic_seg_v, chan->cyclic_seg_p);
chan              786 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype != XDMA_TYPE_AXIDMA) {
chan              787 drivers/dma/xilinx/xilinx_dma.c 		dma_pool_destroy(chan->desc_pool);
chan              788 drivers/dma/xilinx/xilinx_dma.c 		chan->desc_pool = NULL;
chan              798 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_chan_handle_cyclic(struct xilinx_dma_chan *chan,
chan              808 drivers/dma/xilinx/xilinx_dma.c 		spin_unlock_irqrestore(&chan->lock, *flags);
chan              810 drivers/dma/xilinx/xilinx_dma.c 		spin_lock_irqsave(&chan->lock, *flags);
chan              818 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
chan              823 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              825 drivers/dma/xilinx/xilinx_dma.c 	list_for_each_entry_safe(desc, next, &chan->done_list, node) {
chan              829 drivers/dma/xilinx/xilinx_dma.c 			xilinx_dma_chan_handle_cyclic(chan, desc, &flags);
chan              839 drivers/dma/xilinx/xilinx_dma.c 			spin_unlock_irqrestore(&chan->lock, flags);
chan              841 drivers/dma/xilinx/xilinx_dma.c 			spin_lock_irqsave(&chan->lock, flags);
chan              846 drivers/dma/xilinx/xilinx_dma.c 		xilinx_dma_free_tx_descriptor(chan, desc);
chan              849 drivers/dma/xilinx/xilinx_dma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              858 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = (struct xilinx_dma_chan *)data;
chan              860 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_chan_desc_cleanup(chan);
chan              871 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan              875 drivers/dma/xilinx/xilinx_dma.c 	if (chan->desc_pool)
chan              882 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
chan              884 drivers/dma/xilinx/xilinx_dma.c 		chan->seg_v = dma_alloc_coherent(chan->dev,
chan              885 drivers/dma/xilinx/xilinx_dma.c 						 sizeof(*chan->seg_v) * XILINX_DMA_NUM_DESCS,
chan              886 drivers/dma/xilinx/xilinx_dma.c 						 &chan->seg_p, GFP_KERNEL);
chan              887 drivers/dma/xilinx/xilinx_dma.c 		if (!chan->seg_v) {
chan              888 drivers/dma/xilinx/xilinx_dma.c 			dev_err(chan->dev,
chan              890 drivers/dma/xilinx/xilinx_dma.c 				chan->id);
chan              899 drivers/dma/xilinx/xilinx_dma.c 		chan->cyclic_seg_v = dma_alloc_coherent(chan->dev,
chan              900 drivers/dma/xilinx/xilinx_dma.c 							sizeof(*chan->cyclic_seg_v),
chan              901 drivers/dma/xilinx/xilinx_dma.c 							&chan->cyclic_seg_p,
chan              903 drivers/dma/xilinx/xilinx_dma.c 		if (!chan->cyclic_seg_v) {
chan              904 drivers/dma/xilinx/xilinx_dma.c 			dev_err(chan->dev,
chan              906 drivers/dma/xilinx/xilinx_dma.c 			dma_free_coherent(chan->dev, sizeof(*chan->seg_v) *
chan              907 drivers/dma/xilinx/xilinx_dma.c 				XILINX_DMA_NUM_DESCS, chan->seg_v,
chan              908 drivers/dma/xilinx/xilinx_dma.c 				chan->seg_p);
chan              911 drivers/dma/xilinx/xilinx_dma.c 		chan->cyclic_seg_v->phys = chan->cyclic_seg_p;
chan              914 drivers/dma/xilinx/xilinx_dma.c 			chan->seg_v[i].hw.next_desc =
chan              915 drivers/dma/xilinx/xilinx_dma.c 			lower_32_bits(chan->seg_p + sizeof(*chan->seg_v) *
chan              917 drivers/dma/xilinx/xilinx_dma.c 			chan->seg_v[i].hw.next_desc_msb =
chan              918 drivers/dma/xilinx/xilinx_dma.c 			upper_32_bits(chan->seg_p + sizeof(*chan->seg_v) *
chan              920 drivers/dma/xilinx/xilinx_dma.c 			chan->seg_v[i].phys = chan->seg_p +
chan              921 drivers/dma/xilinx/xilinx_dma.c 				sizeof(*chan->seg_v) * i;
chan              922 drivers/dma/xilinx/xilinx_dma.c 			list_add_tail(&chan->seg_v[i].node,
chan              923 drivers/dma/xilinx/xilinx_dma.c 				      &chan->free_seg_list);
chan              925 drivers/dma/xilinx/xilinx_dma.c 	} else if (chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) {
chan              926 drivers/dma/xilinx/xilinx_dma.c 		chan->desc_pool = dma_pool_create("xilinx_cdma_desc_pool",
chan              927 drivers/dma/xilinx/xilinx_dma.c 				   chan->dev,
chan              932 drivers/dma/xilinx/xilinx_dma.c 		chan->desc_pool = dma_pool_create("xilinx_vdma_desc_pool",
chan              933 drivers/dma/xilinx/xilinx_dma.c 				     chan->dev,
chan              939 drivers/dma/xilinx/xilinx_dma.c 	if (!chan->desc_pool &&
chan              940 drivers/dma/xilinx/xilinx_dma.c 	    (chan->xdev->dma_config->dmatype != XDMA_TYPE_AXIDMA)) {
chan              941 drivers/dma/xilinx/xilinx_dma.c 		dev_err(chan->dev,
chan              943 drivers/dma/xilinx/xilinx_dma.c 			chan->id);
chan              949 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
chan              953 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
chan              957 drivers/dma/xilinx/xilinx_dma.c 	if ((chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) && chan->has_sg)
chan              958 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
chan              972 drivers/dma/xilinx/xilinx_dma.c static int xilinx_dma_calc_copysize(struct xilinx_dma_chan *chan,
chan              978 drivers/dma/xilinx/xilinx_dma.c 		     chan->xdev->max_buffer_len);
chan              981 drivers/dma/xilinx/xilinx_dma.c 	    chan->xdev->common.copy_align) {
chan              987 drivers/dma/xilinx/xilinx_dma.c 				 (1 << chan->xdev->common.copy_align));
chan             1004 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1016 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIDMA) {
chan             1017 drivers/dma/xilinx/xilinx_dma.c 		spin_lock_irqsave(&chan->lock, flags);
chan             1019 drivers/dma/xilinx/xilinx_dma.c 		desc = list_last_entry(&chan->active_list,
chan             1021 drivers/dma/xilinx/xilinx_dma.c 		if (chan->has_sg) {
chan             1025 drivers/dma/xilinx/xilinx_dma.c 					   chan->xdev->max_buffer_len;
chan             1028 drivers/dma/xilinx/xilinx_dma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1030 drivers/dma/xilinx/xilinx_dma.c 		chan->residue = residue;
chan             1031 drivers/dma/xilinx/xilinx_dma.c 		dma_set_residue(txstate, chan->residue);
chan             1043 drivers/dma/xilinx/xilinx_dma.c static int xilinx_dma_stop_transfer(struct xilinx_dma_chan *chan)
chan             1047 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_clr(chan, XILINX_DMA_REG_DMACR, XILINX_DMA_DMACR_RUNSTOP);
chan             1050 drivers/dma/xilinx/xilinx_dma.c 	return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
chan             1061 drivers/dma/xilinx/xilinx_dma.c static int xilinx_cdma_stop_transfer(struct xilinx_dma_chan *chan)
chan             1065 drivers/dma/xilinx/xilinx_dma.c 	return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
chan             1074 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_start(struct xilinx_dma_chan *chan)
chan             1079 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_set(chan, XILINX_DMA_REG_DMACR, XILINX_DMA_DMACR_RUNSTOP);
chan             1082 drivers/dma/xilinx/xilinx_dma.c 	err = xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
chan             1087 drivers/dma/xilinx/xilinx_dma.c 		dev_err(chan->dev, "Cannot start channel %p: %x\n",
chan             1088 drivers/dma/xilinx/xilinx_dma.c 			chan, dma_ctrl_read(chan, XILINX_DMA_REG_DMASR));
chan             1090 drivers/dma/xilinx/xilinx_dma.c 		chan->err = true;
chan             1098 drivers/dma/xilinx/xilinx_dma.c static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
chan             1100 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_vdma_config *config = &chan->config;
chan             1107 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err)
chan             1110 drivers/dma/xilinx/xilinx_dma.c 	if (!chan->idle)
chan             1113 drivers/dma/xilinx/xilinx_dma.c 	if (list_empty(&chan->pending_list))
chan             1116 drivers/dma/xilinx/xilinx_dma.c 	desc = list_first_entry(&chan->pending_list,
chan             1120 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_vflip) {
chan             1121 drivers/dma/xilinx/xilinx_dma.c 		reg = dma_read(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP);
chan             1124 drivers/dma/xilinx/xilinx_dma.c 		dma_write(chan, XILINX_VDMA_REG_ENABLE_VERTICAL_FLIP,
chan             1128 drivers/dma/xilinx/xilinx_dma.c 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
chan             1141 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
chan             1143 drivers/dma/xilinx/xilinx_dma.c 	j = chan->desc_submitcount;
chan             1144 drivers/dma/xilinx/xilinx_dma.c 	reg = dma_read(chan, XILINX_DMA_REG_PARK_PTR);
chan             1145 drivers/dma/xilinx/xilinx_dma.c 	if (chan->direction == DMA_MEM_TO_DEV) {
chan             1152 drivers/dma/xilinx/xilinx_dma.c 	dma_write(chan, XILINX_DMA_REG_PARK_PTR, reg);
chan             1155 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_start(chan);
chan             1157 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err)
chan             1161 drivers/dma/xilinx/xilinx_dma.c 	if (chan->desc_submitcount < chan->num_frms)
chan             1162 drivers/dma/xilinx/xilinx_dma.c 		i = chan->desc_submitcount;
chan             1165 drivers/dma/xilinx/xilinx_dma.c 		if (chan->ext_addr)
chan             1166 drivers/dma/xilinx/xilinx_dma.c 			vdma_desc_write_64(chan,
chan             1171 drivers/dma/xilinx/xilinx_dma.c 			vdma_desc_write(chan,
chan             1182 drivers/dma/xilinx/xilinx_dma.c 	vdma_desc_write(chan, XILINX_DMA_REG_HSIZE, last->hw.hsize);
chan             1183 drivers/dma/xilinx/xilinx_dma.c 	vdma_desc_write(chan, XILINX_DMA_REG_FRMDLY_STRIDE,
chan             1185 drivers/dma/xilinx/xilinx_dma.c 	vdma_desc_write(chan, XILINX_DMA_REG_VSIZE, last->hw.vsize);
chan             1187 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_submitcount++;
chan             1188 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount--;
chan             1190 drivers/dma/xilinx/xilinx_dma.c 	list_add_tail(&desc->node, &chan->active_list);
chan             1191 drivers/dma/xilinx/xilinx_dma.c 	if (chan->desc_submitcount == chan->num_frms)
chan             1192 drivers/dma/xilinx/xilinx_dma.c 		chan->desc_submitcount = 0;
chan             1194 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = false;
chan             1201 drivers/dma/xilinx/xilinx_dma.c static void xilinx_cdma_start_transfer(struct xilinx_dma_chan *chan)
chan             1205 drivers/dma/xilinx/xilinx_dma.c 	u32 ctrl_reg = dma_read(chan, XILINX_DMA_REG_DMACR);
chan             1207 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err)
chan             1210 drivers/dma/xilinx/xilinx_dma.c 	if (!chan->idle)
chan             1213 drivers/dma/xilinx/xilinx_dma.c 	if (list_empty(&chan->pending_list))
chan             1216 drivers/dma/xilinx/xilinx_dma.c 	head_desc = list_first_entry(&chan->pending_list,
chan             1218 drivers/dma/xilinx/xilinx_dma.c 	tail_desc = list_last_entry(&chan->pending_list,
chan             1223 drivers/dma/xilinx/xilinx_dma.c 	if (chan->desc_pendingcount <= XILINX_DMA_COALESCE_MAX) {
chan             1225 drivers/dma/xilinx/xilinx_dma.c 		ctrl_reg |= chan->desc_pendingcount <<
chan             1227 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, ctrl_reg);
chan             1230 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_sg) {
chan             1231 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_clr(chan, XILINX_DMA_REG_DMACR,
chan             1234 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
chan             1237 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_DMA_REG_CURDESC,
chan             1241 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_DMA_REG_TAILDESC,
chan             1254 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_CDMA_REG_SRCADDR,
chan             1256 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_CDMA_REG_DSTADDR,
chan             1260 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_BTT,
chan             1261 drivers/dma/xilinx/xilinx_dma.c 				hw->control & chan->xdev->max_buffer_len);
chan             1264 drivers/dma/xilinx/xilinx_dma.c 	list_splice_tail_init(&chan->pending_list, &chan->active_list);
chan             1265 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount = 0;
chan             1266 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = false;
chan             1273 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
chan             1279 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err)
chan             1282 drivers/dma/xilinx/xilinx_dma.c 	if (list_empty(&chan->pending_list))
chan             1285 drivers/dma/xilinx/xilinx_dma.c 	if (!chan->idle)
chan             1288 drivers/dma/xilinx/xilinx_dma.c 	head_desc = list_first_entry(&chan->pending_list,
chan             1290 drivers/dma/xilinx/xilinx_dma.c 	tail_desc = list_last_entry(&chan->pending_list,
chan             1295 drivers/dma/xilinx/xilinx_dma.c 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
chan             1297 drivers/dma/xilinx/xilinx_dma.c 	if (chan->desc_pendingcount <= XILINX_DMA_COALESCE_MAX) {
chan             1299 drivers/dma/xilinx/xilinx_dma.c 		reg |= chan->desc_pendingcount <<
chan             1301 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
chan             1304 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_sg && !chan->xdev->mcdma)
chan             1305 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_DMA_REG_CURDESC,
chan             1308 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_sg && chan->xdev->mcdma) {
chan             1309 drivers/dma/xilinx/xilinx_dma.c 		if (chan->direction == DMA_MEM_TO_DEV) {
chan             1310 drivers/dma/xilinx/xilinx_dma.c 			dma_ctrl_write(chan, XILINX_DMA_REG_CURDESC,
chan             1313 drivers/dma/xilinx/xilinx_dma.c 			if (!chan->tdest) {
chan             1314 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_write(chan, XILINX_DMA_REG_CURDESC,
chan             1317 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_write(chan,
chan             1318 drivers/dma/xilinx/xilinx_dma.c 					XILINX_DMA_MCRX_CDESC(chan->tdest),
chan             1324 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_start(chan);
chan             1326 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err)
chan             1330 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_sg && !chan->xdev->mcdma) {
chan             1331 drivers/dma/xilinx/xilinx_dma.c 		if (chan->cyclic)
chan             1332 drivers/dma/xilinx/xilinx_dma.c 			xilinx_write(chan, XILINX_DMA_REG_TAILDESC,
chan             1333 drivers/dma/xilinx/xilinx_dma.c 				     chan->cyclic_seg_v->phys);
chan             1335 drivers/dma/xilinx/xilinx_dma.c 			xilinx_write(chan, XILINX_DMA_REG_TAILDESC,
chan             1337 drivers/dma/xilinx/xilinx_dma.c 	} else if (chan->has_sg && chan->xdev->mcdma) {
chan             1338 drivers/dma/xilinx/xilinx_dma.c 		if (chan->direction == DMA_MEM_TO_DEV) {
chan             1339 drivers/dma/xilinx/xilinx_dma.c 			dma_ctrl_write(chan, XILINX_DMA_REG_TAILDESC,
chan             1342 drivers/dma/xilinx/xilinx_dma.c 			if (!chan->tdest) {
chan             1343 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_write(chan, XILINX_DMA_REG_TAILDESC,
chan             1346 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_write(chan,
chan             1347 drivers/dma/xilinx/xilinx_dma.c 					XILINX_DMA_MCRX_TDESC(chan->tdest),
chan             1360 drivers/dma/xilinx/xilinx_dma.c 		xilinx_write(chan, XILINX_DMA_REG_SRCDSTADDR,
chan             1364 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_BTT,
chan             1365 drivers/dma/xilinx/xilinx_dma.c 			       hw->control & chan->xdev->max_buffer_len);
chan             1368 drivers/dma/xilinx/xilinx_dma.c 	list_splice_tail_init(&chan->pending_list, &chan->active_list);
chan             1369 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount = 0;
chan             1370 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = false;
chan             1379 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1382 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1383 drivers/dma/xilinx/xilinx_dma.c 	chan->start_transfer(chan);
chan             1384 drivers/dma/xilinx/xilinx_dma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1393 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_complete_descriptor(struct xilinx_dma_chan *chan)
chan             1398 drivers/dma/xilinx/xilinx_dma.c 	if (list_empty(&chan->active_list))
chan             1401 drivers/dma/xilinx/xilinx_dma.c 	list_for_each_entry_safe(desc, next, &chan->active_list, node) {
chan             1405 drivers/dma/xilinx/xilinx_dma.c 		list_add_tail(&desc->node, &chan->done_list);
chan             1415 drivers/dma/xilinx/xilinx_dma.c static int xilinx_dma_reset(struct xilinx_dma_chan *chan)
chan             1420 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_set(chan, XILINX_DMA_REG_DMACR, XILINX_DMA_DMACR_RESET);
chan             1423 drivers/dma/xilinx/xilinx_dma.c 	err = xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMACR, tmp,
chan             1428 drivers/dma/xilinx/xilinx_dma.c 		dev_err(chan->dev, "reset timeout, cr %x, sr %x\n",
chan             1429 drivers/dma/xilinx/xilinx_dma.c 			dma_ctrl_read(chan, XILINX_DMA_REG_DMACR),
chan             1430 drivers/dma/xilinx/xilinx_dma.c 			dma_ctrl_read(chan, XILINX_DMA_REG_DMASR));
chan             1434 drivers/dma/xilinx/xilinx_dma.c 	chan->err = false;
chan             1435 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = true;
chan             1436 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount = 0;
chan             1437 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_submitcount = 0;
chan             1448 drivers/dma/xilinx/xilinx_dma.c static int xilinx_dma_chan_reset(struct xilinx_dma_chan *chan)
chan             1453 drivers/dma/xilinx/xilinx_dma.c 	err = xilinx_dma_reset(chan);
chan             1458 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_set(chan, XILINX_DMA_REG_DMACR,
chan             1473 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = data;
chan             1477 drivers/dma/xilinx/xilinx_dma.c 	status = dma_ctrl_read(chan, XILINX_DMA_REG_DMASR);
chan             1481 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, XILINX_DMA_REG_DMASR,
chan             1494 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_DMASR,
chan             1497 drivers/dma/xilinx/xilinx_dma.c 		if (!chan->flush_on_fsync ||
chan             1499 drivers/dma/xilinx/xilinx_dma.c 			dev_err(chan->dev,
chan             1501 drivers/dma/xilinx/xilinx_dma.c 				chan, errors,
chan             1502 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_read(chan, XILINX_DMA_REG_CURDESC),
chan             1503 drivers/dma/xilinx/xilinx_dma.c 				dma_ctrl_read(chan, XILINX_DMA_REG_TAILDESC));
chan             1504 drivers/dma/xilinx/xilinx_dma.c 			chan->err = true;
chan             1513 drivers/dma/xilinx/xilinx_dma.c 		dev_dbg(chan->dev, "Inter-packet latency too long\n");
chan             1517 drivers/dma/xilinx/xilinx_dma.c 		spin_lock(&chan->lock);
chan             1518 drivers/dma/xilinx/xilinx_dma.c 		xilinx_dma_complete_descriptor(chan);
chan             1519 drivers/dma/xilinx/xilinx_dma.c 		chan->idle = true;
chan             1520 drivers/dma/xilinx/xilinx_dma.c 		chan->start_transfer(chan);
chan             1521 drivers/dma/xilinx/xilinx_dma.c 		spin_unlock(&chan->lock);
chan             1524 drivers/dma/xilinx/xilinx_dma.c 	tasklet_schedule(&chan->tasklet);
chan             1533 drivers/dma/xilinx/xilinx_dma.c static void append_desc_queue(struct xilinx_dma_chan *chan,
chan             1541 drivers/dma/xilinx/xilinx_dma.c 	if (list_empty(&chan->pending_list))
chan             1548 drivers/dma/xilinx/xilinx_dma.c 	tail_desc = list_last_entry(&chan->pending_list,
chan             1550 drivers/dma/xilinx/xilinx_dma.c 	if (chan->xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
chan             1555 drivers/dma/xilinx/xilinx_dma.c 	} else if (chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) {
chan             1572 drivers/dma/xilinx/xilinx_dma.c 	list_add_tail(&desc->node, &chan->pending_list);
chan             1573 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount++;
chan             1575 drivers/dma/xilinx/xilinx_dma.c 	if (chan->has_sg && (chan->xdev->dma_config->dmatype == XDMA_TYPE_VDMA)
chan             1576 drivers/dma/xilinx/xilinx_dma.c 	    && unlikely(chan->desc_pendingcount > chan->num_frms)) {
chan             1577 drivers/dma/xilinx/xilinx_dma.c 		dev_dbg(chan->dev, "desc pendingcount is too high\n");
chan             1578 drivers/dma/xilinx/xilinx_dma.c 		chan->desc_pendingcount = chan->num_frms;
chan             1591 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(tx->chan);
chan             1596 drivers/dma/xilinx/xilinx_dma.c 	if (chan->cyclic) {
chan             1597 drivers/dma/xilinx/xilinx_dma.c 		xilinx_dma_free_tx_descriptor(chan, desc);
chan             1601 drivers/dma/xilinx/xilinx_dma.c 	if (chan->err) {
chan             1606 drivers/dma/xilinx/xilinx_dma.c 		err = xilinx_dma_chan_reset(chan);
chan             1611 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1616 drivers/dma/xilinx/xilinx_dma.c 	append_desc_queue(chan, desc);
chan             1619 drivers/dma/xilinx/xilinx_dma.c 		chan->cyclic = true;
chan             1621 drivers/dma/xilinx/xilinx_dma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1640 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1655 drivers/dma/xilinx/xilinx_dma.c 	desc = xilinx_dma_alloc_tx_descriptor(chan);
chan             1659 drivers/dma/xilinx/xilinx_dma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan             1664 drivers/dma/xilinx/xilinx_dma.c 	segment = xilinx_vdma_alloc_tx_segment(chan);
chan             1674 drivers/dma/xilinx/xilinx_dma.c 	hw->stride |= chan->config.frm_dly <<
chan             1678 drivers/dma/xilinx/xilinx_dma.c 		if (chan->ext_addr) {
chan             1685 drivers/dma/xilinx/xilinx_dma.c 		if (chan->ext_addr) {
chan             1704 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_tx_descriptor(chan, desc);
chan             1722 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1727 drivers/dma/xilinx/xilinx_dma.c 	if (!len || len > chan->xdev->max_buffer_len)
chan             1730 drivers/dma/xilinx/xilinx_dma.c 	desc = xilinx_dma_alloc_tx_descriptor(chan);
chan             1734 drivers/dma/xilinx/xilinx_dma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan             1738 drivers/dma/xilinx/xilinx_dma.c 	segment = xilinx_cdma_alloc_tx_segment(chan);
chan             1746 drivers/dma/xilinx/xilinx_dma.c 	if (chan->ext_addr) {
chan             1760 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_tx_descriptor(chan, desc);
chan             1780 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1793 drivers/dma/xilinx/xilinx_dma.c 	desc = xilinx_dma_alloc_tx_descriptor(chan);
chan             1797 drivers/dma/xilinx/xilinx_dma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan             1809 drivers/dma/xilinx/xilinx_dma.c 			segment = xilinx_axidma_alloc_tx_segment(chan);
chan             1817 drivers/dma/xilinx/xilinx_dma.c 			copy = xilinx_dma_calc_copysize(chan, sg_dma_len(sg),
chan             1822 drivers/dma/xilinx/xilinx_dma.c 			xilinx_axidma_buf(chan, hw, sg_dma_address(sg),
chan             1827 drivers/dma/xilinx/xilinx_dma.c 			if (chan->direction == DMA_MEM_TO_DEV) {
chan             1848 drivers/dma/xilinx/xilinx_dma.c 	if (chan->direction == DMA_MEM_TO_DEV) {
chan             1859 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_tx_descriptor(chan, desc);
chan             1879 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1899 drivers/dma/xilinx/xilinx_dma.c 	desc = xilinx_dma_alloc_tx_descriptor(chan);
chan             1903 drivers/dma/xilinx/xilinx_dma.c 	chan->direction = direction;
chan             1904 drivers/dma/xilinx/xilinx_dma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan             1914 drivers/dma/xilinx/xilinx_dma.c 			segment = xilinx_axidma_alloc_tx_segment(chan);
chan             1922 drivers/dma/xilinx/xilinx_dma.c 			copy = xilinx_dma_calc_copysize(chan, period_len,
chan             1925 drivers/dma/xilinx/xilinx_dma.c 			xilinx_axidma_buf(chan, hw, buf_addr, sg_used,
chan             1948 drivers/dma/xilinx/xilinx_dma.c 	reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
chan             1950 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
chan             1966 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_tx_descriptor(chan, desc);
chan             1984 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             1999 drivers/dma/xilinx/xilinx_dma.c 	desc = xilinx_dma_alloc_tx_descriptor(chan);
chan             2003 drivers/dma/xilinx/xilinx_dma.c 	chan->direction = xt->dir;
chan             2004 drivers/dma/xilinx/xilinx_dma.c 	dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan             2008 drivers/dma/xilinx/xilinx_dma.c 	segment = xilinx_axidma_alloc_tx_segment(chan);
chan             2020 drivers/dma/xilinx/xilinx_dma.c 	hw->mcdma_control = chan->tdest & XILINX_DMA_BD_TDEST_MASK;
chan             2050 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_tx_descriptor(chan, desc);
chan             2062 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             2066 drivers/dma/xilinx/xilinx_dma.c 	if (chan->cyclic)
chan             2067 drivers/dma/xilinx/xilinx_dma.c 		xilinx_dma_chan_reset(chan);
chan             2069 drivers/dma/xilinx/xilinx_dma.c 	err = chan->stop_transfer(chan);
chan             2071 drivers/dma/xilinx/xilinx_dma.c 		dev_err(chan->dev, "Cannot stop channel %p: %x\n",
chan             2072 drivers/dma/xilinx/xilinx_dma.c 			chan, dma_ctrl_read(chan, XILINX_DMA_REG_DMASR));
chan             2073 drivers/dma/xilinx/xilinx_dma.c 		chan->err = true;
chan             2077 drivers/dma/xilinx/xilinx_dma.c 	xilinx_dma_free_descriptors(chan);
chan             2078 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = true;
chan             2080 drivers/dma/xilinx/xilinx_dma.c 	if (chan->cyclic) {
chan             2081 drivers/dma/xilinx/xilinx_dma.c 		reg = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
chan             2083 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
chan             2084 drivers/dma/xilinx/xilinx_dma.c 		chan->cyclic = false;
chan             2087 drivers/dma/xilinx/xilinx_dma.c 	if ((chan->xdev->dma_config->dmatype == XDMA_TYPE_CDMA) && chan->has_sg)
chan             2088 drivers/dma/xilinx/xilinx_dma.c 		dma_ctrl_clr(chan, XILINX_DMA_REG_DMACR,
chan             2110 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
chan             2114 drivers/dma/xilinx/xilinx_dma.c 		return xilinx_dma_chan_reset(chan);
chan             2116 drivers/dma/xilinx/xilinx_dma.c 	dmacr = dma_ctrl_read(chan, XILINX_DMA_REG_DMACR);
chan             2118 drivers/dma/xilinx/xilinx_dma.c 	chan->config.frm_dly = cfg->frm_dly;
chan             2119 drivers/dma/xilinx/xilinx_dma.c 	chan->config.park = cfg->park;
chan             2122 drivers/dma/xilinx/xilinx_dma.c 	chan->config.gen_lock = cfg->gen_lock;
chan             2123 drivers/dma/xilinx/xilinx_dma.c 	chan->config.master = cfg->master;
chan             2126 drivers/dma/xilinx/xilinx_dma.c 	if (cfg->gen_lock && chan->genlock) {
chan             2132 drivers/dma/xilinx/xilinx_dma.c 	chan->config.frm_cnt_en = cfg->frm_cnt_en;
chan             2133 drivers/dma/xilinx/xilinx_dma.c 	chan->config.vflip_en = cfg->vflip_en;
chan             2136 drivers/dma/xilinx/xilinx_dma.c 		chan->config.park_frm = cfg->park_frm;
chan             2138 drivers/dma/xilinx/xilinx_dma.c 		chan->config.park_frm = -1;
chan             2140 drivers/dma/xilinx/xilinx_dma.c 	chan->config.coalesc = cfg->coalesc;
chan             2141 drivers/dma/xilinx/xilinx_dma.c 	chan->config.delay = cfg->delay;
chan             2146 drivers/dma/xilinx/xilinx_dma.c 		chan->config.coalesc = cfg->coalesc;
chan             2152 drivers/dma/xilinx/xilinx_dma.c 		chan->config.delay = cfg->delay;
chan             2159 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, dmacr);
chan             2173 drivers/dma/xilinx/xilinx_dma.c static void xilinx_dma_chan_remove(struct xilinx_dma_chan *chan)
chan             2176 drivers/dma/xilinx/xilinx_dma.c 	dma_ctrl_clr(chan, XILINX_DMA_REG_DMACR,
chan             2179 drivers/dma/xilinx/xilinx_dma.c 	if (chan->irq > 0)
chan             2180 drivers/dma/xilinx/xilinx_dma.c 		free_irq(chan->irq, chan);
chan             2182 drivers/dma/xilinx/xilinx_dma.c 	tasklet_kill(&chan->tasklet);
chan             2184 drivers/dma/xilinx/xilinx_dma.c 	list_del(&chan->common.device_node);
chan             2390 drivers/dma/xilinx/xilinx_dma.c 	struct xilinx_dma_chan *chan;
chan             2396 drivers/dma/xilinx/xilinx_dma.c 	chan = devm_kzalloc(xdev->dev, sizeof(*chan), GFP_KERNEL);
chan             2397 drivers/dma/xilinx/xilinx_dma.c 	if (!chan)
chan             2400 drivers/dma/xilinx/xilinx_dma.c 	chan->dev = xdev->dev;
chan             2401 drivers/dma/xilinx/xilinx_dma.c 	chan->xdev = xdev;
chan             2402 drivers/dma/xilinx/xilinx_dma.c 	chan->desc_pendingcount = 0x0;
chan             2403 drivers/dma/xilinx/xilinx_dma.c 	chan->ext_addr = xdev->ext_addr;
chan             2409 drivers/dma/xilinx/xilinx_dma.c 	chan->idle = true;
chan             2411 drivers/dma/xilinx/xilinx_dma.c 	spin_lock_init(&chan->lock);
chan             2412 drivers/dma/xilinx/xilinx_dma.c 	INIT_LIST_HEAD(&chan->pending_list);
chan             2413 drivers/dma/xilinx/xilinx_dma.c 	INIT_LIST_HEAD(&chan->done_list);
chan             2414 drivers/dma/xilinx/xilinx_dma.c 	INIT_LIST_HEAD(&chan->active_list);
chan             2415 drivers/dma/xilinx/xilinx_dma.c 	INIT_LIST_HEAD(&chan->free_seg_list);
chan             2420 drivers/dma/xilinx/xilinx_dma.c 	chan->genlock = of_property_read_bool(node, "xlnx,genlock-mode");
chan             2439 drivers/dma/xilinx/xilinx_dma.c 		chan->direction = DMA_MEM_TO_DEV;
chan             2440 drivers/dma/xilinx/xilinx_dma.c 		chan->id = chan_id;
chan             2441 drivers/dma/xilinx/xilinx_dma.c 		chan->tdest = chan_id;
chan             2443 drivers/dma/xilinx/xilinx_dma.c 		chan->ctrl_offset = XILINX_DMA_MM2S_CTRL_OFFSET;
chan             2445 drivers/dma/xilinx/xilinx_dma.c 			chan->desc_offset = XILINX_VDMA_MM2S_DESC_OFFSET;
chan             2446 drivers/dma/xilinx/xilinx_dma.c 			chan->config.park = 1;
chan             2450 drivers/dma/xilinx/xilinx_dma.c 				chan->flush_on_fsync = true;
chan             2456 drivers/dma/xilinx/xilinx_dma.c 		chan->direction = DMA_DEV_TO_MEM;
chan             2457 drivers/dma/xilinx/xilinx_dma.c 		chan->id = chan_id;
chan             2458 drivers/dma/xilinx/xilinx_dma.c 		chan->tdest = chan_id - xdev->nr_channels;
chan             2459 drivers/dma/xilinx/xilinx_dma.c 		chan->has_vflip = of_property_read_bool(node,
chan             2461 drivers/dma/xilinx/xilinx_dma.c 		if (chan->has_vflip) {
chan             2462 drivers/dma/xilinx/xilinx_dma.c 			chan->config.vflip_en = dma_read(chan,
chan             2467 drivers/dma/xilinx/xilinx_dma.c 		chan->ctrl_offset = XILINX_DMA_S2MM_CTRL_OFFSET;
chan             2469 drivers/dma/xilinx/xilinx_dma.c 			chan->desc_offset = XILINX_VDMA_S2MM_DESC_OFFSET;
chan             2470 drivers/dma/xilinx/xilinx_dma.c 			chan->config.park = 1;
chan             2474 drivers/dma/xilinx/xilinx_dma.c 				chan->flush_on_fsync = true;
chan             2482 drivers/dma/xilinx/xilinx_dma.c 	chan->irq = irq_of_parse_and_map(node, 0);
chan             2483 drivers/dma/xilinx/xilinx_dma.c 	err = request_irq(chan->irq, xilinx_dma_irq_handler, IRQF_SHARED,
chan             2484 drivers/dma/xilinx/xilinx_dma.c 			  "xilinx-dma-controller", chan);
chan             2486 drivers/dma/xilinx/xilinx_dma.c 		dev_err(xdev->dev, "unable to request IRQ %d\n", chan->irq);
chan             2491 drivers/dma/xilinx/xilinx_dma.c 		chan->start_transfer = xilinx_dma_start_transfer;
chan             2492 drivers/dma/xilinx/xilinx_dma.c 		chan->stop_transfer = xilinx_dma_stop_transfer;
chan             2494 drivers/dma/xilinx/xilinx_dma.c 		chan->start_transfer = xilinx_cdma_start_transfer;
chan             2495 drivers/dma/xilinx/xilinx_dma.c 		chan->stop_transfer = xilinx_cdma_stop_transfer;
chan             2497 drivers/dma/xilinx/xilinx_dma.c 		chan->start_transfer = xilinx_vdma_start_transfer;
chan             2498 drivers/dma/xilinx/xilinx_dma.c 		chan->stop_transfer = xilinx_dma_stop_transfer;
chan             2503 drivers/dma/xilinx/xilinx_dma.c 		if (dma_ctrl_read(chan, XILINX_DMA_REG_DMASR) &
chan             2505 drivers/dma/xilinx/xilinx_dma.c 			chan->has_sg = true;
chan             2506 drivers/dma/xilinx/xilinx_dma.c 		dev_dbg(chan->dev, "ch %d: SG %s\n", chan->id,
chan             2507 drivers/dma/xilinx/xilinx_dma.c 			chan->has_sg ? "enabled" : "disabled");
chan             2511 drivers/dma/xilinx/xilinx_dma.c 	tasklet_init(&chan->tasklet, xilinx_dma_do_tasklet,
chan             2512 drivers/dma/xilinx/xilinx_dma.c 			(unsigned long)chan);
chan             2518 drivers/dma/xilinx/xilinx_dma.c 	chan->common.device = &xdev->common;
chan             2520 drivers/dma/xilinx/xilinx_dma.c 	list_add_tail(&chan->common.device_node, &xdev->common.channels);
chan             2521 drivers/dma/xilinx/xilinx_dma.c 	xdev->chan[chan->id] = chan;
chan             2524 drivers/dma/xilinx/xilinx_dma.c 	err = xilinx_dma_chan_reset(chan);
chan             2573 drivers/dma/xilinx/xilinx_dma.c 	if (chan_id >= xdev->nr_channels || !xdev->chan[chan_id])
chan             2576 drivers/dma/xilinx/xilinx_dma.c 	return dma_get_slave_channel(&xdev->chan[chan_id]->common);
chan             2740 drivers/dma/xilinx/xilinx_dma.c 			if (xdev->chan[i])
chan             2741 drivers/dma/xilinx/xilinx_dma.c 				xdev->chan[i]->num_frms = num_frames;
chan             2768 drivers/dma/xilinx/xilinx_dma.c 		if (xdev->chan[i])
chan             2769 drivers/dma/xilinx/xilinx_dma.c 			xilinx_dma_chan_remove(xdev->chan[i]);
chan             2790 drivers/dma/xilinx/xilinx_dma.c 		if (xdev->chan[i])
chan             2791 drivers/dma/xilinx/xilinx_dma.c 			xilinx_dma_chan_remove(xdev->chan[i]);
chan              141 drivers/dma/xilinx/zynqmp_dma.c #define ZYNQMP_DMA_DESC_SIZE(chan)	(chan->desc_size)
chan              143 drivers/dma/xilinx/zynqmp_dma.c #define to_chan(chan)		container_of(chan, struct zynqmp_dma_chan, \
chan              251 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan;
chan              256 drivers/dma/xilinx/zynqmp_dma.c static inline void zynqmp_dma_writeq(struct zynqmp_dma_chan *chan, u32 reg,
chan              259 drivers/dma/xilinx/zynqmp_dma.c 	lo_hi_writeq(value, chan->regs + reg);
chan              267 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_update_desc_to_ctrlr(struct zynqmp_dma_chan *chan,
chan              273 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_writeq(chan, ZYNQMP_DMA_SRC_START_LSB, addr);
chan              275 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_writeq(chan, ZYNQMP_DMA_DST_START_LSB, addr);
chan              283 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_desc_config_eod(struct zynqmp_dma_chan *chan,
chan              302 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_config_sg_ll_desc(struct zynqmp_dma_chan *chan,
chan              314 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->is_dmacoherent) {
chan              320 drivers/dma/xilinx/zynqmp_dma.c 		dma_addr_t addr = chan->desc_pool_p +
chan              321 drivers/dma/xilinx/zynqmp_dma.c 			    ((uintptr_t)sdesc - (uintptr_t)chan->desc_pool_v);
chan              324 drivers/dma/xilinx/zynqmp_dma.c 		ddesc->nxtdscraddr = addr + ZYNQMP_DMA_DESC_SIZE(chan);
chan              332 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_init(struct zynqmp_dma_chan *chan)
chan              336 drivers/dma/xilinx/zynqmp_dma.c 	writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
chan              337 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_ISR);
chan              338 drivers/dma/xilinx/zynqmp_dma.c 	writel(val, chan->regs + ZYNQMP_DMA_ISR);
chan              340 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->is_dmacoherent) {
chan              344 drivers/dma/xilinx/zynqmp_dma.c 		writel(val, chan->regs + ZYNQMP_DMA_DSCR_ATTR);
chan              347 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_DATA_ATTR);
chan              348 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->is_dmacoherent) {
chan              354 drivers/dma/xilinx/zynqmp_dma.c 	writel(val, chan->regs + ZYNQMP_DMA_DATA_ATTR);
chan              357 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
chan              358 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
chan              360 drivers/dma/xilinx/zynqmp_dma.c 	chan->idle = true;
chan              371 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(tx->chan);
chan              377 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              380 drivers/dma/xilinx/zynqmp_dma.c 	if (!list_empty(&chan->pending_list)) {
chan              381 drivers/dma/xilinx/zynqmp_dma.c 		desc = list_last_entry(&chan->pending_list,
chan              392 drivers/dma/xilinx/zynqmp_dma.c 	list_add_tail(&new->node, &chan->pending_list);
chan              393 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              405 drivers/dma/xilinx/zynqmp_dma.c zynqmp_dma_get_descriptor(struct zynqmp_dma_chan *chan)
chan              410 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              411 drivers/dma/xilinx/zynqmp_dma.c 	desc = list_first_entry(&chan->free_list,
chan              414 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              418 drivers/dma/xilinx/zynqmp_dma.c 	memset((void *)desc->src_v, 0, ZYNQMP_DMA_DESC_SIZE(chan));
chan              419 drivers/dma/xilinx/zynqmp_dma.c 	memset((void *)desc->dst_v, 0, ZYNQMP_DMA_DESC_SIZE(chan));
chan              429 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_free_descriptor(struct zynqmp_dma_chan *chan,
chan              434 drivers/dma/xilinx/zynqmp_dma.c 	chan->desc_free_cnt++;
chan              435 drivers/dma/xilinx/zynqmp_dma.c 	list_add_tail(&sdesc->node, &chan->free_list);
chan              437 drivers/dma/xilinx/zynqmp_dma.c 		chan->desc_free_cnt++;
chan              438 drivers/dma/xilinx/zynqmp_dma.c 		list_move_tail(&child->node, &chan->free_list);
chan              447 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_free_desc_list(struct zynqmp_dma_chan *chan,
chan              453 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_free_descriptor(chan, desc);
chan              464 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(dchan);
chan              468 drivers/dma/xilinx/zynqmp_dma.c 	ret = pm_runtime_get_sync(chan->dev);
chan              472 drivers/dma/xilinx/zynqmp_dma.c 	chan->sw_desc_pool = kcalloc(ZYNQMP_DMA_NUM_DESCS, sizeof(*desc),
chan              474 drivers/dma/xilinx/zynqmp_dma.c 	if (!chan->sw_desc_pool)
chan              477 drivers/dma/xilinx/zynqmp_dma.c 	chan->idle = true;
chan              478 drivers/dma/xilinx/zynqmp_dma.c 	chan->desc_free_cnt = ZYNQMP_DMA_NUM_DESCS;
chan              480 drivers/dma/xilinx/zynqmp_dma.c 	INIT_LIST_HEAD(&chan->free_list);
chan              483 drivers/dma/xilinx/zynqmp_dma.c 		desc = chan->sw_desc_pool + i;
chan              484 drivers/dma/xilinx/zynqmp_dma.c 		dma_async_tx_descriptor_init(&desc->async_tx, &chan->common);
chan              486 drivers/dma/xilinx/zynqmp_dma.c 		list_add_tail(&desc->node, &chan->free_list);
chan              489 drivers/dma/xilinx/zynqmp_dma.c 	chan->desc_pool_v = dma_alloc_coherent(chan->dev,
chan              490 drivers/dma/xilinx/zynqmp_dma.c 					       (2 * chan->desc_size * ZYNQMP_DMA_NUM_DESCS),
chan              491 drivers/dma/xilinx/zynqmp_dma.c 					       &chan->desc_pool_p, GFP_KERNEL);
chan              492 drivers/dma/xilinx/zynqmp_dma.c 	if (!chan->desc_pool_v)
chan              496 drivers/dma/xilinx/zynqmp_dma.c 		desc = chan->sw_desc_pool + i;
chan              497 drivers/dma/xilinx/zynqmp_dma.c 		desc->src_v = (struct zynqmp_dma_desc_ll *) (chan->desc_pool_v +
chan              498 drivers/dma/xilinx/zynqmp_dma.c 					(i * ZYNQMP_DMA_DESC_SIZE(chan) * 2));
chan              500 drivers/dma/xilinx/zynqmp_dma.c 		desc->src_p = chan->desc_pool_p +
chan              501 drivers/dma/xilinx/zynqmp_dma.c 				(i * ZYNQMP_DMA_DESC_SIZE(chan) * 2);
chan              502 drivers/dma/xilinx/zynqmp_dma.c 		desc->dst_p = desc->src_p + ZYNQMP_DMA_DESC_SIZE(chan);
chan              512 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_start(struct zynqmp_dma_chan *chan)
chan              514 drivers/dma/xilinx/zynqmp_dma.c 	writel(ZYNQMP_DMA_INT_EN_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IER);
chan              515 drivers/dma/xilinx/zynqmp_dma.c 	writel(0, chan->regs + ZYNQMP_DMA_TOTAL_BYTE);
chan              516 drivers/dma/xilinx/zynqmp_dma.c 	chan->idle = false;
chan              517 drivers/dma/xilinx/zynqmp_dma.c 	writel(ZYNQMP_DMA_ENABLE, chan->regs + ZYNQMP_DMA_CTRL2);
chan              525 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_handle_ovfl_int(struct zynqmp_dma_chan *chan, u32 status)
chan              528 drivers/dma/xilinx/zynqmp_dma.c 		writel(0, chan->regs + ZYNQMP_DMA_TOTAL_BYTE);
chan              530 drivers/dma/xilinx/zynqmp_dma.c 		readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
chan              532 drivers/dma/xilinx/zynqmp_dma.c 		readl(chan->regs + ZYNQMP_DMA_IRQ_SRC_ACCT);
chan              535 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_config(struct zynqmp_dma_chan *chan)
chan              539 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_CTRL0);
chan              541 drivers/dma/xilinx/zynqmp_dma.c 	writel(val, chan->regs + ZYNQMP_DMA_CTRL0);
chan              543 drivers/dma/xilinx/zynqmp_dma.c 	val = readl(chan->regs + ZYNQMP_DMA_DATA_ATTR);
chan              545 drivers/dma/xilinx/zynqmp_dma.c 		(chan->src_burst_len << ZYNQMP_DMA_ARLEN_OFST);
chan              547 drivers/dma/xilinx/zynqmp_dma.c 		(chan->dst_burst_len << ZYNQMP_DMA_AWLEN_OFST);
chan              548 drivers/dma/xilinx/zynqmp_dma.c 	writel(val, chan->regs + ZYNQMP_DMA_DATA_ATTR);
chan              561 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(dchan);
chan              563 drivers/dma/xilinx/zynqmp_dma.c 	chan->src_burst_len = config->src_maxburst;
chan              564 drivers/dma/xilinx/zynqmp_dma.c 	chan->dst_burst_len = config->dst_maxburst;
chan              573 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_start_transfer(struct zynqmp_dma_chan *chan)
chan              577 drivers/dma/xilinx/zynqmp_dma.c 	if (!chan->idle)
chan              580 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_config(chan);
chan              582 drivers/dma/xilinx/zynqmp_dma.c 	desc = list_first_entry_or_null(&chan->pending_list,
chan              587 drivers/dma/xilinx/zynqmp_dma.c 	list_splice_tail_init(&chan->pending_list, &chan->active_list);
chan              588 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_update_desc_to_ctrlr(chan, desc);
chan              589 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_start(chan);
chan              597 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_chan_desc_cleanup(struct zynqmp_dma_chan *chan)
chan              601 drivers/dma/xilinx/zynqmp_dma.c 	list_for_each_entry_safe(desc, next, &chan->done_list, node) {
chan              610 drivers/dma/xilinx/zynqmp_dma.c 			spin_unlock(&chan->lock);
chan              612 drivers/dma/xilinx/zynqmp_dma.c 			spin_lock(&chan->lock);
chan              616 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_free_descriptor(chan, desc);
chan              624 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_complete_descriptor(struct zynqmp_dma_chan *chan)
chan              628 drivers/dma/xilinx/zynqmp_dma.c 	desc = list_first_entry_or_null(&chan->active_list,
chan              634 drivers/dma/xilinx/zynqmp_dma.c 	list_add_tail(&desc->node, &chan->done_list);
chan              643 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(dchan);
chan              646 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              647 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_start_transfer(chan);
chan              648 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              655 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_free_descriptors(struct zynqmp_dma_chan *chan)
chan              657 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_desc_list(chan, &chan->active_list);
chan              658 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_desc_list(chan, &chan->pending_list);
chan              659 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_desc_list(chan, &chan->done_list);
chan              668 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(dchan);
chan              671 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              672 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_descriptors(chan);
chan              673 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              674 drivers/dma/xilinx/zynqmp_dma.c 	dma_free_coherent(chan->dev,
chan              675 drivers/dma/xilinx/zynqmp_dma.c 		(2 * ZYNQMP_DMA_DESC_SIZE(chan) * ZYNQMP_DMA_NUM_DESCS),
chan              676 drivers/dma/xilinx/zynqmp_dma.c 		chan->desc_pool_v, chan->desc_pool_p);
chan              677 drivers/dma/xilinx/zynqmp_dma.c 	kfree(chan->sw_desc_pool);
chan              678 drivers/dma/xilinx/zynqmp_dma.c 	pm_runtime_mark_last_busy(chan->dev);
chan              679 drivers/dma/xilinx/zynqmp_dma.c 	pm_runtime_put_autosuspend(chan->dev);
chan              686 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_reset(struct zynqmp_dma_chan *chan)
chan              688 drivers/dma/xilinx/zynqmp_dma.c 	writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
chan              690 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_complete_descriptor(chan);
chan              691 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_chan_desc_cleanup(chan);
chan              692 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_descriptors(chan);
chan              693 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_init(chan);
chan              705 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = (struct zynqmp_dma_chan *)data;
chan              709 drivers/dma/xilinx/zynqmp_dma.c 	isr = readl(chan->regs + ZYNQMP_DMA_ISR);
chan              710 drivers/dma/xilinx/zynqmp_dma.c 	imr = readl(chan->regs + ZYNQMP_DMA_IMR);
chan              713 drivers/dma/xilinx/zynqmp_dma.c 	writel(isr, chan->regs + ZYNQMP_DMA_ISR);
chan              715 drivers/dma/xilinx/zynqmp_dma.c 		tasklet_schedule(&chan->tasklet);
chan              720 drivers/dma/xilinx/zynqmp_dma.c 		chan->idle = true;
chan              723 drivers/dma/xilinx/zynqmp_dma.c 		chan->err = true;
chan              724 drivers/dma/xilinx/zynqmp_dma.c 		tasklet_schedule(&chan->tasklet);
chan              725 drivers/dma/xilinx/zynqmp_dma.c 		dev_err(chan->dev, "Channel %p has errors\n", chan);
chan              730 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_handle_ovfl_int(chan, status);
chan              731 drivers/dma/xilinx/zynqmp_dma.c 		dev_dbg(chan->dev, "Channel %p overflow interrupt\n", chan);
chan              744 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = (struct zynqmp_dma_chan *)data;
chan              748 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              750 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->err) {
chan              751 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_reset(chan);
chan              752 drivers/dma/xilinx/zynqmp_dma.c 		chan->err = false;
chan              756 drivers/dma/xilinx/zynqmp_dma.c 	count = readl(chan->regs + ZYNQMP_DMA_IRQ_DST_ACCT);
chan              759 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_complete_descriptor(chan);
chan              760 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_chan_desc_cleanup(chan);
chan              764 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->idle)
chan              765 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_start_transfer(chan);
chan              768 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              779 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan = to_chan(dchan);
chan              782 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              783 drivers/dma/xilinx/zynqmp_dma.c 	writel(ZYNQMP_DMA_IDS_DEFAULT_MASK, chan->regs + ZYNQMP_DMA_IDS);
chan              784 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_free_descriptors(chan);
chan              785 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              804 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan;
chan              811 drivers/dma/xilinx/zynqmp_dma.c 	chan = to_chan(dchan);
chan              815 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_irqsave(&chan->lock, irqflags);
chan              816 drivers/dma/xilinx/zynqmp_dma.c 	if (desc_cnt > chan->desc_free_cnt) {
chan              817 drivers/dma/xilinx/zynqmp_dma.c 		spin_unlock_irqrestore(&chan->lock, irqflags);
chan              818 drivers/dma/xilinx/zynqmp_dma.c 		dev_dbg(chan->dev, "chan %p descs are not available\n", chan);
chan              821 drivers/dma/xilinx/zynqmp_dma.c 	chan->desc_free_cnt = chan->desc_free_cnt - desc_cnt;
chan              822 drivers/dma/xilinx/zynqmp_dma.c 	spin_unlock_irqrestore(&chan->lock, irqflags);
chan              826 drivers/dma/xilinx/zynqmp_dma.c 		new = zynqmp_dma_get_descriptor(chan);
chan              830 drivers/dma/xilinx/zynqmp_dma.c 		zynqmp_dma_config_sg_ll_desc(chan, desc, dma_src,
chan              842 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_desc_config_eod(chan, desc);
chan              852 drivers/dma/xilinx/zynqmp_dma.c static void zynqmp_dma_chan_remove(struct zynqmp_dma_chan *chan)
chan              854 drivers/dma/xilinx/zynqmp_dma.c 	if (!chan)
chan              857 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->irq)
chan              858 drivers/dma/xilinx/zynqmp_dma.c 		devm_free_irq(chan->zdev->dev, chan->irq, chan);
chan              859 drivers/dma/xilinx/zynqmp_dma.c 	tasklet_kill(&chan->tasklet);
chan              860 drivers/dma/xilinx/zynqmp_dma.c 	list_del(&chan->common.device_node);
chan              873 drivers/dma/xilinx/zynqmp_dma.c 	struct zynqmp_dma_chan *chan;
chan              878 drivers/dma/xilinx/zynqmp_dma.c 	chan = devm_kzalloc(zdev->dev, sizeof(*chan), GFP_KERNEL);
chan              879 drivers/dma/xilinx/zynqmp_dma.c 	if (!chan)
chan              881 drivers/dma/xilinx/zynqmp_dma.c 	chan->dev = zdev->dev;
chan              882 drivers/dma/xilinx/zynqmp_dma.c 	chan->zdev = zdev;
chan              885 drivers/dma/xilinx/zynqmp_dma.c 	chan->regs = devm_ioremap_resource(&pdev->dev, res);
chan              886 drivers/dma/xilinx/zynqmp_dma.c 	if (IS_ERR(chan->regs))
chan              887 drivers/dma/xilinx/zynqmp_dma.c 		return PTR_ERR(chan->regs);
chan              889 drivers/dma/xilinx/zynqmp_dma.c 	chan->bus_width = ZYNQMP_DMA_BUS_WIDTH_64;
chan              890 drivers/dma/xilinx/zynqmp_dma.c 	chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL;
chan              891 drivers/dma/xilinx/zynqmp_dma.c 	chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL;
chan              892 drivers/dma/xilinx/zynqmp_dma.c 	err = of_property_read_u32(node, "xlnx,bus-width", &chan->bus_width);
chan              898 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_64 &&
chan              899 drivers/dma/xilinx/zynqmp_dma.c 	    chan->bus_width != ZYNQMP_DMA_BUS_WIDTH_128) {
chan              904 drivers/dma/xilinx/zynqmp_dma.c 	chan->is_dmacoherent =  of_property_read_bool(node, "dma-coherent");
chan              905 drivers/dma/xilinx/zynqmp_dma.c 	zdev->chan = chan;
chan              906 drivers/dma/xilinx/zynqmp_dma.c 	tasklet_init(&chan->tasklet, zynqmp_dma_do_tasklet, (ulong)chan);
chan              907 drivers/dma/xilinx/zynqmp_dma.c 	spin_lock_init(&chan->lock);
chan              908 drivers/dma/xilinx/zynqmp_dma.c 	INIT_LIST_HEAD(&chan->active_list);
chan              909 drivers/dma/xilinx/zynqmp_dma.c 	INIT_LIST_HEAD(&chan->pending_list);
chan              910 drivers/dma/xilinx/zynqmp_dma.c 	INIT_LIST_HEAD(&chan->done_list);
chan              911 drivers/dma/xilinx/zynqmp_dma.c 	INIT_LIST_HEAD(&chan->free_list);
chan              913 drivers/dma/xilinx/zynqmp_dma.c 	dma_cookie_init(&chan->common);
chan              914 drivers/dma/xilinx/zynqmp_dma.c 	chan->common.device = &zdev->common;
chan              915 drivers/dma/xilinx/zynqmp_dma.c 	list_add_tail(&chan->common.device_node, &zdev->common.channels);
chan              917 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_init(chan);
chan              918 drivers/dma/xilinx/zynqmp_dma.c 	chan->irq = platform_get_irq(pdev, 0);
chan              919 drivers/dma/xilinx/zynqmp_dma.c 	if (chan->irq < 0)
chan              921 drivers/dma/xilinx/zynqmp_dma.c 	err = devm_request_irq(&pdev->dev, chan->irq, zynqmp_dma_irq_handler, 0,
chan              922 drivers/dma/xilinx/zynqmp_dma.c 			       "zynqmp-dma", chan);
chan              926 drivers/dma/xilinx/zynqmp_dma.c 	chan->desc_size = sizeof(struct zynqmp_dma_desc_ll);
chan              927 drivers/dma/xilinx/zynqmp_dma.c 	chan->idle = true;
chan              943 drivers/dma/xilinx/zynqmp_dma.c 	return dma_get_slave_channel(&zdev->chan->common);
chan             1088 drivers/dma/xilinx/zynqmp_dma.c 	p->dst_addr_widths = BIT(zdev->chan->bus_width / 8);
chan             1089 drivers/dma/xilinx/zynqmp_dma.c 	p->src_addr_widths = BIT(zdev->chan->bus_width / 8);
chan             1109 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_chan_remove(zdev->chan);
chan             1130 drivers/dma/xilinx/zynqmp_dma.c 	zynqmp_dma_chan_remove(zdev->chan);
chan              133 drivers/dma/zx_dma.c static struct zx_dma_chan *to_zx_chan(struct dma_chan *chan)
chan              135 drivers/dma/zx_dma.c 	return container_of(chan, struct zx_dma_chan, vc.chan);
chan              189 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(c->vc.chan.device);
chan              226 drivers/dma/zx_dma.c 				 vc.chan.device_node) {
chan              317 drivers/dma/zx_dma.c static void zx_dma_free_chan_resources(struct dma_chan *chan)
chan              319 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              320 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(chan->device);
chan              331 drivers/dma/zx_dma.c static enum dma_status zx_dma_tx_status(struct dma_chan *chan,
chan              335 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              342 drivers/dma/zx_dma.c 	ret = dma_cookie_status(&c->vc.chan, cookie, state);
chan              379 drivers/dma/zx_dma.c static void zx_dma_issue_pending(struct dma_chan *chan)
chan              381 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              382 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(chan->device);
chan              419 drivers/dma/zx_dma.c 						     struct dma_chan *chan)
chan              421 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              423 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(chan->device);
chan              427 drivers/dma/zx_dma.c 		dev_dbg(chan->device->dev, "vch %p: sg num %d exceed max %d\n",
chan              438 drivers/dma/zx_dma.c 		dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
chan              507 drivers/dma/zx_dma.c 	struct dma_chan *chan,	dma_addr_t dst, dma_addr_t src,
chan              510 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              523 drivers/dma/zx_dma.c 	ds = zx_alloc_desc_resource(num, chan);
chan              546 drivers/dma/zx_dma.c 	struct dma_chan *chan, struct scatterlist *sgl, unsigned int sglen,
chan              549 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              568 drivers/dma/zx_dma.c 	ds = zx_alloc_desc_resource(num, chan);
chan              604 drivers/dma/zx_dma.c 		struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
chan              608 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              615 drivers/dma/zx_dma.c 		dev_err(chan->device->dev, "maximum period size exceeded\n");
chan              622 drivers/dma/zx_dma.c 	ds = zx_alloc_desc_resource(num_periods, chan);
chan              646 drivers/dma/zx_dma.c static int zx_dma_config(struct dma_chan *chan,
chan              649 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              659 drivers/dma/zx_dma.c static int zx_dma_terminate_all(struct dma_chan *chan)
chan              661 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              662 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(chan->device);
chan              691 drivers/dma/zx_dma.c static int zx_dma_transfer_pause(struct dma_chan *chan)
chan              693 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              703 drivers/dma/zx_dma.c static int zx_dma_transfer_resume(struct dma_chan *chan)
chan              705 drivers/dma/zx_dma.c 	struct zx_dma_chan *c = to_zx_chan(chan);
chan              719 drivers/dma/zx_dma.c 	struct zx_dma_dev *d = to_zx_dma(vd->tx.chan->device);
chan              736 drivers/dma/zx_dma.c 	struct dma_chan *chan;
chan              742 drivers/dma/zx_dma.c 	chan = dma_get_any_slave_channel(&d->slave);
chan              743 drivers/dma/zx_dma.c 	if (!chan) {
chan              747 drivers/dma/zx_dma.c 	c = to_zx_chan(chan);
chan              751 drivers/dma/zx_dma.c 	return chan;
chan              893 drivers/dma/zx_dma.c 				 vc.chan.device_node) {
chan              894 drivers/dma/zx_dma.c 		list_del(&c->vc.chan.device_node);
chan              759 drivers/edac/amd64_edac.c static void debug_dump_dramcfg_low(struct amd64_pvt *pvt, u32 dclr, int chan)
chan              761 drivers/edac/amd64_edac.c 	edac_dbg(1, "F2x%d90 (DRAM Cfg Low): 0x%08x\n", chan, dclr);
chan              764 drivers/edac/amd64_edac.c 		u32 dcsm = pvt->csels[chan].csmasks[0];
chan               34 drivers/edac/cell_edac.c static void cell_edac_count_ce(struct mem_ctl_info *mci, int chan, u64 ar)
chan               41 drivers/edac/cell_edac.c 		priv->node, chan, ar);
chan               46 drivers/edac/cell_edac.c 		address = (address << 1) | chan;
chan               54 drivers/edac/cell_edac.c 			     0, chan, -1, "", "");
chan               57 drivers/edac/cell_edac.c static void cell_edac_count_ue(struct mem_ctl_info *mci, int chan, u64 ar)
chan               64 drivers/edac/cell_edac.c 		priv->node, chan, ar);
chan               69 drivers/edac/cell_edac.c 		address = (address << 1) | chan;
chan               76 drivers/edac/cell_edac.c 			     0, chan, -1, "", "");
chan              140 drivers/edac/edac_mc.c static void edac_mc_dump_channel(struct rank_info *chan)
chan              142 drivers/edac/edac_mc.c 	edac_dbg(4, "  channel->chan_idx = %d\n", chan->chan_idx);
chan              143 drivers/edac/edac_mc.c 	edac_dbg(4, "    channel = %p\n", chan);
chan              144 drivers/edac/edac_mc.c 	edac_dbg(4, "    channel->csrow = %p\n", chan->csrow);
chan              145 drivers/edac/edac_mc.c 	edac_dbg(4, "    channel->dimm = %p\n", chan->dimm);
chan              313 drivers/edac/edac_mc.c 	struct rank_info *chan;
chan              409 drivers/edac/edac_mc.c 			chan = kzalloc(sizeof(**csr->channels), GFP_KERNEL);
chan              410 drivers/edac/edac_mc.c 			if (!chan)
chan              412 drivers/edac/edac_mc.c 			csr->channels[chn] = chan;
chan              413 drivers/edac/edac_mc.c 			chan->chan_idx = chn;
chan              414 drivers/edac/edac_mc.c 			chan->csrow = csr;
chan              429 drivers/edac/edac_mc.c 		chan = mci->csrows[row]->channels[chn];
chan              463 drivers/edac/edac_mc.c 		chan->dimm = dimm;
chan             1088 drivers/edac/edac_mc.c 	int row = -1, chan = -1;
chan             1193 drivers/edac/edac_mc.c 			if (chan == -1)
chan             1194 drivers/edac/edac_mc.c 				chan = dimm->cschannel;
chan             1195 drivers/edac/edac_mc.c 			else if (chan >= 0 && chan != dimm->cschannel)
chan             1196 drivers/edac/edac_mc.c 				chan = -2;
chan             1203 drivers/edac/edac_mc.c 		edac_dbg(4, "csrow/channel to increment: (%d,%d)\n", row, chan);
chan             1209 drivers/edac/edac_mc.c 				if (chan >= 0)
chan             1210 drivers/edac/edac_mc.c 					mci->csrows[row]->channels[chan]->ce_count += error_count;
chan              203 drivers/edac/edac_mc_sysfs.c 	unsigned int chan = to_channel(mattr);
chan              204 drivers/edac/edac_mc_sysfs.c 	struct rank_info *rank = csrow->channels[chan];
chan              219 drivers/edac/edac_mc_sysfs.c 	unsigned int chan = to_channel(mattr);
chan              220 drivers/edac/edac_mc_sysfs.c 	struct rank_info *rank = csrow->channels[chan];
chan              243 drivers/edac/edac_mc_sysfs.c 	unsigned int chan = to_channel(mattr);
chan              244 drivers/edac/edac_mc_sysfs.c 	struct rank_info *rank = csrow->channels[chan];
chan              392 drivers/edac/edac_mc_sysfs.c 	int chan, nr_pages = 0;
chan              394 drivers/edac/edac_mc_sysfs.c 	for (chan = 0; chan < csrow->nr_channels; chan++)
chan              395 drivers/edac/edac_mc_sysfs.c 		nr_pages += csrow->channels[chan]->dimm->nr_pages;
chan              675 drivers/edac/edac_mc_sysfs.c 	int cnt, row, chan, i;
chan              687 drivers/edac/edac_mc_sysfs.c 		for (chan = 0; chan < ri->nr_channels; chan++)
chan              688 drivers/edac/edac_mc_sysfs.c 			ri->channels[chan]->ce_count = 0;
chan              133 drivers/edac/i10nm_base.c static bool i10nm_check_ecc(struct skx_imc *imc, int chan)
chan              137 drivers/edac/i10nm_base.c 	mcmtr = *(u32 *)(imc->mbase + 0x20ef8 + chan * 0x4000);
chan              138 drivers/edac/i10nm_base.c 	edac_dbg(1, "ch%d mcmtr reg %x\n", chan, mcmtr);
chan              367 drivers/edac/i5100_edac.c 			      int chan, int rank)
chan              374 drivers/edac/i5100_edac.c 		const int numrank = priv->dimm_numrank[chan][i];
chan              378 drivers/edac/i5100_edac.c 				return i * 2 + chan;
chan              438 drivers/edac/i5100_edac.c 			    int chan,
chan              455 drivers/edac/i5100_edac.c 			     chan, rank, -1,
chan              460 drivers/edac/i5100_edac.c 			    int chan,
chan              477 drivers/edac/i5100_edac.c 			     chan, rank, -1,
chan              481 drivers/edac/i5100_edac.c static void i5100_read_log(struct mem_ctl_info *mci, int chan,
chan              485 drivers/edac/i5100_edac.c 	struct pci_dev *pdev = (chan) ? priv->ch1mm : priv->ch0mm;
chan              524 drivers/edac/i5100_edac.c 		i5100_handle_ce(mci, chan, bank, rank, syndrome, cas, ras, msg);
chan              546 drivers/edac/i5100_edac.c 		i5100_handle_ue(mci, chan, bank, rank, syndrome, cas, ras, msg);
chan              662 drivers/edac/i5100_edac.c 	const unsigned int chan = i5100_csrow_to_chan(mci, csrow);
chan              666 drivers/edac/i5100_edac.c 	if (!priv->mtr[chan][chan_rank].present)
chan              671 drivers/edac/i5100_edac.c 		priv->mtr[chan][chan_rank].numcol +
chan              672 drivers/edac/i5100_edac.c 		priv->mtr[chan][chan_rank].numrow +
chan              673 drivers/edac/i5100_edac.c 		priv->mtr[chan][chan_rank].numbank;
chan              857 drivers/edac/i5100_edac.c 		const unsigned int chan = i5100_csrow_to_chan(mci, i);
chan              864 drivers/edac/i5100_edac.c 			       chan, rank, 0);
chan              868 drivers/edac/i5100_edac.c 		dimm->dtype = (priv->mtr[chan][rank].width == 4) ?
chan              873 drivers/edac/i5100_edac.c 			 i5100_rank_to_slot(mci, chan, rank));
chan              876 drivers/edac/i5100_edac.c 			 chan, rank, (long)PAGES_TO_MiB(npages));
chan             1534 drivers/edac/i7core_edac.c 					 const int chan,
chan             1545 drivers/edac/i7core_edac.c 		add2 = new2 - pvt->rdimm_last_ce_count[chan][2];
chan             1546 drivers/edac/i7core_edac.c 		add1 = new1 - pvt->rdimm_last_ce_count[chan][1];
chan             1547 drivers/edac/i7core_edac.c 		add0 = new0 - pvt->rdimm_last_ce_count[chan][0];
chan             1551 drivers/edac/i7core_edac.c 		pvt->rdimm_ce_count[chan][2] += add2;
chan             1555 drivers/edac/i7core_edac.c 		pvt->rdimm_ce_count[chan][1] += add1;
chan             1559 drivers/edac/i7core_edac.c 		pvt->rdimm_ce_count[chan][0] += add0;
chan             1564 drivers/edac/i7core_edac.c 	pvt->rdimm_last_ce_count[chan][2] = new2;
chan             1565 drivers/edac/i7core_edac.c 	pvt->rdimm_last_ce_count[chan][1] = new1;
chan             1566 drivers/edac/i7core_edac.c 	pvt->rdimm_last_ce_count[chan][0] = new0;
chan             1572 drivers/edac/i7core_edac.c 				     chan, 0, -1, "error", "");
chan             1576 drivers/edac/i7core_edac.c 				     chan, 1, -1, "error", "");
chan             1580 drivers/edac/i7core_edac.c 				     chan, 2, -1, "error", "");
chan              222 drivers/edac/i82975x_edac.c 	u8 chan;		/* the channel is bit 0 of EAP */
chan              280 drivers/edac/i82975x_edac.c 	int row, chan;
chan              310 drivers/edac/i82975x_edac.c 	chan = (mci->csrows[row]->nr_channels == 1) ? 0 : info->eap & 1;
chan              313 drivers/edac/i82975x_edac.c 			   (1 << mci->csrows[row]->channels[chan]->dimm->grain));
chan              323 drivers/edac/i82975x_edac.c 				     row, chan ? chan : 0, -1,
chan              368 drivers/edac/i82975x_edac.c 	int index, chan;
chan              407 drivers/edac/i82975x_edac.c 		for (chan = 0; chan < csrow->nr_channels; chan++) {
chan              408 drivers/edac/i82975x_edac.c 			dimm = mci->csrows[index]->channels[chan]->dimm;
chan              412 drivers/edac/i82975x_edac.c 			snprintf(csrow->channels[chan]->dimm->label, EDAC_MC_LABEL_LEN, "DIMM %c%d",
chan              413 drivers/edac/i82975x_edac.c 				 (chan == 0) ? 'A' : 'B',
chan              369 drivers/edac/ie31200_edac.c 				     int chan)
chan              371 drivers/edac/ie31200_edac.c 	dd->size = (addr_decode >> (chan << 4)) & IE31200_MAD_DIMM_SIZE;
chan              372 drivers/edac/ie31200_edac.c 	dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK_SKL << (chan << 4))) ? 1 : 0;
chan              373 drivers/edac/ie31200_edac.c 	dd->x16_width = ((addr_decode & (IE31200_MAD_DIMM_A_WIDTH_SKL << (chan << 4))) >>
chan              374 drivers/edac/ie31200_edac.c 				(IE31200_MAD_DIMM_A_WIDTH_SKL_SHIFT + (chan << 4)));
chan              378 drivers/edac/ie31200_edac.c 				 int chan)
chan              380 drivers/edac/ie31200_edac.c 	dd->size = (addr_decode >> (chan << 3)) & IE31200_MAD_DIMM_SIZE;
chan              381 drivers/edac/ie31200_edac.c 	dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK << chan)) ? 1 : 0;
chan              382 drivers/edac/ie31200_edac.c 	dd->x16_width = (addr_decode & (IE31200_MAD_DIMM_A_WIDTH << chan)) ? 1 : 0;
chan              385 drivers/edac/ie31200_edac.c static void populate_dimm_info(struct dimm_data *dd, u32 addr_decode, int chan,
chan              389 drivers/edac/ie31200_edac.c 		__skl_populate_dimm_info(dd, addr_decode, chan);
chan              391 drivers/edac/ie31200_edac.c 		__populate_dimm_info(dd, addr_decode, chan);
chan               52 drivers/edac/pnd2_edac.c 	int chan;
chan             1131 drivers/edac/pnd2_edac.c 	daddr->chan = pmiidx;
chan             1138 drivers/edac/pnd2_edac.c 			 addr, pmiaddr, daddr->chan, daddr->dimm, daddr->rank, daddr->bank, daddr->row, daddr->col);
chan             1208 drivers/edac/pnd2_edac.c 		 errcode, daddr->chan, daddr->dimm, daddr->rank, daddr->row, daddr->bank, daddr->col);
chan             1214 drivers/edac/pnd2_edac.c 						 m->addr & ~PAGE_MASK, 0, daddr->chan, daddr->dimm, -1, optype, msg);
chan             1466 drivers/edac/pnd2_edac.c 			 m.addr, daddr.chan, daddr.dimm, daddr.rank, daddr.bank, daddr.row, daddr.col);
chan              579 drivers/edac/sb_edac.c #define knl_channel_remap(mc, chan) ((mc) ? (chan) : (chan) + 3)
chan             1253 drivers/edac/sb_edac.c 	int mc, chan;
chan             1258 drivers/edac/sb_edac.c 	chan = GET_BITFIELD(reg, (entry*2) + 18, (entry*2) + 18 + 1);
chan             1260 drivers/edac/sb_edac.c 	return knl_channel_remap(mc, chan);
chan              109 drivers/edac/skx_base.c 			d->imc[i].chan[m->mtype].cdev = pdev;
chan              169 drivers/edac/skx_base.c 	pci_read_config_dword(imc->chan[0].cdev, 0x87c, &mcmtr);
chan              173 drivers/edac/skx_base.c 		pci_read_config_dword(imc->chan[i].cdev, 0x8C, &amap);
chan              174 drivers/edac/skx_base.c 		pci_read_config_dword(imc->chan[i].cdev, 0x400, &mcddrtcfg);
chan              178 drivers/edac/skx_base.c 			pci_read_config_dword(imc->chan[i].cdev,
chan              327 drivers/edac/skx_base.c 	pci_read_config_dword((d)->imc[mc].chan[0].cdev, 0x850 + 4 * (i), &(reg))
chan              329 drivers/edac/skx_base.c 	pci_read_config_dword((d)->imc[mc].chan[0].cdev, 0x880 + 4 * (i), &(reg))
chan              331 drivers/edac/skx_base.c 	pci_read_config_dword((d)->imc[mc].chan[ch].cdev, 0x90 + 4 * (i), &(reg))
chan              402 drivers/edac/skx_base.c 	pci_read_config_dword((d)->imc[mc].chan[ch].cdev,	\
chan              405 drivers/edac/skx_base.c 	pci_read_config_dword((d)->imc[mc].chan[ch].cdev,	\
chan              421 drivers/edac/skx_base.c 	if (res->dev->imc[res->imc].chan[res->channel].dimms[0].close_pg)
chan              502 drivers/edac/skx_base.c 	struct skx_dimm *dimm = &r->dev->imc[r->imc].chan[r->channel].dimms[r->dimm];
chan              650 drivers/edac/skx_base.c 			rc = skx_register_mci(&d->imc[i], d->imc[i].chan[0].cdev,
chan              287 drivers/edac/skx_common.c 		      struct skx_imc *imc, int chan, int dimmno)
chan              303 drivers/edac/skx_common.c 		 imc->mc, chan, dimmno, size, npages,
chan              306 drivers/edac/skx_common.c 	imc->chan[chan].dimms[dimmno].close_pg = GET_BITFIELD(mcmtr, 0, 0);
chan              307 drivers/edac/skx_common.c 	imc->chan[chan].dimms[dimmno].bank_xor_enable = GET_BITFIELD(mcmtr, 9, 9);
chan              308 drivers/edac/skx_common.c 	imc->chan[chan].dimms[dimmno].fine_grain_bank = GET_BITFIELD(amap, 0, 0);
chan              309 drivers/edac/skx_common.c 	imc->chan[chan].dimms[dimmno].rowbits = rows;
chan              310 drivers/edac/skx_common.c 	imc->chan[chan].dimms[dimmno].colbits = cols;
chan              318 drivers/edac/skx_common.c 		 imc->src_id, imc->lmc, chan, dimmno);
chan              324 drivers/edac/skx_common.c 			int chan, int dimmno, const char *mod_str)
chan              331 drivers/edac/skx_common.c 	dev_handle = ACPI_NFIT_BUILD_DEVICE_HANDLE(dimmno, chan, imc->lmc,
chan              363 drivers/edac/skx_common.c 		 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
chan              366 drivers/edac/skx_common.c 		 imc->src_id, imc->lmc, chan, dimmno);
chan              641 drivers/edac/skx_common.c 				if (d->imc[i].chan[j].cdev)
chan              642 drivers/edac/skx_common.c 					pci_dev_put(d->imc[i].chan[j].cdev);
chan               74 drivers/edac/skx_common.h 		} chan[NUM_CHANNELS];
chan              130 drivers/edac/skx_common.h 		      struct skx_imc *imc, int chan, int dimmno);
chan              133 drivers/edac/skx_common.h 			int chan, int dimmno, const char *mod_str);
chan               51 drivers/extcon/extcon-adc-jack.c 	struct iio_channel *chan;
chan               64 drivers/extcon/extcon-adc-jack.c 	ret = iio_read_channel_raw(data->chan, &adc_val);
chan              127 drivers/extcon/extcon-adc-jack.c 	data->chan = iio_channel_get(&pdev->dev, pdata->consumer_channel);
chan              128 drivers/extcon/extcon-adc-jack.c 	if (IS_ERR(data->chan))
chan              129 drivers/extcon/extcon-adc-jack.c 		return PTR_ERR(data->chan);
chan              167 drivers/extcon/extcon-adc-jack.c 	iio_channel_release(data->chan);
chan               46 drivers/firewire/nosy.h #define PCI_INT_DMA_HLT(chan)             (1 << (chan * 2))
chan               47 drivers/firewire/nosy.h #define PCI_INT_DMA_PCL(chan)             (1 << (chan * 2 + 1))
chan               59 drivers/firewire/nosy.h #define DMA_BREG(base, chan)              (base + chan * 0x20)
chan               60 drivers/firewire/nosy.h #define DMA_SREG(base, chan)              (base + chan * 0x10)
chan              100 drivers/firewire/nosy.h #define DMA_PREV_PCL(chan)                (DMA_BREG(DMA0_PREV_PCL, chan))
chan              107 drivers/firewire/nosy.h #define DMA_CURRENT_PCL(chan)             (DMA_BREG(DMA0_CURRENT_PCL, chan))
chan              114 drivers/firewire/nosy.h #define DMA_CHAN_STAT(chan)               (DMA_BREG(DMA0_CHAN_STAT, chan))
chan              128 drivers/firewire/nosy.h #define DMA_CHAN_CTRL(chan)               (DMA_BREG(DMA0_CHAN_CTRL, chan))
chan              139 drivers/firewire/nosy.h #define DMA_READY(chan)                   (DMA_BREG(DMA0_READY, chan))
chan              157 drivers/firewire/nosy.h #define DMA_WORD0_CMP_VALUE(chan)	(DMA_SREG(DMA0_WORD0_CMP_VALUE, chan))
chan              164 drivers/firewire/nosy.h #define DMA_WORD0_CMP_ENABLE(chan)	(DMA_SREG(DMA0_WORD0_CMP_ENABLE, chan))
chan              171 drivers/firewire/nosy.h #define DMA_WORD1_CMP_VALUE(chan)	(DMA_SREG(DMA0_WORD1_CMP_VALUE, chan))
chan              178 drivers/firewire/nosy.h #define DMA_WORD1_CMP_ENABLE(chan)	(DMA_SREG(DMA0_WORD1_CMP_ENABLE, chan))
chan              106 drivers/firmware/arm_scmi/driver.c 	struct mbox_chan *chan;
chan              442 drivers/firmware/arm_scmi/driver.c 	ret = mbox_send_message(cinfo->chan, xfer);
chan              479 drivers/firmware/arm_scmi/driver.c 	mbox_client_txdone(cinfo->chan, ret);
chan              773 drivers/firmware/arm_scmi/driver.c 	cinfo->chan = mbox_request_channel(cl, idx);
chan              774 drivers/firmware/arm_scmi/driver.c 	if (IS_ERR(cinfo->chan)) {
chan              775 drivers/firmware/arm_scmi/driver.c 		ret = PTR_ERR(cinfo->chan);
chan              906 drivers/firmware/arm_scmi/driver.c 	if (!IS_ERR_OR_NULL(cinfo->chan)) {
chan              907 drivers/firmware/arm_scmi/driver.c 		mbox_free_channel(cinfo->chan);
chan              908 drivers/firmware/arm_scmi/driver.c 		cinfo->chan = NULL;
chan              234 drivers/firmware/arm_scpi.c 	struct mbox_chan *chan;
chan              474 drivers/firmware/arm_scpi.c 	u8 chan;
chan              485 drivers/firmware/arm_scpi.c 		chan = test_bit(cmd, scpi_info->cmd_priority) ? 1 : 0;
chan              487 drivers/firmware/arm_scpi.c 		chan = atomic_inc_return(&scpi_info->next_chan) %
chan              489 drivers/firmware/arm_scpi.c 	scpi_chan = scpi_info->channels + chan;
chan              508 drivers/firmware/arm_scpi.c 	ret = mbox_send_message(scpi_chan->chan, msg);
chan              858 drivers/firmware/arm_scpi.c 		mbox_free_channel(info->channels[i].chan);
chan              965 drivers/firmware/arm_scpi.c 			pchan->chan = mbox_request_channel(cl, idx);
chan              966 drivers/firmware/arm_scpi.c 			if (!IS_ERR(pchan->chan))
chan              968 drivers/firmware/arm_scpi.c 			ret = PTR_ERR(pchan->chan);
chan               53 drivers/firmware/imx/imx-dsp.c 	struct imx_dsp_chan *chan = container_of(c, struct imx_dsp_chan, cl);
chan               55 drivers/firmware/imx/imx-dsp.c 	if (chan->idx == 0) {
chan               56 drivers/firmware/imx/imx-dsp.c 		chan->ipc->ops->handle_reply(chan->ipc);
chan               58 drivers/firmware/imx/imx-dsp.c 		chan->ipc->ops->handle_request(chan->ipc);
chan               59 drivers/firmware/imx/imx-dsp.c 		imx_dsp_ring_doorbell(chan->ipc, 1);
chan               17 drivers/firmware/raspberrypi.c #define MBOX_MSG(chan, data28)		(((data28) & ~0xf) | ((chan) & 0xf))
chan               27 drivers/firmware/raspberrypi.c 	struct mbox_chan *chan; /* The property channel. */
chan               45 drivers/firmware/raspberrypi.c rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data)
chan               47 drivers/firmware/raspberrypi.c 	u32 message = MBOX_MSG(chan, data);
chan               54 drivers/firmware/raspberrypi.c 	ret = mbox_send_message(fw->chan, &message);
chan              230 drivers/firmware/raspberrypi.c 	fw->chan = mbox_request_channel(&fw->cl, 0);
chan              231 drivers/firmware/raspberrypi.c 	if (IS_ERR(fw->chan)) {
chan              232 drivers/firmware/raspberrypi.c 		int ret = PTR_ERR(fw->chan);
chan              267 drivers/firmware/raspberrypi.c 	mbox_free_channel(fw->chan);
chan               46 drivers/firmware/stratix10-rsu.c 	struct stratix10_svc_chan *chan;
chan              172 drivers/firmware/stratix10-rsu.c 	ret = stratix10_svc_send(priv->chan, &msg);
chan              192 drivers/firmware/stratix10-rsu.c 	stratix10_svc_done(priv->chan);
chan              397 drivers/firmware/stratix10-rsu.c 	priv->chan = stratix10_svc_request_channel_byname(&priv->client,
chan              399 drivers/firmware/stratix10-rsu.c 	if (IS_ERR(priv->chan)) {
chan              402 drivers/firmware/stratix10-rsu.c 		return PTR_ERR(priv->chan);
chan              413 drivers/firmware/stratix10-rsu.c 		stratix10_svc_free_channel(priv->chan);
chan              423 drivers/firmware/stratix10-rsu.c 			stratix10_svc_free_channel(priv->chan);
chan              434 drivers/firmware/stratix10-rsu.c 	stratix10_svc_free_channel(priv->chan);
chan              109 drivers/firmware/stratix10-svc.c 	struct stratix10_svc_chan *chan;
chan              223 drivers/firmware/stratix10-svc.c 			p_data->chan->scl->receive_cb(p_data->chan->scl,
chan              276 drivers/firmware/stratix10-svc.c 	p_data->chan->scl->receive_cb(p_data->chan->scl, cb_data);
chan              323 drivers/firmware/stratix10-svc.c 	p_data->chan->scl->receive_cb(p_data->chan->scl, cb_data);
chan              440 drivers/firmware/stratix10-svc.c 			pdata->chan->scl->receive_cb(pdata->chan->scl, cbdata);
chan              493 drivers/firmware/stratix10-svc.c 			pdata->chan->scl->receive_cb(pdata->chan->scl, cbdata);
chan              730 drivers/firmware/stratix10-svc.c 	struct stratix10_svc_chan *chan = NULL;
chan              742 drivers/firmware/stratix10-svc.c 			chan = &controller->chans[i];
chan              753 drivers/firmware/stratix10-svc.c 	if (chan->scl || !try_module_get(controller->dev->driver->owner)) {
chan              758 drivers/firmware/stratix10-svc.c 	spin_lock_irqsave(&chan->lock, flag);
chan              759 drivers/firmware/stratix10-svc.c 	chan->scl = client;
chan              760 drivers/firmware/stratix10-svc.c 	chan->ctrl->num_active_client++;
chan              761 drivers/firmware/stratix10-svc.c 	spin_unlock_irqrestore(&chan->lock, flag);
chan              763 drivers/firmware/stratix10-svc.c 	return chan;
chan              773 drivers/firmware/stratix10-svc.c void stratix10_svc_free_channel(struct stratix10_svc_chan *chan)
chan              777 drivers/firmware/stratix10-svc.c 	spin_lock_irqsave(&chan->lock, flag);
chan              778 drivers/firmware/stratix10-svc.c 	chan->scl = NULL;
chan              779 drivers/firmware/stratix10-svc.c 	chan->ctrl->num_active_client--;
chan              780 drivers/firmware/stratix10-svc.c 	module_put(chan->ctrl->dev->driver->owner);
chan              781 drivers/firmware/stratix10-svc.c 	spin_unlock_irqrestore(&chan->lock, flag);
chan              796 drivers/firmware/stratix10-svc.c int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg)
chan              810 drivers/firmware/stratix10-svc.c 	if (!chan->ctrl->task) {
chan              811 drivers/firmware/stratix10-svc.c 		chan->ctrl->task =
chan              813 drivers/firmware/stratix10-svc.c 					      (void *)chan->ctrl,
chan              816 drivers/firmware/stratix10-svc.c 			if (IS_ERR(chan->ctrl->task)) {
chan              817 drivers/firmware/stratix10-svc.c 				dev_err(chan->ctrl->dev,
chan              822 drivers/firmware/stratix10-svc.c 		kthread_bind(chan->ctrl->task, cpu);
chan              823 drivers/firmware/stratix10-svc.c 		wake_up_process(chan->ctrl->task);
chan              850 drivers/firmware/stratix10-svc.c 	p_data->chan = chan;
chan              854 drivers/firmware/stratix10-svc.c 	ret = kfifo_in_spinlocked(&chan->ctrl->svc_fifo, p_data,
chan              856 drivers/firmware/stratix10-svc.c 				  &chan->ctrl->svc_fifo_lock);
chan              875 drivers/firmware/stratix10-svc.c void stratix10_svc_done(struct stratix10_svc_chan *chan)
chan              878 drivers/firmware/stratix10-svc.c 	if (chan->ctrl->task && chan->ctrl->num_active_client <= 1) {
chan              880 drivers/firmware/stratix10-svc.c 		kthread_stop(chan->ctrl->task);
chan              881 drivers/firmware/stratix10-svc.c 		chan->ctrl->task = NULL;
chan              896 drivers/firmware/stratix10-svc.c void *stratix10_svc_allocate_memory(struct stratix10_svc_chan *chan,
chan              902 drivers/firmware/stratix10-svc.c 	struct gen_pool *genpool = chan->ctrl->genpool;
chan              905 drivers/firmware/stratix10-svc.c 	pmem = devm_kzalloc(chan->ctrl->dev, sizeof(*pmem), GFP_KERNEL);
chan              934 drivers/firmware/stratix10-svc.c void stratix10_svc_free_memory(struct stratix10_svc_chan *chan, void *kaddr)
chan              945 drivers/firmware/stratix10-svc.c 	gen_pool_free(chan->ctrl->genpool, (unsigned long)kaddr, size);
chan               38 drivers/fpga/stratix10-soc.c 	struct stratix10_svc_chan *chan;
chan               49 drivers/fpga/stratix10-soc.c 	struct stratix10_svc_chan *chan = priv->chan;
chan               61 drivers/fpga/stratix10-soc.c 	ret = stratix10_svc_send(chan, &msg);
chan               85 drivers/fpga/stratix10-soc.c 			stratix10_svc_free_memory(priv->chan,
chan              220 drivers/fpga/stratix10-soc.c 		kbuf = stratix10_svc_allocate_memory(priv->chan, SVC_BUF_SIZE);
chan              232 drivers/fpga/stratix10-soc.c 	stratix10_svc_done(priv->chan);
chan              408 drivers/fpga/stratix10-soc.c 	stratix10_svc_done(priv->chan);
chan              440 drivers/fpga/stratix10-soc.c 	priv->chan = stratix10_svc_request_channel_byname(&priv->client,
chan              442 drivers/fpga/stratix10-soc.c 	if (IS_ERR(priv->chan)) {
chan              445 drivers/fpga/stratix10-soc.c 		return PTR_ERR(priv->chan);
chan              469 drivers/fpga/stratix10-soc.c 	stratix10_svc_free_channel(priv->chan);
chan              479 drivers/fpga/stratix10-soc.c 	stratix10_svc_free_channel(priv->chan);
chan               57 drivers/gpu/drm/amd/amdgpu/atombios_dp.c static int amdgpu_atombios_dp_process_aux_ch(struct amdgpu_i2c_chan *chan,
chan               62 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	struct drm_device *dev = chan->dev;
chan               72 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	mutex_lock(&chan->mutex);
chan               81 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	args.v2.ucChannelID = chan->rec.i2c_id;
chan               83 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	args.v2.ucHPD_ID = chan->rec.hpd;
chan              118 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	mutex_unlock(&chan->mutex);
chan              129 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 	struct amdgpu_i2c_chan *chan =
chan              157 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 		ret = amdgpu_atombios_dp_process_aux_ch(chan,
chan              173 drivers/gpu/drm/amd/amdgpu/atombios_dp.c 		ret = amdgpu_atombios_dp_process_aux_ch(chan,
chan               38 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c static int amdgpu_atombios_i2c_process_i2c_ch(struct amdgpu_i2c_chan *chan,
chan               42 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c 	struct drm_device *dev = chan->dev;
chan               52 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c 	mutex_lock(&chan->mutex);
chan               92 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c 	args.ucLineNumber = chan->rec.i2c_id;
chan              107 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c 	mutex_unlock(&chan->mutex);
chan               25 drivers/gpu/drm/gma500/intel_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               26 drivers/gpu/drm/gma500/intel_i2c.c 	struct drm_device *dev = chan->drm_dev;
chan               29 drivers/gpu/drm/gma500/intel_i2c.c 	val = REG_READ(chan->reg);
chan               35 drivers/gpu/drm/gma500/intel_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               36 drivers/gpu/drm/gma500/intel_i2c.c 	struct drm_device *dev = chan->drm_dev;
chan               39 drivers/gpu/drm/gma500/intel_i2c.c 	val = REG_READ(chan->reg);
chan               45 drivers/gpu/drm/gma500/intel_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               46 drivers/gpu/drm/gma500/intel_i2c.c 	struct drm_device *dev = chan->drm_dev;
chan               51 drivers/gpu/drm/gma500/intel_i2c.c 		    REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE |
chan               59 drivers/gpu/drm/gma500/intel_i2c.c 	REG_WRITE(chan->reg, reserved | clock_bits);
chan               65 drivers/gpu/drm/gma500/intel_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               66 drivers/gpu/drm/gma500/intel_i2c.c 	struct drm_device *dev = chan->drm_dev;
chan               71 drivers/gpu/drm/gma500/intel_i2c.c 		    REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE |
chan               81 drivers/gpu/drm/gma500/intel_i2c.c 	REG_WRITE(chan->reg, reserved | data_bits);
chan              109 drivers/gpu/drm/gma500/intel_i2c.c 	struct psb_intel_i2c_chan *chan;
chan              111 drivers/gpu/drm/gma500/intel_i2c.c 	chan = kzalloc(sizeof(struct psb_intel_i2c_chan), GFP_KERNEL);
chan              112 drivers/gpu/drm/gma500/intel_i2c.c 	if (!chan)
chan              115 drivers/gpu/drm/gma500/intel_i2c.c 	chan->drm_dev = dev;
chan              116 drivers/gpu/drm/gma500/intel_i2c.c 	chan->reg = reg;
chan              117 drivers/gpu/drm/gma500/intel_i2c.c 	snprintf(chan->adapter.name, I2C_NAME_SIZE, "intel drm %s", name);
chan              118 drivers/gpu/drm/gma500/intel_i2c.c 	chan->adapter.owner = THIS_MODULE;
chan              119 drivers/gpu/drm/gma500/intel_i2c.c 	chan->adapter.algo_data = &chan->algo;
chan              120 drivers/gpu/drm/gma500/intel_i2c.c 	chan->adapter.dev.parent = &dev->pdev->dev;
chan              121 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.setsda = set_data;
chan              122 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.setscl = set_clock;
chan              123 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.getsda = get_data;
chan              124 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.getscl = get_clock;
chan              125 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.udelay = 20;
chan              126 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.timeout = usecs_to_jiffies(2200);
chan              127 drivers/gpu/drm/gma500/intel_i2c.c 	chan->algo.data = chan;
chan              129 drivers/gpu/drm/gma500/intel_i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan              131 drivers/gpu/drm/gma500/intel_i2c.c 	if (i2c_bit_add_bus(&chan->adapter))
chan              135 drivers/gpu/drm/gma500/intel_i2c.c 	set_data(chan, 1);
chan              136 drivers/gpu/drm/gma500/intel_i2c.c 	set_clock(chan, 1);
chan              139 drivers/gpu/drm/gma500/intel_i2c.c 	return chan;
chan              142 drivers/gpu/drm/gma500/intel_i2c.c 	kfree(chan);
chan              152 drivers/gpu/drm/gma500/intel_i2c.c void psb_intel_i2c_destroy(struct psb_intel_i2c_chan *chan)
chan              154 drivers/gpu/drm/gma500/intel_i2c.c 	if (!chan)
chan              157 drivers/gpu/drm/gma500/intel_i2c.c 	i2c_del_adapter(&chan->adapter);
chan              158 drivers/gpu/drm/gma500/intel_i2c.c 	kfree(chan);
chan               63 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c #define LPC_READ_REG(chan, r) inl((chan)->reg + (r))
chan               64 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c #define LPC_WRITE_REG(chan, r, val) outl((val), (chan)->reg + (r))
chan               68 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               71 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	val = LPC_READ_REG(chan, RGIO);
chan               73 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	LPC_WRITE_REG(chan, RGIO, val);
chan               74 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	tmp = LPC_READ_REG(chan, RGLVL);
chan               75 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	val = (LPC_READ_REG(chan, RGLVL) & GPIO_CLOCK) ? 1 : 0;
chan               82 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan               85 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	val = LPC_READ_REG(chan, RGIO);
chan               87 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	LPC_WRITE_REG(chan, RGIO, val);
chan               88 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	tmp = LPC_READ_REG(chan, RGLVL);
chan               89 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	val = (LPC_READ_REG(chan, RGLVL) & GPIO_DATA) ? 1 : 0;
chan               96 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan              100 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGIO);
chan              102 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGIO, val);
chan              104 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGIO);
chan              106 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGIO, val);
chan              107 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGLVL);
chan              109 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGLVL, val);
chan              115 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	struct psb_intel_i2c_chan *chan = data;
chan              119 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGIO);
chan              121 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGIO, val);
chan              123 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGIO);
chan              125 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGIO, val);
chan              126 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		val = LPC_READ_REG(chan, RGLVL);
chan              128 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		LPC_WRITE_REG(chan, RGLVL, val);
chan              137 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	struct psb_intel_i2c_chan *chan;
chan              139 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan = kzalloc(sizeof(struct psb_intel_i2c_chan), GFP_KERNEL);
chan              140 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	if (!chan)
chan              143 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->drm_dev = dev;
chan              144 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->reg = dev_priv->lpc_gpio_base;
chan              145 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	strncpy(chan->adapter.name, "gma500 LPC",  I2C_NAME_SIZE - 1);
chan              146 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->adapter.owner = THIS_MODULE;
chan              147 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->adapter.algo_data = &chan->algo;
chan              148 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->adapter.dev.parent = &dev->pdev->dev;
chan              149 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.setsda = set_data;
chan              150 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.setscl = set_clock;
chan              151 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.getsda = get_data;
chan              152 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.getscl = get_clock;
chan              153 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.udelay = 100;
chan              154 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.timeout = usecs_to_jiffies(2200);
chan              155 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	chan->algo.data = chan;
chan              157 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan              159 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	set_data(chan, 1);
chan              160 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	set_clock(chan, 1);
chan              163 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	if (i2c_bit_add_bus(&chan->adapter)) {
chan              164 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 		kfree(chan);
chan              168 drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c 	gma_encoder->ddc_bus = chan;
chan              198 drivers/gpu/drm/gma500/psb_intel_drv.h void psb_intel_i2c_destroy(struct psb_intel_i2c_chan *chan);
chan             1536 drivers/gpu/drm/mediatek/mtk_hdmi.c 	unsigned int chan = params->cea.channels;
chan             1539 drivers/gpu/drm/mediatek/mtk_hdmi.c 		params->sample_rate, params->sample_width, chan);
chan             1544 drivers/gpu/drm/mediatek/mtk_hdmi.c 	switch (chan) {
chan             1558 drivers/gpu/drm/mediatek/mtk_hdmi.c 		dev_err(hdmi->dev, "channel[%d] not supported!\n", chan);
chan              436 drivers/gpu/drm/msm/hdmi/hdmi.c 	unsigned int chan;
chan              449 drivers/gpu/drm/msm/hdmi/hdmi.c 		chan = MSM_HDMI_AUDIO_CHANNEL_2;
chan              454 drivers/gpu/drm/msm/hdmi/hdmi.c 		chan = MSM_HDMI_AUDIO_CHANNEL_4;
chan              459 drivers/gpu/drm/msm/hdmi/hdmi.c 		chan = MSM_HDMI_AUDIO_CHANNEL_6;
chan              464 drivers/gpu/drm/msm/hdmi/hdmi.c 		chan = MSM_HDMI_AUDIO_CHANNEL_8;
chan              499 drivers/gpu/drm/msm/hdmi/hdmi.c 	msm_hdmi_audio_info_setup(hdmi, 1, chan, channel_allocation,
chan             1042 drivers/gpu/drm/nouveau/dispnv04/crtc.c nv04_finish_page_flip(struct nouveau_channel *chan,
chan             1045 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_fence_chan *fctx = chan->fence;
chan             1046 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_drm *drm = chan->drm;
chan             1081 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_channel *chan = drm->channel;
chan             1084 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	if (!nv04_finish_page_flip(chan, &state)) {
chan             1095 drivers/gpu/drm/nouveau/dispnv04/crtc.c nv04_page_flip_emit(struct nouveau_channel *chan,
chan             1101 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_fence_chan *fctx = chan->fence;
chan             1102 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_drm *drm = chan->drm;
chan             1113 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	ret = nouveau_fence_sync(old_bo, chan, false, false);
chan             1118 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	ret = RING_SPACE(chan, 2);
chan             1122 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	BEGIN_NV04(chan, NvSubSw, NV_SW_PAGE_FLIP, 1);
chan             1123 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	OUT_RING  (chan, 0x00000000);
chan             1124 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	FIRE_RING (chan);
chan             1126 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	ret = nouveau_fence_new(chan, false, pfence);
chan             1149 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	struct nouveau_channel *chan;
chan             1156 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	chan = drm->channel;
chan             1157 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	if (!chan)
chan             1159 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	cli = (void *)chan->user.client;
chan             1177 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	ret = nouveau_fence_sync(new_bo, chan, false, true);
chan             1201 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		ret = RING_SPACE(chan, 8);
chan             1205 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		BEGIN_NV04(chan, NvSubImageBlit, 0x012c, 1);
chan             1206 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		OUT_RING  (chan, 0);
chan             1207 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		BEGIN_NV04(chan, NvSubImageBlit, 0x0134, 1);
chan             1208 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		OUT_RING  (chan, head);
chan             1209 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		BEGIN_NV04(chan, NvSubImageBlit, 0x0100, 1);
chan             1210 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		OUT_RING  (chan, 0);
chan             1211 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		BEGIN_NV04(chan, NvSubImageBlit, 0x0130, 1);
chan             1212 drivers/gpu/drm/nouveau/dispnv04/crtc.c 		OUT_RING  (chan, 0);
chan             1217 drivers/gpu/drm/nouveau/dispnv04/crtc.c 	ret = nv04_page_flip_emit(chan, old_bo, new_bo, s, &fence);
chan               31 drivers/gpu/drm/nouveau/dispnv50/core.c 		nv50_dmac_destroy(&core->chan);
chan                8 drivers/gpu/drm/nouveau/dispnv50/core.h 	struct nv50_dmac chan;
chan               33 drivers/gpu/drm/nouveau/dispnv50/core507d.c 	if ((push = evo_wait(&core->chan, 5))) {
chan               42 drivers/gpu/drm/nouveau/dispnv50/core507d.c 		evo_kick(push, &core->chan);
chan               68 drivers/gpu/drm/nouveau/dispnv50/core507d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               70 drivers/gpu/drm/nouveau/dispnv50/core507d.c 		evo_data(push, core->chan.sync.handle);
chan               71 drivers/gpu/drm/nouveau/dispnv50/core507d.c 		evo_kick(push, &core->chan);
chan              102 drivers/gpu/drm/nouveau/dispnv50/core507d.c 			       disp->sync->bo.offset, &core->chan);
chan               31 drivers/gpu/drm/nouveau/dispnv50/corec37d.c 	if ((push = evo_wait(&core->chan, 9))) {
chan               47 drivers/gpu/drm/nouveau/dispnv50/corec37d.c 		evo_kick(push, &core->chan);
chan               79 drivers/gpu/drm/nouveau/dispnv50/corec37d.c 	if ((push = evo_wait(&core->chan, 2 + 6 * windows + 2))) {
chan               81 drivers/gpu/drm/nouveau/dispnv50/corec37d.c 		evo_data(push, core->chan.sync.handle);
chan               92 drivers/gpu/drm/nouveau/dispnv50/corec37d.c 		evo_kick(push, &core->chan);
chan               30 drivers/gpu/drm/nouveau/dispnv50/corec57d.c 	if ((push = evo_wait(&core->chan, 2 + 6 * windows + 2))) {
chan               32 drivers/gpu/drm/nouveau/dispnv50/corec57d.c 		evo_data(push, core->chan.sync.handle);
chan               43 drivers/gpu/drm/nouveau/dispnv50/corec57d.c 		evo_kick(push, &core->chan);
chan               54 drivers/gpu/drm/nouveau/dispnv50/curs507a.c 	u32 handle = nv50_disp(wndw->plane.dev)->core->chan.vram.handle;
chan               29 drivers/gpu/drm/nouveau/dispnv50/dac507d.c 	if ((push = evo_wait(&core->chan, 3))) {
chan               37 drivers/gpu/drm/nouveau/dispnv50/dac507d.c 		evo_kick(push, &core->chan);
chan               29 drivers/gpu/drm/nouveau/dispnv50/dac907d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               32 drivers/gpu/drm/nouveau/dispnv50/dac907d.c 		evo_kick(push, &core->chan);
chan               83 drivers/gpu/drm/nouveau/dispnv50/disp.c 		 struct nv50_chan *chan)
chan               88 drivers/gpu/drm/nouveau/dispnv50/disp.c 	chan->device = device;
chan               98 drivers/gpu/drm/nouveau/dispnv50/disp.c 						       data, size, &chan->user);
chan              100 drivers/gpu/drm/nouveau/dispnv50/disp.c 					nvif_object_map(&chan->user, NULL, 0);
chan              113 drivers/gpu/drm/nouveau/dispnv50/disp.c nv50_chan_destroy(struct nv50_chan *chan)
chan              115 drivers/gpu/drm/nouveau/dispnv50/disp.c 	nvif_object_fini(&chan->user);
chan             1796 drivers/gpu/drm/nouveau/dispnv50/disp.c 				       disp->core->chan.base.device))
chan              237 drivers/gpu/drm/nouveau/dispnv50/head.c 	asyh->olut.handle = disp->core->chan.vram.handle;
chan               28 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               41 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               55 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               82 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              109 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              121 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              161 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              173 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              222 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	asyh->core.handle = disp->core->chan.vram.handle;
chan              235 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              247 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              288 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              312 drivers/gpu/drm/nouveau/dispnv50/head507d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               28 drivers/gpu/drm/nouveau/dispnv50/head827d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               42 drivers/gpu/drm/nouveau/dispnv50/head827d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               58 drivers/gpu/drm/nouveau/dispnv50/head827d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               80 drivers/gpu/drm/nouveau/dispnv50/head827d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               94 drivers/gpu/drm/nouveau/dispnv50/head827d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               28 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               44 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               57 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               71 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               99 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              126 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              140 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              156 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              168 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              190 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              204 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              243 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              268 drivers/gpu/drm/nouveau/dispnv50/head907d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               28 drivers/gpu/drm/nouveau/dispnv50/head917d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               42 drivers/gpu/drm/nouveau/dispnv50/head917d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               29 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               57 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               71 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               85 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               99 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              126 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              138 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              164 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              188 drivers/gpu/drm/nouveau/dispnv50/headc37d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               29 drivers/gpu/drm/nouveau/dispnv50/headc57d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               57 drivers/gpu/drm/nouveau/dispnv50/headc57d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               75 drivers/gpu/drm/nouveau/dispnv50/headc57d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               87 drivers/gpu/drm/nouveau/dispnv50/headc57d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan              170 drivers/gpu/drm/nouveau/dispnv50/headc57d.c 	struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
chan               29 drivers/gpu/drm/nouveau/dispnv50/pior507d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               37 drivers/gpu/drm/nouveau/dispnv50/pior507d.c 		evo_kick(push, &core->chan);
chan               29 drivers/gpu/drm/nouveau/dispnv50/sor507d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               37 drivers/gpu/drm/nouveau/dispnv50/sor507d.c 		evo_kick(push, &core->chan);
chan               31 drivers/gpu/drm/nouveau/dispnv50/sor907d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               34 drivers/gpu/drm/nouveau/dispnv50/sor907d.c 		evo_kick(push, &core->chan);
chan               29 drivers/gpu/drm/nouveau/dispnv50/sorc37d.c 	if ((push = evo_wait(&core->chan, 2))) {
chan               32 drivers/gpu/drm/nouveau/dispnv50/sorc37d.c 		evo_kick(push, &core->chan);
chan               41 drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h 	struct list_head chan;
chan               10 drivers/gpu/drm/nouveau/include/nvkm/engine/sw.h 	struct list_head chan;
chan              114 drivers/gpu/drm/nouveau/nouveau_abi16.c nouveau_abi16_ntfy_fini(struct nouveau_abi16_chan *chan,
chan              118 drivers/gpu/drm/nouveau/nouveau_abi16.c 	nvkm_mm_free(&chan->heap, &ntfy->node);
chan              125 drivers/gpu/drm/nouveau/nouveau_abi16.c 			struct nouveau_abi16_chan *chan)
chan              131 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->chan && chan->ntfy)
chan              132 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_channel_idle(chan->chan);
chan              135 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) {
chan              136 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_abi16_ntfy_fini(chan, ntfy);
chan              139 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->ntfy) {
chan              140 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_vma_del(&chan->ntfy_vma);
chan              141 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_bo_unpin(chan->ntfy);
chan              142 drivers/gpu/drm/nouveau/nouveau_abi16.c 		drm_gem_object_put_unlocked(&chan->ntfy->bo.base);
chan              145 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->heap.block_size)
chan              146 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nvkm_mm_fini(&chan->heap);
chan              149 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->chan) {
chan              150 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_channel_idle(chan->chan);
chan              151 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_channel_del(&chan->chan);
chan              154 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_del(&chan->head);
chan              155 drivers/gpu/drm/nouveau/nouveau_abi16.c 	kfree(chan);
chan              162 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan, *temp;
chan              165 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_for_each_entry_safe(chan, temp, &abi16->channels, head) {
chan              166 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_abi16_chan_fini(abi16, chan);
chan              254 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              295 drivers/gpu/drm/nouveau/nouveau_abi16.c 	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan              296 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (!chan)
chan              299 drivers/gpu/drm/nouveau/nouveau_abi16.c 	INIT_LIST_HEAD(&chan->notifiers);
chan              300 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_add(&chan->head, &abi16->channels);
chan              304 drivers/gpu/drm/nouveau/nouveau_abi16.c 				  init->tt_ctxdma_handle, false, &chan->chan);
chan              308 drivers/gpu/drm/nouveau/nouveau_abi16.c 	init->channel = chan->chan->chid;
chan              314 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (chan->chan->push.buffer->bo.mem.mem_type == TTM_PL_VRAM)
chan              322 drivers/gpu/drm/nouveau/nouveau_abi16.c 		init->subchan[1].handle = chan->chan->nvsw.handle;
chan              329 drivers/gpu/drm/nouveau/nouveau_abi16.c 			      0, 0, &chan->ntfy);
chan              331 drivers/gpu/drm/nouveau/nouveau_abi16.c 		ret = nouveau_bo_pin(chan->ntfy, TTM_PL_FLAG_TT, false);
chan              336 drivers/gpu/drm/nouveau/nouveau_abi16.c 		ret = nouveau_vma_new(chan->ntfy, chan->chan->vmm,
chan              337 drivers/gpu/drm/nouveau/nouveau_abi16.c 				      &chan->ntfy_vma);
chan              342 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base,
chan              347 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvkm_mm_init(&chan->heap, 0, 0, PAGE_SIZE, 1);
chan              350 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_abi16_chan_fini(abi16, chan);
chan              357 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              359 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_for_each_entry(chan, &abi16->channels, head) {
chan              360 drivers/gpu/drm/nouveau/nouveau_abi16.c 		if (chan->chan->chid == channel)
chan              361 drivers/gpu/drm/nouveau/nouveau_abi16.c 			return chan;
chan              373 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              393 drivers/gpu/drm/nouveau/nouveau_abi16.c 		if (!(chan = nouveau_abi16_chan(abi16, args->v0.token)))
chan              395 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args->v0.object = nvif_handle(&chan->chan->user);
chan              410 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              415 drivers/gpu/drm/nouveau/nouveau_abi16.c 	chan = nouveau_abi16_chan(abi16, req->channel);
chan              416 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (!chan)
chan              418 drivers/gpu/drm/nouveau/nouveau_abi16.c 	nouveau_abi16_chan_fini(abi16, chan);
chan              427 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              441 drivers/gpu/drm/nouveau/nouveau_abi16.c 	chan = nouveau_abi16_chan(abi16, init->channel);
chan              442 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (!chan)
chan              445 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvif_object_sclass_get(&chan->chan->user, &sclass);
chan              502 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_add(&ntfy->head, &chan->notifiers);
chan              505 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvif_object_init(&chan->chan->user, init->handle, oclass,
chan              510 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_abi16_ntfy_fini(chan, ntfy);
chan              520 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              535 drivers/gpu/drm/nouveau/nouveau_abi16.c 	chan = nouveau_abi16_chan(abi16, info->channel);
chan              536 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (!chan)
chan              543 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_add(&ntfy->head, &chan->notifiers);
chan              545 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvkm_mm_head(&chan->heap, 0, 1, info->size, info->size, 1,
chan              555 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.start += chan->ntfy_vma->addr;
chan              556 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.limit += chan->ntfy_vma->addr;
chan              561 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.start += drm->agp.base + chan->ntfy->bo.offset;
chan              562 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.limit += drm->agp.base + chan->ntfy->bo.offset;
chan              566 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.start += chan->ntfy->bo.offset;
chan              567 drivers/gpu/drm/nouveau/nouveau_abi16.c 		args.limit += chan->ntfy->bo.offset;
chan              572 drivers/gpu/drm/nouveau/nouveau_abi16.c 	ret = nvif_object_init(&chan->chan->user, info->handle,
chan              583 drivers/gpu/drm/nouveau/nouveau_abi16.c 		nouveau_abi16_ntfy_fini(chan, ntfy);
chan              592 drivers/gpu/drm/nouveau/nouveau_abi16.c 	struct nouveau_abi16_chan *chan;
chan              599 drivers/gpu/drm/nouveau/nouveau_abi16.c 	chan = nouveau_abi16_chan(abi16, fini->channel);
chan              600 drivers/gpu/drm/nouveau/nouveau_abi16.c 	if (!chan)
chan              604 drivers/gpu/drm/nouveau/nouveau_abi16.c 	nouveau_channel_idle(chan->chan);
chan              606 drivers/gpu/drm/nouveau/nouveau_abi16.c 	list_for_each_entry(ntfy, &chan->notifiers, head) {
chan              608 drivers/gpu/drm/nouveau/nouveau_abi16.c 			nouveau_abi16_ntfy_fini(chan, ntfy);
chan               23 drivers/gpu/drm/nouveau/nouveau_abi16.h 	struct nouveau_channel *chan;
chan              739 drivers/gpu/drm/nouveau/nouveau_bo.c nve0_bo_move_init(struct nouveau_channel *chan, u32 handle)
chan              741 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 2);
chan              743 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0000, 1);
chan              744 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, handle & 0x0000ffff);
chan              745 drivers/gpu/drm/nouveau/nouveau_bo.c 		FIRE_RING (chan);
chan              751 drivers/gpu/drm/nouveau/nouveau_bo.c nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              755 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 10);
chan              757 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0400, 8);
chan              758 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[0].addr));
chan              759 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[0].addr));
chan              760 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[1].addr));
chan              761 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[1].addr));
chan              762 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              763 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              764 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              765 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, new_reg->num_pages);
chan              766 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_IMC0(chan, NvSubCopy, 0x0300, 0x0386);
chan              772 drivers/gpu/drm/nouveau/nouveau_bo.c nvc0_bo_move_init(struct nouveau_channel *chan, u32 handle)
chan              774 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 2);
chan              776 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0000, 1);
chan              777 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, handle);
chan              783 drivers/gpu/drm/nouveau/nouveau_bo.c nvc0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              796 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = RING_SPACE(chan, 11);
chan              800 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x030c, 8);
chan              801 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(src_offset));
chan              802 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(src_offset));
chan              803 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(dst_offset));
chan              804 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(dst_offset));
chan              805 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              806 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              807 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              808 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, line_count);
chan              809 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0300, 1);
chan              810 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000110);
chan              821 drivers/gpu/drm/nouveau/nouveau_bo.c nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              834 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = RING_SPACE(chan, 12);
chan              838 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0238, 2);
chan              839 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(dst_offset));
chan              840 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(dst_offset));
chan              841 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x030c, 6);
chan              842 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(src_offset));
chan              843 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(src_offset));
chan              844 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* src_pitch */
chan              845 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* dst_pitch */
chan              846 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* line_length */
chan              847 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, line_count);
chan              848 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NVC0(chan, NvSubCopy, 0x0300, 1);
chan              849 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00100110);
chan              860 drivers/gpu/drm/nouveau/nouveau_bo.c nva3_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              873 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = RING_SPACE(chan, 11);
chan              877 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x030c, 8);
chan              878 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(src_offset));
chan              879 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(src_offset));
chan              880 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(dst_offset));
chan              881 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(dst_offset));
chan              882 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              883 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              884 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE);
chan              885 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, line_count);
chan              886 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0300, 1);
chan              887 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000110);
chan              898 drivers/gpu/drm/nouveau/nouveau_bo.c nv98_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              902 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 7);
chan              904 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0320, 6);
chan              905 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[0].addr));
chan              906 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[0].addr));
chan              907 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[1].addr));
chan              908 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[1].addr));
chan              909 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000000 /* COPY */);
chan              910 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, new_reg->num_pages << PAGE_SHIFT);
chan              916 drivers/gpu/drm/nouveau/nouveau_bo.c nv84_bo_move_exec(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              920 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 7);
chan              922 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0304, 6);
chan              923 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, new_reg->num_pages << PAGE_SHIFT);
chan              924 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[0].addr));
chan              925 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[0].addr));
chan              926 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(mem->vma[1].addr));
chan              927 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(mem->vma[1].addr));
chan              928 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000000 /* MODE_COPY, QUERY_NONE */);
chan              934 drivers/gpu/drm/nouveau/nouveau_bo.c nv50_bo_move_init(struct nouveau_channel *chan, u32 handle)
chan              936 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 6);
chan              938 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0000, 1);
chan              939 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, handle);
chan              940 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0180, 3);
chan              941 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, chan->drm->ntfy.handle);
chan              942 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, chan->vram.handle);
chan              943 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, chan->vram.handle);
chan              950 drivers/gpu/drm/nouveau/nouveau_bo.c nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan              964 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = RING_SPACE(chan, 18 + 6 * (src_tiled + dst_tiled));
chan              973 drivers/gpu/drm/nouveau/nouveau_bo.c 			BEGIN_NV04(chan, NvSubCopy, 0x0200, 7);
chan              974 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              975 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              976 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, stride);
chan              977 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, height);
chan              978 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 1);
chan              979 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              980 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              982 drivers/gpu/drm/nouveau/nouveau_bo.c 			BEGIN_NV04(chan, NvSubCopy, 0x0200, 1);
chan              983 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 1);
chan              986 drivers/gpu/drm/nouveau/nouveau_bo.c 			BEGIN_NV04(chan, NvSubCopy, 0x021c, 7);
chan              987 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              988 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              989 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, stride);
chan              990 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, height);
chan              991 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 1);
chan              992 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              993 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 0);
chan              995 drivers/gpu/drm/nouveau/nouveau_bo.c 			BEGIN_NV04(chan, NvSubCopy, 0x021c, 1);
chan              996 drivers/gpu/drm/nouveau/nouveau_bo.c 			OUT_RING  (chan, 1);
chan              999 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0238, 2);
chan             1000 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(src_offset));
chan             1001 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, upper_32_bits(dst_offset));
chan             1002 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x030c, 8);
chan             1003 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(src_offset));
chan             1004 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, lower_32_bits(dst_offset));
chan             1005 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, stride);
chan             1006 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, stride);
chan             1007 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, stride);
chan             1008 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, height);
chan             1009 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000101);
chan             1010 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000000);
chan             1011 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1);
chan             1012 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0);
chan             1023 drivers/gpu/drm/nouveau/nouveau_bo.c nv04_bo_move_init(struct nouveau_channel *chan, u32 handle)
chan             1025 drivers/gpu/drm/nouveau/nouveau_bo.c 	int ret = RING_SPACE(chan, 4);
chan             1027 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0000, 1);
chan             1028 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, handle);
chan             1029 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, 0x0180, 1);
chan             1030 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, chan->drm->ntfy.handle);
chan             1038 drivers/gpu/drm/nouveau/nouveau_bo.c 		      struct nouveau_channel *chan, struct ttm_mem_reg *reg)
chan             1042 drivers/gpu/drm/nouveau/nouveau_bo.c 	return chan->vram.handle;
chan             1046 drivers/gpu/drm/nouveau/nouveau_bo.c nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo,
chan             1054 drivers/gpu/drm/nouveau/nouveau_bo.c 	ret = RING_SPACE(chan, 3);
chan             1058 drivers/gpu/drm/nouveau/nouveau_bo.c 	BEGIN_NV04(chan, NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2);
chan             1059 drivers/gpu/drm/nouveau/nouveau_bo.c 	OUT_RING  (chan, nouveau_bo_mem_ctxdma(bo, chan, old_reg));
chan             1060 drivers/gpu/drm/nouveau/nouveau_bo.c 	OUT_RING  (chan, nouveau_bo_mem_ctxdma(bo, chan, new_reg));
chan             1066 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = RING_SPACE(chan, 11);
chan             1070 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy,
chan             1072 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, src_offset);
chan             1073 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, dst_offset);
chan             1074 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* src_pitch */
chan             1075 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* dst_pitch */
chan             1076 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, PAGE_SIZE); /* line_length */
chan             1077 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, line_count);
chan             1078 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000101);
chan             1079 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0x00000000);
chan             1080 drivers/gpu/drm/nouveau/nouveau_bo.c 		BEGIN_NV04(chan, NvSubCopy, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1);
chan             1081 drivers/gpu/drm/nouveau/nouveau_bo.c 		OUT_RING  (chan, 0);
chan             1128 drivers/gpu/drm/nouveau/nouveau_bo.c 	struct nouveau_channel *chan = drm->ttm.chan;
chan             1129 drivers/gpu/drm/nouveau/nouveau_bo.c 	struct nouveau_cli *cli = (void *)chan->user.client;
chan             1144 drivers/gpu/drm/nouveau/nouveau_bo.c 	ret = nouveau_fence_sync(nouveau_bo(bo), chan, true, intr);
chan             1146 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = drm->ttm.move(chan, bo, &bo->mem, new_reg);
chan             1148 drivers/gpu/drm/nouveau/nouveau_bo.c 			ret = nouveau_fence_new(chan, false, &fence);
chan             1200 drivers/gpu/drm/nouveau/nouveau_bo.c 		struct nouveau_channel *chan;
chan             1203 drivers/gpu/drm/nouveau/nouveau_bo.c 			chan = drm->cechan;
chan             1205 drivers/gpu/drm/nouveau/nouveau_bo.c 			chan = drm->channel;
chan             1206 drivers/gpu/drm/nouveau/nouveau_bo.c 		if (chan == NULL)
chan             1209 drivers/gpu/drm/nouveau/nouveau_bo.c 		ret = nvif_object_init(&chan->user,
chan             1214 drivers/gpu/drm/nouveau/nouveau_bo.c 			ret = mthd->init(chan, drm->ttm.copy.handle);
chan             1221 drivers/gpu/drm/nouveau/nouveau_bo.c 			drm->ttm.chan = chan;
chan               54 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_channel *chan = container_of(ntfy, typeof(*chan), kill);
chan               55 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_cli *cli = (void *)chan->user.client;
chan               56 drivers/gpu/drm/nouveau/nouveau_chan.c 	NV_PRINTK(warn, cli, "channel %d killed!\n", chan->chid);
chan               57 drivers/gpu/drm/nouveau/nouveau_chan.c 	atomic_set(&chan->killed, 1);
chan               62 drivers/gpu/drm/nouveau/nouveau_chan.c nouveau_channel_idle(struct nouveau_channel *chan)
chan               64 drivers/gpu/drm/nouveau/nouveau_chan.c 	if (likely(chan && chan->fence && !atomic_read(&chan->killed))) {
chan               65 drivers/gpu/drm/nouveau/nouveau_chan.c 		struct nouveau_cli *cli = (void *)chan->user.client;
chan               69 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nouveau_fence_new(chan, false, &fence);
chan               77 drivers/gpu/drm/nouveau/nouveau_chan.c 				  chan->chid, nvxx_client(&cli->base)->name);
chan               87 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_channel *chan = *pchan;
chan               88 drivers/gpu/drm/nouveau/nouveau_chan.c 	if (chan) {
chan               89 drivers/gpu/drm/nouveau/nouveau_chan.c 		struct nouveau_cli *cli = (void *)chan->user.client;
chan               97 drivers/gpu/drm/nouveau/nouveau_chan.c 		if (chan->fence)
chan               98 drivers/gpu/drm/nouveau/nouveau_chan.c 			nouveau_fence(chan->drm)->context_del(chan);
chan              101 drivers/gpu/drm/nouveau/nouveau_chan.c 			nouveau_svmm_part(chan->vmm->svmm, chan->inst);
chan              103 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_object_fini(&chan->nvsw);
chan              104 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_object_fini(&chan->gart);
chan              105 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_object_fini(&chan->vram);
chan              106 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_notify_fini(&chan->kill);
chan              107 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_object_fini(&chan->user);
chan              108 drivers/gpu/drm/nouveau/nouveau_chan.c 		nvif_object_fini(&chan->push.ctxdma);
chan              109 drivers/gpu/drm/nouveau/nouveau_chan.c 		nouveau_vma_del(&chan->push.vma);
chan              110 drivers/gpu/drm/nouveau/nouveau_chan.c 		nouveau_bo_unmap(chan->push.buffer);
chan              111 drivers/gpu/drm/nouveau/nouveau_chan.c 		if (chan->push.buffer && chan->push.buffer->pin_refcnt)
chan              112 drivers/gpu/drm/nouveau/nouveau_chan.c 			nouveau_bo_unpin(chan->push.buffer);
chan              113 drivers/gpu/drm/nouveau/nouveau_chan.c 		nouveau_bo_ref(NULL, &chan->push.buffer);
chan              114 drivers/gpu/drm/nouveau/nouveau_chan.c 		kfree(chan);
chan              128 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_channel *chan;
chan              132 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan = *pchan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan              133 drivers/gpu/drm/nouveau/nouveau_chan.c 	if (!chan)
chan              136 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->device = device;
chan              137 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->drm = drm;
chan              138 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->vmm = cli->svm.cli ? &cli->svm : &cli->vmm;
chan              139 drivers/gpu/drm/nouveau/nouveau_chan.c 	atomic_set(&chan->killed, 0);
chan              147 drivers/gpu/drm/nouveau/nouveau_chan.c 			    &chan->push.buffer);
chan              149 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nouveau_bo_pin(chan->push.buffer, target, false);
chan              151 drivers/gpu/drm/nouveau/nouveau_chan.c 			ret = nouveau_bo_map(chan->push.buffer);
chan              163 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->push.addr = chan->push.buffer->bo.offset;
chan              166 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nouveau_vma_new(chan->push.buffer, chan->vmm,
chan              167 drivers/gpu/drm/nouveau/nouveau_chan.c 				      &chan->push.vma);
chan              173 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->push.addr = chan->push.vma->addr;
chan              181 drivers/gpu/drm/nouveau/nouveau_chan.c 		args.limit = chan->vmm->vmm.limit - 1;
chan              183 drivers/gpu/drm/nouveau/nouveau_chan.c 	if (chan->push.buffer->bo.mem.mem_type == TTM_PL_VRAM) {
chan              201 drivers/gpu/drm/nouveau/nouveau_chan.c 		if (chan->drm->agp.bridge) {
chan              204 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.start = chan->drm->agp.base;
chan              205 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->drm->agp.base +
chan              206 drivers/gpu/drm/nouveau/nouveau_chan.c 				     chan->drm->agp.size - 1;
chan              211 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->vmm->vmm.limit - 1;
chan              216 drivers/gpu/drm/nouveau/nouveau_chan.c 			       &args, sizeof(args), &chan->push.ctxdma);
chan              246 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_channel *chan;
chan              251 drivers/gpu/drm/nouveau/nouveau_chan.c 	ret = nouveau_channel_prep(drm, device, 0x12000, &chan);
chan              252 drivers/gpu/drm/nouveau/nouveau_chan.c 	*pchan = chan;
chan              261 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.volta.ioffset = 0x10000 + chan->push.addr;
chan              263 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.volta.vmm = nvif_handle(&chan->vmm->vmm.object);
chan              270 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.kepler.ioffset = 0x10000 + chan->push.addr;
chan              272 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.kepler.vmm = nvif_handle(&chan->vmm->vmm.object);
chan              279 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.fermi.ioffset = 0x10000 + chan->push.addr;
chan              280 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.fermi.vmm = nvif_handle(&chan->vmm->vmm.object);
chan              285 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.nv50.ioffset = 0x10000 + chan->push.addr;
chan              286 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.nv50.pushbuf = nvif_handle(&chan->push.ctxdma);
chan              287 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.nv50.vmm = nvif_handle(&chan->vmm->vmm.object);
chan              292 drivers/gpu/drm/nouveau/nouveau_chan.c 				       &args, size, &chan->user);
chan              294 drivers/gpu/drm/nouveau/nouveau_chan.c 			if (chan->user.oclass >= VOLTA_CHANNEL_GPFIFO_A) {
chan              295 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->chid = args.volta.chid;
chan              296 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->inst = args.volta.inst;
chan              297 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->token = args.volta.token;
chan              299 drivers/gpu/drm/nouveau/nouveau_chan.c 			if (chan->user.oclass >= KEPLER_CHANNEL_GPFIFO_A) {
chan              300 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->chid = args.kepler.chid;
chan              301 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->inst = args.kepler.inst;
chan              303 drivers/gpu/drm/nouveau/nouveau_chan.c 			if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO) {
chan              304 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->chid = args.fermi.chid;
chan              306 drivers/gpu/drm/nouveau/nouveau_chan.c 				chan->chid = args.nv50.chid;
chan              327 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_channel *chan;
chan              331 drivers/gpu/drm/nouveau/nouveau_chan.c 	ret = nouveau_channel_prep(drm, device, 0x10000, &chan);
chan              332 drivers/gpu/drm/nouveau/nouveau_chan.c 	*pchan = chan;
chan              338 drivers/gpu/drm/nouveau/nouveau_chan.c 	args.pushbuf = nvif_handle(&chan->push.ctxdma);
chan              339 drivers/gpu/drm/nouveau/nouveau_chan.c 	args.offset = chan->push.addr;
chan              343 drivers/gpu/drm/nouveau/nouveau_chan.c 				       &args, sizeof(args), &chan->user);
chan              345 drivers/gpu/drm/nouveau/nouveau_chan.c 			chan->chid = args.chid;
chan              355 drivers/gpu/drm/nouveau/nouveau_chan.c nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
chan              357 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nvif_device *device = chan->device;
chan              358 drivers/gpu/drm/nouveau/nouveau_chan.c 	struct nouveau_drm *drm = chan->drm;
chan              362 drivers/gpu/drm/nouveau/nouveau_chan.c 	nvif_object_map(&chan->user, NULL, 0);
chan              364 drivers/gpu/drm/nouveau/nouveau_chan.c 	if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO) {
chan              365 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nvif_notify_init(&chan->user, nouveau_channel_killed,
chan              367 drivers/gpu/drm/nouveau/nouveau_chan.c 				       NULL, 0, 0, &chan->kill);
chan              369 drivers/gpu/drm/nouveau/nouveau_chan.c 			ret = nvif_notify_get(&chan->kill);
chan              383 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->vmm->vmm.limit - 1;
chan              391 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nvif_object_init(&chan->user, vram, NV_DMA_IN_MEMORY,
chan              392 drivers/gpu/drm/nouveau/nouveau_chan.c 				       &args, sizeof(args), &chan->vram);
chan              400 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->vmm->vmm.limit - 1;
chan              402 drivers/gpu/drm/nouveau/nouveau_chan.c 		if (chan->drm->agp.bridge) {
chan              405 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.start = chan->drm->agp.base;
chan              406 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->drm->agp.base +
chan              407 drivers/gpu/drm/nouveau/nouveau_chan.c 				     chan->drm->agp.size - 1;
chan              412 drivers/gpu/drm/nouveau/nouveau_chan.c 			args.limit = chan->vmm->vmm.limit - 1;
chan              415 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nvif_object_init(&chan->user, gart, NV_DMA_IN_MEMORY,
chan              416 drivers/gpu/drm/nouveau/nouveau_chan.c 				       &args, sizeof(args), &chan->gart);
chan              422 drivers/gpu/drm/nouveau/nouveau_chan.c 	switch (chan->user.oclass & 0x00ff) {
chan              425 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->user_put = 0x40;
chan              426 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->user_get = 0x44;
chan              427 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.max = (0x10000 / 4) - 2;
chan              430 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->user_put = 0x40;
chan              431 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->user_get = 0x44;
chan              432 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->user_get_hi = 0x60;
chan              433 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.ib_base =  0x10000 / 4;
chan              434 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.ib_max  = (0x02000 / 8) - 1;
chan              435 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.ib_put  = 0;
chan              436 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.ib_free = chan->dma.ib_max - chan->dma.ib_put;
chan              437 drivers/gpu/drm/nouveau/nouveau_chan.c 		chan->dma.max = chan->dma.ib_base;
chan              441 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->dma.put = 0;
chan              442 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->dma.cur = chan->dma.put;
chan              443 drivers/gpu/drm/nouveau/nouveau_chan.c 	chan->dma.free = chan->dma.max - chan->dma.cur;
chan              445 drivers/gpu/drm/nouveau/nouveau_chan.c 	ret = RING_SPACE(chan, NOUVEAU_DMA_SKIPS);
chan              450 drivers/gpu/drm/nouveau/nouveau_chan.c 		OUT_RING(chan, 0x00000000);
chan              454 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = nvif_object_init(&chan->user, 0x006e,
chan              456 drivers/gpu/drm/nouveau/nouveau_chan.c 				       NULL, 0, &chan->nvsw);
chan              460 drivers/gpu/drm/nouveau/nouveau_chan.c 		ret = RING_SPACE(chan, 2);
chan              464 drivers/gpu/drm/nouveau/nouveau_chan.c 		BEGIN_NV04(chan, NvSubSw, 0x0000, 1);
chan              465 drivers/gpu/drm/nouveau/nouveau_chan.c 		OUT_RING  (chan, chan->nvsw.handle);
chan              466 drivers/gpu/drm/nouveau/nouveau_chan.c 		FIRE_RING (chan);
chan              470 drivers/gpu/drm/nouveau/nouveau_chan.c 	return nouveau_fence(chan->drm)->context_new(chan);
chan              531 drivers/gpu/drm/nouveau/nouveau_chan.c 	drm->chan.nr = args.v.channels.data;
chan              532 drivers/gpu/drm/nouveau/nouveau_chan.c 	drm->chan.context_base = dma_fence_context_alloc(drm->chan.nr);
chan               34 drivers/gpu/drm/nouveau/nouveau_dma.c OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords)
chan               37 drivers/gpu/drm/nouveau/nouveau_dma.c 	u32 *mem = ttm_kmap_obj_virtual(&chan->push.buffer->kmap, &is_iomem);
chan               38 drivers/gpu/drm/nouveau/nouveau_dma.c 	mem = &mem[chan->dma.cur];
chan               43 drivers/gpu/drm/nouveau/nouveau_dma.c 	chan->dma.cur += nr_dwords;
chan               54 drivers/gpu/drm/nouveau/nouveau_dma.c READ_GET(struct nouveau_channel *chan, uint64_t *prev_get, int *timeout)
chan               58 drivers/gpu/drm/nouveau/nouveau_dma.c 	val = nvif_rd32(&chan->user, chan->user_get);
chan               59 drivers/gpu/drm/nouveau/nouveau_dma.c         if (chan->user_get_hi)
chan               60 drivers/gpu/drm/nouveau/nouveau_dma.c                 val |= (uint64_t)nvif_rd32(&chan->user, chan->user_get_hi) << 32;
chan               77 drivers/gpu/drm/nouveau/nouveau_dma.c 	if (val < chan->push.addr ||
chan               78 drivers/gpu/drm/nouveau/nouveau_dma.c 	    val > chan->push.addr + (chan->dma.max << 2))
chan               81 drivers/gpu/drm/nouveau/nouveau_dma.c 	return (val - chan->push.addr) >> 2;
chan               85 drivers/gpu/drm/nouveau/nouveau_dma.c nv50_dma_push(struct nouveau_channel *chan, u64 offset, int length)
chan               87 drivers/gpu/drm/nouveau/nouveau_dma.c 	struct nvif_user *user = &chan->drm->client.device.user;
chan               88 drivers/gpu/drm/nouveau/nouveau_dma.c 	struct nouveau_bo *pb = chan->push.buffer;
chan               89 drivers/gpu/drm/nouveau/nouveau_dma.c 	int ip = (chan->dma.ib_put * 2) + chan->dma.ib_base;
chan               91 drivers/gpu/drm/nouveau/nouveau_dma.c 	BUG_ON(chan->dma.ib_free < 1);
chan               96 drivers/gpu/drm/nouveau/nouveau_dma.c 	chan->dma.ib_put = (chan->dma.ib_put + 1) & chan->dma.ib_max;
chan              102 drivers/gpu/drm/nouveau/nouveau_dma.c 	nvif_wr32(&chan->user, 0x8c, chan->dma.ib_put);
chan              104 drivers/gpu/drm/nouveau/nouveau_dma.c 		user->func->doorbell(user, chan->token);
chan              105 drivers/gpu/drm/nouveau/nouveau_dma.c 	chan->dma.ib_free--;
chan              109 drivers/gpu/drm/nouveau/nouveau_dma.c nv50_dma_push_wait(struct nouveau_channel *chan, int count)
chan              113 drivers/gpu/drm/nouveau/nouveau_dma.c 	while (chan->dma.ib_free < count) {
chan              114 drivers/gpu/drm/nouveau/nouveau_dma.c 		uint32_t get = nvif_rd32(&chan->user, 0x88);
chan              126 drivers/gpu/drm/nouveau/nouveau_dma.c 		chan->dma.ib_free = get - chan->dma.ib_put;
chan              127 drivers/gpu/drm/nouveau/nouveau_dma.c 		if (chan->dma.ib_free <= 0)
chan              128 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.ib_free += chan->dma.ib_max;
chan              135 drivers/gpu/drm/nouveau/nouveau_dma.c nv50_dma_wait(struct nouveau_channel *chan, int slots, int count)
chan              140 drivers/gpu/drm/nouveau/nouveau_dma.c 	ret = nv50_dma_push_wait(chan, slots + 1);
chan              144 drivers/gpu/drm/nouveau/nouveau_dma.c 	while (chan->dma.free < count) {
chan              145 drivers/gpu/drm/nouveau/nouveau_dma.c 		int get = READ_GET(chan, &prev_get, &cnt);
chan              153 drivers/gpu/drm/nouveau/nouveau_dma.c 		if (get <= chan->dma.cur) {
chan              154 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.free = chan->dma.max - chan->dma.cur;
chan              155 drivers/gpu/drm/nouveau/nouveau_dma.c 			if (chan->dma.free >= count)
chan              158 drivers/gpu/drm/nouveau/nouveau_dma.c 			FIRE_RING(chan);
chan              160 drivers/gpu/drm/nouveau/nouveau_dma.c 				get = READ_GET(chan, &prev_get, &cnt);
chan              167 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.cur = 0;
chan              168 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.put = 0;
chan              171 drivers/gpu/drm/nouveau/nouveau_dma.c 		chan->dma.free = get - chan->dma.cur - 1;
chan              178 drivers/gpu/drm/nouveau/nouveau_dma.c nouveau_dma_wait(struct nouveau_channel *chan, int slots, int size)
chan              183 drivers/gpu/drm/nouveau/nouveau_dma.c 	if (chan->dma.ib_max)
chan              184 drivers/gpu/drm/nouveau/nouveau_dma.c 		return nv50_dma_wait(chan, slots, size);
chan              186 drivers/gpu/drm/nouveau/nouveau_dma.c 	while (chan->dma.free < size) {
chan              187 drivers/gpu/drm/nouveau/nouveau_dma.c 		get = READ_GET(chan, &prev_get, &cnt);
chan              203 drivers/gpu/drm/nouveau/nouveau_dma.c 		if (get <= chan->dma.cur) {
chan              217 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.free = chan->dma.max - chan->dma.cur;
chan              218 drivers/gpu/drm/nouveau/nouveau_dma.c 			if (chan->dma.free >= size)
chan              225 drivers/gpu/drm/nouveau/nouveau_dma.c 			OUT_RING(chan, chan->push.addr | 0x20000000);
chan              233 drivers/gpu/drm/nouveau/nouveau_dma.c 				get = READ_GET(chan, &prev_get, &cnt);
chan              244 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.cur  =
chan              245 drivers/gpu/drm/nouveau/nouveau_dma.c 			chan->dma.put  = NOUVEAU_DMA_SKIPS;
chan              254 drivers/gpu/drm/nouveau/nouveau_dma.c 		chan->dma.free = get - chan->dma.cur - 1;
chan               87 drivers/gpu/drm/nouveau/nouveau_dma.h RING_SPACE(struct nouveau_channel *chan, int size)
chan               91 drivers/gpu/drm/nouveau/nouveau_dma.h 	ret = nouveau_dma_wait(chan, 1, size);
chan               95 drivers/gpu/drm/nouveau/nouveau_dma.h 	chan->dma.free -= size;
chan              100 drivers/gpu/drm/nouveau/nouveau_dma.h OUT_RING(struct nouveau_channel *chan, int data)
chan              102 drivers/gpu/drm/nouveau/nouveau_dma.h 	nouveau_bo_wr32(chan->push.buffer, chan->dma.cur++, data);
chan              106 drivers/gpu/drm/nouveau/nouveau_dma.h OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords);
chan              109 drivers/gpu/drm/nouveau/nouveau_dma.h BEGIN_NV04(struct nouveau_channel *chan, int subc, int mthd, int size)
chan              111 drivers/gpu/drm/nouveau/nouveau_dma.h 	OUT_RING(chan, 0x00000000 | (subc << 13) | (size << 18) | mthd);
chan              115 drivers/gpu/drm/nouveau/nouveau_dma.h BEGIN_NI04(struct nouveau_channel *chan, int subc, int mthd, int size)
chan              117 drivers/gpu/drm/nouveau/nouveau_dma.h 	OUT_RING(chan, 0x40000000 | (subc << 13) | (size << 18) | mthd);
chan              121 drivers/gpu/drm/nouveau/nouveau_dma.h BEGIN_NVC0(struct nouveau_channel *chan, int subc, int mthd, int size)
chan              123 drivers/gpu/drm/nouveau/nouveau_dma.h 	OUT_RING(chan, 0x20000000 | (size << 16) | (subc << 13) | (mthd >> 2));
chan              127 drivers/gpu/drm/nouveau/nouveau_dma.h BEGIN_NIC0(struct nouveau_channel *chan, int subc, int mthd, int size)
chan              129 drivers/gpu/drm/nouveau/nouveau_dma.h 	OUT_RING(chan, 0x60000000 | (size << 16) | (subc << 13) | (mthd >> 2));
chan              133 drivers/gpu/drm/nouveau/nouveau_dma.h BEGIN_IMC0(struct nouveau_channel *chan, int subc, int mthd, u16 data)
chan              135 drivers/gpu/drm/nouveau/nouveau_dma.h 	OUT_RING(chan, 0x80000000 | (data << 16) | (subc << 13) | (mthd >> 2));
chan              140 drivers/gpu/drm/nouveau/nouveau_dma.h 	nouveau_bo_rd32(chan->push.buffer, 0);                                 \
chan              141 drivers/gpu/drm/nouveau/nouveau_dma.h 	nvif_wr32(&chan->user, chan->user_put, ((val) << 2) + chan->push.addr);\
chan              145 drivers/gpu/drm/nouveau/nouveau_dma.h FIRE_RING(struct nouveau_channel *chan)
chan              147 drivers/gpu/drm/nouveau/nouveau_dma.h 	if (chan->dma.cur == chan->dma.put)
chan              149 drivers/gpu/drm/nouveau/nouveau_dma.h 	chan->accel_done = true;
chan              151 drivers/gpu/drm/nouveau/nouveau_dma.h 	if (chan->dma.ib_max) {
chan              152 drivers/gpu/drm/nouveau/nouveau_dma.h 		nv50_dma_push(chan, chan->push.addr + (chan->dma.put << 2),
chan              153 drivers/gpu/drm/nouveau/nouveau_dma.h 			      (chan->dma.cur - chan->dma.put) << 2);
chan              155 drivers/gpu/drm/nouveau/nouveau_dma.h 		WRITE_PUT(chan->dma.cur);
chan              158 drivers/gpu/drm/nouveau/nouveau_dma.h 	chan->dma.put = chan->dma.cur;
chan              162 drivers/gpu/drm/nouveau/nouveau_dma.h WIND_RING(struct nouveau_channel *chan)
chan              164 drivers/gpu/drm/nouveau/nouveau_dma.h 	chan->dma.cur = chan->dma.put;
chan               69 drivers/gpu/drm/nouveau/nouveau_dmem.c 	struct nouveau_channel *chan;
chan              195 drivers/gpu/drm/nouveau/nouveau_dmem.c 	nouveau_fence_new(dmem->migrate.chan, false, &fence);
chan              418 drivers/gpu/drm/nouveau/nouveau_dmem.c 	struct nouveau_channel *chan = drm->dmem->migrate.chan;
chan              426 drivers/gpu/drm/nouveau/nouveau_dmem.c 	ret = RING_SPACE(chan, 13);
chan              433 drivers/gpu/drm/nouveau/nouveau_dmem.c 			BEGIN_IMC0(chan, NvSubCopy, 0x0260, 0);
chan              436 drivers/gpu/drm/nouveau/nouveau_dmem.c 			BEGIN_IMC0(chan, NvSubCopy, 0x0260, 1);
chan              447 drivers/gpu/drm/nouveau/nouveau_dmem.c 			BEGIN_IMC0(chan, NvSubCopy, 0x0264, 0);
chan              450 drivers/gpu/drm/nouveau/nouveau_dmem.c 			BEGIN_IMC0(chan, NvSubCopy, 0x0264, 1);
chan              458 drivers/gpu/drm/nouveau/nouveau_dmem.c 	BEGIN_NVC0(chan, NvSubCopy, 0x0400, 8);
chan              459 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, upper_32_bits(src_addr));
chan              460 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, lower_32_bits(src_addr));
chan              461 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, upper_32_bits(dst_addr));
chan              462 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, lower_32_bits(dst_addr));
chan              463 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, PAGE_SIZE);
chan              464 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, PAGE_SIZE);
chan              465 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, PAGE_SIZE);
chan              466 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, npages);
chan              467 drivers/gpu/drm/nouveau/nouveau_dmem.c 	BEGIN_NVC0(chan, NvSubCopy, 0x0300, 1);
chan              468 drivers/gpu/drm/nouveau/nouveau_dmem.c 	OUT_RING  (chan, launch_dma);
chan              481 drivers/gpu/drm/nouveau/nouveau_dmem.c 		drm->dmem->migrate.chan = drm->ttm.chan;
chan              607 drivers/gpu/drm/nouveau/nouveau_dmem.c 	nouveau_fence_new(drm->dmem->migrate.chan, false, &fence);
chan              157 drivers/gpu/drm/nouveau/nouveau_drv.h 		struct nouveau_channel *chan;
chan              178 drivers/gpu/drm/nouveau/nouveau_drv.h 	} chan;
chan              164 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              167 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	if (!chan || !chan->accel_done || in_interrupt() ||
chan              175 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	ret = nouveau_channel_idle(chan);
chan              182 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	chan->accel_done = false;
chan              316 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	struct nouveau_channel *chan;
chan              354 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	chan = nouveau_nofbaccel ? NULL : drm->channel;
chan              355 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	if (chan && device->info.family >= NV_DEVICE_INFO_V0_TESLA) {
chan              356 drivers/gpu/drm/nouveau/nouveau_fbcon.c 		ret = nouveau_vma_new(nvbo, chan->vmm, &fb->vma);
chan              359 drivers/gpu/drm/nouveau/nouveau_fbcon.c 			chan = NULL;
chan              372 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	if (!chan)
chan              390 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	if (chan)
chan              402 drivers/gpu/drm/nouveau/nouveau_fbcon.c 	if (chan)
chan               82 drivers/gpu/drm/nouveau/nouveau_fence.c 	if (fence->context < drm->chan.context_base ||
chan               83 drivers/gpu/drm/nouveau/nouveau_fence.c 	    fence->context >= drm->chan.context_base + drm->chan.nr)
chan              126 drivers/gpu/drm/nouveau/nouveau_fence.c nouveau_fence_update(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
chan              130 drivers/gpu/drm/nouveau/nouveau_fence.c 	u32 seq = fctx->read(chan);
chan              155 drivers/gpu/drm/nouveau/nouveau_fence.c 		struct nouveau_channel *chan;
chan              158 drivers/gpu/drm/nouveau/nouveau_fence.c 		chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock));
chan              159 drivers/gpu/drm/nouveau/nouveau_fence.c 		if (nouveau_fence_update(chan, fctx))
chan              168 drivers/gpu/drm/nouveau/nouveau_fence.c nouveau_fence_context_new(struct nouveau_channel *chan, struct nouveau_fence_chan *fctx)
chan              170 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_fence_priv *priv = (void*)chan->drm->fence;
chan              171 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_cli *cli = (void *)chan->user.client;
chan              177 drivers/gpu/drm/nouveau/nouveau_fence.c 	fctx->context = chan->drm->chan.context_base + chan->chid;
chan              179 drivers/gpu/drm/nouveau/nouveau_fence.c 	if (chan == chan->drm->cechan)
chan              181 drivers/gpu/drm/nouveau/nouveau_fence.c 	else if (chan == chan->drm->channel)
chan              190 drivers/gpu/drm/nouveau/nouveau_fence.c 	ret = nvif_notify_init(&chan->user, nouveau_fence_wait_uevent_handler,
chan              201 drivers/gpu/drm/nouveau/nouveau_fence.c nouveau_fence_emit(struct nouveau_fence *fence, struct nouveau_channel *chan)
chan              203 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_fence_chan *fctx = chan->fence;
chan              204 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_fence_priv *priv = (void*)chan->drm->fence;
chan              207 drivers/gpu/drm/nouveau/nouveau_fence.c 	fence->channel  = chan;
chan              224 drivers/gpu/drm/nouveau/nouveau_fence.c 		if (nouveau_fence_update(chan, fctx))
chan              240 drivers/gpu/drm/nouveau/nouveau_fence.c 		struct nouveau_channel *chan;
chan              247 drivers/gpu/drm/nouveau/nouveau_fence.c 		chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock));
chan              248 drivers/gpu/drm/nouveau/nouveau_fence.c 		if (chan && nouveau_fence_update(chan, fctx))
chan              333 drivers/gpu/drm/nouveau/nouveau_fence.c nouveau_fence_sync(struct nouveau_bo *nvbo, struct nouveau_channel *chan, bool exclusive, bool intr)
chan              335 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_fence_chan *fctx = chan->fence;
chan              356 drivers/gpu/drm/nouveau/nouveau_fence.c 		f = nouveau_local_fence(fence, chan->drm);
chan              360 drivers/gpu/drm/nouveau/nouveau_fence.c 			if (prev && (prev == chan || fctx->sync(f, prev, chan) == 0))
chan              381 drivers/gpu/drm/nouveau/nouveau_fence.c 		f = nouveau_local_fence(fence, chan->drm);
chan              385 drivers/gpu/drm/nouveau/nouveau_fence.c 			if (prev && (prev == chan || fctx->sync(f, prev, chan) == 0))
chan              406 drivers/gpu/drm/nouveau/nouveau_fence.c nouveau_fence_new(struct nouveau_channel *chan, bool sysmem,
chan              412 drivers/gpu/drm/nouveau/nouveau_fence.c 	if (unlikely(!chan->fence))
chan              419 drivers/gpu/drm/nouveau/nouveau_fence.c 	ret = nouveau_fence_emit(fence, chan);
chan              450 drivers/gpu/drm/nouveau/nouveau_fence.c 	struct nouveau_channel *chan;
chan              454 drivers/gpu/drm/nouveau/nouveau_fence.c 	chan = rcu_dereference(fence->channel);
chan              455 drivers/gpu/drm/nouveau/nouveau_fence.c 	if (chan)
chan              456 drivers/gpu/drm/nouveau/nouveau_fence.c 		ret = (int)(fctx->read(chan) - fence->base.seqno) >= 0;
chan              330 drivers/gpu/drm/nouveau/nouveau_gem.c validate_fini_no_ticket(struct validate_op *op, struct nouveau_channel *chan,
chan              344 drivers/gpu/drm/nouveau/nouveau_gem.c 			if (chan->vmm->vmm.object.oclass >= NVIF_CLASS_VMM_NV50) {
chan              366 drivers/gpu/drm/nouveau/nouveau_gem.c validate_fini(struct validate_op *op, struct nouveau_channel *chan,
chan              370 drivers/gpu/drm/nouveau/nouveau_gem.c 	validate_fini_no_ticket(op, chan, fence, pbbo);
chan              375 drivers/gpu/drm/nouveau/nouveau_gem.c validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
chan              425 drivers/gpu/drm/nouveau/nouveau_gem.c 			validate_fini_no_ticket(op, chan, NULL, NULL);
chan              439 drivers/gpu/drm/nouveau/nouveau_gem.c 		if (chan->vmm->vmm.object.oclass >= NVIF_CLASS_VMM_NV50) {
chan              440 drivers/gpu/drm/nouveau/nouveau_gem.c 			struct nouveau_vmm *vmm = chan->vmm;
chan              480 drivers/gpu/drm/nouveau/nouveau_gem.c 		validate_fini(op, chan, NULL, NULL);
chan              486 drivers/gpu/drm/nouveau/nouveau_gem.c validate_list(struct nouveau_channel *chan, struct nouveau_cli *cli,
chan              490 drivers/gpu/drm/nouveau/nouveau_gem.c 	struct nouveau_drm *drm = chan->drm;
chan              514 drivers/gpu/drm/nouveau/nouveau_gem.c 		ret = nouveau_fence_sync(nvbo, chan, !!b->write_domains, true);
chan              547 drivers/gpu/drm/nouveau/nouveau_gem.c nouveau_gem_pushbuf_validate(struct nouveau_channel *chan,
chan              561 drivers/gpu/drm/nouveau/nouveau_gem.c 	ret = validate_init(chan, file_priv, pbbo, nr_buffers, op);
chan              568 drivers/gpu/drm/nouveau/nouveau_gem.c 	ret = validate_list(chan, cli, &op->list, pbbo, user_buffers);
chan              572 drivers/gpu/drm/nouveau/nouveau_gem.c 		validate_fini(op, chan, NULL, NULL);
chan              697 drivers/gpu/drm/nouveau/nouveau_gem.c 	struct nouveau_channel *chan = NULL;
chan              706 drivers/gpu/drm/nouveau/nouveau_gem.c 		if (temp->chan->chid == req->channel) {
chan              707 drivers/gpu/drm/nouveau/nouveau_gem.c 			chan = temp->chan;
chan              712 drivers/gpu/drm/nouveau/nouveau_gem.c 	if (!chan)
chan              758 drivers/gpu/drm/nouveau/nouveau_gem.c 	ret = nouveau_gem_pushbuf_validate(chan, file_priv, bo, req->buffers,
chan              775 drivers/gpu/drm/nouveau/nouveau_gem.c 	if (chan->dma.ib_max) {
chan              776 drivers/gpu/drm/nouveau/nouveau_gem.c 		ret = nouveau_dma_wait(chan, req->nr_push + 1, 16);
chan              786 drivers/gpu/drm/nouveau/nouveau_gem.c 			nv50_dma_push(chan, vma->addr + push[i].offset,
chan              791 drivers/gpu/drm/nouveau/nouveau_gem.c 		ret = RING_SPACE(chan, req->nr_push * 2);
chan              801 drivers/gpu/drm/nouveau/nouveau_gem.c 			OUT_RING(chan, (nvbo->bo.offset + push[i].offset) | 2);
chan              802 drivers/gpu/drm/nouveau/nouveau_gem.c 			OUT_RING(chan, 0);
chan              805 drivers/gpu/drm/nouveau/nouveau_gem.c 		ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
chan              816 drivers/gpu/drm/nouveau/nouveau_gem.c 			cmd = chan->push.addr + ((chan->dma.cur + 2) << 2);
chan              825 drivers/gpu/drm/nouveau/nouveau_gem.c 						WIND_RING(chan);
chan              835 drivers/gpu/drm/nouveau/nouveau_gem.c 			OUT_RING(chan, 0x20000000 |
chan              837 drivers/gpu/drm/nouveau/nouveau_gem.c 			OUT_RING(chan, 0);
chan              839 drivers/gpu/drm/nouveau/nouveau_gem.c 				OUT_RING(chan, 0);
chan              843 drivers/gpu/drm/nouveau/nouveau_gem.c 	ret = nouveau_fence_new(chan, false, &fence);
chan              846 drivers/gpu/drm/nouveau/nouveau_gem.c 		WIND_RING(chan);
chan              851 drivers/gpu/drm/nouveau/nouveau_gem.c 	validate_fini(&op, chan, fence, bo);
chan              859 drivers/gpu/drm/nouveau/nouveau_gem.c 	if (chan->dma.ib_max) {
chan              868 drivers/gpu/drm/nouveau/nouveau_gem.c 			      (chan->push.addr + ((chan->dma.cur + 2) << 2));
chan               34 drivers/gpu/drm/nouveau/nv04_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               37 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = RING_SPACE(chan, 4);
chan               41 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubImageBlit, 0x0300, 3);
chan               42 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (region->sy << 16) | region->sx);
chan               43 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (region->dy << 16) | region->dx);
chan               44 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (region->height << 16) | region->width);
chan               45 drivers/gpu/drm/nouveau/nv04_fbcon.c 	FIRE_RING(chan);
chan               54 drivers/gpu/drm/nouveau/nv04_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               57 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = RING_SPACE(chan, 7);
chan               61 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x02fc, 1);
chan               62 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (rect->rop != ROP_COPY) ? 1 : 3);
chan               63 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x03fc, 1);
chan               66 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]);
chan               68 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RING(chan, rect->color);
chan               69 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0400, 2);
chan               70 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (rect->dx << 16) | rect->dy);
chan               71 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (rect->width << 16) | rect->height);
chan               72 drivers/gpu/drm/nouveau/nv04_fbcon.c 	FIRE_RING(chan);
chan               81 drivers/gpu/drm/nouveau/nv04_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               91 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = RING_SPACE(chan, 8);
chan              104 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0be4, 7);
chan              105 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff));
chan              106 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, ((image->dy + image->height) << 16) |
chan              108 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, bg);
chan              109 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, fg);
chan              110 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (image->height << 16) | ALIGN(image->width, 8));
chan              111 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (image->height << 16) | image->width);
chan              112 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff));
chan              118 drivers/gpu/drm/nouveau/nv04_fbcon.c 		ret = RING_SPACE(chan, iter_len + 1);
chan              122 drivers/gpu/drm/nouveau/nv04_fbcon.c 		BEGIN_NV04(chan, NvSubGdiRect, 0x0c00, iter_len);
chan              123 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RINGp(chan, data, iter_len);
chan              128 drivers/gpu/drm/nouveau/nv04_fbcon.c 	FIRE_RING(chan);
chan              138 drivers/gpu/drm/nouveau/nv04_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              171 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x0062,
chan              177 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x0019, 0x0019, NULL, 0,
chan              182 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x0043, 0x0043, NULL, 0,
chan              187 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x0044, 0x0044, NULL, 0,
chan              192 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x004a, 0x004a, NULL, 0,
chan              197 drivers/gpu/drm/nouveau/nv04_fbcon.c 	ret = nvif_object_init(&chan->user, 0x005f,
chan              203 drivers/gpu/drm/nouveau/nv04_fbcon.c 	if (RING_SPACE(chan, 49 + (device->info.chipset >= 0x11 ? 4 : 0))) {
chan              208 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0000, 1);
chan              209 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->surf2d.handle);
chan              210 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0184, 2);
chan              211 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, chan->vram.handle);
chan              212 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, chan->vram.handle);
chan              213 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0300, 4);
chan              214 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, surface_fmt);
chan              215 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, info->fix.line_length | (info->fix.line_length << 16));
chan              216 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base);
chan              217 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base);
chan              219 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0000, 1);
chan              220 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->rop.handle);
chan              221 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0300, 1);
chan              222 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 0x55);
chan              224 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0000, 1);
chan              225 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->patt.handle);
chan              226 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0300, 8);
chan              227 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, pattern_fmt);
chan              229 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 2);
chan              231 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 1);
chan              233 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 0);
chan              234 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 1);
chan              235 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, ~0);
chan              236 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, ~0);
chan              237 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, ~0);
chan              238 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, ~0);
chan              240 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0000, 1);
chan              241 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->clip.handle);
chan              242 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubCtxSurf2D, 0x0300, 2);
chan              243 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 0);
chan              244 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, (info->var.yres_virtual << 16) | info->var.xres_virtual);
chan              246 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubImageBlit, 0x0000, 1);
chan              247 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->blit.handle);
chan              248 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubImageBlit, 0x019c, 1);
chan              249 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->surf2d.handle);
chan              250 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubImageBlit, 0x02fc, 1);
chan              251 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 3);
chan              253 drivers/gpu/drm/nouveau/nv04_fbcon.c 		BEGIN_NV04(chan, NvSubImageBlit, 0x0120, 3);
chan              254 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RING(chan, 0);
chan              255 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RING(chan, 1);
chan              256 drivers/gpu/drm/nouveau/nv04_fbcon.c 		OUT_RING(chan, 2);
chan              259 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0000, 1);
chan              260 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->gdi.handle);
chan              261 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0198, 1);
chan              262 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->surf2d.handle);
chan              263 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0188, 2);
chan              264 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->patt.handle);
chan              265 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, nfbdev->rop.handle);
chan              266 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0304, 1);
chan              267 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 1);
chan              268 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x0300, 1);
chan              269 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, rect_fmt);
chan              270 drivers/gpu/drm/nouveau/nv04_fbcon.c 	BEGIN_NV04(chan, NvSubGdiRect, 0x02fc, 1);
chan              271 drivers/gpu/drm/nouveau/nv04_fbcon.c 	OUT_RING(chan, 3);
chan              273 drivers/gpu/drm/nouveau/nv04_fbcon.c 	FIRE_RING(chan);
chan               42 drivers/gpu/drm/nouveau/nv04_fence.c 	struct nouveau_channel *chan = fence->channel;
chan               43 drivers/gpu/drm/nouveau/nv04_fence.c 	int ret = RING_SPACE(chan, 2);
chan               45 drivers/gpu/drm/nouveau/nv04_fence.c 		BEGIN_NV04(chan, NvSubSw, 0x0150, 1);
chan               46 drivers/gpu/drm/nouveau/nv04_fence.c 		OUT_RING  (chan, fence->base.seqno);
chan               47 drivers/gpu/drm/nouveau/nv04_fence.c 		FIRE_RING (chan);
chan               54 drivers/gpu/drm/nouveau/nv04_fence.c 		struct nouveau_channel *prev, struct nouveau_channel *chan)
chan               60 drivers/gpu/drm/nouveau/nv04_fence.c nv04_fence_read(struct nouveau_channel *chan)
chan               63 drivers/gpu/drm/nouveau/nv04_fence.c 	WARN_ON(nvif_object_mthd(&chan->nvsw, NV04_NVSW_GET_REF,
chan               69 drivers/gpu/drm/nouveau/nv04_fence.c nv04_fence_context_del(struct nouveau_channel *chan)
chan               71 drivers/gpu/drm/nouveau/nv04_fence.c 	struct nv04_fence_chan *fctx = chan->fence;
chan               73 drivers/gpu/drm/nouveau/nv04_fence.c 	chan->fence = NULL;
chan               78 drivers/gpu/drm/nouveau/nv04_fence.c nv04_fence_context_new(struct nouveau_channel *chan)
chan               82 drivers/gpu/drm/nouveau/nv04_fence.c 		nouveau_fence_context_new(chan, &fctx->base);
chan               86 drivers/gpu/drm/nouveau/nv04_fence.c 		chan->fence = fctx;
chan               32 drivers/gpu/drm/nouveau/nv10_fence.c 	struct nouveau_channel *chan = fence->channel;
chan               33 drivers/gpu/drm/nouveau/nv10_fence.c 	int ret = RING_SPACE(chan, 2);
chan               35 drivers/gpu/drm/nouveau/nv10_fence.c 		BEGIN_NV04(chan, 0, NV10_SUBCHAN_REF_CNT, 1);
chan               36 drivers/gpu/drm/nouveau/nv10_fence.c 		OUT_RING  (chan, fence->base.seqno);
chan               37 drivers/gpu/drm/nouveau/nv10_fence.c 		FIRE_RING (chan);
chan               45 drivers/gpu/drm/nouveau/nv10_fence.c 		struct nouveau_channel *prev, struct nouveau_channel *chan)
chan               51 drivers/gpu/drm/nouveau/nv10_fence.c nv10_fence_read(struct nouveau_channel *chan)
chan               53 drivers/gpu/drm/nouveau/nv10_fence.c 	return nvif_rd32(&chan->user, 0x0048);
chan               57 drivers/gpu/drm/nouveau/nv10_fence.c nv10_fence_context_del(struct nouveau_channel *chan)
chan               59 drivers/gpu/drm/nouveau/nv10_fence.c 	struct nv10_fence_chan *fctx = chan->fence;
chan               62 drivers/gpu/drm/nouveau/nv10_fence.c 	chan->fence = NULL;
chan               67 drivers/gpu/drm/nouveau/nv10_fence.c nv10_fence_context_new(struct nouveau_channel *chan)
chan               71 drivers/gpu/drm/nouveau/nv10_fence.c 	fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
chan               75 drivers/gpu/drm/nouveau/nv10_fence.c 	nouveau_fence_context_new(chan, &fctx->base);
chan               35 drivers/gpu/drm/nouveau/nv17_fence.c 		struct nouveau_channel *prev, struct nouveau_channel *chan)
chan               38 drivers/gpu/drm/nouveau/nv17_fence.c 	struct nv10_fence_priv *priv = chan->drm->fence;
chan               39 drivers/gpu/drm/nouveau/nv17_fence.c 	struct nv10_fence_chan *fctx = chan->fence;
chan               61 drivers/gpu/drm/nouveau/nv17_fence.c 	if (!ret && !(ret = RING_SPACE(chan, 5))) {
chan               62 drivers/gpu/drm/nouveau/nv17_fence.c 		BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 4);
chan               63 drivers/gpu/drm/nouveau/nv17_fence.c 		OUT_RING  (chan, fctx->sema.handle);
chan               64 drivers/gpu/drm/nouveau/nv17_fence.c 		OUT_RING  (chan, 0);
chan               65 drivers/gpu/drm/nouveau/nv17_fence.c 		OUT_RING  (chan, value + 1);
chan               66 drivers/gpu/drm/nouveau/nv17_fence.c 		OUT_RING  (chan, value + 2);
chan               67 drivers/gpu/drm/nouveau/nv17_fence.c 		FIRE_RING (chan);
chan               75 drivers/gpu/drm/nouveau/nv17_fence.c nv17_fence_context_new(struct nouveau_channel *chan)
chan               77 drivers/gpu/drm/nouveau/nv17_fence.c 	struct nv10_fence_priv *priv = chan->drm->fence;
chan               84 drivers/gpu/drm/nouveau/nv17_fence.c 	fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
chan               88 drivers/gpu/drm/nouveau/nv17_fence.c 	nouveau_fence_context_new(chan, &fctx->base);
chan               93 drivers/gpu/drm/nouveau/nv17_fence.c 	ret = nvif_object_init(&chan->user, NvSema, NV_DMA_FROM_MEMORY,
chan              102 drivers/gpu/drm/nouveau/nv17_fence.c 		nv10_fence_context_del(chan);
chan               35 drivers/gpu/drm/nouveau/nv50_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               38 drivers/gpu/drm/nouveau/nv50_fbcon.c 	ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11);
chan               43 drivers/gpu/drm/nouveau/nv50_fbcon.c 		BEGIN_NV04(chan, NvSub2D, 0x02ac, 1);
chan               44 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, 1);
chan               46 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0588, 1);
chan               49 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]);
chan               51 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, rect->color);
chan               52 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0600, 4);
chan               53 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, rect->dx);
chan               54 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, rect->dy);
chan               55 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, rect->dx + rect->width);
chan               56 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, rect->dy + rect->height);
chan               58 drivers/gpu/drm/nouveau/nv50_fbcon.c 		BEGIN_NV04(chan, NvSub2D, 0x02ac, 1);
chan               59 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, 3);
chan               61 drivers/gpu/drm/nouveau/nv50_fbcon.c 	FIRE_RING(chan);
chan               70 drivers/gpu/drm/nouveau/nv50_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               73 drivers/gpu/drm/nouveau/nv50_fbcon.c 	ret = RING_SPACE(chan, 12);
chan               77 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0110, 1);
chan               78 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan               79 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x08b0, 4);
chan               80 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->dx);
chan               81 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->dy);
chan               82 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->width);
chan               83 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->height);
chan               84 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x08d0, 4);
chan               85 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan               86 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->sx);
chan               87 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan               88 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, region->sy);
chan               89 drivers/gpu/drm/nouveau/nv50_fbcon.c 	FIRE_RING(chan);
chan               98 drivers/gpu/drm/nouveau/nv50_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              107 drivers/gpu/drm/nouveau/nv50_fbcon.c 	ret = RING_SPACE(chan, 11);
chan              111 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0814, 2);
chan              114 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, palette[image->bg_color] | mask);
chan              115 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, palette[image->fg_color] | mask);
chan              117 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, image->bg_color);
chan              118 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RING(chan, image->fg_color);
chan              120 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0838, 2);
chan              121 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, image->width);
chan              122 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, image->height);
chan              123 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0850, 4);
chan              124 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              125 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, image->dx);
chan              126 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              127 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, image->dy);
chan              133 drivers/gpu/drm/nouveau/nv50_fbcon.c 		ret = RING_SPACE(chan, push + 1);
chan              139 drivers/gpu/drm/nouveau/nv50_fbcon.c 		BEGIN_NI04(chan, NvSub2D, 0x0860, push);
chan              140 drivers/gpu/drm/nouveau/nv50_fbcon.c 		OUT_RINGp(chan, data, push);
chan              144 drivers/gpu/drm/nouveau/nv50_fbcon.c 	FIRE_RING(chan);
chan              155 drivers/gpu/drm/nouveau/nv50_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              185 drivers/gpu/drm/nouveau/nv50_fbcon.c 	ret = nvif_object_init(&chan->user, 0x502d, 0x502d, NULL, 0,
chan              190 drivers/gpu/drm/nouveau/nv50_fbcon.c 	ret = RING_SPACE(chan, 58);
chan              196 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0000, 1);
chan              197 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, nfbdev->twod.handle);
chan              198 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0184, 3);
chan              199 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, chan->vram.handle);
chan              200 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, chan->vram.handle);
chan              201 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, chan->vram.handle);
chan              202 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0290, 1);
chan              203 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              204 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0888, 1);
chan              205 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              206 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x02ac, 1);
chan              207 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 3);
chan              208 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x02a0, 1);
chan              209 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0x55);
chan              210 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x08c0, 4);
chan              211 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              212 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              213 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              214 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              215 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0580, 2);
chan              216 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 4);
chan              217 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, format);
chan              218 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x02e8, 2);
chan              219 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 2);
chan              220 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              221 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0804, 1);
chan              222 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, format);
chan              223 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0800, 1);
chan              224 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              225 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0808, 3);
chan              226 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              227 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              228 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              229 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x081c, 1);
chan              230 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              231 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0840, 4);
chan              232 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              233 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              234 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 0);
chan              235 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              236 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0200, 2);
chan              237 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, format);
chan              238 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              239 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0214, 5);
chan              240 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->fix.line_length);
chan              241 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->var.xres_virtual);
chan              242 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->var.yres_virtual);
chan              243 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, upper_32_bits(fb->vma->addr));
chan              244 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, lower_32_bits(fb->vma->addr));
chan              245 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0230, 2);
chan              246 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, format);
chan              247 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, 1);
chan              248 drivers/gpu/drm/nouveau/nv50_fbcon.c 	BEGIN_NV04(chan, NvSub2D, 0x0244, 5);
chan              249 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->fix.line_length);
chan              250 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->var.xres_virtual);
chan              251 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, info->var.yres_virtual);
chan              252 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, upper_32_bits(fb->vma->addr));
chan              253 drivers/gpu/drm/nouveau/nv50_fbcon.c 	OUT_RING(chan, lower_32_bits(fb->vma->addr));
chan              254 drivers/gpu/drm/nouveau/nv50_fbcon.c 	FIRE_RING(chan);
chan               36 drivers/gpu/drm/nouveau/nv50_fence.c nv50_fence_context_new(struct nouveau_channel *chan)
chan               38 drivers/gpu/drm/nouveau/nv50_fence.c 	struct nv10_fence_priv *priv = chan->drm->fence;
chan               45 drivers/gpu/drm/nouveau/nv50_fence.c 	fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
chan               49 drivers/gpu/drm/nouveau/nv50_fence.c 	nouveau_fence_context_new(chan, &fctx->base);
chan               54 drivers/gpu/drm/nouveau/nv50_fence.c 	ret = nvif_object_init(&chan->user, NvSema, NV_DMA_IN_MEMORY,
chan               63 drivers/gpu/drm/nouveau/nv50_fence.c 		nv10_fence_context_del(chan);
chan               33 drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
chan               35 drivers/gpu/drm/nouveau/nv84_fence.c 	int ret = RING_SPACE(chan, 8);
chan               37 drivers/gpu/drm/nouveau/nv84_fence.c 		BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1);
chan               38 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, chan->vram.handle);
chan               39 drivers/gpu/drm/nouveau/nv84_fence.c 		BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 5);
chan               40 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, upper_32_bits(virtual));
chan               41 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, lower_32_bits(virtual));
chan               42 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, sequence);
chan               43 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, NV84_SUBCHAN_SEMAPHORE_TRIGGER_WRITE_LONG);
chan               44 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, 0x00000000);
chan               45 drivers/gpu/drm/nouveau/nv84_fence.c 		FIRE_RING (chan);
chan               51 drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
chan               53 drivers/gpu/drm/nouveau/nv84_fence.c 	int ret = RING_SPACE(chan, 7);
chan               55 drivers/gpu/drm/nouveau/nv84_fence.c 		BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1);
chan               56 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, chan->vram.handle);
chan               57 drivers/gpu/drm/nouveau/nv84_fence.c 		BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4);
chan               58 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, upper_32_bits(virtual));
chan               59 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, lower_32_bits(virtual));
chan               60 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, sequence);
chan               61 drivers/gpu/drm/nouveau/nv84_fence.c 		OUT_RING  (chan, NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_GEQUAL);
chan               62 drivers/gpu/drm/nouveau/nv84_fence.c 		FIRE_RING (chan);
chan               70 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nouveau_channel *chan = fence->channel;
chan               71 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_chan *fctx = chan->fence;
chan               72 drivers/gpu/drm/nouveau/nv84_fence.c 	u64 addr = fctx->vma->addr + chan->chid * 16;
chan               74 drivers/gpu/drm/nouveau/nv84_fence.c 	return fctx->base.emit32(chan, addr, fence->base.seqno);
chan               79 drivers/gpu/drm/nouveau/nv84_fence.c 		struct nouveau_channel *prev, struct nouveau_channel *chan)
chan               81 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_chan *fctx = chan->fence;
chan               84 drivers/gpu/drm/nouveau/nv84_fence.c 	return fctx->base.sync32(chan, addr, fence->base.seqno);
chan               88 drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_read(struct nouveau_channel *chan)
chan               90 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_priv *priv = chan->drm->fence;
chan               91 drivers/gpu/drm/nouveau/nv84_fence.c 	return nouveau_bo_rd32(priv->bo, chan->chid * 16/4);
chan               95 drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_context_del(struct nouveau_channel *chan)
chan               97 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_priv *priv = chan->drm->fence;
chan               98 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_chan *fctx = chan->fence;
chan              100 drivers/gpu/drm/nouveau/nv84_fence.c 	nouveau_bo_wr32(priv->bo, chan->chid * 16 / 4, fctx->base.sequence);
chan              105 drivers/gpu/drm/nouveau/nv84_fence.c 	chan->fence = NULL;
chan              110 drivers/gpu/drm/nouveau/nv84_fence.c nv84_fence_context_new(struct nouveau_channel *chan)
chan              112 drivers/gpu/drm/nouveau/nv84_fence.c 	struct nv84_fence_priv *priv = chan->drm->fence;
chan              116 drivers/gpu/drm/nouveau/nv84_fence.c 	fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
chan              120 drivers/gpu/drm/nouveau/nv84_fence.c 	nouveau_fence_context_new(chan, &fctx->base);
chan              126 drivers/gpu/drm/nouveau/nv84_fence.c 	fctx->base.sequence = nv84_fence_read(chan);
chan              129 drivers/gpu/drm/nouveau/nv84_fence.c 	ret = nouveau_vma_new(priv->bo, chan->vmm, &fctx->vma);
chan              133 drivers/gpu/drm/nouveau/nv84_fence.c 		nv84_fence_context_del(chan);
chan              143 drivers/gpu/drm/nouveau/nv84_fence.c 	priv->suspend = vmalloc(array_size(sizeof(u32), drm->chan.nr));
chan              145 drivers/gpu/drm/nouveau/nv84_fence.c 		for (i = 0; i < drm->chan.nr; i++)
chan              159 drivers/gpu/drm/nouveau/nv84_fence.c 		for (i = 0; i < drm->chan.nr; i++)
chan              206 drivers/gpu/drm/nouveau/nv84_fence.c 	ret = nouveau_bo_new(&drm->client, 16 * drm->chan.nr, 0,
chan               35 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               38 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11);
chan               43 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
chan               44 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, 1);
chan               46 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0588, 1);
chan               49 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, ((uint32_t *)info->pseudo_palette)[rect->color]);
chan               51 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, rect->color);
chan               52 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0600, 4);
chan               53 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, rect->dx);
chan               54 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, rect->dy);
chan               55 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, rect->dx + rect->width);
chan               56 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, rect->dy + rect->height);
chan               58 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
chan               59 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, 3);
chan               61 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	FIRE_RING(chan);
chan               70 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan               73 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	ret = RING_SPACE(chan, 12);
chan               77 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0110, 1);
chan               78 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan               79 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x08b0, 4);
chan               80 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->dx);
chan               81 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->dy);
chan               82 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->width);
chan               83 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->height);
chan               84 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x08d0, 4);
chan               85 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan               86 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->sx);
chan               87 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan               88 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, region->sy);
chan               89 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	FIRE_RING(chan);
chan               98 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              107 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	ret = RING_SPACE(chan, 11);
chan              111 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0814, 2);
chan              114 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, palette[image->bg_color] | mask);
chan              115 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, palette[image->fg_color] | mask);
chan              117 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, image->bg_color);
chan              118 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RING  (chan, image->fg_color);
chan              120 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0838, 2);
chan              121 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, image->width);
chan              122 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, image->height);
chan              123 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0850, 4);
chan              124 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              125 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, image->dx);
chan              126 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              127 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, image->dy);
chan              133 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		ret = RING_SPACE(chan, push + 1);
chan              139 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		BEGIN_NIC0(chan, NvSub2D, 0x0860, push);
chan              140 drivers/gpu/drm/nouveau/nvc0_fbcon.c 		OUT_RINGp(chan, data, push);
chan              144 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	FIRE_RING(chan);
chan              155 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	struct nouveau_channel *chan = drm->channel;
chan              158 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	ret = nvif_object_init(&chan->user, 0x902d, 0x902d, NULL, 0,
chan              190 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	ret = RING_SPACE(chan, 58);
chan              197 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0000, 1);
chan              198 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, nfbdev->twod.handle);
chan              199 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0290, 1);
chan              200 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              201 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0888, 1);
chan              202 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              203 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
chan              204 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 3);
chan              205 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x02a0, 1);
chan              206 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0x55);
chan              207 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x08c0, 4);
chan              208 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              209 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              210 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              211 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              212 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0580, 2);
chan              213 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 4);
chan              214 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, format);
chan              215 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x02e8, 2);
chan              216 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 2);
chan              217 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              219 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0804, 1);
chan              220 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, format);
chan              221 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0800, 1);
chan              222 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              223 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0808, 3);
chan              224 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              225 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              226 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              227 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x081c, 1);
chan              228 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              229 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0840, 4);
chan              230 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              231 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              232 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              233 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              234 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0200, 10);
chan              235 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, format);
chan              236 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              237 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              238 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              239 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              240 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->fix.line_length);
chan              241 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->var.xres_virtual);
chan              242 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->var.yres_virtual);
chan              243 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, upper_32_bits(fb->vma->addr));
chan              244 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, lower_32_bits(fb->vma->addr));
chan              245 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	BEGIN_NVC0(chan, NvSub2D, 0x0230, 10);
chan              246 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, format);
chan              247 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              248 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              249 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 1);
chan              250 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, 0);
chan              251 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->fix.line_length);
chan              252 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->var.xres_virtual);
chan              253 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, info->var.yres_virtual);
chan              254 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, upper_32_bits(fb->vma->addr));
chan              255 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	OUT_RING  (chan, lower_32_bits(fb->vma->addr));
chan              256 drivers/gpu/drm/nouveau/nvc0_fbcon.c 	FIRE_RING (chan);
chan               32 drivers/gpu/drm/nouveau/nvc0_fence.c nvc0_fence_emit32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
chan               34 drivers/gpu/drm/nouveau/nvc0_fence.c 	int ret = RING_SPACE(chan, 6);
chan               36 drivers/gpu/drm/nouveau/nvc0_fence.c 		BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 5);
chan               37 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, upper_32_bits(virtual));
chan               38 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, lower_32_bits(virtual));
chan               39 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, sequence);
chan               40 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, NV84_SUBCHAN_SEMAPHORE_TRIGGER_WRITE_LONG);
chan               41 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, 0x00000000);
chan               42 drivers/gpu/drm/nouveau/nvc0_fence.c 		FIRE_RING (chan);
chan               48 drivers/gpu/drm/nouveau/nvc0_fence.c nvc0_fence_sync32(struct nouveau_channel *chan, u64 virtual, u32 sequence)
chan               50 drivers/gpu/drm/nouveau/nvc0_fence.c 	int ret = RING_SPACE(chan, 5);
chan               52 drivers/gpu/drm/nouveau/nvc0_fence.c 		BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4);
chan               53 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, upper_32_bits(virtual));
chan               54 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, lower_32_bits(virtual));
chan               55 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, sequence);
chan               56 drivers/gpu/drm/nouveau/nvc0_fence.c 		OUT_RING  (chan, NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_GEQUAL |
chan               58 drivers/gpu/drm/nouveau/nvc0_fence.c 		FIRE_RING (chan);
chan               64 drivers/gpu/drm/nouveau/nvc0_fence.c nvc0_fence_context_new(struct nouveau_channel *chan)
chan               66 drivers/gpu/drm/nouveau/nvc0_fence.c 	int ret = nv84_fence_context_new(chan);
chan               68 drivers/gpu/drm/nouveau/nvc0_fence.c 		struct nv84_fence_chan *fctx = chan->fence;
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c gt215_ce_intr(struct nvkm_falcon *ce, struct nvkm_fifo_chan *chan)
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c 		   en ? en->name : "", chan ? chan->chid : -1,
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c 		   chan ? chan->inst->addr : 0,
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c 		   chan ? chan->object.client->name : "unknown",
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c 	struct nvkm_fifo_chan *chan;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c 	chan = nvkm_fifo_chan_inst(fifo, (u64)inst << 12, &flags);
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c 			   chan ? chan->chid : -1, (u64)inst << 12,
chan               99 drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c 			   chan ? chan->object.client->name : "unknown",
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c 	nvkm_fifo_chan_put(fifo, flags, &chan);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c gf119_disp_chan_intr(struct nv50_disp_chan *chan, bool en)
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/disp/changf119.c 	const u32 mask = 0x00000001 << chan->chid.user;
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/changv100.c gv100_disp_chan_user(struct nv50_disp_chan *chan, u64 *psize)
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/disp/changv100.c 	return 0x690000 + ((chan->chid.user - 1) * 0x1000);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c nv50_disp_chan_mthd(struct nv50_disp_chan *chan, int debug)
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp *disp = chan->disp;
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	const struct nv50_disp_chan_mthd *mthd = chan->mthd;
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 		u32 base = chan->head * mthd->addr;
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 					 mthd->name, chan->chid.user);
chan              137 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              146 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 		notify->index = chan->chid.user;
chan              161 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c nv50_disp_chan_user(struct nv50_disp_chan *chan, u64 *psize)
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	return 0x640000 + (chan->chid.user * 0x1000);
chan              168 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c nv50_disp_chan_intr(struct nv50_disp_chan *chan, bool en)
chan              170 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              171 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	const u32 mask = 0x00010001 << chan->chid.user;
chan              172 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	const u32 data = en ? 0x00010000 << chan->chid.user : 0x00000000;
chan              179 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              180 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              181 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	u64 size, base = chan->func->user(chan, &size);
chan              189 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              190 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              191 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	u64 size, base = chan->func->user(chan, &size);
chan              200 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              201 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp *disp = chan->disp;
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              217 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              220 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	*addr = base + chan->func->user(chan, size);
chan              247 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(oclass->parent);
chan              248 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp *disp = chan->disp;
chan              264 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	object->hash = chan->func->bind(chan, object->oproxy.object,
chan              276 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              277 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              280 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	if (chan->func->bind)
chan              300 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              301 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->func->fini(chan);
chan              302 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->func->intr(chan, false);
chan              309 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              310 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->func->intr(chan, true);
chan              311 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	return chan->func->init(chan);
chan              317 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan = nv50_disp_chan(object);
chan              318 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp *disp = chan->disp;
chan              319 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	if (chan->chid.user >= 0)
chan              320 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 		disp->chan[chan->chid.user] = NULL;
chan              321 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	nvkm_memory_unref(&chan->memory);
chan              322 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	return chan;
chan              344 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	struct nv50_disp_chan *chan;
chan              346 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              348 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	*pobject = &chan->object;
chan              350 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	nvkm_object_ctor(&nv50_disp_chan, oclass, &chan->object);
chan              351 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->func = func;
chan              352 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->mthd = mthd;
chan              353 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->disp = disp;
chan              354 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->chid.ctrl = ctrl;
chan              355 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->chid.user = user;
chan              356 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	chan->head = head;
chan              358 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	if (disp->chan[chan->chid.user]) {
chan              359 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 		chan->chid.user = -1;
chan              362 drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.c 	disp->chan[chan->chid.user] = chan;
chan              170 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c gf119_disp_core_fini(struct nv50_disp_chan *chan)
chan              172 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              188 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c gf119_disp_core_init(struct nv50_disp_chan *chan)
chan              190 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              194 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c 	nvkm_wr32(device, 0x610494, chan->push);
chan               29 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp102.c gp102_disp_core_init(struct nv50_disp_chan *chan)
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp102.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp102.c 	nvkm_wr32(device, 0x611494, chan->push);
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c gv100_disp_core_idle(struct nv50_disp_chan *chan)
chan              138 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              148 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c gv100_disp_core_user(struct nv50_disp_chan *chan, u64 *psize)
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c gv100_disp_core_intr(struct nv50_disp_chan *chan, bool en)
chan              157 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c gv100_disp_core_fini(struct nv50_disp_chan *chan)
chan              166 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              168 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	gv100_disp_core_idle(chan);
chan              173 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c gv100_disp_core_init(struct nv50_disp_chan *chan)
chan              175 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              178 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	nvkm_wr32(device, 0x610b24, lower_32_bits(chan->push));
chan              179 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	nvkm_wr32(device, 0x610b20, upper_32_bits(chan->push));
chan              186 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c 	return gv100_disp_core_idle(chan);
chan              167 drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c nv50_disp_core_fini(struct nv50_disp_chan *chan)
chan              169 drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              185 drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c nv50_disp_core_init(struct nv50_disp_chan *chan)
chan              187 drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              197 drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c 	nvkm_wr32(device, 0x610204, chan->push);
chan               27 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c gv100_disp_curs_idle(struct nv50_disp_chan *chan)
chan               29 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	const u32 soff = (chan->chid.ctrl - 1) * 0x04;
chan               40 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c gv100_disp_curs_intr(struct nv50_disp_chan *chan, bool en)
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	const u32 mask = 0x00010000 << chan->head;
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c gv100_disp_curs_fini(struct nv50_disp_chan *chan)
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	const u32 hoff = chan->chid.ctrl * 4;
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	gv100_disp_curs_idle(chan);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c gv100_disp_curs_init(struct nv50_disp_chan *chan)
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	nvkm_wr32(device, 0x6104e0 + chan->chid.ctrl * 4, 0x00000001);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.c 	return gv100_disp_curs_idle(chan);
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c gf119_disp_dmac_bind(struct nv50_disp_chan *chan,
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	return nvkm_ramht_insert(chan->disp->ramht, object,
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 				 chan->chid.user, -9, handle,
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 				 chan->chid.user << 27 | 0x00000001);
chan               39 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c gf119_disp_dmac_fini(struct nv50_disp_chan *chan)
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	int ctrl = chan->chid.ctrl;
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	int user = chan->chid.user;
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c gf119_disp_dmac_init(struct nv50_disp_chan *chan)
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	int ctrl = chan->chid.ctrl;
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	int user = chan->chid.user;
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgf119.c 	nvkm_wr32(device, 0x610494 + (ctrl * 0x0010), chan->push);
chan               29 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c gp102_disp_dmac_init(struct nv50_disp_chan *chan)
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c 	int ctrl = chan->chid.ctrl;
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c 	int user = chan->chid.user;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgp102.c 	nvkm_wr32(device, 0x611494 + (ctrl * 0x0010), chan->push);
chan               28 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c gv100_disp_dmac_idle(struct nv50_disp_chan *chan)
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	const u32 soff = (chan->chid.ctrl - 1) * 0x04;
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c gv100_disp_dmac_bind(struct nv50_disp_chan *chan,
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	return nvkm_ramht_insert(chan->disp->ramht, object,
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 				 chan->chid.user, -9, handle,
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 				 chan->chid.user << 25 | 0x00000040);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c gv100_disp_dmac_fini(struct nv50_disp_chan *chan)
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	const u32 coff = chan->chid.ctrl * 0x04;
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	gv100_disp_dmac_idle(chan);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c gv100_disp_dmac_init(struct nv50_disp_chan *chan)
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	const u32 uoff = (chan->chid.ctrl - 1) * 0x1000;
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	const u32 poff = chan->chid.ctrl * 0x10;
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	const u32 coff = chan->chid.ctrl * 0x04;
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	nvkm_wr32(device, 0x610b24 + poff, lower_32_bits(chan->push));
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	nvkm_wr32(device, 0x610b20 + poff, upper_32_bits(chan->push));
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c 	return gv100_disp_dmac_idle(chan);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	struct nv50_disp_chan *chan;
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	chan = nv50_disp_chan(*pobject);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	chan->memory = nvkm_umem_search(client, push);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	if (IS_ERR(chan->memory))
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 		return PTR_ERR(chan->memory);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	if (nvkm_memory_size(chan->memory) < 0x1000)
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	switch (nvkm_memory_target(chan->memory)) {
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	case NVKM_MEM_TARGET_VRAM: chan->push = 0x00000001; break;
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	case NVKM_MEM_TARGET_NCOH: chan->push = 0x00000002; break;
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	case NVKM_MEM_TARGET_HOST: chan->push = 0x00000003; break;
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	chan->push |= nvkm_memory_addr(chan->memory) >> 8;
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c nv50_disp_dmac_bind(struct nv50_disp_chan *chan,
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	return nvkm_ramht_insert(chan->disp->ramht, object,
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 				 chan->chid.user, -10, handle,
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 				 chan->chid.user << 28 |
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 				 chan->chid.user);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c nv50_disp_dmac_fini(struct nv50_disp_chan *chan)
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	int ctrl = chan->chid.ctrl;
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	int user = chan->chid.user;
chan              100 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c nv50_disp_dmac_init(struct nv50_disp_chan *chan)
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	struct nvkm_subdev *subdev = &chan->disp->base.engine.subdev;
chan              104 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	int ctrl = chan->chid.ctrl;
chan              105 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	int user = chan->chid.user;
chan              108 drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.c 	nvkm_wr32(device, 0x610204 + (ctrl * 0x0010), chan->push);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c 		nv50_disp_chan_mthd(disp->chan[0], NV_DBG_DEBUG);
chan              107 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c 	if (chid < ARRAY_SIZE(disp->chan)) {
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c 			nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c 	if (chid < ARRAY_SIZE(disp->chan)) {
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c 			nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c 		nv50_disp_chan_mthd(disp->chan[0], NV_DBG_DEBUG);
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c 	if (chid < ARRAY_SIZE(disp->chan) && disp->chan[chid]) {
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c 			nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
chan              177 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c 	return nvkm_event_init(func->uevent, 1, ARRAY_SIZE(disp->chan),
chan              556 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c 		nv50_disp_chan_mthd(disp->chan[0], NV_DBG_DEBUG);
chan              633 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c 	if (chid < ARRAY_SIZE(disp->chan)) {
chan              636 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c 			nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
chan               40 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h 	struct nv50_disp_chan *chan[81];
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c gf119_disp_pioc_fini(struct nv50_disp_chan *chan)
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	struct nv50_disp *disp = chan->disp;
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	int ctrl = chan->chid.ctrl;
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	int user = chan->chid.user;
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c gf119_disp_pioc_init(struct nv50_disp_chan *chan)
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	struct nv50_disp *disp = chan->disp;
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	int ctrl = chan->chid.ctrl;
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocgf119.c 	int user = chan->chid.user;
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c nv50_disp_pioc_fini(struct nv50_disp_chan *chan)
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	struct nv50_disp *disp = chan->disp;
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	int ctrl = chan->chid.ctrl;
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	int user = chan->chid.user;
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c nv50_disp_pioc_init(struct nv50_disp_chan *chan)
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	struct nv50_disp *disp = chan->disp;
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	int ctrl = chan->chid.ctrl;
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/disp/piocnv50.c 	int user = chan->chid.user;
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c gv100_disp_wimm_intr(struct nv50_disp_chan *chan, bool en)
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c 	const u32 mask = 0x00000001 << chan->head;
chan              131 drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c gv100_disp_wndw_intr(struct nv50_disp_chan *chan, bool en)
chan              133 drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c 	struct nvkm_device *device = chan->disp->base.engine.subdev.device;
chan              134 drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c 	const u32 mask = 0x00000001 << chan->head;
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/falcon.c 	struct nvkm_fifo_chan *chan;
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/falcon.c 	chan = nvkm_fifo_chan_inst(device->fifo, (u64)inst << 12, &flags);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/falcon.c 			falcon->func->intr(falcon, chan);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/falcon.c 	nvkm_fifo_chan_put(device->fifo, flags, &chan);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	struct nvkm_fifo_chan *chan = *pchan;
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	if (likely(chan)) {
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	struct nvkm_fifo_chan *chan;
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	list_for_each_entry(chan, &fifo->chan, head) {
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 		if (chan->inst->addr == inst) {
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			list_del(&chan->head);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			list_add(&chan->head, &fifo->chan);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			return chan;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	struct nvkm_fifo_chan *chan;
chan               96 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	if ((chan = nvkm_fifo_chan_inst_locked(fifo, inst))) {
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 		return chan;
chan              107 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	struct nvkm_fifo_chan *chan;
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	list_for_each_entry(chan, &fifo->chan, head) {
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 		if (chan->chid == chid) {
chan              112 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			list_del(&chan->head);
chan              113 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			list_add(&chan->head, &fifo->chan);
chan              115 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 			return chan;
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 		notify->index = chan->chid;
chan              262 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	while ((sclass = fifo->func->chan[c])) {
chan              359 drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c 	INIT_LIST_HEAD(&fifo->chan);
chan                8 drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h 	struct list_head chan;
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan;
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = object->chan;
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_engn *engn = &chan->engn[engine->subdev.index];
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->func->engine_fini) {
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		ret = chan->func->engine_fini(chan, engine, suspend);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			nvif_error(&chan->object,
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	nvif_trace(&chan->object, "detached %s\n", name);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = object->chan;
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_engn *engn = &chan->engn[engine->subdev.index];
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->func->engine_init) {
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		ret = chan->func->engine_init(chan, engine);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			nvif_error(&chan->object,
chan              100 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	nvif_trace(&chan->object, "attached %s\n", name);
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = object->chan;
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_engn *engn = &chan->engn[engine->subdev.index];
chan              113 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->func->object_dtor)
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		chan->func->object_dtor(chan, object->hash);
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (chan->func->engine_dtor)
chan              118 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			chan->func->engine_dtor(chan, engine);
chan              120 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (chan->vmm)
chan              121 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			atomic_dec(&chan->vmm->engref[engine->subdev.index]);
chan              137 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(oclass->parent);
chan              138 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_engn *engn = &chan->engn[engine->subdev.index];
chan              145 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	object->chan = chan;
chan              154 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (chan->vmm)
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			atomic_inc(&chan->vmm->engref[engine->subdev.index]);
chan              158 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			ret = engine->func->fifo.cclass(chan, &cclass,
chan              168 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (chan->func->engine_ctor) {
chan              169 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			ret = chan->func->engine_ctor(chan, oclass->engine,
chan              190 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->func->object_ctor) {
chan              192 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 			chan->func->object_ctor(chan, object->oproxy.object);
chan              204 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              205 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo *fifo = chan->fifo;
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	u64 mask = chan->engines;
chan              249 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              250 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->func->ntfy)
chan              251 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		return chan->func->ntfy(chan, type, pevent);
chan              259 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              261 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	*addr = chan->addr;
chan              262 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	*size = chan->size;
chan              269 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              270 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (unlikely(!chan->user)) {
chan              271 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		chan->user = ioremap(chan->addr, chan->size);
chan              272 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (!chan->user)
chan              275 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (unlikely(addr + 4 > chan->size))
chan              277 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	*data = ioread32_native(chan->user + addr);
chan              284 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              285 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (unlikely(!chan->user)) {
chan              286 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		chan->user = ioremap(chan->addr, chan->size);
chan              287 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		if (!chan->user)
chan              290 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (unlikely(addr + 4 > chan->size))
chan              292 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	iowrite32_native(data, chan->user + addr);
chan              299 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              300 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->func->fini(chan);
chan              307 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              308 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->func->init(chan);
chan              315 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo_chan *chan = nvkm_fifo_chan(object);
chan              316 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	struct nvkm_fifo *fifo = chan->fifo;
chan              317 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	void *data = chan->func->dtor(chan);
chan              321 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (!list_empty(&chan->head)) {
chan              322 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		__clear_bit(chan->chid, fifo->mask);
chan              323 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		list_del(&chan->head);
chan              327 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->user)
chan              328 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		iounmap(chan->user);
chan              330 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->vmm) {
chan              331 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		nvkm_vmm_part(chan->vmm, chan->inst->memory);
chan              332 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		nvkm_vmm_unref(&chan->vmm);
chan              335 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	nvkm_gpuobj_del(&chan->push);
chan              336 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	nvkm_gpuobj_del(&chan->inst);
chan              357 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		    struct nvkm_fifo_chan *chan)
chan              365 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	nvkm_object_ctor(&nvkm_fifo_chan_func, oclass, &chan->object);
chan              366 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->func = func;
chan              367 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->fifo = fifo;
chan              368 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->engines = engines;
chan              369 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	INIT_LIST_HEAD(&chan->head);
chan              372 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	ret = nvkm_gpuobj_new(device, size, align, zero, NULL, &chan->inst);
chan              382 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		ret = nvkm_object_bind(&dmaobj->object, chan->inst, -16,
chan              383 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 				       &chan->push);
chan              397 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		ret = nvkm_vmm_join(vmm, chan->inst->memory);
chan              401 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		chan->vmm = nvkm_vmm_ref(vmm);
chan              406 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->chid = find_first_zero_bit(fifo->mask, NVKM_FIFO_CHID_NR);
chan              407 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	if (chan->chid >= NVKM_FIFO_CHID_NR) {
chan              411 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	list_add(&chan->head, &fifo->chan);
chan              412 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	__set_bit(chan->chid, fifo->mask);
chan              416 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->addr = device->func->resource_addr(device, bar) +
chan              417 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 		     base + user * chan->chid;
chan              418 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c 	chan->size = user;
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c g84_fifo_chan_ntfy(struct nvkm_fifo_chan *chan, u32 type,
chan               39 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 		*pevent = &chan->fifo->uevent;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo *fifo = chan->fifo;
chan              107 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wr32(device, 0x0032fc, chan->base.inst->addr >> 12);
chan              115 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 			   chan->base.chid, chan->base.object.client->name);
chan              120 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_kmap(chan->eng);
chan              121 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x00, 0x00000000);
chan              122 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x04, 0x00000000);
chan              123 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x08, 0x00000000);
chan              124 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x0c, 0x00000000);
chan              125 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x10, 0x00000000);
chan              126 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x14, 0x00000000);
chan              127 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_done(chan->eng);
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              137 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nvkm_gpuobj *engn = chan->engn[engine->subdev.index];
chan              147 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_kmap(chan->eng);
chan              148 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x00, 0x00190000);
chan              149 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x04, lower_32_bits(limit));
chan              150 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x08, lower_32_bits(start));
chan              151 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x0c, upper_32_bits(limit) << 24 |
chan              153 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x10, 0x00000000);
chan              154 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_wo32(chan->eng, offset + 0x14, 0x00000000);
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	nvkm_done(chan->eng);
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              170 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]);
chan              177 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              201 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	return nvkm_ramht_insert(chan->ramht, object, 0, 4, handle, context);
chan              207 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	struct nv50_fifo *fifo = chan->fifo;
chan              210 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	u64 addr = chan->ramfc->addr >> 8;
chan              211 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	u32 chid = chan->base.chid;
chan              234 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 		   struct nv50_fifo_chan *chan)
chan              258 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 				  0, 0xc00000, 0x2000, oclass, &chan->base);
chan              259 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	chan->fifo = fifo;
chan              263 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	ret = nvkm_gpuobj_new(device, 0x0200, 0, true, chan->base.inst,
chan              264 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 			      &chan->eng);
chan              268 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	ret = nvkm_gpuobj_new(device, 0x4000, 0, false, chan->base.inst,
chan              269 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 			      &chan->pgd);
chan              273 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	ret = nvkm_gpuobj_new(device, 0x1000, 0x400, true, chan->base.inst,
chan              274 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 			      &chan->cache);
chan              278 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	ret = nvkm_gpuobj_new(device, 0x100, 0x100, true, chan->base.inst,
chan              279 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 			      &chan->ramfc);
chan              283 drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c 	return nvkm_ramht_new(device, 0x8000, 16, chan->base.inst, &chan->ramht);
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo *fifo = chan->fifo;
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wr32(device, 0x0032fc, chan->base.inst->addr >> 12);
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 			   chan->base.chid, chan->base.object.client->name);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_kmap(chan->eng);
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x00, 0x00000000);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x04, 0x00000000);
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x08, 0x00000000);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x0c, 0x00000000);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x10, 0x00000000);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_wo32(chan->eng, offset + 0x14, 0x00000000);
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		nvkm_done(chan->eng);
chan              105 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              106 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nvkm_gpuobj *engn = chan->engn[engine->subdev.index];
chan              116 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_kmap(chan->eng);
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x00, 0x00190000);
chan              118 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x04, lower_32_bits(limit));
chan              119 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x08, lower_32_bits(start));
chan              120 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x0c, upper_32_bits(limit) << 24 |
chan              122 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x10, 0x00000000);
chan              123 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_wo32(chan->eng, offset + 0x14, 0x00000000);
chan              124 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_done(chan->eng);
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              133 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_gpuobj_del(&chan->engn[engine->subdev.index]);
chan              141 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              147 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]);
chan              153 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              154 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_ramht_remove(chan->ramht, cookie);
chan              161 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              175 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	return nvkm_ramht_insert(chan->ramht, object, 0, 4, handle, context);
chan              181 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              182 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo *fifo = chan->fifo;
chan              184 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	u32 chid = chan->base.chid;
chan              195 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              196 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo *fifo = chan->fifo;
chan              198 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	u64 addr = chan->ramfc->addr >> 12;
chan              199 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	u32 chid = chan->base.chid;
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	struct nv50_fifo_chan *chan = nv50_fifo_chan(base);
chan              209 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_ramht_del(&chan->ramht);
chan              210 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_gpuobj_del(&chan->pgd);
chan              211 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_gpuobj_del(&chan->eng);
chan              212 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_gpuobj_del(&chan->cache);
chan              213 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	nvkm_gpuobj_del(&chan->ramfc);
chan              214 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	return chan;
chan              233 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 		    struct nv50_fifo_chan *chan)
chan              247 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 				  0, 0xc00000, 0x2000, oclass, &chan->base);
chan              248 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	chan->fifo = fifo;
chan              252 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	ret = nvkm_gpuobj_new(device, 0x0200, 0x1000, true, chan->base.inst,
chan              253 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 			      &chan->ramfc);
chan              257 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	ret = nvkm_gpuobj_new(device, 0x1200, 0, true, chan->base.inst,
chan              258 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 			      &chan->eng);
chan              262 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	ret = nvkm_gpuobj_new(device, 0x4000, 0, false, chan->base.inst,
chan              263 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 			      &chan->pgd);
chan              267 drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c 	return nvkm_ramht_new(device, 0x8000, 16, chan->base.inst, &chan->ramht);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	struct nv50_fifo_chan *chan;
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	*pobject = &chan->base.object;
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 				 oclass, chan);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	args->v0.chid = chan->base.chid;
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_kmap(chan->ramfc);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x08, lower_32_bits(args->v0.offset));
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x0c, upper_32_bits(args->v0.offset));
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x10, lower_32_bits(args->v0.offset));
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x14, upper_32_bits(args->v0.offset));
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x3c, 0x003f6078);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x44, 0x01003fff);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x48, chan->base.push->node->offset >> 4);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x4c, 0xffffffff);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x60, 0x7fffffff);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x78, 0x00000000);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x7c, 0x30000001);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x80, ((chan->ramht->bits - 9) << 27) |
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 				     (chan->ramht->gpuobj->node->offset >> 4));
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x88, chan->cache->addr >> 10);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_wo32(chan->ramfc, 0x98, chan->base.inst->addr >> 12);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c 	nvkm_done(chan->ramfc);
chan               38 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan               39 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem;
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	mutex_lock(&chan->fifo->base.engine.subdev.mutex);
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	mutex_unlock(&chan->fifo->base.engine.subdev.mutex);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem;
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	u32 context = 0x80000000 | chan->base.chid << 24;
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	mutex_lock(&chan->fifo->base.engine.subdev.mutex);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	hash = nvkm_ramht_insert(imem->ramht, object, chan->base.chid, 4,
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	mutex_unlock(&chan->fifo->base.engine.subdev.mutex);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo *fifo = chan->fifo;
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	u32 data = chan->ramfc;
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	if (chid == chan->base.chid) {
chan              121 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	nvkm_mask(device, NV04_PFIFO_MODE, 1 << chan->base.chid, 0);
chan              129 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo *fifo = chan->fifo;
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	u32 mask = 1 << chan->base.chid;
chan              142 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan              143 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo *fifo = chan->fifo;
chan              149 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 		nvkm_wo32(imem->ramfc, chan->ramfc + c->ctxp, 0x00000000);
chan              152 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	return chan;
chan              173 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	struct nv04_fifo_chan *chan = NULL;
chan              188 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              190 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	*pobject = &chan->base.object;
chan              197 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 				  0, 0x800000, 0x10000, oclass, &chan->base);
chan              198 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	chan->fifo = fifo;
chan              202 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	args->v0.chid = chan->base.chid;
chan              203 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	chan->ramfc = chan->base.chid * 32;
chan              206 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x00, args->v0.offset);
chan              207 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x04, args->v0.offset);
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x08, chan->base.push->addr >> 4);
chan              209 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x10,
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	struct nv04_fifo_chan *chan = NULL;
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	*pobject = &chan->base.object;
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 				  0, 0x800000, 0x10000, oclass, &chan->base);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	chan->fifo = fifo;
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	args->v0.chid = chan->base.chid;
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	chan->ramfc = chan->base.chid * 32;
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x00, args->v0.offset);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x04, args->v0.offset);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x0c, chan->base.push->addr >> 4);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x14,
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	struct nv04_fifo_chan *chan = NULL;
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	*pobject = &chan->base.object;
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 				  0, 0x800000, 0x10000, oclass, &chan->base);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	chan->fifo = fifo;
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	args->v0.chid = chan->base.chid;
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	chan->ramfc = chan->base.chid * 64;
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x00, args->v0.offset);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x04, args->v0.offset);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x0c, chan->base.push->addr >> 4);
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x14,
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo *fifo = chan->fifo;
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	if (chid == chan->base.chid)
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + ctx, 0x00000000);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo *fifo = chan->fifo;
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	inst = chan->engn[engine->subdev.index]->addr >> 4;
chan              108 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	if (chid == chan->base.chid)
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + ctx, inst);
chan              123 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan              124 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_gpuobj_del(&chan->engn[engine->subdev.index]);
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan              139 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]);
chan              146 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
chan              147 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem;
chan              148 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	u32 context = chan->base.chid << 23;
chan              162 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	mutex_lock(&chan->fifo->base.engine.subdev.mutex);
chan              163 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	hash = nvkm_ramht_insert(imem->ramht, object, chan->base.chid, 4,
chan              165 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	mutex_unlock(&chan->fifo->base.engine.subdev.mutex);
chan              191 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	struct nv04_fifo_chan *chan = NULL;
chan              206 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	*pobject = &chan->base.object;
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 				  0, 0xc00000, 0x1000, oclass, &chan->base);
chan              217 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	chan->fifo = fifo;
chan              221 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	args->v0.chid = chan->base.chid;
chan              222 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	chan->ramfc = chan->base.chid * 128;
chan              225 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x00, args->v0.offset);
chan              226 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x04, args->v0.offset);
chan              227 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x0c, chan->base.push->addr >> 4);
chan              228 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x18, 0x30000000 |
chan              235 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c 	nvkm_wo32(imem->ramfc, chan->ramfc + 0x3c, 0x0001ffff);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	struct nv50_fifo_chan *chan;
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	*pobject = &chan->base.object;
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 				  oclass, chan);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	args->v0.chid = chan->base.chid;
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_kmap(chan->ramfc);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x08, lower_32_bits(args->v0.offset));
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x0c, upper_32_bits(args->v0.offset));
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x10, lower_32_bits(args->v0.offset));
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x14, upper_32_bits(args->v0.offset));
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x3c, 0x003f6078);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x44, 0x01003fff);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x48, chan->base.push->node->offset >> 4);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x4c, 0xffffffff);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x60, 0x7fffffff);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x78, 0x00000000);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x7c, 0x30000001);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_wo32(chan->ramfc, 0x80, ((chan->ramht->bits - 9) << 27) |
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 				     (chan->ramht->gpuobj->node->offset >> 4));
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c 	nvkm_done(chan->ramfc);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/fifo/g84.c 	.chan = {
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	struct gf100_fifo_chan *chan;
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	list_for_each_entry(chan, &fifo->chan, head) {
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		nvkm_wo32(cur, (nr * 8) + 0, chan->base.chid);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c gf100_fifo_runlist_remove(struct gf100_fifo *fifo, struct gf100_fifo_chan *chan)
chan               96 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	list_del_init(&chan->head);
chan              101 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c gf100_fifo_runlist_insert(struct gf100_fifo *fifo, struct gf100_fifo_chan *chan)
chan              104 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	list_add_tail(&chan->head, &fifo->chan);
chan              177 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		   struct gf100_fifo_chan *chan)
chan              181 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	u32 chid = chan->base.chid;
chan              188 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	list_del_init(&chan->head);
chan              189 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	chan->killed = true;
chan              264 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	struct nvkm_fifo_chan *chan;
chan              294 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	chan = nvkm_fifo_chan_inst(&fifo->base, info->inst, &flags);
chan              302 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		   info->reason, er ? er->name : "", chan ? chan->chid : -1,
chan              303 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		   info->inst, chan ? chan->object.client->name : "unknown");
chan              305 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	if (engine && chan)
chan              306 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		gf100_fifo_recover(fifo, engine, (void *)chan);
chan              307 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	nvkm_fifo_chan_put(&fifo->base, flags, &chan);
chan              321 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	struct gf100_fifo_chan *chan;
chan              336 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 			list_for_each_entry(chan, &fifo->chan, head) {
chan              337 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 				if (chan->base.chid == chid) {
chan              341 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 					gf100_fifo_recover(fifo, engine, chan);
chan              415 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	struct nvkm_fifo_chan *chan;
chan              429 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		chan = nvkm_fifo_chan_chid(&fifo->base, chid, &flags);
chan              432 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 			   unit, show, msg, chid, chan ? chan->inst->addr : 0,
chan              433 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 			   chan ? chan->object.client->name : "unknown",
chan              435 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 		nvkm_fifo_chan_put(&fifo->base, flags, &chan);
chan              678 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	.chan = {
chan              691 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c 	INIT_LIST_HEAD(&fifo->chan);
chan               13 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h 	struct list_head chan;
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	} prev, next, *chan;
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	status->chan     = NULL;
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 				status->chan = &status->next;
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 				status->chan = &status->prev;
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			status->chan = &status->next;
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			status->chan = &status->prev;
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		status->chan = &status->prev;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		   status->chan == &status->prev ? "*" : " ",
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		   status->chan == &status->next ? "*" : " ");
chan              103 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (oclass->engn == &fifo->func->chan) {
chan              128 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (fifo->func->chan.ctor && c++ == index) {
chan              129 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		oclass->base =  fifo->func->chan.user;
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		oclass->engn = &fifo->func->chan;
chan              182 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct gk104_fifo_chan *chan;
chan              193 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	list_for_each_entry(chan, &fifo->runlist[runl].chan, head) {
chan              194 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		func->chan(chan, mem, nr++ * func->size);
chan              199 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		list_for_each_entry(chan, &cgrp->chan, head) {
chan              200 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			func->chan(chan, mem, nr++ * func->size);
chan              210 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c gk104_fifo_runlist_remove(struct gk104_fifo *fifo, struct gk104_fifo_chan *chan)
chan              212 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct nvkm_fifo_cgrp *cgrp = chan->cgrp;
chan              214 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (!list_empty(&chan->head)) {
chan              215 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		list_del_init(&chan->head);
chan              223 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c gk104_fifo_runlist_insert(struct gk104_fifo *fifo, struct gk104_fifo_chan *chan)
chan              225 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct nvkm_fifo_cgrp *cgrp = chan->cgrp;
chan              229 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			list_add_tail(&cgrp->head, &fifo->runlist[chan->runl].cgrp);
chan              230 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		list_add_tail(&chan->head, &cgrp->chan);
chan              232 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		list_add_tail(&chan->head, &fifo->runlist[chan->runl].chan);
chan              238 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c gk104_fifo_runlist_chan(struct gk104_fifo_chan *chan,
chan              241 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	nvkm_wo32(memory, offset + 0, chan->base.chid);
chan              248 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	.chan = gk104_fifo_runlist_chan,
chan              332 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct gk104_fifo_chan *chan;
chan              335 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	list_for_each_entry(chan, &fifo->runlist[runl].chan, head) {
chan              336 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		if (chan->base.chid == chid) {
chan              337 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			list_del_init(&chan->head);
chan              338 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			return chan;
chan              344 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			chan = list_first_entry(&cgrp->chan, typeof(*chan), head);
chan              345 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			list_del_init(&chan->head);
chan              348 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			return chan;
chan              365 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct gk104_fifo_chan *chan;
chan              372 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	chan = gk104_fifo_recover_chid(fifo, runl, chid);
chan              373 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (chan) {
chan              374 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		chan->killed = true;
chan              389 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		if (!status.chan || status.chan->id != chid)
chan              416 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (status.chan) {
chan              418 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		gk104_fifo_recover_chan(&fifo->base, status.chan->id);
chan              472 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct nvkm_fifo_chan *chan;
chan              519 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	chan = nvkm_fifo_chan_inst_locked(&fifo->base, info->inst);
chan              527 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		   info->reason, er ? er->name : "", chan ? chan->chid : -1,
chan              528 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		   info->inst, chan ? chan->object.client->name : "unknown");
chan              531 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	if (chan)
chan              532 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		gk104_fifo_recover_chan(&fifo->base, chan->chid);
chan              696 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	struct nvkm_fifo_chan *chan;
chan              711 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		chan = nvkm_fifo_chan_chid(&fifo->base, chid, &flags);
chan              714 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			   unit, show, msg, chid, chan ? chan->inst->addr : 0,
chan              715 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 			   chan ? chan->object.client->name : "unknown",
chan              717 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		nvkm_fifo_chan_put(&fifo->base, flags, &chan);
chan              960 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 		INIT_LIST_HEAD(&fifo->runlist[i].chan);
chan             1190 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c 	.chan = {{0,0,KEPLER_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h 		struct list_head chan;
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h 		void (*chan)(struct gk104_fifo_chan *,
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h 	} chan;
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c 	.chan = gk104_fifo_runlist_chan,
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c 	.chan = {{0,0,KEPLER_CHANNEL_GPFIFO_B}, gk104_fifo_gpfifo_new },
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c 	.chan = {{0,0,KEPLER_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c 	.chan = {{0,0,KEPLER_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c gm107_fifo_runlist_chan(struct gk104_fifo_chan *chan,
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c 	nvkm_wo32(memory, offset + 0, chan->base.chid);
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c 	nvkm_wo32(memory, offset + 4, chan->base.inst->addr >> 12);
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c 	.chan = gm107_fifo_runlist_chan,
chan              105 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c 	.chan = {{0,0,KEPLER_CHANNEL_GPFIFO_B}, gk104_fifo_gpfifo_new },
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c 	.chan = {{0,0,MAXWELL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c 	.chan = {{0,0,MAXWELL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c 	.chan = {{0,0,PASCAL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c 	.chan = {{0,0,PASCAL_CHANNEL_GPFIFO_A}, gk104_fifo_gpfifo_new },
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	struct nv50_fifo_chan *chan;
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	*pobject = &chan->base.object;
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 				 oclass, chan);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	args->v0.chid = chan->base.chid;
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_kmap(chan->ramfc);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x3c, 0x403f6078);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x44, 0x01003fff);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x48, chan->base.push->node->offset >> 4);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x50, lower_32_bits(ioffset));
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x54, upper_32_bits(ioffset) | (ilength << 16));
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x60, 0x7fffffff);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x78, 0x00000000);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x7c, 0x30000001);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x80, ((chan->ramht->bits - 9) << 27) |
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 				     (chan->ramht->gpuobj->node->offset >> 4));
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x88, chan->cache->addr >> 10);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_wo32(chan->ramfc, 0x98, chan->base.inst->addr >> 12);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c 	nvkm_done(chan->ramfc);
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c gf100_fifo_chan_ntfy(struct nvkm_fifo_chan *chan, u32 type,
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		*pevent = &chan->fifo->uevent;
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		*pevent = &chan->fifo->kevent;
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct nvkm_subdev *subdev = &chan->fifo->base.engine.subdev;
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wr32(device, 0x002634, chan->base.chid);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		if (nvkm_rd32(device, 0x002634) == chan->base.chid)
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 			   chan->base.chid, chan->base.object.client->name);
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		u64 addr = chan->engn[engine->subdev.index].vma->addr;
chan              128 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan              129 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_vmm_put(chan->base.vmm, &chan->engn[engine->subdev.index].vma);
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_gpuobj_del(&chan->engn[engine->subdev.index].inst);
chan              138 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan              145 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	ret = nvkm_object_bind(object, NULL, 0, &chan->engn[engn].inst);
chan              149 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	ret = nvkm_vmm_get(chan->base.vmm, 12, chan->engn[engn].inst->size,
chan              150 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 			   &chan->engn[engn].vma);
chan              154 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	return nvkm_memory_map(chan->engn[engn].inst, 0, chan->base.vmm,
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 			       chan->engn[engn].vma, NULL, 0);
chan              161 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan              162 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo *fifo = chan->fifo;
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	u32 coff = chan->base.chid * 8;
chan              166 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	if (!list_empty(&chan->head) && !chan->killed) {
chan              167 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		gf100_fifo_runlist_remove(fifo, chan);
chan              180 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan = gf100_fifo_chan(base);
chan              181 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo *fifo = chan->fifo;
chan              183 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	u32 addr = chan->base.inst->addr >> 12;
chan              184 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	u32 coff = chan->base.chid * 8;
chan              188 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	if (list_empty(&chan->head) && !chan->killed) {
chan              189 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 		gf100_fifo_runlist_insert(fifo, chan);
chan              222 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	struct gf100_fifo_chan *chan;
chan              238 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              240 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	*pobject = &chan->base.object;
chan              241 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	chan->fifo = fifo;
chan              242 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	INIT_LIST_HEAD(&chan->head);
chan              254 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 				  oclass, &chan->base);
chan              258 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	args->v0.chid = chan->base.chid;
chan              262 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	usermem = chan->base.chid * 0x1000;
chan              273 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_kmap(chan->base.inst);
chan              274 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x08, lower_32_bits(usermem));
chan              275 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x0c, upper_32_bits(usermem));
chan              276 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x10, 0x0000face);
chan              277 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x30, 0xfffff902);
chan              278 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x48, lower_32_bits(ioffset));
chan              279 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x4c, upper_32_bits(ioffset) |
chan              281 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x54, 0x00000002);
chan              282 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x84, 0x20400000);
chan              283 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x94, 0x30000001);
chan              284 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0x9c, 0x00000100);
chan              285 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xa4, 0x1f1f1f1f);
chan              286 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xa8, 0x1f1f1f1f);
chan              287 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xac, 0x0000001f);
chan              288 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xb8, 0xf8000000);
chan              289 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xf8, 0x10003080); /* 0x002310 */
chan              290 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_wo32(chan->base.inst, 0xfc, 0x10000010); /* 0x002350 */
chan              291 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c 	nvkm_done(chan->base.inst);
chan               38 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c gk104_fifo_gpfifo_kick_locked(struct gk104_fifo_chan *chan)
chan               40 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo *fifo = chan->fifo;
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct nvkm_client *client = chan->base.object.client;
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct nvkm_fifo_cgrp *cgrp = chan->cgrp;
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		nvkm_wr32(device, 0x002634, chan->base.chid);
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 			   cgrp ? cgrp->id : chan->base.chid, client->name);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		nvkm_fifo_recover_chan(&fifo->base, chan->base.chid);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c gk104_fifo_gpfifo_kick(struct gk104_fifo_chan *chan)
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	mutex_lock(&chan->base.fifo->engine.subdev.mutex);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	ret = gk104_fifo_gpfifo_kick_locked(chan);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	mutex_unlock(&chan->base.fifo->engine.subdev.mutex);
chan              101 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan              106 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	ret = gk104_fifo_gpfifo_kick(chan);
chan              128 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              129 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan              133 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		u64   addr = chan->engn[engine->subdev.index].vma->addr;
chan              153 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              154 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_vmm_put(chan->base.vmm, &chan->engn[engine->subdev.index].vma);
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_gpuobj_del(&chan->engn[engine->subdev.index].inst);
chan              163 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              170 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	ret = nvkm_object_bind(object, NULL, 0, &chan->engn[engn].inst);
chan              174 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	ret = nvkm_vmm_get(chan->base.vmm, 12, chan->engn[engn].inst->size,
chan              175 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 			   &chan->engn[engn].vma);
chan              179 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	return nvkm_memory_map(chan->engn[engn].inst, 0, chan->base.vmm,
chan              180 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 			       chan->engn[engn].vma, NULL, 0);
chan              186 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              187 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo *fifo = chan->fifo;
chan              189 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	u32 coff = chan->base.chid * 8;
chan              191 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	if (!list_empty(&chan->head)) {
chan              192 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		gk104_fifo_runlist_remove(fifo, chan);
chan              194 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		gk104_fifo_gpfifo_kick(chan);
chan              195 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		gk104_fifo_runlist_update(fifo, chan->runl);
chan              204 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              205 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo *fifo = chan->fifo;
chan              207 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	u32 addr = chan->base.inst->addr >> 12;
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	u32 coff = chan->base.chid * 8;
chan              210 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_mask(device, 0x800004 + coff, 0x000f0000, chan->runl << 16);
chan              213 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	if (list_empty(&chan->head) && !chan->killed) {
chan              214 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		gk104_fifo_runlist_insert(fifo, chan);
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		gk104_fifo_runlist_update(fifo, chan->runl);
chan              224 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan              225 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_memory_unref(&chan->mthd);
chan              226 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	kfree(chan->cgrp);
chan              227 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	return chan;
chan              248 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	struct gk104_fifo_chan *chan;
chan              268 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              270 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	*pobject = &chan->base.object;
chan              271 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	chan->fifo = fifo;
chan              272 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	chan->runl = runlist;
chan              273 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	INIT_LIST_HEAD(&chan->head);
chan              278 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 				  oclass, &chan->base);
chan              282 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	*chid = chan->base.chid;
chan              283 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	*inst = chan->base.inst->addr;
chan              289 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL)))
chan              291 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		chan->cgrp->id = chan->base.chid;
chan              292 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		INIT_LIST_HEAD(&chan->cgrp->head);
chan              293 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		INIT_LIST_HEAD(&chan->cgrp->chan);
chan              294 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 		chan->cgrp->chan_nr = 0;
chan              298 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	usermem = chan->base.chid * 0x200;
chan              308 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_kmap(chan->base.inst);
chan              309 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x08, lower_32_bits(usermem));
chan              310 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x0c, upper_32_bits(usermem));
chan              311 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x10, 0x0000face);
chan              312 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x30, 0xfffff902);
chan              313 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x48, lower_32_bits(ioffset));
chan              314 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x4c, upper_32_bits(ioffset) |
chan              316 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x84, 0x20400000);
chan              317 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x94, 0x30000001);
chan              318 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0x9c, 0x00000100);
chan              319 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xac, 0x0000001f);
chan              320 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xe4, priv ? 0x00000020 : 0x00000000);
chan              321 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xe8, chan->base.chid);
chan              322 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xb8, 0xf8000000);
chan              323 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xf8, 0x10003080); /* 0x002310 */
chan              324 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_wo32(chan->base.inst, 0xfc, 0x10000010); /* 0x002350 */
chan              325 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c 	nvkm_done(chan->base.inst);
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c gv100_fifo_gpfifo_submit_token(struct nvkm_fifo_chan *chan)
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	return chan->chid;
chan               38 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c gv100_fifo_gpfifo_engine_valid(struct gk104_fifo_chan *chan, bool ce, bool valid)
chan               40 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct nvkm_subdev *subdev = &chan->base.fifo->engine.subdev;
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_mask(device, 0x002630, BIT(chan->runl), BIT(chan->runl));
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	ret = gk104_fifo_gpfifo_kick_locked(chan);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		nvkm_kmap(chan->base.inst);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		nvkm_mo32(chan->base.inst, 0x0ac, mask, data);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		nvkm_done(chan->base.inst);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_mask(device, 0x002630, BIT(chan->runl), 0);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		return gk104_fifo_gpfifo_kick(chan);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	ret = gv100_fifo_gpfifo_engine_valid(chan, false, false);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct nvkm_gpuobj *inst = chan->base.inst;
chan              100 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	addr = chan->engn[engine->subdev.index].vma->addr;
chan              106 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	return gv100_fifo_gpfifo_engine_valid(chan, false, true);
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	struct gk104_fifo_chan *chan;
chan              148 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              150 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	*pobject = &chan->base.object;
chan              151 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	chan->fifo = fifo;
chan              152 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	chan->runl = runlist;
chan              153 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	INIT_LIST_HEAD(&chan->head);
chan              157 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 				  oclass, &chan->base);
chan              161 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	*chid = chan->base.chid;
chan              162 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	*inst = chan->base.inst->addr;
chan              163 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	*token = chan->base.func->submit_token(&chan->base);
chan              169 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		if (!(chan->cgrp = kmalloc(sizeof(*chan->cgrp), GFP_KERNEL)))
chan              171 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		chan->cgrp->id = chan->base.chid;
chan              172 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		INIT_LIST_HEAD(&chan->cgrp->head);
chan              173 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		INIT_LIST_HEAD(&chan->cgrp->chan);
chan              174 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 		chan->cgrp->chan_nr = 0;
chan              178 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	usermem = chan->base.chid * 0x200;
chan              193 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 			      &chan->mthd);
chan              197 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	mthd = nvkm_memory_bar2(chan->mthd);
chan              202 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_kmap(chan->base.inst);
chan              203 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x008, lower_32_bits(usermem));
chan              204 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x00c, upper_32_bits(usermem));
chan              205 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x010, 0x0000face);
chan              206 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x030, 0x7ffff902);
chan              207 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x048, lower_32_bits(ioffset));
chan              208 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x04c, upper_32_bits(ioffset) |
chan              210 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x084, 0x20400000);
chan              211 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x094, 0x30000001);
chan              212 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x0e4, priv ? 0x00000020 : 0x00000000);
chan              213 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x0e8, chan->base.chid);
chan              214 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x0f4, 0x00001000);
chan              215 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x0f8, 0x10003080);
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_mo32(chan->base.inst, 0x218, 0x00000000, 0x00000000);
chan              217 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x220, lower_32_bits(mthd));
chan              218 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_wo32(chan->base.inst, 0x224, upper_32_bits(mthd));
chan              219 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	nvkm_done(chan->base.inst);
chan              220 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogv100.c 	return gv100_fifo_gpfifo_engine_valid(chan, true, true);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	struct nv50_fifo_chan *chan;
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	*pobject = &chan->base.object;
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 				  oclass, chan);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	args->v0.chid = chan->base.chid;
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_kmap(chan->ramfc);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x3c, 0x403f6078);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x44, 0x01003fff);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x48, chan->base.push->node->offset >> 4);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x50, lower_32_bits(ioffset));
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x54, upper_32_bits(ioffset) | (ilength << 16));
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x60, 0x7fffffff);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x78, 0x00000000);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x7c, 0x30000001);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_wo32(chan->ramfc, 0x80, ((chan->ramht->bits - 9) << 27) |
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 				     (chan->ramht->gpuobj->node->offset >> 4));
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c 	nvkm_done(chan->ramfc);
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c 	struct gk104_fifo_chan *chan = gk104_fifo_chan(base);
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifotu102.c 	return (chan->runl << 16) | chan->base.chid;
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c gv100_fifo_runlist_chan(struct gk104_fifo_chan *chan,
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	struct nvkm_memory *usermem = chan->fifo->user.mem;
chan               36 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	const u64 user = nvkm_memory_addr(usermem) + (chan->base.chid * 0x200);
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	const u64 inst = chan->base.inst->addr;
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	nvkm_wo32(memory, offset + 0x8, lower_32_bits(inst) | chan->base.chid);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	.chan = gv100_fifo_runlist_chan,
chan              299 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c 	.chan = {{ 0, 0,VOLTA_CHANNEL_GPFIFO_A}, gv100_fifo_gpfifo_new },
chan              141 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	struct nvkm_fifo_chan *chan;
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 		chan = nvkm_fifo_chan_chid(&fifo->base, chid, &flags);
chan              167 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 			   chid, chan ? chan->object.client->name : "unknown",
chan              169 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 		nvkm_fifo_chan_put(&fifo->base, flags, &chan);
chan              196 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	struct nvkm_fifo_chan *chan;
chan              200 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	chan = nvkm_fifo_chan_chid(&fifo->base, chid, &flags);
chan              201 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	name = chan ? chan->object.client->name : "unknown";
chan              232 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	nvkm_fifo_chan_put(&fifo->base, flags, &chan);
chan              354 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.c 	.chan = {
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv10.c 	.chan = {
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv17.c 	.chan = {
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c 	.chan = {
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c 	.chan = {
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h 	const struct nvkm_fifo_chan_oclass *chan[];
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c 	.chan = gv100_fifo_runlist_chan,
chan              108 drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c 	.chan = {{ 0, 0,TURING_CHANNEL_GPFIFO_A}, tu102_fifo_gpfifo_new },
chan              112 drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c nvkm_gr_cclass_new(struct nvkm_fifo_chan *chan,
chan              118 drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c 		return gr->func->chan_new(gr, chan, oclass, pobject);
chan              157 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr_chan *chan;
chan              285 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr_chan *chan = gf100_gr_chan(oclass->parent);
chan              294 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	object->chan = chan;
chan              323 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr_chan *chan = gf100_gr_chan(object);
chan              324 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr *gr = chan->gr;
chan              337 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(*pgpuobj, 0x00, chan->mmio_nr / 2);
chan              338 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(*pgpuobj, 0x04, chan->mmio_vma->addr >> 8);
chan              342 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(*pgpuobj, 0x10, chan->mmio_nr / 2);
chan              343 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(*pgpuobj, 0x14, lower_32_bits(chan->mmio_vma->addr));
chan              344 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(*pgpuobj, 0x18, upper_32_bits(chan->mmio_vma->addr));
chan              357 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr_chan *chan = gf100_gr_chan(object);
chan              360 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	for (i = 0; i < ARRAY_SIZE(chan->data); i++) {
chan              361 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_vmm_put(chan->vmm, &chan->data[i].vma);
chan              362 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_memory_unref(&chan->data[i].mem);
chan              365 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_vmm_put(chan->vmm, &chan->mmio_vma);
chan              366 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_memory_unref(&chan->mmio);
chan              367 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_vmm_unref(&chan->vmm);
chan              368 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	return chan;
chan              385 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct gf100_gr_chan *chan;
chan              390 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              392 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_object_ctor(&gf100_gr_chan, oclass, &chan->object);
chan              393 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	chan->gr = gr;
chan              394 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	chan->vmm = nvkm_vmm_ref(fifoch->vmm);
chan              395 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	*pobject = &chan->object;
chan              402 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 			      false, &chan->mmio);
chan              406 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	ret = nvkm_vmm_get(fifoch->vmm, 12, 0x1000, &chan->mmio_vma);
chan              410 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	ret = nvkm_memory_map(chan->mmio, 0, fifoch->vmm,
chan              411 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 			      chan->mmio_vma, &args, sizeof(args));
chan              419 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 				      &chan->data[i].mem);
chan              424 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 				   nvkm_memory_size(chan->data[i].mem),
chan              425 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 				   &chan->data[i].vma);
chan              431 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		ret = nvkm_memory_map(chan->data[i].mem, 0, chan->vmm,
chan              432 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 				      chan->data[i].vma, &args, sizeof(args));
chan              440 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_kmap(chan->mmio);
chan              446 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 			u64 info = chan->data[mmio->buffer].vma->addr;
chan              450 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(chan->mmio, chan->mmio_nr++ * 4, addr);
chan              451 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		nvkm_wo32(chan->mmio, chan->mmio_nr++ * 4, data);
chan              454 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_done(chan->mmio);
chan             1551 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	struct nvkm_fifo_chan *chan;
chan             1564 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	chan = nvkm_fifo_chan_inst(device->fifo, (u64)inst << 12, &flags);
chan             1565 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	if (chan) {
chan             1566 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		name = chan->object.client->name;
chan             1567 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 		chid = chan->chid;
chan             1634 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c 	nvkm_fifo_chan_put(device->fifo, flags, &chan);
chan              353 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan[16];
chan             1075 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan = NULL;
chan             1078 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 		if (chid < ARRAY_SIZE(gr->chan))
chan             1079 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 			chan = gr->chan[chid];
chan             1081 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	return chan;
chan             1085 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c nv04_gr_load_context(struct nv04_gr_chan *chan, int chid)
chan             1087 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nvkm_device *device = chan->gr->base.engine.subdev.device;
chan             1091 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 		nvkm_wr32(device, nv04_gr_ctx_regs[i], chan->nv04[i]);
chan             1100 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c nv04_gr_unload_context(struct nv04_gr_chan *chan)
chan             1102 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nvkm_device *device = chan->gr->base.engine.subdev.device;
chan             1106 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 		chan->nv04[i] = nvkm_rd32(device, nv04_gr_ctx_regs[i]);
chan             1130 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	next = gr->chan[chid];
chan             1135 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c static u32 *ctx_reg(struct nv04_gr_chan *chan, u32 reg)
chan             1141 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 			return &chan->nv04[i];
chan             1150 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan = nv04_gr_chan(object);
chan             1151 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr *gr = chan->gr;
chan             1155 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	gr->chan[chan->chid] = NULL;
chan             1157 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	return chan;
chan             1163 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan = nv04_gr_chan(object);
chan             1164 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr *gr = chan->gr;
chan             1170 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	if (nv04_gr_channel(gr) == chan)
chan             1171 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 		nv04_gr_unload_context(chan);
chan             1188 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan;
chan             1191 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan             1193 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	nvkm_object_ctor(&nv04_gr_chan, oclass, &chan->object);
chan             1194 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	chan->gr = gr;
chan             1195 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	chan->chid = fifoch->chid;
chan             1196 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	*pobject = &chan->object;
chan             1198 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	*ctx_reg(chan, NV04_PGRAPH_DEBUG_3) = 0xfad4ff31;
chan             1201 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	gr->chan[chan->chid] = chan;
chan             1289 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	struct nv04_gr_chan *chan;
chan             1293 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 	chan = gr->chan[chid];
chan             1296 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 		if (chan && (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD)) {
chan             1320 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c 			   chan ? chan->object.client->name : "unknown",
chan              393 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan[32];
chan              431 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv17_gr_mthd_lma_window(struct nv10_gr_chan *chan, u32 mthd, u32 data)
chan              433 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nvkm_device *device = chan->object.engine->subdev.device;
chan              434 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nvkm_gr *gr = &chan->gr->base;
chan              435 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct pipe_state *pipe = &chan->pipe_state;
chan              440 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	chan->lma_window[(mthd - 0x1638) / 4] = data;
chan              450 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	PIPE_RESTORE(device, chan->lma_window, 0x6790);
chan              504 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv17_gr_mthd_lma_enable(struct nv10_gr_chan *chan, u32 mthd, u32 data)
chan              506 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nvkm_device *device = chan->object.engine->subdev.device;
chan              507 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nvkm_gr *gr = &chan->gr->base;
chan              516 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv17_gr_mthd_celcius(struct nv10_gr_chan *chan, u32 mthd, u32 data)
chan              526 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	func(chan, mthd, data);
chan              531 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_mthd(struct nv10_gr_chan *chan, u8 class, u32 mthd, u32 data)
chan              539 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	return func(chan, mthd, data);
chan              550 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan = NULL;
chan              553 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		if (chid < ARRAY_SIZE(gr->chan))
chan              554 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 			chan = gr->chan[chid];
chan              556 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	return chan;
chan              560 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_save_pipe(struct nv10_gr_chan *chan)
chan              562 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              563 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct pipe_state *pipe = &chan->pipe_state;
chan              579 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_load_pipe(struct nv10_gr_chan *chan)
chan              581 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              582 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct pipe_state *pipe = &chan->pipe_state;
chan              630 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_create_pipe(struct nv10_gr_chan *chan)
chan              632 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              634 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct pipe_state *pipe_state = &chan->pipe_state;
chan              812 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_load_dma_vtxbuf(struct nv10_gr_chan *chan, int chid, u32 inst)
chan              814 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              883 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_load_context(struct nv10_gr_chan *chan, int chid)
chan              885 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              891 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		nvkm_wr32(device, nv10_gr_ctx_regs[i], chan->nv10[i]);
chan              895 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 			nvkm_wr32(device, nv17_gr_ctx_regs[i], chan->nv17[i]);
chan              898 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	nv10_gr_load_pipe(chan);
chan              901 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	nv10_gr_load_dma_vtxbuf(chan, chid, inst);
chan              910 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c nv10_gr_unload_context(struct nv10_gr_chan *chan)
chan              912 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              917 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		chan->nv10[i] = nvkm_rd32(device, nv10_gr_ctx_regs[i]);
chan              921 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 			chan->nv17[i] = nvkm_rd32(device, nv17_gr_ctx_regs[i]);
chan              924 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	nv10_gr_save_pipe(chan);
chan              948 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	next = gr->chan[chid];
chan              956 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan = nv10_gr_chan(object);
chan              957 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              963 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	if (nv10_gr_channel(gr) == chan)
chan              964 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		nv10_gr_unload_context(chan);
chan              973 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan = nv10_gr_chan(object);
chan              974 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr *gr = chan->gr;
chan              978 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	gr->chan[chan->chid] = NULL;
chan              980 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	return chan;
chan              992 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		chan->nv10[offset] = val; \
chan              998 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		chan->nv17[offset] = val; \
chan             1006 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan;
chan             1010 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan             1012 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	nvkm_object_ctor(&nv10_gr_chan, oclass, &chan->object);
chan             1013 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	chan->gr = gr;
chan             1014 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	chan->chid = fifoch->chid;
chan             1015 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	*pobject = &chan->object;
chan             1034 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	NV_WRITE_CTX(NV10_PGRAPH_CTX_USER, chan->chid << 24);
chan             1036 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	nv10_gr_create_pipe(chan);
chan             1039 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	gr->chan[chan->chid] = chan;
chan             1097 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	struct nv10_gr_chan *chan;
chan             1101 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 	chan = gr->chan[chid];
chan             1104 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 		if (chan && (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD)) {
chan             1105 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 			if (!nv10_gr_mthd(chan, class, mthd, data))
chan             1128 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c 			   chan ? chan->object.client->name : "unknown",
chan               19 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr_chan *chan = nv20_gr_chan(object);
chan               20 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr *gr = chan->gr;
chan               21 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	u32 inst = nvkm_memory_addr(chan->inst);
chan               24 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(gr->ctxtab, chan->chid * 4, inst >> 4);
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr_chan *chan = nv20_gr_chan(object);
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr *gr = chan->gr;
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	u32 inst = nvkm_memory_addr(chan->inst);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	if (chan->chid == chid) {
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(gr->ctxtab, chan->chid * 4, 0x00000000);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr_chan *chan = nv20_gr_chan(object);
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_memory_unref(&chan->inst);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	return chan;
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nv20_gr_chan *chan;
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_object_ctor(&nv20_gr_chan, oclass, &chan->object);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	chan->gr = gr;
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	chan->chid = fifoch->chid;
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	*pobject = &chan->object;
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 			      &chan->inst);
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_kmap(chan->inst);
chan               96 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x0000, 0x00000001 | (chan->chid << 24));
chan               97 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x033c, 0xffff0000);
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x03a0, 0x0fff0000);
chan               99 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x03a4, 0x0fff0000);
chan              100 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x047c, 0x00000101);
chan              101 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x0490, 0x00000111);
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x04a8, 0x44400000);
chan              104 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan              106 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x00080000);
chan              108 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x000105b8);
chan              112 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan              115 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x05a4, 0x4b7fffff);
chan              116 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x05fc, 0x00000001);
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x0604, 0x00004000);
chan              118 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x0610, 0x00000001);
chan              119 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x0618, 0x00040000);
chan              120 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x061c, 0x00010000);
chan              122 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, (i + 0), 0x10700ff9);
chan              123 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, (i + 4), 0x0436086c);
chan              124 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, (i + 8), 0x000c001b);
chan              126 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x281c, 0x3f800000);
chan              127 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2830, 0x3f800000);
chan              128 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x285c, 0x40000000);
chan              129 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2860, 0x3f800000);
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2864, 0x3f000000);
chan              131 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x286c, 0x40000000);
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2870, 0x3f800000);
chan              133 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2878, 0xbf800000);
chan              134 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x2880, 0xbf800000);
chan              135 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x34a4, 0x000fe000);
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x3530, 0x000003f8);
chan              137 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_wo32(chan->inst, 0x3540, 0x002fe000);
chan              139 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 		nvkm_wo32(chan->inst, i, 0x001c527c);
chan              140 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_done(chan->inst);
chan              185 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	struct nvkm_fifo_chan *chan;
chan              199 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	chan = nvkm_fifo_chan_chid(device->fifo, chid, &flags);
chan              212 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 			   chan ? chan->object.client->name : "unknown",
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c 	nvkm_fifo_chan_put(device->fifo, flags, &chan);
chan               25 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	struct nv20_gr_chan *chan;
chan               28 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_object_ctor(&nv25_gr_chan, oclass, &chan->object);
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	chan->gr = gr;
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	chan->chid = fifoch->chid;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	*pobject = &chan->object;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 			      &chan->inst);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_kmap(chan->inst);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0028, 0x00000001 | (chan->chid << 24));
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x035c, 0xffff0000);
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x03c0, 0x0fff0000);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x03c4, 0x0fff0000);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x049c, 0x00000101);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04b0, 0x00000111);
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04c8, 0x00000080);
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04cc, 0xffff0000);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04d0, 0x00000001);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04e4, 0x44400000);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x04fc, 0x4b800000);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x00080000);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x000105b8);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x05e0, 0x4b7fffff);
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0620, 0x00000080);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0624, 0x30201000);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0628, 0x70605040);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x062c, 0xb0a09080);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0630, 0xf0e0d0c0);
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0664, 0x00000001);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x066c, 0x00004000);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0678, 0x00000001);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0680, 0x00040000);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x0684, 0x00010000);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, (i + 0), 0x10700ff9);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, (i + 4), 0x0436086c);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, (i + 8), 0x000c001b);
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2704, 0x3f800000);
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2718, 0x3f800000);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2744, 0x40000000);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2748, 0x3f800000);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x274c, 0x3f000000);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2754, 0x40000000);
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2758, 0x3f800000);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2760, 0xbf800000);
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x2768, 0xbf800000);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x308c, 0x000fe000);
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x3108, 0x000003f8);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_wo32(chan->inst, 0x3468, 0x002fe000);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 		nvkm_wo32(chan->inst, i, 0x001c527c);
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c 	nvkm_done(chan->inst);
chan               25 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	struct nv20_gr_chan *chan;
chan               28 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_object_ctor(&nv2a_gr_chan, oclass, &chan->object);
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	chan->gr = gr;
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	chan->chid = fifoch->chid;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	*pobject = &chan->object;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 			      &chan->inst);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_kmap(chan->inst);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x0000, 0x00000001 | (chan->chid << 24));
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x033c, 0xffff0000);
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x03a0, 0x0fff0000);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x03a4, 0x0fff0000);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x047c, 0x00000101);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x0490, 0x00000111);
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x04a8, 0x44400000);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x00080000);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x000105b8);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x05a4, 0x4b7fffff);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x05fc, 0x00000001);
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x0604, 0x00004000);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x0610, 0x00000001);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x0618, 0x00040000);
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x061c, 0x00010000);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, (i + 0), 0x10700ff9);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, (i + 4), 0x0436086c);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, (i + 8), 0x000c001b);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x269c, 0x3f800000);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26b0, 0x3f800000);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26dc, 0x40000000);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26e0, 0x3f800000);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26e4, 0x3f000000);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26ec, 0x40000000);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26f0, 0x3f800000);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x26f8, 0xbf800000);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x2700, 0xbf800000);
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x3024, 0x000fe000);
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x30a0, 0x000003f8);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_wo32(chan->inst, 0x33fc, 0x002fe000);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 		nvkm_wo32(chan->inst, i, 0x001c527c);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c 	nvkm_done(chan->inst);
chan               26 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	struct nv20_gr_chan *chan;
chan               29 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_object_ctor(&nv30_gr_chan, oclass, &chan->object);
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	chan->gr = gr;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	chan->chid = fifoch->chid;
chan               34 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	*pobject = &chan->object;
chan               38 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 			      &chan->inst);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_kmap(chan->inst);
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0028, 0x00000001 | (chan->chid << 24));
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0410, 0x00000101);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0424, 0x00000111);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0428, 0x00000060);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0444, 0x00000080);
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0448, 0xffff0000);
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x044c, 0x00000001);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0460, 0x44400000);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x048c, 0xffff0000);
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x0fff0000);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x04ec, 0x00011100);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0550, 0x4b7fffff);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x058c, 0x00000080);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0590, 0x30201000);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0594, 0x70605040);
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0598, 0xb8a89888);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x059c, 0xf8e8d8c8);
chan               63 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x05b0, 0xb0000000);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x00010588);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x0008aae4);
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x085c, 0x00040000);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x0860, 0x00010000);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x00040004);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i + 0, 0x10700ff9);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i + 4, 0x0436086c);
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i + 8, 0x000c001b);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 		nvkm_wo32(chan->inst, i, 0x0000ffff);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x344c, 0x3f800000);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x3808, 0x3f800000);
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x381c, 0x3f800000);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x3848, 0x40000000);
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x384c, 0x3f800000);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x3850, 0x3f000000);
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x3858, 0x40000000);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x385c, 0x3f800000);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x3864, 0xbf800000);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_wo32(chan->inst, 0x386c, 0xbf800000);
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c 	nvkm_done(chan->inst);
chan               25 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	struct nv20_gr_chan *chan;
chan               28 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_object_ctor(&nv34_gr_chan, oclass, &chan->object);
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	chan->gr = gr;
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	chan->chid = fifoch->chid;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	*pobject = &chan->object;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 			      &chan->inst);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_kmap(chan->inst);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0028, 0x00000001 | (chan->chid << 24));
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x040c, 0x01000101);
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0420, 0x00000111);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0424, 0x00000060);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0440, 0x00000080);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0444, 0xffff0000);
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0448, 0x00000001);
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x045c, 0x44400000);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0480, 0xffff0000);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x0fff0000);
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x04e0, 0x00011100);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0544, 0x4b7fffff);
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x057c, 0x00000080);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0580, 0x30201000);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0584, 0x70605040);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0588, 0xb8a89888);
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x058c, 0xf8e8d8c8);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x05a0, 0xb0000000);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x00010588);
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x0008aae4);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0850, 0x00040000);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x0854, 0x00010000);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x00040004);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i + 0, 0x10700ff9);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i + 4, 0x0436086c);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i + 8, 0x000c001b);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 		nvkm_wo32(chan->inst, i, 0x0000ffff);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2ae0, 0x3f800000);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2e9c, 0x3f800000);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2eb0, 0x3f800000);
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2edc, 0x40000000);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2ee0, 0x3f800000);
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2ee4, 0x3f000000);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2eec, 0x40000000);
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2ef0, 0x3f800000);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2ef8, 0xbf800000);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_wo32(chan->inst, 0x2f00, 0xbf800000);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c 	nvkm_done(chan->inst);
chan               25 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	struct nv20_gr_chan *chan;
chan               28 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               30 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_object_ctor(&nv35_gr_chan, oclass, &chan->object);
chan               31 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	chan->gr = gr;
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	chan->chid = fifoch->chid;
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	*pobject = &chan->object;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 			      &chan->inst);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_kmap(chan->inst);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0028, 0x00000001 | (chan->chid << 24));
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x040c, 0x00000101);
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0420, 0x00000111);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0424, 0x00000060);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0440, 0x00000080);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0444, 0xffff0000);
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0448, 0x00000001);
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x045c, 0x44400000);
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0488, 0xffff0000);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x0fff0000);
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x04e8, 0x00011100);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x07ff0000);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x054c, 0x4b7fffff);
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0588, 0x00000080);
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x058c, 0x30201000);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0590, 0x70605040);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0594, 0xb8a89888);
chan               61 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0598, 0xf8e8d8c8);
chan               62 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x05ac, 0xb0000000);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x00010588);
chan               66 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x00030303);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x0008aae4);
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x01012000);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x00080008);
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0860, 0x00040000);
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x0864, 0x00010000);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x00040004);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i + 0, 0x10700ff9);
chan               79 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i + 4, 0x0436086c);
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i + 8, 0x000c001b);
chan               83 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 		nvkm_wo32(chan->inst, i, 0x0000ffff);
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3450, 0x3f800000);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x380c, 0x3f800000);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3820, 0x3f800000);
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x384c, 0x40000000);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3850, 0x3f800000);
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3854, 0x3f000000);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x385c, 0x40000000);
chan               91 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3860, 0x3f800000);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3868, 0xbf800000);
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_wo32(chan->inst, 0x3870, 0xbf800000);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c 	nvkm_done(chan->inst);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr_chan *chan = nv40_gr_chan(object);
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr *gr = chan->gr;
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 		chan->inst = (*pgpuobj)->addr;
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 		nvkm_wo32(*pgpuobj, 0x00000, chan->inst >> 4);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr_chan *chan = nv40_gr_chan(object);
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr *gr = chan->gr;
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	u32 inst = 0x01000000 | chan->inst >> 4;
chan              132 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr_chan *chan = nv40_gr_chan(object);
chan              134 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	spin_lock_irqsave(&chan->gr->base.engine.lock, flags);
chan              135 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	list_del(&chan->head);
chan              136 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	spin_unlock_irqrestore(&chan->gr->base.engine.lock, flags);
chan              137 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	return chan;
chan              152 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr_chan *chan;
chan              155 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              157 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	nvkm_object_ctor(&nv40_gr_chan, oclass, &chan->object);
chan              158 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	chan->gr = gr;
chan              159 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	chan->fifo = fifoch;
chan              160 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	*pobject = &chan->object;
chan              162 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	spin_lock_irqsave(&chan->gr->base.engine.lock, flags);
chan              163 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	list_add(&chan->head, &gr->chan);
chan              164 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	spin_unlock_irqrestore(&chan->gr->base.engine.lock, flags);
chan              235 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	struct nv40_gr_chan *temp, *chan = NULL;
chan              252 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	list_for_each_entry(temp, &gr->chan, head) {
chan              254 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 			chan = temp;
chan              255 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 			list_del(&chan->head);
chan              256 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 			list_add(&chan->head, &gr->chan);
chan              278 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 			   chan ? chan->fifo->chid : -1, inst << 4,
chan              279 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 			   chan ? chan->fifo->object.client->name : "unknown",
chan              439 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c 	INIT_LIST_HEAD(&gr->chan);
chan               10 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h 	struct list_head chan;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	struct nv50_gr_chan *chan;
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               97 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	nvkm_object_ctor(&nv50_gr_chan, oclass, &chan->object);
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	chan->gr = gr;
chan               99 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	*pobject = &chan->object;
chan              625 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	struct nvkm_fifo_chan *chan;
chan              640 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	chan = nvkm_fifo_chan_inst(device->fifo, (u64)inst << 12, &flags);
chan              641 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	if (chan)  {
chan              642 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 		name = chan->object.client->name;
chan              643 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 		chid = chan->chid;
chan              675 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c 	nvkm_fifo_chan_put(device->fifo, flags, &chan);
chan               67 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	struct nv31_mpeg_chan *chan = nv31_mpeg_chan(object);
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	struct nv31_mpeg *mpeg = chan->mpeg;
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	if (mpeg->chan == chan)
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 		mpeg->chan = NULL;
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	return chan;
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	struct nv31_mpeg_chan *chan;
chan               93 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               95 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	nvkm_object_ctor(&nv31_mpeg_chan, oclass, &chan->object);
chan               96 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	chan->mpeg = mpeg;
chan               97 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	chan->fifo = fifoch;
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	*pobject = &chan->object;
chan              101 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 	if (!mpeg->chan) {
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 		mpeg->chan = chan;
chan              216 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 			   mpeg->chan ? mpeg->chan->fifo->chid : -1,
chan              217 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c 			   mpeg->chan ? mpeg->chan->object.client->name :
chan               11 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h 	struct nv31_mpeg_chan *chan;
chan               35 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct list_head chan;
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object);
chan               56 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	int ret = nvkm_gpuobj_new(chan->object.engine->subdev.device, 264 * 4,
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 		chan->inst = (*pgpuobj)->addr;
chan               71 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg *mpeg = chan->mpeg;
chan               74 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	u32 inst = 0x80000000 | (chan->inst >> 4);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg_chan *chan = nv44_mpeg_chan(object);
chan               87 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg *mpeg = chan->mpeg;
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	list_del(&chan->head);
chan               92 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	return chan;
chan              108 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg_chan *chan;
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              113 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	nvkm_object_ctor(&nv44_mpeg_chan, oclass, &chan->object);
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	chan->mpeg = mpeg;
chan              115 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	chan->fifo = fifoch;
chan              116 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	*pobject = &chan->object;
chan              119 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	list_add(&chan->head, &mpeg->chan);
chan              148 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	struct nv44_mpeg_chan *temp, *chan = NULL;
chan              158 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	list_for_each_entry(temp, &mpeg->chan, head) {
chan              160 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 			chan = temp;
chan              161 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 			list_del(&chan->head);
chan              162 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 			list_add(&chan->head, &mpeg->chan);
chan              185 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 			   chan ? chan->fifo->chid : -1, inst << 4,
chan              186 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 			   chan ? chan->object.client->name : "unknown",
chan              212 drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c 	INIT_LIST_HEAD(&mpeg->chan);
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c g98_sec_intr(struct nvkm_falcon *sec, struct nvkm_fifo_chan *chan)
chan               57 drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c 		   en ? en->name : "UNKNOWN", chan ? chan->chid : -1,
chan               58 drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c 		   chan ? chan->inst->addr : 0,
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c 		   chan ? chan->object.client->name : "unknown",
chan               32 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 	struct nvkm_sw_chan *chan;
chan               37 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 	list_for_each_entry(chan, &sw->chan, head) {
chan               38 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 		if (chan->fifo->chid == chid) {
chan               39 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 			handled = nvkm_sw_chan_mthd(chan, subc, mthd, data);
chan               40 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 			list_del(&chan->head);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 			list_add(&chan->head, &sw->chan);
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 	struct nvkm_sw_chan *chan = nvkm_sw_chan(oclass->parent);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 	return sclass->ctor(chan, oclass, data, size, pobject);
chan              106 drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c 	INIT_LIST_HEAD(&sw->chan);
chan               33 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c nvkm_sw_chan_mthd(struct nvkm_sw_chan *chan, int subc, u32 mthd, u32 data)
chan               39 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 		nvkm_event_send(&chan->event, 1, 0, NULL, 0);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 		if (chan->func->mthd)
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 			return chan->func->mthd(chan, subc, mthd, data);
chan               75 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	struct nvkm_sw_chan *chan = nvkm_sw_chan(object);
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	struct nvkm_sw *sw = chan->sw;
chan               78 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	void *data = chan;
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	if (chan->func->dtor)
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 		data = chan->func->dtor(chan);
chan               82 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	nvkm_event_fini(&chan->event);
chan               85 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	list_del(&chan->head);
chan               98 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 		  struct nvkm_sw_chan *chan)
chan              102 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	nvkm_object_ctor(&nvkm_sw_chan, oclass, &chan->object);
chan              103 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	chan->func = func;
chan              104 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	chan->sw = sw;
chan              105 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	chan->fifo = fifo;
chan              107 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	list_add(&chan->head, &sw->chan);
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.c 	return nvkm_event_init(&nvkm_sw_chan_event, 1, 1, &chan->event);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	struct nv50_sw_chan *chan =
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		container_of(notify, typeof(*chan), vblank.notify[notify->index]);
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	struct nvkm_sw *sw = chan->base.sw;
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	u32 inst = chan->base.fifo->inst->addr >> 12;
chan               49 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	nvkm_wr32(device, 0x06000c, upper_32_bits(chan->vblank.offset));
chan               50 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	nvkm_wr32(device, 0x060010, lower_32_bits(chan->vblank.offset));
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	nvkm_wr32(device, 0x060014, chan->vblank.value);
chan               59 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	struct nv50_sw_chan *chan = nv50_sw_chan(base);
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	struct nvkm_engine *engine = chan->base.object.engine;
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		chan->vblank.offset &= 0x00ffffffffULL;
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		chan->vblank.offset |= (u64)data << 32;
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		chan->vblank.offset &= 0xff00000000ULL;
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		chan->vblank.offset |= data;
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 		chan->vblank.value = data;
chan               76 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 			nvkm_notify_get(&chan->vblank.notify[data]);
chan              110 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	struct nv50_sw_chan *chan;
chan              113 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              115 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 	*pobject = &chan->base.object;
chan              118 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 				&chan->base);
chan              130 drivers/gpu/drm/nouveau/nvkm/engine/sw/gf100.c 				       &chan->vblank.notify[i]);
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	struct nv04_sw_chan *chan = nv04_sw_chan(nvsw->chan);
chan               53 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 		args->v0.ref = atomic_read(&chan->ref);
chan               77 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c nv04_nvsw_new(struct nvkm_sw_chan *chan, const struct nvkm_oclass *oclass,
chan               80 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	return nvkm_nvsw_new_(&nv04_nvsw, chan, oclass, data, size, pobject);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	struct nv04_sw_chan *chan = nv04_sw_chan(base);
chan               94 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 		atomic_set(&chan->ref, data);
chan              112 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	struct nv04_sw_chan *chan;
chan              114 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              116 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	atomic_set(&chan->ref, 0);
chan              117 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	*pobject = &chan->base.object;
chan              119 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv04.c 	return nvkm_sw_chan_ctor(&nv04_sw_chan, sw, fifo, oclass, &chan->base);
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c 	struct nvkm_sw_chan *chan;
chan               44 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c 	*pobject = &chan->object;
chan               48 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv10.c 	return nvkm_sw_chan_ctor(&nv10_sw_chan, sw, fifo, oclass, chan);
chan               41 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nv50_sw_chan *chan =
chan               42 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		container_of(notify, typeof(*chan), vblank.notify[notify->index]);
chan               43 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nvkm_sw *sw = chan->base.sw;
chan               46 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	nvkm_wr32(device, 0x001704, chan->base.fifo->inst->addr >> 12);
chan               47 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	nvkm_wr32(device, 0x001710, 0x80000000 | chan->vblank.ctxdma);
chan               51 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		nvkm_wr32(device, 0x001570, chan->vblank.offset);
chan               52 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		nvkm_wr32(device, 0x001574, chan->vblank.value);
chan               54 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		nvkm_wr32(device, 0x060010, chan->vblank.offset);
chan               55 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		nvkm_wr32(device, 0x060014, chan->vblank.value);
chan               64 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nv50_sw_chan *chan = nv50_sw_chan(base);
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nvkm_engine *engine = chan->base.object.engine;
chan               68 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	case 0x018c: chan->vblank.ctxdma = data; return true;
chan               69 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	case 0x0400: chan->vblank.offset = data; return true;
chan               70 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	case 0x0404: chan->vblank.value  = data; return true;
chan               73 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 			nvkm_notify_get(&chan->vblank.notify[data]);
chan               86 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nv50_sw_chan *chan = nv50_sw_chan(base);
chan               88 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	for (i = 0; i < ARRAY_SIZE(chan->vblank.notify); i++)
chan               89 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 		nvkm_notify_fini(&chan->vblank.notify[i]);
chan               90 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	return chan;
chan              104 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	struct nv50_sw_chan *chan;
chan              107 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	if (!(chan = kzalloc(sizeof(*chan), GFP_KERNEL)))
chan              109 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	*pobject = &chan->base.object;
chan              111 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 	ret = nvkm_sw_chan_ctor(&nv50_sw_chan, sw, fifoch, oclass, &chan->base);
chan              123 drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.c 				       &chan->vblank.notify[i]);
chan               45 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c 		*pevent = &nvsw->chan->event;
chan               60 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c nvkm_nvsw_new_(const struct nvkm_nvsw_func *func, struct nvkm_sw_chan *chan,
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c 	nvsw->chan = chan;
chan               81 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c nvkm_nvsw_new(struct nvkm_sw_chan *chan, const struct nvkm_oclass *oclass,
chan               84 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.c 	return nvkm_nvsw_new_(&nvkm_nvsw, chan, oclass, data, size, pobject);
chan               10 drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.h 	struct nvkm_sw_chan *chan;
chan               65 drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c 	u32 chan = nvkm_rd32(device, base + 0xc28);
chan               72 drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c 	if (unk104 == 0x10001 && unk10c == 0x200 && chan && !intr) {
chan              141 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c 	struct nvkm_fifo_chan *chan;
chan              181 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c 	chan = nvkm_fifo_chan_inst(fifo, inst, &flags);
chan              187 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c 		   chan ? chan->chid : -1, inst,
chan              188 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c 		   chan ? chan->object.client->name : "unknown",
chan              192 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c 	nvkm_fifo_chan_put(fifo, flags, &chan);
chan             1151 drivers/gpu/drm/omapdrm/dss/dispc.c 	int chan = 0, chan2 = 0;
chan             1171 drivers/gpu/drm/omapdrm/dss/dispc.c 			chan = 0;
chan             1175 drivers/gpu/drm/omapdrm/dss/dispc.c 			chan = 1;
chan             1179 drivers/gpu/drm/omapdrm/dss/dispc.c 			chan = 0;
chan             1184 drivers/gpu/drm/omapdrm/dss/dispc.c 				chan = 0;
chan             1192 drivers/gpu/drm/omapdrm/dss/dispc.c 			chan = 0;
chan             1200 drivers/gpu/drm/omapdrm/dss/dispc.c 		val = FLD_MOD(val, chan, shift, shift);
chan               85 drivers/gpu/drm/radeon/atombios_dp.c static int radeon_process_aux_ch(struct radeon_i2c_chan *chan,
chan               90 drivers/gpu/drm/radeon/atombios_dp.c 	struct drm_device *dev = chan->dev;
chan              100 drivers/gpu/drm/radeon/atombios_dp.c 	mutex_lock(&chan->mutex);
chan              110 drivers/gpu/drm/radeon/atombios_dp.c 	args.v1.ucChannelID = chan->rec.i2c_id;
chan              113 drivers/gpu/drm/radeon/atombios_dp.c 		args.v2.ucHPD_ID = chan->rec.hpd;
chan              150 drivers/gpu/drm/radeon/atombios_dp.c 	mutex_unlock(&chan->mutex);
chan              161 drivers/gpu/drm/radeon/atombios_dp.c 	struct radeon_i2c_chan *chan =
chan              197 drivers/gpu/drm/radeon/atombios_dp.c 		ret = radeon_process_aux_ch(chan,
chan              213 drivers/gpu/drm/radeon/atombios_dp.c 		ret = radeon_process_aux_ch(chan,
chan               36 drivers/gpu/drm/radeon/atombios_i2c.c static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
chan               40 drivers/gpu/drm/radeon/atombios_i2c.c 	struct drm_device *dev = chan->dev;
chan               50 drivers/gpu/drm/radeon/atombios_i2c.c 	mutex_lock(&chan->mutex);
chan               84 drivers/gpu/drm/radeon/atombios_i2c.c 	args.ucLineNumber = chan->rec.i2c_id;
chan              100 drivers/gpu/drm/radeon/atombios_i2c.c 	mutex_unlock(&chan->mutex);
chan               57 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	struct radeon_i2c_chan *chan =
chan               59 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	struct drm_device *dev = chan->dev;
chan               63 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	int instance = chan->rec.i2c_id & 0xf;
chan               96 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	mutex_lock(&chan->mutex);
chan               99 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	tmp = RREG32(chan->rec.mask_clk_reg);
chan              101 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	WREG32(chan->rec.mask_clk_reg, tmp);
chan              107 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	tmp |= AUX_HPD_SEL(chan->rec.hpd);
chan              199 drivers/gpu/drm/radeon/radeon_dp_auxch.c 	mutex_unlock(&chan->mutex);
chan              458 drivers/gpu/drm/vc4/vc4_crtc.c 	u32 chan = vc4_crtc->channel;
chan              470 drivers/gpu/drm/vc4/vc4_crtc.c 	if (HVS_READ(SCALER_DISPCTRLX(chan)) &
chan              472 drivers/gpu/drm/vc4/vc4_crtc.c 		HVS_WRITE(SCALER_DISPCTRLX(chan),
chan              478 drivers/gpu/drm/vc4/vc4_crtc.c 		HVS_WRITE(SCALER_DISPCTRLX(chan), 0);
chan              483 drivers/gpu/drm/vc4/vc4_crtc.c 	WARN_ON_ONCE(HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_RESET);
chan              485 drivers/gpu/drm/vc4/vc4_crtc.c 	WARN_ON_ONCE(VC4_GET_FIELD(HVS_READ(SCALER_DISPSTATX(chan)),
chan              489 drivers/gpu/drm/vc4/vc4_crtc.c 	WARN_ON_ONCE((HVS_READ(SCALER_DISPSTATX(chan)) &
chan              787 drivers/gpu/drm/vc4/vc4_crtc.c 	u32 chan = vc4_crtc->channel;
chan              792 drivers/gpu/drm/vc4/vc4_crtc.c 	    (vc4_state->mm.start == HVS_READ(SCALER_DISPLACTX(chan)) ||
chan              550 drivers/gpu/drm/vc4/vc4_dsi.c 	struct dma_chan *chan = dsi->reg_dma_chan;
chan              556 drivers/gpu/drm/vc4/vc4_dsi.c 	if (!chan) {
chan              563 drivers/gpu/drm/vc4/vc4_dsi.c 	tx = chan->device->device_prep_dma_memcpy(chan,
chan              578 drivers/gpu/drm/vc4/vc4_dsi.c 	ret = dma_sync_wait(chan, cookie);
chan              141 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan;
chan              209 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan chan[IC_NUM_TASKS];
chan              324 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan              325 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan              329 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task, ctx,
chan              442 drivers/gpu/ipu-v3/ipu-image-convert.c 	dev_dbg(ctx->chan->priv->ipu->dev,
chan              495 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct device *dev = ctx->chan->priv->ipu->dev;
chan              719 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct device *dev = ctx->chan->priv->ipu->dev;
chan              842 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan              843 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan              879 drivers/gpu/ipu-v3/ipu-image-convert.c 			chan->ic_task, ctx,
chan              905 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan              906 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan              938 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task, ctx, src_col, src_row, dst_col, dst_row);
chan              972 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan              973 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1022 drivers/gpu/ipu-v3/ipu-image-convert.c 					chan->ic_task, ctx,
chan             1037 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1038 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1064 drivers/gpu/ipu-v3/ipu-image-convert.c 					chan->ic_task, ctx,
chan             1113 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1114 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1244 drivers/gpu/ipu-v3/ipu-image-convert.c 	lockdep_assert_held(&ctx->chan->irqlock);
chan             1257 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1258 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1261 drivers/gpu/ipu-v3/ipu-image-convert.c 		__func__, chan->ic_task, ctx, run);
chan             1264 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_ic_task_disable(chan->ic);
chan             1265 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_disable_channel(chan->in_chan);
chan             1266 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_disable_channel(chan->out_chan);
chan             1269 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_disable_channel(chan->rotation_in_chan);
chan             1270 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_disable_channel(chan->rotation_out_chan);
chan             1271 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_unlink(chan->out_chan, chan->rotation_in_chan);
chan             1274 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_ic_disable(chan->ic);
chan             1284 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1340 drivers/gpu/ipu-v3/ipu-image-convert.c 	if ((channel == chan->out_chan ||
chan             1341 drivers/gpu/ipu-v3/ipu-image-convert.c 	     channel == chan->rotation_out_chan) &&
chan             1345 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (channel == chan->rotation_in_chan ||
chan             1346 drivers/gpu/ipu-v3/ipu-image-convert.c 	    channel == chan->rotation_out_chan) {
chan             1354 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_ic_task_idma_init(chan->ic, channel, width, height,
chan             1370 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1371 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1381 drivers/gpu/ipu-v3/ipu-image-convert.c 		__func__, chan->ic_task, ctx, run, tile, dst_tile);
chan             1405 drivers/gpu/ipu-v3/ipu-image-convert.c 	ret = ipu_ic_task_init_rsc(chan->ic, &ctx->csc,
chan             1417 drivers/gpu/ipu-v3/ipu-image-convert.c 	init_idmac_channel(ctx, chan->in_chan, s_image,
chan             1422 drivers/gpu/ipu-v3/ipu-image-convert.c 		init_idmac_channel(ctx, chan->out_chan, d_image,
chan             1426 drivers/gpu/ipu-v3/ipu-image-convert.c 		init_idmac_channel(ctx, chan->rotation_in_chan, d_image,
chan             1430 drivers/gpu/ipu-v3/ipu-image-convert.c 		init_idmac_channel(ctx, chan->rotation_out_chan, d_image,
chan             1434 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_link(chan->out_chan, chan->rotation_in_chan);
chan             1437 drivers/gpu/ipu-v3/ipu-image-convert.c 		init_idmac_channel(ctx, chan->out_chan, d_image,
chan             1442 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_ic_enable(chan->ic);
chan             1445 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_select_buffer(chan->in_chan, 0);
chan             1446 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_select_buffer(chan->out_chan, 0);
chan             1448 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_select_buffer(chan->rotation_out_chan, 0);
chan             1450 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_select_buffer(chan->in_chan, 1);
chan             1451 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_select_buffer(chan->out_chan, 1);
chan             1453 drivers/gpu/ipu-v3/ipu-image-convert.c 			ipu_idmac_select_buffer(chan->rotation_out_chan, 1);
chan             1457 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_enable_channel(chan->in_chan);
chan             1458 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_idmac_enable_channel(chan->out_chan);
chan             1460 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_enable_channel(chan->rotation_in_chan);
chan             1461 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_enable_channel(chan->rotation_out_chan);
chan             1464 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_ic_task_enable(chan->ic);
chan             1466 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_cpmem_dump(chan->in_chan);
chan             1467 drivers/gpu/ipu-v3/ipu-image-convert.c 	ipu_cpmem_dump(chan->out_chan);
chan             1469 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_cpmem_dump(chan->rotation_in_chan);
chan             1470 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_cpmem_dump(chan->rotation_out_chan);
chan             1482 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1484 drivers/gpu/ipu-v3/ipu-image-convert.c 	lockdep_assert_held(&chan->irqlock);
chan             1494 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->current_run = run;
chan             1500 drivers/gpu/ipu-v3/ipu-image-convert.c static void run_next(struct ipu_image_convert_chan *chan)
chan             1502 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1506 drivers/gpu/ipu-v3/ipu-image-convert.c 	lockdep_assert_held(&chan->irqlock);
chan             1508 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
chan             1513 drivers/gpu/ipu-v3/ipu-image-convert.c 				__func__, chan->ic_task, run->ctx, run);
chan             1527 drivers/gpu/ipu-v3/ipu-image-convert.c 		list_add_tail(&run->list, &chan->done_q);
chan             1528 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->current_run = NULL;
chan             1532 drivers/gpu/ipu-v3/ipu-image-convert.c static void empty_done_q(struct ipu_image_convert_chan *chan)
chan             1534 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1538 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             1540 drivers/gpu/ipu-v3/ipu-image-convert.c 	while (!list_empty(&chan->done_q)) {
chan             1541 drivers/gpu/ipu-v3/ipu-image-convert.c 		run = list_entry(chan->done_q.next,
chan             1549 drivers/gpu/ipu-v3/ipu-image-convert.c 			__func__, chan->ic_task, run->ctx, run, run->status);
chan             1552 drivers/gpu/ipu-v3/ipu-image-convert.c 		spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1554 drivers/gpu/ipu-v3/ipu-image-convert.c 		spin_lock_irqsave(&chan->irqlock, flags);
chan             1557 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1566 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = dev_id;
chan             1567 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1572 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task);
chan             1574 drivers/gpu/ipu-v3/ipu-image-convert.c 	empty_done_q(chan);
chan             1576 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             1582 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_for_each_entry(ctx, &chan->ctx_list, list) {
chan             1586 drivers/gpu/ipu-v3/ipu-image-convert.c 				__func__, chan->ic_task, ctx);
chan             1591 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1594 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task);
chan             1621 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1628 drivers/gpu/ipu-v3/ipu-image-convert.c 	lockdep_assert_held(&chan->irqlock);
chan             1631 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->rotation_out_chan : chan->out_chan;
chan             1668 drivers/gpu/ipu-v3/ipu-image-convert.c 			ipu_cpmem_set_buffer(chan->in_chan, 0,
chan             1675 drivers/gpu/ipu-v3/ipu-image-convert.c 				ipu_cpmem_set_uv_offset(chan->in_chan,
chan             1683 drivers/gpu/ipu-v3/ipu-image-convert.c 			ipu_idmac_select_buffer(chan->in_chan, 0);
chan             1692 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_cpmem_set_buffer(chan->in_chan, ctx->cur_buf_num,
chan             1697 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_select_buffer(chan->in_chan, ctx->cur_buf_num);
chan             1706 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_add_tail(&run->list, &chan->done_q);
chan             1707 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->current_run = NULL;
chan             1708 drivers/gpu/ipu-v3/ipu-image-convert.c 	run_next(chan);
chan             1714 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = data;
chan             1720 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             1723 drivers/gpu/ipu-v3/ipu-image-convert.c 	run = chan->current_run;
chan             1733 drivers/gpu/ipu-v3/ipu-image-convert.c 		spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1739 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1745 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = data;
chan             1746 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1752 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             1755 drivers/gpu/ipu-v3/ipu-image-convert.c 	run = chan->current_run;
chan             1766 drivers/gpu/ipu-v3/ipu-image-convert.c 		spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1772 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1782 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             1786 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             1788 drivers/gpu/ipu-v3/ipu-image-convert.c 	run = chan->current_run;
chan             1792 drivers/gpu/ipu-v3/ipu-image-convert.c 		list_add_tail(&run->list, &chan->done_q);
chan             1793 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->current_run = NULL;
chan             1794 drivers/gpu/ipu-v3/ipu-image-convert.c 		run_next(chan);
chan             1797 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             1799 drivers/gpu/ipu-v3/ipu-image-convert.c 	empty_done_q(chan);
chan             1802 drivers/gpu/ipu-v3/ipu-image-convert.c static void release_ipu_resources(struct ipu_image_convert_chan *chan)
chan             1804 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (chan->out_eof_irq >= 0)
chan             1805 drivers/gpu/ipu-v3/ipu-image-convert.c 		free_irq(chan->out_eof_irq, chan);
chan             1806 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (chan->rot_out_eof_irq >= 0)
chan             1807 drivers/gpu/ipu-v3/ipu-image-convert.c 		free_irq(chan->rot_out_eof_irq, chan);
chan             1809 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!IS_ERR_OR_NULL(chan->in_chan))
chan             1810 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_put(chan->in_chan);
chan             1811 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!IS_ERR_OR_NULL(chan->out_chan))
chan             1812 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_put(chan->out_chan);
chan             1813 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!IS_ERR_OR_NULL(chan->rotation_in_chan))
chan             1814 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_put(chan->rotation_in_chan);
chan             1815 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!IS_ERR_OR_NULL(chan->rotation_out_chan))
chan             1816 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_idmac_put(chan->rotation_out_chan);
chan             1817 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!IS_ERR_OR_NULL(chan->ic))
chan             1818 drivers/gpu/ipu-v3/ipu-image-convert.c 		ipu_ic_put(chan->ic);
chan             1820 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->in_chan = chan->out_chan = chan->rotation_in_chan =
chan             1821 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->rotation_out_chan = NULL;
chan             1822 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->out_eof_irq = chan->rot_out_eof_irq = -1;
chan             1825 drivers/gpu/ipu-v3/ipu-image-convert.c static int get_ipu_resources(struct ipu_image_convert_chan *chan)
chan             1827 drivers/gpu/ipu-v3/ipu-image-convert.c 	const struct ipu_image_convert_dma_chan *dma = chan->dma_ch;
chan             1828 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             1832 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->ic = ipu_ic_get(priv->ipu, chan->ic_task);
chan             1833 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (IS_ERR(chan->ic)) {
chan             1835 drivers/gpu/ipu-v3/ipu-image-convert.c 		ret = PTR_ERR(chan->ic);
chan             1840 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->in_chan = ipu_idmac_get(priv->ipu, dma->in);
chan             1841 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->out_chan = ipu_idmac_get(priv->ipu, dma->out);
chan             1842 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (IS_ERR(chan->in_chan) || IS_ERR(chan->out_chan)) {
chan             1848 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->rotation_in_chan = ipu_idmac_get(priv->ipu, dma->rot_in);
chan             1849 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->rotation_out_chan = ipu_idmac_get(priv->ipu, dma->rot_out);
chan             1850 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (IS_ERR(chan->rotation_in_chan) || IS_ERR(chan->rotation_out_chan)) {
chan             1858 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->out_eof_irq = ipu_idmac_channel_irq(priv->ipu,
chan             1859 drivers/gpu/ipu-v3/ipu-image-convert.c 						  chan->out_chan,
chan             1862 drivers/gpu/ipu-v3/ipu-image-convert.c 	ret = request_threaded_irq(chan->out_eof_irq, norotate_irq, do_bh,
chan             1863 drivers/gpu/ipu-v3/ipu-image-convert.c 				   0, "ipu-ic", chan);
chan             1866 drivers/gpu/ipu-v3/ipu-image-convert.c 			 chan->out_eof_irq);
chan             1867 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->out_eof_irq = -1;
chan             1871 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan->rot_out_eof_irq = ipu_idmac_channel_irq(priv->ipu,
chan             1872 drivers/gpu/ipu-v3/ipu-image-convert.c 						     chan->rotation_out_chan,
chan             1875 drivers/gpu/ipu-v3/ipu-image-convert.c 	ret = request_threaded_irq(chan->rot_out_eof_irq, rotate_irq, do_bh,
chan             1876 drivers/gpu/ipu-v3/ipu-image-convert.c 				   0, "ipu-ic", chan);
chan             1879 drivers/gpu/ipu-v3/ipu-image-convert.c 			chan->rot_out_eof_irq);
chan             1880 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->rot_out_eof_irq = -1;
chan             1886 drivers/gpu/ipu-v3/ipu-image-convert.c 	release_ipu_resources(chan);
chan             1895 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = ctx->chan->priv;
chan             2046 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan;
chan             2066 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan = &priv->chan[ic_task];
chan             2073 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task, ctx);
chan             2075 drivers/gpu/ipu-v3/ipu-image-convert.c 	ctx->chan = chan;
chan             2200 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             2202 drivers/gpu/ipu-v3/ipu-image-convert.c 	get_res = list_empty(&chan->ctx_list);
chan             2204 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_add_tail(&ctx->list, &chan->ctx_list);
chan             2206 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             2209 drivers/gpu/ipu-v3/ipu-image-convert.c 		ret = get_ipu_resources(chan);
chan             2218 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             2220 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             2236 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan;
chan             2246 drivers/gpu/ipu-v3/ipu-image-convert.c 	chan = ctx->chan;
chan             2247 drivers/gpu/ipu-v3/ipu-image-convert.c 	priv = chan->priv;
chan             2250 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task, ctx, run);
chan             2254 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             2261 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_add_tail(&run->list, &chan->pending_q);
chan             2263 drivers/gpu/ipu-v3/ipu-image-convert.c 	if (!chan->current_run) {
chan             2266 drivers/gpu/ipu-v3/ipu-image-convert.c 			chan->current_run = NULL;
chan             2269 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             2277 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             2278 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             2283 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             2286 drivers/gpu/ipu-v3/ipu-image-convert.c 	list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
chan             2290 drivers/gpu/ipu-v3/ipu-image-convert.c 		list_move_tail(&run->list, &chan->done_q);
chan             2293 drivers/gpu/ipu-v3/ipu-image-convert.c 	run_count = get_run_count(ctx, &chan->done_q);
chan             2294 drivers/gpu/ipu-v3/ipu-image-convert.c 	active_run = (chan->current_run && chan->current_run->ctx == ctx) ?
chan             2295 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->current_run : NULL;
chan             2302 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             2307 drivers/gpu/ipu-v3/ipu-image-convert.c 			__func__, chan->ic_task, ctx);
chan             2312 drivers/gpu/ipu-v3/ipu-image-convert.c 		empty_done_q(chan);
chan             2318 drivers/gpu/ipu-v3/ipu-image-convert.c 		__func__, chan->ic_task, run_count);
chan             2338 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_chan *chan = ctx->chan;
chan             2339 drivers/gpu/ipu-v3/ipu-image-convert.c 	struct ipu_image_convert_priv *priv = chan->priv;
chan             2347 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task, ctx);
chan             2349 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_lock_irqsave(&chan->irqlock, flags);
chan             2353 drivers/gpu/ipu-v3/ipu-image-convert.c 	put_res = list_empty(&chan->ctx_list);
chan             2355 drivers/gpu/ipu-v3/ipu-image-convert.c 	spin_unlock_irqrestore(&chan->irqlock, flags);
chan             2358 drivers/gpu/ipu-v3/ipu-image-convert.c 		release_ipu_resources(chan);
chan             2456 drivers/gpu/ipu-v3/ipu-image-convert.c 		struct ipu_image_convert_chan *chan = &priv->chan[i];
chan             2458 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->ic_task = i;
chan             2459 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->priv = priv;
chan             2460 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->dma_ch = &image_convert_dma_chan[i];
chan             2461 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->out_eof_irq = -1;
chan             2462 drivers/gpu/ipu-v3/ipu-image-convert.c 		chan->rot_out_eof_irq = -1;
chan             2464 drivers/gpu/ipu-v3/ipu-image-convert.c 		spin_lock_init(&chan->irqlock);
chan             2465 drivers/gpu/ipu-v3/ipu-image-convert.c 		INIT_LIST_HEAD(&chan->ctx_list);
chan             2466 drivers/gpu/ipu-v3/ipu-image-convert.c 		INIT_LIST_HEAD(&chan->pending_q);
chan             2467 drivers/gpu/ipu-v3/ipu-image-convert.c 		INIT_LIST_HEAD(&chan->done_q);
chan               78 drivers/gpu/ipu-v3/ipu-prg.c 	struct ipu_prg_channel	chan[3];
chan              198 drivers/gpu/ipu-v3/ipu-prg.c 		prg->chan[prg_chan].used_pre = 0;
chan              208 drivers/gpu/ipu-v3/ipu-prg.c 			prg->chan[prg_chan].used_pre = i;
chan              236 drivers/gpu/ipu-v3/ipu-prg.c 	struct ipu_prg_channel *chan = &prg->chan[prg_chan];
chan              238 drivers/gpu/ipu-v3/ipu-prg.c 	ipu_pre_put(prg->pres[chan->used_pre]);
chan              239 drivers/gpu/ipu-v3/ipu-prg.c 	chan->used_pre = -1;
chan              246 drivers/gpu/ipu-v3/ipu-prg.c 	struct ipu_prg_channel *chan;
chan              252 drivers/gpu/ipu-v3/ipu-prg.c 	chan = &prg->chan[prg_chan];
chan              253 drivers/gpu/ipu-v3/ipu-prg.c 	if (!chan->enabled)
chan              269 drivers/gpu/ipu-v3/ipu-prg.c 	chan->enabled = false;
chan              280 drivers/gpu/ipu-v3/ipu-prg.c 	struct ipu_prg_channel *chan;
chan              287 drivers/gpu/ipu-v3/ipu-prg.c 	chan = &prg->chan[prg_chan];
chan              289 drivers/gpu/ipu-v3/ipu-prg.c 	if (chan->enabled) {
chan              290 drivers/gpu/ipu-v3/ipu-prg.c 		ipu_pre_update(prg->pres[chan->used_pre], *eba);
chan              298 drivers/gpu/ipu-v3/ipu-prg.c 	ipu_pre_configure(prg->pres[chan->used_pre],
chan              313 drivers/gpu/ipu-v3/ipu-prg.c 	val = ipu_pre_get_baddr(prg->pres[chan->used_pre]);
chan              337 drivers/gpu/ipu-v3/ipu-prg.c 	chan->enabled = true;
chan              346 drivers/gpu/ipu-v3/ipu-prg.c 	struct ipu_prg_channel *chan;
chan              351 drivers/gpu/ipu-v3/ipu-prg.c 	chan = &prg->chan[prg_chan];
chan              352 drivers/gpu/ipu-v3/ipu-prg.c 	WARN_ON(!chan->enabled);
chan              354 drivers/gpu/ipu-v3/ipu-prg.c 	return ipu_pre_update_pending(prg->pres[chan->used_pre]);
chan             1527 drivers/hv/vmbus_drv.c 	ssize_t (*show)(struct vmbus_channel *chan, char *buf);
chan             1528 drivers/hv/vmbus_drv.c 	ssize_t (*store)(struct vmbus_channel *chan,
chan             1546 drivers/hv/vmbus_drv.c 	struct vmbus_channel *chan
chan             1552 drivers/hv/vmbus_drv.c 	return attribute->show(chan, buf);
chan               50 drivers/hwmon/adm1031.c #define ADM1031_CONF2_TEMP_ENABLE(chan)	(0x10 << (chan))
chan              112 drivers/hwmon/adm1031.c 	int chan;
chan              121 drivers/hwmon/adm1031.c 		for (chan = 0;
chan              122 drivers/hwmon/adm1031.c 		     chan < ((data->chip_type == adm1031) ? 3 : 2); chan++) {
chan              126 drivers/hwmon/adm1031.c 			    adm1031_read_value(client, ADM1031_REG_TEMP(chan));
chan              127 drivers/hwmon/adm1031.c 			data->ext_temp[chan] =
chan              130 drivers/hwmon/adm1031.c 			    adm1031_read_value(client, ADM1031_REG_TEMP(chan));
chan              132 drivers/hwmon/adm1031.c 				data->ext_temp[chan] =
chan              138 drivers/hwmon/adm1031.c 						       ADM1031_REG_TEMP(chan));
chan              146 drivers/hwmon/adm1031.c 			data->temp[chan] = newh;
chan              148 drivers/hwmon/adm1031.c 			data->temp_offset[chan] =
chan              150 drivers/hwmon/adm1031.c 					       ADM1031_REG_TEMP_OFFSET(chan));
chan              151 drivers/hwmon/adm1031.c 			data->temp_min[chan] =
chan              153 drivers/hwmon/adm1031.c 					       ADM1031_REG_TEMP_MIN(chan));
chan              154 drivers/hwmon/adm1031.c 			data->temp_max[chan] =
chan              156 drivers/hwmon/adm1031.c 					       ADM1031_REG_TEMP_MAX(chan));
chan              157 drivers/hwmon/adm1031.c 			data->temp_crit[chan] =
chan              159 drivers/hwmon/adm1031.c 					       ADM1031_REG_TEMP_CRIT(chan));
chan              160 drivers/hwmon/adm1031.c 			data->auto_temp[chan] =
chan              162 drivers/hwmon/adm1031.c 					       ADM1031_REG_AUTO_TEMP(chan));
chan              174 drivers/hwmon/adm1031.c 		for (chan = 0; chan < (data->chip_type == adm1030 ? 1 : 2);
chan              175 drivers/hwmon/adm1031.c 		     chan++) {
chan              176 drivers/hwmon/adm1031.c 			data->fan_div[chan] =
chan              178 drivers/hwmon/adm1031.c 					       ADM1031_REG_FAN_DIV(chan));
chan              179 drivers/hwmon/adm1031.c 			data->fan_min[chan] =
chan              181 drivers/hwmon/adm1031.c 					       ADM1031_REG_FAN_MIN(chan));
chan              182 drivers/hwmon/adm1031.c 			data->fan[chan] =
chan              184 drivers/hwmon/adm1031.c 					       ADM1031_REG_FAN_SPEED(chan));
chan              185 drivers/hwmon/adm1031.c 			data->pwm[chan] =
chan              187 drivers/hwmon/adm1031.c 					ADM1031_REG_PWM) >> (4 * chan)) & 0x0f;
chan              286 drivers/hwmon/adm1031.c get_fan_auto_nearest(struct adm1031_data *data, int chan, u8 val, u8 reg)
chan              291 drivers/hwmon/adm1031.c 	    (*data->chan_select_table)[FAN_CHAN_FROM_REG(reg)][chan ? 0 : 1];
chan              297 drivers/hwmon/adm1031.c 		if ((val == (*data->chan_select_table)[i][chan]) &&
chan              298 drivers/hwmon/adm1031.c 		    ((*data->chan_select_table)[i][chan ? 0 : 1] ==
chan              303 drivers/hwmon/adm1031.c 		} else if (val == (*data->chan_select_table)[i][chan] &&
chan              515 drivers/hwmon/adm1031.c static int trust_fan_readings(struct adm1031_data *data, int chan)
chan              526 drivers/hwmon/adm1031.c 			res = data->temp[chan+1] >=
chan              527 drivers/hwmon/adm1031.c 			    AUTO_TEMP_MIN_FROM_REG_DEG(data->auto_temp[chan+1]);
chan              551 drivers/hwmon/adm1031.c 		res = data->pwm[chan] > 0;
chan               47 drivers/hwmon/iio_hwmon.c 	struct iio_channel *chan = &state->channels[sattr->index];
chan               50 drivers/hwmon/iio_hwmon.c 	ret = iio_read_channel_processed(chan, &result);
chan               54 drivers/hwmon/iio_hwmon.c 	ret = iio_get_channel_type(chan, &type);
chan               91 drivers/hwmon/lochnagar-hwmon.c static int do_measurement(struct regmap *regmap, int chan,
chan               97 drivers/hwmon/lochnagar-hwmon.c 	chan = 1 << (chan + LOCHNAGAR2_IMON_MEASURED_CHANNELS_SHIFT);
chan              100 drivers/hwmon/lochnagar-hwmon.c 			   LOCHNAGAR2_IMON_ENA_MASK | chan | mode);
chan              142 drivers/hwmon/lochnagar-hwmon.c static int request_data(struct regmap *regmap, int chan, u32 *data)
chan              149 drivers/hwmon/lochnagar-hwmon.c 			   chan << LOCHNAGAR2_IMON_CH_SEL_SHIFT);
chan              174 drivers/hwmon/lochnagar-hwmon.c static int read_sensor(struct device *dev, int chan,
chan              185 drivers/hwmon/lochnagar-hwmon.c 	ret = do_measurement(regmap, chan, mode, nsamples);
chan              191 drivers/hwmon/lochnagar-hwmon.c 	ret = request_data(regmap, chan, &data);
chan              205 drivers/hwmon/lochnagar-hwmon.c static int read_power(struct device *dev, int chan, long *val)
chan              208 drivers/hwmon/lochnagar-hwmon.c 	int nsamples = priv->power_nsamples[chan];
chan              212 drivers/hwmon/lochnagar-hwmon.c 	if (!strcmp("SYSVDD", lochnagar_chan_names[chan])) {
chan              215 drivers/hwmon/lochnagar-hwmon.c 		ret = read_sensor(dev, chan, LN2_VOLT, 1, LN2_PWR_UNITS, val);
chan              222 drivers/hwmon/lochnagar-hwmon.c 	ret = read_sensor(dev, chan, LN2_CURR, nsamples, LN2_PWR_UNITS, val);
chan              239 drivers/hwmon/lochnagar-hwmon.c 				    u32 attr, int chan)
chan              243 drivers/hwmon/lochnagar-hwmon.c 		if (!strcmp("SYSVDD", lochnagar_chan_names[chan]))
chan              258 drivers/hwmon/lochnagar-hwmon.c 			  u32 attr, int chan, long *val)
chan              265 drivers/hwmon/lochnagar-hwmon.c 		return read_sensor(dev, chan, LN2_VOLT, 1, LN2_VOLT_UNITS, val);
chan              267 drivers/hwmon/lochnagar-hwmon.c 		return read_sensor(dev, chan, LN2_CURR, 1, LN2_CURR_UNITS, val);
chan              269 drivers/hwmon/lochnagar-hwmon.c 		return read_sensor(dev, chan, LN2_TEMP, 1, LN2_TEMP_UNITS, val);
chan              273 drivers/hwmon/lochnagar-hwmon.c 			return read_power(dev, chan, val);
chan              275 drivers/hwmon/lochnagar-hwmon.c 			interval = priv->power_nsamples[chan] * LN2_SAMPLE_US;
chan              288 drivers/hwmon/lochnagar-hwmon.c 				 int chan, const char **str)
chan              294 drivers/hwmon/lochnagar-hwmon.c 		*str = lochnagar_chan_names[chan];
chan              302 drivers/hwmon/lochnagar-hwmon.c 			   u32 attr, int chan, long val)
chan              312 drivers/hwmon/lochnagar-hwmon.c 	priv->power_nsamples[chan] = val;
chan              215 drivers/hwmon/max197.c #define MAX197_SENSOR_DEVICE_ATTR_CH(chan)				\
chan              216 drivers/hwmon/max197.c 	static SENSOR_DEVICE_ATTR(in##chan##_input, S_IRUGO,		\
chan              217 drivers/hwmon/max197.c 				  max197_show_input, NULL, chan);	\
chan              218 drivers/hwmon/max197.c 	static SENSOR_DEVICE_ATTR_2(in##chan##_min, S_IRUGO | S_IWUSR,	\
chan              221 drivers/hwmon/max197.c 				    true, chan);			\
chan              222 drivers/hwmon/max197.c 	static SENSOR_DEVICE_ATTR_2(in##chan##_max, S_IRUGO | S_IWUSR,	\
chan              225 drivers/hwmon/max197.c 				    false, chan)
chan              227 drivers/hwmon/max197.c #define MAX197_SENSOR_DEV_ATTR_IN(chan)					\
chan              228 drivers/hwmon/max197.c 	&sensor_dev_attr_in##chan##_input.dev_attr.attr,		\
chan              229 drivers/hwmon/max197.c 	&sensor_dev_attr_in##chan##_max.dev_attr.attr,			\
chan              230 drivers/hwmon/max197.c 	&sensor_dev_attr_in##chan##_min.dev_attr.attr
chan              328 drivers/hwmon/ntc_thermistor.c 	struct iio_channel *channel = pdata->chan;
chan              384 drivers/hwmon/ntc_thermistor.c 	struct iio_channel *chan;
chan              397 drivers/hwmon/ntc_thermistor.c 	chan = devm_iio_channel_get(dev, NULL);
chan              398 drivers/hwmon/ntc_thermistor.c 	if (IS_ERR(chan))
chan              399 drivers/hwmon/ntc_thermistor.c 		return ERR_CAST(chan);
chan              401 drivers/hwmon/ntc_thermistor.c 	ret = iio_get_channel_type(chan, &type);
chan              420 drivers/hwmon/ntc_thermistor.c 	pdata->chan = chan;
chan              603 drivers/hwtracing/stm/core.c 	  unsigned int chan, const char *buf, size_t count)
chan              611 drivers/hwtracing/stm/core.c 	err = stm->pdrv->write(stm->data, output, chan, buf, count);
chan             1294 drivers/hwtracing/stm/core.c 			     unsigned int chan,
chan             1304 drivers/hwtracing/stm/core.c 	if (chan >= src->output.nr_chans)
chan             1311 drivers/hwtracing/stm/core.c 		count = stm_write(stm, &src->output, chan, buf, count);
chan               13 drivers/hwtracing/stm/p_basic.c 			   unsigned int chan, const char *buf, size_t count)
chan               15 drivers/hwtracing/stm/p_basic.c 	unsigned int c = output->channel + chan;
chan              288 drivers/hwtracing/stm/p_sys-t.c 			   unsigned int chan, const char *buf, size_t count)
chan              291 drivers/hwtracing/stm/p_sys-t.c 	unsigned int c = output->channel + chan;
chan               98 drivers/hwtracing/stm/stm.h 				 struct stm_output *output, unsigned int chan,
chan              365 drivers/i2c/busses/i2c-rcar.c 	struct dma_chan *chan = priv->dma_direction == DMA_FROM_DEVICE
chan              368 drivers/i2c/busses/i2c-rcar.c 	dma_unmap_single(chan->device->dev, sg_dma_address(&priv->sg),
chan              409 drivers/i2c/busses/i2c-rcar.c 	struct dma_chan *chan = read ? priv->dma_rx : priv->dma_tx;
chan              417 drivers/i2c/busses/i2c-rcar.c 	if (IS_ERR(chan) || msg->len < RCAR_MIN_DMA_LEN ||
chan              436 drivers/i2c/busses/i2c-rcar.c 	dma_addr = dma_map_single(chan->device->dev, buf, len, dir);
chan              437 drivers/i2c/busses/i2c-rcar.c 	if (dma_mapping_error(chan->device->dev, dma_addr)) {
chan              447 drivers/i2c/busses/i2c-rcar.c 	txdesc = dmaengine_prep_slave_sg(chan, &priv->sg, 1,
chan              472 drivers/i2c/busses/i2c-rcar.c 	dma_async_issue_pending(chan);
chan              685 drivers/i2c/busses/i2c-rcar.c 	struct dma_chan *chan;
chan              690 drivers/i2c/busses/i2c-rcar.c 	chan = dma_request_chan(dev, chan_name);
chan              691 drivers/i2c/busses/i2c-rcar.c 	if (IS_ERR(chan)) {
chan              693 drivers/i2c/busses/i2c-rcar.c 			chan_name, PTR_ERR(chan));
chan              694 drivers/i2c/busses/i2c-rcar.c 		return chan;
chan              707 drivers/i2c/busses/i2c-rcar.c 	ret = dmaengine_slave_config(chan, &cfg);
chan              711 drivers/i2c/busses/i2c-rcar.c 		dma_release_channel(chan);
chan              716 drivers/i2c/busses/i2c-rcar.c 	return chan;
chan              724 drivers/i2c/busses/i2c-rcar.c 	struct dma_chan *chan;
chan              729 drivers/i2c/busses/i2c-rcar.c 	chan = read ? priv->dma_rx : priv->dma_tx;
chan              730 drivers/i2c/busses/i2c-rcar.c 	if (PTR_ERR(chan) != -EPROBE_DEFER)
chan              734 drivers/i2c/busses/i2c-rcar.c 	chan = rcar_i2c_request_dma_chan(dev, dir, priv->res->start + ICRXTX);
chan              737 drivers/i2c/busses/i2c-rcar.c 		priv->dma_rx = chan;
chan              739 drivers/i2c/busses/i2c-rcar.c 		priv->dma_tx = chan;
chan              449 drivers/i2c/busses/i2c-sh_mobile.c 	struct dma_chan *chan = pd->dma_direction == DMA_FROM_DEVICE
chan              452 drivers/i2c/busses/i2c-sh_mobile.c 	dma_unmap_single(chan->device->dev, sg_dma_address(&pd->sg),
chan              484 drivers/i2c/busses/i2c-sh_mobile.c 	struct dma_chan *chan;
chan              489 drivers/i2c/busses/i2c-sh_mobile.c 	chan = dma_request_slave_channel_reason(dev, chan_name);
chan              490 drivers/i2c/busses/i2c-sh_mobile.c 	if (IS_ERR(chan)) {
chan              492 drivers/i2c/busses/i2c-sh_mobile.c 			PTR_ERR(chan));
chan              493 drivers/i2c/busses/i2c-sh_mobile.c 		return chan;
chan              506 drivers/i2c/busses/i2c-sh_mobile.c 	ret = dmaengine_slave_config(chan, &cfg);
chan              509 drivers/i2c/busses/i2c-sh_mobile.c 		dma_release_channel(chan);
chan              514 drivers/i2c/busses/i2c-sh_mobile.c 	return chan;
chan              521 drivers/i2c/busses/i2c-sh_mobile.c 	struct dma_chan *chan = read ? pd->dma_rx : pd->dma_tx;
chan              526 drivers/i2c/busses/i2c-sh_mobile.c 	if (PTR_ERR(chan) == -EPROBE_DEFER) {
chan              528 drivers/i2c/busses/i2c-sh_mobile.c 			chan = pd->dma_rx = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_DEV_TO_MEM,
chan              531 drivers/i2c/busses/i2c-sh_mobile.c 			chan = pd->dma_tx = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_MEM_TO_DEV,
chan              535 drivers/i2c/busses/i2c-sh_mobile.c 	if (IS_ERR(chan))
chan              538 drivers/i2c/busses/i2c-sh_mobile.c 	dma_addr = dma_map_single(chan->device->dev, pd->dma_buf, pd->msg->len, dir);
chan              539 drivers/i2c/busses/i2c-sh_mobile.c 	if (dma_mapping_error(chan->device->dev, dma_addr)) {
chan              549 drivers/i2c/busses/i2c-sh_mobile.c 	txdesc = dmaengine_prep_slave_sg(chan, &pd->sg, 1,
chan              568 drivers/i2c/busses/i2c-sh_mobile.c 	dma_async_issue_pending(chan);
chan              361 drivers/i2c/busses/i2c-tegra.c 	struct dma_chan *chan;
chan              366 drivers/i2c/busses/i2c-tegra.c 	chan = i2c_dev->msg_read ? i2c_dev->rx_dma_chan : i2c_dev->tx_dma_chan;
chan              367 drivers/i2c/busses/i2c-tegra.c 	dma_desc = dmaengine_prep_slave_single(chan, i2c_dev->dma_phys,
chan              378 drivers/i2c/busses/i2c-tegra.c 	dma_async_issue_pending(chan);
chan              403 drivers/i2c/busses/i2c-tegra.c 	struct dma_chan *chan;
chan              416 drivers/i2c/busses/i2c-tegra.c 	chan = dma_request_slave_channel_reason(i2c_dev->dev, "rx");
chan              417 drivers/i2c/busses/i2c-tegra.c 	if (IS_ERR(chan)) {
chan              418 drivers/i2c/busses/i2c-tegra.c 		err = PTR_ERR(chan);
chan              422 drivers/i2c/busses/i2c-tegra.c 	i2c_dev->rx_dma_chan = chan;
chan              424 drivers/i2c/busses/i2c-tegra.c 	chan = dma_request_slave_channel_reason(i2c_dev->dev, "tx");
chan              425 drivers/i2c/busses/i2c-tegra.c 	if (IS_ERR(chan)) {
chan              426 drivers/i2c/busses/i2c-tegra.c 		err = PTR_ERR(chan);
chan              430 drivers/i2c/busses/i2c-tegra.c 	i2c_dev->tx_dma_chan = chan;
chan              938 drivers/i2c/busses/i2c-tegra.c 	struct dma_chan *chan;
chan              956 drivers/i2c/busses/i2c-tegra.c 			chan = i2c_dev->rx_dma_chan;
chan              967 drivers/i2c/busses/i2c-tegra.c 			chan = i2c_dev->tx_dma_chan;
chan              980 drivers/i2c/busses/i2c-tegra.c 		ret = dmaengine_slave_config(chan, &slv_config);
chan              229 drivers/i2c/busses/i2c-viperboard.c 	wmsg->header.chan = 0x00;
chan               42 drivers/i2c/muxes/i2c-arb-gpio-challenge.c static int i2c_arbitrator_select(struct i2c_mux_core *muxc, u32 chan)
chan               85 drivers/i2c/muxes/i2c-arb-gpio-challenge.c static int i2c_arbitrator_deselect(struct i2c_mux_core *muxc, u32 chan)
chan               35 drivers/i2c/muxes/i2c-demux-pinctrl.c 	struct i2c_demux_pinctrl_chan chan[];
chan               41 drivers/i2c/muxes/i2c-demux-pinctrl.c 	struct i2c_adapter *parent = priv->chan[priv->cur_chan].parent_adap;
chan               49 drivers/i2c/muxes/i2c-demux-pinctrl.c 	struct i2c_adapter *parent = priv->chan[priv->cur_chan].parent_adap;
chan               60 drivers/i2c/muxes/i2c-demux-pinctrl.c 	ret = of_changeset_apply(&priv->chan[new_chan].chgset);
chan               64 drivers/i2c/muxes/i2c-demux-pinctrl.c 	adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
chan               94 drivers/i2c/muxes/i2c-demux-pinctrl.c 	priv->chan[new_chan].parent_adap = adap;
chan              123 drivers/i2c/muxes/i2c-demux-pinctrl.c 	of_changeset_revert(&priv->chan[new_chan].chgset);
chan              138 drivers/i2c/muxes/i2c-demux-pinctrl.c 	i2c_put_adapter(priv->chan[cur].parent_adap);
chan              140 drivers/i2c/muxes/i2c-demux-pinctrl.c 	ret = of_changeset_revert(&priv->chan[cur].chgset);
chan              142 drivers/i2c/muxes/i2c-demux-pinctrl.c 	priv->chan[cur].parent_adap = NULL;
chan              171 drivers/i2c/muxes/i2c-demux-pinctrl.c 				   i, priv->chan[i].parent_np,
chan              221 drivers/i2c/muxes/i2c-demux-pinctrl.c 	priv = devm_kzalloc(&pdev->dev, struct_size(priv, chan, num_chan),
chan              242 drivers/i2c/muxes/i2c-demux-pinctrl.c 		priv->chan[i].parent_np = adap_np;
chan              248 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_changeset_init(&priv->chan[i].chgset);
chan              249 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_changeset_update_property(&priv->chan[i].chgset, adap_np, &props[i]);
chan              277 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_node_put(priv->chan[j].parent_np);
chan              278 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_changeset_destroy(&priv->chan[j].chgset);
chan              295 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_node_put(priv->chan[i].parent_np);
chan              296 drivers/i2c/muxes/i2c-demux-pinctrl.c 		of_changeset_destroy(&priv->chan[i].chgset);
chan               34 drivers/i2c/muxes/i2c-mux-gpio.c static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan)
chan               38 drivers/i2c/muxes/i2c-mux-gpio.c 	i2c_mux_gpio_set(mux, chan);
chan               43 drivers/i2c/muxes/i2c-mux-gpio.c static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, u32 chan)
chan               23 drivers/i2c/muxes/i2c-mux-gpmux.c static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan)
chan               28 drivers/i2c/muxes/i2c-mux-gpmux.c 	ret = mux_control_select(mux->control, chan);
chan               34 drivers/i2c/muxes/i2c-mux-gpmux.c static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan)
chan              116 drivers/i2c/muxes/i2c-mux-gpmux.c 		u32 chan;
chan              118 drivers/i2c/muxes/i2c-mux-gpmux.c 		ret = of_property_read_u32(child, "reg", &chan);
chan              125 drivers/i2c/muxes/i2c-mux-gpmux.c 		if (chan >= mux_control_states(mux->control)) {
chan              126 drivers/i2c/muxes/i2c-mux-gpmux.c 			dev_err(dev, "invalid reg %u\n", chan);
chan              131 drivers/i2c/muxes/i2c-mux-gpmux.c 		ret = i2c_mux_add_adapter(muxc, 0, chan, 0);
chan              178 drivers/i2c/muxes/i2c-mux-ltc4306.c static int ltc4306_select_mux(struct i2c_mux_core *muxc, u32 chan)
chan              183 drivers/i2c/muxes/i2c-mux-ltc4306.c 				  LTC_SWITCH_MASK, BIT(7 - chan));
chan              186 drivers/i2c/muxes/i2c-mux-ltc4306.c static int ltc4306_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
chan              104 drivers/i2c/muxes/i2c-mux-mlxcpld.c static int mlxcpld_mux_select_chan(struct i2c_mux_core *muxc, u32 chan)
chan              108 drivers/i2c/muxes/i2c-mux-mlxcpld.c 	u8 regval = chan + 1;
chan              120 drivers/i2c/muxes/i2c-mux-mlxcpld.c static int mlxcpld_mux_deselect(struct i2c_mux_core *muxc, u32 chan)
chan              248 drivers/i2c/muxes/i2c-mux-pca9541.c static int pca9541_select_chan(struct i2c_mux_core *muxc, u32 chan)
chan              273 drivers/i2c/muxes/i2c-mux-pca9541.c static int pca9541_release_chan(struct i2c_mux_core *muxc, u32 chan)
chan              232 drivers/i2c/muxes/i2c-mux-pca954x.c static int pca954x_select_chan(struct i2c_mux_core *muxc, u32 chan)
chan              242 drivers/i2c/muxes/i2c-mux-pca954x.c 		regval = chan | chip->enable;
chan              244 drivers/i2c/muxes/i2c-mux-pca954x.c 		regval = 1 << chan;
chan              255 drivers/i2c/muxes/i2c-mux-pca954x.c static int pca954x_deselect_mux(struct i2c_mux_core *muxc, u32 chan)
chan               22 drivers/i2c/muxes/i2c-mux-pinctrl.c static int i2c_mux_pinctrl_select(struct i2c_mux_core *muxc, u32 chan)
chan               26 drivers/i2c/muxes/i2c-mux-pinctrl.c 	return pinctrl_select_state(mux->pinctrl, mux->states[chan]);
chan               29 drivers/i2c/muxes/i2c-mux-pinctrl.c static int i2c_mux_pinctrl_deselect(struct i2c_mux_core *muxc, u32 chan)
chan               61 drivers/i2c/muxes/i2c-mux-reg.c static int i2c_mux_reg_select(struct i2c_mux_core *muxc, u32 chan)
chan               65 drivers/i2c/muxes/i2c-mux-reg.c 	return i2c_mux_reg_set(mux, chan);
chan               68 drivers/i2c/muxes/i2c-mux-reg.c static int i2c_mux_reg_deselect(struct i2c_mux_core *muxc, u32 chan)
chan              101 drivers/iio/accel/adis16201.c 			      struct iio_chan_spec const *chan,
chan              113 drivers/iio/accel/adis16201.c 		return adis_single_conversion(indio_dev, chan,
chan              116 drivers/iio/accel/adis16201.c 		switch (chan->type) {
chan              118 drivers/iio/accel/adis16201.c 			if (chan->channel == 0) {
chan              158 drivers/iio/accel/adis16201.c 		switch (chan->type) {
chan              168 drivers/iio/accel/adis16201.c 		addr = adis16201_addresses[chan->scan_index];
chan              181 drivers/iio/accel/adis16201.c 			       struct iio_chan_spec const *chan,
chan              192 drivers/iio/accel/adis16201.c 	switch (chan->type) {
chan              203 drivers/iio/accel/adis16201.c 	return adis_write_reg_16(st, adis16201_addresses[chan->scan_index],
chan              108 drivers/iio/accel/adis16209.c 			       struct iio_chan_spec const *chan,
chan              119 drivers/iio/accel/adis16209.c 	switch (chan->type) {
chan              128 drivers/iio/accel/adis16209.c 	return adis_write_reg_16(st, adis16209_addresses[chan->scan_index][0],
chan              133 drivers/iio/accel/adis16209.c 			      struct iio_chan_spec const *chan,
chan              145 drivers/iio/accel/adis16209.c 		return adis_single_conversion(indio_dev, chan,
chan              148 drivers/iio/accel/adis16209.c 		switch (chan->type) {
chan              151 drivers/iio/accel/adis16209.c 			switch (chan->channel) {
chan              197 drivers/iio/accel/adis16209.c 		switch (chan->type) {
chan              204 drivers/iio/accel/adis16209.c 		addr = adis16209_addresses[chan->scan_index][0];
chan               86 drivers/iio/accel/adxl345_core.c 			    struct iio_chan_spec const *chan,
chan              103 drivers/iio/accel/adxl345_core.c 				       ADXL345_REG_DATA_AXIS(chan->address),
chan              124 drivers/iio/accel/adxl345_core.c 				  ADXL345_REG_OFS_AXIS(chan->address), &regval);
chan              150 drivers/iio/accel/adxl345_core.c 			     struct iio_chan_spec const *chan,
chan              163 drivers/iio/accel/adxl345_core.c 				    ADXL345_REG_OFS_AXIS(chan->address),
chan              178 drivers/iio/accel/adxl345_core.c 				     struct iio_chan_spec const *chan,
chan              644 drivers/iio/accel/adxl372.c 			    struct iio_chan_spec const *chan,
chan              656 drivers/iio/accel/adxl372.c 		ret = adxl372_read_axis(st, chan->address);
chan              661 drivers/iio/accel/adxl372.c 		*val = sign_extend32(ret >> chan->scan_type.shift,
chan              662 drivers/iio/accel/adxl372.c 				     chan->scan_type.realbits - 1);
chan              680 drivers/iio/accel/adxl372.c 			     struct iio_chan_spec const *chan,
chan              139 drivers/iio/accel/bma180.c static int bma180_get_data_reg(struct bma180_data *data, enum bma180_chan chan)
chan              146 drivers/iio/accel/bma180.c 	switch (chan) {
chan              154 drivers/iio/accel/bma180.c 			BMA180_ACC_X_LSB + chan * 2);
chan              158 drivers/iio/accel/bma180.c 				'x' + chan);
chan              463 drivers/iio/accel/bma180.c 		struct iio_chan_spec const *chan, int *val, int *val2,
chan              476 drivers/iio/accel/bma180.c 		ret = bma180_get_data_reg(data, chan->scan_index);
chan              481 drivers/iio/accel/bma180.c 		*val = sign_extend32(ret >> chan->scan_type.shift,
chan              482 drivers/iio/accel/bma180.c 			chan->scan_type.realbits - 1);
chan              488 drivers/iio/accel/bma180.c 		switch (chan->type) {
chan              508 drivers/iio/accel/bma180.c 		struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              542 drivers/iio/accel/bma180.c 		const struct iio_chan_spec *chan)
chan              550 drivers/iio/accel/bma180.c 		const struct iio_chan_spec *chan, unsigned int mode)
chan              564 drivers/iio/accel/bma180.c 				const struct iio_chan_spec *chan)
chan              122 drivers/iio/accel/bma220_spi.c 			   struct iio_chan_spec const *chan,
chan              131 drivers/iio/accel/bma220_spi.c 		ret = bma220_read_reg(data->spi_device, chan->address);
chan              150 drivers/iio/accel/bma220_spi.c 			    struct iio_chan_spec const *chan,
chan              539 drivers/iio/accel/bmc150-accel-core.c 				 struct iio_chan_spec const *chan,
chan              544 drivers/iio/accel/bmc150-accel-core.c 	int axis = chan->scan_index;
chan              562 drivers/iio/accel/bmc150-accel-core.c 	*val = sign_extend32(le16_to_cpu(raw_val) >> chan->scan_type.shift,
chan              563 drivers/iio/accel/bmc150-accel-core.c 			     chan->scan_type.realbits - 1);
chan              573 drivers/iio/accel/bmc150-accel-core.c 				 struct iio_chan_spec const *chan,
chan              581 drivers/iio/accel/bmc150-accel-core.c 		switch (chan->type) {
chan              588 drivers/iio/accel/bmc150-accel-core.c 				return bmc150_accel_get_axis(data, chan, val);
chan              593 drivers/iio/accel/bmc150-accel-core.c 		if (chan->type == IIO_TEMP) {
chan              601 drivers/iio/accel/bmc150-accel-core.c 		switch (chan->type) {
chan              634 drivers/iio/accel/bmc150-accel-core.c 				  struct iio_chan_spec const *chan,
chan              662 drivers/iio/accel/bmc150-accel-core.c 				   const struct iio_chan_spec *chan,
chan              686 drivers/iio/accel/bmc150-accel-core.c 				    const struct iio_chan_spec *chan,
chan              712 drivers/iio/accel/bmc150-accel-core.c 					  const struct iio_chan_spec *chan,
chan              722 drivers/iio/accel/bmc150-accel-core.c 					   const struct iio_chan_spec *chan,
chan              794 drivers/iio/accel/bmc150-accel-core.c 				const struct iio_chan_spec *chan)
chan               71 drivers/iio/accel/cros_ec_accel_legacy.c 				     struct iio_chan_spec const *chan,
chan               77 drivers/iio/accel/cros_ec_accel_legacy.c 	int idx = chan->scan_index;
chan              101 drivers/iio/accel/cros_ec_accel_legacy.c 		ret = cros_ec_sensors_core_read(st, chan, val, val2,
chan              111 drivers/iio/accel/cros_ec_accel_legacy.c 				      struct iio_chan_spec const *chan,
chan               62 drivers/iio/accel/da280.c 				struct iio_chan_spec const *chan,
chan               70 drivers/iio/accel/da280.c 		ret = i2c_smbus_read_word_data(data->client, chan->address);
chan              185 drivers/iio/accel/da311.c 				struct iio_chan_spec const *chan,
chan              193 drivers/iio/accel/da311.c 		ret = i2c_smbus_read_word_data(data->client, chan->address);
chan               67 drivers/iio/accel/dmard06.c 			    struct iio_chan_spec const *chan,
chan               76 drivers/iio/accel/dmard06.c 					       chan->address);
chan               88 drivers/iio/accel/dmard06.c 		switch (chan->type) {
chan               99 drivers/iio/accel/dmard06.c 		switch (chan->type) {
chan              107 drivers/iio/accel/dmard06.c 		switch (chan->type) {
chan               50 drivers/iio/accel/dmard09.c 			    struct iio_chan_spec const *chan,
chan               73 drivers/iio/accel/dmard09.c 		accel = get_unaligned_le16(&buf[chan->address]);
chan              139 drivers/iio/accel/dmard10.c 				struct iio_chan_spec const *chan,
chan              157 drivers/iio/accel/dmard10.c 		ret = le16_to_cpu(buf[chan->address]);
chan              131 drivers/iio/accel/hid-sensor-accel-3d.c 			      struct iio_chan_spec const *chan,
chan              148 drivers/iio/accel/hid-sensor-accel-3d.c 		report_id = accel_state->accel[chan->scan_index].report_id;
chan              149 drivers/iio/accel/hid-sensor-accel-3d.c 		min = accel_state->accel[chan->scan_index].logical_minimum;
chan              150 drivers/iio/accel/hid-sensor-accel-3d.c 		address = accel_3d_addresses[chan->scan_index];
chan              193 drivers/iio/accel/hid-sensor-accel-3d.c 			       struct iio_chan_spec const *chan,
chan              747 drivers/iio/accel/kxcjk-1013.c 			      struct iio_chan_spec const *chan, int *val,
chan              764 drivers/iio/accel/kxcjk-1013.c 			ret = kxcjk1013_get_acc_reg(data, chan->scan_index);
chan              797 drivers/iio/accel/kxcjk-1013.c 			       struct iio_chan_spec const *chan, int val,
chan              825 drivers/iio/accel/kxcjk-1013.c 				   const struct iio_chan_spec *chan,
chan              849 drivers/iio/accel/kxcjk-1013.c 				    const struct iio_chan_spec *chan,
chan              875 drivers/iio/accel/kxcjk-1013.c 					  const struct iio_chan_spec *chan,
chan              885 drivers/iio/accel/kxcjk-1013.c 					   const struct iio_chan_spec *chan,
chan              136 drivers/iio/accel/kxsd9.c 			   struct iio_chan_spec const *chan,
chan              160 drivers/iio/accel/kxsd9.c 			  struct iio_chan_spec const *chan,
chan              173 drivers/iio/accel/kxsd9.c 		ret = regmap_bulk_read(st->map, chan->address, &raw_val,
chan              262 drivers/iio/accel/kxsd9.c 		       const struct iio_chan_spec *chan)
chan               83 drivers/iio/accel/mc3230.c 				struct iio_chan_spec const *chan,
chan               91 drivers/iio/accel/mc3230.c 		ret = i2c_smbus_read_byte_data(data->client, chan->address);
chan              107 drivers/iio/accel/mma7455_core.c 			    struct iio_chan_spec const *chan,
chan              124 drivers/iio/accel/mma7455_core.c 		ret = regmap_bulk_read(mma7455->regmap, chan->address, &data,
chan              156 drivers/iio/accel/mma7455_core.c 			     struct iio_chan_spec const *chan,
chan              141 drivers/iio/accel/mma7660.c 				struct iio_chan_spec const *chan,
chan              150 drivers/iio/accel/mma7660.c 		ret = mma7660_read_accel(data, chan->address);
chan               63 drivers/iio/accel/mma8452.c #define  MMA8452_TRANSIENT_CFG_CHAN(chan)	BIT(chan + 1)
chan              483 drivers/iio/accel/mma8452.c 			    struct iio_chan_spec const *chan,
chan              504 drivers/iio/accel/mma8452.c 			buffer[chan->scan_index]) >> chan->scan_type.shift,
chan              505 drivers/iio/accel/mma8452.c 			chan->scan_type.realbits - 1);
chan              523 drivers/iio/accel/mma8452.c 					       chan->scan_index);
chan              703 drivers/iio/accel/mma8452.c 			     struct iio_chan_spec const *chan,
chan              748 drivers/iio/accel/mma8452.c 					    MMA8452_OFF_X + chan->scan_index,
chan              786 drivers/iio/accel/mma8452.c 		const struct iio_chan_spec *chan, enum iio_event_direction dir,
chan              789 drivers/iio/accel/mma8452.c 	if (!chan)
chan              792 drivers/iio/accel/mma8452.c 	switch (chan->type) {
chan              816 drivers/iio/accel/mma8452.c 			       const struct iio_chan_spec *chan,
chan              826 drivers/iio/accel/mma8452.c 	ret = mma8452_get_event_regs(data, chan, dir, &ev_regs);
chan              879 drivers/iio/accel/mma8452.c 				const struct iio_chan_spec *chan,
chan              889 drivers/iio/accel/mma8452.c 	ret = mma8452_get_event_regs(data, chan, dir, &ev_regs);
chan              937 drivers/iio/accel/mma8452.c 				     const struct iio_chan_spec *chan,
chan              945 drivers/iio/accel/mma8452.c 	ret = mma8452_get_event_regs(data, chan, dir, &ev_regs);
chan              958 drivers/iio/accel/mma8452.c 		return !!(ret & BIT(chan->scan_index +
chan              966 drivers/iio/accel/mma8452.c 				      const struct iio_chan_spec *chan,
chan              975 drivers/iio/accel/mma8452.c 	ret = mma8452_get_event_regs(data, chan, dir, &ev_regs);
chan              998 drivers/iio/accel/mma8452.c 			val |= BIT(chan->scan_index +
chan             1004 drivers/iio/accel/mma8452.c 			val &= ~BIT(chan->scan_index +
chan               53 drivers/iio/accel/mma9551.c 				   const struct iio_chan_spec *chan,
chan               60 drivers/iio/accel/mma9551.c 	switch (chan->channel2) {
chan              107 drivers/iio/accel/mma9551.c 			    struct iio_chan_spec const *chan,
chan              115 drivers/iio/accel/mma9551.c 		switch (chan->type) {
chan              118 drivers/iio/accel/mma9551.c 			ret = mma9551_read_incli_chan(data->client, chan, val);
chan              125 drivers/iio/accel/mma9551.c 		switch (chan->type) {
chan              129 drivers/iio/accel/mma9551.c 						      chan, val, val2);
chan              136 drivers/iio/accel/mma9551.c 		switch (chan->type) {
chan              148 drivers/iio/accel/mma9551.c 				     const struct iio_chan_spec *chan,
chan              154 drivers/iio/accel/mma9551.c 	switch (chan->type) {
chan              157 drivers/iio/accel/mma9551.c 		return data->event_enabled[chan->channel2 - 1];
chan              225 drivers/iio/accel/mma9551.c 				      const struct iio_chan_spec *chan,
chan              233 drivers/iio/accel/mma9551.c 	switch (chan->type) {
chan              237 drivers/iio/accel/mma9551.c 						 chan->channel2, state);
chan              246 drivers/iio/accel/mma9551.c 				     const struct iio_chan_spec *chan,
chan              255 drivers/iio/accel/mma9551.c 	switch (chan->type) {
chan              273 drivers/iio/accel/mma9551.c 				    const struct iio_chan_spec *chan,
chan              283 drivers/iio/accel/mma9551.c 	switch (chan->type) {
chan              722 drivers/iio/accel/mma9551_core.c 			    const struct iio_chan_spec *chan,
chan              729 drivers/iio/accel/mma9551_core.c 	switch (chan->channel2) {
chan               68 drivers/iio/accel/mma9551_core.h 			    const struct iio_chan_spec *chan,
chan              463 drivers/iio/accel/mma9553.c 			    struct iio_chan_spec const *chan,
chan              473 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              505 drivers/iio/accel/mma9553.c 			if (chan->channel2 == mma9553_activity_to_mod(activity))
chan              514 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              516 drivers/iio/accel/mma9553.c 			if (chan->channel2 != IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z)
chan              536 drivers/iio/accel/mma9553.c 						      chan, val, val2);
chan              543 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              545 drivers/iio/accel/mma9553.c 			if (chan->channel2 != IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z)
chan              572 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              581 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              590 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              592 drivers/iio/accel/mma9553.c 			if (chan->channel2 != IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z)
chan              606 drivers/iio/accel/mma9553.c 			     struct iio_chan_spec const *chan,
chan              648 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              668 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              682 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              684 drivers/iio/accel/mma9553.c 			if (chan->channel2 != IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z)
chan              711 drivers/iio/accel/mma9553.c 				     const struct iio_chan_spec *chan,
chan              718 drivers/iio/accel/mma9553.c 	event = mma9553_get_event(data, chan->type, chan->channel2, dir);
chan              726 drivers/iio/accel/mma9553.c 				      const struct iio_chan_spec *chan,
chan              734 drivers/iio/accel/mma9553.c 	event = mma9553_get_event(data, chan->type, chan->channel2, dir);
chan              767 drivers/iio/accel/mma9553.c 				    const struct iio_chan_spec *chan,
chan              778 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              794 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              807 drivers/iio/accel/mma9553.c 				     const struct iio_chan_spec *chan,
chan              818 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              833 drivers/iio/accel/mma9553.c 		switch (chan->type) {
chan              854 drivers/iio/accel/mma9553.c 					const struct iio_chan_spec *chan)
chan              868 drivers/iio/accel/mma9553.c 					const struct iio_chan_spec *chan,
chan              206 drivers/iio/accel/mxc4005.c 			    struct iio_chan_spec const *chan,
chan              214 drivers/iio/accel/mxc4005.c 		switch (chan->type) {
chan              219 drivers/iio/accel/mxc4005.c 			ret = mxc4005_read_axis(data, chan->address);
chan              222 drivers/iio/accel/mxc4005.c 			*val = sign_extend32(ret >> chan->scan_type.shift,
chan              223 drivers/iio/accel/mxc4005.c 					     chan->scan_type.realbits - 1);
chan              242 drivers/iio/accel/mxc4005.c 			     struct iio_chan_spec const *chan,
chan               50 drivers/iio/accel/mxc6255.c 			    struct iio_chan_spec const *chan,
chan               59 drivers/iio/accel/mxc6255.c 		ret = regmap_read(data->regmap, chan->address, &reg);
chan               62 drivers/iio/accel/mxc6255.c 				"Error reading reg %lu\n", chan->address);
chan              710 drivers/iio/accel/sca3000.c 			    struct iio_chan_spec const *chan,
chan              722 drivers/iio/accel/sca3000.c 		if (chan->type == IIO_ACCEL) {
chan              727 drivers/iio/accel/sca3000.c 			address = sca3000_addresses[chan->address][0];
chan              752 drivers/iio/accel/sca3000.c 		if (chan->type == IIO_ACCEL)
chan              777 drivers/iio/accel/sca3000.c 			     struct iio_chan_spec const *chan,
chan              866 drivers/iio/accel/sca3000.c 				    const struct iio_chan_spec *chan,
chan              880 drivers/iio/accel/sca3000.c 					    sca3000_addresses[chan->address][1]);
chan              885 drivers/iio/accel/sca3000.c 		if (chan->channel2 == IIO_MOD_Y)
chan              918 drivers/iio/accel/sca3000.c 				     const struct iio_chan_spec *chan,
chan              929 drivers/iio/accel/sca3000.c 	if (chan->channel2 == IIO_MOD_Y) {
chan              947 drivers/iio/accel/sca3000.c 				     sca3000_addresses[chan->address][1],
chan             1107 drivers/iio/accel/sca3000.c 				     const struct iio_chan_spec *chan,
chan             1120 drivers/iio/accel/sca3000.c 	switch (chan->channel2) {
chan             1140 drivers/iio/accel/sca3000.c 			ret = !!(ret & sca3000_addresses[chan->address][2]);
chan             1245 drivers/iio/accel/sca3000.c 				      const struct iio_chan_spec *chan,
chan             1254 drivers/iio/accel/sca3000.c 	switch (chan->channel2) {
chan             1263 drivers/iio/accel/sca3000.c 						      chan->address,
chan               28 drivers/iio/accel/ssp_accel_sensor.c 			      struct iio_chan_spec const *chan,  int *val,
chan               47 drivers/iio/accel/ssp_accel_sensor.c 			       struct iio_chan_spec const *chan, int val,
chan              940 drivers/iio/accel/st_accel_core.c 		struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              999 drivers/iio/accel/st_accel_core.c 		 const struct iio_chan_spec *chan)
chan              332 drivers/iio/accel/stk8312.c 			    struct iio_chan_spec const *chan,
chan              348 drivers/iio/accel/stk8312.c 		ret = stk8312_read_accel(data, chan->address);
chan              376 drivers/iio/accel/stk8312.c 			     struct iio_chan_spec const *chan,
chan              209 drivers/iio/accel/stk8ba50.c 			     struct iio_chan_spec const *chan,
chan              225 drivers/iio/accel/stk8ba50.c 		ret = stk8ba50_read_accel(data, chan->address);
chan              250 drivers/iio/accel/stk8ba50.c 			      struct iio_chan_spec const *chan,
chan              283 drivers/iio/adc/ad7124.c 			   struct iio_chan_spec const *chan,
chan              291 drivers/iio/adc/ad7124.c 		ret = ad_sigma_delta_single_conversion(indio_dev, chan, val);
chan              297 drivers/iio/adc/ad7124.c 				      AD7124_CHANNEL(chan->address), 2,
chan              298 drivers/iio/adc/ad7124.c 				      st->channel_config[chan->address].ain |
chan              305 drivers/iio/adc/ad7124.c 		idx = st->channel_config[chan->address].pga_bits;
chan              306 drivers/iio/adc/ad7124.c 		*val = st->channel_config[chan->address].vref_mv;
chan              307 drivers/iio/adc/ad7124.c 		if (st->channel_config[chan->address].bipolar)
chan              308 drivers/iio/adc/ad7124.c 			*val2 = chan->scan_type.realbits - 1 + idx;
chan              310 drivers/iio/adc/ad7124.c 			*val2 = chan->scan_type.realbits + idx;
chan              314 drivers/iio/adc/ad7124.c 		if (st->channel_config[chan->address].bipolar)
chan              315 drivers/iio/adc/ad7124.c 			*val = -(1 << (chan->scan_type.realbits - 1));
chan              321 drivers/iio/adc/ad7124.c 		*val = st->channel_config[chan->address].odr;
chan              330 drivers/iio/adc/ad7124.c 			    struct iio_chan_spec const *chan,
chan              341 drivers/iio/adc/ad7124.c 		return ad7124_set_channel_odr(st, chan->address, val);
chan              346 drivers/iio/adc/ad7124.c 		if (st->channel_config[chan->address].bipolar)
chan              347 drivers/iio/adc/ad7124.c 			full_scale = 1 << (chan->scan_type.realbits - 1);
chan              349 drivers/iio/adc/ad7124.c 			full_scale = 1 << chan->scan_type.realbits;
chan              351 drivers/iio/adc/ad7124.c 		vref = st->channel_config[chan->address].vref_mv * 1000000LL;
chan              355 drivers/iio/adc/ad7124.c 		return ad7124_set_channel_gain(st, chan->address, gain);
chan              446 drivers/iio/adc/ad7124.c 	struct iio_chan_spec *chan;
chan              457 drivers/iio/adc/ad7124.c 	chan = devm_kcalloc(indio_dev->dev.parent, st->num_channels,
chan              458 drivers/iio/adc/ad7124.c 			    sizeof(*chan), GFP_KERNEL);
chan              459 drivers/iio/adc/ad7124.c 	if (!chan)
chan              467 drivers/iio/adc/ad7124.c 	indio_dev->channels = chan;
chan              497 drivers/iio/adc/ad7124.c 		chan[channel] = ad7124_channel_template;
chan              498 drivers/iio/adc/ad7124.c 		chan[channel].address = channel;
chan              499 drivers/iio/adc/ad7124.c 		chan[channel].scan_index = channel;
chan              500 drivers/iio/adc/ad7124.c 		chan[channel].channel = ain[0];
chan              501 drivers/iio/adc/ad7124.c 		chan[channel].channel2 = ain[1];
chan              148 drivers/iio/adc/ad7266.c 	struct iio_chan_spec const *chan, int *val, int *val2, long m)
chan              159 drivers/iio/adc/ad7266.c 		ret = ad7266_read_single(st, val, chan->address);
chan              163 drivers/iio/adc/ad7266.c 		if (chan->scan_type.sign == 's')
chan              175 drivers/iio/adc/ad7266.c 		*val2 = chan->scan_type.realbits;
chan              170 drivers/iio/adc/ad7291.c static unsigned int ad7291_threshold_reg(const struct iio_chan_spec *chan,
chan              176 drivers/iio/adc/ad7291.c 	switch (chan->type) {
chan              178 drivers/iio/adc/ad7291.c 		offset = chan->channel;
chan              202 drivers/iio/adc/ad7291.c 				   const struct iio_chan_spec *chan,
chan              212 drivers/iio/adc/ad7291.c 	ret = ad7291_i2c_read(chip, ad7291_threshold_reg(chan, dir, info),
chan              217 drivers/iio/adc/ad7291.c 	if (info == IIO_EV_INFO_HYSTERESIS || chan->type == IIO_VOLTAGE)
chan              227 drivers/iio/adc/ad7291.c 				    const struct iio_chan_spec *chan,
chan              235 drivers/iio/adc/ad7291.c 	if (info == IIO_EV_INFO_HYSTERESIS || chan->type == IIO_VOLTAGE) {
chan              243 drivers/iio/adc/ad7291.c 	return ad7291_i2c_write(chip, ad7291_threshold_reg(chan, dir, info),
chan              248 drivers/iio/adc/ad7291.c 				    const struct iio_chan_spec *chan,
chan              258 drivers/iio/adc/ad7291.c 	switch (chan->type) {
chan              260 drivers/iio/adc/ad7291.c 		return !!(chip->c_mask & BIT(15 - chan->channel));
chan              271 drivers/iio/adc/ad7291.c 				     const struct iio_chan_spec *chan,
chan              289 drivers/iio/adc/ad7291.c 	mask = BIT(15 - chan->channel);
chan              291 drivers/iio/adc/ad7291.c 	switch (chan->type) {
chan              321 drivers/iio/adc/ad7291.c 			   struct iio_chan_spec const *chan,
chan              332 drivers/iio/adc/ad7291.c 		switch (chan->type) {
chan              342 drivers/iio/adc/ad7291.c 			regval |= BIT(15 - chan->channel);
chan              377 drivers/iio/adc/ad7291.c 		switch (chan->type) {
chan              231 drivers/iio/adc/ad7298.c 			   struct iio_chan_spec const *chan,
chan              245 drivers/iio/adc/ad7298.c 		if (chan->address == AD7298_CH_TEMP)
chan              248 drivers/iio/adc/ad7298.c 			ret = ad7298_scan_direct(st, chan->address);
chan              255 drivers/iio/adc/ad7298.c 		if (chan->address != AD7298_CH_TEMP)
chan              256 drivers/iio/adc/ad7298.c 			*val = ret & GENMASK(chan->scan_type.realbits - 1, 0);
chan              260 drivers/iio/adc/ad7298.c 		switch (chan->type) {
chan              263 drivers/iio/adc/ad7298.c 			*val2 = chan->scan_type.realbits;
chan              104 drivers/iio/adc/ad7476.c 			   struct iio_chan_spec const *chan,
chan              135 drivers/iio/adc/ad7476.c 		*val2 = chan->scan_type.realbits;
chan              166 drivers/iio/adc/ad7606.c 			   struct iio_chan_spec const *chan,
chan              180 drivers/iio/adc/ad7606.c 		ret = ad7606_scan_direct(indio_dev, chan->address);
chan              189 drivers/iio/adc/ad7606.c 			ch = chan->address;
chan              254 drivers/iio/adc/ad7606.c 			    struct iio_chan_spec const *chan,
chan              267 drivers/iio/adc/ad7606.c 			ch = chan->address;
chan              129 drivers/iio/adc/ad7766.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              141 drivers/iio/adc/ad7766.c 		*val2 = chan->scan_type.realbits;
chan              355 drivers/iio/adc/ad7768-1.c 			   struct iio_chan_spec const *chan,
chan              383 drivers/iio/adc/ad7768-1.c 		*val2 = chan->scan_type.realbits;
chan              397 drivers/iio/adc/ad7768-1.c 			    struct iio_chan_spec const *chan,
chan              106 drivers/iio/adc/ad7780.c 			   struct iio_chan_spec const *chan,
chan              116 drivers/iio/adc/ad7780.c 		return ad_sigma_delta_single_conversion(indio_dev, chan, val);
chan              123 drivers/iio/adc/ad7780.c 		*val2 = chan->scan_type.realbits - 1;
chan              127 drivers/iio/adc/ad7780.c 		*val = -(1 << (chan->scan_type.realbits - 1));
chan              140 drivers/iio/adc/ad7780.c 			    struct iio_chan_spec const *chan,
chan              211 drivers/iio/adc/ad7791.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              219 drivers/iio/adc/ad7791.c 		return ad_sigma_delta_single_conversion(indio_dev, chan, val);
chan              228 drivers/iio/adc/ad7791.c 			*val = -(1 << (chan->scan_type.realbits - 1));
chan              232 drivers/iio/adc/ad7791.c 		if (chan->address == AD7791_CH_AVDD_MONITOR) {
chan              248 drivers/iio/adc/ad7791.c 			*val2 = chan->scan_type.realbits;
chan              250 drivers/iio/adc/ad7791.c 			*val2 = chan->scan_type.realbits - 1;
chan              264 drivers/iio/adc/ad7791.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              396 drivers/iio/adc/ad7793.c 			   struct iio_chan_spec const *chan,
chan              408 drivers/iio/adc/ad7793.c 		ret = ad_sigma_delta_single_conversion(indio_dev, chan, val);
chan              415 drivers/iio/adc/ad7793.c 		switch (chan->type) {
chan              417 drivers/iio/adc/ad7793.c 			if (chan->differential) {
chan              435 drivers/iio/adc/ad7793.c 		scale_uv >>= (chan->scan_type.realbits - (unipolar ? 0 : 1));
chan              441 drivers/iio/adc/ad7793.c 			*val = -(1 << (chan->scan_type.realbits - 1));
chan              446 drivers/iio/adc/ad7793.c 		if (chan->type == IIO_TEMP) {
chan              450 drivers/iio/adc/ad7793.c 			shift = chan->scan_type.realbits - (unipolar ? 0 : 1);
chan              465 drivers/iio/adc/ad7793.c 			       struct iio_chan_spec const *chan,
chan              526 drivers/iio/adc/ad7793.c 			       struct iio_chan_spec const *chan,
chan              148 drivers/iio/adc/ad7887.c 			   struct iio_chan_spec const *chan,
chan              161 drivers/iio/adc/ad7887.c 		ret = ad7887_scan_direct(st, chan->address);
chan              166 drivers/iio/adc/ad7887.c 		*val = ret >> chan->scan_type.shift;
chan              167 drivers/iio/adc/ad7887.c 		*val &= GENMASK(chan->scan_type.realbits - 1, 0);
chan              179 drivers/iio/adc/ad7887.c 		*val2 = chan->scan_type.realbits;
chan              225 drivers/iio/adc/ad7923.c 			   struct iio_chan_spec const *chan,
chan              238 drivers/iio/adc/ad7923.c 		ret = ad7923_scan_direct(st, chan->address);
chan              244 drivers/iio/adc/ad7923.c 		if (chan->address == EXTRACT(ret, 12, 4))
chan              255 drivers/iio/adc/ad7923.c 		*val2 = chan->scan_type.realbits;
chan              140 drivers/iio/adc/ad7949.c #define AD7949_ADC_CHANNEL(chan) {				\
chan              143 drivers/iio/adc/ad7949.c 	.channel = (chan),					\
chan              160 drivers/iio/adc/ad7949.c 			   struct iio_chan_spec const *chan,
chan              172 drivers/iio/adc/ad7949.c 		ret = ad7949_spi_read_channel(ad7949_adc, val, chan->channel);
chan              271 drivers/iio/adc/ad799x.c 			   struct iio_chan_spec const *chan,
chan              284 drivers/iio/adc/ad799x.c 		ret = ad799x_scan_direct(st, chan->scan_index);
chan              289 drivers/iio/adc/ad799x.c 		*val = (ret >> chan->scan_type.shift) &
chan              290 drivers/iio/adc/ad799x.c 			GENMASK(chan->scan_type.realbits - 1, 0);
chan              297 drivers/iio/adc/ad799x.c 		*val2 = chan->scan_type.realbits;
chan              369 drivers/iio/adc/ad799x.c 				    const struct iio_chan_spec *chan,
chan              378 drivers/iio/adc/ad799x.c 	if ((st->config >> AD799X_CHANNEL_SHIFT) & BIT(chan->scan_index))
chan              385 drivers/iio/adc/ad799x.c 				     const struct iio_chan_spec *chan,
chan              398 drivers/iio/adc/ad799x.c 		st->config |= BIT(chan->scan_index) << AD799X_CHANNEL_SHIFT;
chan              400 drivers/iio/adc/ad799x.c 		st->config &= ~(BIT(chan->scan_index) << AD799X_CHANNEL_SHIFT);
chan              412 drivers/iio/adc/ad799x.c static unsigned int ad799x_threshold_reg(const struct iio_chan_spec *chan,
chan              419 drivers/iio/adc/ad799x.c 			return AD7998_DATALOW_REG(chan->channel);
chan              421 drivers/iio/adc/ad799x.c 			return AD7998_DATAHIGH_REG(chan->channel);
chan              423 drivers/iio/adc/ad799x.c 		return AD7998_HYST_REG(chan->channel);
chan              432 drivers/iio/adc/ad799x.c 				    const struct iio_chan_spec *chan,
chan              441 drivers/iio/adc/ad799x.c 	if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0))
chan              446 drivers/iio/adc/ad799x.c 		ad799x_threshold_reg(chan, dir, info),
chan              447 drivers/iio/adc/ad799x.c 		val << chan->scan_type.shift);
chan              454 drivers/iio/adc/ad799x.c 				    const struct iio_chan_spec *chan,
chan              465 drivers/iio/adc/ad799x.c 		ad799x_threshold_reg(chan, dir, info));
chan              469 drivers/iio/adc/ad799x.c 	*val = (ret >> chan->scan_type.shift) &
chan              470 drivers/iio/adc/ad799x.c 		GENMASK(chan->scan_type.realbits - 1, 0);
chan              279 drivers/iio/adc/ad_sigma_delta.c 	const struct iio_chan_spec *chan, int *val)
chan              290 drivers/iio/adc/ad_sigma_delta.c 	ad_sigma_delta_set_channel(sigma_delta, chan->address);
chan              315 drivers/iio/adc/ad_sigma_delta.c 		DIV_ROUND_UP(chan->scan_type.realbits + chan->scan_type.shift, 8),
chan              333 drivers/iio/adc/ad_sigma_delta.c 	sample = raw_sample >> chan->scan_type.shift;
chan              334 drivers/iio/adc/ad_sigma_delta.c 	sample &= (1 << chan->scan_type.realbits) - 1;
chan               91 drivers/iio/adc/aspeed_adc.c 			       struct iio_chan_spec const *chan,
chan              100 drivers/iio/adc/aspeed_adc.c 		*val = readw(data->base + chan->address);
chan              119 drivers/iio/adc/aspeed_adc.c 				struct iio_chan_spec const *chan,
chan              394 drivers/iio/adc/at91-sama5d2_adc.c 	const struct iio_chan_spec	*chan;
chan              462 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_chan_xlate(struct iio_dev *indio_dev, int chan)
chan              467 drivers/iio/adc/at91-sama5d2_adc.c 		if (indio_dev->channels[i].scan_index == chan)
chan              474 drivers/iio/adc/at91-sama5d2_adc.c at91_adc_chan_get(struct iio_dev *indio_dev, int chan)
chan              476 drivers/iio/adc/at91-sama5d2_adc.c 	int index = at91_adc_chan_xlate(indio_dev, chan);
chan              680 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_read_position(struct at91_adc_state *st, int chan, u16 *val)
chan              685 drivers/iio/adc/at91-sama5d2_adc.c 	if (chan == AT91_SAMA5D2_TOUCH_X_CHAN_IDX)
chan              687 drivers/iio/adc/at91-sama5d2_adc.c 	else if (chan == AT91_SAMA5D2_TOUCH_Y_CHAN_IDX)
chan              695 drivers/iio/adc/at91-sama5d2_adc.c static int at91_adc_read_pressure(struct at91_adc_state *st, int chan, u16 *val)
chan              700 drivers/iio/adc/at91-sama5d2_adc.c 	if (chan == AT91_SAMA5D2_TOUCH_P_CHAN_IDX)
chan              725 drivers/iio/adc/at91-sama5d2_adc.c 		struct iio_chan_spec const *chan = at91_adc_chan_get(indio, bit);
chan              728 drivers/iio/adc/at91-sama5d2_adc.c 		if (!chan)
chan              731 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->type == IIO_POSITIONRELATIVE ||
chan              732 drivers/iio/adc/at91-sama5d2_adc.c 		    chan->type == IIO_PRESSURE)
chan              738 drivers/iio/adc/at91-sama5d2_adc.c 			if (chan->differential)
chan              739 drivers/iio/adc/at91-sama5d2_adc.c 				cor |= (BIT(chan->channel) |
chan              740 drivers/iio/adc/at91-sama5d2_adc.c 					BIT(chan->channel2)) <<
chan              743 drivers/iio/adc/at91-sama5d2_adc.c 				cor &= ~(BIT(chan->channel) <<
chan              751 drivers/iio/adc/at91-sama5d2_adc.c 					BIT(chan->channel));
chan              755 drivers/iio/adc/at91-sama5d2_adc.c 						BIT(chan->channel));
chan              761 drivers/iio/adc/at91-sama5d2_adc.c 						BIT(chan->channel));
chan              764 drivers/iio/adc/at91-sama5d2_adc.c 					BIT(chan->channel));
chan              845 drivers/iio/adc/at91-sama5d2_adc.c 		struct iio_chan_spec const *chan =
chan              848 drivers/iio/adc/at91-sama5d2_adc.c 		if (!chan)
chan              851 drivers/iio/adc/at91-sama5d2_adc.c 		st->dma_st.rx_buf_sz += chan->scan_type.storagebits / 8;
chan              952 drivers/iio/adc/at91-sama5d2_adc.c 		struct iio_chan_spec const *chan =
chan              955 drivers/iio/adc/at91-sama5d2_adc.c 		if (!chan)
chan              958 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->type == IIO_POSITIONRELATIVE ||
chan              959 drivers/iio/adc/at91-sama5d2_adc.c 		    chan->type == IIO_PRESSURE)
chan              962 drivers/iio/adc/at91-sama5d2_adc.c 			at91_adc_readl(st, chan->address);
chan             1021 drivers/iio/adc/at91-sama5d2_adc.c 		struct iio_chan_spec const *chan =
chan             1024 drivers/iio/adc/at91-sama5d2_adc.c 		if (!chan)
chan             1036 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->type == IIO_VOLTAGE) {
chan             1037 drivers/iio/adc/at91-sama5d2_adc.c 			val = at91_adc_readl(st, chan->address);
chan             1193 drivers/iio/adc/at91-sama5d2_adc.c 		struct iio_chan_spec const *chan =
chan             1196 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->type == IIO_POSITIONRELATIVE)
chan             1197 drivers/iio/adc/at91-sama5d2_adc.c 			at91_adc_read_position(st, chan->channel, &val);
chan             1198 drivers/iio/adc/at91-sama5d2_adc.c 		else if (chan->type == IIO_PRESSURE)
chan             1199 drivers/iio/adc/at91-sama5d2_adc.c 			at91_adc_read_pressure(st, chan->channel, &val);
chan             1294 drivers/iio/adc/at91-sama5d2_adc.c 		st->conversion_value = at91_adc_readl(st, st->chan->address);
chan             1302 drivers/iio/adc/at91-sama5d2_adc.c 				  struct iio_chan_spec const *chan, int *val)
chan             1313 drivers/iio/adc/at91-sama5d2_adc.c 	if (chan->type == IIO_POSITIONRELATIVE) {
chan             1319 drivers/iio/adc/at91-sama5d2_adc.c 		ret = at91_adc_read_position(st, chan->channel,
chan             1327 drivers/iio/adc/at91-sama5d2_adc.c 	if (chan->type == IIO_PRESSURE) {
chan             1333 drivers/iio/adc/at91-sama5d2_adc.c 		ret = at91_adc_read_pressure(st, chan->channel,
chan             1349 drivers/iio/adc/at91-sama5d2_adc.c 	st->chan = chan;
chan             1351 drivers/iio/adc/at91-sama5d2_adc.c 	if (chan->differential)
chan             1352 drivers/iio/adc/at91-sama5d2_adc.c 		cor = (BIT(chan->channel) | BIT(chan->channel2)) <<
chan             1356 drivers/iio/adc/at91-sama5d2_adc.c 	at91_adc_writel(st, AT91_SAMA5D2_CHER, BIT(chan->channel));
chan             1357 drivers/iio/adc/at91-sama5d2_adc.c 	at91_adc_writel(st, AT91_SAMA5D2_IER, BIT(chan->channel));
chan             1369 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->scan_type.sign == 's')
chan             1374 drivers/iio/adc/at91-sama5d2_adc.c 	at91_adc_writel(st, AT91_SAMA5D2_IDR, BIT(chan->channel));
chan             1375 drivers/iio/adc/at91-sama5d2_adc.c 	at91_adc_writel(st, AT91_SAMA5D2_CHDR, BIT(chan->channel));
chan             1387 drivers/iio/adc/at91-sama5d2_adc.c 			     struct iio_chan_spec const *chan,
chan             1394 drivers/iio/adc/at91-sama5d2_adc.c 		return at91_adc_read_info_raw(indio_dev, chan, val);
chan             1397 drivers/iio/adc/at91-sama5d2_adc.c 		if (chan->differential)
chan             1399 drivers/iio/adc/at91-sama5d2_adc.c 		*val2 = chan->scan_type.realbits;
chan             1416 drivers/iio/adc/at91-sama5d2_adc.c 			      struct iio_chan_spec const *chan,
chan              250 drivers/iio/adc/at91_adc.c 	struct iio_chan_spec const *chan;
chan              256 drivers/iio/adc/at91_adc.c 		chan = idev->channels + i;
chan              257 drivers/iio/adc/at91_adc.c 		st->buffer[j] = at91_adc_readl(st, AT91_ADC_CHAN(st, chan->channel));
chan              494 drivers/iio/adc/at91_adc.c 		struct iio_chan_spec *chan = chan_array + idx;
chan              496 drivers/iio/adc/at91_adc.c 		chan->type = IIO_VOLTAGE;
chan              497 drivers/iio/adc/at91_adc.c 		chan->indexed = 1;
chan              498 drivers/iio/adc/at91_adc.c 		chan->channel = bit;
chan              499 drivers/iio/adc/at91_adc.c 		chan->scan_index = idx;
chan              500 drivers/iio/adc/at91_adc.c 		chan->scan_type.sign = 'u';
chan              501 drivers/iio/adc/at91_adc.c 		chan->scan_type.realbits = st->res;
chan              502 drivers/iio/adc/at91_adc.c 		chan->scan_type.storagebits = 16;
chan              503 drivers/iio/adc/at91_adc.c 		chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
chan              504 drivers/iio/adc/at91_adc.c 		chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              574 drivers/iio/adc/at91_adc.c 			struct iio_chan_spec const *chan = idev->channels + bit;
chan              576 drivers/iio/adc/at91_adc.c 					AT91_ADC_CH(chan->channel));
chan              589 drivers/iio/adc/at91_adc.c 			struct iio_chan_spec const *chan = idev->channels + bit;
chan              591 drivers/iio/adc/at91_adc.c 					AT91_ADC_CH(chan->channel));
chan              687 drivers/iio/adc/at91_adc.c 			     struct iio_chan_spec const *chan,
chan              697 drivers/iio/adc/at91_adc.c 		st->chnb = chan->channel;
chan              699 drivers/iio/adc/at91_adc.c 				AT91_ADC_CH(chan->channel));
chan              700 drivers/iio/adc/at91_adc.c 		at91_adc_writel(st, AT91_ADC_IER, BIT(chan->channel));
chan              711 drivers/iio/adc/at91_adc.c 				AT91_ADC_CH(chan->channel));
chan              712 drivers/iio/adc/at91_adc.c 		at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel));
chan              723 drivers/iio/adc/at91_adc.c 				chan->channel);
chan              732 drivers/iio/adc/at91_adc.c 		*val2 = chan->scan_type.realbits;
chan              228 drivers/iio/adc/axp20x_adc.c 			  struct iio_chan_spec const *chan, int *val)
chan              238 drivers/iio/adc/axp20x_adc.c 	if (chan->type == IIO_CURRENT && chan->channel == AXP20X_BATT_DISCHRG_I)
chan              243 drivers/iio/adc/axp20x_adc.c 	*val = axp20x_read_variable_width(info->regmap, chan->address, size);
chan              251 drivers/iio/adc/axp20x_adc.c 			  struct iio_chan_spec const *chan, int *val)
chan              261 drivers/iio/adc/axp20x_adc.c 	if (chan->type == IIO_CURRENT && chan->channel == AXP22X_BATT_DISCHRG_I)
chan              266 drivers/iio/adc/axp20x_adc.c 	*val = axp20x_read_variable_width(info->regmap, chan->address, size);
chan              274 drivers/iio/adc/axp20x_adc.c 			  struct iio_chan_spec const *chan, int *val)
chan              278 drivers/iio/adc/axp20x_adc.c 	*val = axp20x_read_variable_width(info->regmap, chan->address, 12);
chan              357 drivers/iio/adc/axp20x_adc.c static int axp20x_adc_scale(struct iio_chan_spec const *chan, int *val,
chan              360 drivers/iio/adc/axp20x_adc.c 	switch (chan->type) {
chan              362 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_scale_voltage(chan->channel, val, val2);
chan              365 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_scale_current(chan->channel, val, val2);
chan              376 drivers/iio/adc/axp20x_adc.c static int axp22x_adc_scale(struct iio_chan_spec const *chan, int *val,
chan              379 drivers/iio/adc/axp20x_adc.c 	switch (chan->type) {
chan              381 drivers/iio/adc/axp20x_adc.c 		if (chan->channel != AXP22X_BATT_V)
chan              402 drivers/iio/adc/axp20x_adc.c static int axp813_adc_scale(struct iio_chan_spec const *chan, int *val,
chan              405 drivers/iio/adc/axp20x_adc.c 	switch (chan->type) {
chan              407 drivers/iio/adc/axp20x_adc.c 		return axp813_adc_scale_voltage(chan->channel, val, val2);
chan              451 drivers/iio/adc/axp20x_adc.c 			     struct iio_chan_spec const *chan, int *val)
chan              453 drivers/iio/adc/axp20x_adc.c 	switch (chan->type) {
chan              455 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_offset_voltage(indio_dev, chan->channel, val);
chan              467 drivers/iio/adc/axp20x_adc.c 			   struct iio_chan_spec const *chan, int *val,
chan              472 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_offset(indio_dev, chan, val);
chan              475 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_scale(chan, val, val2);
chan              478 drivers/iio/adc/axp20x_adc.c 		return axp20x_adc_raw(indio_dev, chan, val);
chan              486 drivers/iio/adc/axp20x_adc.c 			   struct iio_chan_spec const *chan, int *val,
chan              495 drivers/iio/adc/axp20x_adc.c 		return axp22x_adc_scale(chan, val, val2);
chan              498 drivers/iio/adc/axp20x_adc.c 		return axp22x_adc_raw(indio_dev, chan, val);
chan              506 drivers/iio/adc/axp20x_adc.c 			   struct iio_chan_spec const *chan, int *val,
chan              515 drivers/iio/adc/axp20x_adc.c 		return axp813_adc_scale(chan, val, val2);
chan              518 drivers/iio/adc/axp20x_adc.c 		return axp813_adc_raw(indio_dev, chan, val);
chan              526 drivers/iio/adc/axp20x_adc.c 			    struct iio_chan_spec const *chan, int val, int val2,
chan              544 drivers/iio/adc/axp20x_adc.c 	switch (chan->channel) {
chan              158 drivers/iio/adc/axp288_adc.c 			struct iio_chan_spec const *chan,
chan              168 drivers/iio/adc/axp288_adc.c 					chan->address)) {
chan              173 drivers/iio/adc/axp288_adc.c 		ret = axp288_adc_read_channel(val, chan->address, info->regmap);
chan              175 drivers/iio/adc/axp288_adc.c 						chan->address))
chan              453 drivers/iio/adc/bcm_iproc_adc.c 			  struct iio_chan_spec const *chan,
chan              463 drivers/iio/adc/bcm_iproc_adc.c 		err =  iproc_adc_do_read(indio_dev, chan->channel, &adc_data);
chan              469 drivers/iio/adc/bcm_iproc_adc.c 		switch (chan->type) {
chan              203 drivers/iio/adc/berlin2-adc.c 				struct iio_chan_spec const *chan, int *val,
chan              210 drivers/iio/adc/berlin2-adc.c 		if (chan->type != IIO_VOLTAGE)
chan              213 drivers/iio/adc/berlin2-adc.c 		*val = berlin2_adc_read(indio_dev, chan->channel);
chan              219 drivers/iio/adc/berlin2-adc.c 		if (chan->type != IIO_TEMP)
chan              192 drivers/iio/adc/cc10001_adc.c 					struct iio_chan_spec const *chan)
chan              204 drivers/iio/adc/cc10001_adc.c 	cc10001_adc_start(adc_dev, chan->channel);
chan              206 drivers/iio/adc/cc10001_adc.c 	val = cc10001_adc_poll_done(indio_dev, chan->channel, delay_ns);
chan              215 drivers/iio/adc/cc10001_adc.c 				 struct iio_chan_spec const *chan,
chan              226 drivers/iio/adc/cc10001_adc.c 		*val = cc10001_adc_read_raw_voltage(indio_dev, chan);
chan              239 drivers/iio/adc/cc10001_adc.c 		*val2 = chan->scan_type.realbits;
chan              281 drivers/iio/adc/cc10001_adc.c 		struct iio_chan_spec *chan = &chan_array[idx];
chan              283 drivers/iio/adc/cc10001_adc.c 		chan->type = IIO_VOLTAGE;
chan              284 drivers/iio/adc/cc10001_adc.c 		chan->indexed = 1;
chan              285 drivers/iio/adc/cc10001_adc.c 		chan->channel = bit;
chan              286 drivers/iio/adc/cc10001_adc.c 		chan->scan_index = idx;
chan              287 drivers/iio/adc/cc10001_adc.c 		chan->scan_type.sign = 'u';
chan              288 drivers/iio/adc/cc10001_adc.c 		chan->scan_type.realbits = 10;
chan              289 drivers/iio/adc/cc10001_adc.c 		chan->scan_type.storagebits = 16;
chan              290 drivers/iio/adc/cc10001_adc.c 		chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
chan              291 drivers/iio/adc/cc10001_adc.c 		chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              402 drivers/iio/adc/cpcap-adc.c 				      enum cpcap_adc_channel chan)
chan              408 drivers/iio/adc/cpcap-adc.c 	if ((chan != CPCAP_ADC_CHG_ISENSE) &&
chan              409 drivers/iio/adc/cpcap-adc.c 	    (chan != CPCAP_ADC_BATTI))
chan              413 drivers/iio/adc/cpcap-adc.c 	value |= ((chan << 4) &
chan              864 drivers/iio/adc/cpcap-adc.c 			  struct iio_chan_spec const *chan,
chan              871 drivers/iio/adc/cpcap-adc.c 	error = cpcap_adc_init_request(&req, chan->channel);
chan              881 drivers/iio/adc/cpcap-adc.c 		error = regmap_read(ddata->reg, chan->address, val);
chan              895 drivers/iio/adc/cpcap-adc.c 		    (chan->channel == CPCAP_ADC_AD3)) {
chan              897 drivers/iio/adc/cpcap-adc.c 							   chan->address,
chan              223 drivers/iio/adc/da9150-gpadc.c 				 struct iio_chan_spec const *chan,
chan              228 drivers/iio/adc/da9150-gpadc.c 	if ((chan->channel < DA9150_GPADC_CHAN_GPIOA) ||
chan              229 drivers/iio/adc/da9150-gpadc.c 	    (chan->channel > DA9150_GPADC_CHAN_TJUNC_OVP))
chan              235 drivers/iio/adc/da9150-gpadc.c 		return da9150_gpadc_read_processed(gpadc, chan->channel,
chan              236 drivers/iio/adc/da9150-gpadc.c 						   chan->address, val);
chan              238 drivers/iio/adc/da9150-gpadc.c 		return da9150_gpadc_read_scale(chan->channel, val, val2);
chan              240 drivers/iio/adc/da9150-gpadc.c 		return da9150_gpadc_read_offset(chan->channel, val);
chan               75 drivers/iio/adc/dln2-adc.c 	u8 chan;
chan              168 drivers/iio/adc/dln2-adc.c 		.chan = DLN2_ADC_DATA_BITS,
chan              185 drivers/iio/adc/dln2-adc.c 		.chan = channel,
chan              235 drivers/iio/adc/dln2-adc.c 		.port_chan.chan = channel,
chan              257 drivers/iio/adc/dln2-adc.c 		.chan = channel,
chan              329 drivers/iio/adc/dln2-adc.c 			     struct iio_chan_spec const *chan,
chan              341 drivers/iio/adc/dln2-adc.c 		ret = dln2_adc_read(dln2, chan->channel);
chan              377 drivers/iio/adc/dln2-adc.c 			      struct iio_chan_spec const *chan,
chan              188 drivers/iio/adc/envelope-detector.c 				      struct iio_chan_spec const *chan,
chan              525 drivers/iio/adc/exynos_adc.c 				struct iio_chan_spec const *chan,
chan              542 drivers/iio/adc/exynos_adc.c 		info->data->start_conv(info, chan->address);
chan               45 drivers/iio/adc/fsl-imx25-gcq.c #define MX25_CQG_CHAN(chan, id) {\
chan               48 drivers/iio/adc/fsl-imx25-gcq.c 	.channel = chan,\
chan               97 drivers/iio/adc/fsl-imx25-gcq.c 				  struct iio_chan_spec const *chan,
chan              106 drivers/iio/adc/fsl-imx25-gcq.c 		     MX25_ADCQ_ITEM(0, chan->channel));
chan              132 drivers/iio/adc/fsl-imx25-gcq.c 			     struct iio_chan_spec const *chan, int *val,
chan              141 drivers/iio/adc/fsl-imx25-gcq.c 		ret = mx25_gcq_get_raw_value(&indio_dev->dev, chan, priv, val);
chan              146 drivers/iio/adc/fsl-imx25-gcq.c 		*val = priv->channel_vref_mv[chan->channel];
chan              105 drivers/iio/adc/hi8435.c 			   const struct iio_chan_spec *chan,
chan              117 drivers/iio/adc/hi8435.c 		*val = !!(tmp & BIT(chan->channel));
chan              125 drivers/iio/adc/hi8435.c 				    const struct iio_chan_spec *chan,
chan              131 drivers/iio/adc/hi8435.c 	return !!(priv->event_scan_mask & BIT(chan->channel));
chan              135 drivers/iio/adc/hi8435.c 				     const struct iio_chan_spec *chan,
chan              147 drivers/iio/adc/hi8435.c 		if (tmp & BIT(chan->channel))
chan              148 drivers/iio/adc/hi8435.c 			priv->event_prev_val |= BIT(chan->channel);
chan              150 drivers/iio/adc/hi8435.c 			priv->event_prev_val &= ~BIT(chan->channel);
chan              152 drivers/iio/adc/hi8435.c 		priv->event_scan_mask |= BIT(chan->channel);
chan              154 drivers/iio/adc/hi8435.c 		priv->event_scan_mask &= ~BIT(chan->channel);
chan              160 drivers/iio/adc/hi8435.c 				   const struct iio_chan_spec *chan,
chan              176 drivers/iio/adc/hi8435.c 	mode = !!(psen & BIT(chan->channel / 8));
chan              192 drivers/iio/adc/hi8435.c 				    const struct iio_chan_spec *chan,
chan              208 drivers/iio/adc/hi8435.c 	mode = !!(psen & BIT(chan->channel / 8));
chan              303 drivers/iio/adc/hi8435.c 				   const struct iio_chan_spec *chan)
chan              313 drivers/iio/adc/hi8435.c 	return !!(reg & BIT(chan->channel / 8));
chan              317 drivers/iio/adc/hi8435.c 				   const struct iio_chan_spec *chan,
chan              332 drivers/iio/adc/hi8435.c 	reg &= ~BIT(chan->channel / 8);
chan              334 drivers/iio/adc/hi8435.c 		reg |= BIT(chan->channel / 8);
chan              226 drivers/iio/adc/hx711.c static int hx711_set_gain_for_channel(struct hx711_data *hx711_data, int chan)
chan              230 drivers/iio/adc/hx711.c 	if (chan == 0) {
chan              259 drivers/iio/adc/hx711.c static int hx711_reset_read(struct hx711_data *hx711_data, int chan)
chan              273 drivers/iio/adc/hx711.c 	ret = hx711_set_gain_for_channel(hx711_data, chan);
chan              283 drivers/iio/adc/hx711.c 				const struct iio_chan_spec *chan,
chan              292 drivers/iio/adc/hx711.c 		*val = hx711_reset_read(hx711_data, chan->channel);
chan              314 drivers/iio/adc/hx711.c 				struct iio_chan_spec const *chan,
chan              362 drivers/iio/adc/hx711.c 		struct iio_chan_spec const *chan,
chan              283 drivers/iio/adc/imx7d_adc.c 			struct iio_chan_spec const *chan,
chan              298 drivers/iio/adc/imx7d_adc.c 		channel = chan->channel & 0x03;
chan              173 drivers/iio/adc/ina2xx-adc.c 			   struct iio_chan_spec const *chan,
chan              182 drivers/iio/adc/ina2xx-adc.c 		ret = regmap_read(chip->regmap, chan->address, &regval);
chan              186 drivers/iio/adc/ina2xx-adc.c 		if (is_signed_reg(chan->address))
chan              191 drivers/iio/adc/ina2xx-adc.c 		if (chan->address == INA2XX_BUS_VOLTAGE)
chan              202 drivers/iio/adc/ina2xx-adc.c 		if (chan->address == INA2XX_SHUNT_VOLTAGE)
chan              219 drivers/iio/adc/ina2xx-adc.c 		switch (chan->address) {
chan              256 drivers/iio/adc/ina2xx-adc.c 		switch (chan->address) {
chan              445 drivers/iio/adc/ina2xx-adc.c 			     struct iio_chan_spec const *chan,
chan              451 drivers/iio/adc/ina2xx-adc.c 		switch (chan->address) {
chan              470 drivers/iio/adc/ina2xx-adc.c 			    struct iio_chan_spec const *chan,
chan              495 drivers/iio/adc/ina2xx-adc.c 			if (chan->address == INA2XX_SHUNT_VOLTAGE)
chan              502 drivers/iio/adc/ina2xx-adc.c 			if (chan->address == INA2XX_SHUNT_VOLTAGE)
chan              512 drivers/iio/adc/ina2xx-adc.c 		if (chan->address == INA2XX_SHUNT_VOLTAGE)
chan              112 drivers/iio/adc/ingenic-adc.c 				 struct iio_chan_spec const *chan,
chan              121 drivers/iio/adc/ingenic-adc.c 		switch (chan->channel) {
chan              218 drivers/iio/adc/ingenic-adc.c 				  struct iio_chan_spec const *chan,
chan              243 drivers/iio/adc/ingenic-adc.c 				struct iio_chan_spec const *chan,
chan              254 drivers/iio/adc/ingenic-adc.c 		ret = ingenic_adc_capture(adc, chan->channel);
chan              260 drivers/iio/adc/ingenic-adc.c 		switch (chan->channel) {
chan              273 drivers/iio/adc/ingenic-adc.c 		switch (chan->channel) {
chan               95 drivers/iio/adc/lp8788_adc.c 			struct iio_chan_spec const *chan,
chan               99 drivers/iio/adc/lp8788_adc.c 	enum lp8788_adc_id id = chan->channel;
chan               89 drivers/iio/adc/lpc18xx_adc.c 				struct iio_chan_spec const *chan,
chan               97 drivers/iio/adc/lpc18xx_adc.c 		*val = lpc18xx_adc_read_chan(adc, chan->channel);
chan               56 drivers/iio/adc/lpc32xx_adc.c 			    struct iio_chan_spec const *chan,
chan               73 drivers/iio/adc/lpc32xx_adc.c 		__raw_writel(LPC32XXAD_INTERNAL | (chan->address) |
chan               46 drivers/iio/adc/ltc2471.c 			    struct iio_chan_spec const *chan,
chan               61 drivers/iio/adc/ltc2471.c 		if (chan->differential)
chan               57 drivers/iio/adc/ltc2485.c 			    struct iio_chan_spec const *chan,
chan               99 drivers/iio/adc/ltc2497.c 			    struct iio_chan_spec const *chan,
chan              108 drivers/iio/adc/ltc2497.c 		ret = ltc2497_read(st, chan->address, val);
chan              216 drivers/iio/adc/max1027.c 				     struct iio_chan_spec const *chan,
chan              237 drivers/iio/adc/max1027.c 	st->reg = MAX1027_CONV_REG | MAX1027_CHAN(chan->channel) |
chan              239 drivers/iio/adc/max1027.c 	if (chan->type == IIO_TEMP)
chan              256 drivers/iio/adc/max1027.c 	ret = spi_read(st->spi, st->buffer, (chan->type == IIO_TEMP) ? 4 : 2);
chan              266 drivers/iio/adc/max1027.c 			    struct iio_chan_spec const *chan,
chan              276 drivers/iio/adc/max1027.c 		ret = max1027_read_single_value(indio_dev, chan, val);
chan              279 drivers/iio/adc/max1027.c 		switch (chan->type) {
chan               71 drivers/iio/adc/max11100.c 			     struct iio_chan_spec const *chan,
chan              127 drivers/iio/adc/max1118.c 			struct iio_chan_spec const *chan,
chan              135 drivers/iio/adc/max1118.c 		*val = max1118_read(adc->spi, chan->channel);
chan              357 drivers/iio/adc/max1363.c 				    struct iio_chan_spec const *chan,
chan              381 drivers/iio/adc/max1363.c 	if (st->current_mode != &max1363_mode_table[chan->address]) {
chan              383 drivers/iio/adc/max1363.c 		st->current_mode = &max1363_mode_table[chan->address];
chan              414 drivers/iio/adc/max1363.c 			    struct iio_chan_spec const *chan,
chan              424 drivers/iio/adc/max1363.c 		ret = max1363_read_single_chan(indio_dev, chan, val, m);
chan              723 drivers/iio/adc/max1363.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              729 drivers/iio/adc/max1363.c 		*val = st->thresh_low[chan->channel];
chan              731 drivers/iio/adc/max1363.c 		*val = st->thresh_high[chan->channel];
chan              736 drivers/iio/adc/max1363.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              755 drivers/iio/adc/max1363.c 		st->thresh_low[chan->channel] = val;
chan              758 drivers/iio/adc/max1363.c 		st->thresh_high[chan->channel] = val;
chan              806 drivers/iio/adc/max1363.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              811 drivers/iio/adc/max1363.c 	int number = chan->channel;
chan              957 drivers/iio/adc/max1363.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              963 drivers/iio/adc/max1363.c 	int number = chan->channel;
chan              302 drivers/iio/adc/max9611.c 			    struct iio_chan_spec const *chan,
chan              314 drivers/iio/adc/max9611.c 		switch (chan->address) {
chan              344 drivers/iio/adc/max9611.c 		switch (chan->address) {
chan              361 drivers/iio/adc/max9611.c 		switch (chan->address) {
chan              254 drivers/iio/adc/mcp3422.c 		struct iio_chan_spec const *chan, long mask)
chan               48 drivers/iio/adc/men_z188_adc.c 			struct iio_chan_spec const *chan,
chan               59 drivers/iio/adc/men_z188_adc.c 		tmp = readw(adc->base + chan->channel * 4);
chan               64 drivers/iio/adc/men_z188_adc.c 				chan->channel);
chan              344 drivers/iio/adc/meson_saradc.c 					 const struct iio_chan_spec *chan,
chan              363 drivers/iio/adc/meson_saradc.c 	if (fifo_chan != chan->address) {
chan              366 drivers/iio/adc/meson_saradc.c 			fifo_chan, chan->address);
chan              378 drivers/iio/adc/meson_saradc.c 					const struct iio_chan_spec *chan,
chan              383 drivers/iio/adc/meson_saradc.c 	int val, address = chan->address;
chan              396 drivers/iio/adc/meson_saradc.c 					const struct iio_chan_spec *chan)
chan              412 drivers/iio/adc/meson_saradc.c 			    chan->address);
chan              417 drivers/iio/adc/meson_saradc.c 			    chan->address);
chan              423 drivers/iio/adc/meson_saradc.c 			    chan->address);
chan              428 drivers/iio/adc/meson_saradc.c 	if (chan->address == MESON_SAR_ADC_VOLTAGE_AND_TEMP_CHANNEL) {
chan              429 drivers/iio/adc/meson_saradc.c 		if (chan->type == IIO_TEMP)
chan              547 drivers/iio/adc/meson_saradc.c 				    const struct iio_chan_spec *chan,
chan              555 drivers/iio/adc/meson_saradc.c 	if (chan->type == IIO_TEMP && !priv->temperature_sensor_calibrated)
chan              565 drivers/iio/adc/meson_saradc.c 	meson_sar_adc_set_averaging(indio_dev, chan, avg_mode, avg_samples);
chan              567 drivers/iio/adc/meson_saradc.c 	meson_sar_adc_enable_channel(indio_dev, chan);
chan              570 drivers/iio/adc/meson_saradc.c 	ret = meson_sar_adc_read_raw_sample(indio_dev, chan, val);
chan              578 drivers/iio/adc/meson_saradc.c 			 chan->address, ret);
chan              586 drivers/iio/adc/meson_saradc.c 					   const struct iio_chan_spec *chan,
chan              594 drivers/iio/adc/meson_saradc.c 		return meson_sar_adc_get_sample(indio_dev, chan, NO_AVERAGING,
chan              599 drivers/iio/adc/meson_saradc.c 		return meson_sar_adc_get_sample(indio_dev, chan,
chan              605 drivers/iio/adc/meson_saradc.c 		if (chan->type == IIO_VOLTAGE) {
chan              617 drivers/iio/adc/meson_saradc.c 		} else if (chan->type == IIO_TEMP) {
chan              102 drivers/iio/adc/mt6577_auxadc.c 			      struct iio_chan_spec const *chan)
chan              110 drivers/iio/adc/mt6577_auxadc.c 		      chan->channel * 0x04;
chan              115 drivers/iio/adc/mt6577_auxadc.c 			      0, 1 << chan->channel);
chan              125 drivers/iio/adc/mt6577_auxadc.c 			chan->channel);
chan              131 drivers/iio/adc/mt6577_auxadc.c 			      1 << chan->channel, 0);
chan              157 drivers/iio/adc/mt6577_auxadc.c 			chan->channel);
chan              176 drivers/iio/adc/mt6577_auxadc.c 				  struct iio_chan_spec const *chan,
chan              185 drivers/iio/adc/mt6577_auxadc.c 		*val = mt6577_auxadc_read(indio_dev, chan);
chan              189 drivers/iio/adc/mt6577_auxadc.c 				chan->channel);
chan              130 drivers/iio/adc/mxs-lradc-adc.c static int mxs_lradc_adc_read_single(struct iio_dev *iio_dev, int chan,
chan              160 drivers/iio/adc/mxs-lradc-adc.c 	if (test_bit(chan, &adc->is_divided))
chan              170 drivers/iio/adc/mxs-lradc-adc.c 	writel(chan, adc->base + LRADC_CTRL4 + STMP_OFFSET_REG_SET);
chan              217 drivers/iio/adc/mxs-lradc-adc.c 			      const struct iio_chan_spec *chan,
chan              224 drivers/iio/adc/mxs-lradc-adc.c 		if (chan->type == IIO_TEMP)
chan              227 drivers/iio/adc/mxs-lradc-adc.c 		return mxs_lradc_adc_read_single(iio_dev, chan->channel, val);
chan              230 drivers/iio/adc/mxs-lradc-adc.c 		if (chan->type == IIO_TEMP) {
chan              240 drivers/iio/adc/mxs-lradc-adc.c 		*val = adc->vref_mv[chan->channel];
chan              241 drivers/iio/adc/mxs-lradc-adc.c 		*val2 = chan->scan_type.realbits -
chan              242 drivers/iio/adc/mxs-lradc-adc.c 			test_bit(chan->channel, &adc->is_divided);
chan              246 drivers/iio/adc/mxs-lradc-adc.c 		if (chan->type == IIO_TEMP) {
chan              269 drivers/iio/adc/mxs-lradc-adc.c 				   const struct iio_chan_spec *chan,
chan              274 drivers/iio/adc/mxs-lradc-adc.c 			adc->scale_avail[chan->channel];
chan              287 drivers/iio/adc/mxs-lradc-adc.c 			clear_bit(chan->channel, &adc->is_divided);
chan              292 drivers/iio/adc/mxs-lradc-adc.c 			set_bit(chan->channel, &adc->is_divided);
chan              308 drivers/iio/adc/mxs-lradc-adc.c 					   const struct iio_chan_spec *chan,
chan              486 drivers/iio/adc/mxs-lradc-adc.c 	int chan, ofs = 0;
chan              500 drivers/iio/adc/mxs-lradc-adc.c 	for_each_set_bit(chan, iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS) {
chan              501 drivers/iio/adc/mxs-lradc-adc.c 		ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
chan               63 drivers/iio/adc/nau7802.c #define NAU7802_CHANNEL(chan) {					\
chan               66 drivers/iio/adc/nau7802.c 	.channel = (chan),					\
chan               67 drivers/iio/adc/nau7802.c 	.scan_index = (chan),					\
chan              205 drivers/iio/adc/nau7802.c 			struct iio_chan_spec const *chan,
chan              243 drivers/iio/adc/nau7802.c 			struct iio_chan_spec const *chan,
chan              290 drivers/iio/adc/nau7802.c 			    struct iio_chan_spec const *chan,
chan              310 drivers/iio/adc/nau7802.c 		if (((ret & NAU7802_CTRL2_CHS_BIT) && !chan->channel) ||
chan              312 drivers/iio/adc/nau7802.c 				 chan->channel)) {
chan              316 drivers/iio/adc/nau7802.c 					NAU7802_CTRL2_CHS(chan->channel) |
chan              326 drivers/iio/adc/nau7802.c 			ret = nau7802_read_irq(indio_dev, chan, val);
chan              328 drivers/iio/adc/nau7802.c 			ret = nau7802_read_poll(indio_dev, chan, val);
chan              360 drivers/iio/adc/nau7802.c 			     struct iio_chan_spec const *chan,
chan              397 drivers/iio/adc/nau7802.c 				     struct iio_chan_spec const *chan,
chan              134 drivers/iio/adc/npcm_adc.c 			     struct iio_chan_spec const *chan, int *val,
chan              144 drivers/iio/adc/npcm_adc.c 		ret = npcm_adc_read(info, val, chan->channel);
chan              383 drivers/iio/adc/palmas_gpadc.c 	struct iio_chan_spec const *chan, int *val, int *val2, long mask)
chan              386 drivers/iio/adc/palmas_gpadc.c 	int adc_chan = chan->channel;
chan              432 drivers/iio/adc/palmas_gpadc.c #define PALMAS_ADC_CHAN_IIO(chan, _type, chan_info)	\
chan              434 drivers/iio/adc/palmas_gpadc.c 	.datasheet_name = PALMAS_DATASHEET_NAME(chan),	\
chan              439 drivers/iio/adc/palmas_gpadc.c 	.channel = PALMAS_ADC_CH_##chan,		\
chan              425 drivers/iio/adc/qcom-pm8xxx-xoadc.c pm8xxx_get_channel(struct pm8xxx_xoadc *adc, u8 chan)
chan              431 drivers/iio/adc/qcom-pm8xxx-xoadc.c 		if (ch->hwchan->amux_channel == chan)
chan              648 drivers/iio/adc/qcom-pm8xxx-xoadc.c 			   struct iio_chan_spec const *chan,
chan              658 drivers/iio/adc/qcom-pm8xxx-xoadc.c 		ch = pm8xxx_get_channel(adc, chan->address);
chan              661 drivers/iio/adc/qcom-pm8xxx-xoadc.c 				chan->address);
chan              678 drivers/iio/adc/qcom-pm8xxx-xoadc.c 		ch = pm8xxx_get_channel(adc, chan->address);
chan              681 drivers/iio/adc/qcom-pm8xxx-xoadc.c 				chan->address);
chan              319 drivers/iio/adc/qcom-spmi-adc5.c 			struct iio_chan_spec const *chan,
chan              381 drivers/iio/adc/qcom-spmi-adc5.c 			 struct iio_chan_spec const *chan, int *val, int *val2,
chan              389 drivers/iio/adc/qcom-spmi-adc5.c 	prop = &adc->chan_props[chan->address];
chan              393 drivers/iio/adc/qcom-spmi-adc5.c 		ret = adc5_do_conversion(adc, prop, chan,
chan              513 drivers/iio/adc/qcom-spmi-adc5.c 	u32 chan, value, varr[2];
chan              517 drivers/iio/adc/qcom-spmi-adc5.c 	ret = of_property_read_u32(node, "reg", &chan);
chan              523 drivers/iio/adc/qcom-spmi-adc5.c 	if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA ||
chan              524 drivers/iio/adc/qcom-spmi-adc5.c 	    !data->adc_chans[chan].datasheet_name) {
chan              525 drivers/iio/adc/qcom-spmi-adc5.c 		dev_err(dev, "%s invalid channel number %d\n", name, chan);
chan              530 drivers/iio/adc/qcom-spmi-adc5.c 	prop->channel = chan;
chan              545 drivers/iio/adc/qcom-spmi-adc5.c 				chan, value);
chan              558 drivers/iio/adc/qcom-spmi-adc5.c 				chan, varr[0], varr[1]);
chan              591 drivers/iio/adc/qcom-spmi-adc5.c 				chan, value);
chan              604 drivers/iio/adc/qcom-spmi-adc5.c 				chan, value);
chan              623 drivers/iio/adc/qcom-spmi-adc5.c 	dev_dbg(dev, "%02x name %s\n", chan, name);
chan              165 drivers/iio/adc/qcom-spmi-iadc.c 	u8 mode, sta1, chan, dig, en, req;
chan              176 drivers/iio/adc/qcom-spmi-iadc.c 	ret = iadc_read(iadc, IADC_CH_SEL_CTL, &chan);
chan              194 drivers/iio/adc/qcom-spmi-iadc.c 		mode, en, chan, dig, req, sta1);
chan              277 drivers/iio/adc/qcom-spmi-iadc.c static int iadc_do_conversion(struct iadc_chip *iadc, int chan, u16 *data)
chan              282 drivers/iio/adc/qcom-spmi-iadc.c 	ret = iadc_configure(iadc, chan);
chan              311 drivers/iio/adc/qcom-spmi-iadc.c 			 struct iio_chan_spec const *chan,
chan              322 drivers/iio/adc/qcom-spmi-iadc.c 		ret = iadc_do_conversion(iadc, chan->channel, &adc_raw);
chan              327 drivers/iio/adc/qcom-spmi-iadc.c 		vsense_raw = adc_raw - iadc->offset[chan->channel];
chan              330 drivers/iio/adc/qcom-spmi-iadc.c 		vsense_uv /= (s32)iadc->gain - iadc->offset[chan->channel];
chan              332 drivers/iio/adc/qcom-spmi-iadc.c 		isense_ua = vsense_uv / iadc->rsense[chan->channel];
chan              335 drivers/iio/adc/qcom-spmi-iadc.c 			iadc->offset[chan->channel], iadc->gain,
chan              176 drivers/iio/adc/qcom-spmi-vadc.c 	u8 mode, sta1, chan, dig, en, req;
chan              187 drivers/iio/adc/qcom-spmi-vadc.c 	ret = vadc_read(vadc, VADC_ADC_CH_SEL_CTL, &chan);
chan              205 drivers/iio/adc/qcom-spmi-vadc.c 		mode, en, chan, dig, req, sta1);
chan              445 drivers/iio/adc/qcom-spmi-vadc.c 			 struct iio_chan_spec const *chan, int *val, int *val2,
chan              455 drivers/iio/adc/qcom-spmi-vadc.c 		prop = &vadc->chan_props[chan->address];
chan              470 drivers/iio/adc/qcom-spmi-vadc.c 		prop = &vadc->chan_props[chan->address];
chan              656 drivers/iio/adc/qcom-spmi-vadc.c 	u32 chan, value, varr[2];
chan              659 drivers/iio/adc/qcom-spmi-vadc.c 	ret = of_property_read_u32(node, "reg", &chan);
chan              665 drivers/iio/adc/qcom-spmi-vadc.c 	if (chan > VADC_CHAN_MAX || chan < VADC_CHAN_MIN) {
chan              666 drivers/iio/adc/qcom-spmi-vadc.c 		dev_err(dev, "%s invalid channel number %d\n", name, chan);
chan              671 drivers/iio/adc/qcom-spmi-vadc.c 	prop->channel = chan;
chan              678 drivers/iio/adc/qcom-spmi-vadc.c 				chan, value);
chan              691 drivers/iio/adc/qcom-spmi-vadc.c 				chan, varr[0], varr[1]);
chan              704 drivers/iio/adc/qcom-spmi-vadc.c 				chan, value);
chan              717 drivers/iio/adc/qcom-spmi-vadc.c 				chan, value);
chan              730 drivers/iio/adc/qcom-spmi-vadc.c 	dev_dbg(dev, "%02x name %s\n", chan, name);
chan              180 drivers/iio/adc/rcar-gyroadc.c 				 struct iio_chan_spec const *chan,
chan              185 drivers/iio/adc/rcar-gyroadc.c 	unsigned int datareg = RCAR_GYROADC_REALTIME_DATA(chan->channel);
chan              196 drivers/iio/adc/rcar-gyroadc.c 		consumer = priv->vref[chan->channel];
chan              200 drivers/iio/adc/rcar-gyroadc.c 		if (chan->type != IIO_VOLTAGE)
chan               55 drivers/iio/adc/rockchip_saradc.c 				    struct iio_chan_spec const *chan,
chan               72 drivers/iio/adc/rockchip_saradc.c 				| (chan->channel & SARADC_CTRL_CHN_MASK)
chan              327 drivers/iio/adc/sc27xx_adc.c 			       struct iio_chan_spec const *chan,
chan              331 drivers/iio/adc/sc27xx_adc.c 	int scale = data->channel_scale[chan->channel];
chan              337 drivers/iio/adc/sc27xx_adc.c 		ret = sc27xx_adc_read(data, chan->channel, scale, &tmp);
chan              348 drivers/iio/adc/sc27xx_adc.c 		ret = sc27xx_adc_read_processed(data, chan->channel, scale,
chan              368 drivers/iio/adc/sc27xx_adc.c 				struct iio_chan_spec const *chan,
chan              375 drivers/iio/adc/sc27xx_adc.c 		data->channel_scale[chan->channel] = val;
chan              139 drivers/iio/adc/spear_adc.c 			      struct iio_chan_spec const *chan,
chan              151 drivers/iio/adc/spear_adc.c 		status = SPEAR_ADC_STATUS_CHANNEL_NUM(chan->channel) |
chan              179 drivers/iio/adc/spear_adc.c 			       struct iio_chan_spec const *chan,
chan              956 drivers/iio/adc/stm32-adc.c 	const struct iio_chan_spec *chan;
chan              965 drivers/iio/adc/stm32-adc.c 		chan = indio_dev->channels + bit;
chan              975 drivers/iio/adc/stm32-adc.c 			__func__, chan->channel, i);
chan              979 drivers/iio/adc/stm32-adc.c 		val |= chan->channel << sqr[i].shift;
chan             1062 drivers/iio/adc/stm32-adc.c 				  const struct iio_chan_spec *chan,
chan             1073 drivers/iio/adc/stm32-adc.c 				  const struct iio_chan_spec *chan)
chan             1104 drivers/iio/adc/stm32-adc.c 				 const struct iio_chan_spec *chan,
chan             1131 drivers/iio/adc/stm32-adc.c 	val |= chan->channel << regs->sqr[1].shift;
chan             1166 drivers/iio/adc/stm32-adc.c 			      struct iio_chan_spec const *chan,
chan             1177 drivers/iio/adc/stm32-adc.c 		if (chan->type == IIO_VOLTAGE)
chan             1178 drivers/iio/adc/stm32-adc.c 			ret = stm32_adc_single_conv(indio_dev, chan, val);
chan             1185 drivers/iio/adc/stm32-adc.c 		if (chan->differential) {
chan             1187 drivers/iio/adc/stm32-adc.c 			*val2 = chan->scan_type.realbits;
chan             1190 drivers/iio/adc/stm32-adc.c 			*val2 = chan->scan_type.realbits;
chan             1195 drivers/iio/adc/stm32-adc.c 		if (chan->differential)
chan             1197 drivers/iio/adc/stm32-adc.c 			*val = -((1 << chan->scan_type.realbits) / 2);
chan             1620 drivers/iio/adc/stm32-adc.c 				    struct iio_chan_spec *chan, u32 vinp,
chan             1626 drivers/iio/adc/stm32-adc.c 	chan->type = IIO_VOLTAGE;
chan             1627 drivers/iio/adc/stm32-adc.c 	chan->channel = vinp;
chan             1629 drivers/iio/adc/stm32-adc.c 		chan->differential = 1;
chan             1630 drivers/iio/adc/stm32-adc.c 		chan->channel2 = vinn;
chan             1635 drivers/iio/adc/stm32-adc.c 	chan->datasheet_name = name;
chan             1636 drivers/iio/adc/stm32-adc.c 	chan->scan_index = scan_index;
chan             1637 drivers/iio/adc/stm32-adc.c 	chan->indexed = 1;
chan             1638 drivers/iio/adc/stm32-adc.c 	chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan             1639 drivers/iio/adc/stm32-adc.c 	chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |
chan             1641 drivers/iio/adc/stm32-adc.c 	chan->scan_type.sign = 'u';
chan             1642 drivers/iio/adc/stm32-adc.c 	chan->scan_type.realbits = adc->cfg->adc_info->resolutions[adc->res];
chan             1643 drivers/iio/adc/stm32-adc.c 	chan->scan_type.storagebits = 16;
chan             1644 drivers/iio/adc/stm32-adc.c 	chan->ext_info = stm32_adc_ext_info;
chan             1647 drivers/iio/adc/stm32-adc.c 	adc->pcsel |= BIT(chan->channel);
chan             1650 drivers/iio/adc/stm32-adc.c 		adc->difsel |= BIT(chan->channel);
chan             1652 drivers/iio/adc/stm32-adc.c 		adc->pcsel |= BIT(chan->channel2);
chan              337 drivers/iio/adc/stm32-dfsdm-adc.c 	const struct iio_chan_spec *chan;
chan              342 drivers/iio/adc/stm32-dfsdm-adc.c 		chan = indio_dev->channels + bit;
chan              343 drivers/iio/adc/stm32-dfsdm-adc.c 		ret = regmap_update_bits(regmap, DFSDM_CHCFGR1(chan->channel),
chan              357 drivers/iio/adc/stm32-dfsdm-adc.c 	const struct iio_chan_spec *chan;
chan              361 drivers/iio/adc/stm32-dfsdm-adc.c 		chan = indio_dev->channels + bit;
chan              362 drivers/iio/adc/stm32-dfsdm-adc.c 		regmap_update_bits(regmap, DFSDM_CHCFGR1(chan->channel),
chan              458 drivers/iio/adc/stm32-dfsdm-adc.c 	const struct iio_chan_spec *chan;
chan              481 drivers/iio/adc/stm32-dfsdm-adc.c 		chan = indio_dev->channels + bit;
chan              484 drivers/iio/adc/stm32-dfsdm-adc.c 					 DFSDM_CHCFGR2(chan->channel),
chan              503 drivers/iio/adc/stm32-dfsdm-adc.c 	const struct iio_chan_spec *chan;
chan              555 drivers/iio/adc/stm32-dfsdm-adc.c 		chan = indio_dev->channels + bit;
chan              558 drivers/iio/adc/stm32-dfsdm-adc.c 		cr1 = DFSDM_CR1_RCH(chan->channel);
chan              569 drivers/iio/adc/stm32-dfsdm-adc.c 			chan = indio_dev->channels + bit;
chan              570 drivers/iio/adc/stm32-dfsdm-adc.c 			jchg |= BIT(chan->channel);
chan              667 drivers/iio/adc/stm32-dfsdm-adc.c 					  const struct iio_chan_spec *chan,
chan              701 drivers/iio/adc/stm32-dfsdm-adc.c 					  const struct iio_chan_spec *chan,
chan              705 drivers/iio/adc/stm32-dfsdm-adc.c 	struct stm32_dfsdm_channel *ch = &adc->dfsdm->ch_list[chan->channel];
chan             1141 drivers/iio/adc/stm32-dfsdm-adc.c 				   const struct iio_chan_spec *chan, int *res)
chan             1161 drivers/iio/adc/stm32-dfsdm-adc.c 	adc->smask = BIT(chan->scan_index);
chan             1194 drivers/iio/adc/stm32-dfsdm-adc.c 				 struct iio_chan_spec const *chan,
chan             1198 drivers/iio/adc/stm32-dfsdm-adc.c 	struct stm32_dfsdm_channel *ch = &adc->dfsdm->ch_list[chan->channel];
chan             1242 drivers/iio/adc/stm32-dfsdm-adc.c 				struct iio_chan_spec const *chan, int *val,
chan             1257 drivers/iio/adc/stm32-dfsdm-adc.c 				__func__, chan->channel);
chan             1261 drivers/iio/adc/stm32-dfsdm-adc.c 		ret = stm32_dfsdm_single_conv(indio_dev, chan, val);
chan             1266 drivers/iio/adc/stm32-dfsdm-adc.c 				__func__, chan->channel);
chan             1674 drivers/iio/adc/stm32-dfsdm-adc.c 	const struct iio_chan_spec *chan;
chan             1680 drivers/iio/adc/stm32-dfsdm-adc.c 		chan = indio_dev->channels + i;
chan             1681 drivers/iio/adc/stm32-dfsdm-adc.c 		ch = &adc->dfsdm->ch_list[chan->channel];
chan               62 drivers/iio/adc/stmpe-adc.c 		struct iio_chan_spec const *chan, int *val)
chan               70 drivers/iio/adc/stmpe-adc.c 	info->channel = (u8)chan->channel;
chan               97 drivers/iio/adc/stmpe-adc.c 		struct iio_chan_spec const *chan, int *val)
chan              105 drivers/iio/adc/stmpe-adc.c 	info->channel = (u8)chan->channel;
chan              134 drivers/iio/adc/stmpe-adc.c 			  struct iio_chan_spec const *chan,
chan              146 drivers/iio/adc/stmpe-adc.c 		switch (chan->type) {
chan              148 drivers/iio/adc/stmpe-adc.c 			ret = stmpe_read_voltage(info, chan, val);
chan              152 drivers/iio/adc/stmpe-adc.c 			ret = stmpe_read_temp(info, chan, val);
chan              212 drivers/iio/adc/stmpe-adc.c static void stmpe_adc_voltage_chan(struct iio_chan_spec *ics, int chan)
chan              218 drivers/iio/adc/stmpe-adc.c 	ics->channel = chan;
chan              221 drivers/iio/adc/stmpe-adc.c static void stmpe_adc_temp_chan(struct iio_chan_spec *ics, int chan)
chan              226 drivers/iio/adc/stmpe-adc.c 	ics->channel = chan;
chan               20 drivers/iio/adc/stx104.c #define STX104_OUT_CHAN(chan) {				\
chan               22 drivers/iio/adc/stx104.c 	.channel = chan,				\
chan               27 drivers/iio/adc/stx104.c #define STX104_IN_CHAN(chan, diff) {					\
chan               29 drivers/iio/adc/stx104.c 	.channel = chan,						\
chan               30 drivers/iio/adc/stx104.c 	.channel2 = chan,						\
chan               72 drivers/iio/adc/stx104.c 	struct iio_chan_spec const *chan, int *val, int *val2, long mask)
chan               88 drivers/iio/adc/stx104.c 		if (chan->output) {
chan               89 drivers/iio/adc/stx104.c 			*val = priv->chan_out_states[chan->channel];
chan               94 drivers/iio/adc/stx104.c 		outb(chan->channel | (chan->channel << 4), priv->base + 2);
chan              124 drivers/iio/adc/stx104.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              150 drivers/iio/adc/stx104.c 		if (chan->output) {
chan              155 drivers/iio/adc/stx104.c 			priv->chan_out_states[chan->channel] = val;
chan              156 drivers/iio/adc/stx104.c 			outw(val, priv->base + 4 + 2 * chan->channel);
chan               39 drivers/iio/adc/sun4i-gpadc-iio.c static unsigned int sun4i_gpadc_chan_select(unsigned int chan)
chan               41 drivers/iio/adc/sun4i-gpadc-iio.c 	return SUN4I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
chan               44 drivers/iio/adc/sun4i-gpadc-iio.c static unsigned int sun6i_gpadc_chan_select(unsigned int chan)
chan               46 drivers/iio/adc/sun4i-gpadc-iio.c 	return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
chan               54 drivers/iio/adc/sun4i-gpadc-iio.c 	unsigned int	(*adc_chan_select)(unsigned int chan);
chan              307 drivers/iio/adc/sun4i-gpadc-iio.c 				struct iio_chan_spec const *chan, int *val,
chan              320 drivers/iio/adc/sun4i-gpadc-iio.c 		if (chan->type == IIO_VOLTAGE)
chan              321 drivers/iio/adc/sun4i-gpadc-iio.c 			ret = sun4i_gpadc_adc_read(indio_dev, chan->channel,
chan              331 drivers/iio/adc/sun4i-gpadc-iio.c 		if (chan->type == IIO_VOLTAGE) {
chan               36 drivers/iio/adc/ti-adc0832.c #define ADC0832_VOLTAGE_CHANNEL(chan)					\
chan               40 drivers/iio/adc/ti-adc0832.c 		.channel = chan,					\
chan               43 drivers/iio/adc/ti-adc0832.c 		.scan_index = chan,					\
chan              175 drivers/iio/adc/ti-adc108s102.c 			       struct iio_chan_spec const *chan,
chan              187 drivers/iio/adc/ti-adc108s102.c 		ret = adc108s102_scan_direct(st, chan->address);
chan              198 drivers/iio/adc/ti-adc108s102.c 		if (chan->type != IIO_VOLTAGE)
chan              202 drivers/iio/adc/ti-adc108s102.c 		*val2 = chan->scan_type.realbits;
chan               55 drivers/iio/adc/ti-adc12138.c #define ADC12138_VOLTAGE_CHANNEL(chan)					\
chan               59 drivers/iio/adc/ti-adc12138.c 		.channel = chan,					\
chan               63 drivers/iio/adc/ti-adc12138.c 		.scan_index = chan,					\
chan               77 drivers/iio/adc/ti-adc161s626.c 				   struct iio_chan_spec const *chan, int *val)
chan              106 drivers/iio/adc/ti-adc161s626.c 	*val = sign_extend32(*val >> data->shift, chan->scan_type.realbits - 1);
chan              131 drivers/iio/adc/ti-adc161s626.c 			   struct iio_chan_spec const *chan,
chan              143 drivers/iio/adc/ti-adc161s626.c 		ret = ti_adc_read_measurement(data, chan, val);
chan              156 drivers/iio/adc/ti-adc161s626.c 		*val2 = chan->scan_type.realbits;
chan              160 drivers/iio/adc/ti-adc161s626.c 		*val = 1 << (chan->scan_type.realbits - 1);
chan              255 drivers/iio/adc/ti-ads1015.c static void ads1015_event_channel_enable(struct ads1015_data *data, int chan,
chan              260 drivers/iio/adc/ti-ads1015.c 	data->event_channel = chan;
chan              264 drivers/iio/adc/ti-ads1015.c static void ads1015_event_channel_disable(struct ads1015_data *data, int chan)
chan              330 drivers/iio/adc/ti-ads1015.c int ads1015_get_adc_result(struct ads1015_data *data, int chan, int *val)
chan              335 drivers/iio/adc/ti-ads1015.c 	if (chan < 0 || chan >= ADS1015_CHANNELS)
chan              342 drivers/iio/adc/ti-ads1015.c 	pga = data->channel_data[chan].pga;
chan              343 drivers/iio/adc/ti-ads1015.c 	dr = data->channel_data[chan].data_rate;
chan              346 drivers/iio/adc/ti-ads1015.c 	cfg = chan << ADS1015_CFG_MUX_SHIFT | pga << ADS1015_CFG_PGA_SHIFT |
chan              351 drivers/iio/adc/ti-ads1015.c 		cfg |= data->thresh_data[chan].comp_queue <<
chan              382 drivers/iio/adc/ti-ads1015.c 	int chan, ret, res;
chan              387 drivers/iio/adc/ti-ads1015.c 	chan = find_first_bit(indio_dev->active_scan_mask,
chan              389 drivers/iio/adc/ti-ads1015.c 	ret = ads1015_get_adc_result(data, chan, &res);
chan              408 drivers/iio/adc/ti-ads1015.c 			     struct iio_chan_spec const *chan,
chan              413 drivers/iio/adc/ti-ads1015.c 				(chan->scan_type.realbits - 1), 1000000);
chan              417 drivers/iio/adc/ti-ads1015.c 			data->channel_data[chan->address].pga = i;
chan              425 drivers/iio/adc/ti-ads1015.c static int ads1015_set_data_rate(struct ads1015_data *data, int chan, int rate)
chan              431 drivers/iio/adc/ti-ads1015.c 			data->channel_data[chan].data_rate = i;
chan              440 drivers/iio/adc/ti-ads1015.c 			    struct iio_chan_spec const *chan, int *val,
chan              449 drivers/iio/adc/ti-ads1015.c 		int shift = chan->scan_type.shift;
chan              456 drivers/iio/adc/ti-ads1015.c 				data->event_channel != chan->address) {
chan              465 drivers/iio/adc/ti-ads1015.c 		ret = ads1015_get_adc_result(data, chan->address, val);
chan              483 drivers/iio/adc/ti-ads1015.c 		idx = data->channel_data[chan->address].pga;
chan              485 drivers/iio/adc/ti-ads1015.c 		*val2 = chan->scan_type.realbits - 1;
chan              489 drivers/iio/adc/ti-ads1015.c 		idx = data->channel_data[chan->address].data_rate;
chan              503 drivers/iio/adc/ti-ads1015.c 			     struct iio_chan_spec const *chan, int val,
chan              512 drivers/iio/adc/ti-ads1015.c 		ret = ads1015_set_scale(data, chan, val, val2);
chan              515 drivers/iio/adc/ti-ads1015.c 		ret = ads1015_set_data_rate(data, chan->address, val);
chan              527 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              542 drivers/iio/adc/ti-ads1015.c 			data->thresh_data[chan->address].high_thresh :
chan              543 drivers/iio/adc/ti-ads1015.c 			data->thresh_data[chan->address].low_thresh;
chan              547 drivers/iio/adc/ti-ads1015.c 		dr = data->channel_data[chan->address].data_rate;
chan              548 drivers/iio/adc/ti-ads1015.c 		comp_queue = data->thresh_data[chan->address].comp_queue;
chan              567 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              572 drivers/iio/adc/ti-ads1015.c 	int realbits = chan->scan_type.realbits;
chan              587 drivers/iio/adc/ti-ads1015.c 			data->thresh_data[chan->address].high_thresh = val;
chan              589 drivers/iio/adc/ti-ads1015.c 			data->thresh_data[chan->address].low_thresh = val;
chan              592 drivers/iio/adc/ti-ads1015.c 		dr = data->channel_data[chan->address].data_rate;
chan              600 drivers/iio/adc/ti-ads1015.c 		data->thresh_data[chan->address].comp_queue = i;
chan              613 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              620 drivers/iio/adc/ti-ads1015.c 	if (data->event_channel == chan->address) {
chan              639 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, int comp_mode)
chan              641 drivers/iio/adc/ti-ads1015.c 	int low_thresh = data->thresh_data[chan->address].low_thresh;
chan              642 drivers/iio/adc/ti-ads1015.c 	int high_thresh = data->thresh_data[chan->address].high_thresh;
chan              647 drivers/iio/adc/ti-ads1015.c 		if (data->event_channel != chan->address ||
chan              656 drivers/iio/adc/ti-ads1015.c 		low_thresh = max(-1 << (chan->scan_type.realbits - 1),
chan              660 drivers/iio/adc/ti-ads1015.c 			low_thresh << chan->scan_type.shift);
chan              665 drivers/iio/adc/ti-ads1015.c 			high_thresh << chan->scan_type.shift);
chan              673 drivers/iio/adc/ti-ads1015.c 	ads1015_event_channel_enable(data, chan->address, comp_mode);
chan              675 drivers/iio/adc/ti-ads1015.c 	ret = ads1015_get_adc_result(data, chan->address, &val);
chan              677 drivers/iio/adc/ti-ads1015.c 		ads1015_event_channel_disable(data, chan->address);
chan              685 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, int comp_mode)
chan              692 drivers/iio/adc/ti-ads1015.c 	if (data->event_channel != chan->address)
chan              706 drivers/iio/adc/ti-ads1015.c 	ads1015_event_channel_disable(data, chan->address);
chan              712 drivers/iio/adc/ti-ads1015.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              730 drivers/iio/adc/ti-ads1015.c 		ret = ads1015_enable_event_config(data, chan, comp_mode);
chan              732 drivers/iio/adc/ti-ads1015.c 		ret = ads1015_disable_event_config(data, chan, comp_mode);
chan              187 drivers/iio/adc/ti-ads124s08.c static int ads124s_read(struct iio_dev *indio_dev, unsigned int chan)
chan              217 drivers/iio/adc/ti-ads124s08.c 			    struct iio_chan_spec const *chan,
chan              227 drivers/iio/adc/ti-ads124s08.c 					chan->channel);
chan              239 drivers/iio/adc/ti-ads124s08.c 		ret = ads124s_read(indio_dev, chan->channel);
chan              368 drivers/iio/adc/ti-ads7950.c 			       struct iio_chan_spec const *chan,
chan              376 drivers/iio/adc/ti-ads7950.c 		ret = ti_ads7950_scan_direct(indio_dev, chan->address);
chan              380 drivers/iio/adc/ti-ads7950.c 		if (chan->address != TI_ADS7950_EXTRACT(ret, 12, 4))
chan              383 drivers/iio/adc/ti-ads7950.c 		*val = TI_ADS7950_EXTRACT(ret, chan->scan_type.shift,
chan              384 drivers/iio/adc/ti-ads7950.c 					  chan->scan_type.realbits);
chan              393 drivers/iio/adc/ti-ads7950.c 		*val2 = (1 << chan->scan_type.realbits) - 1;
chan               35 drivers/iio/adc/ti-ads8344.c #define ADS8344_VOLTAGE_CHANNEL(chan, addr)				\
chan               39 drivers/iio/adc/ti-ads8344.c 		.channel = chan,					\
chan               25 drivers/iio/adc/ti-ads8688.c #define ADS8688_CMD_REG_MAN_CH(chan)	(0xC0 | (4 * chan))
chan               29 drivers/iio/adc/ti-ads8688.c #define ADS8688_PROG_REG_RANGE_CH(chan)	(0x05 + chan)
chan              211 drivers/iio/adc/ti-ads8688.c static int ads8688_read(struct iio_dev *indio_dev, unsigned int chan)
chan              228 drivers/iio/adc/ti-ads8688.c 	tmp = ADS8688_CMD_REG(ADS8688_CMD_REG_MAN_CH(chan));
chan              244 drivers/iio/adc/ti-ads8688.c 			    struct iio_chan_spec const *chan,
chan              255 drivers/iio/adc/ti-ads8688.c 		ret = ads8688_read(indio_dev, chan->channel);
chan              263 drivers/iio/adc/ti-ads8688.c 		scale_mv *= ads8688_range_def[st->range[chan->channel]].scale;
chan              269 drivers/iio/adc/ti-ads8688.c 		offset = ads8688_range_def[st->range[chan->channel]].offset;
chan              280 drivers/iio/adc/ti-ads8688.c 				   struct iio_chan_spec const *chan,
chan              286 drivers/iio/adc/ti-ads8688.c 	tmp = ADS8688_PROG_REG_RANGE_CH(chan->channel);
chan              293 drivers/iio/adc/ti-ads8688.c 			     struct iio_chan_spec const *chan,
chan              304 drivers/iio/adc/ti-ads8688.c 		offset = ads8688_range_def[st->range[chan->channel]].offset;
chan              314 drivers/iio/adc/ti-ads8688.c 				ret = ads8688_write_reg_range(indio_dev, chan,
chan              335 drivers/iio/adc/ti-ads8688.c 		    st->range[chan->channel] == ADS8688_PLUSMINUS25VREF) {
chan              340 drivers/iio/adc/ti-ads8688.c 		scale = ads8688_range_def[st->range[chan->channel]].scale;
chan              346 drivers/iio/adc/ti-ads8688.c 				ret = ads8688_write_reg_range(indio_dev, chan,
chan              354 drivers/iio/adc/ti-ads8688.c 		st->range[chan->channel] = ads8688_range_def[i].range;
chan              362 drivers/iio/adc/ti-ads8688.c 				     struct iio_chan_spec const *chan,
chan              123 drivers/iio/adc/ti-tlc4541.c 			    struct iio_chan_spec const *chan,
chan              141 drivers/iio/adc/ti-tlc4541.c 		*val = *val >> chan->scan_type.shift;
chan              142 drivers/iio/adc/ti-tlc4541.c 		*val &= GENMASK(chan->scan_type.realbits - 1, 0);
chan              149 drivers/iio/adc/ti-tlc4541.c 		*val2 = chan->scan_type.realbits;
chan               40 drivers/iio/adc/ti_am335x_adc.c 	struct dma_chan		*chan;
chan               83 drivers/iio/adc/ti_am335x_adc.c 		struct iio_chan_spec const *chan)
chan               88 drivers/iio/adc/ti_am335x_adc.c 		if (chan->channel == adc_dev->channel_line[i]) {
chan              100 drivers/iio/adc/ti_am335x_adc.c static u32 get_adc_step_bit(struct tiadc_device *adc_dev, int chan)
chan              102 drivers/iio/adc/ti_am335x_adc.c 	return 1 << adc_dev->channel_step[chan];
chan              124 drivers/iio/adc/ti_am335x_adc.c 		int chan;
chan              126 drivers/iio/adc/ti_am335x_adc.c 		chan = adc_dev->channel_line[i];
chan              130 drivers/iio/adc/ti_am335x_adc.c 				 chan, STEPCONFIG_AVG_16);
chan              145 drivers/iio/adc/ti_am335x_adc.c 				stepconfig | STEPCONFIG_INP(chan) |
chan              152 drivers/iio/adc/ti_am335x_adc.c 				 chan);
chan              158 drivers/iio/adc/ti_am335x_adc.c 				 chan);
chan              271 drivers/iio/adc/ti_am335x_adc.c 	dmaengine_slave_config(dma->chan, &dma->conf);
chan              273 drivers/iio/adc/ti_am335x_adc.c 	desc = dmaengine_prep_dma_cyclic(dma->chan, dma->addr,
chan              285 drivers/iio/adc/ti_am335x_adc.c 	dma_async_issue_pending(dma->chan);
chan              326 drivers/iio/adc/ti_am335x_adc.c 	if (dma->chan)
chan              335 drivers/iio/adc/ti_am335x_adc.c 	if (!dma->chan)
chan              353 drivers/iio/adc/ti_am335x_adc.c 	if (dma->chan) {
chan              355 drivers/iio/adc/ti_am335x_adc.c 		dmaengine_terminate_async(dma->chan);
chan              435 drivers/iio/adc/ti_am335x_adc.c 	struct iio_chan_spec *chan;
chan              443 drivers/iio/adc/ti_am335x_adc.c 	chan = chan_array;
chan              444 drivers/iio/adc/ti_am335x_adc.c 	for (i = 0; i < channels; i++, chan++) {
chan              446 drivers/iio/adc/ti_am335x_adc.c 		chan->type = IIO_VOLTAGE;
chan              447 drivers/iio/adc/ti_am335x_adc.c 		chan->indexed = 1;
chan              448 drivers/iio/adc/ti_am335x_adc.c 		chan->channel = adc_dev->channel_line[i];
chan              449 drivers/iio/adc/ti_am335x_adc.c 		chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              450 drivers/iio/adc/ti_am335x_adc.c 		chan->datasheet_name = chan_name_ain[chan->channel];
chan              451 drivers/iio/adc/ti_am335x_adc.c 		chan->scan_index = i;
chan              452 drivers/iio/adc/ti_am335x_adc.c 		chan->scan_type.sign = 'u';
chan              453 drivers/iio/adc/ti_am335x_adc.c 		chan->scan_type.realbits = 12;
chan              454 drivers/iio/adc/ti_am335x_adc.c 		chan->scan_type.storagebits = 16;
chan              468 drivers/iio/adc/ti_am335x_adc.c 		struct iio_chan_spec const *chan,
chan              482 drivers/iio/adc/ti_am335x_adc.c 	step_en = get_adc_chan_step_mask(adc_dev, chan);
chan              507 drivers/iio/adc/ti_am335x_adc.c 	map_val = adc_dev->channel_step[chan->scan_index];
chan              556 drivers/iio/adc/ti_am335x_adc.c 	dma->chan = dma_request_chan(adc_dev->mfd_tscadc->dev, "fifo1");
chan              557 drivers/iio/adc/ti_am335x_adc.c 	if (IS_ERR(dma->chan)) {
chan              558 drivers/iio/adc/ti_am335x_adc.c 		int ret = PTR_ERR(dma->chan);
chan              560 drivers/iio/adc/ti_am335x_adc.c 		dma->chan = NULL;
chan              565 drivers/iio/adc/ti_am335x_adc.c 	dma->buf = dma_alloc_coherent(dma->chan->device->dev, DMA_BUFFER_SIZE,
chan              572 drivers/iio/adc/ti_am335x_adc.c 	dma_release_channel(dma->chan);
chan              680 drivers/iio/adc/ti_am335x_adc.c 	if (dma->chan) {
chan              681 drivers/iio/adc/ti_am335x_adc.c 		dma_free_coherent(dma->chan->device->dev, DMA_BUFFER_SIZE,
chan              683 drivers/iio/adc/ti_am335x_adc.c 		dma_release_channel(dma->chan);
chan              175 drivers/iio/adc/twl4030-madc.c 			     const struct iio_chan_spec *chan,
chan              184 drivers/iio/adc/twl4030-madc.c 	req.channels = BIT(chan->channel);
chan              194 drivers/iio/adc/twl4030-madc.c 	*val = req.rbuf[chan->channel];
chan              685 drivers/iio/adc/twl4030-madc.c 					      int chan, int on)
chan              699 drivers/iio/adc/twl4030-madc.c 	regmask = chan ? TWL4030_BCI_ITHEN : TWL4030_BCI_TYPEN;
chan              504 drivers/iio/adc/twl6030-gpadc.c 			     const struct iio_chan_spec *chan,
chan              513 drivers/iio/adc/twl6030-gpadc.c 	ret = gpadc->pdata->start_conversion(chan->channel);
chan              531 drivers/iio/adc/twl6030-gpadc.c 		ret = twl6030_gpadc_get_raw(gpadc, chan->channel, val);
chan              536 drivers/iio/adc/twl6030-gpadc.c 		ret = twl6030_gpadc_get_processed(gpadc, chan->channel, val);
chan              462 drivers/iio/adc/vf610_adc.c 				     const struct iio_chan_spec *chan,
chan              477 drivers/iio/adc/vf610_adc.c 				     const struct iio_chan_spec *chan)
chan              623 drivers/iio/adc/vf610_adc.c 			struct iio_chan_spec const *chan,
chan              642 drivers/iio/adc/vf610_adc.c 		hc_cfg = VF610_ADC_ADCHC(chan->channel);
chan              656 drivers/iio/adc/vf610_adc.c 		switch (chan->type) {
chan              696 drivers/iio/adc/vf610_adc.c 			struct iio_chan_spec const *chan,
chan               27 drivers/iio/adc/viperboard_adc.c 	u8 chan;
chan               50 drivers/iio/adc/viperboard_adc.c 				struct iio_chan_spec const *chan,
chan               65 drivers/iio/adc/viperboard_adc.c 		admsg->chan = chan->channel;
chan              633 drivers/iio/adc/xilinx-xadc-core.c 	unsigned int chan;
chan              642 drivers/iio/adc/xilinx-xadc-core.c 		chan = xadc_scan_index_to_channel(i);
chan              643 drivers/iio/adc/xilinx-xadc-core.c 		xadc_read_adc_reg(xadc, chan, &xadc->data[j]);
chan              865 drivers/iio/adc/xilinx-xadc-core.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              875 drivers/iio/adc/xilinx-xadc-core.c 		ret = xadc_read_adc_reg(xadc, chan->address, &val16);
chan              880 drivers/iio/adc/xilinx-xadc-core.c 		if (chan->scan_type.sign == 'u')
chan              887 drivers/iio/adc/xilinx-xadc-core.c 		switch (chan->type) {
chan              890 drivers/iio/adc/xilinx-xadc-core.c 			switch (chan->address) {
chan              969 drivers/iio/adc/xilinx-xadc-core.c 	struct iio_chan_spec const *chan, int val, int val2, long info)
chan             1098 drivers/iio/adc/xilinx-xadc-core.c 	struct iio_chan_spec *channels, *chan;
chan             1146 drivers/iio/adc/xilinx-xadc-core.c 	chan = &channels[9];
chan             1161 drivers/iio/adc/xilinx-xadc-core.c 				chan->scan_type.sign = 's';
chan             1164 drivers/iio/adc/xilinx-xadc-core.c 				chan->scan_index = 11;
chan             1165 drivers/iio/adc/xilinx-xadc-core.c 				chan->address = XADC_REG_VPVN;
chan             1167 drivers/iio/adc/xilinx-xadc-core.c 				chan->scan_index = 15 + reg;
chan             1168 drivers/iio/adc/xilinx-xadc-core.c 				chan->address = XADC_REG_VAUX(reg - 1);
chan             1171 drivers/iio/adc/xilinx-xadc-core.c 			chan++;
chan               32 drivers/iio/adc/xilinx-xadc-events.c 	const struct iio_chan_spec *chan;
chan               38 drivers/iio/adc/xilinx-xadc-events.c 	chan = xadc_event_to_channel(indio_dev, event);
chan               40 drivers/iio/adc/xilinx-xadc-events.c 	if (chan->type == IIO_TEMP) {
chan               46 drivers/iio/adc/xilinx-xadc-events.c 			IIO_UNMOD_EVENT_CODE(chan->type, chan->channel,
chan               56 drivers/iio/adc/xilinx-xadc-events.c 			IIO_UNMOD_EVENT_CODE(chan->type, chan->channel,
chan               70 drivers/iio/adc/xilinx-xadc-events.c static unsigned int xadc_get_threshold_offset(const struct iio_chan_spec *chan,
chan               75 drivers/iio/adc/xilinx-xadc-events.c 	if (chan->type == IIO_TEMP) {
chan               78 drivers/iio/adc/xilinx-xadc-events.c 		if (chan->channel < 2)
chan               79 drivers/iio/adc/xilinx-xadc-events.c 			offset = chan->channel + 1;
chan               81 drivers/iio/adc/xilinx-xadc-events.c 			offset = chan->channel + 6;
chan               90 drivers/iio/adc/xilinx-xadc-events.c static unsigned int xadc_get_alarm_mask(const struct iio_chan_spec *chan)
chan               92 drivers/iio/adc/xilinx-xadc-events.c 	if (chan->type == IIO_TEMP)
chan               94 drivers/iio/adc/xilinx-xadc-events.c 	switch (chan->channel) {
chan              114 drivers/iio/adc/xilinx-xadc-events.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              119 drivers/iio/adc/xilinx-xadc-events.c 	return (bool)(xadc->alarm_mask & xadc_get_alarm_mask(chan));
chan              123 drivers/iio/adc/xilinx-xadc-events.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              126 drivers/iio/adc/xilinx-xadc-events.c 	unsigned int alarm = xadc_get_alarm_mask(chan);
chan              162 drivers/iio/adc/xilinx-xadc-events.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              166 drivers/iio/adc/xilinx-xadc-events.c 	unsigned int offset = xadc_get_threshold_offset(chan, dir);
chan              186 drivers/iio/adc/xilinx-xadc-events.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              190 drivers/iio/adc/xilinx-xadc-events.c 	unsigned int offset = xadc_get_threshold_offset(chan, dir);
chan              213 drivers/iio/adc/xilinx-xadc-events.c 	if (chan->type == IIO_TEMP) {
chan               24 drivers/iio/adc/xilinx-xadc.h 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan               27 drivers/iio/adc/xilinx-xadc.h 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan               30 drivers/iio/adc/xilinx-xadc.h 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan               34 drivers/iio/adc/xilinx-xadc.h 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan               30 drivers/iio/afe/iio-rescale.c 	struct iio_chan_spec chan;
chan               37 drivers/iio/afe/iio-rescale.c 			    struct iio_chan_spec const *chan,
chan               77 drivers/iio/afe/iio-rescale.c 			      struct iio_chan_spec const *chan,
chan              100 drivers/iio/afe/iio-rescale.c 				     struct iio_chan_spec const *chan,
chan              112 drivers/iio/afe/iio-rescale.c 				      struct iio_chan_spec const *chan,
chan              125 drivers/iio/afe/iio-rescale.c 	struct iio_chan_spec *chan = &rescale->chan;
chan              128 drivers/iio/afe/iio-rescale.c 	chan->indexed = 1;
chan              129 drivers/iio/afe/iio-rescale.c 	chan->output = schan->output;
chan              130 drivers/iio/afe/iio-rescale.c 	chan->ext_info = rescale->ext_info;
chan              131 drivers/iio/afe/iio-rescale.c 	chan->type = rescale->cfg->type;
chan              139 drivers/iio/afe/iio-rescale.c 	chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
chan              143 drivers/iio/afe/iio-rescale.c 		chan->info_mask_separate_available |= BIT(IIO_CHAN_INFO_RAW);
chan              320 drivers/iio/afe/iio-rescale.c 	indio_dev->channels = &rescale->chan;
chan               97 drivers/iio/amplifiers/ad8366.c 			   struct iio_chan_spec const *chan,
chan              109 drivers/iio/amplifiers/ad8366.c 		code = st->ch[chan->channel];
chan              138 drivers/iio/amplifiers/ad8366.c 			    struct iio_chan_spec const *chan,
chan              172 drivers/iio/amplifiers/ad8366.c 		st->ch[chan->channel] = code;
chan               55 drivers/iio/buffer/industrialio-buffer-cb.c 	struct iio_channel *chan;
chan               81 drivers/iio/buffer/industrialio-buffer-cb.c 	chan = &cb_buff->channels[0];
chan               82 drivers/iio/buffer/industrialio-buffer-cb.c 	while (chan->indio_dev) {
chan               83 drivers/iio/buffer/industrialio-buffer-cb.c 		if (chan->indio_dev != cb_buff->indio_dev) {
chan               87 drivers/iio/buffer/industrialio-buffer-cb.c 		set_bit(chan->channel->scan_index,
chan               89 drivers/iio/buffer/industrialio-buffer-cb.c 		chan++;
chan               33 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	struct dma_chan *chan;
chan               69 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	desc = dmaengine_prep_slave_single(dmaengine_buffer->chan,
chan               86 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	dma_async_issue_pending(dmaengine_buffer->chan);
chan               96 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	dmaengine_terminate_sync(dmaengine_buffer->chan);
chan              146 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	struct dma_chan *chan;
chan              153 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	chan = dma_request_slave_channel_reason(dev, channel);
chan              154 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	if (IS_ERR(chan)) {
chan              155 drivers/iio/buffer/industrialio-buffer-dmaengine.c 		ret = PTR_ERR(chan);
chan              159 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	ret = dma_get_slave_caps(chan, &caps);
chan              175 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	dmaengine_buffer->chan = chan;
chan              177 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	dmaengine_buffer->max_size = dma_get_max_seg_size(chan->device->dev);
chan              179 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	iio_dma_buffer_init(&dmaengine_buffer->queue, chan->device->dev,
chan              204 drivers/iio/buffer/industrialio-buffer-dmaengine.c 	dma_release_channel(dmaengine_buffer->chan);
chan               87 drivers/iio/buffer/industrialio-hw-consumer.c 	struct iio_channel *chan;
chan              102 drivers/iio/buffer/industrialio-hw-consumer.c 	chan = &hwc->channels[0];
chan              103 drivers/iio/buffer/industrialio-hw-consumer.c 	while (chan->indio_dev) {
chan              104 drivers/iio/buffer/industrialio-hw-consumer.c 		buf = iio_hw_consumer_get_buffer(hwc, chan->indio_dev);
chan              109 drivers/iio/buffer/industrialio-hw-consumer.c 		set_bit(chan->channel->scan_index, buf->buffer.scan_mask);
chan              110 drivers/iio/buffer/industrialio-hw-consumer.c 		chan++;
chan               93 drivers/iio/chemical/ams-iaq-core.c 				struct iio_chan_spec const *chan, int *val,
chan              108 drivers/iio/chemical/ams-iaq-core.c 	switch (chan->address) {
chan              407 drivers/iio/chemical/atlas-ph-sensor.c 			  struct iio_chan_spec const *chan,
chan              417 drivers/iio/chemical/atlas-ph-sensor.c 		switch (chan->type) {
chan              419 drivers/iio/chemical/atlas-ph-sensor.c 			ret = regmap_bulk_read(data->regmap, chan->address,
chan              430 drivers/iio/chemical/atlas-ph-sensor.c 			ret = atlas_read_measurement(data, chan->address, &reg);
chan              445 drivers/iio/chemical/atlas-ph-sensor.c 		switch (chan->type) {
chan              475 drivers/iio/chemical/atlas-ph-sensor.c 			   struct iio_chan_spec const *chan,
chan              484 drivers/iio/chemical/atlas-ph-sensor.c 	if (mask != IIO_CHAN_INFO_RAW || chan->type != IIO_TEMP)
chan              487 drivers/iio/chemical/atlas-ph-sensor.c 	return regmap_bulk_write(data->regmap, chan->address,
chan              771 drivers/iio/chemical/bme680_core.c 			   struct iio_chan_spec const *chan,
chan              778 drivers/iio/chemical/bme680_core.c 		switch (chan->type) {
chan              791 drivers/iio/chemical/bme680_core.c 		switch (chan->type) {
chan              815 drivers/iio/chemical/bme680_core.c 			    struct iio_chan_spec const *chan,
chan              829 drivers/iio/chemical/bme680_core.c 		switch (chan->type) {
chan              192 drivers/iio/chemical/ccs811.c 			   struct iio_chan_spec const *chan,
chan              211 drivers/iio/chemical/ccs811.c 		switch (chan->type) {
chan              222 drivers/iio/chemical/ccs811.c 			switch (chan->channel2) {
chan              244 drivers/iio/chemical/ccs811.c 		switch (chan->type) {
chan              254 drivers/iio/chemical/ccs811.c 			switch (chan->channel2) {
chan              138 drivers/iio/chemical/pms7003.c 			    struct iio_chan_spec const *chan,
chan              147 drivers/iio/chemical/pms7003.c 		switch (chan->type) {
chan              156 drivers/iio/chemical/pms7003.c 			*val = pms7003_get_pm(frame->data + chan->address);
chan              334 drivers/iio/chemical/sgp30.c 			struct iio_chan_spec const *chan, int *val,
chan              349 drivers/iio/chemical/sgp30.c 		switch (chan->address) {
chan              369 drivers/iio/chemical/sgp30.c 		if (chan->address == SGPC3_SIG_ETOH_IDX) {
chan              386 drivers/iio/chemical/sgp30.c 		switch (chan->address) {
chan              253 drivers/iio/chemical/sps30.c 			  struct iio_chan_spec const *chan,
chan              261 drivers/iio/chemical/sps30.c 		switch (chan->type) {
chan              265 drivers/iio/chemical/sps30.c 			switch (chan->channel2) {
chan              283 drivers/iio/chemical/sps30.c 			*val = data[chan->address] / 100;
chan              284 drivers/iio/chemical/sps30.c 			*val2 = (data[chan->address] % 100) * 10000;
chan              291 drivers/iio/chemical/sps30.c 		switch (chan->type) {
chan              293 drivers/iio/chemical/sps30.c 			switch (chan->channel2) {
chan              243 drivers/iio/chemical/vz89x.c 					struct iio_chan_spec const *chan,
chan              246 drivers/iio/chemical/vz89x.c 	u8 *tmp = (u8 *) &data->buffer[chan->address];
chan              248 drivers/iio/chemical/vz89x.c 	switch (chan->scan_type.endianness) {
chan              263 drivers/iio/chemical/vz89x.c 			  struct iio_chan_spec const *chan, int *val,
chan              278 drivers/iio/chemical/vz89x.c 		switch (chan->type) {
chan              280 drivers/iio/chemical/vz89x.c 			*val = data->buffer[chan->address];
chan              283 drivers/iio/chemical/vz89x.c 			ret = vz89x_get_resistance_reading(data, chan, val);
chan              292 drivers/iio/chemical/vz89x.c 		switch (chan->type) {
chan              301 drivers/iio/chemical/vz89x.c 		switch (chan->channel2) {
chan               68 drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c 				    struct iio_chan_spec const *chan,
chan               37 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 			  struct iio_chan_spec const *chan,
chan               45 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 	int idx = chan->scan_index;
chan              141 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 		ret = cros_ec_sensors_core_read(&st->core, chan, val, val2,
chan              151 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 			       struct iio_chan_spec const *chan,
chan              157 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 	int idx = chan->scan_index;
chan              207 drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c 				&st->core, chan, val, val2, mask);
chan              186 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 		uintptr_t private, const struct iio_chan_spec *chan,
chan              216 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 				  const struct iio_chan_spec *chan, char *buf)
chan              224 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 		uintptr_t private, const struct iio_chan_spec *chan,
chan              483 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 			  struct iio_chan_spec const *chan,
chan              523 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 				    struct iio_chan_spec const *chan,
chan              544 drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c 			       struct iio_chan_spec const *chan,
chan              201 drivers/iio/dac/ad5064.c 	const struct iio_chan_spec *chan)
chan              209 drivers/iio/dac/ad5064.c 		address = chan->address;
chan              216 drivers/iio/dac/ad5064.c 		val = (0x1 << chan->address);
chan              219 drivers/iio/dac/ad5064.c 		if (st->pwr_down[chan->channel])
chan              220 drivers/iio/dac/ad5064.c 			val |= st->pwr_down_mode[chan->channel] << shift;
chan              239 drivers/iio/dac/ad5064.c 	const struct iio_chan_spec *chan)
chan              243 drivers/iio/dac/ad5064.c 	return st->pwr_down_mode[chan->channel] - 1;
chan              247 drivers/iio/dac/ad5064.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan              253 drivers/iio/dac/ad5064.c 	st->pwr_down_mode[chan->channel] = mode + 1;
chan              255 drivers/iio/dac/ad5064.c 	ret = ad5064_sync_powerdown_mode(st, chan);
chan              276 drivers/iio/dac/ad5064.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              280 drivers/iio/dac/ad5064.c 	return sprintf(buf, "%d\n", st->pwr_down[chan->channel]);
chan              284 drivers/iio/dac/ad5064.c 	 uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              296 drivers/iio/dac/ad5064.c 	st->pwr_down[chan->channel] = pwr_down;
chan              298 drivers/iio/dac/ad5064.c 	ret = ad5064_sync_powerdown_mode(st, chan);
chan              304 drivers/iio/dac/ad5064.c 	struct iio_chan_spec const *chan)
chan              311 drivers/iio/dac/ad5064.c 	i = st->chip_info->shared_vref ? 0 : chan->channel;
chan              316 drivers/iio/dac/ad5064.c 			   struct iio_chan_spec const *chan,
chan              326 drivers/iio/dac/ad5064.c 		*val = st->dac_cache[chan->channel];
chan              329 drivers/iio/dac/ad5064.c 		scale_uv = ad5064_get_vref(st, chan);
chan              334 drivers/iio/dac/ad5064.c 		*val2 = chan->scan_type.realbits;
chan              343 drivers/iio/dac/ad5064.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              350 drivers/iio/dac/ad5064.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              355 drivers/iio/dac/ad5064.c 				chan->address, val, chan->scan_type.shift);
chan              357 drivers/iio/dac/ad5064.c 			st->dac_cache[chan->channel] = val;
chan              396 drivers/iio/dac/ad5064.c #define AD5064_CHANNEL(chan, addr, bits, _shift, _ext_info) {		\
chan              400 drivers/iio/dac/ad5064.c 	.channel = (chan),					\
chan               27 drivers/iio/dac/ad5360.c #define AD5360_CHAN_ADDR(chan)			((chan) + 0x8)
chan              311 drivers/iio/dac/ad5360.c 			       struct iio_chan_spec const *chan,
chan              317 drivers/iio/dac/ad5360.c 	int max_val = (1 << chan->scan_type.realbits);
chan              326 drivers/iio/dac/ad5360.c 				 chan->address, val, chan->scan_type.shift);
chan              333 drivers/iio/dac/ad5360.c 				 chan->address, val, chan->scan_type.shift);
chan              340 drivers/iio/dac/ad5360.c 				 chan->address, val, chan->scan_type.shift);
chan              351 drivers/iio/dac/ad5360.c 		val >>= (chan->scan_type.realbits - 14);
chan              356 drivers/iio/dac/ad5360.c 		ofs_index = ad5360_get_channel_vref_index(st, chan->channel);
chan              367 drivers/iio/dac/ad5360.c 			   struct iio_chan_spec const *chan,
chan              380 drivers/iio/dac/ad5360.c 			chan->address);
chan              383 drivers/iio/dac/ad5360.c 		*val = ret >> chan->scan_type.shift;
chan              386 drivers/iio/dac/ad5360.c 		scale_uv = ad5360_get_channel_vref(st, chan->channel);
chan              392 drivers/iio/dac/ad5360.c 		*val2 = chan->scan_type.realbits;
chan              396 drivers/iio/dac/ad5360.c 			chan->address);
chan              403 drivers/iio/dac/ad5360.c 			chan->address);
chan              409 drivers/iio/dac/ad5360.c 		ofs_index = ad5360_get_channel_vref_index(st, chan->channel);
chan              415 drivers/iio/dac/ad5360.c 		ret <<= (chan->scan_type.realbits - 14);
chan               82 drivers/iio/dac/ad5380.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan               90 drivers/iio/dac/ad5380.c 	 uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              121 drivers/iio/dac/ad5380.c 	const struct iio_chan_spec *chan)
chan              137 drivers/iio/dac/ad5380.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan              156 drivers/iio/dac/ad5380.c static unsigned int ad5380_info_to_reg(struct iio_chan_spec const *chan,
chan              161 drivers/iio/dac/ad5380.c 		return AD5380_REG_DATA(chan->address);
chan              163 drivers/iio/dac/ad5380.c 		return AD5380_REG_OFFSET(chan->address);
chan              165 drivers/iio/dac/ad5380.c 		return AD5380_REG_GAIN(chan->address);
chan              174 drivers/iio/dac/ad5380.c 	struct iio_chan_spec const *chan, int val, int val2, long info)
chan              176 drivers/iio/dac/ad5380.c 	const unsigned int max_val = (1 << chan->scan_type.realbits);
chan              186 drivers/iio/dac/ad5380.c 			ad5380_info_to_reg(chan, info),
chan              187 drivers/iio/dac/ad5380.c 			val << chan->scan_type.shift);
chan              189 drivers/iio/dac/ad5380.c 		val += (1 << chan->scan_type.realbits) / 2;
chan              194 drivers/iio/dac/ad5380.c 			AD5380_REG_OFFSET(chan->address),
chan              195 drivers/iio/dac/ad5380.c 			val << chan->scan_type.shift);
chan              203 drivers/iio/dac/ad5380.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              211 drivers/iio/dac/ad5380.c 		ret = regmap_read(st->regmap, ad5380_info_to_reg(chan, info),
chan              215 drivers/iio/dac/ad5380.c 		*val >>= chan->scan_type.shift;
chan              218 drivers/iio/dac/ad5380.c 		ret = regmap_read(st->regmap, AD5380_REG_OFFSET(chan->address),
chan              222 drivers/iio/dac/ad5380.c 		*val >>= chan->scan_type.shift;
chan              223 drivers/iio/dac/ad5380.c 		*val -= (1 << chan->scan_type.realbits) / 2;
chan              227 drivers/iio/dac/ad5380.c 		*val2 = chan->scan_type.realbits;
chan              312 drivers/iio/dac/ad5421.c 	struct iio_chan_spec const *chan, int *val, int *val2, long m)
chan              318 drivers/iio/dac/ad5421.c 	if (chan->type != IIO_CURRENT)
chan              354 drivers/iio/dac/ad5421.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              383 drivers/iio/dac/ad5421.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              389 drivers/iio/dac/ad5421.c 	switch (chan->type) {
chan              414 drivers/iio/dac/ad5421.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              420 drivers/iio/dac/ad5421.c 	switch (chan->type) {
chan              438 drivers/iio/dac/ad5421.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              444 drivers/iio/dac/ad5421.c 	switch (chan->type) {
chan               64 drivers/iio/dac/ad5446.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan               74 drivers/iio/dac/ad5446.c 	const struct iio_chan_spec *chan)
chan               90 drivers/iio/dac/ad5446.c 					   const struct iio_chan_spec *chan,
chan              100 drivers/iio/dac/ad5446.c 					    const struct iio_chan_spec *chan,
chan              117 drivers/iio/dac/ad5446.c 		shift = chan->scan_type.realbits + chan->scan_type.shift;
chan              164 drivers/iio/dac/ad5446.c 			   struct iio_chan_spec const *chan,
chan              177 drivers/iio/dac/ad5446.c 		*val2 = chan->scan_type.realbits;
chan              184 drivers/iio/dac/ad5446.c 			       struct iio_chan_spec const *chan,
chan              194 drivers/iio/dac/ad5446.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              197 drivers/iio/dac/ad5446.c 		val <<= chan->scan_type.shift;
chan              131 drivers/iio/dac/ad5449.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              142 drivers/iio/dac/ad5449.c 				AD5449_CMD_READ(chan->address), val);
chan              147 drivers/iio/dac/ad5449.c 			*val = st->dac_cache[chan->address];
chan              152 drivers/iio/dac/ad5449.c 		reg = &st->vref_reg[chan->channel];
chan              158 drivers/iio/dac/ad5449.c 		*val2 = chan->scan_type.realbits;
chan              169 drivers/iio/dac/ad5449.c 	struct iio_chan_spec const *chan, int val, int val2, long info)
chan              176 drivers/iio/dac/ad5449.c 		if (val < 0 || val >= (1 << chan->scan_type.realbits))
chan              180 drivers/iio/dac/ad5449.c 			AD5449_CMD_LOAD_AND_UPDATE(chan->address),
chan              181 drivers/iio/dac/ad5449.c 			val << chan->scan_type.shift);
chan              183 drivers/iio/dac/ad5449.c 			st->dac_cache[chan->address] = val;
chan              197 drivers/iio/dac/ad5449.c #define AD5449_CHANNEL(chan, bits) {				\
chan              201 drivers/iio/dac/ad5449.c 	.channel = (chan),					\
chan              204 drivers/iio/dac/ad5449.c 	.address = (chan),					\
chan               95 drivers/iio/dac/ad5504.c 			   struct iio_chan_spec const *chan,
chan              105 drivers/iio/dac/ad5504.c 		ret = ad5504_spi_read(st, chan->address);
chan              114 drivers/iio/dac/ad5504.c 		*val2 = chan->scan_type.realbits;
chan              121 drivers/iio/dac/ad5504.c 			       struct iio_chan_spec const *chan,
chan              130 drivers/iio/dac/ad5504.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              133 drivers/iio/dac/ad5504.c 		return ad5504_spi_write(st, chan->address, val);
chan              145 drivers/iio/dac/ad5504.c 	const struct iio_chan_spec *chan)
chan              153 drivers/iio/dac/ad5504.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan              170 drivers/iio/dac/ad5504.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              175 drivers/iio/dac/ad5504.c 			!(st->pwr_down_mask & (1 << chan->channel)));
chan              179 drivers/iio/dac/ad5504.c 	uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              191 drivers/iio/dac/ad5504.c 		st->pwr_down_mask |= (1 << chan->channel);
chan              193 drivers/iio/dac/ad5504.c 		st->pwr_down_mask &= ~(1 << chan->channel);
chan              304 drivers/iio/dac/ad5592r-base.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              312 drivers/iio/dac/ad5592r-base.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              315 drivers/iio/dac/ad5592r-base.c 		if (!chan->output)
chan              319 drivers/iio/dac/ad5592r-base.c 		ret = st->ops->write_dac(st, chan->channel, val);
chan              321 drivers/iio/dac/ad5592r-base.c 			st->cached_dac[chan->channel] = val;
chan              325 drivers/iio/dac/ad5592r-base.c 		if (chan->type == IIO_VOLTAGE) {
chan              346 drivers/iio/dac/ad5592r-base.c 			if (chan->output) {
chan              377 drivers/iio/dac/ad5592r-base.c 			   struct iio_chan_spec const *chan,
chan              388 drivers/iio/dac/ad5592r-base.c 		if (!chan->output) {
chan              389 drivers/iio/dac/ad5592r-base.c 			ret = st->ops->read_adc(st, chan->channel, &read_val);
chan              393 drivers/iio/dac/ad5592r-base.c 			if ((read_val >> 12 & 0x7) != (chan->channel & 0x7)) {
chan              395 drivers/iio/dac/ad5592r-base.c 						chan->channel);
chan              403 drivers/iio/dac/ad5592r-base.c 			read_val = st->cached_dac[chan->channel];
chan              407 drivers/iio/dac/ad5592r-base.c 				chan->channel, read_val);
chan              415 drivers/iio/dac/ad5592r-base.c 		if (chan->type == IIO_TEMP) {
chan              425 drivers/iio/dac/ad5592r-base.c 			if (chan->output)
chan              434 drivers/iio/dac/ad5592r-base.c 			*val2 = chan->scan_type.realbits;
chan              459 drivers/iio/dac/ad5592r-base.c 				 struct iio_chan_spec const *chan, long mask)
chan              480 drivers/iio/dac/ad5592r-base.c 					   const struct iio_chan_spec *chan,
chan              500 drivers/iio/dac/ad5592r-base.c 		struct iio_chan_spec *chan, bool output, unsigned id)
chan              502 drivers/iio/dac/ad5592r-base.c 	chan->type = IIO_VOLTAGE;
chan              503 drivers/iio/dac/ad5592r-base.c 	chan->indexed = 1;
chan              504 drivers/iio/dac/ad5592r-base.c 	chan->output = output;
chan              505 drivers/iio/dac/ad5592r-base.c 	chan->channel = id;
chan              506 drivers/iio/dac/ad5592r-base.c 	chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              507 drivers/iio/dac/ad5592r-base.c 	chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
chan              508 drivers/iio/dac/ad5592r-base.c 	chan->scan_type.sign = 'u';
chan              509 drivers/iio/dac/ad5592r-base.c 	chan->scan_type.realbits = 12;
chan              510 drivers/iio/dac/ad5592r-base.c 	chan->scan_type.storagebits = 16;
chan              511 drivers/iio/dac/ad5592r-base.c 	chan->ext_info = ad5592r_ext_info;
chan               43 drivers/iio/dac/ad5592r-base.h 	int (*write_dac)(struct ad5592r_state *st, unsigned chan, u16 value);
chan               44 drivers/iio/dac/ad5592r-base.h 	int (*read_adc)(struct ad5592r_state *st, unsigned chan, u16 *value);
chan               34 drivers/iio/dac/ad5592r.c static int ad5592r_write_dac(struct ad5592r_state *st, unsigned chan, u16 value)
chan               38 drivers/iio/dac/ad5592r.c 	st->spi_msg = cpu_to_be16(BIT(15) | (chan << 12) | value);
chan               43 drivers/iio/dac/ad5592r.c static int ad5592r_read_adc(struct ad5592r_state *st, unsigned chan, u16 *value)
chan               48 drivers/iio/dac/ad5592r.c 	st->spi_msg = cpu_to_be16((AD5592R_REG_ADC_SEQ << 11) | BIT(chan));
chan               24 drivers/iio/dac/ad5593r.c static int ad5593r_write_dac(struct ad5592r_state *st, unsigned chan, u16 value)
chan               29 drivers/iio/dac/ad5593r.c 			AD5593R_MODE_DAC_WRITE | chan, value);
chan               32 drivers/iio/dac/ad5593r.c static int ad5593r_read_adc(struct ad5592r_state *st, unsigned chan, u16 *value)
chan               38 drivers/iio/dac/ad5593r.c 			AD5593R_MODE_CONF | AD5592R_REG_ADC_SEQ, BIT(chan));
chan               46 drivers/iio/dac/ad5624r_spi.c 			   struct iio_chan_spec const *chan,
chan               56 drivers/iio/dac/ad5624r_spi.c 		*val2 = chan->scan_type.realbits;
chan               63 drivers/iio/dac/ad5624r_spi.c 			       struct iio_chan_spec const *chan,
chan               72 drivers/iio/dac/ad5624r_spi.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan               77 drivers/iio/dac/ad5624r_spi.c 				chan->address, val,
chan               78 drivers/iio/dac/ad5624r_spi.c 				chan->scan_type.shift);
chan               91 drivers/iio/dac/ad5624r_spi.c 	const struct iio_chan_spec *chan)
chan               99 drivers/iio/dac/ad5624r_spi.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan              116 drivers/iio/dac/ad5624r_spi.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              121 drivers/iio/dac/ad5624r_spi.c 			!!(st->pwr_down_mask & (1 << chan->channel)));
chan              125 drivers/iio/dac/ad5624r_spi.c 	uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              137 drivers/iio/dac/ad5624r_spi.c 		st->pwr_down_mask |= (1 << chan->channel);
chan              139 drivers/iio/dac/ad5624r_spi.c 		st->pwr_down_mask &= ~(1 << chan->channel);
chan               29 drivers/iio/dac/ad5686.c 				     const struct iio_chan_spec *chan)
chan               33 drivers/iio/dac/ad5686.c 	return ((st->pwr_down_mode >> (chan->channel * 2)) & 0x3) - 1;
chan               37 drivers/iio/dac/ad5686.c 				     const struct iio_chan_spec *chan,
chan               42 drivers/iio/dac/ad5686.c 	st->pwr_down_mode &= ~(0x3 << (chan->channel * 2));
chan               43 drivers/iio/dac/ad5686.c 	st->pwr_down_mode |= ((mode + 1) << (chan->channel * 2));
chan               56 drivers/iio/dac/ad5686.c 		uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan               61 drivers/iio/dac/ad5686.c 				       (0x3 << (chan->channel * 2))));
chan               66 drivers/iio/dac/ad5686.c 					  const struct iio_chan_spec *chan,
chan               81 drivers/iio/dac/ad5686.c 		st->pwr_down_mask |= (0x3 << (chan->channel * 2));
chan               83 drivers/iio/dac/ad5686.c 		st->pwr_down_mask &= ~(0x3 << (chan->channel * 2));
chan               98 drivers/iio/dac/ad5686.c 		if (chan->channel > 0x7)
chan              120 drivers/iio/dac/ad5686.c 			   struct iio_chan_spec const *chan,
chan              131 drivers/iio/dac/ad5686.c 		ret = st->read(st, chan->address);
chan              135 drivers/iio/dac/ad5686.c 		*val = (ret >> chan->scan_type.shift) &
chan              136 drivers/iio/dac/ad5686.c 			GENMASK(chan->scan_type.realbits - 1, 0);
chan              140 drivers/iio/dac/ad5686.c 		*val2 = chan->scan_type.realbits;
chan              147 drivers/iio/dac/ad5686.c 			    struct iio_chan_spec const *chan,
chan              157 drivers/iio/dac/ad5686.c 		if (val > (1 << chan->scan_type.realbits) || val < 0)
chan              163 drivers/iio/dac/ad5686.c 				chan->address,
chan              164 drivers/iio/dac/ad5686.c 				val << chan->scan_type.shift);
chan              191 drivers/iio/dac/ad5686.c #define AD5868_CHANNEL(chan, addr, bits, _shift) {		\
chan              195 drivers/iio/dac/ad5686.c 		.channel = chan,				\
chan               23 drivers/iio/dac/ad5686.h #define AD5686_ADDR_DAC(chan)			(0x1 << (chan))
chan               25 drivers/iio/dac/ad5755.c #define AD5755_WRITE_REG_DATA(chan)	(chan)
chan               26 drivers/iio/dac/ad5755.c #define AD5755_WRITE_REG_GAIN(chan)	(0x08 | (chan))
chan               27 drivers/iio/dac/ad5755.c #define AD5755_WRITE_REG_OFFSET(chan)	(0x10 | (chan))
chan               28 drivers/iio/dac/ad5755.c #define AD5755_WRITE_REG_CTRL(chan)	(0x1c | (chan))
chan               30 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_DATA(chan)	(chan)
chan               31 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_CTRL(chan)	(0x4 | (chan))
chan               32 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_GAIN(chan)	(0x8 | (chan))
chan               33 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_OFFSET(chan)	(0xc | (chan))
chan               34 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_CLEAR(chan)	(0x10 | (chan))
chan               35 drivers/iio/dac/ad5755.c #define AD5755_READ_REG_SLEW(chan)	(0x14 | (chan))
chan              285 drivers/iio/dac/ad5755.c 	struct iio_chan_spec const *chan, int *min, int *max)
chan              287 drivers/iio/dac/ad5755.c 	enum ad5755_mode mode = st->ctrl[chan->channel] & 7;
chan              293 drivers/iio/dac/ad5755.c 	struct iio_chan_spec const *chan)
chan              297 drivers/iio/dac/ad5755.c 	ad5755_get_min_max(st, chan, &min, &max);
chan              298 drivers/iio/dac/ad5755.c 	return (min * (1 << chan->scan_type.realbits)) / (max - min);
chan              302 drivers/iio/dac/ad5755.c 	struct iio_chan_spec const *chan, long info, bool write,
chan              308 drivers/iio/dac/ad5755.c 			*reg = AD5755_WRITE_REG_DATA(chan->address);
chan              310 drivers/iio/dac/ad5755.c 			*reg = AD5755_READ_REG_DATA(chan->address);
chan              311 drivers/iio/dac/ad5755.c 		*shift = chan->scan_type.shift;
chan              316 drivers/iio/dac/ad5755.c 			*reg = AD5755_WRITE_REG_OFFSET(chan->address);
chan              318 drivers/iio/dac/ad5755.c 			*reg = AD5755_READ_REG_OFFSET(chan->address);
chan              324 drivers/iio/dac/ad5755.c 			*reg =  AD5755_WRITE_REG_GAIN(chan->address);
chan              326 drivers/iio/dac/ad5755.c 			*reg =  AD5755_READ_REG_GAIN(chan->address);
chan              338 drivers/iio/dac/ad5755.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              347 drivers/iio/dac/ad5755.c 		ad5755_get_min_max(st, chan, &min, &max);
chan              349 drivers/iio/dac/ad5755.c 		*val2 = chan->scan_type.realbits;
chan              352 drivers/iio/dac/ad5755.c 		*val = ad5755_get_offset(st, chan);
chan              355 drivers/iio/dac/ad5755.c 		ret = ad5755_chan_reg_info(st, chan, info, false,
chan              373 drivers/iio/dac/ad5755.c 	const struct iio_chan_spec *chan, int val, int val2, long info)
chan              379 drivers/iio/dac/ad5755.c 	ret = ad5755_chan_reg_info(st, chan, info, true,
chan              394 drivers/iio/dac/ad5755.c 	const struct iio_chan_spec *chan, char *buf)
chan              399 drivers/iio/dac/ad5755.c 		       (bool)(st->pwr_down & (1 << chan->channel)));
chan              403 drivers/iio/dac/ad5755.c 	struct iio_chan_spec const *chan, const char *buf, size_t len)
chan              412 drivers/iio/dac/ad5755.c 	ret = ad5755_set_channel_pwr_down(indio_dev, chan->channel, pwr_down);
chan              520 drivers/iio/dac/ad5758.c 			   struct iio_chan_spec const *chan,
chan              553 drivers/iio/dac/ad5758.c 			    struct iio_chan_spec const *chan,
chan              572 drivers/iio/dac/ad5758.c 				     const struct iio_chan_spec *chan,
chan              582 drivers/iio/dac/ad5758.c 				      struct iio_chan_spec const *chan,
chan              198 drivers/iio/dac/ad5761.c 			   struct iio_chan_spec const *chan,
chan              212 drivers/iio/dac/ad5761.c 		*val = aux >> chan->scan_type.shift;
chan              218 drivers/iio/dac/ad5761.c 		*val2 = chan->scan_type.realbits;
chan              222 drivers/iio/dac/ad5761.c 		*val = -(1 << chan->scan_type.realbits);
chan              232 drivers/iio/dac/ad5761.c 			    struct iio_chan_spec const *chan,
chan              242 drivers/iio/dac/ad5761.c 	if (val2 || (val << chan->scan_type.shift) > 0xffff || val < 0)
chan              245 drivers/iio/dac/ad5761.c 	aux = val << chan->scan_type.shift;
chan              167 drivers/iio/dac/ad5764.c static int ad5764_chan_info_to_reg(struct iio_chan_spec const *chan, long info)
chan              171 drivers/iio/dac/ad5764.c 		return AD5764_REG_DATA(chan->address);
chan              173 drivers/iio/dac/ad5764.c 		return AD5764_REG_OFFSET(chan->address);
chan              175 drivers/iio/dac/ad5764.c 		return AD5764_REG_FINE_GAIN(chan->address);
chan              184 drivers/iio/dac/ad5764.c 	struct iio_chan_spec const *chan, int val, int val2, long info)
chan              186 drivers/iio/dac/ad5764.c 	const int max_val = (1 << chan->scan_type.realbits);
chan              193 drivers/iio/dac/ad5764.c 		val <<= chan->scan_type.shift;
chan              207 drivers/iio/dac/ad5764.c 	reg = ad5764_chan_info_to_reg(chan, info);
chan              221 drivers/iio/dac/ad5764.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              230 drivers/iio/dac/ad5764.c 		reg = AD5764_REG_DATA(chan->address);
chan              234 drivers/iio/dac/ad5764.c 		*val >>= chan->scan_type.shift;
chan              237 drivers/iio/dac/ad5764.c 		reg = AD5764_REG_OFFSET(chan->address);
chan              244 drivers/iio/dac/ad5764.c 		reg = AD5764_REG_FINE_GAIN(chan->address);
chan              252 drivers/iio/dac/ad5764.c 		vref = ad5764_get_channel_vref(st, chan->channel);
chan              257 drivers/iio/dac/ad5764.c 		*val2 = chan->scan_type.realbits;
chan              260 drivers/iio/dac/ad5764.c 		*val = -(1 << chan->scan_type.realbits) / 2;
chan              153 drivers/iio/dac/ad5791.c 	const struct iio_chan_spec *chan)
chan              161 drivers/iio/dac/ad5791.c 	const struct iio_chan_spec *chan, unsigned int mode)
chan              178 drivers/iio/dac/ad5791.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              186 drivers/iio/dac/ad5791.c 	 uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan              249 drivers/iio/dac/ad5791.c 			   struct iio_chan_spec const *chan,
chan              260 drivers/iio/dac/ad5791.c 		ret = ad5791_spi_read(st, chan->address, val);
chan              264 drivers/iio/dac/ad5791.c 		*val >>= chan->scan_type.shift;
chan              268 drivers/iio/dac/ad5791.c 		*val2 = (1 << chan->scan_type.realbits) - 1;
chan              271 drivers/iio/dac/ad5791.c 		val64 = (((u64)st->vref_neg_mv) << chan->scan_type.realbits);
chan              320 drivers/iio/dac/ad5791.c 			    struct iio_chan_spec const *chan,
chan              329 drivers/iio/dac/ad5791.c 		val &= GENMASK(chan->scan_type.realbits - 1, 0);
chan              330 drivers/iio/dac/ad5791.c 		val <<= chan->scan_type.shift;
chan              332 drivers/iio/dac/ad5791.c 		return ad5791_spi_write(st, chan->address, val);
chan               51 drivers/iio/dac/ad7303.c static int ad7303_write(struct ad7303_state *st, unsigned int chan,
chan               55 drivers/iio/dac/ad7303.c 		(chan << AD7303_CFG_ADDR_OFFSET) |
chan               62 drivers/iio/dac/ad7303.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan               67 drivers/iio/dac/ad7303.c 		AD7303_CFG_POWER_DOWN(chan->channel)));
chan               71 drivers/iio/dac/ad7303.c 	 uintptr_t private, const struct iio_chan_spec *chan, const char *buf,
chan               85 drivers/iio/dac/ad7303.c 		st->config |= AD7303_CFG_POWER_DOWN(chan->channel);
chan               87 drivers/iio/dac/ad7303.c 		st->config &= ~AD7303_CFG_POWER_DOWN(chan->channel);
chan               91 drivers/iio/dac/ad7303.c 	ad7303_write(st, chan->channel, st->dac_cache[chan->channel]);
chan               98 drivers/iio/dac/ad7303.c 	struct iio_chan_spec const *chan)
chan              112 drivers/iio/dac/ad7303.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              119 drivers/iio/dac/ad7303.c 		*val = st->dac_cache[chan->channel];
chan              122 drivers/iio/dac/ad7303.c 		vref_uv = ad7303_get_vref(st, chan);
chan              127 drivers/iio/dac/ad7303.c 		*val2 = chan->scan_type.realbits;
chan              137 drivers/iio/dac/ad7303.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              144 drivers/iio/dac/ad7303.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              148 drivers/iio/dac/ad7303.c 		ret = ad7303_write(st, chan->address, val);
chan              150 drivers/iio/dac/ad7303.c 			st->dac_cache[chan->channel] = val;
chan              175 drivers/iio/dac/ad7303.c #define AD7303_CHANNEL(chan) {					\
chan              179 drivers/iio/dac/ad7303.c 	.channel = (chan),					\
chan              182 drivers/iio/dac/ad7303.c 	.address = (chan),					\
chan               40 drivers/iio/dac/ad8801.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan               50 drivers/iio/dac/ad8801.c 		ret = ad8801_spi_write(state, chan->channel, val);
chan               52 drivers/iio/dac/ad8801.c 			state->dac_cache[chan->channel] = val;
chan               62 drivers/iio/dac/ad8801.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan               68 drivers/iio/dac/ad8801.c 		*val = state->dac_cache[chan->channel];
chan               89 drivers/iio/dac/ad8801.c #define AD8801_CHANNEL(chan) {		\
chan               93 drivers/iio/dac/ad8801.c 	.channel = chan,			\
chan               22 drivers/iio/dac/cio-dac.c #define CIO_DAC_CHAN(chan) {				\
chan               24 drivers/iio/dac/cio-dac.c 	.channel = chan,				\
chan               48 drivers/iio/dac/cio-dac.c 	struct iio_chan_spec const *chan, int *val, int *val2, long mask)
chan               55 drivers/iio/dac/cio-dac.c 	*val = priv->chan_out_states[chan->channel];
chan               61 drivers/iio/dac/cio-dac.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan               64 drivers/iio/dac/cio-dac.c 	const unsigned int chan_addr_offset = 2 * chan->channel;
chan               73 drivers/iio/dac/cio-dac.c 	priv->chan_out_states[chan->channel] = val;
chan               53 drivers/iio/dac/dpot-dac.c 			     struct iio_chan_spec const *chan,
chan               95 drivers/iio/dac/dpot-dac.c 			       struct iio_chan_spec const *chan,
chan              111 drivers/iio/dac/dpot-dac.c 			      struct iio_chan_spec const *chan,
chan               22 drivers/iio/dac/ds4424.c #define DS4424_DAC_ADDR(chan)   ((chan) + 0xf8)
chan               26 drivers/iio/dac/ds4424.c #define DS4424_CHANNEL(chan) { \
chan               30 drivers/iio/dac/ds4424.c 	.channel = chan, \
chan               89 drivers/iio/dac/ds4424.c 			     int val, struct iio_chan_spec const *chan)
chan               96 drivers/iio/dac/ds4424.c 			DS4424_DAC_ADDR(chan->channel), val);
chan              100 drivers/iio/dac/ds4424.c 	data->raw[chan->channel] = val;
chan              108 drivers/iio/dac/ds4424.c 			   struct iio_chan_spec const *chan,
chan              116 drivers/iio/dac/ds4424.c 		ret = ds4424_get_value(indio_dev, val, chan->channel);
chan              134 drivers/iio/dac/ds4424.c 			     struct iio_chan_spec const *chan,
chan              155 drivers/iio/dac/ds4424.c 		return ds4424_set_value(indio_dev, raw.bits, chan);
chan               50 drivers/iio/dac/lpc18xx_dac.c 				struct iio_chan_spec const *chan,
chan               75 drivers/iio/dac/lpc18xx_dac.c 				 struct iio_chan_spec const *chan,
chan               48 drivers/iio/dac/ltc1660.c 		struct iio_chan_spec const *chan,
chan               57 drivers/iio/dac/ltc1660.c 		*val = priv->value[chan->channel];
chan               69 drivers/iio/dac/ltc1660.c 		*val2 = chan->scan_type.realbits;
chan               77 drivers/iio/dac/ltc1660.c 		struct iio_chan_spec const *chan,
chan               90 drivers/iio/dac/ltc1660.c 		if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0))
chan               93 drivers/iio/dac/ltc1660.c 		ret = regmap_write(priv->regmap, chan->channel,
chan               94 drivers/iio/dac/ltc1660.c 					(val << chan->scan_type.shift));
chan               96 drivers/iio/dac/ltc1660.c 			priv->value[chan->channel] = val;
chan              104 drivers/iio/dac/ltc1660.c #define LTC1660_CHAN(chan, bits) {			\
chan              108 drivers/iio/dac/ltc1660.c 	.channel = chan,				\
chan               84 drivers/iio/dac/ltc2632.c 			    struct iio_chan_spec const *chan,
chan               94 drivers/iio/dac/ltc2632.c 		*val2 = chan->scan_type.realbits;
chan              101 drivers/iio/dac/ltc2632.c 			     struct iio_chan_spec const *chan,
chan              110 drivers/iio/dac/ltc2632.c 		if (val >= (1 << chan->scan_type.realbits) || val < 0)
chan              115 drivers/iio/dac/ltc2632.c 					 chan->address, val,
chan              116 drivers/iio/dac/ltc2632.c 					 chan->scan_type.shift);
chan              124 drivers/iio/dac/ltc2632.c 					  const struct iio_chan_spec *chan,
chan              130 drivers/iio/dac/ltc2632.c 		       !!(st->powerdown_cache_mask & (1 << chan->channel)));
chan              135 drivers/iio/dac/ltc2632.c 					   const struct iio_chan_spec *chan,
chan              148 drivers/iio/dac/ltc2632.c 		st->powerdown_cache_mask |= (1 << chan->channel);
chan              150 drivers/iio/dac/ltc2632.c 		st->powerdown_cache_mask &= ~(1 << chan->channel);
chan              154 drivers/iio/dac/ltc2632.c 				chan->channel, 0, 0);
chan               76 drivers/iio/dac/m62332.c 			   struct iio_chan_spec const *chan,
chan               96 drivers/iio/dac/m62332.c 		*val = data->raw[chan->channel];
chan              111 drivers/iio/dac/m62332.c 			    struct iio_chan_spec const *chan, int val, int val2,
chan              119 drivers/iio/dac/m62332.c 		return m62332_set_value(indio_dev, val, chan->channel);
chan              170 drivers/iio/dac/m62332.c #define M62332_CHANNEL(chan) {					\
chan              174 drivers/iio/dac/m62332.c 	.channel = (chan),					\
chan              175 drivers/iio/dac/m62332.c 	.datasheet_name = "CH" #chan,				\
chan               67 drivers/iio/dac/max517.c 			   struct iio_chan_spec const *chan,
chan               77 drivers/iio/dac/max517.c 		*val = data->vref_mv[chan->channel];
chan               87 drivers/iio/dac/max517.c 	struct iio_chan_spec const *chan, int val, int val2, long mask)
chan               93 drivers/iio/dac/max517.c 		ret = max517_set_value(indio_dev, val, chan->channel);
chan              124 drivers/iio/dac/max517.c #define MAX517_CHANNEL(chan) {				\
chan              128 drivers/iio/dac/max517.c 	.channel = (chan),				\
chan              150 drivers/iio/dac/max517.c 	int chan;
chan              185 drivers/iio/dac/max517.c 	for (chan = 0; chan < indio_dev->num_channels; chan++) {
chan              187 drivers/iio/dac/max517.c 			data->vref_mv[chan] = 5000; /* mV */
chan              189 drivers/iio/dac/max517.c 			data->vref_mv[chan] = platform_data->vref_mv[chan];
chan               55 drivers/iio/dac/max5821.c 				      const struct iio_chan_spec *chan)
chan               59 drivers/iio/dac/max5821.c 	return st->powerdown_mode[chan->channel];
chan               63 drivers/iio/dac/max5821.c 				      const struct iio_chan_spec *chan,
chan               68 drivers/iio/dac/max5821.c 	st->powerdown_mode[chan->channel] = mode;
chan               82 drivers/iio/dac/max5821.c 					  const struct iio_chan_spec *chan,
chan               87 drivers/iio/dac/max5821.c 	return sprintf(buf, "%d\n", st->powerdown[chan->channel]);
chan               91 drivers/iio/dac/max5821.c 				       const struct iio_chan_spec *chan)
chan               97 drivers/iio/dac/max5821.c 	if (chan->channel == 0)
chan              102 drivers/iio/dac/max5821.c 	if (data->powerdown[chan->channel])
chan              103 drivers/iio/dac/max5821.c 		outbuf[1] |= data->powerdown_mode[chan->channel] + 1;
chan              112 drivers/iio/dac/max5821.c 					   const struct iio_chan_spec *chan,
chan              123 drivers/iio/dac/max5821.c 	data->powerdown[chan->channel] = powerdown;
chan              125 drivers/iio/dac/max5821.c 	ret = max5821_sync_powerdown_mode(data, chan);
chan              144 drivers/iio/dac/max5821.c #define MAX5821_CHANNEL(chan) {					\
chan              148 drivers/iio/dac/max5821.c 	.channel = (chan),					\
chan              238 drivers/iio/dac/max5821.c 			   struct iio_chan_spec const *chan,
chan              245 drivers/iio/dac/max5821.c 		return max5821_get_value(indio_dev, val, chan->channel);
chan              256 drivers/iio/dac/max5821.c 			     struct iio_chan_spec const *chan,
chan              264 drivers/iio/dac/max5821.c 		return max5821_set_value(indio_dev, val, chan->channel);
chan              148 drivers/iio/dac/mcp4725.c 	const struct iio_chan_spec *chan)
chan              156 drivers/iio/dac/mcp4725.c 	const struct iio_chan_spec *chan, unsigned mode)
chan              166 drivers/iio/dac/mcp4725.c 	uintptr_t private, const struct iio_chan_spec *chan, char *buf)
chan              174 drivers/iio/dac/mcp4725.c 	 uintptr_t private, const struct iio_chan_spec *chan,
chan              308 drivers/iio/dac/mcp4725.c 			   struct iio_chan_spec const *chan,
chan              335 drivers/iio/dac/mcp4725.c 			       struct iio_chan_spec const *chan,
chan               35 drivers/iio/dac/mcp4922.c #define MCP4922_CHAN(chan, bits) {			\
chan               39 drivers/iio/dac/mcp4922.c 	.channel = chan,				\
chan               60 drivers/iio/dac/mcp4922.c 		struct iio_chan_spec const *chan,
chan               69 drivers/iio/dac/mcp4922.c 		*val = state->value[chan->channel];
chan               73 drivers/iio/dac/mcp4922.c 		*val2 = chan->scan_type.realbits;
chan               81 drivers/iio/dac/mcp4922.c 		struct iio_chan_spec const *chan,
chan               94 drivers/iio/dac/mcp4922.c 		if (val < 0 || val > GENMASK(chan->scan_type.realbits - 1, 0))
chan               96 drivers/iio/dac/mcp4922.c 		val <<= chan->scan_type.shift;
chan               98 drivers/iio/dac/mcp4922.c 		ret = mcp4922_spi_write(state, chan->channel, val);
chan              100 drivers/iio/dac/mcp4922.c 			state->value[chan->channel] = val;
chan               99 drivers/iio/dac/stm32-dac.c 			      struct iio_chan_spec const *chan,
chan              106 drivers/iio/dac/stm32-dac.c 		return stm32_dac_get_value(dac, chan->channel, val);
chan              109 drivers/iio/dac/stm32-dac.c 		*val2 = chan->scan_type.realbits;
chan              117 drivers/iio/dac/stm32-dac.c 			       struct iio_chan_spec const *chan,
chan              124 drivers/iio/dac/stm32-dac.c 		return stm32_dac_set_value(dac, chan->channel, val);
chan              153 drivers/iio/dac/stm32-dac.c 					const struct iio_chan_spec *chan)
chan              159 drivers/iio/dac/stm32-dac.c 					const struct iio_chan_spec *chan,
chan              167 drivers/iio/dac/stm32-dac.c 					const struct iio_chan_spec *chan,
chan              170 drivers/iio/dac/stm32-dac.c 	int ret = stm32_dac_is_enabled(indio_dev, chan->channel);
chan              180 drivers/iio/dac/stm32-dac.c 					 const struct iio_chan_spec *chan,
chan              190 drivers/iio/dac/stm32-dac.c 	ret = stm32_dac_set_enable_state(indio_dev, chan->channel, !powerdown);
chan              216 drivers/iio/dac/stm32-dac.c #define STM32_DAC_CHANNEL(chan, name) {			\
chan              220 drivers/iio/dac/stm32-dac.c 	.channel = chan,				\
chan               60 drivers/iio/dac/ti-dac082s085.c #define WRITE_NOT_UPDATE(chan)	(0x00 | (chan) << 6)
chan               61 drivers/iio/dac/ti-dac082s085.c #define WRITE_AND_UPDATE(chan)	(0x10 | (chan) << 6)
chan               79 drivers/iio/dac/ti-dac082s085.c 				     const struct iio_chan_spec *chan)
chan               87 drivers/iio/dac/ti-dac082s085.c 				     const struct iio_chan_spec *chan,
chan              118 drivers/iio/dac/ti-dac082s085.c 				     const struct iio_chan_spec *chan,
chan              128 drivers/iio/dac/ti-dac082s085.c 				      const struct iio_chan_spec *chan,
chan              166 drivers/iio/dac/ti-dac082s085.c #define TI_DAC_CHANNEL(chan) {					\
chan              168 drivers/iio/dac/ti-dac082s085.c 	.channel = (chan),					\
chan              169 drivers/iio/dac/ti-dac082s085.c 	.address = (chan),					\
chan              172 drivers/iio/dac/ti-dac082s085.c 	.datasheet_name = (const char[]){ 'A' + (chan), 0 },	\
chan              186 drivers/iio/dac/ti-dac082s085.c 			   struct iio_chan_spec const *chan,
chan              194 drivers/iio/dac/ti-dac082s085.c 		*val = ti_dac->val[chan->channel];
chan              216 drivers/iio/dac/ti-dac082s085.c 			    struct iio_chan_spec const *chan,
chan              224 drivers/iio/dac/ti-dac082s085.c 		if (ti_dac->val[chan->channel] == val)
chan              234 drivers/iio/dac/ti-dac082s085.c 		ret = ti_dac_cmd(ti_dac, WRITE_AND_UPDATE(chan->channel), val);
chan              236 drivers/iio/dac/ti-dac082s085.c 			ti_dac->val[chan->channel] = val;
chan              248 drivers/iio/dac/ti-dac082s085.c 				    struct iio_chan_spec const *chan, long mask)
chan              124 drivers/iio/dac/ti-dac5571.c 				      const struct iio_chan_spec *chan)
chan              132 drivers/iio/dac/ti-dac5571.c 				      const struct iio_chan_spec *chan,
chan              143 drivers/iio/dac/ti-dac5571.c 		ret = data->dac5571_pwrdwn(data, chan->channel,
chan              165 drivers/iio/dac/ti-dac5571.c 				      const struct iio_chan_spec *chan,
chan              175 drivers/iio/dac/ti-dac5571.c 				       const struct iio_chan_spec *chan,
chan              191 drivers/iio/dac/ti-dac5571.c 		ret = data->dac5571_pwrdwn(data, chan->channel,
chan              194 drivers/iio/dac/ti-dac5571.c 		ret = data->dac5571_cmd(data, chan->channel, data->val[0]);
chan              219 drivers/iio/dac/ti-dac5571.c #define dac5571_CHANNEL(chan, name) {				\
chan              221 drivers/iio/dac/ti-dac5571.c 	.channel = (chan),					\
chan              222 drivers/iio/dac/ti-dac5571.c 	.address = (chan),					\
chan              239 drivers/iio/dac/ti-dac5571.c 			    struct iio_chan_spec const *chan,
chan              247 drivers/iio/dac/ti-dac5571.c 		*val = data->val[chan->channel];
chan              265 drivers/iio/dac/ti-dac5571.c 			     struct iio_chan_spec const *chan,
chan              273 drivers/iio/dac/ti-dac5571.c 		if (data->val[chan->channel] == val)
chan              283 drivers/iio/dac/ti-dac5571.c 		ret = data->dac5571_cmd(data, chan->channel, val);
chan              285 drivers/iio/dac/ti-dac5571.c 			data->val[chan->channel] = val;
chan              295 drivers/iio/dac/ti-dac5571.c 				     struct iio_chan_spec const *chan,
chan               82 drivers/iio/dac/ti-dac7311.c 				     const struct iio_chan_spec *chan)
chan               90 drivers/iio/dac/ti-dac7311.c 				     const struct iio_chan_spec *chan,
chan              108 drivers/iio/dac/ti-dac7311.c 				     const struct iio_chan_spec *chan,
chan              118 drivers/iio/dac/ti-dac7311.c 				      const struct iio_chan_spec *chan,
chan              153 drivers/iio/dac/ti-dac7311.c #define TI_DAC_CHANNEL(chan) {					\
chan              155 drivers/iio/dac/ti-dac7311.c 	.channel = (chan),					\
chan              167 drivers/iio/dac/ti-dac7311.c 			   struct iio_chan_spec const *chan,
chan              192 drivers/iio/dac/ti-dac7311.c 			    struct iio_chan_spec const *chan,
chan              225 drivers/iio/dac/ti-dac7311.c 				    struct iio_chan_spec const *chan, long mask)
chan               52 drivers/iio/dac/ti-dac7612.c #define dac7612_CHANNEL(chan, name) {				\
chan               54 drivers/iio/dac/ti-dac7612.c 	.channel = (chan),					\
chan               68 drivers/iio/dac/ti-dac7612.c 			    const struct iio_chan_spec *chan,
chan               76 drivers/iio/dac/ti-dac7612.c 		*val = priv->cache[chan->channel];
chan               89 drivers/iio/dac/ti-dac7612.c 			     const struct iio_chan_spec *chan,
chan              101 drivers/iio/dac/ti-dac7612.c 	if (val == priv->cache[chan->channel])
chan              105 drivers/iio/dac/ti-dac7612.c 	ret = dac7612_cmd_single(priv, chan->channel, val);
chan               61 drivers/iio/dac/vf610_dac.c 				const struct iio_chan_spec *chan,
chan               81 drivers/iio/dac/vf610_dac.c 				const struct iio_chan_spec *chan)
chan              116 drivers/iio/dac/vf610_dac.c 			struct iio_chan_spec const *chan,
chan              142 drivers/iio/dac/vf610_dac.c 			struct iio_chan_spec const *chan,
chan              280 drivers/iio/dummy/iio_simple_dummy.c 			      struct iio_chan_spec const *chan,
chan              291 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              293 drivers/iio/dummy/iio_simple_dummy.c 			if (chan->output) {
chan              297 drivers/iio/dummy/iio_simple_dummy.c 			} else if (chan->differential) {
chan              298 drivers/iio/dummy/iio_simple_dummy.c 				if (chan->channel == 1)
chan              317 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              323 drivers/iio/dummy/iio_simple_dummy.c 			switch (chan->channel2) {
chan              346 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              348 drivers/iio/dummy/iio_simple_dummy.c 			switch (chan->differential) {
chan              382 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              392 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              423 drivers/iio/dummy/iio_simple_dummy.c 			       struct iio_chan_spec const *chan,
chan              434 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              436 drivers/iio/dummy/iio_simple_dummy.c 			if (chan->output == 0)
chan              448 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              459 drivers/iio/dummy/iio_simple_dummy.c 			switch (chan->channel2) {
chan              492 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan              502 drivers/iio/dummy/iio_simple_dummy.c 		switch (chan->type) {
chan               55 drivers/iio/dummy/iio_simple_dummy.h 				       const struct iio_chan_spec *chan,
chan               60 drivers/iio/dummy/iio_simple_dummy.h 					const struct iio_chan_spec *chan,
chan               66 drivers/iio/dummy/iio_simple_dummy.h 				      const struct iio_chan_spec *chan,
chan               73 drivers/iio/dummy/iio_simple_dummy.h 				       const struct iio_chan_spec *chan,
chan               31 drivers/iio/dummy/iio_simple_dummy_events.c 				       const struct iio_chan_spec *chan,
chan               53 drivers/iio/dummy/iio_simple_dummy_events.c 					const struct iio_chan_spec *chan,
chan               64 drivers/iio/dummy/iio_simple_dummy_events.c 	switch (chan->type) {
chan              118 drivers/iio/dummy/iio_simple_dummy_events.c 				      const struct iio_chan_spec *chan,
chan              141 drivers/iio/dummy/iio_simple_dummy_events.c 				       const struct iio_chan_spec *chan,
chan              631 drivers/iio/frequency/ad9523.c 			   struct iio_chan_spec const *chan,
chan              641 drivers/iio/frequency/ad9523.c 	ret = ad9523_read(indio_dev, AD9523_CHANNEL_CLOCK_DIST(chan->channel));
chan              652 drivers/iio/frequency/ad9523.c 		*val = st->vco_out_freq[st->vco_out_map[chan->channel]] /
chan              667 drivers/iio/frequency/ad9523.c 			    struct iio_chan_spec const *chan,
chan              677 drivers/iio/frequency/ad9523.c 	ret = ad9523_read(indio_dev, AD9523_CHANNEL_CLOCK_DIST(chan->channel));
chan              695 drivers/iio/frequency/ad9523.c 		ret = ad9523_set_clock_provider(indio_dev, chan->channel, val);
chan              698 drivers/iio/frequency/ad9523.c 		tmp = st->vco_out_freq[st->vco_out_map[chan->channel]] / val;
chan              715 drivers/iio/frequency/ad9523.c 	ret = ad9523_write(indio_dev, AD9523_CHANNEL_CLOCK_DIST(chan->channel),
chan              762 drivers/iio/frequency/ad9523.c 	struct ad9523_channel_spec *chan;
chan              910 drivers/iio/frequency/ad9523.c 		chan = &pdata->channels[i];
chan              911 drivers/iio/frequency/ad9523.c 		if (chan->channel_num < AD9523_NUM_CHAN) {
chan              912 drivers/iio/frequency/ad9523.c 			__set_bit(chan->channel_num, &active_mask);
chan              914 drivers/iio/frequency/ad9523.c 				AD9523_CHANNEL_CLOCK_DIST(chan->channel_num),
chan              915 drivers/iio/frequency/ad9523.c 				AD9523_CLK_DIST_DRIVER_MODE(chan->driver_mode) |
chan              916 drivers/iio/frequency/ad9523.c 				AD9523_CLK_DIST_DIV(chan->channel_divider) |
chan              917 drivers/iio/frequency/ad9523.c 				AD9523_CLK_DIST_DIV_PHASE(chan->divider_phase) |
chan              918 drivers/iio/frequency/ad9523.c 				(chan->sync_ignore_en ?
chan              920 drivers/iio/frequency/ad9523.c 				(chan->divider_output_invert_en ?
chan              922 drivers/iio/frequency/ad9523.c 				(chan->low_power_mode_en ?
chan              924 drivers/iio/frequency/ad9523.c 				(chan->output_dis ?
chan              929 drivers/iio/frequency/ad9523.c 			ret = ad9523_vco_out_map(indio_dev, chan->channel_num,
chan              930 drivers/iio/frequency/ad9523.c 					   chan->use_alt_clock_src);
chan              937 drivers/iio/frequency/ad9523.c 			st->ad9523_channels[i].channel = chan->channel_num;
chan              939 drivers/iio/frequency/ad9523.c 				chan->extended_name;
chan              246 drivers/iio/frequency/adf4350.c 				    const struct iio_chan_spec *chan,
chan              306 drivers/iio/frequency/adf4350.c 				   const struct iio_chan_spec *chan,
chan              326 drivers/iio/frequency/adf4371.c 			    const struct iio_chan_spec *chan,
chan              336 drivers/iio/frequency/adf4371.c 		val = adf4371_pll_fract_n_get_rate(st, chan->channel);
chan              347 drivers/iio/frequency/adf4371.c 		reg = adf4371_pwrdown_ch[chan->channel].reg;
chan              348 drivers/iio/frequency/adf4371.c 		bit = adf4371_pwrdown_ch[chan->channel].bit;
chan              357 drivers/iio/frequency/adf4371.c 		return sprintf(buf, "%s\n", adf4371_ch_names[chan->channel]);
chan              369 drivers/iio/frequency/adf4371.c 			     const struct iio_chan_spec *chan,
chan              385 drivers/iio/frequency/adf4371.c 		ret = adf4371_set_freq(st, freq, chan->channel);
chan              392 drivers/iio/frequency/adf4371.c 		reg = adf4371_pwrdown_ch[chan->channel].reg;
chan              393 drivers/iio/frequency/adf4371.c 		bit = adf4371_pwrdown_ch[chan->channel].bit;
chan               75 drivers/iio/gyro/adis16080.c 			     struct iio_chan_spec const *chan,
chan               86 drivers/iio/gyro/adis16080.c 		ret = adis16080_read_sample(indio_dev, chan->address, val);
chan               90 drivers/iio/gyro/adis16080.c 		switch (chan->type) {
chan              109 drivers/iio/gyro/adis16080.c 		switch (chan->type) {
chan               69 drivers/iio/gyro/adis16130.c 			      struct iio_chan_spec const *chan,
chan               80 drivers/iio/gyro/adis16130.c 		ret = adis16130_spi_read(indio_dev, chan->address, &temp);
chan               87 drivers/iio/gyro/adis16130.c 		switch (chan->type) {
chan              102 drivers/iio/gyro/adis16130.c 		switch (chan->type) {
chan              296 drivers/iio/gyro/adis16136.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              304 drivers/iio/gyro/adis16136.c 		return adis_single_conversion(indio_dev, chan, 0, val);
chan              306 drivers/iio/gyro/adis16136.c 		switch (chan->type) {
chan              335 drivers/iio/gyro/adis16136.c 	const struct iio_chan_spec *chan, int val, int val2, long info)
chan              192 drivers/iio/gyro/adis16260.c 			      struct iio_chan_spec const *chan,
chan              205 drivers/iio/gyro/adis16260.c 		return adis_single_conversion(indio_dev, chan,
chan              208 drivers/iio/gyro/adis16260.c 		switch (chan->type) {
chan              218 drivers/iio/gyro/adis16260.c 			if (chan->channel == 0) {
chan              237 drivers/iio/gyro/adis16260.c 		addr = adis16260_addresses[chan->scan_index][0];
chan              245 drivers/iio/gyro/adis16260.c 		addr = adis16260_addresses[chan->scan_index][1];
chan              271 drivers/iio/gyro/adis16260.c 			       struct iio_chan_spec const *chan,
chan              287 drivers/iio/gyro/adis16260.c 		addr = adis16260_addresses[chan->scan_index][0];
chan              293 drivers/iio/gyro/adis16260.c 		addr = adis16260_addresses[chan->scan_index][1];
chan              283 drivers/iio/gyro/adxrs450.c 			      struct iio_chan_spec const *chan,
chan              304 drivers/iio/gyro/adxrs450.c 			     struct iio_chan_spec const *chan,
chan              314 drivers/iio/gyro/adxrs450.c 		switch (chan->type) {
chan              336 drivers/iio/gyro/adxrs450.c 		switch (chan->type) {
chan              549 drivers/iio/gyro/bmg160_core.c 			   struct iio_chan_spec const *chan,
chan              557 drivers/iio/gyro/bmg160_core.c 		switch (chan->type) {
chan              564 drivers/iio/gyro/bmg160_core.c 				return bmg160_get_axis(data, chan->scan_index,
chan              570 drivers/iio/gyro/bmg160_core.c 		if (chan->type == IIO_TEMP) {
chan              578 drivers/iio/gyro/bmg160_core.c 		switch (chan->type) {
chan              611 drivers/iio/gyro/bmg160_core.c 			    struct iio_chan_spec const *chan,
chan              689 drivers/iio/gyro/bmg160_core.c 			     const struct iio_chan_spec *chan,
chan              710 drivers/iio/gyro/bmg160_core.c 			      const struct iio_chan_spec *chan,
chan              733 drivers/iio/gyro/bmg160_core.c 				    const struct iio_chan_spec *chan,
chan              744 drivers/iio/gyro/bmg160_core.c 				     const struct iio_chan_spec *chan,
chan              792 drivers/iio/gyro/bmg160_core.c 			 const struct iio_chan_spec *chan)
chan              529 drivers/iio/gyro/fxas21002c_core.c 			       struct iio_chan_spec const *chan, int *val,
chan              537 drivers/iio/gyro/fxas21002c_core.c 		switch (chan->type) {
chan              541 drivers/iio/gyro/fxas21002c_core.c 			return fxas21002c_axis_get(data, chan->scan_index, val);
chan              546 drivers/iio/gyro/fxas21002c_core.c 		switch (chan->type) {
chan              572 drivers/iio/gyro/fxas21002c_core.c 				struct iio_chan_spec const *chan, int val,
chan              591 drivers/iio/gyro/fxas21002c_core.c 		switch (chan->type) {
chan               93 drivers/iio/gyro/hid-sensor-gyro-3d.c 			      struct iio_chan_spec const *chan,
chan              108 drivers/iio/gyro/hid-sensor-gyro-3d.c 		report_id = gyro_state->gyro[chan->scan_index].report_id;
chan              109 drivers/iio/gyro/hid-sensor-gyro-3d.c 		min = gyro_state->gyro[chan->scan_index].logical_minimum;
chan              110 drivers/iio/gyro/hid-sensor-gyro-3d.c 		address = gyro_3d_addresses[chan->scan_index];
chan              154 drivers/iio/gyro/hid-sensor-gyro-3d.c 			       struct iio_chan_spec const *chan,
chan               85 drivers/iio/gyro/itg3200_core.c 		const struct iio_chan_spec *chan,
chan               94 drivers/iio/gyro/itg3200_core.c 		reg = (u8)chan->address;
chan               99 drivers/iio/gyro/itg3200_core.c 		if (chan->type == IIO_TEMP)
chan              130 drivers/iio/gyro/itg3200_core.c 			     struct iio_chan_spec const *chan,
chan              244 drivers/iio/gyro/itg3200_core.c 			  const struct iio_chan_spec *chan)
chan              262 drivers/iio/gyro/mpu3050-core.c 			    struct iio_chan_spec const *chan,
chan              272 drivers/iio/gyro/mpu3050-core.c 		switch (chan->type) {
chan              281 drivers/iio/gyro/mpu3050-core.c 		switch (chan->type) {
chan              283 drivers/iio/gyro/mpu3050-core.c 			*val = mpu3050->calibration[chan->scan_index-1];
chan              292 drivers/iio/gyro/mpu3050-core.c 		switch (chan->type) {
chan              321 drivers/iio/gyro/mpu3050-core.c 		switch (chan->type) {
chan              337 drivers/iio/gyro/mpu3050-core.c 				       MPU3050_AXIS_REGS(chan->scan_index-1),
chan              369 drivers/iio/gyro/mpu3050-core.c 			     const struct iio_chan_spec *chan,
chan              391 drivers/iio/gyro/mpu3050-core.c 		if (chan->type != IIO_ANGL_VEL)
chan              393 drivers/iio/gyro/mpu3050-core.c 		mpu3050->calibration[chan->scan_index-1] = val;
chan              417 drivers/iio/gyro/mpu3050-core.c 		if (chan->type != IIO_ANGL_VEL)
chan              672 drivers/iio/gyro/mpu3050-core.c 			 const struct iio_chan_spec *chan)
chan               28 drivers/iio/gyro/ssp_gyro_sensor.c 			     struct iio_chan_spec const *chan, int *val,
chan               47 drivers/iio/gyro/ssp_gyro_sensor.c 			      struct iio_chan_spec const *chan, int val,
chan              391 drivers/iio/gyro/st_gyro_core.c 		struct iio_chan_spec const *chan, int val, int val2, long mask)
chan              241 drivers/iio/health/afe4403.c 			    struct iio_chan_spec const *chan,
chan              245 drivers/iio/health/afe4403.c 	unsigned int reg = afe4403_channel_values[chan->address];
chan              246 drivers/iio/health/afe4403.c 	unsigned int field = afe4403_channel_leds[chan->address];
chan              249 drivers/iio/health/afe4403.c 	switch (chan->type) {
chan              280 drivers/iio/health/afe4403.c 			     struct iio_chan_spec const *chan,
chan              284 drivers/iio/health/afe4403.c 	unsigned int field = afe4403_channel_leds[chan->address];
chan              286 drivers/iio/health/afe4403.c 	switch (chan->type) {
chan              247 drivers/iio/health/afe4404.c 			    struct iio_chan_spec const *chan,
chan              251 drivers/iio/health/afe4404.c 	unsigned int value_reg = afe4404_channel_values[chan->address];
chan              252 drivers/iio/health/afe4404.c 	unsigned int led_field = afe4404_channel_leds[chan->address];
chan              253 drivers/iio/health/afe4404.c 	unsigned int offdac_field = afe4404_channel_offdacs[chan->address];
chan              256 drivers/iio/health/afe4404.c 	switch (chan->type) {
chan              292 drivers/iio/health/afe4404.c 			     struct iio_chan_spec const *chan,
chan              296 drivers/iio/health/afe4404.c 	unsigned int led_field = afe4404_channel_leds[chan->address];
chan              297 drivers/iio/health/afe4404.c 	unsigned int offdac_field = afe4404_channel_offdacs[chan->address];
chan              299 drivers/iio/health/afe4404.c 	switch (chan->type) {
chan              379 drivers/iio/health/max30100.c 			     struct iio_chan_spec const *chan,
chan              469 drivers/iio/health/max30102.c 			     struct iio_chan_spec const *chan,
chan              191 drivers/iio/humidity/am2315.c 			   struct iio_chan_spec const *chan,
chan              203 drivers/iio/humidity/am2315.c 		*val = (chan->type == IIO_HUMIDITYRELATIVE) ?
chan              191 drivers/iio/humidity/dht11.c 			  const struct iio_chan_spec *chan,
chan              264 drivers/iio/humidity/dht11.c 	if (chan->type == IIO_TEMP)
chan              266 drivers/iio/humidity/dht11.c 	else if (chan->type == IIO_HUMIDITYRELATIVE)
chan              139 drivers/iio/humidity/hdc100x.c static int hdc100x_set_it_time(struct hdc100x_data *data, int chan, int val2)
chan              141 drivers/iio/humidity/hdc100x.c 	int shift = hdc100x_resolution_shift[chan].shift;
chan              145 drivers/iio/humidity/hdc100x.c 	for (i = 0; i < ARRAY_SIZE(hdc100x_int_time[chan]); i++) {
chan              146 drivers/iio/humidity/hdc100x.c 		if (val2 && val2 == hdc100x_int_time[chan][i]) {
chan              148 drivers/iio/humidity/hdc100x.c 				hdc100x_resolution_shift[chan].mask << shift,
chan              151 drivers/iio/humidity/hdc100x.c 				data->adc_int_us[chan] = val2;
chan              160 drivers/iio/humidity/hdc100x.c 				   struct iio_chan_spec const *chan)
chan              163 drivers/iio/humidity/hdc100x.c 	int delay = data->adc_int_us[chan->address];
chan              168 drivers/iio/humidity/hdc100x.c 	ret = i2c_smbus_write_byte(client, chan->address);
chan              192 drivers/iio/humidity/hdc100x.c 			    struct iio_chan_spec const *chan, int *val,
chan              202 drivers/iio/humidity/hdc100x.c 		if (chan->type == IIO_CURRENT) {
chan              212 drivers/iio/humidity/hdc100x.c 			ret = hdc100x_get_measurement(data, chan);
chan              224 drivers/iio/humidity/hdc100x.c 		*val2 = data->adc_int_us[chan->address];
chan              227 drivers/iio/humidity/hdc100x.c 		if (chan->type == IIO_TEMP) {
chan              247 drivers/iio/humidity/hdc100x.c 			     struct iio_chan_spec const *chan,
chan              259 drivers/iio/humidity/hdc100x.c 		ret = hdc100x_set_it_time(data, chan->address, val2);
chan              263 drivers/iio/humidity/hdc100x.c 		if (chan->type != IIO_CURRENT || val2 != 0)
chan               52 drivers/iio/humidity/hid-sensor-humidity.c 				struct iio_chan_spec const *chan,
chan               59 drivers/iio/humidity/hid-sensor-humidity.c 		if (chan->type != IIO_HUMIDITYRELATIVE)
chan               98 drivers/iio/humidity/hid-sensor-humidity.c 				struct iio_chan_spec const *chan,
chan              486 drivers/iio/humidity/hts221_core.c 			    struct iio_chan_spec const *chan,
chan              501 drivers/iio/humidity/hts221_core.c 		switch (chan->type) {
chan               78 drivers/iio/humidity/htu21.c 			   struct iio_chan_spec const *chan,
chan               74 drivers/iio/humidity/si7005.c 			    struct iio_chan_spec const *chan, int *val,
chan               82 drivers/iio/humidity/si7005.c 		ret = si7005_read_measurement(data, chan->type == IIO_TEMP);
chan               88 drivers/iio/humidity/si7005.c 		if (chan->type == IIO_TEMP) {
chan               97 drivers/iio/humidity/si7005.c 		if (chan->type == IIO_TEMP)
chan               37 drivers/iio/humidity/si7020.c 			   struct iio_chan_spec const *chan, int *val,
chan               46 drivers/iio/humidity/si7020.c 						  chan->type == IIO_TEMP ?
chan               56 drivers/iio/humidity/si7020.c 		if (chan->type == IIO_HUMIDITYRELATIVE)
chan               60 drivers/iio/humidity/si7020.c 		if (chan->type == IIO_TEMP)
chan               76 drivers/iio/humidity/si7020.c 		if (chan->type == IIO_TEMP)
chan               21 drivers/iio/iio_core.h 			   struct iio_chan_spec const *chan,
chan              394 drivers/iio/imu/adis.c 	const struct iio_chan_spec *chan, unsigned int error_mask, int *val)
chan              402 drivers/iio/imu/adis.c 	ret = adis_read_reg(adis, chan->address, &uval,
chan              403 drivers/iio/imu/adis.c 			chan->scan_type.storagebits / 8);
chan              413 drivers/iio/imu/adis.c 	if (chan->scan_type.sign == 's')
chan              414 drivers/iio/imu/adis.c 		*val = sign_extend32(uval, chan->scan_type.realbits - 1);
chan              416 drivers/iio/imu/adis.c 		*val = uval & ((1 << chan->scan_type.realbits) - 1);
chan              507 drivers/iio/imu/adis16400.c 	struct iio_chan_spec const *chan, int val, int val2, long info)
chan              516 drivers/iio/imu/adis16400.c 				adis16400_addresses[chan->scan_index], val);
chan              553 drivers/iio/imu/adis16400.c 	struct iio_chan_spec const *chan, int *val, int *val2, long info)
chan              561 drivers/iio/imu/adis16400.c 		return adis_single_conversion(indio_dev, chan, 0, val);
chan              563 drivers/iio/imu/adis16400.c 		switch (chan->type) {
chan              570 drivers/iio/imu/adis16400.c 			if (chan->channel == 0) {
chan              601 drivers/iio/imu/adis16400.c 				adis16400_addresses[chan->scan_index], &val16);
chan              190 drivers/iio/imu/adis16460.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              196 drivers/iio/imu/adis16460.c 		return adis_single_conversion(indio_dev, chan, 0, val);
chan              198 drivers/iio/imu/adis16460.c 		switch (chan->type) {
chan              224 drivers/iio/imu/adis16460.c 	const struct iio_chan_spec *chan, int val, int val2, long info)
chan              423 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int bias)
chan              425 drivers/iio/imu/adis16480.c 	unsigned int reg = adis16480_calibbias_regs[chan->scan_index];
chan              428 drivers/iio/imu/adis16480.c 	switch (chan->type) {
chan              445 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int *bias)
chan              447 drivers/iio/imu/adis16480.c 	unsigned int reg = adis16480_calibbias_regs[chan->scan_index];
chan              453 drivers/iio/imu/adis16480.c 	switch (chan->type) {
chan              477 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int scale)
chan              479 drivers/iio/imu/adis16480.c 	unsigned int reg = adis16480_calibscale_regs[chan->scan_index];
chan              489 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int *scale)
chan              491 drivers/iio/imu/adis16480.c 	unsigned int reg = adis16480_calibscale_regs[chan->scan_index];
chan              531 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int *freq)
chan              538 drivers/iio/imu/adis16480.c 	reg = ad16480_filter_data[chan->scan_index][0];
chan              539 drivers/iio/imu/adis16480.c 	offset = ad16480_filter_data[chan->scan_index][1];
chan              555 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, unsigned int freq)
chan              564 drivers/iio/imu/adis16480.c 	reg = ad16480_filter_data[chan->scan_index][0];
chan              565 drivers/iio/imu/adis16480.c 	offset = ad16480_filter_data[chan->scan_index][1];
chan              596 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
chan              603 drivers/iio/imu/adis16480.c 		return adis_single_conversion(indio_dev, chan, 0, val);
chan              605 drivers/iio/imu/adis16480.c 		switch (chan->type) {
chan              644 drivers/iio/imu/adis16480.c 		return adis16480_get_calibbias(indio_dev, chan, val);
chan              646 drivers/iio/imu/adis16480.c 		return adis16480_get_calibscale(indio_dev, chan, val);
chan              648 drivers/iio/imu/adis16480.c 		return adis16480_get_filter_freq(indio_dev, chan, val);
chan              657 drivers/iio/imu/adis16480.c 	const struct iio_chan_spec *chan, int val, int val2, long info)
chan              661 drivers/iio/imu/adis16480.c 		return adis16480_set_calibbias(indio_dev, chan, val);
chan              663 drivers/iio/imu/adis16480.c 		return adis16480_set_calibscale(indio_dev, chan, val);
chan              665 drivers/iio/imu/adis16480.c 		return adis16480_set_filter_freq(indio_dev, chan, val);
chan               66 drivers/iio/imu/adis_buffer.c 	const struct iio_chan_spec *chan;
chan              108 drivers/iio/imu/adis_buffer.c 	chan = indio_dev->channels;
chan              109 drivers/iio/imu/adis_buffer.c 	for (i = 0; i < indio_dev->num_channels; i++, chan++) {
chan              110 drivers/iio/imu/adis_buffer.c 		if (!test_bit(chan->scan_index, scan_mask))
chan              112 drivers/iio/imu/adis_buffer.c 		if (chan->scan_type.storagebits == 32)
chan              113 drivers/iio/imu/adis_buffer.c 			*tx++ = cpu_to_be16((chan->address + 2) << 8);
chan              114 drivers/iio/imu/adis_buffer.c 		*tx++ = cpu_to_be16(chan->address << 8);
chan              435 drivers/iio/imu/bmi160/bmi160_core.c 			   struct iio_chan_spec const *chan,
chan              443 drivers/iio/imu/bmi160/bmi160_core.c 		ret = bmi160_get_data(data, chan->type, chan->channel2, val);
chan              450 drivers/iio/imu/bmi160/bmi160_core.c 				       bmi160_to_sensor(chan->type), val2);
chan              453 drivers/iio/imu/bmi160/bmi160_core.c 		ret = bmi160_get_odr(data, bmi160_to_sensor(chan->type),
chan              464 drivers/iio/imu/bmi160/bmi160_core.c 			    struct iio_chan_spec const *chan,
chan              472 drivers/iio/imu/bmi160/bmi160_core.c 					bmi160_to_sensor(chan->type), val2);
chan              475 drivers/iio/imu/bmi160/bmi160_core.c 		return bmi160_set_odr(data, bmi160_to_sensor(chan->type),
chan              390 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 					 struct iio_chan_spec const *chan,
chan              401 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 	switch (chan->type) {
chan              408 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 					      chan->channel2, val);
chan              420 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 					      chan->channel2, val);
chan              450 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		     struct iio_chan_spec const *chan,
chan              462 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		ret = inv_mpu6050_read_channel_data(indio_dev, chan, val);
chan              467 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              490 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              498 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              502 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 						chan->channel2, val);
chan              508 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 						chan->channel2, val);
chan              541 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 				 struct iio_chan_spec const *chan, long mask)
chan              545 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              579 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 				 struct iio_chan_spec const *chan,
chan              600 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              613 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		switch (chan->type) {
chan              617 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 							chan->channel2, val);
chan              622 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 							chan->channel2, val);
chan              805 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c 		     const struct iio_chan_spec *chan)
chan              784 drivers/iio/imu/kmx61.c 			  struct iio_chan_spec const *chan, int *val,
chan              793 drivers/iio/imu/kmx61.c 		switch (chan->type) {
chan              805 drivers/iio/imu/kmx61.c 		ret = kmx61_set_power_state(data, true, chan->address);
chan              811 drivers/iio/imu/kmx61.c 		ret = kmx61_read_measurement(data, base_reg, chan->scan_index);
chan              813 drivers/iio/imu/kmx61.c 			kmx61_set_power_state(data, false, chan->address);
chan              817 drivers/iio/imu/kmx61.c 		*val = sign_extend32(ret >> chan->scan_type.shift,
chan              818 drivers/iio/imu/kmx61.c 				     chan->scan_type.realbits - 1);
chan              819 drivers/iio/imu/kmx61.c 		ret = kmx61_set_power_state(data, false, chan->address);
chan              826 drivers/iio/imu/kmx61.c 		switch (chan->type) {
chan              840 drivers/iio/imu/kmx61.c 		if (chan->type != IIO_ACCEL && chan->type != IIO_MAGN)
chan              844 drivers/iio/imu/kmx61.c 		ret = kmx61_get_odr(data, val, val2, chan->address);
chan              854 drivers/iio/imu/kmx61.c 			   struct iio_chan_spec const *chan, int val,
chan              862 drivers/iio/imu/kmx61.c 		if (chan->type != IIO_ACCEL && chan->type != IIO_MAGN)
chan              866 drivers/iio/imu/kmx61.c 		ret = kmx61_set_odr(data, val, val2, chan->address);
chan              870 drivers/iio/imu/kmx61.c 		switch (chan->type) {
chan              887 drivers/iio/imu/kmx61.c 			    const struct iio_chan_spec *chan,
chan              909 drivers/iio/imu/kmx61.c 			     const struct iio_chan_spec *chan,
chan              933 drivers/iio/imu/kmx61.c 				   const struct iio_chan_spec *chan,
chan              943 drivers/iio/imu/kmx61.c 				    const struct iio_chan_spec *chan,
chan             1239 drivers/iio/imu/kmx61.c 					    const struct iio_chan_spec *chan,
chan             1252 drivers/iio/imu/kmx61.c 	indio_dev->channels = chan;
chan              235 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h 		const struct iio_chan_spec *chan;
chan              104 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              108 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6ds0_gyro_channels,
chan              177 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              181 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan              291 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              295 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan              414 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              418 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan              531 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              535 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan              663 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              667 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan              772 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_acc_channels,
chan              776 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				.chan = st_lsm6dsx_gyro_channels,
chan             1136 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 				struct iio_chan_spec const *chan,
chan             1453 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c 	iio_dev->channels = hw->settings->channels[id].chan;
chan              501 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c 			  struct iio_chan_spec const *chan,
chan              443 drivers/iio/industrialio-buffer.c 					const struct iio_chan_spec *chan)
chan              449 drivers/iio/industrialio-buffer.c 				     chan,
chan              460 drivers/iio/industrialio-buffer.c 				     chan,
chan              470 drivers/iio/industrialio-buffer.c 	if (chan->type != IIO_TIMESTAMP)
chan              472 drivers/iio/industrialio-buffer.c 					     chan,
chan              475 drivers/iio/industrialio-buffer.c 					     chan->scan_index,
chan              481 drivers/iio/industrialio-buffer.c 					     chan,
chan              484 drivers/iio/industrialio-buffer.c 					     chan->scan_index,
chan              424 drivers/iio/industrialio-core.c 	uintptr_t priv, const struct iio_chan_spec *chan, char *buf)
chan              444 drivers/iio/industrialio-core.c 	uintptr_t priv, const struct iio_chan_spec *chan, char *buf)
chan              452 drivers/iio/industrialio-core.c 	i = e->get(indio_dev, chan);
chan              463 drivers/iio/industrialio-core.c 	uintptr_t priv, const struct iio_chan_spec *chan, const char *buf,
chan              476 drivers/iio/industrialio-core.c 	ret = e->set(indio_dev, chan, ret);
chan              498 drivers/iio/industrialio-core.c 			      const struct iio_chan_spec *chan, char *buf)
chan              501 drivers/iio/industrialio-core.c 					      priv)(indio_dev, chan);
chan              877 drivers/iio/industrialio-core.c 			   struct iio_chan_spec const *chan,
chan              893 drivers/iio/industrialio-core.c 	if (chan->modified && (shared_by == IIO_SEPARATE)) {
chan              894 drivers/iio/industrialio-core.c 		if (chan->extend_name)
chan              896 drivers/iio/industrialio-core.c 						 iio_modifier_names[chan
chan              898 drivers/iio/industrialio-core.c 						 chan->extend_name,
chan              902 drivers/iio/industrialio-core.c 						 iio_modifier_names[chan
chan              906 drivers/iio/industrialio-core.c 		if (chan->extend_name == NULL || shared_by != IIO_SEPARATE)
chan              911 drivers/iio/industrialio-core.c 						 chan->extend_name,
chan              917 drivers/iio/industrialio-core.c 	if (chan->differential) { /* Differential can not have modifier */
chan              924 drivers/iio/industrialio-core.c 						iio_direction[chan->output],
chan              929 drivers/iio/industrialio-core.c 					    iio_direction[chan->output],
chan              930 drivers/iio/industrialio-core.c 					    iio_chan_type_name_spec[chan->type],
chan              931 drivers/iio/industrialio-core.c 					    iio_chan_type_name_spec[chan->type],
chan              935 drivers/iio/industrialio-core.c 			if (!chan->indexed) {
chan              942 drivers/iio/industrialio-core.c 					    iio_direction[chan->output],
chan              943 drivers/iio/industrialio-core.c 					    iio_chan_type_name_spec[chan->type],
chan              944 drivers/iio/industrialio-core.c 					    chan->channel,
chan              945 drivers/iio/industrialio-core.c 					    iio_chan_type_name_spec[chan->type],
chan              946 drivers/iio/industrialio-core.c 					    chan->channel2,
chan              957 drivers/iio/industrialio-core.c 						iio_direction[chan->output],
chan              962 drivers/iio/industrialio-core.c 					    iio_direction[chan->output],
chan              963 drivers/iio/industrialio-core.c 					    iio_chan_type_name_spec[chan->type],
chan              968 drivers/iio/industrialio-core.c 			if (chan->indexed)
chan              970 drivers/iio/industrialio-core.c 						    iio_direction[chan->output],
chan              971 drivers/iio/industrialio-core.c 						    iio_chan_type_name_spec[chan->type],
chan              972 drivers/iio/industrialio-core.c 						    chan->channel,
chan              976 drivers/iio/industrialio-core.c 						    iio_direction[chan->output],
chan              977 drivers/iio/industrialio-core.c 						    iio_chan_type_name_spec[chan->type],
chan             1010 drivers/iio/industrialio-core.c 			   struct iio_chan_spec const *chan,
chan             1030 drivers/iio/industrialio-core.c 				     postfix, chan,
chan             1034 drivers/iio/industrialio-core.c 	iio_attr->c = chan;
chan             1057 drivers/iio/industrialio-core.c 					 struct iio_chan_spec const *chan,
chan             1067 drivers/iio/industrialio-core.c 					     chan,
chan             1085 drivers/iio/industrialio-core.c 					       struct iio_chan_spec const *chan,
chan             1102 drivers/iio/industrialio-core.c 					     chan,
chan             1121 drivers/iio/industrialio-core.c 					struct iio_chan_spec const *chan)
chan             1126 drivers/iio/industrialio-core.c 	if (chan->channel < 0)
chan             1128 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type(indio_dev, chan,
chan             1130 drivers/iio/industrialio-core.c 					    &chan->info_mask_separate);
chan             1135 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
chan             1137 drivers/iio/industrialio-core.c 						  &chan->
chan             1143 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type(indio_dev, chan,
chan             1145 drivers/iio/industrialio-core.c 					    &chan->info_mask_shared_by_type);
chan             1150 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
chan             1152 drivers/iio/industrialio-core.c 						  &chan->
chan             1158 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type(indio_dev, chan,
chan             1160 drivers/iio/industrialio-core.c 					    &chan->info_mask_shared_by_dir);
chan             1165 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
chan             1167 drivers/iio/industrialio-core.c 						  &chan->info_mask_shared_by_dir_available);
chan             1172 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type(indio_dev, chan,
chan             1174 drivers/iio/industrialio-core.c 					    &chan->info_mask_shared_by_all);
chan             1179 drivers/iio/industrialio-core.c 	ret = iio_device_add_info_mask_type_avail(indio_dev, chan,
chan             1181 drivers/iio/industrialio-core.c 						  &chan->info_mask_shared_by_all_available);
chan             1186 drivers/iio/industrialio-core.c 	if (chan->ext_info) {
chan             1188 drivers/iio/industrialio-core.c 		for (ext_info = chan->ext_info; ext_info->name; ext_info++) {
chan             1190 drivers/iio/industrialio-core.c 					chan,
chan             1340 drivers/iio/industrialio-core.c 			const struct iio_chan_spec *chan =
chan             1343 drivers/iio/industrialio-core.c 			if (chan->type == IIO_TIMESTAMP)
chan             1346 drivers/iio/industrialio-core.c 			ret = iio_device_add_channel_sysfs(indio_dev, chan);
chan              342 drivers/iio/industrialio-event.c 	const struct iio_chan_spec *chan, unsigned int spec_index,
chan              377 drivers/iio/industrialio-event.c 		ret = __iio_add_chan_devattr(postfix, chan, show, store,
chan              395 drivers/iio/industrialio-event.c 	struct iio_chan_spec const *chan)
chan              401 drivers/iio/industrialio-event.c 	for (i = 0; i < chan->num_event_specs; i++) {
chan              402 drivers/iio/industrialio-event.c 		type = chan->event_spec[i].type;
chan              403 drivers/iio/industrialio-event.c 		dir = chan->event_spec[i].dir;
chan              405 drivers/iio/industrialio-event.c 		ret = iio_device_add_event(indio_dev, chan, i, type, dir,
chan              406 drivers/iio/industrialio-event.c 			IIO_SEPARATE, &chan->event_spec[i].mask_separate);
chan              411 drivers/iio/industrialio-event.c 		ret = iio_device_add_event(indio_dev, chan, i, type, dir,
chan              413 drivers/iio/industrialio-event.c 			&chan->event_spec[i].mask_shared_by_type);
chan              418 drivers/iio/industrialio-event.c 		ret = iio_device_add_event(indio_dev, chan, i, type, dir,
chan              420 drivers/iio/industrialio-event.c 			&chan->event_spec[i].mask_shared_by_dir);
chan              425 drivers/iio/industrialio-event.c 		ret = iio_device_add_event(indio_dev, chan, i, type, dir,
chan              427 drivers/iio/industrialio-event.c 			&chan->event_spec[i].mask_shared_by_all);
chan               80 drivers/iio/inkern.c 	const struct iio_chan_spec *chan = NULL;
chan               85 drivers/iio/inkern.c 			chan = &indio_dev->channels[i];
chan               88 drivers/iio/inkern.c 	return chan;
chan              186 drivers/iio/inkern.c 	struct iio_channel *chan = NULL;
chan              201 drivers/iio/inkern.c 		chan = of_iio_channel_get(np, index);
chan              202 drivers/iio/inkern.c 		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
chan              220 drivers/iio/inkern.c 	return chan;
chan              479 drivers/iio/inkern.c 	struct iio_channel *chan = &channels[0];
chan              481 drivers/iio/inkern.c 	while (chan->indio_dev) {
chan              482 drivers/iio/inkern.c 		iio_device_put(chan->indio_dev);
chan              483 drivers/iio/inkern.c 		chan++;
chan              525 drivers/iio/inkern.c static int iio_channel_read(struct iio_channel *chan, int *val, int *val2,
chan              536 drivers/iio/inkern.c 	if (!iio_channel_has_info(chan->channel, info))
chan              539 drivers/iio/inkern.c 	if (chan->indio_dev->info->read_raw_multi) {
chan              540 drivers/iio/inkern.c 		ret = chan->indio_dev->info->read_raw_multi(chan->indio_dev,
chan              541 drivers/iio/inkern.c 					chan->channel, INDIO_MAX_RAW_ELEMENTS,
chan              546 drivers/iio/inkern.c 		ret = chan->indio_dev->info->read_raw(chan->indio_dev,
chan              547 drivers/iio/inkern.c 					chan->channel, val, val2, info);
chan              552 drivers/iio/inkern.c int iio_read_channel_raw(struct iio_channel *chan, int *val)
chan              556 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              557 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              562 drivers/iio/inkern.c 	ret = iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_RAW);
chan              564 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              570 drivers/iio/inkern.c int iio_read_channel_average_raw(struct iio_channel *chan, int *val)
chan              574 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              575 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              580 drivers/iio/inkern.c 	ret = iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_AVERAGE_RAW);
chan              582 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              588 drivers/iio/inkern.c static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
chan              595 drivers/iio/inkern.c 	ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
chan              599 drivers/iio/inkern.c 	scale_type = iio_channel_read(chan, &scale_val, &scale_val2,
chan              644 drivers/iio/inkern.c int iio_convert_raw_to_processed(struct iio_channel *chan, int raw,
chan              649 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              650 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              655 drivers/iio/inkern.c 	ret = iio_convert_raw_to_processed_unlocked(chan, raw, processed,
chan              658 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              664 drivers/iio/inkern.c int iio_read_channel_attribute(struct iio_channel *chan, int *val, int *val2,
chan              669 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              670 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              675 drivers/iio/inkern.c 	ret = iio_channel_read(chan, val, val2, attribute);
chan              677 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              683 drivers/iio/inkern.c int iio_read_channel_offset(struct iio_channel *chan, int *val, int *val2)
chan              685 drivers/iio/inkern.c 	return iio_read_channel_attribute(chan, val, val2, IIO_CHAN_INFO_OFFSET);
chan              689 drivers/iio/inkern.c int iio_read_channel_processed(struct iio_channel *chan, int *val)
chan              693 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              694 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              699 drivers/iio/inkern.c 	if (iio_channel_has_info(chan->channel, IIO_CHAN_INFO_PROCESSED)) {
chan              700 drivers/iio/inkern.c 		ret = iio_channel_read(chan, val, NULL,
chan              703 drivers/iio/inkern.c 		ret = iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_RAW);
chan              706 drivers/iio/inkern.c 		ret = iio_convert_raw_to_processed_unlocked(chan, *val, val, 1);
chan              710 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              716 drivers/iio/inkern.c int iio_read_channel_scale(struct iio_channel *chan, int *val, int *val2)
chan              718 drivers/iio/inkern.c 	return iio_read_channel_attribute(chan, val, val2, IIO_CHAN_INFO_SCALE);
chan              722 drivers/iio/inkern.c static int iio_channel_read_avail(struct iio_channel *chan,
chan              726 drivers/iio/inkern.c 	if (!iio_channel_has_available(chan->channel, info))
chan              729 drivers/iio/inkern.c 	return chan->indio_dev->info->read_avail(chan->indio_dev, chan->channel,
chan              733 drivers/iio/inkern.c int iio_read_avail_channel_attribute(struct iio_channel *chan,
chan              739 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              740 drivers/iio/inkern.c 	if (!chan->indio_dev->info) {
chan              745 drivers/iio/inkern.c 	ret = iio_channel_read_avail(chan, vals, type, length, attribute);
chan              747 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              753 drivers/iio/inkern.c int iio_read_avail_channel_raw(struct iio_channel *chan,
chan              759 drivers/iio/inkern.c 	ret = iio_read_avail_channel_attribute(chan, vals, &type, length,
chan              770 drivers/iio/inkern.c static int iio_channel_read_max(struct iio_channel *chan,
chan              782 drivers/iio/inkern.c 	ret = iio_channel_read_avail(chan, &vals, type, &length, info);
chan              817 drivers/iio/inkern.c int iio_read_max_channel_raw(struct iio_channel *chan, int *val)
chan              822 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              823 drivers/iio/inkern.c 	if (!chan->indio_dev->info) {
chan              828 drivers/iio/inkern.c 	ret = iio_channel_read_max(chan, val, NULL, &type, IIO_CHAN_INFO_RAW);
chan              830 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              836 drivers/iio/inkern.c int iio_get_channel_type(struct iio_channel *chan, enum iio_chan_type *type)
chan              841 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              842 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              847 drivers/iio/inkern.c 	*type = chan->channel->type;
chan              849 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              855 drivers/iio/inkern.c static int iio_channel_write(struct iio_channel *chan, int val, int val2,
chan              858 drivers/iio/inkern.c 	return chan->indio_dev->info->write_raw(chan->indio_dev,
chan              859 drivers/iio/inkern.c 						chan->channel, val, val2, info);
chan              862 drivers/iio/inkern.c int iio_write_channel_attribute(struct iio_channel *chan, int val, int val2,
chan              867 drivers/iio/inkern.c 	mutex_lock(&chan->indio_dev->info_exist_lock);
chan              868 drivers/iio/inkern.c 	if (chan->indio_dev->info == NULL) {
chan              873 drivers/iio/inkern.c 	ret = iio_channel_write(chan, val, val2, attribute);
chan              875 drivers/iio/inkern.c 	mutex_unlock(&chan->indio_dev->info_exist_lock);
chan              881 drivers/iio/inkern.c int iio_write_channel_raw(struct iio_channel *chan, int val)
chan              883 drivers/iio/inkern.c 	return iio_write_channel_attribute(chan, val, 0, IIO_CHAN_INFO_RAW);
chan              887 drivers/iio/inkern.c unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan)
chan              892 drivers/iio/inkern.c 	if (!chan->channel->ext_info)
chan              895 drivers/iio/inkern.c 	for (ext_info = chan->channel->ext_info; ext_info->name; ext_info++)
chan              903 drivers/iio/inkern.c 						const struct iio_channel *chan,
chan              908 drivers/iio/inkern.c 	if (!chan->channel->ext_info)
chan              911 drivers/iio/inkern.c 	for (ext_info = chan->channel->ext_info; ext_info->name; ++ext_info) {
chan              919 drivers/iio/inkern.c ssize_t iio_read_channel_ext_info(struct iio_channel *chan,
chan              924 drivers/iio/inkern.c 	ext_info = iio_lookup_ext_info(chan, attr);
chan              928 drivers/iio/inkern.c 	return ext_info->read(chan->indio_dev, ext_info->private,
chan              929 drivers/iio/inkern.c 			      chan->channel, buf);
chan              933 drivers/iio/inkern.c ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
chan              938 drivers/iio/inkern.c 	ext_info = iio_lookup_ext_info(chan, attr);
chan              942 drivers/iio/inkern.c 	return ext_info->write(chan->indio_dev, ext_info->private,
chan              943 drivers/iio/inkern.c 			       chan->channel, buf, len);
chan              137 drivers/iio/light/acpi-als.c 			     struct iio_chan_spec const *chan, int *val,
chan              148 drivers/iio/light/acpi-als.c 	if (chan->type != IIO_LIGHT)
chan               64 drivers/iio/light/adjd_s311.c #define ADJD_S311_DATA_REG(chan) (ADJD_S311_DATA_RED + (chan) * 2)
chan               65 drivers/iio/light/adjd_s311.c #define ADJD_S311_INT_REG(chan) (ADJD_S311_INT_RED + (chan) * 2)
chan               66 drivers/iio/light/adjd_s311.c #define ADJD_S311_CAP_REG(chan) (ADJD_S311_CAP_RED + (chan))
chan              169 drivers/iio/light/adjd_s311.c 			   struct iio_chan_spec const *chan,
chan              178 drivers/iio/light/adjd_s311.c 			ADJD_S311_DATA_REG(chan->address), val);
chan              184 drivers/iio/light/adjd_s311.c 			ADJD_S311_CAP_REG(chan->address));
chan              191 drivers/iio/light/adjd_s311.c 			ADJD_S311_INT_REG(chan->address));
chan              206 drivers/iio/light/adjd_s311.c 			       struct iio_chan_spec const *chan,
chan              217 drivers/iio/light/adjd_s311.c 			ADJD_S311_CAP_REG(chan->address), val);
chan              223 drivers/iio/light/adjd_s311.c 			ADJD_S311_INT_REG(chan->address), val2);
chan              111 drivers/iio/light/al3320a.c 			    struct iio_chan_spec const *chan, int *val,
chan              146 drivers/iio/light/al3320a.c 			     struct iio_chan_spec const *chan, int val,
chan              236 drivers/iio/light/apds9300.c 		struct iio_chan_spec const *chan, int *val, int *val2,
chan              243 drivers/iio/light/apds9300.c 	switch (chan->type) {
chan              259 drivers/iio/light/apds9300.c 		ret = apds9300_get_adc_val(data, chan->channel);
chan              274 drivers/iio/light/apds9300.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              295 drivers/iio/light/apds9300.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              313 drivers/iio/light/apds9300.c 		const struct iio_chan_spec *chan,
chan              323 drivers/iio/light/apds9300.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              469 drivers/iio/light/apds9960.c 			     struct iio_chan_spec const *chan,
chan              482 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              484 drivers/iio/light/apds9960.c 			ret = regmap_read(data->regmap, chan->address, val);
chan              489 drivers/iio/light/apds9960.c 			ret = regmap_bulk_read(data->regmap, chan->address,
chan              504 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              517 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              537 drivers/iio/light/apds9960.c 			     struct iio_chan_spec const *chan,
chan              545 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              556 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              571 drivers/iio/light/apds9960.c static inline int apds9960_get_thres_reg(const struct iio_chan_spec *chan,
chan              577 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              589 drivers/iio/light/apds9960.c 		switch (chan->type) {
chan              608 drivers/iio/light/apds9960.c 			       const struct iio_chan_spec *chan,
chan              622 drivers/iio/light/apds9960.c 	ret = apds9960_get_thres_reg(chan, dir, &reg);
chan              626 drivers/iio/light/apds9960.c 	if (chan->type == IIO_PROXIMITY) {
chan              630 drivers/iio/light/apds9960.c 	} else if (chan->type == IIO_INTENSITY) {
chan              644 drivers/iio/light/apds9960.c 				const struct iio_chan_spec *chan,
chan              658 drivers/iio/light/apds9960.c 	ret = apds9960_get_thres_reg(chan, dir, &reg);
chan              662 drivers/iio/light/apds9960.c 	if (chan->type == IIO_PROXIMITY) {
chan              668 drivers/iio/light/apds9960.c 	} else if (chan->type == IIO_INTENSITY) {
chan              682 drivers/iio/light/apds9960.c 				      const struct iio_chan_spec *chan,
chan              688 drivers/iio/light/apds9960.c 	switch (chan->type) {
chan              701 drivers/iio/light/apds9960.c 				       const struct iio_chan_spec *chan,
chan              711 drivers/iio/light/apds9960.c 	switch (chan->type) {
chan              132 drivers/iio/light/bh1750.c 			   struct iio_chan_spec const *chan,
chan              141 drivers/iio/light/bh1750.c 		switch (chan->type) {
chan              168 drivers/iio/light/bh1750.c 			    struct iio_chan_spec const *chan,
chan              100 drivers/iio/light/bh1780.c 			   struct iio_chan_spec const *chan,
chan              108 drivers/iio/light/bh1780.c 		switch (chan->type) {
chan              204 drivers/iio/light/cm32181.c 			    struct iio_chan_spec const *chan,
chan              230 drivers/iio/light/cm32181.c 			     struct iio_chan_spec const *chan,
chan              235 drivers/iio/light/cm3232.c 			struct iio_chan_spec const *chan,
chan              260 drivers/iio/light/cm3232.c 			struct iio_chan_spec const *chan,
chan              156 drivers/iio/light/cm3323.c 			   struct iio_chan_spec const *chan, int *val,
chan              165 drivers/iio/light/cm3323.c 		ret = i2c_smbus_read_word_data(data->client, chan->address);
chan              193 drivers/iio/light/cm3323.c 			    struct iio_chan_spec const *chan, int val,
chan              106 drivers/iio/light/cm3605.c 			   struct iio_chan_spec const *chan,
chan              114 drivers/iio/light/cm3605.c 		switch (chan->type) {
chan              191 drivers/iio/light/cm36651.c 				struct iio_chan_spec const *chan, int *val)
chan              196 drivers/iio/light/cm36651.c 	switch (chan->type) {
chan              198 drivers/iio/light/cm36651.c 		*val = i2c_smbus_read_word_data(client, chan->address);
chan              327 drivers/iio/light/cm36651.c 				struct iio_chan_spec const *chan, int *val)
chan              332 drivers/iio/light/cm36651.c 	if (chan->type == IIO_LIGHT)
chan              334 drivers/iio/light/cm36651.c 	else if (chan->type == IIO_PROXIMITY)
chan              346 drivers/iio/light/cm36651.c 	ret = cm36651_read_output(cm36651, chan, val);
chan              356 drivers/iio/light/cm36651.c 				struct iio_chan_spec const *chan, int *val2)
chan              358 drivers/iio/light/cm36651.c 	switch (chan->type) {
chan              360 drivers/iio/light/cm36651.c 		if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT1)
chan              362 drivers/iio/light/cm36651.c 		else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT2)
chan              364 drivers/iio/light/cm36651.c 		else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT3)
chan              366 drivers/iio/light/cm36651.c 		else if (cm36651->cs_int_time[chan->address] == CM36651_CS_IT4)
chan              391 drivers/iio/light/cm36651.c 				struct iio_chan_spec const *chan, int val)
chan              397 drivers/iio/light/cm36651.c 	switch (chan->type) {
chan              411 drivers/iio/light/cm36651.c 					   int_time >> 2 * (chan->address));
chan              416 drivers/iio/light/cm36651.c 		cm36651->cs_int_time[chan->address] = int_time;
chan              446 drivers/iio/light/cm36651.c 			    struct iio_chan_spec const *chan,
chan              456 drivers/iio/light/cm36651.c 		ret = cm36651_read_channel(cm36651, chan, val);
chan              460 drivers/iio/light/cm36651.c 		ret = cm36651_read_int_time(cm36651, chan, val2);
chan              472 drivers/iio/light/cm36651.c 			     struct iio_chan_spec const *chan,
chan              480 drivers/iio/light/cm36651.c 		ret = cm36651_write_int_time(cm36651, chan, val2);
chan              489 drivers/iio/light/cm36651.c 					const struct iio_chan_spec *chan,
chan              503 drivers/iio/light/cm36651.c 					const struct iio_chan_spec *chan,
chan              529 drivers/iio/light/cm36651.c 					const struct iio_chan_spec *chan,
chan              548 drivers/iio/light/cm36651.c 					const struct iio_chan_spec *chan,
chan               40 drivers/iio/light/cros_ec_light_prox.c 				   struct iio_chan_spec const *chan,
chan               47 drivers/iio/light/cros_ec_light_prox.c 	int idx = chan->scan_index;
chan               53 drivers/iio/light/cros_ec_light_prox.c 		if (chan->type == IIO_PROXIMITY) {
chan               65 drivers/iio/light/cros_ec_light_prox.c 		if (chan->type == IIO_LIGHT) {
chan              115 drivers/iio/light/cros_ec_light_prox.c 		ret = cros_ec_sensors_core_read(&st->core, chan, val, val2,
chan              126 drivers/iio/light/cros_ec_light_prox.c 			       struct iio_chan_spec const *chan,
chan              131 drivers/iio/light/cros_ec_light_prox.c 	int idx = chan->scan_index;
chan              153 drivers/iio/light/cros_ec_light_prox.c 		ret = cros_ec_sensors_core_write(&st->core, chan, val, val2,
chan              177 drivers/iio/light/gp2ap020a00f.c #define GP2AP020A00F_DATA_REG(chan)		(GP2AP020A00F_D0_L_REG + \
chan              178 drivers/iio/light/gp2ap020a00f.c 							(chan) * 2)
chan              997 drivers/iio/light/gp2ap020a00f.c static u8 gp2ap020a00f_get_thresh_reg(const struct iio_chan_spec *chan,
chan             1000 drivers/iio/light/gp2ap020a00f.c 	switch (chan->type) {
chan             1019 drivers/iio/light/gp2ap020a00f.c 					const struct iio_chan_spec *chan,
chan             1033 drivers/iio/light/gp2ap020a00f.c 	thresh_reg_l = gp2ap020a00f_get_thresh_reg(chan, dir);
chan             1078 drivers/iio/light/gp2ap020a00f.c 				       const struct iio_chan_spec *chan,
chan             1090 drivers/iio/light/gp2ap020a00f.c 	thresh_reg_l = gp2ap020a00f_get_thresh_reg(chan, dir);
chan             1161 drivers/iio/light/gp2ap020a00f.c 					   const struct iio_chan_spec *chan,
chan             1172 drivers/iio/light/gp2ap020a00f.c 	switch (chan->type) {
chan             1197 drivers/iio/light/gp2ap020a00f.c 					   const struct iio_chan_spec *chan,
chan             1206 drivers/iio/light/gp2ap020a00f.c 	switch (chan->type) {
chan             1234 drivers/iio/light/gp2ap020a00f.c 				struct iio_chan_spec const *chan, int *val)
chan             1239 drivers/iio/light/gp2ap020a00f.c 	switch (chan->scan_index) {
chan             1260 drivers/iio/light/gp2ap020a00f.c 	err = gp2ap020a00f_read_output(data, chan->address, val);
chan             1280 drivers/iio/light/gp2ap020a00f.c 			   struct iio_chan_spec const *chan,
chan             1292 drivers/iio/light/gp2ap020a00f.c 		err = gp2ap020a00f_read_channel(data, chan, val);
chan               75 drivers/iio/light/hid-sensor-als.c 			      struct iio_chan_spec const *chan,
chan               89 drivers/iio/light/hid-sensor-als.c 		switch (chan->scan_index) {
chan              144 drivers/iio/light/hid-sensor-als.c 			       struct iio_chan_spec const *chan,
chan               56 drivers/iio/light/hid-sensor-prox.c 			      struct iio_chan_spec const *chan,
chan               70 drivers/iio/light/hid-sensor-prox.c 		switch (chan->scan_index) {
chan              124 drivers/iio/light/hid-sensor-prox.c 			       struct iio_chan_spec const *chan,
chan              360 drivers/iio/light/isl29018.c 			      struct iio_chan_spec const *chan,
chan              375 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT) {
chan              382 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT && !val)
chan              386 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT)
chan              400 drivers/iio/light/isl29018.c 			     struct iio_chan_spec const *chan,
chan              416 drivers/iio/light/isl29018.c 		switch (chan->type) {
chan              435 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT) {
chan              442 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT) {
chan              449 drivers/iio/light/isl29018.c 		if (chan->type == IIO_LIGHT) {
chan              355 drivers/iio/light/isl29028.c 			      struct iio_chan_spec const *chan,
chan              369 drivers/iio/light/isl29028.c 	switch (chan->type) {
chan              406 drivers/iio/light/isl29028.c 			__func__, chan->type);
chan              423 drivers/iio/light/isl29028.c 			     struct iio_chan_spec const *chan,
chan              440 drivers/iio/light/isl29028.c 		switch (chan->type) {
chan              460 drivers/iio/light/isl29028.c 		if (chan->type != IIO_PROXIMITY)
chan              468 drivers/iio/light/isl29028.c 		if (chan->type != IIO_LIGHT)
chan              122 drivers/iio/light/isl29125.c 			   struct iio_chan_spec const *chan,
chan              133 drivers/iio/light/isl29125.c 		ret = isl29125_read_data(data, chan->scan_index);
chan              151 drivers/iio/light/isl29125.c 			       struct iio_chan_spec const *chan,
chan              214 drivers/iio/light/jsa1212.c 				struct iio_chan_spec const *chan,
chan              223 drivers/iio/light/jsa1212.c 		switch (chan->type) {
chan              237 drivers/iio/light/jsa1212.c 		switch (chan->type) {
chan              192 drivers/iio/light/lm3533-als.c 				struct iio_chan_spec const *chan,
chan              199 drivers/iio/light/lm3533-als.c 		switch (chan->type) {
chan              204 drivers/iio/light/lm3533-als.c 			ret = lm3533_als_get_current(indio_dev, chan->channel,
chan              622 drivers/iio/light/ltr501.c 			   struct iio_chan_spec const *chan,
chan              631 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              654 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              661 drivers/iio/light/ltr501.c 			*val = le16_to_cpu(chan->address == LTR501_ALS_DATA1 ?
chan              683 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              700 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              707 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              732 drivers/iio/light/ltr501.c 			    struct iio_chan_spec const *chan,
chan              745 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              782 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              799 drivers/iio/light/ltr501.c 		switch (chan->type) {
chan              811 drivers/iio/light/ltr501.c 			ret = ltr501_write_intr_prst(data, chan->type,
chan              829 drivers/iio/light/ltr501.c 			ret = ltr501_write_intr_prst(data, chan->type,
chan              852 drivers/iio/light/ltr501.c 			      const struct iio_chan_spec *chan,
chan              861 drivers/iio/light/ltr501.c 	switch (chan->type) {
chan              912 drivers/iio/light/ltr501.c 			       const struct iio_chan_spec *chan,
chan              924 drivers/iio/light/ltr501.c 	switch (chan->type) {
chan              975 drivers/iio/light/ltr501.c 			     const struct iio_chan_spec *chan,
chan              985 drivers/iio/light/ltr501.c 		return ltr501_read_thresh(indio_dev, chan, type, dir,
chan              989 drivers/iio/light/ltr501.c 					    chan->type, val2);
chan             1001 drivers/iio/light/ltr501.c 			      const struct iio_chan_spec *chan,
chan             1011 drivers/iio/light/ltr501.c 		return ltr501_write_thresh(indio_dev, chan, type, dir,
chan             1014 drivers/iio/light/ltr501.c 		return ltr501_write_intr_prst(iio_priv(indio_dev), chan->type,
chan             1024 drivers/iio/light/ltr501.c 				    const struct iio_chan_spec *chan,
chan             1031 drivers/iio/light/ltr501.c 	switch (chan->type) {
chan             1050 drivers/iio/light/ltr501.c 				     const struct iio_chan_spec *chan,
chan             1061 drivers/iio/light/ltr501.c 	switch (chan->type) {
chan              227 drivers/iio/light/lv0104cs.c 				struct iio_chan_spec const *chan,
chan              233 drivers/iio/light/lv0104cs.c 	if (chan->type != IIO_LIGHT)
chan              370 drivers/iio/light/lv0104cs.c 				struct iio_chan_spec const *chan,
chan              375 drivers/iio/light/lv0104cs.c 	if (chan->type != IIO_LIGHT)
chan              257 drivers/iio/light/max44000.c 			     struct iio_chan_spec const *chan,
chan              267 drivers/iio/light/max44000.c 		switch (chan->type) {
chan              300 drivers/iio/light/max44000.c 		switch (chan->type) {
chan              341 drivers/iio/light/max44000.c 			      struct iio_chan_spec const *chan,
chan              347 drivers/iio/light/max44000.c 	if (mask == IIO_CHAN_INFO_RAW && chan->type == IIO_CURRENT) {
chan              352 drivers/iio/light/max44000.c 	} else if (mask == IIO_CHAN_INFO_INT_TIME && chan->type == IIO_LIGHT) {
chan              361 drivers/iio/light/max44000.c 	} else if (mask == IIO_CHAN_INFO_SCALE && chan->type == IIO_LIGHT) {
chan              376 drivers/iio/light/max44000.c 				      struct iio_chan_spec const *chan,
chan              379 drivers/iio/light/max44000.c 	if (mask == IIO_CHAN_INFO_INT_TIME && chan->type == IIO_LIGHT)
chan              381 drivers/iio/light/max44000.c 	else if (mask == IIO_CHAN_INFO_SCALE && chan->type == IIO_LIGHT)
chan              150 drivers/iio/light/max44009.c 			      struct iio_chan_spec const *chan, int val,
chan              156 drivers/iio/light/max44009.c 	if (mask == IIO_CHAN_INFO_INT_TIME && chan->type == IIO_LIGHT) {
chan              166 drivers/iio/light/max44009.c 				      struct iio_chan_spec const *chan,
chan              247 drivers/iio/light/max44009.c 			     struct iio_chan_spec const *chan, int *val,
chan              256 drivers/iio/light/max44009.c 		switch (chan->type) {
chan              270 drivers/iio/light/max44009.c 		switch (chan->type) {
chan              339 drivers/iio/light/max44009.c 				      const struct iio_chan_spec *chan,
chan              348 drivers/iio/light/max44009.c 	if (info != IIO_EV_INFO_VALUE || chan->type != IIO_LIGHT)
chan              398 drivers/iio/light/max44009.c 				     const struct iio_chan_spec *chan,
chan              407 drivers/iio/light/max44009.c 	if (chan->type != IIO_LIGHT || type != IIO_EV_TYPE_THRESH)
chan              422 drivers/iio/light/max44009.c 				       const struct iio_chan_spec *chan,
chan              430 drivers/iio/light/max44009.c 	if (chan->type != IIO_LIGHT || type != IIO_EV_TYPE_THRESH)
chan              447 drivers/iio/light/max44009.c 				      const struct iio_chan_spec *chan,
chan              453 drivers/iio/light/max44009.c 	if (chan->type != IIO_LIGHT || type != IIO_EV_TYPE_THRESH)
chan              129 drivers/iio/light/noa1305.c 				struct iio_chan_spec const *chan,
chan              137 drivers/iio/light/noa1305.c 		switch (chan->type) {
chan              149 drivers/iio/light/noa1305.c 		switch (chan->type) {
chan              386 drivers/iio/light/opt3001.c 		struct iio_chan_spec const *chan, int *val, int *val2,
chan              395 drivers/iio/light/opt3001.c 	if (chan->type != IIO_LIGHT)
chan              417 drivers/iio/light/opt3001.c 		struct iio_chan_spec const *chan, int val, int val2,
chan              426 drivers/iio/light/opt3001.c 	if (chan->type != IIO_LIGHT)
chan              443 drivers/iio/light/opt3001.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              471 drivers/iio/light/opt3001.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              527 drivers/iio/light/opt3001.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              536 drivers/iio/light/opt3001.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              209 drivers/iio/light/pa12203001.c 			       struct iio_chan_spec const *chan, int *val,
chan              220 drivers/iio/light/pa12203001.c 		switch (chan->type) {
chan              277 drivers/iio/light/pa12203001.c 				struct iio_chan_spec const *chan, int val,
chan              578 drivers/iio/light/rpr0521.c static int rpr0521_get_gain(struct rpr0521_data *data, int chan,
chan              583 drivers/iio/light/rpr0521.c 	ret = regmap_read(data->regmap, rpr0521_gain[chan].reg, &reg);
chan              587 drivers/iio/light/rpr0521.c 	idx = (rpr0521_gain[chan].mask & reg) >> rpr0521_gain[chan].shift;
chan              588 drivers/iio/light/rpr0521.c 	*val = rpr0521_gain[chan].gain[idx].scale;
chan              589 drivers/iio/light/rpr0521.c 	*val2 = rpr0521_gain[chan].gain[idx].uscale;
chan              594 drivers/iio/light/rpr0521.c static int rpr0521_set_gain(struct rpr0521_data *data, int chan,
chan              600 drivers/iio/light/rpr0521.c 	for (i = 0; i < rpr0521_gain[chan].size; i++)
chan              601 drivers/iio/light/rpr0521.c 		if (val == rpr0521_gain[chan].gain[i].scale &&
chan              602 drivers/iio/light/rpr0521.c 		    val2 == rpr0521_gain[chan].gain[i].uscale) {
chan              610 drivers/iio/light/rpr0521.c 	return regmap_update_bits(data->regmap, rpr0521_gain[chan].reg,
chan              611 drivers/iio/light/rpr0521.c 				  rpr0521_gain[chan].mask,
chan              612 drivers/iio/light/rpr0521.c 				  idx << rpr0521_gain[chan].shift);
chan              716 drivers/iio/light/rpr0521.c 			    struct iio_chan_spec const *chan, int *val,
chan              727 drivers/iio/light/rpr0521.c 		if (chan->type != IIO_INTENSITY && chan->type != IIO_PROXIMITY)
chan              734 drivers/iio/light/rpr0521.c 		device_mask = rpr0521_data_reg[chan->address].device_mask;
chan              742 drivers/iio/light/rpr0521.c 				       rpr0521_data_reg[chan->address].address,
chan              763 drivers/iio/light/rpr0521.c 		ret = rpr0521_get_gain(data, chan->address, val, val2);
chan              772 drivers/iio/light/rpr0521.c 		ret = rpr0521_read_samp_freq(data, chan->type, val, val2);
chan              794 drivers/iio/light/rpr0521.c 			     struct iio_chan_spec const *chan, int val,
chan              803 drivers/iio/light/rpr0521.c 		ret = rpr0521_set_gain(data, chan->address, val, val2);
chan              810 drivers/iio/light/rpr0521.c 		ret = rpr0521_write_samp_freq_common(data, chan->type,
chan              615 drivers/iio/light/si1133.c 			  struct iio_chan_spec const *chan,
chan              622 drivers/iio/light/si1133.c 	err = si1133_set_adcmux(data, 0, chan->channel);
chan              754 drivers/iio/light/si1133.c 			   struct iio_chan_spec const *chan,
chan              763 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              774 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              777 drivers/iio/light/si1133.c 			err = si1133_measure(data, chan, val);
chan              786 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              798 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              811 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              828 drivers/iio/light/si1133.c 			    struct iio_chan_spec const *chan,
chan              835 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              852 drivers/iio/light/si1133.c 		switch (chan->type) {
chan              561 drivers/iio/light/si1145.c 			  struct iio_chan_spec const *chan)
chan              567 drivers/iio/light/si1145.c 	ret = si1145_set_chlist(indio_dev, BIT(chan->scan_index));
chan              571 drivers/iio/light/si1145.c 	cmd = (chan->type == IIO_PROXIMITY) ? SI1145_CMD_PS_FORCE :
chan              577 drivers/iio/light/si1145.c 	return i2c_smbus_read_word_data(data->client, chan->address);
chan              621 drivers/iio/light/si1145.c 				struct iio_chan_spec const *chan,
chan              630 drivers/iio/light/si1145.c 		switch (chan->type) {
chan              639 drivers/iio/light/si1145.c 			ret = si1145_measure(indio_dev, chan);
chan              650 drivers/iio/light/si1145.c 				SI1145_PS_LED_REG(chan->channel));
chan              654 drivers/iio/light/si1145.c 			*val = (ret >> SI1145_PS_LED_SHIFT(chan->channel))
chan              662 drivers/iio/light/si1145.c 		switch (chan->type) {
chan              667 drivers/iio/light/si1145.c 			if (chan->channel2 == IIO_MOD_LIGHT_IR)
chan              692 drivers/iio/light/si1145.c 		switch (chan->type) {
chan              720 drivers/iio/light/si1145.c 			       struct iio_chan_spec const *chan,
chan              729 drivers/iio/light/si1145.c 		switch (chan->type) {
chan              741 drivers/iio/light/si1145.c 			if (chan->channel2 == IIO_MOD_LIGHT_IR) {
chan              767 drivers/iio/light/si1145.c 		if (chan->type != IIO_CURRENT)
chan              773 drivers/iio/light/si1145.c 		reg1 = SI1145_PS_LED_REG(chan->channel);
chan              774 drivers/iio/light/si1145.c 		shift = SI1145_PS_LED_SHIFT(chan->channel);
chan              192 drivers/iio/light/stk3310.c 			      const struct iio_chan_spec *chan,
chan              227 drivers/iio/light/stk3310.c 			       const struct iio_chan_spec *chan,
chan              263 drivers/iio/light/stk3310.c 				     const struct iio_chan_spec *chan,
chan              279 drivers/iio/light/stk3310.c 				      const struct iio_chan_spec *chan,
chan              302 drivers/iio/light/stk3310.c 			    struct iio_chan_spec const *chan,
chan              312 drivers/iio/light/stk3310.c 	if (chan->type != IIO_LIGHT && chan->type != IIO_PROXIMITY)
chan              317 drivers/iio/light/stk3310.c 		if (chan->type == IIO_LIGHT)
chan              333 drivers/iio/light/stk3310.c 		if (chan->type == IIO_LIGHT)
chan              344 drivers/iio/light/stk3310.c 		if (chan->type == IIO_LIGHT)
chan              360 drivers/iio/light/stk3310.c 			     struct iio_chan_spec const *chan,
chan              367 drivers/iio/light/stk3310.c 	if (chan->type != IIO_LIGHT && chan->type != IIO_PROXIMITY)
chan              378 drivers/iio/light/stk3310.c 		if (chan->type == IIO_LIGHT)
chan              395 drivers/iio/light/stk3310.c 		if (chan->type == IIO_LIGHT)
chan              125 drivers/iio/light/tcs3414.c 			   struct iio_chan_spec const *chan,
chan              141 drivers/iio/light/tcs3414.c 		ret = i2c_smbus_read_word_data(data->client, chan->address);
chan              161 drivers/iio/light/tcs3414.c 			       struct iio_chan_spec const *chan,
chan              139 drivers/iio/light/tcs3472.c 			   struct iio_chan_spec const *chan,
chan              155 drivers/iio/light/tcs3472.c 		ret = i2c_smbus_read_word_data(data->client, chan->address);
chan              174 drivers/iio/light/tcs3472.c 			       struct iio_chan_spec const *chan,
chan              220 drivers/iio/light/tcs3472.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              254 drivers/iio/light/tcs3472.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              311 drivers/iio/light/tcs3472.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              325 drivers/iio/light/tcs3472.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              443 drivers/iio/light/tsl2563.c 			       struct iio_chan_spec const *chan,
chan              452 drivers/iio/light/tsl2563.c 	if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
chan              454 drivers/iio/light/tsl2563.c 	else if (chan->channel2 == IIO_MOD_LIGHT_IR)
chan              463 drivers/iio/light/tsl2563.c 			    struct iio_chan_spec const *chan,
chan              476 drivers/iio/light/tsl2563.c 		switch (chan->type) {
chan              492 drivers/iio/light/tsl2563.c 			if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
chan              504 drivers/iio/light/tsl2563.c 		if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
chan              558 drivers/iio/light/tsl2563.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              579 drivers/iio/light/tsl2563.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              628 drivers/iio/light/tsl2563.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              670 drivers/iio/light/tsl2563.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              651 drivers/iio/light/tsl2583.c 			    struct iio_chan_spec const *chan,
chan              666 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              680 drivers/iio/light/tsl2583.c 			if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
chan              689 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              699 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              705 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              711 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              740 drivers/iio/light/tsl2583.c 			     struct iio_chan_spec const *chan,
chan              755 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              761 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT) {
chan              774 drivers/iio/light/tsl2583.c 		if (chan->type == IIO_LIGHT && !val && val2 >= 50 &&
chan              902 drivers/iio/light/tsl2772.c 			      struct iio_chan_spec const *chan,
chan              910 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan             1072 drivers/iio/light/tsl2772.c 					 const struct iio_chan_spec *chan,
chan             1078 drivers/iio/light/tsl2772.c 	if (chan->type == IIO_INTENSITY)
chan             1085 drivers/iio/light/tsl2772.c 					  const struct iio_chan_spec *chan,
chan             1092 drivers/iio/light/tsl2772.c 	if (chan->type == IIO_INTENSITY)
chan             1101 drivers/iio/light/tsl2772.c 				     const struct iio_chan_spec *chan,
chan             1113 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan             1142 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY)
chan             1151 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan             1174 drivers/iio/light/tsl2772.c 				    const struct iio_chan_spec *chan,
chan             1186 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan             1211 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan             1235 drivers/iio/light/tsl2772.c 			    struct iio_chan_spec const *chan,
chan             1244 drivers/iio/light/tsl2772.c 		switch (chan->type) {
chan             1253 drivers/iio/light/tsl2772.c 		switch (chan->type) {
chan             1256 drivers/iio/light/tsl2772.c 			if (chan->channel == 0)
chan             1270 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_LIGHT)
chan             1289 drivers/iio/light/tsl2772.c 			     struct iio_chan_spec const *chan,
chan             1298 drivers/iio/light/tsl2772.c 		if (chan->type == IIO_INTENSITY) {
chan               75 drivers/iio/light/tsl4531.c 				struct iio_chan_spec const *chan,
chan              110 drivers/iio/light/tsl4531.c 			     struct iio_chan_spec const *chan,
chan              382 drivers/iio/light/us5182d.c 			      struct iio_chan_spec const *chan)
chan              398 drivers/iio/light/us5182d.c 	if (chan->type == IIO_LIGHT)
chan              422 drivers/iio/light/us5182d.c 			    struct iio_chan_spec const *chan, int *val,
chan              430 drivers/iio/light/us5182d.c 		ret = us5182d_read_value(data, chan);
chan              497 drivers/iio/light/us5182d.c 			     struct iio_chan_spec const *chan, int val,
chan              538 drivers/iio/light/us5182d.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              563 drivers/iio/light/us5182d.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              605 drivers/iio/light/us5182d.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              631 drivers/iio/light/us5182d.c 	const struct iio_chan_spec *chan, enum iio_event_type type,
chan              237 drivers/iio/light/vcnl4000.c 		struct vcnl4200_channel *chan, int *val)
chan              243 drivers/iio/light/vcnl4000.c 	mutex_lock(&chan->lock);
chan              245 drivers/iio/light/vcnl4000.c 	next_measurement = ktime_add(chan->last_measurement,
chan              246 drivers/iio/light/vcnl4000.c 			chan->sampling_rate);
chan              250 drivers/iio/light/vcnl4000.c 	chan->last_measurement = ktime_get();
chan              252 drivers/iio/light/vcnl4000.c 	mutex_unlock(&chan->lock);
chan              254 drivers/iio/light/vcnl4000.c 	ret = i2c_smbus_read_word_data(data->client, chan->reg);
chan              326 drivers/iio/light/vcnl4000.c 				struct iio_chan_spec const *chan,
chan              334 drivers/iio/light/vcnl4000.c 		switch (chan->type) {
chan              349 drivers/iio/light/vcnl4000.c 		if (chan->type != IIO_LIGHT)
chan              172 drivers/iio/light/vcnl4035.c 			    struct iio_chan_spec const *chan, int *val,
chan              188 drivers/iio/light/vcnl4035.c 			if (chan->channel)
chan              219 drivers/iio/light/vcnl4035.c 				struct iio_chan_spec const *chan,
chan              249 drivers/iio/light/vcnl4035.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              278 drivers/iio/light/vcnl4035.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              112 drivers/iio/light/veml6070.c 				struct iio_chan_spec const *chan,
chan              292 drivers/iio/light/vl6180.c 				struct iio_chan_spec const *chan,
chan              300 drivers/iio/light/vl6180.c 		ret = vl6180_measure(data, chan->address);
chan              313 drivers/iio/light/vl6180.c 		switch (chan->type) {
chan              416 drivers/iio/light/vl6180.c 			     struct iio_chan_spec const *chan,
chan              426 drivers/iio/light/vl6180.c 		if (chan->type != IIO_LIGHT)
chan              253 drivers/iio/light/zopt2201.c 				struct iio_chan_spec const *chan,
chan              262 drivers/iio/light/zopt2201.c 		ret = zopt2201_read(data, chan->address);
chan              276 drivers/iio/light/zopt2201.c 		switch (chan->address) {
chan              409 drivers/iio/light/zopt2201.c 			      struct iio_chan_spec const *chan,
chan              418 drivers/iio/light/zopt2201.c 		switch (chan->address) {
chan              538 drivers/iio/magnetometer/ak8974.c 			   struct iio_chan_spec const *chan,
chan              551 drivers/iio/magnetometer/ak8974.c 		if (chan->address > 2) {
chan              567 drivers/iio/magnetometer/ak8974.c 		*val = (s16)le16_to_cpu(hw_values[chan->address]);
chan              622 drivers/iio/magnetometer/ak8974.c 			const struct iio_chan_spec *chan)
chan              715 drivers/iio/magnetometer/ak8975.c 			   struct iio_chan_spec const *chan,
chan              723 drivers/iio/magnetometer/ak8975.c 		return ak8975_read_axis(indio_dev, chan->address, val);
chan              726 drivers/iio/magnetometer/ak8975.c 		*val2 = data->raw_to_gauss[chan->address];
chan              734 drivers/iio/magnetometer/ak8975.c 			const struct iio_chan_spec *chan)
chan              455 drivers/iio/magnetometer/bmc150_magn.c 				struct iio_chan_spec const *chan,
chan              480 drivers/iio/magnetometer/bmc150_magn.c 		*val = values[chan->scan_index];
chan              505 drivers/iio/magnetometer/bmc150_magn.c 		switch (chan->channel2) {
chan              530 drivers/iio/magnetometer/bmc150_magn.c 				 struct iio_chan_spec const *chan,
chan              545 drivers/iio/magnetometer/bmc150_magn.c 		switch (chan->channel2) {
chan              610 drivers/iio/magnetometer/bmc150_magn.c 			      const struct iio_chan_spec *chan)
chan              145 drivers/iio/magnetometer/hid-sensor-magn-3d.c 			      struct iio_chan_spec const *chan,
chan              160 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		report_id = magn_state->magn[chan->address].report_id;
chan              161 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		min = magn_state->magn[chan->address].logical_minimum;
chan              162 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		address = magn_3d_addresses[chan->address];
chan              182 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		switch (chan->type) {
chan              198 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		switch (chan->type) {
chan              216 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		switch (chan->type) {
chan              239 drivers/iio/magnetometer/hid-sensor-magn-3d.c 			       struct iio_chan_spec const *chan,
chan              253 drivers/iio/magnetometer/hid-sensor-magn-3d.c 		switch (chan->type) {
chan              208 drivers/iio/magnetometer/hmc5843_core.c 					   const struct iio_chan_spec *chan)
chan              223 drivers/iio/magnetometer/hmc5843_core.c 					  const struct iio_chan_spec *chan,
chan              233 drivers/iio/magnetometer/hmc5843_core.c 			  const struct iio_chan_spec *chan)
chan              365 drivers/iio/magnetometer/hmc5843_core.c 			    struct iio_chan_spec const *chan,
chan              374 drivers/iio/magnetometer/hmc5843_core.c 		return hmc5843_read_measurement(data, chan->scan_index, val);
chan              396 drivers/iio/magnetometer/hmc5843_core.c 			     struct iio_chan_spec const *chan,
chan              421 drivers/iio/magnetometer/hmc5843_core.c 				     struct iio_chan_spec const *chan,
chan              269 drivers/iio/magnetometer/mag3110.c 			    struct iio_chan_spec const *chan,
chan              282 drivers/iio/magnetometer/mag3110.c 		switch (chan->type) {
chan              288 drivers/iio/magnetometer/mag3110.c 				be16_to_cpu(buffer[chan->scan_index]), 15);
chan              314 drivers/iio/magnetometer/mag3110.c 		switch (chan->type) {
chan              332 drivers/iio/magnetometer/mag3110.c 			MAG3110_OFF_X +	2 * chan->scan_index);
chan              342 drivers/iio/magnetometer/mag3110.c 			     struct iio_chan_spec const *chan,
chan              375 drivers/iio/magnetometer/mag3110.c 			MAG3110_OFF_X + 2 * chan->scan_index, val << 1);
chan              352 drivers/iio/magnetometer/mmc35240.c 			     struct iio_chan_spec const *chan, int *val,
chan              367 drivers/iio/magnetometer/mmc35240.c 		ret = mmc35240_raw_to_mgauss(data, chan->address, buf, val);
chan              395 drivers/iio/magnetometer/mmc35240.c 			      struct iio_chan_spec const *chan, int val,
chan              400 drivers/iio/magnetometer/rm3100-core.c 			   const struct iio_chan_spec *chan,
chan              412 drivers/iio/magnetometer/rm3100-core.c 		ret = rm3100_read_mag(data, chan->scan_index, val);
chan              429 drivers/iio/magnetometer/rm3100-core.c 			    struct iio_chan_spec const *chan,
chan              420 drivers/iio/magnetometer/st_magn_core.c 		struct iio_chan_spec const *chan, int val, int val2, long mask)
chan               33 drivers/iio/multiplexer/iio-mux.c 	struct iio_chan_spec *chan;
chan               41 drivers/iio/multiplexer/iio-mux.c 	struct iio_chan_spec const *chan = &mux->chan[idx];
chan               45 drivers/iio/multiplexer/iio-mux.c 	ret = mux_control_select(mux->control, chan->channel);
chan               51 drivers/iio/multiplexer/iio-mux.c 	if (mux->cached_state == chan->channel)
chan               54 drivers/iio/multiplexer/iio-mux.c 	if (chan->ext_info) {
chan               55 drivers/iio/multiplexer/iio-mux.c 		for (i = 0; chan->ext_info[i].name; ++i) {
chan               56 drivers/iio/multiplexer/iio-mux.c 			const char *attr = chan->ext_info[i].name;
chan               75 drivers/iio/multiplexer/iio-mux.c 	mux->cached_state = chan->channel;
chan               86 drivers/iio/multiplexer/iio-mux.c 			struct iio_chan_spec const *chan,
chan               90 drivers/iio/multiplexer/iio-mux.c 	int idx = chan - mux->chan;
chan              116 drivers/iio/multiplexer/iio-mux.c 			  struct iio_chan_spec const *chan,
chan              121 drivers/iio/multiplexer/iio-mux.c 	int idx = chan - mux->chan;
chan              144 drivers/iio/multiplexer/iio-mux.c 			 struct iio_chan_spec const *chan,
chan              148 drivers/iio/multiplexer/iio-mux.c 	int idx = chan - mux->chan;
chan              176 drivers/iio/multiplexer/iio-mux.c 				 struct iio_chan_spec const *chan, char *buf)
chan              179 drivers/iio/multiplexer/iio-mux.c 	int idx = chan - mux->chan;
chan              196 drivers/iio/multiplexer/iio-mux.c 				  struct iio_chan_spec const *chan,
chan              201 drivers/iio/multiplexer/iio-mux.c 	int idx = chan - mux->chan;
chan              242 drivers/iio/multiplexer/iio-mux.c 	struct iio_chan_spec *chan = &mux->chan[idx];
chan              249 drivers/iio/multiplexer/iio-mux.c 	chan->indexed = 1;
chan              250 drivers/iio/multiplexer/iio-mux.c 	chan->output = pchan->output;
chan              251 drivers/iio/multiplexer/iio-mux.c 	chan->datasheet_name = label;
chan              252 drivers/iio/multiplexer/iio-mux.c 	chan->ext_info = mux->ext_info;
chan              254 drivers/iio/multiplexer/iio-mux.c 	ret = iio_get_channel_type(mux->parent, &chan->type);
chan              261 drivers/iio/multiplexer/iio-mux.c 		chan->info_mask_separate |= BIT(IIO_CHAN_INFO_RAW);
chan              263 drivers/iio/multiplexer/iio-mux.c 		chan->info_mask_separate |= BIT(IIO_CHAN_INFO_SCALE);
chan              266 drivers/iio/multiplexer/iio-mux.c 		chan->info_mask_separate_available |= BIT(IIO_CHAN_INFO_RAW);
chan              273 drivers/iio/multiplexer/iio-mux.c 	chan->channel = state;
chan              381 drivers/iio/multiplexer/iio-mux.c 	sizeof_priv += sizeof(*mux->chan) * children;
chan              390 drivers/iio/multiplexer/iio-mux.c 	mux->chan = (struct iio_chan_spec *)(mux->child + children);
chan              401 drivers/iio/multiplexer/iio-mux.c 	indio_dev->channels = mux->chan;
chan               82 drivers/iio/orientation/hid-sensor-incl-3d.c static void incl_3d_adjust_channel_bit_mask(struct iio_chan_spec *chan,
chan               85 drivers/iio/orientation/hid-sensor-incl-3d.c 	chan->scan_type.sign = 's';
chan               87 drivers/iio/orientation/hid-sensor-incl-3d.c 	chan->scan_type.realbits = size * 8;
chan               89 drivers/iio/orientation/hid-sensor-incl-3d.c 	chan->scan_type.storagebits = sizeof(u32) * 8;
chan               94 drivers/iio/orientation/hid-sensor-incl-3d.c 			      struct iio_chan_spec const *chan,
chan              109 drivers/iio/orientation/hid-sensor-incl-3d.c 		report_id = incl_state->incl[chan->scan_index].report_id;
chan              110 drivers/iio/orientation/hid-sensor-incl-3d.c 		min = incl_state->incl[chan->scan_index].logical_minimum;
chan              111 drivers/iio/orientation/hid-sensor-incl-3d.c 		address = incl_3d_addresses[chan->scan_index];
chan              154 drivers/iio/orientation/hid-sensor-incl-3d.c 			       struct iio_chan_spec const *chan,
chan               47 drivers/iio/orientation/hid-sensor-rotation.c static void dev_rot_adjust_channel_bit_mask(struct iio_chan_spec *chan,
chan               50 drivers/iio/orientation/hid-sensor-rotation.c 	chan->scan_type.sign = 's';
chan               52 drivers/iio/orientation/hid-sensor-rotation.c 	chan->scan_type.realbits = size * 8;
chan               54 drivers/iio/orientation/hid-sensor-rotation.c 	chan->scan_type.storagebits = sizeof(u32) * 8;
chan               55 drivers/iio/orientation/hid-sensor-rotation.c 	chan->scan_type.repeat = 4;
chan               60 drivers/iio/orientation/hid-sensor-rotation.c 				struct iio_chan_spec const *chan,
chan              108 drivers/iio/orientation/hid-sensor-rotation.c 			       struct iio_chan_spec const *chan,
chan               99 drivers/iio/potentiometer/ad5272.c 			   struct iio_chan_spec const *chan,
chan              121 drivers/iio/potentiometer/ad5272.c 			    struct iio_chan_spec const *chan,
chan               20 drivers/iio/potentiometer/ds1803.c #define DS1803_WRITE(chan)	(0xa8 | ((chan) + 1))
chan               58 drivers/iio/potentiometer/ds1803.c 			    struct iio_chan_spec const *chan,
chan               62 drivers/iio/potentiometer/ds1803.c 	int pot = chan->channel;
chan               86 drivers/iio/potentiometer/ds1803.c 			     struct iio_chan_spec const *chan,
chan               90 drivers/iio/potentiometer/ds1803.c 	int pot = chan->channel;
chan               44 drivers/iio/potentiometer/max5432.c 			struct iio_chan_spec const *chan,
chan               62 drivers/iio/potentiometer/max5432.c 			struct iio_chan_spec const *chan,
chan               79 drivers/iio/potentiometer/max5432.c 	return i2c_smbus_write_byte_data(data->client, chan->address,
chan               86 drivers/iio/potentiometer/max5481.c 		struct iio_chan_spec const *chan,
chan              101 drivers/iio/potentiometer/max5481.c 		struct iio_chan_spec const *chan,
chan               50 drivers/iio/potentiometer/max5487.c 			    struct iio_chan_spec const *chan,
chan               65 drivers/iio/potentiometer/max5487.c 			     struct iio_chan_spec const *chan,
chan               76 drivers/iio/potentiometer/max5487.c 	return max5487_write_cmd(data->spi, chan->address | val);
chan               57 drivers/iio/potentiometer/mcp4018.c 			    struct iio_chan_spec const *chan,
chan               80 drivers/iio/potentiometer/mcp4018.c 			     struct iio_chan_spec const *chan,
chan               81 drivers/iio/potentiometer/mcp41010.c 			    struct iio_chan_spec const *chan,
chan               85 drivers/iio/potentiometer/mcp41010.c 	int channel = chan->channel;
chan              102 drivers/iio/potentiometer/mcp41010.c 			     struct iio_chan_spec const *chan,
chan              107 drivers/iio/potentiometer/mcp41010.c 	int channel = chan->channel;
chan              165 drivers/iio/potentiometer/mcp4131.c 			    struct iio_chan_spec const *chan,
chan              170 drivers/iio/potentiometer/mcp4131.c 	int address = chan->channel;
chan              206 drivers/iio/potentiometer/mcp4131.c 			     struct iio_chan_spec const *chan,
chan              211 drivers/iio/potentiometer/mcp4131.c 	int address = chan->channel << MCP4131_WIPER_SHIFT;
chan              140 drivers/iio/potentiometer/mcp4531.c 			    struct iio_chan_spec const *chan,
chan              144 drivers/iio/potentiometer/mcp4531.c 	int address = chan->channel << MCP4531_WIPER_SHIFT;
chan              165 drivers/iio/potentiometer/mcp4531.c 			      struct iio_chan_spec const *chan,
chan              183 drivers/iio/potentiometer/mcp4531.c 			     struct iio_chan_spec const *chan,
chan              187 drivers/iio/potentiometer/mcp4531.c 	int address = chan->channel << MCP4531_WIPER_SHIFT;
chan               64 drivers/iio/potentiometer/tpl0102.c 			    struct iio_chan_spec const *chan,
chan               71 drivers/iio/potentiometer/tpl0102.c 		int ret = regmap_read(data->regmap, chan->channel, val);
chan               85 drivers/iio/potentiometer/tpl0102.c 			      struct iio_chan_spec const *chan,
chan              103 drivers/iio/potentiometer/tpl0102.c 			     struct iio_chan_spec const *chan,
chan              114 drivers/iio/potentiometer/tpl0102.c 	return regmap_write(data->regmap, chan->channel, val);
chan              156 drivers/iio/potentiostat/lmp91000.c 			     struct iio_chan_spec const *chan,
chan              169 drivers/iio/potentiostat/lmp91000.c 		ret = lmp91000_read(data, chan->address, val);
chan              131 drivers/iio/pressure/abp060mg.c 			struct iio_chan_spec const *chan, int *val,
chan              427 drivers/iio/pressure/bmp280-core.c 			   struct iio_chan_spec const *chan,
chan              438 drivers/iio/pressure/bmp280-core.c 		switch (chan->type) {
chan              454 drivers/iio/pressure/bmp280-core.c 		switch (chan->type) {
chan              536 drivers/iio/pressure/bmp280-core.c 			    struct iio_chan_spec const *chan,
chan              546 drivers/iio/pressure/bmp280-core.c 		switch (chan->type) {
chan               38 drivers/iio/pressure/cros_ec_baro.c 			     struct iio_chan_spec const *chan,
chan               44 drivers/iio/pressure/cros_ec_baro.c 	int idx = chan->scan_index;
chan               73 drivers/iio/pressure/cros_ec_baro.c 		ret = cros_ec_sensors_core_read(&st->core, chan, val, val2,
chan               84 drivers/iio/pressure/cros_ec_baro.c 			      struct iio_chan_spec const *chan,
chan              104 drivers/iio/pressure/cros_ec_baro.c 		ret = cros_ec_sensors_core_write(&st->core, chan, val, val2,
chan              414 drivers/iio/pressure/dps310.c 			    struct iio_chan_spec const *chan, int val,
chan              425 drivers/iio/pressure/dps310.c 		switch (chan->type) {
chan              441 drivers/iio/pressure/dps310.c 		switch (chan->type) {
chan              642 drivers/iio/pressure/dps310.c 			   struct iio_chan_spec const *chan,
chan              647 drivers/iio/pressure/dps310.c 	switch (chan->type) {
chan               60 drivers/iio/pressure/hid-sensor-press.c 			      struct iio_chan_spec const *chan,
chan               74 drivers/iio/pressure/hid-sensor-press.c 		switch (chan->scan_index) {
chan              128 drivers/iio/pressure/hid-sensor-press.c 			       struct iio_chan_spec const *chan,
chan              161 drivers/iio/pressure/hp03.c 			 struct iio_chan_spec const *chan,
chan              176 drivers/iio/pressure/hp03.c 		switch (chan->type) {
chan              188 drivers/iio/pressure/hp03.c 		switch (chan->type) {
chan              203 drivers/iio/pressure/hp206c.c 			   struct iio_chan_spec const *chan, int *val,
chan              215 drivers/iio/pressure/hp206c.c 		switch (chan->type) {
chan              231 drivers/iio/pressure/hp206c.c 		switch (chan->type) {
chan              270 drivers/iio/pressure/hp206c.c 		switch (chan->type) {
chan              296 drivers/iio/pressure/hp206c.c 			    struct iio_chan_spec const *chan,
chan              305 drivers/iio/pressure/hp206c.c 	switch (chan->type) {
chan               97 drivers/iio/pressure/mpl115.c 			    struct iio_chan_spec const *chan,
chan               73 drivers/iio/pressure/mpl3115.c 			    struct iio_chan_spec const *chan,
chan               86 drivers/iio/pressure/mpl3115.c 		switch (chan->type) {
chan              126 drivers/iio/pressure/mpl3115.c 		switch (chan->type) {
chan              234 drivers/iio/pressure/ms5611_core.c 			   struct iio_chan_spec const *chan,
chan              250 drivers/iio/pressure/ms5611_core.c 		switch (chan->type) {
chan              262 drivers/iio/pressure/ms5611_core.c 		switch (chan->type) {
chan              274 drivers/iio/pressure/ms5611_core.c 		if (chan->type != IIO_TEMP && chan->type != IIO_PRESSURE)
chan              277 drivers/iio/pressure/ms5611_core.c 		if (chan->type == IIO_TEMP)
chan              303 drivers/iio/pressure/ms5611_core.c 			    struct iio_chan_spec const *chan,
chan              313 drivers/iio/pressure/ms5611_core.c 	if (chan->type == IIO_TEMP)
chan              316 drivers/iio/pressure/ms5611_core.c 	else if (chan->type == IIO_PRESSURE)
chan              328 drivers/iio/pressure/ms5611_core.c 	if (chan->type == IIO_TEMP)
chan               76 drivers/iio/pressure/ms5637.c 			    struct iio_chan_spec const *chan,
chan              127 drivers/iio/pressure/t5403.c 			  struct iio_chan_spec const *chan,
chan              135 drivers/iio/pressure/t5403.c 		switch (chan->type) {
chan              159 drivers/iio/pressure/t5403.c 			   struct iio_chan_spec const *chan,
chan             1477 drivers/iio/pressure/zpa2326.c 			    struct iio_chan_spec const *chan,
chan             1484 drivers/iio/pressure/zpa2326.c 		return zpa2326_sample_oneshot(indio_dev, chan->type, val);
chan             1487 drivers/iio/pressure/zpa2326.c 		switch (chan->type) {
chan             1521 drivers/iio/pressure/zpa2326.c 		switch (chan->type) {
chan             1541 drivers/iio/pressure/zpa2326.c 			     const struct iio_chan_spec *chan,
chan              177 drivers/iio/proximity/as3935.c 			   struct iio_chan_spec const *chan,
chan              260 drivers/iio/proximity/isl29501.c 				 const struct iio_chan_spec *chan,
chan              382 drivers/iio/proximity/isl29501.c 				  const struct iio_chan_spec *chan,
chan              613 drivers/iio/proximity/isl29501.c 			    const struct iio_chan_spec *chan,
chan              618 drivers/iio/proximity/isl29501.c 	switch (chan->type) {
chan              657 drivers/iio/proximity/isl29501.c 			      const struct iio_chan_spec *chan,
chan              663 drivers/iio/proximity/isl29501.c 	switch (chan->type) {
chan              714 drivers/iio/proximity/isl29501.c 				  const struct iio_chan_spec *chan,
chan              717 drivers/iio/proximity/isl29501.c 	switch (chan->type) {
chan              775 drivers/iio/proximity/isl29501.c 			     struct iio_chan_spec const *chan, int *val,
chan              782 drivers/iio/proximity/isl29501.c 		return isl29501_get_raw(isl29501, chan, val);
chan              784 drivers/iio/proximity/isl29501.c 		return isl29501_get_scale(isl29501, chan, val, val2);
chan              790 drivers/iio/proximity/isl29501.c 		return isl29501_get_calibbias(isl29501, chan, val);
chan              797 drivers/iio/proximity/isl29501.c 			    const struct iio_chan_spec *chan,
chan              800 drivers/iio/proximity/isl29501.c 	switch (chan->type) {
chan              826 drivers/iio/proximity/isl29501.c 			      const struct iio_chan_spec *chan,
chan              831 drivers/iio/proximity/isl29501.c 	if (chan->type != IIO_CURRENT)
chan              847 drivers/iio/proximity/isl29501.c 				  const struct iio_chan_spec *chan,
chan              850 drivers/iio/proximity/isl29501.c 	switch (chan->type) {
chan              884 drivers/iio/proximity/isl29501.c 			      struct iio_chan_spec const *chan,
chan              891 drivers/iio/proximity/isl29501.c 		return isl29501_set_raw(isl29501, chan, val);
chan              897 drivers/iio/proximity/isl29501.c 		return isl29501_set_scale(isl29501, chan, val, val2);
chan              899 drivers/iio/proximity/isl29501.c 		return isl29501_set_calibbias(isl29501, chan, val);
chan              192 drivers/iio/proximity/pulsedlight-lidar-lite-v2.c 			  struct iio_chan_spec const *chan,
chan              162 drivers/iio/proximity/rfd77402.c 			     struct iio_chan_spec const *chan,
chan              226 drivers/iio/proximity/sx9500.c static int sx9500_inc_chan_users(struct sx9500_data *data, int chan)
chan              228 drivers/iio/proximity/sx9500.c 	return sx9500_inc_users(data, &data->channel_users[chan],
chan              229 drivers/iio/proximity/sx9500.c 				SX9500_REG_PROX_CTRL0, BIT(chan));
chan              232 drivers/iio/proximity/sx9500.c static int sx9500_dec_chan_users(struct sx9500_data *data, int chan)
chan              234 drivers/iio/proximity/sx9500.c 	return sx9500_dec_users(data, &data->channel_users[chan],
chan              235 drivers/iio/proximity/sx9500.c 				SX9500_REG_PROX_CTRL0, BIT(chan));
chan              265 drivers/iio/proximity/sx9500.c 				 const struct iio_chan_spec *chan,
chan              271 drivers/iio/proximity/sx9500.c 	ret = regmap_write(data->regmap, SX9500_REG_SENSOR_SEL, chan->channel);
chan              305 drivers/iio/proximity/sx9500.c 				 const struct iio_chan_spec *chan,
chan              312 drivers/iio/proximity/sx9500.c 	ret = sx9500_inc_chan_users(data, chan->channel);
chan              332 drivers/iio/proximity/sx9500.c 	ret = sx9500_read_prox_data(data, chan, val);
chan              340 drivers/iio/proximity/sx9500.c 	ret = sx9500_dec_chan_users(data, chan->channel);
chan              351 drivers/iio/proximity/sx9500.c 	sx9500_dec_chan_users(data, chan->channel);
chan              380 drivers/iio/proximity/sx9500.c 			   const struct iio_chan_spec *chan,
chan              386 drivers/iio/proximity/sx9500.c 	switch (chan->type) {
chan              393 drivers/iio/proximity/sx9500.c 			ret = sx9500_read_proximity(data, chan, val);
chan              431 drivers/iio/proximity/sx9500.c 			    const struct iio_chan_spec *chan,
chan              436 drivers/iio/proximity/sx9500.c 	switch (chan->type) {
chan              469 drivers/iio/proximity/sx9500.c 	unsigned int val, chan;
chan              479 drivers/iio/proximity/sx9500.c 	for (chan = 0; chan < SX9500_NUM_CHANNELS; chan++) {
chan              482 drivers/iio/proximity/sx9500.c 		bool new_prox = val & BIT(chan);
chan              484 drivers/iio/proximity/sx9500.c 		if (!data->event_enabled[chan])
chan              486 drivers/iio/proximity/sx9500.c 		if (new_prox == data->prox_stat[chan])
chan              491 drivers/iio/proximity/sx9500.c 		ev = IIO_UNMOD_EVENT_CODE(IIO_PROXIMITY, chan,
chan              494 drivers/iio/proximity/sx9500.c 		data->prox_stat[chan] = new_prox;
chan              526 drivers/iio/proximity/sx9500.c 				    const struct iio_chan_spec *chan,
chan              532 drivers/iio/proximity/sx9500.c 	if (chan->type != IIO_PROXIMITY || type != IIO_EV_TYPE_THRESH ||
chan              536 drivers/iio/proximity/sx9500.c 	return data->event_enabled[chan->channel];
chan              540 drivers/iio/proximity/sx9500.c 				     const struct iio_chan_spec *chan,
chan              548 drivers/iio/proximity/sx9500.c 	if (chan->type != IIO_PROXIMITY || type != IIO_EV_TYPE_THRESH ||
chan              555 drivers/iio/proximity/sx9500.c 		ret = sx9500_inc_chan_users(data, chan->channel);
chan              562 drivers/iio/proximity/sx9500.c 		ret = sx9500_dec_chan_users(data, chan->channel);
chan              570 drivers/iio/proximity/sx9500.c 	data->event_enabled[chan->channel] = state;
chan              575 drivers/iio/proximity/sx9500.c 		sx9500_dec_chan_users(data, chan->channel);
chan              577 drivers/iio/proximity/sx9500.c 		sx9500_inc_chan_users(data, chan->channel);
chan               41 drivers/iio/proximity/vl53l0x-i2c.c 				  const struct iio_chan_spec *chan,
chan               89 drivers/iio/proximity/vl53l0x-i2c.c 			    const struct iio_chan_spec *chan,
chan               95 drivers/iio/proximity/vl53l0x-i2c.c 	if (chan->type != IIO_DISTANCE)
chan              100 drivers/iio/proximity/vl53l0x-i2c.c 		ret = vl53l0x_read_proximity(data, chan, val);
chan               48 drivers/iio/resolver/ad2s1200.c 			     struct iio_chan_spec const *chan,
chan               58 drivers/iio/resolver/ad2s1200.c 		switch (chan->type) {
chan               80 drivers/iio/resolver/ad2s1200.c 		gpiod_set_value(st->rdvel, !!(chan->type == IIO_ANGL));
chan               88 drivers/iio/resolver/ad2s1200.c 		switch (chan->type) {
chan               31 drivers/iio/resolver/ad2s90.c 			   struct iio_chan_spec const *chan,
chan               39 drivers/iio/resolver/ad2s90.c 	if (chan->type != IIO_ANGL)
chan               52 drivers/iio/temperature/hid-sensor-temperature.c 				struct iio_chan_spec const *chan,
chan               59 drivers/iio/temperature/hid-sensor-temperature.c 		if (chan->type != IIO_TEMP)
chan               98 drivers/iio/temperature/hid-sensor-temperature.c 				struct iio_chan_spec const *chan,
chan              130 drivers/iio/temperature/max31856.c 				      struct iio_chan_spec const *chan,
chan              136 drivers/iio/temperature/max31856.c 	switch (chan->channel2) {
chan              186 drivers/iio/temperature/max31856.c 			     struct iio_chan_spec const *chan,
chan              194 drivers/iio/temperature/max31856.c 		ret = max31856_thermocouple_read(data, chan, val);
chan              199 drivers/iio/temperature/max31856.c 		switch (chan->channel2) {
chan              116 drivers/iio/temperature/maxim_thermocouple.c 				   struct iio_chan_spec const *chan, int *val)
chan              119 drivers/iio/temperature/maxim_thermocouple.c 	unsigned int shift = chan->scan_type.shift + (chan->address * 8);
chan              144 drivers/iio/temperature/maxim_thermocouple.c 	*val = sign_extend32(*val >> shift, chan->scan_type.realbits - 1);
chan              168 drivers/iio/temperature/maxim_thermocouple.c 				       struct iio_chan_spec const *chan,
chan              180 drivers/iio/temperature/maxim_thermocouple.c 		ret = maxim_thermocouple_read(data, chan, val);
chan              188 drivers/iio/temperature/maxim_thermocouple.c 		switch (chan->channel2) {
chan              124 drivers/iio/temperature/tmp006.c 			    struct iio_chan_spec const *chan,
chan              218 drivers/iio/temperature/tmp007.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              225 drivers/iio/temperature/tmp007.c 	switch (chan->channel2) {
chan              258 drivers/iio/temperature/tmp007.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              264 drivers/iio/temperature/tmp007.c 	switch (chan->channel2) {
chan              285 drivers/iio/temperature/tmp007.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              293 drivers/iio/temperature/tmp007.c 	switch (chan->channel2) {
chan              321 drivers/iio/temperature/tmp007.c 		const struct iio_chan_spec *chan, enum iio_event_type type,
chan              328 drivers/iio/temperature/tmp007.c 	switch (chan->channel2) {
chan               61 drivers/iio/temperature/tsys02d.c 			     struct iio_chan_spec const *chan,
chan              408 drivers/iio/trigger/stm32-timer-trigger.c 				  struct iio_chan_spec const *chan,
chan              443 drivers/iio/trigger/stm32-timer-trigger.c 				   struct iio_chan_spec const *chan,
chan              512 drivers/iio/trigger/stm32-timer-trigger.c 				  const struct iio_chan_spec *chan,
chan              523 drivers/iio/trigger/stm32-timer-trigger.c 				  const struct iio_chan_spec *chan)
chan              561 drivers/iio/trigger/stm32-timer-trigger.c 				 const struct iio_chan_spec *chan,
chan              600 drivers/iio/trigger/stm32-timer-trigger.c 				 const struct iio_chan_spec *chan)
chan              620 drivers/iio/trigger/stm32-timer-trigger.c 				      const struct iio_chan_spec *chan,
chan              633 drivers/iio/trigger/stm32-timer-trigger.c 				      const struct iio_chan_spec *chan,
chan              833 drivers/infiniband/hw/cxgb3/cxio_hal.c 					  V_CHAN(attr->chan));
chan              354 drivers/infiniband/hw/cxgb3/cxio_wr.h 	u32 chan;
chan              848 drivers/infiniband/hw/cxgb3/iwch_qp.c 	init_attr.chan = qhp->ep->l2t->smt_idx;
chan             7736 drivers/infiniband/hw/qib/qib_iba7322.c static u32 ahb_mod(struct qib_devdata *dd, int quad, int chan, int addr,
chan             7765 drivers/infiniband/hw/qib/qib_iba7322.c 		trans = ((chan << 6) | addr) << (AHB_ADDR_LSB + 1);
chan             7786 drivers/infiniband/hw/qib/qib_iba7322.c 		trans = ((chan << 6) | addr) << (AHB_ADDR_LSB + 1);
chan             7812 drivers/infiniband/hw/qib/qib_iba7322.c 	int chan;
chan             7814 drivers/infiniband/hw/qib/qib_iba7322.c 	for (chan = 0; chan < SERDES_CHANS; ++chan) {
chan             7815 drivers/infiniband/hw/qib/qib_iba7322.c 		ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr,
chan             7817 drivers/infiniband/hw/qib/qib_iba7322.c 		ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr,
chan             7953 drivers/infiniband/hw/qib/qib_iba7322.c 	int chan, chan_done = (1 << SERDES_CHANS) - 1;
chan             8059 drivers/infiniband/hw/qib/qib_iba7322.c 		for (chan = 0; chan < SERDES_CHANS; ++chan) {
chan             8061 drivers/infiniband/hw/qib/qib_iba7322.c 					    (chan + (chan >> 1)),
chan             8064 drivers/infiniband/hw/qib/qib_iba7322.c 			    (~chan_done & (1 << chan)) == 0)
chan             8065 drivers/infiniband/hw/qib/qib_iba7322.c 				chan_done &= ~(1 << chan);
chan             8072 drivers/infiniband/hw/qib/qib_iba7322.c 		for (chan = 0; chan < SERDES_CHANS; ++chan) {
chan             8074 drivers/infiniband/hw/qib/qib_iba7322.c 					    (chan + (chan >> 1)),
chan             8078 drivers/infiniband/hw/qib/qib_iba7322.c 					IBSD(ppd->hw_pidx), chan);
chan             8147 drivers/infiniband/hw/qib/qib_iba7322.c static void set_man_code(struct qib_pportdata *ppd, int chan, int code)
chan             8149 drivers/infiniband/hw/qib/qib_iba7322.c 	ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8153 drivers/infiniband/hw/qib/qib_iba7322.c static void set_man_mode_h1(struct qib_pportdata *ppd, int chan,
chan             8157 drivers/infiniband/hw/qib/qib_iba7322.c 		ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8160 drivers/infiniband/hw/qib/qib_iba7322.c 		ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8165 drivers/infiniband/hw/qib/qib_iba7322.c static void clock_man(struct qib_pportdata *ppd, int chan)
chan             8167 drivers/infiniband/hw/qib/qib_iba7322.c 	ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8169 drivers/infiniband/hw/qib/qib_iba7322.c 	ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8171 drivers/infiniband/hw/qib/qib_iba7322.c 	ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8173 drivers/infiniband/hw/qib/qib_iba7322.c 	ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)),
chan             8231 drivers/infiniband/hw/qib/qib_iba7322.c 	int chan;
chan             8237 drivers/infiniband/hw/qib/qib_iba7322.c 	for (chan = 0; chan < SERDES_CHANS; chan++) {
chan             8238 drivers/infiniband/hw/qib/qib_iba7322.c 		set_man_mode_h1(ppd, chan, 1, 0);
chan             8239 drivers/infiniband/hw/qib/qib_iba7322.c 		set_man_code(ppd, chan, ppd->cpspec->h1_val);
chan             8240 drivers/infiniband/hw/qib/qib_iba7322.c 		clock_man(ppd, chan);
chan             8241 drivers/infiniband/hw/qib/qib_iba7322.c 		set_man_mode_h1(ppd, chan, 0, 0);
chan              141 drivers/infiniband/hw/qib/qib_sd7220.c #define START_EQ1(chan) EPB_LOC(chan, 7, 0x27)
chan             1111 drivers/infiniband/hw/qib/qib_sd7220.c #define RXHSCTRL0(chan) EPB_LOC(chan, 6, 0)
chan             1112 drivers/infiniband/hw/qib/qib_sd7220.c #define VCDL_DAC2(chan) EPB_LOC(chan, 6, 5)
chan             1113 drivers/infiniband/hw/qib/qib_sd7220.c #define VCDL_CTRL0(chan) EPB_LOC(chan, 6, 6)
chan             1114 drivers/infiniband/hw/qib/qib_sd7220.c #define VCDL_CTRL2(chan) EPB_LOC(chan, 6, 8)
chan             1115 drivers/infiniband/hw/qib/qib_sd7220.c #define START_EQ2(chan) EPB_LOC(chan, 7, 0x28)
chan             1344 drivers/infiniband/hw/qib/qib_sd7220.c #define RXLSPPM(chan) EPB_LOC(chan, 0, 2)
chan              102 drivers/input/touchscreen/resistive-adc-touch.c 	struct iio_channel *chan;
chan              118 drivers/input/touchscreen/resistive-adc-touch.c 	chan = &st->iio_chans[0];
chan              120 drivers/input/touchscreen/resistive-adc-touch.c 	while (chan && chan->indio_dev) {
chan              121 drivers/input/touchscreen/resistive-adc-touch.c 		if (!strcmp(chan->channel->datasheet_name, "pressure"))
chan              123 drivers/input/touchscreen/resistive-adc-touch.c 		chan++;
chan               38 drivers/input/touchscreen/tsc2007_iio.c 			    struct iio_chan_spec const *chan,
chan               43 drivers/input/touchscreen/tsc2007_iio.c 	int adc_chan = chan->channel;
chan               54 drivers/input/touchscreen/tsc2007_iio.c 	switch (chan->channel) {
chan               55 drivers/ipack/devices/ipoctal.c static inline struct ipoctal *chan_to_ipoctal(struct ipoctal_channel *chan,
chan               58 drivers/ipack/devices/ipoctal.c 	return container_of(chan, struct ipoctal, channel[index]);
chan               35 drivers/irqchip/irq-st.c #define ST_A9_FIQ_N_SEL(dev, chan)	(dev << (8  + (chan * 3)))
chan               36 drivers/irqchip/irq-st.c #define ST_A9_IRQ_N_SEL(dev, chan)	(dev << (14 + (chan * 3)))
chan              240 drivers/isdn/hardware/mISDN/hfc_multi.h 	struct hfc_chan	chan[32];
chan              844 drivers/isdn/hardware/mISDN/hfcmulti.c 	struct bchannel *bch = hc->chan[ch].bch;
chan              849 drivers/isdn/hardware/mISDN/hfcmulti.c 	if (hc->chan[ch].protocol != ISDN_P_B_RAW)
chan              876 drivers/isdn/hardware/mISDN/hfcmulti.c 	struct bchannel *bch = hc->chan[ch].bch;
chan              882 drivers/isdn/hardware/mISDN/hfcmulti.c 	if (hc->chan[ch].protocol != ISDN_P_B_RAW)
chan             1623 drivers/isdn/hardware/mISDN/hfcmulti.c 		dch = hc->chan[hc->dnum[0]].dch;
chan             1625 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[hc->dnum[0]].los)
chan             1668 drivers/isdn/hardware/mISDN/hfcmulti.c 			dch = hc->chan[(i << 2) | 2].dch;
chan             1732 drivers/isdn/hardware/mISDN/hfcmulti.c 			dch = hc->chan[(i << 2) | 2].dch;
chan             1779 drivers/isdn/hardware/mISDN/hfcmulti.c 			dch = hc->chan[(i << 2) | 2].dch;
chan             1842 drivers/isdn/hardware/mISDN/hfcmulti.c 		bch = hc->chan[ch].bch;
chan             1845 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (!hc->created[hc->chan[ch].port])
chan             1852 drivers/isdn/hardware/mISDN/hfcmulti.c 		coeff = &(hc->chan[ch].coeff[hc->chan[ch].coeff_count * 16]);
chan             1903 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].coeff_count++;
chan             1904 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].coeff_count == 8) {
chan             1905 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[ch].coeff_count = 0;
chan             1915 drivers/isdn/hardware/mISDN/hfcmulti.c 			skb_put_data(skb, hc->chan[ch].coeff, 512);
chan             1944 drivers/isdn/hardware/mISDN/hfcmulti.c 	bch = hc->chan[ch].bch;
chan             1945 drivers/isdn/hardware/mISDN/hfcmulti.c 	dch = hc->chan[ch].dch;
chan             1949 drivers/isdn/hardware/mISDN/hfcmulti.c 	txpending = &hc->chan[ch].txpending;
chan             1950 drivers/isdn/hardware/mISDN/hfcmulti.c 	slot_tx = hc->chan[ch].slot_tx;
chan             1969 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].protocol == ISDN_P_B_RAW) &&
chan             1970 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].slot_rx < 0) &&
chan             1971 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].slot_tx < 0))
chan             2027 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[ch].Zfill = z1 - z2;
chan             2028 drivers/isdn/hardware/mISDN/hfcmulti.c 	if (hc->chan[ch].Zfill < 0)
chan             2029 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].Zfill += hc->Zlen;
chan             2119 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->activity_tx |= 1 << hc->chan[ch].port;
chan             2139 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[ch].Zfill += ii - i;
chan             2189 drivers/isdn/hardware/mISDN/hfcmulti.c 	bch = hc->chan[ch].bch;
chan             2193 drivers/isdn/hardware/mISDN/hfcmulti.c 	} else if (hc->chan[ch].dch) {
chan             2194 drivers/isdn/hardware/mISDN/hfcmulti.c 		dch = hc->chan[ch].dch;
chan             2204 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].protocol == ISDN_P_B_RAW) &&
chan             2205 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].slot_rx < 0) &&
chan             2206 drivers/isdn/hardware/mISDN/hfcmulti.c 	    (hc->chan[ch].slot_tx < 0))
chan             2213 drivers/isdn/hardware/mISDN/hfcmulti.c 	if (hc->chan[ch].rx_off) {
chan             2271 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->activity_rx |= 1 << hc->chan[ch].port;
chan             2358 drivers/isdn/hardware/mISDN/hfcmulti.c 		recv_Bchannel(bch, hc->chan[ch].Zfill, false);
chan             2424 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->created[hc->chan[ch].port]) {
chan             2428 drivers/isdn/hardware/mISDN/hfcmulti.c 				if (hc->chan[ch].dch &&
chan             2429 drivers/isdn/hardware/mISDN/hfcmulti.c 				    hc->chan[ch].nt_timer > -1) {
chan             2430 drivers/isdn/hardware/mISDN/hfcmulti.c 					dch = hc->chan[ch].dch;
chan             2431 drivers/isdn/hardware/mISDN/hfcmulti.c 					if (!(--hc->chan[ch].nt_timer)) {
chan             2446 drivers/isdn/hardware/mISDN/hfcmulti.c 		dch = hc->chan[hc->dnum[0]].dch;
chan             2449 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[0]].los = temp;
chan             2450 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[0]].cfg)) {
chan             2451 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (!temp && hc->chan[hc->dnum[0]].los)
chan             2454 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (temp && !hc->chan[hc->dnum[0]].los)
chan             2458 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dnum[0]].cfg)) {
chan             2461 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (!temp && hc->chan[hc->dnum[0]].ais)
chan             2464 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (temp && !hc->chan[hc->dnum[0]].ais)
chan             2467 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[hc->dnum[0]].ais = temp;
chan             2469 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dnum[0]].cfg)) {
chan             2472 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (!temp && hc->chan[hc->dnum[0]].slip_rx)
chan             2475 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[hc->dnum[0]].slip_rx = temp;
chan             2477 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (!temp && hc->chan[hc->dnum[0]].slip_tx)
chan             2480 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[hc->dnum[0]].slip_tx = temp;
chan             2482 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dnum[0]].cfg)) {
chan             2485 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (!temp && hc->chan[hc->dnum[0]].rdi)
chan             2488 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (temp && !hc->chan[hc->dnum[0]].rdi)
chan             2491 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[hc->dnum[0]].rdi = temp;
chan             2494 drivers/isdn/hardware/mISDN/hfcmulti.c 		switch (hc->chan[hc->dnum[0]].sync) {
chan             2503 drivers/isdn/hardware/mISDN/hfcmulti.c 				    hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
chan             2505 drivers/isdn/hardware/mISDN/hfcmulti.c 				    hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
chan             2506 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[hc->dnum[0]].sync = 1;
chan             2517 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[hc->dnum[0]].sync = 0;
chan             2528 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[hc->dnum[0]].sync = 2;
chan             2538 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[hc->dnum[0]].sync = 0;
chan             2548 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[hc->dnum[0]].sync = 1;
chan             2571 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].dch) {
chan             2572 drivers/isdn/hardware/mISDN/hfcmulti.c 			dch = hc->chan[ch].dch;
chan             2575 drivers/isdn/hardware/mISDN/hfcmulti.c 						 hc->chan[ch].port);
chan             2595 drivers/isdn/hardware/mISDN/hfcmulti.c 							(1 << hc->chan[ch].port);
chan             2598 drivers/isdn/hardware/mISDN/hfcmulti.c 							~(1 << hc->chan[ch].port);
chan             2619 drivers/isdn/hardware/mISDN/hfcmulti.c 					       hc->chan[ch].port);
chan             2640 drivers/isdn/hardware/mISDN/hfcmulti.c 		dch = hc->chan[ch].dch;
chan             2641 drivers/isdn/hardware/mISDN/hfcmulti.c 		bch = hc->chan[ch].bch;
chan             2642 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (((!dch) && (!bch)) || (!hc->created[hc->chan[ch].port])) {
chan             2764 drivers/isdn/hardware/mISDN/hfcmulti.c 				dch = hc->chan[hc->dnum[0]].dch;
chan             2789 drivers/isdn/hardware/mISDN/hfcmulti.c 					dch = hc->chan[hc->dnum[i]].dch;
chan             2868 drivers/isdn/hardware/mISDN/hfcmulti.c 	oslot_tx = hc->chan[ch].slot_tx;
chan             2869 drivers/isdn/hardware/mISDN/hfcmulti.c 	oslot_rx = hc->chan[ch].slot_rx;
chan             2870 drivers/isdn/hardware/mISDN/hfcmulti.c 	conf = hc->chan[ch].conf;
chan             2922 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].slot_tx = -1;
chan             2923 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].bank_tx = 0;
chan             2926 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].txpending)
chan             2945 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].slot_tx = slot_tx;
chan             2946 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].bank_tx = bank_tx;
chan             2951 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].slot_rx = -1;
chan             2952 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].bank_rx = 0;
chan             2955 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].txpending)
chan             2971 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].slot_rx = slot_rx;
chan             2972 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].bank_rx = bank_rx;
chan             2993 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].bch && hc->ctype != HFC_TYPE_E1) {
chan             2994 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->hw.a_st_ctrl0[hc->chan[ch].port] &=
chan             2996 drivers/isdn/hardware/mISDN/hfcmulti.c 			HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
chan             3000 drivers/isdn/hardware/mISDN/hfcmulti.c 				 hc->hw.a_st_ctrl0[hc->chan[ch].port]);
chan             3002 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].bch) {
chan             3003 drivers/isdn/hardware/mISDN/hfcmulti.c 			test_and_clear_bit(FLG_HDLC, &hc->chan[ch].bch->Flags);
chan             3005 drivers/isdn/hardware/mISDN/hfcmulti.c 					   &hc->chan[ch].bch->Flags);
chan             3011 drivers/isdn/hardware/mISDN/hfcmulti.c 		    (hc->chan[ch].slot_rx < 0) &&
chan             3012 drivers/isdn/hardware/mISDN/hfcmulti.c 		    (hc->chan[ch].slot_tx < 0)) {
chan             3037 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[ch].protocol != protocol) {
chan             3060 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[ch].protocol != protocol) {
chan             3082 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[ch].protocol != protocol) {
chan             3100 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[ch].protocol != protocol) {
chan             3106 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->hw.a_st_ctrl0[hc->chan[ch].port] |=
chan             3108 drivers/isdn/hardware/mISDN/hfcmulti.c 			HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
chan             3112 drivers/isdn/hardware/mISDN/hfcmulti.c 				 hc->hw.a_st_ctrl0[hc->chan[ch].port]);
chan             3114 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].bch)
chan             3116 drivers/isdn/hardware/mISDN/hfcmulti.c 					 &hc->chan[ch].bch->Flags);
chan             3126 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch) {
chan             3142 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->ctype == HFC_TYPE_E1 || hc->chan[ch].bch)
chan             3149 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].bch) {
chan             3150 drivers/isdn/hardware/mISDN/hfcmulti.c 			test_and_set_bit(FLG_HDLC, &hc->chan[ch].bch->Flags);
chan             3152 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->hw.a_st_ctrl0[hc->chan[ch].port] |=
chan             3154 drivers/isdn/hardware/mISDN/hfcmulti.c 				HFC_outb(hc, R_ST_SEL, hc->chan[ch].port);
chan             3158 drivers/isdn/hardware/mISDN/hfcmulti.c 					 hc->hw.a_st_ctrl0[hc->chan[ch].port]);
chan             3165 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].protocol = ISDN_P_NONE;
chan             3168 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[ch].protocol = protocol;
chan             3183 drivers/isdn/hardware/mISDN/hfcmulti.c 		mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0);
chan             3188 drivers/isdn/hardware/mISDN/hfcmulti.c 	mode_hfcmulti(hc, ch, hc->chan[ch].protocol, slot_tx, bank_tx,
chan             3200 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].conf = num;
chan             3202 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].conf = -1;
chan             3203 drivers/isdn/hardware/mISDN/hfcmulti.c 	mode_hfcmulti(hc, ch, hc->chan[ch].protocol, hc->chan[ch].slot_tx,
chan             3204 drivers/isdn/hardware/mISDN/hfcmulti.c 		      hc->chan[ch].bank_tx, hc->chan[ch].slot_rx,
chan             3205 drivers/isdn/hardware/mISDN/hfcmulti.c 		      hc->chan[ch].bank_rx);
chan             3237 drivers/isdn/hardware/mISDN/hfcmulti.c 			HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
chan             3258 drivers/isdn/hardware/mISDN/hfcmulti.c 			HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
chan             3265 drivers/isdn/hardware/mISDN/hfcmulti.c 					~(1 << hc->chan[dch->slot].port);
chan             3292 drivers/isdn/hardware/mISDN/hfcmulti.c 			HFC_outb(hc, R_ST_SEL, hc->chan[dch->slot].port);
chan             3360 drivers/isdn/hardware/mISDN/hfcmulti.c 				       __func__, hc->chan[dch->slot].port,
chan             3371 drivers/isdn/hardware/mISDN/hfcmulti.c 					 hc->chan[dch->slot].port);
chan             3393 drivers/isdn/hardware/mISDN/hfcmulti.c 				       __func__, hc->chan[dch->slot].port,
chan             3403 drivers/isdn/hardware/mISDN/hfcmulti.c 					 hc->chan[dch->slot].port);
chan             3446 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[bch->slot].coeff_count = 0;
chan             3447 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[bch->slot].rx_off = 0;
chan             3448 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[bch->slot].conf = -1;
chan             3484 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[bch->slot].txpending = 0;
chan             3487 drivers/isdn/hardware/mISDN/hfcmulti.c 					    hc->chan[bch->slot].slot_tx,
chan             3488 drivers/isdn/hardware/mISDN/hfcmulti.c 					    hc->chan[bch->slot].bank_tx,
chan             3489 drivers/isdn/hardware/mISDN/hfcmulti.c 					    hc->chan[bch->slot].slot_rx,
chan             3490 drivers/isdn/hardware/mISDN/hfcmulti.c 					    hc->chan[bch->slot].bank_rx);
chan             3570 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[bch->slot].rx_off = !!cq->p1;
chan             3571 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (!hc->chan[bch->slot].rx_off) {
chan             3580 drivers/isdn/hardware/mISDN/hfcmulti.c 			       __func__, bch->nr, hc->chan[bch->slot].rx_off);
chan             3798 drivers/isdn/hardware/mISDN/hfcmulti.c 				if (hc->chan[ch].nt_timer == 0) {
chan             3799 drivers/isdn/hardware/mISDN/hfcmulti.c 					hc->chan[ch].nt_timer = -1;
chan             3801 drivers/isdn/hardware/mISDN/hfcmulti.c 						 hc->chan[ch].port);
chan             3811 drivers/isdn/hardware/mISDN/hfcmulti.c 					hc->chan[ch].nt_timer =
chan             3814 drivers/isdn/hardware/mISDN/hfcmulti.c 						 hc->chan[ch].port);
chan             3823 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[ch].nt_timer = -1;
chan             3829 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[ch].nt_timer = -1;
chan             3832 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[ch].nt_timer = -1;
chan             3857 drivers/isdn/hardware/mISDN/hfcmulti.c 	pt = hc->chan[i].port;
chan             3860 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[pt]].slot_tx = -1;
chan             3861 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[pt]].slot_rx = -1;
chan             3862 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[pt]].conf = -1;
chan             3871 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[i].slot_tx = -1;
chan             3872 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[i].slot_rx = -1;
chan             3873 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[i].conf = -1;
chan             3879 drivers/isdn/hardware/mISDN/hfcmulti.c 		dch = hc->chan[hc->dnum[0]].dch;
chan             3880 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[0]].cfg)) {
chan             3884 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_OPTICAL, &hc->chan[hc->dnum[0]].cfg)) {
chan             3897 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[0]].cfg))
chan             3902 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[0]].cfg))
chan             3968 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i].slot_tx = -1;
chan             3969 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i].slot_rx = -1;
chan             3970 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i].conf = -1;
chan             3973 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 2].slot_tx = -1;
chan             3974 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 2].slot_rx = -1;
chan             3975 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 2].conf = -1;
chan             3977 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 1].slot_tx = -1;
chan             3978 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 1].slot_rx = -1;
chan             3979 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i - 1].conf = -1;
chan             4004 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (!test_bit(HFC_CFG_NONCAP_TX, &hc->chan[i].cfg))
chan             4015 drivers/isdn/hardware/mISDN/hfcmulti.c 		    test_bit(HFC_CFG_DIS_ECHANNEL, &hc->chan[i].cfg))
chan             4031 drivers/isdn/hardware/mISDN/hfcmulti.c 				~(1 << hc->chan[dch->slot].port);
chan             4096 drivers/isdn/hardware/mISDN/hfcmulti.c 	bch = hc->chan[ch].bch;
chan             4105 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[ch].rx_off = 0;
chan             4520 drivers/isdn/hardware/mISDN/hfcmulti.c 	pt = hc->chan[ci].port;
chan             4539 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[ci].dch = NULL;
chan             4563 drivers/isdn/hardware/mISDN/hfcmulti.c 			if (hc->chan[i].bch) {
chan             4567 drivers/isdn/hardware/mISDN/hfcmulti.c 					       __func__, hc->chan[i].port + 1, i);
chan             4568 drivers/isdn/hardware/mISDN/hfcmulti.c 				pb = hc->chan[i].bch;
chan             4569 drivers/isdn/hardware/mISDN/hfcmulti.c 				hc->chan[i].bch = NULL;
chan             4573 drivers/isdn/hardware/mISDN/hfcmulti.c 				kfree(hc->chan[i].coeff);
chan             4581 drivers/isdn/hardware/mISDN/hfcmulti.c 				~(1 << hc->chan[ci].port);
chan             4585 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ci - 2].bch) {
chan             4589 drivers/isdn/hardware/mISDN/hfcmulti.c 				       __func__, hc->chan[ci - 2].port + 1,
chan             4591 drivers/isdn/hardware/mISDN/hfcmulti.c 			pb = hc->chan[ci - 2].bch;
chan             4592 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[ci - 2].bch = NULL;
chan             4596 drivers/isdn/hardware/mISDN/hfcmulti.c 			kfree(hc->chan[ci - 2].coeff);
chan             4599 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ci - 1].bch) {
chan             4603 drivers/isdn/hardware/mISDN/hfcmulti.c 				       __func__, hc->chan[ci - 1].port + 1,
chan             4605 drivers/isdn/hardware/mISDN/hfcmulti.c 			pb = hc->chan[ci - 1].bch;
chan             4606 drivers/isdn/hardware/mISDN/hfcmulti.c 			hc->chan[ci - 1].bch = NULL;
chan             4610 drivers/isdn/hardware/mISDN/hfcmulti.c 			kfree(hc->chan[ci - 1].coeff);
chan             4660 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (hc->chan[ch].dch)
chan             4661 drivers/isdn/hardware/mISDN/hfcmulti.c 			release_port(hc, hc->chan[ch].dch);
chan             4704 drivers/isdn/hardware/mISDN/hfcmulti.c 			    &hc->chan[hc->dnum[0]].cfg);
chan             4714 drivers/isdn/hardware/mISDN/hfcmulti.c 		    &hc->chan[hc->dnum[0]].cfg);
chan             4723 drivers/isdn/hardware/mISDN/hfcmulti.c 		    &hc->chan[hc->dnum[0]].cfg);
chan             4733 drivers/isdn/hardware/mISDN/hfcmulti.c 		    &hc->chan[hc->dnum[0]].cfg);
chan             4743 drivers/isdn/hardware/mISDN/hfcmulti.c 		    &hc->chan[hc->dnum[0]].cfg);
chan             4752 drivers/isdn/hardware/mISDN/hfcmulti.c 		    &hc->chan[hc->dnum[0]].cfg);
chan             4784 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[0]].jitter = (port[Port_cnt]>>12) & 0x3;
chan             4789 drivers/isdn/hardware/mISDN/hfcmulti.c 			    __func__, hc->chan[hc->dnum[0]].jitter,
chan             4792 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[hc->dnum[0]].jitter = 2; /* default */
chan             4816 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[hc->dnum[pt]].dch = dch;
chan             4817 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[hc->dnum[pt]].port = pt;
chan             4818 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[hc->dnum[pt]].nt_timer = -1;
chan             4829 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].coeff = kzalloc(512, GFP_KERNEL);
chan             4830 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (!hc->chan[ch].coeff) {
chan             4846 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].bch = bch;
chan             4847 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[ch].port = pt;
chan             4891 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[i + 2].dch = dch;
chan             4892 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[i + 2].port = pt;
chan             4893 drivers/isdn/hardware/mISDN/hfcmulti.c 	hc->chan[i + 2].nt_timer = -1;
chan             4902 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i + ch].coeff = kzalloc(512, GFP_KERNEL);
chan             4903 drivers/isdn/hardware/mISDN/hfcmulti.c 		if (!hc->chan[i + ch].coeff) {
chan             4919 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i + ch].bch = bch;
chan             4920 drivers/isdn/hardware/mISDN/hfcmulti.c 		hc->chan[i + ch].port = pt;
chan             4956 drivers/isdn/hardware/mISDN/hfcmulti.c 				 &hc->chan[i + 2].cfg);
chan             4966 drivers/isdn/hardware/mISDN/hfcmulti.c 				 &hc->chan[i + 2].cfg);
chan             5158 drivers/isdn/hardware/mISDN/hfcmulti.c 						hc->chan[hc->dnum[pt]].dch);
chan             5161 drivers/isdn/hardware/mISDN/hfcmulti.c 						hc->chan[(pt << 2) + 2].dch);
chan             1430 drivers/isdn/hardware/mISDN/hfcpci.c set_hfcpci_rxtest(struct bchannel *bch, int protocol, int chan)
chan             1437 drivers/isdn/hardware/mISDN/hfcpci.c 		       bch->state, protocol, bch->nr, chan);
chan             1438 drivers/isdn/hardware/mISDN/hfcpci.c 	if (bch->nr != chan) {
chan             1441 drivers/isdn/hardware/mISDN/hfcpci.c 		       bch->nr, chan);
chan             1447 drivers/isdn/hardware/mISDN/hfcpci.c 		hfcpci_clear_fifo_rx(hc, (chan & 2) ? 1 : 0);
chan             1448 drivers/isdn/hardware/mISDN/hfcpci.c 		if (chan & 2) {
chan             1472 drivers/isdn/hardware/mISDN/hfcpci.c 		hfcpci_clear_fifo_rx(hc, (chan & 2) ? 1 : 0);
chan             1473 drivers/isdn/hardware/mISDN/hfcpci.c 		if (chan & 2) {
chan               83 drivers/isdn/mISDN/l1oip.h 	struct l1oip_chan	chan[128];	/* channel instances */
chan              316 drivers/isdn/mISDN/l1oip_core.c 						&hc->chan[channel].codecstate);
chan              375 drivers/isdn/mISDN/l1oip_core.c 	dch = hc->chan[channel].dch;
chan              376 drivers/isdn/mISDN/l1oip_core.c 	bch = hc->chan[channel].bch;
chan              407 drivers/isdn/mISDN/l1oip_core.c 		rx_counter = hc->chan[channel].rx_counter;
chan              425 drivers/isdn/mISDN/l1oip_core.c 		hc->chan[channel].rx_counter = rx_counter;
chan              428 drivers/isdn/mISDN/l1oip_core.c 		if (hc->chan[channel].disorder_flag) {
chan              429 drivers/isdn/mISDN/l1oip_core.c 			swap(hc->chan[channel].disorder_skb, nskb);
chan              430 drivers/isdn/mISDN/l1oip_core.c 			swap(hc->chan[channel].disorder_cnt, rx_counter);
chan              432 drivers/isdn/mISDN/l1oip_core.c 		hc->chan[channel].disorder_flag ^= 1;
chan              452 drivers/isdn/mISDN/l1oip_core.c 	struct dchannel		*dch = hc->chan[hc->d_idx].dch;
chan              754 drivers/isdn/mISDN/l1oip_core.c 	struct dchannel *dch = hc->chan[hc->d_idx].dch;
chan              832 drivers/isdn/mISDN/l1oip_core.c 	struct dchannel		*dch = hc->chan[hc->d_idx].dch;
chan              896 drivers/isdn/mISDN/l1oip_core.c 					  hc->chan[dch->slot].tx_counter++, p, ll);
chan             1013 drivers/isdn/mISDN/l1oip_core.c 	bch = hc->chan[ch].bch;
chan             1111 drivers/isdn/mISDN/l1oip_core.c 			hc->chan[bch->slot].tx_counter += l;
chan             1122 drivers/isdn/mISDN/l1oip_core.c 			hc->chan[bch->slot].tx_counter += l;
chan             1138 drivers/isdn/mISDN/l1oip_core.c 					  hc->chan[bch->slot].tx_counter, p, ll);
chan             1139 drivers/isdn/mISDN/l1oip_core.c 			hc->chan[bch->slot].tx_counter += ll;
chan             1150 drivers/isdn/mISDN/l1oip_core.c 		hc->chan[bch->slot].codecstate = 0;
chan             1246 drivers/isdn/mISDN/l1oip_core.c 	if (hc->registered && hc->chan[hc->d_idx].dch)
chan             1247 drivers/isdn/mISDN/l1oip_core.c 		mISDN_unregister_device(&hc->chan[hc->d_idx].dch->dev);
chan             1249 drivers/isdn/mISDN/l1oip_core.c 		if (hc->chan[ch].dch) {
chan             1250 drivers/isdn/mISDN/l1oip_core.c 			mISDN_freedchannel(hc->chan[ch].dch);
chan             1251 drivers/isdn/mISDN/l1oip_core.c 			kfree(hc->chan[ch].dch);
chan             1253 drivers/isdn/mISDN/l1oip_core.c 		if (hc->chan[ch].bch) {
chan             1254 drivers/isdn/mISDN/l1oip_core.c 			mISDN_freebchannel(hc->chan[ch].bch);
chan             1255 drivers/isdn/mISDN/l1oip_core.c 			kfree(hc->chan[ch].bch);
chan             1257 drivers/isdn/mISDN/l1oip_core.c 			dev_kfree_skb(hc->chan[ch].disorder_skb);
chan             1387 drivers/isdn/mISDN/l1oip_core.c 	hc->chan[hc->d_idx].dch = dch;
chan             1407 drivers/isdn/mISDN/l1oip_core.c 		hc->chan[i + ch].bch = bch;
chan              113 drivers/leds/leds-is31fl319x.c 	int chan = led - is31->leds;
chan              118 drivers/leds/leds-is31fl319x.c 	dev_dbg(&is31->client->dev, "%s %d: %d\n", __func__, chan, brightness);
chan              123 drivers/leds/leds-is31fl319x.c 	ret = regmap_write(is31->regmap, IS31FL319X_PWM(chan), brightness);
chan              145 drivers/leds/leds-lp55xx-common.c 			struct lp55xx_chip *chip, int chan)
chan              154 drivers/leds/leds-lp55xx-common.c 	if (chan >= max_channel) {
chan              155 drivers/leds/leds-lp55xx-common.c 		dev_err(dev, "invalid channel: %d / %d\n", chan, max_channel);
chan              159 drivers/leds/leds-lp55xx-common.c 	if (pdata->led_config[chan].led_current == 0)
chan              162 drivers/leds/leds-lp55xx-common.c 	led->led_current = pdata->led_config[chan].led_current;
chan              163 drivers/leds/leds-lp55xx-common.c 	led->max_current = pdata->led_config[chan].max_current;
chan              164 drivers/leds/leds-lp55xx-common.c 	led->chan_nr = pdata->led_config[chan].chan_nr;
chan              165 drivers/leds/leds-lp55xx-common.c 	led->cdev.default_trigger = pdata->led_config[chan].default_trigger;
chan              176 drivers/leds/leds-lp55xx-common.c 	if (pdata->led_config[chan].name) {
chan              177 drivers/leds/leds-lp55xx-common.c 		led->cdev.name = pdata->led_config[chan].name;
chan              180 drivers/leds/leds-lp55xx-common.c 			pdata->label ? : chip->cl->name, chan);
chan               80 drivers/macintosh/windfarm_ad7417_sensor.c 				  int chan, s32 raw, s32 *value)
chan               82 drivers/macintosh/windfarm_ad7417_sensor.c 	switch(chan) {
chan              102 drivers/macintosh/windfarm_ad7417_sensor.c 	int chan = sr - pv->sensors;
chan              112 drivers/macintosh/windfarm_ad7417_sensor.c 		buf[1] = (pv->config & 0x1f) | (chan << 5);
chan              133 drivers/macintosh/windfarm_ad7417_sensor.c 		wf_ad7417_adc_convert(pv, chan, raw, value);
chan              137 drivers/macintosh/windfarm_ad7417_sensor.c 			 chan, sr->name, raw, *value);
chan               36 drivers/mailbox/arm_mhu.c 	struct mbox_chan chan[MHU_CHANS];
chan               42 drivers/mailbox/arm_mhu.c 	struct mbox_chan *chan = p;
chan               43 drivers/mailbox/arm_mhu.c 	struct mhu_link *mlink = chan->con_priv;
chan               50 drivers/mailbox/arm_mhu.c 	mbox_chan_received_data(chan, (void *)&val);
chan               57 drivers/mailbox/arm_mhu.c static bool mhu_last_tx_done(struct mbox_chan *chan)
chan               59 drivers/mailbox/arm_mhu.c 	struct mhu_link *mlink = chan->con_priv;
chan               65 drivers/mailbox/arm_mhu.c static int mhu_send_data(struct mbox_chan *chan, void *data)
chan               67 drivers/mailbox/arm_mhu.c 	struct mhu_link *mlink = chan->con_priv;
chan               75 drivers/mailbox/arm_mhu.c static int mhu_startup(struct mbox_chan *chan)
chan               77 drivers/mailbox/arm_mhu.c 	struct mhu_link *mlink = chan->con_priv;
chan               85 drivers/mailbox/arm_mhu.c 			  IRQF_SHARED, "mhu_link", chan);
chan               87 drivers/mailbox/arm_mhu.c 		dev_err(chan->mbox->dev,
chan               95 drivers/mailbox/arm_mhu.c static void mhu_shutdown(struct mbox_chan *chan)
chan               97 drivers/mailbox/arm_mhu.c 	struct mhu_link *mlink = chan->con_priv;
chan               99 drivers/mailbox/arm_mhu.c 	free_irq(mlink->irq, chan);
chan              128 drivers/mailbox/arm_mhu.c 		mhu->chan[i].con_priv = &mhu->mlink[i];
chan              135 drivers/mailbox/arm_mhu.c 	mhu->mbox.chans = &mhu->chan[0];
chan               43 drivers/mailbox/armada-37xx-rwtm-mailbox.c static void a37xx_mbox_receive(struct mbox_chan *chan)
chan               45 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct a37xx_mbox *mbox = chan->con_priv;
chan               53 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	mbox_chan_received_data(chan, &rx_msg);
chan               58 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct mbox_chan *chan = data;
chan               59 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct a37xx_mbox *mbox = chan->con_priv;
chan               65 drivers/mailbox/armada-37xx-rwtm-mailbox.c 		a37xx_mbox_receive(chan);
chan               72 drivers/mailbox/armada-37xx-rwtm-mailbox.c 		mbox_chan_txdone(chan, 0);
chan               77 drivers/mailbox/armada-37xx-rwtm-mailbox.c static int a37xx_mbox_send_data(struct mbox_chan *chan, void *data)
chan               79 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct a37xx_mbox *mbox = chan->con_priv;
chan              103 drivers/mailbox/armada-37xx-rwtm-mailbox.c static int a37xx_mbox_startup(struct mbox_chan *chan)
chan              105 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct a37xx_mbox *mbox = chan->con_priv;
chan              110 drivers/mailbox/armada-37xx-rwtm-mailbox.c 			       DRIVER_NAME, chan);
chan              124 drivers/mailbox/armada-37xx-rwtm-mailbox.c static void a37xx_mbox_shutdown(struct mbox_chan *chan)
chan              127 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	struct a37xx_mbox *mbox = chan->con_priv;
chan              134 drivers/mailbox/armada-37xx-rwtm-mailbox.c 	devm_free_irq(mbox->dev, mbox->irq, chan);
chan             1091 drivers/mailbox/bcm-flexrm-mailbox.c 	struct mbox_chan *chan = &ring->mbox->controller.chans[ring->num];
chan             1152 drivers/mailbox/bcm-flexrm-mailbox.c 		mbox_chan_received_data(chan, msg);
chan             1203 drivers/mailbox/bcm-flexrm-mailbox.c static int flexrm_send_data(struct mbox_chan *chan, void *data)
chan             1206 drivers/mailbox/bcm-flexrm-mailbox.c 	struct flexrm_ring *ring = chan->con_priv;
chan             1226 drivers/mailbox/bcm-flexrm-mailbox.c static bool flexrm_peek_data(struct mbox_chan *chan)
chan             1228 drivers/mailbox/bcm-flexrm-mailbox.c 	int cnt = flexrm_process_completions(chan->con_priv);
chan             1233 drivers/mailbox/bcm-flexrm-mailbox.c static int flexrm_startup(struct mbox_chan *chan)
chan             1239 drivers/mailbox/bcm-flexrm-mailbox.c 	struct flexrm_ring *ring = chan->con_priv;
chan             1369 drivers/mailbox/bcm-flexrm-mailbox.c static void flexrm_shutdown(struct mbox_chan *chan)
chan             1374 drivers/mailbox/bcm-flexrm-mailbox.c 	struct flexrm_ring *ring = chan->con_priv;
chan             1420 drivers/mailbox/bcm-flexrm-mailbox.c 		mbox_chan_received_data(chan, msg);
chan             1458 drivers/mailbox/bcm-flexrm-mailbox.c 	struct mbox_chan *chan;
chan             1473 drivers/mailbox/bcm-flexrm-mailbox.c 	chan = &cntlr->chans[pa->args[0]];
chan             1474 drivers/mailbox/bcm-flexrm-mailbox.c 	ring = chan->con_priv;
chan             1478 drivers/mailbox/bcm-flexrm-mailbox.c 	return chan;
chan              583 drivers/mailbox/bcm-pdc-mailbox.c 	struct mbox_chan *chan;
chan              594 drivers/mailbox/bcm-pdc-mailbox.c 	chan = &mbc->chans[0];
chan              662 drivers/mailbox/bcm-pdc-mailbox.c 	mbox_chan_received_data(chan, &mssg);
chan             1157 drivers/mailbox/bcm-pdc-mailbox.c static bool pdc_last_tx_done(struct mbox_chan *chan)
chan             1159 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
chan             1194 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_send_data(struct mbox_chan *chan, void *data)
chan             1196 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
chan             1256 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_startup(struct mbox_chan *chan)
chan             1258 drivers/mailbox/bcm-pdc-mailbox.c 	return pdc_ring_init(chan->con_priv, PDC_RINGSET);
chan             1261 drivers/mailbox/bcm-pdc-mailbox.c static void pdc_shutdown(struct mbox_chan *chan)
chan             1263 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
chan               76 drivers/mailbox/hi3660-mailbox.c 	struct mbox_chan chan[MBOX_CHAN_MAX];
chan               86 drivers/mailbox/hi3660-mailbox.c static int hi3660_mbox_check_state(struct mbox_chan *chan)
chan               88 drivers/mailbox/hi3660-mailbox.c 	unsigned long ch = (unsigned long)chan->con_priv;
chan               89 drivers/mailbox/hi3660-mailbox.c 	struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox);
chan              113 drivers/mailbox/hi3660-mailbox.c static int hi3660_mbox_unlock(struct mbox_chan *chan)
chan              115 drivers/mailbox/hi3660-mailbox.c 	struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox);
chan              134 drivers/mailbox/hi3660-mailbox.c static int hi3660_mbox_acquire_channel(struct mbox_chan *chan)
chan              136 drivers/mailbox/hi3660-mailbox.c 	unsigned long ch = (unsigned long)chan->con_priv;
chan              137 drivers/mailbox/hi3660-mailbox.c 	struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox);
chan              160 drivers/mailbox/hi3660-mailbox.c static int hi3660_mbox_startup(struct mbox_chan *chan)
chan              164 drivers/mailbox/hi3660-mailbox.c 	ret = hi3660_mbox_unlock(chan);
chan              168 drivers/mailbox/hi3660-mailbox.c 	ret = hi3660_mbox_acquire_channel(chan);
chan              175 drivers/mailbox/hi3660-mailbox.c static int hi3660_mbox_send_data(struct mbox_chan *chan, void *msg)
chan              177 drivers/mailbox/hi3660-mailbox.c 	unsigned long ch = (unsigned long)chan->con_priv;
chan              178 drivers/mailbox/hi3660-mailbox.c 	struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox);
chan              185 drivers/mailbox/hi3660-mailbox.c 	ret = hi3660_mbox_check_state(chan);
chan              228 drivers/mailbox/hi3660-mailbox.c 	return &mbox->chan[ch];
chan              242 drivers/mailbox/hi3660-mailbox.c 	struct mbox_chan *chan;
chan              258 drivers/mailbox/hi3660-mailbox.c 	mbox->controller.chans = mbox->chan;
chan              264 drivers/mailbox/hi3660-mailbox.c 	chan = mbox->chan;
chan              266 drivers/mailbox/hi3660-mailbox.c 		chan[ch].con_priv = (void *)ch;
chan               85 drivers/mailbox/hi6220-mailbox.c 	struct mbox_chan *chan;
chan              109 drivers/mailbox/hi6220-mailbox.c static bool hi6220_mbox_last_tx_done(struct mbox_chan *chan)
chan              111 drivers/mailbox/hi6220-mailbox.c 	struct hi6220_mbox_chan *mchan = chan->con_priv;
chan              122 drivers/mailbox/hi6220-mailbox.c static int hi6220_mbox_send_data(struct mbox_chan *chan, void *msg)
chan              124 drivers/mailbox/hi6220-mailbox.c 	struct hi6220_mbox_chan *mchan = chan->con_priv;
chan              152 drivers/mailbox/hi6220-mailbox.c 	struct mbox_chan *chan;
chan              167 drivers/mailbox/hi6220-mailbox.c 		chan = mbox->irq_map_chan[intr_bit];
chan              168 drivers/mailbox/hi6220-mailbox.c 		if (!chan) {
chan              174 drivers/mailbox/hi6220-mailbox.c 		mchan = chan->con_priv;
chan              176 drivers/mailbox/hi6220-mailbox.c 			mbox_chan_txdone(chan, 0);
chan              182 drivers/mailbox/hi6220-mailbox.c 			mbox_chan_received_data(chan, (void *)msg);
chan              193 drivers/mailbox/hi6220-mailbox.c static int hi6220_mbox_startup(struct mbox_chan *chan)
chan              195 drivers/mailbox/hi6220-mailbox.c 	struct hi6220_mbox_chan *mchan = chan->con_priv;
chan              205 drivers/mailbox/hi6220-mailbox.c static void hi6220_mbox_shutdown(struct mbox_chan *chan)
chan              207 drivers/mailbox/hi6220-mailbox.c 	struct hi6220_mbox_chan *mchan = chan->con_priv;
chan              227 drivers/mailbox/hi6220-mailbox.c 	struct mbox_chan *chan;
chan              242 drivers/mailbox/hi6220-mailbox.c 	chan = &mbox->chan[i];
chan              243 drivers/mailbox/hi6220-mailbox.c 	if (mbox->irq_map_chan[ack_irq] == (void *)chan) {
chan              248 drivers/mailbox/hi6220-mailbox.c 	mchan = chan->con_priv;
chan              252 drivers/mailbox/hi6220-mailbox.c 	mbox->irq_map_chan[ack_irq] = (void *)chan;
chan              253 drivers/mailbox/hi6220-mailbox.c 	return chan;
chan              281 drivers/mailbox/hi6220-mailbox.c 	mbox->chan = devm_kcalloc(dev,
chan              282 drivers/mailbox/hi6220-mailbox.c 		mbox->chan_num, sizeof(*mbox->chan), GFP_KERNEL);
chan              283 drivers/mailbox/hi6220-mailbox.c 	if (!mbox->chan)
chan              313 drivers/mailbox/hi6220-mailbox.c 	mbox->controller.chans = &mbox->chan[0];
chan              319 drivers/mailbox/hi6220-mailbox.c 		mbox->chan[i].con_priv = &mbox->mchan[i];
chan               51 drivers/mailbox/imx-mailbox.c 	struct mbox_chan	*chan;
chan              104 drivers/mailbox/imx-mailbox.c 	mbox_chan_txdone(cp->chan, 0);
chan              109 drivers/mailbox/imx-mailbox.c 	struct mbox_chan *chan = p;
chan              110 drivers/mailbox/imx-mailbox.c 	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
chan              111 drivers/mailbox/imx-mailbox.c 	struct imx_mu_con_priv *cp = chan->con_priv;
chan              139 drivers/mailbox/imx-mailbox.c 		mbox_chan_txdone(chan, 0);
chan              142 drivers/mailbox/imx-mailbox.c 		mbox_chan_received_data(chan, (void *)&dat);
chan              145 drivers/mailbox/imx-mailbox.c 		mbox_chan_received_data(chan, NULL);
chan              154 drivers/mailbox/imx-mailbox.c static int imx_mu_send_data(struct mbox_chan *chan, void *data)
chan              156 drivers/mailbox/imx-mailbox.c 	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
chan              157 drivers/mailbox/imx-mailbox.c 	struct imx_mu_con_priv *cp = chan->con_priv;
chan              177 drivers/mailbox/imx-mailbox.c static int imx_mu_startup(struct mbox_chan *chan)
chan              179 drivers/mailbox/imx-mailbox.c 	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
chan              180 drivers/mailbox/imx-mailbox.c 	struct imx_mu_con_priv *cp = chan->con_priv;
chan              191 drivers/mailbox/imx-mailbox.c 			  IRQF_NO_SUSPEND, cp->irq_desc, chan);
chan              212 drivers/mailbox/imx-mailbox.c static void imx_mu_shutdown(struct mbox_chan *chan)
chan              214 drivers/mailbox/imx-mailbox.c 	struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
chan              215 drivers/mailbox/imx-mailbox.c 	struct imx_mu_con_priv *cp = chan->con_priv;
chan              236 drivers/mailbox/imx-mailbox.c 	free_irq(priv->irq, chan);
chan              248 drivers/mailbox/imx-mailbox.c 	u32 type, idx, chan;
chan              257 drivers/mailbox/imx-mailbox.c 	chan = type * 4 + idx;
chan              259 drivers/mailbox/imx-mailbox.c 	if (chan >= mbox->num_chans) {
chan              260 drivers/mailbox/imx-mailbox.c 		dev_err(mbox->dev, "Not supported channel number: %d. (type: %d, idx: %d)\n", chan, type, idx);
chan              264 drivers/mailbox/imx-mailbox.c 	return &mbox->chans[chan];
chan              317 drivers/mailbox/imx-mailbox.c 		cp->chan = &priv->mbox_chans[i];
chan               49 drivers/mailbox/mailbox-altera.c 	struct mbox_chan *chan;
chan               52 drivers/mailbox/mailbox-altera.c static struct altera_mbox *mbox_chan_to_altera_mbox(struct mbox_chan *chan)
chan               54 drivers/mailbox/mailbox-altera.c 	if (!chan || !chan->con_priv)
chan               57 drivers/mailbox/mailbox-altera.c 	return (struct altera_mbox *)chan->con_priv;
chan              117 drivers/mailbox/mailbox-altera.c static void altera_mbox_rx_data(struct mbox_chan *chan)
chan              119 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              127 drivers/mailbox/mailbox-altera.c 		mbox_chan_received_data(chan, (void *)data);
chan              135 drivers/mailbox/mailbox-altera.c 	altera_mbox_rx_data(mbox->chan);
chan              143 drivers/mailbox/mailbox-altera.c 	struct mbox_chan *chan = (struct mbox_chan *)p;
chan              144 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              147 drivers/mailbox/mailbox-altera.c 	mbox_chan_txdone(chan, 0);
chan              154 drivers/mailbox/mailbox-altera.c 	struct mbox_chan *chan = (struct mbox_chan *)p;
chan              156 drivers/mailbox/mailbox-altera.c 	altera_mbox_rx_data(chan);
chan              160 drivers/mailbox/mailbox-altera.c static int altera_mbox_startup_sender(struct mbox_chan *chan)
chan              163 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              167 drivers/mailbox/mailbox-altera.c 				  DRIVER_NAME, chan);
chan              179 drivers/mailbox/mailbox-altera.c static int altera_mbox_startup_receiver(struct mbox_chan *chan)
chan              182 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              186 drivers/mailbox/mailbox-altera.c 				  DRIVER_NAME, chan);
chan              198 drivers/mailbox/mailbox-altera.c 	mbox->chan = chan;
chan              206 drivers/mailbox/mailbox-altera.c static int altera_mbox_send_data(struct mbox_chan *chan, void *data)
chan              208 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              233 drivers/mailbox/mailbox-altera.c static bool altera_mbox_last_tx_done(struct mbox_chan *chan)
chan              235 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              241 drivers/mailbox/mailbox-altera.c static bool altera_mbox_peek_data(struct mbox_chan *chan)
chan              243 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              248 drivers/mailbox/mailbox-altera.c static int altera_mbox_startup(struct mbox_chan *chan)
chan              250 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              257 drivers/mailbox/mailbox-altera.c 		ret = altera_mbox_startup_sender(chan);
chan              259 drivers/mailbox/mailbox-altera.c 		ret = altera_mbox_startup_receiver(chan);
chan              264 drivers/mailbox/mailbox-altera.c static void altera_mbox_shutdown(struct mbox_chan *chan)
chan              266 drivers/mailbox/mailbox-altera.c 	struct altera_mbox *mbox = mbox_chan_to_altera_mbox(chan);
chan              271 drivers/mailbox/mailbox-altera.c 		free_irq(mbox->irq, chan);
chan               86 drivers/mailbox/mailbox-sti.c static inline bool sti_mbox_channel_is_enabled(struct mbox_chan *chan)
chan               88 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              119 drivers/mailbox/mailbox-sti.c static void sti_mbox_enable_channel(struct mbox_chan *chan)
chan              121 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              134 drivers/mailbox/mailbox-sti.c static void sti_mbox_disable_channel(struct mbox_chan *chan)
chan              136 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              149 drivers/mailbox/mailbox-sti.c static void sti_mbox_clear_irq(struct mbox_chan *chan)
chan              151 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              164 drivers/mailbox/mailbox-sti.c 	struct mbox_chan *chan = NULL;
chan              179 drivers/mailbox/mailbox-sti.c 		chan = sti_mbox_to_channel(mbox, instance, channel);
chan              180 drivers/mailbox/mailbox-sti.c 		if (chan) {
chan              188 drivers/mailbox/mailbox-sti.c 	return chan;
chan              195 drivers/mailbox/mailbox-sti.c 	struct mbox_chan *chan;
chan              200 drivers/mailbox/mailbox-sti.c 		chan = sti_mbox_irq_to_channel(mdev, instance);
chan              201 drivers/mailbox/mailbox-sti.c 		if (!chan)
chan              204 drivers/mailbox/mailbox-sti.c 		mbox_chan_received_data(chan, NULL);
chan              205 drivers/mailbox/mailbox-sti.c 		sti_mbox_clear_irq(chan);
chan              206 drivers/mailbox/mailbox-sti.c 		sti_mbox_enable_channel(chan);
chan              218 drivers/mailbox/mailbox-sti.c 	struct mbox_chan *chan;
chan              223 drivers/mailbox/mailbox-sti.c 		chan = sti_mbox_irq_to_channel(mdev, instance);
chan              224 drivers/mailbox/mailbox-sti.c 		if (!chan)
chan              226 drivers/mailbox/mailbox-sti.c 		chan_info = chan->con_priv;
chan              228 drivers/mailbox/mailbox-sti.c 		if (!sti_mbox_channel_is_enabled(chan)) {
chan              241 drivers/mailbox/mailbox-sti.c 		sti_mbox_disable_channel(chan);
chan              251 drivers/mailbox/mailbox-sti.c static bool sti_mbox_tx_is_ready(struct mbox_chan *chan)
chan              253 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              274 drivers/mailbox/mailbox-sti.c static int sti_mbox_send_data(struct mbox_chan *chan, void *data)
chan              276 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              292 drivers/mailbox/mailbox-sti.c static int sti_mbox_startup_chan(struct mbox_chan *chan)
chan              294 drivers/mailbox/mailbox-sti.c 	sti_mbox_clear_irq(chan);
chan              295 drivers/mailbox/mailbox-sti.c 	sti_mbox_enable_channel(chan);
chan              300 drivers/mailbox/mailbox-sti.c static void sti_mbox_shutdown_chan(struct mbox_chan *chan)
chan              302 drivers/mailbox/mailbox-sti.c 	struct sti_channel *chan_info = chan->con_priv;
chan              307 drivers/mailbox/mailbox-sti.c 		if (chan == &mbox->chans[i])
chan              316 drivers/mailbox/mailbox-sti.c 	sti_mbox_disable_channel(chan);
chan              317 drivers/mailbox/mailbox-sti.c 	sti_mbox_clear_irq(chan);
chan              318 drivers/mailbox/mailbox-sti.c 	chan->con_priv = NULL;
chan              327 drivers/mailbox/mailbox-sti.c 	struct mbox_chan *chan = NULL;
chan              357 drivers/mailbox/mailbox-sti.c 		if (!chan && !chan_info)
chan              358 drivers/mailbox/mailbox-sti.c 			chan = &mbox->chans[i];
chan              361 drivers/mailbox/mailbox-sti.c 	if (!chan) {
chan              374 drivers/mailbox/mailbox-sti.c 	chan->con_priv = chan_info;
chan              380 drivers/mailbox/mailbox-sti.c 	return chan;
chan               45 drivers/mailbox/mailbox-xgene-slimpro.c 	struct mbox_chan	*chan;
chan              110 drivers/mailbox/mailbox-xgene-slimpro.c 		mbox_chan_txdone(mb_chan->chan, 0);
chan              113 drivers/mailbox/mailbox-xgene-slimpro.c 		mbox_chan_received_data(mb_chan->chan, mb_chan->rx_msg);
chan              118 drivers/mailbox/mailbox-xgene-slimpro.c static int slimpro_mbox_send_data(struct mbox_chan *chan, void *msg)
chan              120 drivers/mailbox/mailbox-xgene-slimpro.c 	struct slimpro_mbox_chan *mb_chan = chan->con_priv;
chan              126 drivers/mailbox/mailbox-xgene-slimpro.c static int slimpro_mbox_startup(struct mbox_chan *chan)
chan              128 drivers/mailbox/mailbox-xgene-slimpro.c 	struct slimpro_mbox_chan *mb_chan = chan->con_priv;
chan              151 drivers/mailbox/mailbox-xgene-slimpro.c static void slimpro_mbox_shutdown(struct mbox_chan *chan)
chan              153 drivers/mailbox/mailbox-xgene-slimpro.c 	struct slimpro_mbox_chan *mb_chan = chan->con_priv;
chan              203 drivers/mailbox/mailbox-xgene-slimpro.c 		ctx->mc[i].chan = &ctx->chans[i];
chan               26 drivers/mailbox/mailbox.c static int add_to_rbuf(struct mbox_chan *chan, void *mssg)
chan               31 drivers/mailbox/mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan               34 drivers/mailbox/mailbox.c 	if (chan->msg_count == MBOX_TX_QUEUE_LEN) {
chan               35 drivers/mailbox/mailbox.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan               39 drivers/mailbox/mailbox.c 	idx = chan->msg_free;
chan               40 drivers/mailbox/mailbox.c 	chan->msg_data[idx] = mssg;
chan               41 drivers/mailbox/mailbox.c 	chan->msg_count++;
chan               44 drivers/mailbox/mailbox.c 		chan->msg_free = 0;
chan               46 drivers/mailbox/mailbox.c 		chan->msg_free++;
chan               48 drivers/mailbox/mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan               53 drivers/mailbox/mailbox.c static void msg_submit(struct mbox_chan *chan)
chan               60 drivers/mailbox/mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan               62 drivers/mailbox/mailbox.c 	if (!chan->msg_count || chan->active_req)
chan               65 drivers/mailbox/mailbox.c 	count = chan->msg_count;
chan               66 drivers/mailbox/mailbox.c 	idx = chan->msg_free;
chan               72 drivers/mailbox/mailbox.c 	data = chan->msg_data[idx];
chan               74 drivers/mailbox/mailbox.c 	if (chan->cl->tx_prepare)
chan               75 drivers/mailbox/mailbox.c 		chan->cl->tx_prepare(chan->cl, data);
chan               77 drivers/mailbox/mailbox.c 	err = chan->mbox->ops->send_data(chan, data);
chan               79 drivers/mailbox/mailbox.c 		chan->active_req = data;
chan               80 drivers/mailbox/mailbox.c 		chan->msg_count--;
chan               83 drivers/mailbox/mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan               85 drivers/mailbox/mailbox.c 	if (!err && (chan->txdone_method & TXDONE_BY_POLL))
chan               87 drivers/mailbox/mailbox.c 		hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL);
chan               90 drivers/mailbox/mailbox.c static void tx_tick(struct mbox_chan *chan, int r)
chan               95 drivers/mailbox/mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan               96 drivers/mailbox/mailbox.c 	mssg = chan->active_req;
chan               97 drivers/mailbox/mailbox.c 	chan->active_req = NULL;
chan               98 drivers/mailbox/mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              101 drivers/mailbox/mailbox.c 	msg_submit(chan);
chan              107 drivers/mailbox/mailbox.c 	if (chan->cl->tx_done)
chan              108 drivers/mailbox/mailbox.c 		chan->cl->tx_done(chan->cl, mssg, r);
chan              110 drivers/mailbox/mailbox.c 	if (r != -ETIME && chan->cl->tx_block)
chan              111 drivers/mailbox/mailbox.c 		complete(&chan->tx_complete);
chan              122 drivers/mailbox/mailbox.c 		struct mbox_chan *chan = &mbox->chans[i];
chan              124 drivers/mailbox/mailbox.c 		if (chan->active_req && chan->cl) {
chan              125 drivers/mailbox/mailbox.c 			txdone = chan->mbox->ops->last_tx_done(chan);
chan              127 drivers/mailbox/mailbox.c 				tx_tick(chan, 0);
chan              150 drivers/mailbox/mailbox.c void mbox_chan_received_data(struct mbox_chan *chan, void *mssg)
chan              153 drivers/mailbox/mailbox.c 	if (chan->cl->rx_callback)
chan              154 drivers/mailbox/mailbox.c 		chan->cl->rx_callback(chan->cl, mssg);
chan              168 drivers/mailbox/mailbox.c void mbox_chan_txdone(struct mbox_chan *chan, int r)
chan              170 drivers/mailbox/mailbox.c 	if (unlikely(!(chan->txdone_method & TXDONE_BY_IRQ))) {
chan              171 drivers/mailbox/mailbox.c 		dev_err(chan->mbox->dev,
chan              176 drivers/mailbox/mailbox.c 	tx_tick(chan, r);
chan              189 drivers/mailbox/mailbox.c void mbox_client_txdone(struct mbox_chan *chan, int r)
chan              191 drivers/mailbox/mailbox.c 	if (unlikely(!(chan->txdone_method & TXDONE_BY_ACK))) {
chan              192 drivers/mailbox/mailbox.c 		dev_err(chan->mbox->dev, "Client can't run the TX ticker\n");
chan              196 drivers/mailbox/mailbox.c 	tx_tick(chan, r);
chan              215 drivers/mailbox/mailbox.c bool mbox_client_peek_data(struct mbox_chan *chan)
chan              217 drivers/mailbox/mailbox.c 	if (chan->mbox->ops->peek_data)
chan              218 drivers/mailbox/mailbox.c 		return chan->mbox->ops->peek_data(chan);
chan              248 drivers/mailbox/mailbox.c int mbox_send_message(struct mbox_chan *chan, void *mssg)
chan              252 drivers/mailbox/mailbox.c 	if (!chan || !chan->cl)
chan              255 drivers/mailbox/mailbox.c 	t = add_to_rbuf(chan, mssg);
chan              257 drivers/mailbox/mailbox.c 		dev_err(chan->mbox->dev, "Try increasing MBOX_TX_QUEUE_LEN\n");
chan              261 drivers/mailbox/mailbox.c 	msg_submit(chan);
chan              263 drivers/mailbox/mailbox.c 	if (chan->cl->tx_block) {
chan              267 drivers/mailbox/mailbox.c 		if (!chan->cl->tx_tout) /* wait forever */
chan              270 drivers/mailbox/mailbox.c 			wait = msecs_to_jiffies(chan->cl->tx_tout);
chan              272 drivers/mailbox/mailbox.c 		ret = wait_for_completion_timeout(&chan->tx_complete, wait);
chan              275 drivers/mailbox/mailbox.c 			tx_tick(chan, t);
chan              297 drivers/mailbox/mailbox.c int mbox_flush(struct mbox_chan *chan, unsigned long timeout)
chan              301 drivers/mailbox/mailbox.c 	if (!chan->mbox->ops->flush)
chan              304 drivers/mailbox/mailbox.c 	ret = chan->mbox->ops->flush(chan, timeout);
chan              306 drivers/mailbox/mailbox.c 		tx_tick(chan, ret);
chan              334 drivers/mailbox/mailbox.c 	struct mbox_chan *chan;
chan              352 drivers/mailbox/mailbox.c 	chan = ERR_PTR(-EPROBE_DEFER);
chan              355 drivers/mailbox/mailbox.c 			chan = mbox->of_xlate(mbox, &spec);
chan              356 drivers/mailbox/mailbox.c 			if (!IS_ERR(chan))
chan              362 drivers/mailbox/mailbox.c 	if (IS_ERR(chan)) {
chan              364 drivers/mailbox/mailbox.c 		return chan;
chan              367 drivers/mailbox/mailbox.c 	if (chan->cl || !try_module_get(mbox->dev->driver->owner)) {
chan              373 drivers/mailbox/mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan              374 drivers/mailbox/mailbox.c 	chan->msg_free = 0;
chan              375 drivers/mailbox/mailbox.c 	chan->msg_count = 0;
chan              376 drivers/mailbox/mailbox.c 	chan->active_req = NULL;
chan              377 drivers/mailbox/mailbox.c 	chan->cl = cl;
chan              378 drivers/mailbox/mailbox.c 	init_completion(&chan->tx_complete);
chan              380 drivers/mailbox/mailbox.c 	if (chan->txdone_method	== TXDONE_BY_POLL && cl->knows_txdone)
chan              381 drivers/mailbox/mailbox.c 		chan->txdone_method = TXDONE_BY_ACK;
chan              383 drivers/mailbox/mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              385 drivers/mailbox/mailbox.c 	if (chan->mbox->ops->startup) {
chan              386 drivers/mailbox/mailbox.c 		ret = chan->mbox->ops->startup(chan);
chan              390 drivers/mailbox/mailbox.c 			mbox_free_channel(chan);
chan              391 drivers/mailbox/mailbox.c 			chan = ERR_PTR(ret);
chan              396 drivers/mailbox/mailbox.c 	return chan;
chan              436 drivers/mailbox/mailbox.c void mbox_free_channel(struct mbox_chan *chan)
chan              440 drivers/mailbox/mailbox.c 	if (!chan || !chan->cl)
chan              443 drivers/mailbox/mailbox.c 	if (chan->mbox->ops->shutdown)
chan              444 drivers/mailbox/mailbox.c 		chan->mbox->ops->shutdown(chan);
chan              447 drivers/mailbox/mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan              448 drivers/mailbox/mailbox.c 	chan->cl = NULL;
chan              449 drivers/mailbox/mailbox.c 	chan->active_req = NULL;
chan              450 drivers/mailbox/mailbox.c 	if (chan->txdone_method == TXDONE_BY_ACK)
chan              451 drivers/mailbox/mailbox.c 		chan->txdone_method = TXDONE_BY_POLL;
chan              453 drivers/mailbox/mailbox.c 	module_put(chan->mbox->dev->driver->owner);
chan              454 drivers/mailbox/mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              504 drivers/mailbox/mailbox.c 		struct mbox_chan *chan = &mbox->chans[i];
chan              506 drivers/mailbox/mailbox.c 		chan->cl = NULL;
chan              507 drivers/mailbox/mailbox.c 		chan->mbox = mbox;
chan              508 drivers/mailbox/mailbox.c 		chan->txdone_method = txdone;
chan              509 drivers/mailbox/mailbox.c 		spin_lock_init(&chan->lock);
chan               55 drivers/mailbox/mtk-cmdq-mailbox.c 	struct mbox_chan	*chan;
chan              199 drivers/mailbox/mtk-cmdq-mailbox.c 	struct device *dev = thread->chan->mbox->dev;
chan              300 drivers/mailbox/mtk-cmdq-mailbox.c 		spin_lock_irqsave(&thread->chan->lock, flags);
chan              302 drivers/mailbox/mtk-cmdq-mailbox.c 		spin_unlock_irqrestore(&thread->chan->lock, flags);
chan              351 drivers/mailbox/mtk-cmdq-mailbox.c static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
chan              354 drivers/mailbox/mtk-cmdq-mailbox.c 	struct cmdq_thread *thread = (struct cmdq_thread *)chan->con_priv;
chan              355 drivers/mailbox/mtk-cmdq-mailbox.c 	struct cmdq *cmdq = dev_get_drvdata(chan->mbox->dev);
chan              426 drivers/mailbox/mtk-cmdq-mailbox.c static int cmdq_mbox_startup(struct mbox_chan *chan)
chan              431 drivers/mailbox/mtk-cmdq-mailbox.c static void cmdq_mbox_shutdown(struct mbox_chan *chan)
chan              453 drivers/mailbox/mtk-cmdq-mailbox.c 	thread->chan = &mbox->chans[ind];
chan              111 drivers/mailbox/omap-mailbox.c 	struct mbox_chan	*chan;
chan              123 drivers/mailbox/omap-mailbox.c static struct omap_mbox *mbox_chan_to_omap_mbox(struct mbox_chan *chan)
chan              125 drivers/mailbox/omap-mailbox.c 	if (!chan || !chan->con_priv)
chan              128 drivers/mailbox/omap-mailbox.c 	return (struct omap_mbox *)chan->con_priv;
chan              230 drivers/mailbox/omap-mailbox.c void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq)
chan              232 drivers/mailbox/omap-mailbox.c 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
chan              241 drivers/mailbox/omap-mailbox.c void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq)
chan              243 drivers/mailbox/omap-mailbox.c 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
chan              268 drivers/mailbox/omap-mailbox.c 		mbox_chan_received_data(mq->mbox->chan, (void *)data);
chan              285 drivers/mailbox/omap-mailbox.c 	mbox_chan_txdone(mbox->chan, 0);
chan              376 drivers/mailbox/omap-mailbox.c 		mbox->chan->txdone_method = TXDONE_BY_ACK;
chan              420 drivers/mailbox/omap-mailbox.c 	struct mbox_chan *chan;
chan              441 drivers/mailbox/omap-mailbox.c 	if (!mbox || !mbox->chan)
chan              444 drivers/mailbox/omap-mailbox.c 	chan = mbox->chan;
chan              445 drivers/mailbox/omap-mailbox.c 	spin_lock_irqsave(&chan->lock, flags);
chan              446 drivers/mailbox/omap-mailbox.c 	chan->msg_free = 0;
chan              447 drivers/mailbox/omap-mailbox.c 	chan->msg_count = 0;
chan              448 drivers/mailbox/omap-mailbox.c 	chan->active_req = NULL;
chan              449 drivers/mailbox/omap-mailbox.c 	chan->cl = cl;
chan              450 drivers/mailbox/omap-mailbox.c 	init_completion(&chan->tx_complete);
chan              451 drivers/mailbox/omap-mailbox.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              453 drivers/mailbox/omap-mailbox.c 	ret = chan->mbox->ops->startup(chan);
chan              456 drivers/mailbox/omap-mailbox.c 		mbox_free_channel(chan);
chan              457 drivers/mailbox/omap-mailbox.c 		chan = ERR_PTR(ret);
chan              460 drivers/mailbox/omap-mailbox.c 	return chan;
chan              519 drivers/mailbox/omap-mailbox.c static int omap_mbox_chan_startup(struct mbox_chan *chan)
chan              521 drivers/mailbox/omap-mailbox.c 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
chan              534 drivers/mailbox/omap-mailbox.c static void omap_mbox_chan_shutdown(struct mbox_chan *chan)
chan              536 drivers/mailbox/omap-mailbox.c 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
chan              577 drivers/mailbox/omap-mailbox.c static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
chan              579 drivers/mailbox/omap-mailbox.c 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
chan              693 drivers/mailbox/omap-mailbox.c 	return mbox ? mbox->chan : ERR_PTR(-ENOENT);
chan              828 drivers/mailbox/omap-mailbox.c 		mbox->chan = &chnls[i];
chan              182 drivers/mailbox/pcc.c 	struct mbox_chan *chan = p;
chan              188 drivers/mailbox/pcc.c 	pcct_ss = chan->con_priv;
chan              190 drivers/mailbox/pcc.c 	mbox_chan_received_data(chan, NULL);
chan              193 drivers/mailbox/pcc.c 		struct acpi_pcct_hw_reduced_type2 *pcct2_ss = chan->con_priv;
chan              194 drivers/mailbox/pcc.c 		u32 id = chan - pcc_mbox_channels;
chan              234 drivers/mailbox/pcc.c 	struct mbox_chan *chan;
chan              244 drivers/mailbox/pcc.c 	chan = get_pcc_channel(subspace_id);
chan              246 drivers/mailbox/pcc.c 	if (IS_ERR(chan) || chan->cl) {
chan              251 drivers/mailbox/pcc.c 	spin_lock_irqsave(&chan->lock, flags);
chan              252 drivers/mailbox/pcc.c 	chan->msg_free = 0;
chan              253 drivers/mailbox/pcc.c 	chan->msg_count = 0;
chan              254 drivers/mailbox/pcc.c 	chan->active_req = NULL;
chan              255 drivers/mailbox/pcc.c 	chan->cl = cl;
chan              256 drivers/mailbox/pcc.c 	init_completion(&chan->tx_complete);
chan              258 drivers/mailbox/pcc.c 	if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone)
chan              259 drivers/mailbox/pcc.c 		chan->txdone_method = TXDONE_BY_ACK;
chan              261 drivers/mailbox/pcc.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              267 drivers/mailbox/pcc.c 				      pcc_mbox_irq, 0, MBOX_IRQ_NAME, chan);
chan              271 drivers/mailbox/pcc.c 			pcc_mbox_free_channel(chan);
chan              272 drivers/mailbox/pcc.c 			chan = ERR_PTR(rc);
chan              276 drivers/mailbox/pcc.c 	return chan;
chan              286 drivers/mailbox/pcc.c void pcc_mbox_free_channel(struct mbox_chan *chan)
chan              288 drivers/mailbox/pcc.c 	u32 id = chan - pcc_mbox_channels;
chan              291 drivers/mailbox/pcc.c 	if (!chan || !chan->cl)
chan              300 drivers/mailbox/pcc.c 		devm_free_irq(chan->mbox->dev, pcc_doorbell_irq[id], chan);
chan              302 drivers/mailbox/pcc.c 	spin_lock_irqsave(&chan->lock, flags);
chan              303 drivers/mailbox/pcc.c 	chan->cl = NULL;
chan              304 drivers/mailbox/pcc.c 	chan->active_req = NULL;
chan              305 drivers/mailbox/pcc.c 	if (chan->txdone_method == TXDONE_BY_ACK)
chan              306 drivers/mailbox/pcc.c 		chan->txdone_method = TXDONE_BY_POLL;
chan              308 drivers/mailbox/pcc.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              324 drivers/mailbox/pcc.c static int pcc_send_data(struct mbox_chan *chan, void *data)
chan              326 drivers/mailbox/pcc.c 	struct acpi_pcct_hw_reduced *pcct_ss = chan->con_priv;
chan              331 drivers/mailbox/pcc.c 	u32 id = chan - pcc_mbox_channels;
chan               42 drivers/mailbox/platform_mhu.c 	struct mbox_chan chan[MHU_CHANS];
chan               48 drivers/mailbox/platform_mhu.c 	struct mbox_chan *chan = p;
chan               49 drivers/mailbox/platform_mhu.c 	struct platform_mhu_link *mlink = chan->con_priv;
chan               56 drivers/mailbox/platform_mhu.c 	mbox_chan_received_data(chan, (void *)&val);
chan               63 drivers/mailbox/platform_mhu.c static bool platform_mhu_last_tx_done(struct mbox_chan *chan)
chan               65 drivers/mailbox/platform_mhu.c 	struct platform_mhu_link *mlink = chan->con_priv;
chan               71 drivers/mailbox/platform_mhu.c static int platform_mhu_send_data(struct mbox_chan *chan, void *data)
chan               73 drivers/mailbox/platform_mhu.c 	struct platform_mhu_link *mlink = chan->con_priv;
chan               81 drivers/mailbox/platform_mhu.c static int platform_mhu_startup(struct mbox_chan *chan)
chan               83 drivers/mailbox/platform_mhu.c 	struct platform_mhu_link *mlink = chan->con_priv;
chan               91 drivers/mailbox/platform_mhu.c 			  IRQF_SHARED, "platform_mhu_link", chan);
chan               93 drivers/mailbox/platform_mhu.c 		dev_err(chan->mbox->dev,
chan              101 drivers/mailbox/platform_mhu.c static void platform_mhu_shutdown(struct mbox_chan *chan)
chan              103 drivers/mailbox/platform_mhu.c 	struct platform_mhu_link *mlink = chan->con_priv;
chan              105 drivers/mailbox/platform_mhu.c 	free_irq(mlink->irq, chan);
chan              138 drivers/mailbox/platform_mhu.c 		mhu->chan[i].con_priv = &mhu->mlink[i];
chan              149 drivers/mailbox/platform_mhu.c 	mhu->mbox.chans = &mhu->chan[0];
chan               35 drivers/mailbox/qcom-apcs-ipc-mailbox.c static int qcom_apcs_ipc_send_data(struct mbox_chan *chan, void *data)
chan               37 drivers/mailbox/qcom-apcs-ipc-mailbox.c 	struct qcom_apcs_ipc *apcs = container_of(chan->mbox,
chan               39 drivers/mailbox/qcom-apcs-ipc-mailbox.c 	unsigned long idx = (unsigned long)chan->con_priv;
chan               52 drivers/mailbox/rockchip-mailbox.c static int rockchip_mbox_send_data(struct mbox_chan *chan, void *data)
chan               54 drivers/mailbox/rockchip-mailbox.c 	struct rockchip_mbox *mb = dev_get_drvdata(chan->mbox->dev);
chan               79 drivers/mailbox/rockchip-mailbox.c static int rockchip_mbox_startup(struct mbox_chan *chan)
chan               81 drivers/mailbox/rockchip-mailbox.c 	struct rockchip_mbox *mb = dev_get_drvdata(chan->mbox->dev);
chan               90 drivers/mailbox/rockchip-mailbox.c static void rockchip_mbox_shutdown(struct mbox_chan *chan)
chan               92 drivers/mailbox/rockchip-mailbox.c 	struct rockchip_mbox *mb = dev_get_drvdata(chan->mbox->dev);
chan               35 drivers/mailbox/stm32-ipcc.c #define RX_BIT_CHAN(chan)	BIT(chan)
chan               38 drivers/mailbox/stm32-ipcc.c #define TX_BIT_CHAN(chan)	BIT(TX_BIT_SHIFT + (chan))
chan               86 drivers/mailbox/stm32-ipcc.c 	u32 status, mr, tosr, chan;
chan               98 drivers/mailbox/stm32-ipcc.c 	for (chan = 0; chan < ipcc->n_chans; chan++) {
chan               99 drivers/mailbox/stm32-ipcc.c 		if (!(status & (1 << chan)))
chan              102 drivers/mailbox/stm32-ipcc.c 		dev_dbg(dev, "%s: chan:%d rx\n", __func__, chan);
chan              104 drivers/mailbox/stm32-ipcc.c 		mbox_chan_received_data(&ipcc->controller.chans[chan], NULL);
chan              107 drivers/mailbox/stm32-ipcc.c 				    RX_BIT_CHAN(chan));
chan              119 drivers/mailbox/stm32-ipcc.c 	u32 status, mr, tosr, chan;
chan              128 drivers/mailbox/stm32-ipcc.c 	for (chan = 0; chan < ipcc->n_chans ; chan++) {
chan              129 drivers/mailbox/stm32-ipcc.c 		if (!(status & (1 << chan)))
chan              132 drivers/mailbox/stm32-ipcc.c 		dev_dbg(dev, "%s: chan:%d tx\n", __func__, chan);
chan              136 drivers/mailbox/stm32-ipcc.c 				    TX_BIT_CHAN(chan));
chan              138 drivers/mailbox/stm32-ipcc.c 		mbox_chan_txdone(&ipcc->controller.chans[chan], 0);
chan              148 drivers/mailbox/stm32-ipcc.c 	unsigned int chan = (unsigned int)link->con_priv;
chan              152 drivers/mailbox/stm32-ipcc.c 	dev_dbg(ipcc->controller.dev, "%s: chan:%d\n", __func__, chan);
chan              156 drivers/mailbox/stm32-ipcc.c 			    TX_BIT_CHAN(chan));
chan              160 drivers/mailbox/stm32-ipcc.c 			    TX_BIT_CHAN(chan));
chan              167 drivers/mailbox/stm32-ipcc.c 	unsigned int chan = (unsigned int)link->con_priv;
chan              180 drivers/mailbox/stm32-ipcc.c 			    RX_BIT_CHAN(chan));
chan              187 drivers/mailbox/stm32-ipcc.c 	unsigned int chan = (unsigned int)link->con_priv;
chan              193 drivers/mailbox/stm32-ipcc.c 			    RX_BIT_CHAN(chan) | TX_BIT_CHAN(chan));
chan               56 drivers/mailbox/tegra-hsp.c 	struct mbox_chan *chan;
chan              194 drivers/mailbox/tegra-hsp.c 		if (db && db->channel.chan)
chan              195 drivers/mailbox/tegra-hsp.c 			mbox_chan_received_data(db->channel.chan, NULL);
chan              234 drivers/mailbox/tegra-hsp.c 			mbox_chan_txdone(mb->channel.chan, 0);
chan              249 drivers/mailbox/tegra-hsp.c 			mbox_chan_received_data(mb->channel.chan, msg);
chan              297 drivers/mailbox/tegra-hsp.c static int tegra_hsp_doorbell_send_data(struct mbox_chan *chan, void *data)
chan              299 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_doorbell *db = chan->con_priv;
chan              306 drivers/mailbox/tegra-hsp.c static int tegra_hsp_doorbell_startup(struct mbox_chan *chan)
chan              308 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_doorbell *db = chan->con_priv;
chan              314 drivers/mailbox/tegra-hsp.c 	if (db->master >= chan->mbox->num_chans) {
chan              315 drivers/mailbox/tegra-hsp.c 		dev_err(chan->mbox->dev,
chan              339 drivers/mailbox/tegra-hsp.c static void tegra_hsp_doorbell_shutdown(struct mbox_chan *chan)
chan              341 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_doorbell *db = chan->con_priv;
chan              366 drivers/mailbox/tegra-hsp.c static int tegra_hsp_mailbox_send_data(struct mbox_chan *chan, void *data)
chan              368 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_mailbox *mb = chan->con_priv;
chan              393 drivers/mailbox/tegra-hsp.c static int tegra_hsp_mailbox_flush(struct mbox_chan *chan,
chan              396 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_mailbox *mb = chan->con_priv;
chan              405 drivers/mailbox/tegra-hsp.c 			mbox_chan_txdone(chan, 0);
chan              415 drivers/mailbox/tegra-hsp.c static int tegra_hsp_mailbox_startup(struct mbox_chan *chan)
chan              417 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_mailbox *mb = chan->con_priv;
chan              422 drivers/mailbox/tegra-hsp.c 	chan->txdone_method = TXDONE_BY_IRQ;
chan              458 drivers/mailbox/tegra-hsp.c static void tegra_hsp_mailbox_shutdown(struct mbox_chan *chan)
chan              460 drivers/mailbox/tegra-hsp.c 	struct tegra_hsp_mailbox *mb = chan->con_priv;
chan              500 drivers/mailbox/tegra-hsp.c 	struct mbox_chan *chan;
chan              517 drivers/mailbox/tegra-hsp.c 		chan = &mbox->chans[i];
chan              518 drivers/mailbox/tegra-hsp.c 		if (!chan->con_priv) {
chan              519 drivers/mailbox/tegra-hsp.c 			channel->chan = chan;
chan              520 drivers/mailbox/tegra-hsp.c 			chan->con_priv = db;
chan              524 drivers/mailbox/tegra-hsp.c 		chan = NULL;
chan              529 drivers/mailbox/tegra-hsp.c 	return chan ?: ERR_PTR(-EBUSY);
chan              552 drivers/mailbox/tegra-hsp.c 	return mb->channel.chan;
chan              588 drivers/mailbox/tegra-hsp.c 		mb->channel.chan = &hsp->mbox_sm.chans[i];
chan              589 drivers/mailbox/tegra-hsp.c 		mb->channel.chan->con_priv = mb;
chan              781 drivers/mailbox/tegra-hsp.c 		if (db && db->channel.chan)
chan              782 drivers/mailbox/tegra-hsp.c 			tegra_hsp_doorbell_startup(db->channel.chan);
chan              789 drivers/mailbox/tegra-hsp.c 			if (mb->channel.chan->cl)
chan              790 drivers/mailbox/tegra-hsp.c 				tegra_hsp_mailbox_startup(mb->channel.chan);
chan              114 drivers/mailbox/ti-msgmgr.c 	struct mbox_chan *chan;
chan              204 drivers/mailbox/ti-msgmgr.c 	struct mbox_chan *chan = p;
chan              205 drivers/mailbox/ti-msgmgr.c 	struct device *dev = chan->mbox->dev;
chan              207 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              274 drivers/mailbox/ti-msgmgr.c 	mbox_chan_received_data(chan, (void *)&message);
chan              285 drivers/mailbox/ti-msgmgr.c static bool ti_msgmgr_queue_peek_data(struct mbox_chan *chan)
chan              287 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              288 drivers/mailbox/ti-msgmgr.c 	struct device *dev = chan->mbox->dev;
chan              312 drivers/mailbox/ti-msgmgr.c static bool ti_msgmgr_last_tx_done(struct mbox_chan *chan)
chan              314 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              315 drivers/mailbox/ti-msgmgr.c 	struct device *dev = chan->mbox->dev;
chan              346 drivers/mailbox/ti-msgmgr.c static int ti_msgmgr_send_data(struct mbox_chan *chan, void *data)
chan              348 drivers/mailbox/ti-msgmgr.c 	struct device *dev = chan->mbox->dev;
chan              351 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              410 drivers/mailbox/ti-msgmgr.c 				      struct mbox_chan *chan)
chan              438 drivers/mailbox/ti-msgmgr.c 			  IRQF_SHARED, qinst->name, chan);
chan              453 drivers/mailbox/ti-msgmgr.c static int ti_msgmgr_queue_startup(struct mbox_chan *chan)
chan              455 drivers/mailbox/ti-msgmgr.c 	struct device *dev = chan->mbox->dev;
chan              457 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              485 drivers/mailbox/ti-msgmgr.c 		ret = ti_msgmgr_queue_rx_irq_req(dev, d, qinst, chan);
chan              499 drivers/mailbox/ti-msgmgr.c static void ti_msgmgr_queue_shutdown(struct mbox_chan *chan)
chan              501 drivers/mailbox/ti-msgmgr.c 	struct ti_queue_inst *qinst = chan->con_priv;
chan              504 drivers/mailbox/ti-msgmgr.c 		free_irq(qinst->irq, chan);
chan              553 drivers/mailbox/ti-msgmgr.c 		return qinst->chan;
chan              559 drivers/mailbox/ti-msgmgr.c 			return qinst->chan;
chan              587 drivers/mailbox/ti-msgmgr.c 				 struct mbox_chan *chan)
chan              632 drivers/mailbox/ti-msgmgr.c 	qinst->chan = chan;
chan              637 drivers/mailbox/ti-msgmgr.c 	chan->con_priv = qinst;
chan              149 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct mbox_chan *chan;
chan              163 drivers/mailbox/zynqmp-ipi-mailbox.c 		chan = &ipi_mbox->mbox.chans[IPI_MB_CHNL_RX];
chan              172 drivers/mailbox/zynqmp-ipi-mailbox.c 				mbox_chan_received_data(chan, (void *)msg);
chan              187 drivers/mailbox/zynqmp-ipi-mailbox.c static bool zynqmp_ipi_peek_data(struct mbox_chan *chan)
chan              189 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct device *dev = chan->mbox->dev;
chan              191 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct zynqmp_ipi_mchan *mchan = chan->con_priv;
chan              227 drivers/mailbox/zynqmp-ipi-mailbox.c static bool zynqmp_ipi_last_tx_done(struct mbox_chan *chan)
chan              229 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct device *dev = chan->mbox->dev;
chan              231 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct zynqmp_ipi_mchan *mchan = chan->con_priv;
chan              265 drivers/mailbox/zynqmp-ipi-mailbox.c static int zynqmp_ipi_send_data(struct mbox_chan *chan, void *data)
chan              267 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct device *dev = chan->mbox->dev;
chan              269 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct zynqmp_ipi_mchan *mchan = chan->con_priv;
chan              316 drivers/mailbox/zynqmp-ipi-mailbox.c static int zynqmp_ipi_startup(struct mbox_chan *chan)
chan              318 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct device *dev = chan->mbox->dev;
chan              320 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct zynqmp_ipi_mchan *mchan = chan->con_priv;
chan              358 drivers/mailbox/zynqmp-ipi-mailbox.c static void zynqmp_ipi_shutdown(struct mbox_chan *chan)
chan              360 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct device *dev = chan->mbox->dev;
chan              362 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct zynqmp_ipi_mchan *mchan = chan->con_priv;
chan              406 drivers/mailbox/zynqmp-ipi-mailbox.c 	struct mbox_chan *chan;
chan              417 drivers/mailbox/zynqmp-ipi-mailbox.c 	chan = &mbox->chans[chan_type];
chan              418 drivers/mailbox/zynqmp-ipi-mailbox.c 	return chan;
chan             1236 drivers/media/dvb-frontends/af9013.c static int af9013_select(struct i2c_mux_core *muxc, u32 chan)
chan             1257 drivers/media/dvb-frontends/af9013.c static int af9013_deselect(struct i2c_mux_core *muxc, u32 chan)
chan              586 drivers/media/dvb-frontends/dib3000mc.c 	struct dtv_frontend_properties *chan = &demod->dtv_property_cache;
chan              592 drivers/media/dvb-frontends/dib3000mc.c 	schan = *chan;
chan             2178 drivers/media/dvb-frontends/lgdt3306a.c static int lgdt3306a_select(struct i2c_mux_core *muxc, u32 chan)
chan             2186 drivers/media/dvb-frontends/lgdt3306a.c static int lgdt3306a_deselect(struct i2c_mux_core *muxc, u32 chan)
chan             1225 drivers/media/dvb-frontends/m88ds3103.c static int m88ds3103_select(struct i2c_mux_core *muxc, u32 chan)
chan              590 drivers/media/dvb-frontends/si2168.c static int si2168_select(struct i2c_mux_core *muxc, u32 chan)
chan              608 drivers/media/dvb-frontends/si2168.c static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan)
chan              120 drivers/media/i2c/saa7110.c static int saa7110_selmux(struct v4l2_subdev *sd, int chan)
chan              152 drivers/media/i2c/saa7110.c 	const unsigned char *ptr = modes[chan];
chan              162 drivers/media/i2c/saa7110.c 	decoder->input = chan;
chan              131 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = q->drv_priv;
chan              132 drivers/media/pci/cx25821/cx25821-video.c 	unsigned size = (chan->fmt->depth * chan->width * chan->height) >> 3;
chan              145 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = vb->vb2_queue->drv_priv;
chan              146 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              154 drivers/media/pci/cx25821/cx25821-video.c 	if (chan->pixel_formats == PIXEL_FRMT_411)
chan              155 drivers/media/pci/cx25821/cx25821-video.c 		buf->bpl = (chan->fmt->depth * chan->width) >> 3;
chan              157 drivers/media/pci/cx25821/cx25821-video.c 		buf->bpl = (chan->fmt->depth >> 3) * chan->width;
chan              159 drivers/media/pci/cx25821/cx25821-video.c 	if (vb2_plane_size(vb, 0) < chan->height * buf->bpl)
chan              161 drivers/media/pci/cx25821/cx25821-video.c 	vb2_set_plane_payload(vb, 0, chan->height * buf->bpl);
chan              162 drivers/media/pci/cx25821/cx25821-video.c 	buf->vb.field = chan->field;
chan              164 drivers/media/pci/cx25821/cx25821-video.c 	if (chan->pixel_formats == PIXEL_FRMT_411) {
chan              169 drivers/media/pci/cx25821/cx25821-video.c 		if (chan->use_cif_resolution) {
chan              173 drivers/media/pci/cx25821/cx25821-video.c 				bpl_local = chan->cif_width << 1;
chan              177 drivers/media/pci/cx25821/cx25821-video.c 	switch (chan->field) {
chan              181 drivers/media/pci/cx25821/cx25821-video.c 				buf->bpl, 0, chan->height);
chan              186 drivers/media/pci/cx25821/cx25821-video.c 				buf->bpl, 0, chan->height);
chan              196 drivers/media/pci/cx25821/cx25821-video.c 				chan->height >> 1);
chan              201 drivers/media/pci/cx25821/cx25821-video.c 				0, buf->bpl * (chan->height >> 1),
chan              202 drivers/media/pci/cx25821/cx25821-video.c 				buf->bpl, 0, chan->height >> 1);
chan              207 drivers/media/pci/cx25821/cx25821-video.c 				buf->bpl * (chan->height >> 1), 0,
chan              208 drivers/media/pci/cx25821/cx25821-video.c 				buf->bpl, 0, chan->height >> 1);
chan              217 drivers/media/pci/cx25821/cx25821-video.c 		buf, buf->vb.vb2_buf.index, chan->width, chan->height,
chan              218 drivers/media/pci/cx25821/cx25821-video.c 		chan->fmt->depth, chan->fmt->fourcc,
chan              229 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = vb->vb2_queue->drv_priv;
chan              230 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              240 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = vb->vb2_queue->drv_priv;
chan              241 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              243 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dmaqueue *q = &dev->channels[chan->id].dma_vidq;
chan              263 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = q->drv_priv;
chan              264 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              265 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dmaqueue *dmaq = &dev->channels[chan->id].dma_vidq;
chan              270 drivers/media/pci/cx25821/cx25821-video.c 	cx25821_start_video_dma(dev, dmaq, buf, chan->sram_channels);
chan              276 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = q->drv_priv;
chan              277 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              278 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dmaqueue *dmaq = &dev->channels[chan->id].dma_vidq;
chan              281 drivers/media/pci/cx25821/cx25821-video.c 	cx_write(chan->sram_channels->dma_ctl, 0); /* FIFO and RISC disable */
chan              320 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              322 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.width = chan->width;
chan              323 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.height = chan->height;
chan              324 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.field = chan->field;
chan              325 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.pixelformat = chan->fmt->fourcc;
chan              326 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.bytesperline = (chan->width * chan->fmt->depth) >> 3;
chan              327 drivers/media/pci/cx25821/cx25821-video.c 	f->fmt.pix.sizeimage = chan->height * f->fmt.pix.bytesperline;
chan              336 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              337 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              374 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              375 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              384 drivers/media/pci/cx25821/cx25821-video.c 	chan->fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat);
chan              385 drivers/media/pci/cx25821/cx25821-video.c 	chan->field = f->fmt.pix.field;
chan              386 drivers/media/pci/cx25821/cx25821-video.c 	chan->width = f->fmt.pix.width;
chan              387 drivers/media/pci/cx25821/cx25821-video.c 	chan->height = f->fmt.pix.height;
chan              397 drivers/media/pci/cx25821/cx25821-video.c 	if (chan->width == 320 || chan->width == 352)
chan              398 drivers/media/pci/cx25821/cx25821-video.c 		chan->use_cif_resolution = 1;
chan              400 drivers/media/pci/cx25821/cx25821-video.c 		chan->use_cif_resolution = 0;
chan              402 drivers/media/pci/cx25821/cx25821-video.c 	chan->cif_width = chan->width;
chan              403 drivers/media/pci/cx25821/cx25821-video.c 	medusa_set_resolution(dev, chan->width, SRAM_CH00);
chan              409 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              410 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              411 drivers/media/pci/cx25821/cx25821-video.c 	const struct sram_channel *sram_ch = chan->sram_channels;
chan              424 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              425 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              438 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              440 drivers/media/pci/cx25821/cx25821-video.c 	*tvnorms = chan->dev->tvnorm;
chan              447 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              448 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              454 drivers/media/pci/cx25821/cx25821-video.c 	chan->width = 720;
chan              455 drivers/media/pci/cx25821/cx25821-video.c 	chan->height = (dev->tvnorm & V4L2_STD_625_50) ? 576 : 480;
chan              487 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan =
chan              489 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              493 drivers/media/pci/cx25821/cx25821-video.c 		medusa_set_brightness(dev, ctrl->val, chan->id);
chan              496 drivers/media/pci/cx25821/cx25821-video.c 		medusa_set_hue(dev, ctrl->val, chan->id);
chan              499 drivers/media/pci/cx25821/cx25821-video.c 		medusa_set_contrast(dev, ctrl->val, chan->id);
chan              502 drivers/media/pci/cx25821/cx25821-video.c 		medusa_set_saturation(dev, ctrl->val, chan->id);
chan              536 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              537 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_dev *dev = chan->dev;
chan              555 drivers/media/pci/cx25821/cx25821-video.c 	struct cx25821_channel *chan = video_drvdata(file);
chan              563 drivers/media/pci/cx25821/cx25821-video.c 	chan->fmt = cx25821_format_by_fourcc(f->fmt.pix.pixelformat);
chan              564 drivers/media/pci/cx25821/cx25821-video.c 	chan->field = f->fmt.pix.field;
chan              565 drivers/media/pci/cx25821/cx25821-video.c 	chan->width = f->fmt.pix.width;
chan              566 drivers/media/pci/cx25821/cx25821-video.c 	chan->height = f->fmt.pix.height;
chan              568 drivers/media/pci/cx25821/cx25821-video.c 		chan->pixel_formats = PIXEL_FRMT_411;
chan              570 drivers/media/pci/cx25821/cx25821-video.c 		chan->pixel_formats = PIXEL_FRMT_422;
chan              678 drivers/media/pci/cx25821/cx25821-video.c 		struct cx25821_channel *chan = &dev->channels[i];
chan              679 drivers/media/pci/cx25821/cx25821-video.c 		struct video_device *vdev = &chan->vdev;
chan              680 drivers/media/pci/cx25821/cx25821-video.c 		struct v4l2_ctrl_handler *hdl = &chan->hdl;
chan              705 drivers/media/pci/cx25821/cx25821-video.c 			chan->out = &dev->vid_out_data[i - SRAM_CH09];
chan              706 drivers/media/pci/cx25821/cx25821-video.c 			chan->out->chan = chan;
chan              709 drivers/media/pci/cx25821/cx25821-video.c 		chan->sram_channels = &cx25821_sram_channels[i];
chan              710 drivers/media/pci/cx25821/cx25821-video.c 		chan->width = 720;
chan              711 drivers/media/pci/cx25821/cx25821-video.c 		chan->field = V4L2_FIELD_INTERLACED;
chan              713 drivers/media/pci/cx25821/cx25821-video.c 			chan->height = 576;
chan              715 drivers/media/pci/cx25821/cx25821-video.c 			chan->height = 480;
chan              717 drivers/media/pci/cx25821/cx25821-video.c 		if (chan->pixel_formats == PIXEL_FRMT_411)
chan              718 drivers/media/pci/cx25821/cx25821-video.c 			chan->fmt = cx25821_format_by_fourcc(V4L2_PIX_FMT_Y41P);
chan              720 drivers/media/pci/cx25821/cx25821-video.c 			chan->fmt = cx25821_format_by_fourcc(V4L2_PIX_FMT_YUYV);
chan              722 drivers/media/pci/cx25821/cx25821-video.c 		cx_write(chan->sram_channels->int_stat, 0xffffffff);
chan              724 drivers/media/pci/cx25821/cx25821-video.c 		INIT_LIST_HEAD(&chan->dma_vidq.active);
chan              726 drivers/media/pci/cx25821/cx25821-video.c 		q = &chan->vidq;
chan              734 drivers/media/pci/cx25821/cx25821-video.c 		q->drv_priv = chan;
chan              758 drivers/media/pci/cx25821/cx25821-video.c 		video_set_drvdata(vdev, chan);
chan              167 drivers/media/pci/cx25821/cx25821.h 	struct cx25821_channel *chan;
chan              108 drivers/media/pci/ngene/ngene-cards.c static struct i2c_adapter *i2c_adapter_from_chan(struct ngene_channel *chan)
chan              111 drivers/media/pci/ngene/ngene-cards.c 	if (chan->number < 2)
chan              112 drivers/media/pci/ngene/ngene-cards.c 		return &chan->dev->channel[0].i2c_adapter;
chan              114 drivers/media/pci/ngene/ngene-cards.c 	return &chan->dev->channel[1].i2c_adapter;
chan              117 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_stv6110(struct ngene_channel *chan)
chan              119 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              120 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              122 drivers/media/pci/ngene/ngene-cards.c 		chan->dev->card_info->fe_config[chan->number];
chan              124 drivers/media/pci/ngene/ngene-cards.c 		chan->dev->card_info->tuner_config[chan->number];
chan              127 drivers/media/pci/ngene/ngene-cards.c 	ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf, i2c);
chan              148 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_stv6111(struct ngene_channel *chan)
chan              150 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              151 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              153 drivers/media/pci/ngene/ngene-cards.c 	u8 adr = 4 + ((chan->number & 1) ? 0x63 : 0x60);
chan              155 drivers/media/pci/ngene/ngene-cards.c 	fe = dvb_attach(stv6111_attach, chan->fe, i2c, adr);
chan              157 drivers/media/pci/ngene/ngene-cards.c 		fe = dvb_attach(stv6111_attach, chan->fe, i2c, adr & ~4);
chan              168 drivers/media/pci/ngene/ngene-cards.c 	struct ngene_channel *chan = fe->sec_priv;
chan              172 drivers/media/pci/ngene/ngene-cards.c 		down(&chan->dev->pll_mutex);
chan              173 drivers/media/pci/ngene/ngene-cards.c 		status = chan->gate_ctrl(fe, 1);
chan              175 drivers/media/pci/ngene/ngene-cards.c 		status = chan->gate_ctrl(fe, 0);
chan              176 drivers/media/pci/ngene/ngene-cards.c 		up(&chan->dev->pll_mutex);
chan              181 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_tda18271(struct ngene_channel *chan)
chan              183 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              184 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              187 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe->ops.i2c_gate_ctrl)
chan              188 drivers/media/pci/ngene/ngene-cards.c 		chan->fe->ops.i2c_gate_ctrl(chan->fe, 1);
chan              189 drivers/media/pci/ngene/ngene-cards.c 	fe = dvb_attach(tda18271c2dd_attach, chan->fe, i2c, 0x60);
chan              190 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe->ops.i2c_gate_ctrl)
chan              191 drivers/media/pci/ngene/ngene-cards.c 		chan->fe->ops.i2c_gate_ctrl(chan->fe, 0);
chan              200 drivers/media/pci/ngene/ngene-cards.c static int tuner_tda18212_ping(struct ngene_channel *chan,
chan              204 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              209 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe->ops.i2c_gate_ctrl)
chan              210 drivers/media/pci/ngene/ngene-cards.c 		chan->fe->ops.i2c_gate_ctrl(chan->fe, 1);
chan              217 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe->ops.i2c_gate_ctrl)
chan              218 drivers/media/pci/ngene/ngene-cards.c 		chan->fe->ops.i2c_gate_ctrl(chan->fe, 0);
chan              223 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_tda18212(struct ngene_channel *chan, u32 dmdtype)
chan              225 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              226 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              229 drivers/media/pci/ngene/ngene-cards.c 		.fe = chan->fe,
chan              238 drivers/media/pci/ngene/ngene-cards.c 	u8 addr = (chan->number & 1) ? 0x63 : 0x60;
chan              246 drivers/media/pci/ngene/ngene-cards.c 		tuner_tda18212_ping(chan, i2c, addr);
chan              253 drivers/media/pci/ngene/ngene-cards.c 	chan->i2c_client[0] = client;
chan              254 drivers/media/pci/ngene/ngene-cards.c 	chan->i2c_client_fe = 1;
chan              262 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_probe(struct ngene_channel *chan)
chan              264 drivers/media/pci/ngene/ngene-cards.c 	switch (chan->demod_type) {
chan              266 drivers/media/pci/ngene/ngene-cards.c 		return tuner_attach_stv6110(chan);
chan              268 drivers/media/pci/ngene/ngene-cards.c 		return tuner_attach_tda18271(chan);
chan              274 drivers/media/pci/ngene/ngene-cards.c 		return tuner_attach_tda18212(chan, chan->demod_type);
chan              276 drivers/media/pci/ngene/ngene-cards.c 		return tuner_attach_stv6111(chan);
chan              282 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_stv0900(struct ngene_channel *chan)
chan              284 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              285 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              287 drivers/media/pci/ngene/ngene-cards.c 		chan->dev->card_info->fe_config[chan->number];
chan              289 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(stv090x_attach, feconf, i2c,
chan              290 drivers/media/pci/ngene/ngene-cards.c 			(chan->number & 1) == 0 ? STV090x_DEMODULATOR_0
chan              292 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe == NULL) {
chan              299 drivers/media/pci/ngene/ngene-cards.c 		chan->fe->analog_demod_priv = chan;
chan              301 drivers/media/pci/ngene/ngene-cards.c 	if (!dvb_attach(lnbh24_attach, chan->fe, i2c, 0,
chan              302 drivers/media/pci/ngene/ngene-cards.c 			0, chan->dev->card_info->lnb[chan->number])) {
chan              304 drivers/media/pci/ngene/ngene-cards.c 		dvb_frontend_detach(chan->fe);
chan              305 drivers/media/pci/ngene/ngene-cards.c 		chan->fe = NULL;
chan              325 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_stv0910(struct ngene_channel *chan,
chan              328 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              332 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(stv0910_attach, i2c, &cfg, (chan->number & 1));
chan              333 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              335 drivers/media/pci/ngene/ngene-cards.c 		chan->fe = dvb_attach(stv0910_attach, i2c,
chan              336 drivers/media/pci/ngene/ngene-cards.c 				      &cfg, (chan->number & 1));
chan              338 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              347 drivers/media/pci/ngene/ngene-cards.c 	lnbcfg.i2c_address = (((chan->number & 1) ? 0x0d : 0x0c) << 1);
chan              348 drivers/media/pci/ngene/ngene-cards.c 	if (!dvb_attach(lnbh25_attach, chan->fe, &lnbcfg, i2c)) {
chan              349 drivers/media/pci/ngene/ngene-cards.c 		lnbcfg.i2c_address = (((chan->number & 1) ? 0x09 : 0x08) << 1);
chan              350 drivers/media/pci/ngene/ngene-cards.c 		if (!dvb_attach(lnbh25_attach, chan->fe, &lnbcfg, i2c)) {
chan              352 drivers/media/pci/ngene/ngene-cards.c 			dvb_frontend_detach(chan->fe);
chan              353 drivers/media/pci/ngene/ngene-cards.c 			chan->fe = NULL;
chan              379 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_stv0367(struct ngene_channel *chan,
chan              382 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              384 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(stv0367ddb_attach,
chan              385 drivers/media/pci/ngene/ngene-cards.c 			      &ddb_stv0367_config[(chan->number & 1)], i2c);
chan              387 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              392 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->sec_priv = chan;
chan              393 drivers/media/pci/ngene/ngene-cards.c 	chan->gate_ctrl = chan->fe->ops.i2c_gate_ctrl;
chan              394 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->ops.i2c_gate_ctrl = drxk_gate_ctrl;
chan              398 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_cxd28xx(struct ngene_channel *chan,
chan              401 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              405 drivers/media/pci/ngene/ngene-cards.c 	cfg.i2c_addr = ((chan->number & 1) ? 0x6d : 0x6c) << 1;
chan              413 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(cxd2841er_attach_t_c, &cfg, i2c);
chan              415 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              420 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->sec_priv = chan;
chan              421 drivers/media/pci/ngene/ngene-cards.c 	chan->gate_ctrl = chan->fe->ops.i2c_gate_ctrl;
chan              422 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->ops.i2c_gate_ctrl = drxk_gate_ctrl;
chan              428 drivers/media/pci/ngene/ngene-cards.c 	struct ngene_channel *chan = fe->analog_demod_priv;
chan              431 drivers/media/pci/ngene/ngene-cards.c 		down(&chan->dev->pll_mutex);
chan              433 drivers/media/pci/ngene/ngene-cards.c 		up(&chan->dev->pll_mutex);
chan              487 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_drxk(struct ngene_channel *chan,
chan              490 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              496 drivers/media/pci/ngene/ngene-cards.c 	config.adr = 0x29 + (chan->number ^ 2);
chan              498 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(drxk_attach, &config, i2c);
chan              499 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              503 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->sec_priv = chan;
chan              504 drivers/media/pci/ngene/ngene-cards.c 	chan->gate_ctrl = chan->fe->ops.i2c_gate_ctrl;
chan              505 drivers/media/pci/ngene/ngene-cards.c 	chan->fe->ops.i2c_gate_ctrl = drxk_gate_ctrl;
chan              522 drivers/media/pci/ngene/ngene-cards.c static int init_xo2(struct ngene_channel *chan, struct i2c_adapter *i2c)
chan              524 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              534 drivers/media/pci/ngene/ngene-cards.c 		dev_info(pdev, "Invalid XO2 on channel %d\n", chan->number);
chan              594 drivers/media/pci/ngene/ngene-cards.c static int cineS2_probe(struct ngene_channel *chan)
chan              596 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              597 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *i2c = i2c_adapter_from_chan(chan);
chan              608 drivers/media/pci/ngene/ngene-cards.c 			chan->number, xo2_type, xo2_id);
chan              612 drivers/media/pci/ngene/ngene-cards.c 			if (chan->number & 1)
chan              615 drivers/media/pci/ngene/ngene-cards.c 					chan->number);
chan              617 drivers/media/pci/ngene/ngene-cards.c 				init_xo2(chan, i2c);
chan              627 drivers/media/pci/ngene/ngene-cards.c 					 xo2names[xo2_id], chan->number);
chan              628 drivers/media/pci/ngene/ngene-cards.c 				chan->demod_type = xo2_demodtype;
chan              632 drivers/media/pci/ngene/ngene-cards.c 				demod_attach_cxd28xx(chan, i2c, sony_osc24);
chan              636 drivers/media/pci/ngene/ngene-cards.c 					 xo2names[xo2_id], chan->number);
chan              637 drivers/media/pci/ngene/ngene-cards.c 				chan->demod_type = xo2_demodtype;
chan              638 drivers/media/pci/ngene/ngene-cards.c 				demod_attach_stv0910(chan, i2c);
chan              643 drivers/media/pci/ngene/ngene-cards.c 					 chan->number);
chan              654 drivers/media/pci/ngene/ngene-cards.c 	} else if (port_has_stv0900(i2c, chan->number)) {
chan              655 drivers/media/pci/ngene/ngene-cards.c 		chan->demod_type = DEMOD_TYPE_STV090X;
chan              656 drivers/media/pci/ngene/ngene-cards.c 		fe_conf = chan->dev->card_info->fe_config[chan->number];
chan              658 drivers/media/pci/ngene/ngene-cards.c 		rc = demod_attach_stv0900(chan);
chan              659 drivers/media/pci/ngene/ngene-cards.c 		if (rc < 0 || chan->number < 2)
chan              666 drivers/media/pci/ngene/ngene-cards.c 		switch (chan->number) {
chan              683 drivers/media/pci/ngene/ngene-cards.c 	} else if (port_has_drxk(i2c, chan->number^2)) {
chan              684 drivers/media/pci/ngene/ngene-cards.c 		chan->demod_type = DEMOD_TYPE_DRXK;
chan              685 drivers/media/pci/ngene/ngene-cards.c 		demod_attach_drxk(chan, i2c);
chan              687 drivers/media/pci/ngene/ngene-cards.c 		chan->demod_type = DEMOD_TYPE_STV0367;
chan              688 drivers/media/pci/ngene/ngene-cards.c 		dev_info(pdev, "STV0367 on channel %d\n", chan->number);
chan              689 drivers/media/pci/ngene/ngene-cards.c 		demod_attach_stv0367(chan, i2c);
chan              691 drivers/media/pci/ngene/ngene-cards.c 		dev_info(pdev, "No demod found on chan %d\n", chan->number);
chan              711 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_lg330x(struct ngene_channel *chan)
chan              713 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              715 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(lgdt330x_attach, &aver_m780,
chan              716 drivers/media/pci/ngene/ngene-cards.c 			      0xb2 >> 1, &chan->i2c_adapter);
chan              717 drivers/media/pci/ngene/ngene-cards.c 	if (chan->fe == NULL) {
chan              722 drivers/media/pci/ngene/ngene-cards.c 	dvb_attach(mt2131_attach, chan->fe, &chan->i2c_adapter,
chan              725 drivers/media/pci/ngene/ngene-cards.c 	return (chan->fe) ? 0 : -ENODEV;
chan              728 drivers/media/pci/ngene/ngene-cards.c static int demod_attach_drxd(struct ngene_channel *chan)
chan              730 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              733 drivers/media/pci/ngene/ngene-cards.c 	feconf = chan->dev->card_info->fe_config[chan->number];
chan              735 drivers/media/pci/ngene/ngene-cards.c 	chan->fe = dvb_attach(drxd_attach, feconf, chan,
chan              736 drivers/media/pci/ngene/ngene-cards.c 			&chan->i2c_adapter, &chan->dev->pci_dev->dev);
chan              737 drivers/media/pci/ngene/ngene-cards.c 	if (!chan->fe) {
chan              744 drivers/media/pci/ngene/ngene-cards.c static int tuner_attach_dtt7520x(struct ngene_channel *chan)
chan              746 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              749 drivers/media/pci/ngene/ngene-cards.c 	feconf = chan->dev->card_info->fe_config[chan->number];
chan              751 drivers/media/pci/ngene/ngene-cards.c 	if (!dvb_attach(dvb_pll_attach, chan->fe, feconf->pll_address,
chan              752 drivers/media/pci/ngene/ngene-cards.c 			&chan->i2c_adapter,
chan              950 drivers/media/pci/ngene/ngene-cards.c 	struct ngene_channel *chan = priv;
chan              951 drivers/media/pci/ngene/ngene-cards.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              952 drivers/media/pci/ngene/ngene-cards.c 	struct i2c_adapter *adap = &chan->i2c_adapter;
chan              959 drivers/media/pci/ngene/ngene-cards.c 		eeprom_write_ushort(adap, 0x1000 + chan->number, data);
chan              961 drivers/media/pci/ngene/ngene-cards.c 		if (eeprom_read_ushort(adap, 0x1000 + chan->number, &data))
chan               73 drivers/media/pci/ngene/ngene-core.c 	struct ngene_channel *chan = (struct ngene_channel *)data;
chan               74 drivers/media/pci/ngene/ngene-core.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan               75 drivers/media/pci/ngene/ngene-core.c 	struct SBufferHeader *Cur = chan->nextBuffer;
chan               77 drivers/media/pci/ngene/ngene-core.c 	spin_lock_irq(&chan->state_lock);
chan               80 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & NGENE_IO_TSOUT) {
chan               81 drivers/media/pci/ngene/ngene-core.c 			u32 Flags = chan->DataFormatFlags;
chan               84 drivers/media/pci/ngene/ngene-core.c 			if (chan->pBufferExchange) {
chan               85 drivers/media/pci/ngene/ngene-core.c 				if (!chan->pBufferExchange(chan,
chan               87 drivers/media/pci/ngene/ngene-core.c 							   chan->Capture1Length,
chan              101 drivers/media/pci/ngene/ngene-core.c 					if (chan->HWState == HWSTATE_RUN) {
chan              110 drivers/media/pci/ngene/ngene-core.c 					chan->HWState = HWSTATE_RUN;
chan              114 drivers/media/pci/ngene/ngene-core.c 				if (chan->HWState == HWSTATE_RUN) {
chan              119 drivers/media/pci/ngene/ngene-core.c 			if (chan->AudioDTOUpdated) {
chan              121 drivers/media/pci/ngene/ngene-core.c 					 chan->AudioDTOValue);
chan              123 drivers/media/pci/ngene/ngene-core.c 					chan->AudioDTOValue;
chan              124 drivers/media/pci/ngene/ngene-core.c 				chan->AudioDTOUpdated = 0;
chan              127 drivers/media/pci/ngene/ngene-core.c 			if (chan->HWState == HWSTATE_RUN) {
chan              128 drivers/media/pci/ngene/ngene-core.c 				u32 Flags = chan->DataFormatFlags;
chan              129 drivers/media/pci/ngene/ngene-core.c 				IBufferExchange *exch1 = chan->pBufferExchange;
chan              130 drivers/media/pci/ngene/ngene-core.c 				IBufferExchange *exch2 = chan->pBufferExchange2;
chan              135 drivers/media/pci/ngene/ngene-core.c 				spin_unlock_irq(&chan->state_lock);
chan              137 drivers/media/pci/ngene/ngene-core.c 					exch1(chan, Cur->Buffer1,
chan              138 drivers/media/pci/ngene/ngene-core.c 						chan->Capture1Length,
chan              142 drivers/media/pci/ngene/ngene-core.c 					exch2(chan, Cur->Buffer2,
chan              143 drivers/media/pci/ngene/ngene-core.c 						chan->Capture2Length,
chan              146 drivers/media/pci/ngene/ngene-core.c 				spin_lock_irq(&chan->state_lock);
chan              147 drivers/media/pci/ngene/ngene-core.c 			} else if (chan->HWState != HWSTATE_STOP)
chan              148 drivers/media/pci/ngene/ngene-core.c 				chan->HWState = HWSTATE_RUN;
chan              153 drivers/media/pci/ngene/ngene-core.c 	chan->nextBuffer = Cur;
chan              155 drivers/media/pci/ngene/ngene-core.c 	spin_unlock_irq(&chan->state_lock);
chan              497 drivers/media/pci/ngene/ngene-core.c static void flush_buffers(struct ngene_channel *chan)
chan              503 drivers/media/pci/ngene/ngene-core.c 		spin_lock_irq(&chan->state_lock);
chan              504 drivers/media/pci/ngene/ngene-core.c 		val = chan->nextBuffer->ngeneBuffer.SR.Flags & 0x80;
chan              505 drivers/media/pci/ngene/ngene-core.c 		spin_unlock_irq(&chan->state_lock);
chan              509 drivers/media/pci/ngene/ngene-core.c static void clear_buffers(struct ngene_channel *chan)
chan              511 drivers/media/pci/ngene/ngene-core.c 	struct SBufferHeader *Cur = chan->nextBuffer;
chan              515 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & NGENE_IO_TSOUT)
chan              517 drivers/media/pci/ngene/ngene-core.c 				     chan->Capture1Length,
chan              518 drivers/media/pci/ngene/ngene-core.c 				     chan->DataFormatFlags);
chan              520 drivers/media/pci/ngene/ngene-core.c 	} while (Cur != chan->nextBuffer);
chan              522 drivers/media/pci/ngene/ngene-core.c 	if (chan->mode & NGENE_IO_TSOUT) {
chan              523 drivers/media/pci/ngene/ngene-core.c 		chan->nextBuffer->ngeneBuffer.SR.DTOUpdate =
chan              524 drivers/media/pci/ngene/ngene-core.c 			chan->AudioDTOValue;
chan              525 drivers/media/pci/ngene/ngene-core.c 		chan->AudioDTOUpdated = 0;
chan              527 drivers/media/pci/ngene/ngene-core.c 		Cur = chan->TSIdleBuffer.Head;
chan              533 drivers/media/pci/ngene/ngene-core.c 				     chan->Capture1Length,
chan              534 drivers/media/pci/ngene/ngene-core.c 				     chan->DataFormatFlags);
chan              536 drivers/media/pci/ngene/ngene-core.c 		} while (Cur != chan->TSIdleBuffer.Head);
chan              544 drivers/media/pci/ngene/ngene-core.c 	struct ngene_channel *chan = &dev->channel[stream];
chan              555 drivers/media/pci/ngene/ngene-core.c 	if (chan->mode & NGENE_IO_TSOUT)
chan              567 drivers/media/pci/ngene/ngene-core.c 	chan->Mode = mode;
chan              570 drivers/media/pci/ngene/ngene-core.c 		spin_lock_irq(&chan->state_lock);
chan              571 drivers/media/pci/ngene/ngene-core.c 		if (chan->State == KSSTATE_RUN) {
chan              572 drivers/media/pci/ngene/ngene-core.c 			chan->State = KSSTATE_ACQUIRE;
chan              573 drivers/media/pci/ngene/ngene-core.c 			chan->HWState = HWSTATE_STOP;
chan              574 drivers/media/pci/ngene/ngene-core.c 			spin_unlock_irq(&chan->state_lock);
chan              578 drivers/media/pci/ngene/ngene-core.c 			flush_buffers(chan);
chan              581 drivers/media/pci/ngene/ngene-core.c 		spin_unlock_irq(&chan->state_lock);
chan              587 drivers/media/pci/ngene/ngene-core.c 			chan->Capture1Length / AUDIO_BLOCK_SIZE;
chan              588 drivers/media/pci/ngene/ngene-core.c 		com.cmd.StreamControl.Buffer_Address = chan->RingBuffer.PAHead;
chan              591 drivers/media/pci/ngene/ngene-core.c 			chan->Capture1Length / TS_BLOCK_SIZE;
chan              593 drivers/media/pci/ngene/ngene-core.c 			chan->Capture1Length / TS_BLOCK_SIZE;
chan              595 drivers/media/pci/ngene/ngene-core.c 			chan->TSRingBuffer.PAHead;
chan              596 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & NGENE_IO_TSOUT) {
chan              598 drivers/media/pci/ngene/ngene-core.c 				chan->Capture1Length / TS_BLOCK_SIZE;
chan              602 drivers/media/pci/ngene/ngene-core.c 		com.cmd.StreamControl.BytesPerVideoLine = chan->nBytesPerLine;
chan              603 drivers/media/pci/ngene/ngene-core.c 		com.cmd.StreamControl.MaxLinesPerField = chan->nLines;
chan              605 drivers/media/pci/ngene/ngene-core.c 		com.cmd.StreamControl.Buffer_Address = chan->RingBuffer.PAHead;
chan              609 drivers/media/pci/ngene/ngene-core.c 				chan->nVBILines;
chan              612 drivers/media/pci/ngene/ngene-core.c 				chan->nBytesPerVBILine;
chan              618 drivers/media/pci/ngene/ngene-core.c 	spin_lock_irq(&chan->state_lock);
chan              620 drivers/media/pci/ngene/ngene-core.c 		chan->nextBuffer = chan->RingBuffer.Head;
chan              635 drivers/media/pci/ngene/ngene-core.c 		chan->nextBuffer = chan->TSRingBuffer.Head;
chan              637 drivers/media/pci/ngene/ngene-core.c 			if (chan->mode & NGENE_IO_TSOUT) {
chan              660 drivers/media/pci/ngene/ngene-core.c 		chan->nextBuffer = chan->RingBuffer.Head;
chan              665 drivers/media/pci/ngene/ngene-core.c 		       ITUDecoderSetup[chan->itumode], 16);
chan              669 drivers/media/pci/ngene/ngene-core.c 	clear_buffers(chan);
chan              670 drivers/media/pci/ngene/ngene-core.c 	chan->State = KSSTATE_RUN;
chan              672 drivers/media/pci/ngene/ngene-core.c 		chan->HWState = HWSTATE_RUN;
chan              674 drivers/media/pci/ngene/ngene-core.c 		chan->HWState = HWSTATE_STARTUP;
chan              675 drivers/media/pci/ngene/ngene-core.c 	spin_unlock_irq(&chan->state_lock);
chan              683 drivers/media/pci/ngene/ngene-core.c void set_transfer(struct ngene_channel *chan, int state)
chan              685 drivers/media/pci/ngene/ngene-core.c 	struct device *pdev = &chan->dev->pci_dev->dev;
chan              687 drivers/media/pci/ngene/ngene-core.c 	struct ngene *dev = chan->dev;
chan              696 drivers/media/pci/ngene/ngene-core.c 		if (chan->running) {
chan              701 drivers/media/pci/ngene/ngene-core.c 		if (!chan->running) {
chan              708 drivers/media/pci/ngene/ngene-core.c 		dev->card_info->switch_ctrl(chan, 1, state ^ 1);
chan              711 drivers/media/pci/ngene/ngene-core.c 		spin_lock_irq(&chan->state_lock);
chan              717 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & (NGENE_IO_TSIN | NGENE_IO_TSOUT)) {
chan              718 drivers/media/pci/ngene/ngene-core.c 			chan->Capture1Length = 512 * 188;
chan              721 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & NGENE_IO_TSOUT) {
chan              722 drivers/media/pci/ngene/ngene-core.c 			chan->pBufferExchange = tsout_exchange;
chan              724 drivers/media/pci/ngene/ngene-core.c 			chan->AudioDTOValue = 0x80000000;
chan              725 drivers/media/pci/ngene/ngene-core.c 			chan->AudioDTOUpdated = 1;
chan              727 drivers/media/pci/ngene/ngene-core.c 		if (chan->mode & NGENE_IO_TSIN)
chan              728 drivers/media/pci/ngene/ngene-core.c 			chan->pBufferExchange = tsin_exchange;
chan              729 drivers/media/pci/ngene/ngene-core.c 		spin_unlock_irq(&chan->state_lock);
chan              735 drivers/media/pci/ngene/ngene-core.c 	ret = ngene_command_stream_control(dev, chan->number,
chan              740 drivers/media/pci/ngene/ngene-core.c 		chan->running = state;
chan              744 drivers/media/pci/ngene/ngene-core.c 		spin_lock_irq(&chan->state_lock);
chan              745 drivers/media/pci/ngene/ngene-core.c 		chan->pBufferExchange = NULL;
chan              747 drivers/media/pci/ngene/ngene-core.c 		spin_unlock_irq(&chan->state_lock);
chan              806 drivers/media/pci/ngene/ngene-core.c 	struct ngene_channel *chan;
chan              809 drivers/media/pci/ngene/ngene-core.c 		chan = &dev->channel[i];
chan              810 drivers/media/pci/ngene/ngene-core.c 		free_idlebuffer(dev, &chan->TSIdleBuffer, &chan->TSRingBuffer);
chan              811 drivers/media/pci/ngene/ngene-core.c 		free_ringbuffer(dev, &chan->RingBuffer);
chan              812 drivers/media/pci/ngene/ngene-core.c 		free_ringbuffer(dev, &chan->TSRingBuffer);
chan             1390 drivers/media/pci/ngene/ngene-core.c static void release_channel(struct ngene_channel *chan)
chan             1392 drivers/media/pci/ngene/ngene-core.c 	struct dvb_demux *dvbdemux = &chan->demux;
chan             1393 drivers/media/pci/ngene/ngene-core.c 	struct ngene *dev = chan->dev;
chan             1395 drivers/media/pci/ngene/ngene-core.c 	if (chan->running)
chan             1396 drivers/media/pci/ngene/ngene-core.c 		set_transfer(chan, 0);
chan             1398 drivers/media/pci/ngene/ngene-core.c 	tasklet_kill(&chan->demux_tasklet);
chan             1400 drivers/media/pci/ngene/ngene-core.c 	if (chan->ci_dev) {
chan             1401 drivers/media/pci/ngene/ngene-core.c 		dvb_unregister_device(chan->ci_dev);
chan             1402 drivers/media/pci/ngene/ngene-core.c 		chan->ci_dev = NULL;
chan             1405 drivers/media/pci/ngene/ngene-core.c 	if (chan->fe2)
chan             1406 drivers/media/pci/ngene/ngene-core.c 		dvb_unregister_frontend(chan->fe2);
chan             1408 drivers/media/pci/ngene/ngene-core.c 	if (chan->fe) {
chan             1409 drivers/media/pci/ngene/ngene-core.c 		dvb_unregister_frontend(chan->fe);
chan             1412 drivers/media/pci/ngene/ngene-core.c 		if (chan->i2c_client_fe) {
chan             1413 drivers/media/pci/ngene/ngene-core.c 			dvb_module_release(chan->i2c_client[0]);
chan             1414 drivers/media/pci/ngene/ngene-core.c 			chan->i2c_client[0] = NULL;
chan             1417 drivers/media/pci/ngene/ngene-core.c 		dvb_frontend_detach(chan->fe);
chan             1418 drivers/media/pci/ngene/ngene-core.c 		chan->fe = NULL;
chan             1421 drivers/media/pci/ngene/ngene-core.c 	if (chan->has_demux) {
chan             1422 drivers/media/pci/ngene/ngene-core.c 		dvb_net_release(&chan->dvbnet);
chan             1425 drivers/media/pci/ngene/ngene-core.c 					      &chan->hw_frontend);
chan             1427 drivers/media/pci/ngene/ngene-core.c 					      &chan->mem_frontend);
chan             1428 drivers/media/pci/ngene/ngene-core.c 		dvb_dmxdev_release(&chan->dmxdev);
chan             1429 drivers/media/pci/ngene/ngene-core.c 		dvb_dmx_release(&chan->demux);
chan             1430 drivers/media/pci/ngene/ngene-core.c 		chan->has_demux = false;
chan             1433 drivers/media/pci/ngene/ngene-core.c 	if (chan->has_adapter) {
chan             1434 drivers/media/pci/ngene/ngene-core.c 		dvb_unregister_adapter(&dev->adapter[chan->number]);
chan             1435 drivers/media/pci/ngene/ngene-core.c 		chan->has_adapter = false;
chan             1439 drivers/media/pci/ngene/ngene-core.c static int init_channel(struct ngene_channel *chan)
chan             1441 drivers/media/pci/ngene/ngene-core.c 	int ret = 0, nr = chan->number;
chan             1443 drivers/media/pci/ngene/ngene-core.c 	struct dvb_demux *dvbdemux = &chan->demux;
chan             1444 drivers/media/pci/ngene/ngene-core.c 	struct ngene *dev = chan->dev;
chan             1448 drivers/media/pci/ngene/ngene-core.c 	tasklet_init(&chan->demux_tasklet, demux_tasklet, (unsigned long)chan);
chan             1449 drivers/media/pci/ngene/ngene-core.c 	chan->users = 0;
chan             1450 drivers/media/pci/ngene/ngene-core.c 	chan->type = io;
chan             1451 drivers/media/pci/ngene/ngene-core.c 	chan->mode = chan->type;	/* for now only one mode */
chan             1452 drivers/media/pci/ngene/ngene-core.c 	chan->i2c_client_fe = 0;	/* be sure this is set to zero */
chan             1455 drivers/media/pci/ngene/ngene-core.c 		chan->fe = NULL;
chan             1457 drivers/media/pci/ngene/ngene-core.c 			ret = ni->demod_attach[nr](chan);
chan             1461 drivers/media/pci/ngene/ngene-core.c 		if (chan->fe && ni->tuner_attach[nr]) {
chan             1462 drivers/media/pci/ngene/ngene-core.c 			ret = ni->tuner_attach[nr](chan);
chan             1473 drivers/media/pci/ngene/ngene-core.c 			chan->DataFormatFlags = DF_SWAP32;
chan             1479 drivers/media/pci/ngene/ngene-core.c 						   &chan->dev->pci_dev->dev,
chan             1485 drivers/media/pci/ngene/ngene-core.c 			chan->has_adapter = true;
chan             1492 drivers/media/pci/ngene/ngene-core.c 		set_transfer(chan, 1);
chan             1493 drivers/media/pci/ngene/ngene-core.c 		chan->dev->channel[2].DataFormatFlags = DF_SWAP32;
chan             1494 drivers/media/pci/ngene/ngene-core.c 		set_transfer(&chan->dev->channel[2], 1);
chan             1495 drivers/media/pci/ngene/ngene-core.c 		dvb_register_device(adapter, &chan->ci_dev,
chan             1496 drivers/media/pci/ngene/ngene-core.c 				    &ngene_dvbdev_ci, (void *) chan,
chan             1498 drivers/media/pci/ngene/ngene-core.c 		if (!chan->ci_dev)
chan             1502 drivers/media/pci/ngene/ngene-core.c 	if (chan->fe) {
chan             1503 drivers/media/pci/ngene/ngene-core.c 		if (dvb_register_frontend(adapter, chan->fe) < 0)
chan             1505 drivers/media/pci/ngene/ngene-core.c 		chan->has_demux = true;
chan             1507 drivers/media/pci/ngene/ngene-core.c 	if (chan->fe2) {
chan             1508 drivers/media/pci/ngene/ngene-core.c 		if (dvb_register_frontend(adapter, chan->fe2) < 0)
chan             1510 drivers/media/pci/ngene/ngene-core.c 		if (chan->fe) {
chan             1511 drivers/media/pci/ngene/ngene-core.c 			chan->fe2->tuner_priv = chan->fe->tuner_priv;
chan             1512 drivers/media/pci/ngene/ngene-core.c 			memcpy(&chan->fe2->ops.tuner_ops,
chan             1513 drivers/media/pci/ngene/ngene-core.c 			       &chan->fe->ops.tuner_ops,
chan             1518 drivers/media/pci/ngene/ngene-core.c 	if (chan->has_demux) {
chan             1521 drivers/media/pci/ngene/ngene-core.c 					      ngene_stop_feed, chan);
chan             1522 drivers/media/pci/ngene/ngene-core.c 		ret = my_dvb_dmxdev_ts_card_init(&chan->dmxdev, &chan->demux,
chan             1523 drivers/media/pci/ngene/ngene-core.c 						 &chan->hw_frontend,
chan             1524 drivers/media/pci/ngene/ngene-core.c 						 &chan->mem_frontend, adapter);
chan             1525 drivers/media/pci/ngene/ngene-core.c 		ret = dvb_net_init(adapter, &chan->dvbnet, &chan->demux.dmx);
chan             1531 drivers/media/pci/ngene/ngene-core.c 	if (chan->fe) {
chan             1532 drivers/media/pci/ngene/ngene-core.c 		dvb_frontend_detach(chan->fe);
chan             1533 drivers/media/pci/ngene/ngene-core.c 		chan->fe = NULL;
chan             1535 drivers/media/pci/ngene/ngene-core.c 	release_channel(chan);
chan               40 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = dvbdev->priv;
chan               41 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene *dev = chan->dev;
chan               57 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = dvbdev->priv;
chan               58 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene *dev = chan->dev;
chan               80 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = dvbdev->priv;
chan               81 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene *dev = chan->dev;
chan              162 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = priv;
chan              163 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene *dev = chan->dev;
chan              169 drivers/media/pci/ngene/ngene-dvb.c 	if (dev->ci.en && chan->number == 2) {
chan              189 drivers/media/pci/ngene/ngene-dvb.c 		if (chan->tsin_offset) {
chan              190 drivers/media/pci/ngene/ngene-dvb.c 			memcpy(&chan->tsin_buffer[(188 - chan->tsin_offset)],
chan              191 drivers/media/pci/ngene/ngene-dvb.c 			       buf, chan->tsin_offset);
chan              192 drivers/media/pci/ngene/ngene-dvb.c 			tsin_copy_stripped(dev, &chan->tsin_buffer);
chan              194 drivers/media/pci/ngene/ngene-dvb.c 			buf += chan->tsin_offset;
chan              195 drivers/media/pci/ngene/ngene-dvb.c 			len -= chan->tsin_offset;
chan              210 drivers/media/pci/ngene/ngene-dvb.c 					chan->tsin_offset += tsoff;
chan              211 drivers/media/pci/ngene/ngene-dvb.c 					chan->tsin_offset %= 188;
chan              219 drivers/media/pci/ngene/ngene-dvb.c 						 chan->number);
chan              242 drivers/media/pci/ngene/ngene-dvb.c 			memcpy(&chan->tsin_buffer, buf, len);
chan              247 drivers/media/pci/ngene/ngene-dvb.c 	if (chan->users > 0)
chan              248 drivers/media/pci/ngene/ngene-dvb.c 		dvb_dmx_swfilter(&chan->demux, buf, len);
chan              255 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = priv;
chan              256 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene *dev = chan->dev;
chan              278 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = dvbdmx->priv;
chan              280 drivers/media/pci/ngene/ngene-dvb.c 	if (chan->users == 0) {
chan              281 drivers/media/pci/ngene/ngene-dvb.c 		if (!chan->dev->cmd_timeout_workaround || !chan->running)
chan              282 drivers/media/pci/ngene/ngene-dvb.c 			set_transfer(chan, 1);
chan              285 drivers/media/pci/ngene/ngene-dvb.c 	return ++chan->users;
chan              291 drivers/media/pci/ngene/ngene-dvb.c 	struct ngene_channel *chan = dvbdmx->priv;
chan              293 drivers/media/pci/ngene/ngene-dvb.c 	if (--chan->users)
chan              294 drivers/media/pci/ngene/ngene-dvb.c 		return chan->users;
chan              296 drivers/media/pci/ngene/ngene-dvb.c 	if (!chan->dev->cmd_timeout_workaround)
chan              297 drivers/media/pci/ngene/ngene-dvb.c 		set_transfer(chan, 0);
chan              104 drivers/media/pci/ngene/ngene-i2c.c 	struct ngene_channel *chan =
chan              106 drivers/media/pci/ngene/ngene-i2c.c 	struct ngene *dev = chan->dev;
chan              109 drivers/media/pci/ngene/ngene-i2c.c 	ngene_i2c_set_bus(dev, chan->number);
chan              584 drivers/media/pci/ngene/ngene.h 	struct ngene_channel *chan;
chan              900 drivers/media/pci/ngene/ngene.h void set_transfer(struct ngene_channel *chan, int state);
chan             1508 drivers/media/platform/davinci/vpif_capture.c 	struct vpif_capture_chan_config *chan;
chan             1552 drivers/media/platform/davinci/vpif_capture.c 		chan = &pdata->chan_config[i];
chan             1553 drivers/media/platform/davinci/vpif_capture.c 		chan->inputs = devm_kcalloc(&pdev->dev,
chan             1555 drivers/media/platform/davinci/vpif_capture.c 					    sizeof(*chan->inputs),
chan             1557 drivers/media/platform/davinci/vpif_capture.c 		if (!chan->inputs)
chan             1560 drivers/media/platform/davinci/vpif_capture.c 		chan->input_count++;
chan             1561 drivers/media/platform/davinci/vpif_capture.c 		chan->inputs[i].input.type = V4L2_INPUT_TYPE_CAMERA;
chan             1562 drivers/media/platform/davinci/vpif_capture.c 		chan->inputs[i].input.std = V4L2_STD_ALL;
chan             1563 drivers/media/platform/davinci/vpif_capture.c 		chan->inputs[i].input.capabilities = V4L2_IN_CAP_STD;
chan             1579 drivers/media/platform/davinci/vpif_capture.c 			chan->vpif_if.hd_pol = 1;
chan             1582 drivers/media/platform/davinci/vpif_capture.c 			chan->vpif_if.vd_pol = 1;
chan              208 drivers/media/platform/m2m-deinterlace.c 	struct dma_chan *chan = pcdev->dma_chan;
chan              209 drivers/media/platform/m2m-deinterlace.c 	struct dma_device *dmadev = chan->device;
chan              328 drivers/media/platform/m2m-deinterlace.c 	tx = dmadev->device_prep_interleaved_dma(chan, ctx->xt, flags);
chan              348 drivers/media/platform/m2m-deinterlace.c 	dma_async_issue_pending(chan);
chan              135 drivers/media/platform/omap/omap_vout_vrfb.c 	vout->vrfb_dma_tx.chan = dma_request_chan_by_mask(&mask);
chan              136 drivers/media/platform/omap/omap_vout_vrfb.c 	if (IS_ERR(vout->vrfb_dma_tx.chan)) {
chan              144 drivers/media/platform/omap/omap_vout_vrfb.c 			dma_release_channel(vout->vrfb_dma_tx.chan);
chan              188 drivers/media/platform/omap/omap_vout_vrfb.c 		dmaengine_terminate_sync(vout->vrfb_dma_tx.chan);
chan              189 drivers/media/platform/omap/omap_vout_vrfb.c 		dma_release_channel(vout->vrfb_dma_tx.chan);
chan              235 drivers/media/platform/omap/omap_vout_vrfb.c 	struct dma_chan *chan = vout->vrfb_dma_tx.chan;
chan              270 drivers/media/platform/omap/omap_vout_vrfb.c 	tx = dmaengine_prep_interleaved_dma(chan, xt, flags);
chan              286 drivers/media/platform/omap/omap_vout_vrfb.c 	dma_async_issue_pending(chan);
chan              292 drivers/media/platform/omap/omap_vout_vrfb.c 	status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
chan              296 drivers/media/platform/omap/omap_vout_vrfb.c 		dmaengine_terminate_sync(chan);
chan              301 drivers/media/platform/omap/omap_vout_vrfb.c 		dmaengine_terminate_sync(chan);
chan               86 drivers/media/platform/omap/omap_voutdef.h 	struct dma_chan *chan;
chan             1043 drivers/media/platform/pxa_camera.c 	int chan;
chan             1080 drivers/media/platform/pxa_camera.c 		chan = 1;
chan             1083 drivers/media/platform/pxa_camera.c 		chan = 2;
chan             1086 drivers/media/platform/pxa_camera.c 		chan = 0;
chan             1091 drivers/media/platform/pxa_camera.c 	last_status = dma_async_is_tx_complete(pcdev->dma_chans[chan],
chan             1092 drivers/media/platform/pxa_camera.c 					       last_buf->cookie[chan],
chan             1107 drivers/media/platform/pxa_camera.c 		pxa_camera_check_link_miss(pcdev, last_buf->cookie[chan],
chan              404 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 	struct channel_info *chan;
chan              414 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 		chan = find_channel(fei, bit);
chan              416 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 		if (chan)
chan              417 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 			complete(&chan->idle_completion);
chan             1839 drivers/media/platform/stm32/stm32-dcmi.c 	struct dma_chan *chan;
chan             1913 drivers/media/platform/stm32/stm32-dcmi.c 	chan = dma_request_slave_channel(&pdev->dev, "tx");
chan             1914 drivers/media/platform/stm32/stm32-dcmi.c 	if (!chan) {
chan             1928 drivers/media/platform/stm32/stm32-dcmi.c 	dcmi->dma_chan = chan;
chan              699 drivers/media/platform/ti-vpe/vpdma.c 		enum vpdma_channel chan)
chan              709 drivers/media/platform/ti-vpe/vpdma.c 	ctd->type_source_ctl = ctd_type_source_ctl(chan_info[chan].num,
chan              745 drivers/media/platform/ti-vpe/vpdma.c 	int dir, chan;
chan              748 drivers/media/platform/ti-vpe/vpdma.c 	chan = dtd_get_chan(dtd);
chan              751 drivers/media/platform/ti-vpe/vpdma.c 		dir == DTD_DIR_OUT ? "outbound" : "inbound", chan);
chan              766 drivers/media/platform/ti-vpe/vpdma.c 		 dtd_get_mode(dtd), dir, chan, dtd_get_priority(dtd),
chan              805 drivers/media/platform/ti-vpe/vpdma.c 		int max_w, int max_h, enum vpdma_channel chan, u32 flags)
chan              808 drivers/media/platform/ti-vpe/vpdma.c 				  max_w, max_h, chan_info[chan].num, flags);
chan              883 drivers/media/platform/ti-vpe/vpdma.c 		enum vpdma_channel chan, int field, u32 flags, int frame_width,
chan              893 drivers/media/platform/ti-vpe/vpdma.c 	channel = next_chan = chan_info[chan].num;
chan             1036 drivers/media/platform/ti-vpe/vpdma.c 		enum vpdma_channel chan)
chan             1038 drivers/media/platform/ti-vpe/vpdma.c 	int client_cstat = chan_info[chan].cstat_offset;
chan             1051 drivers/media/platform/ti-vpe/vpdma.c 		enum vpdma_channel chan)
chan             1053 drivers/media/platform/ti-vpe/vpdma.c 	int client_cstat = chan_info[chan].cstat_offset;
chan              239 drivers/media/platform/ti-vpe/vpdma.h 		enum vpdma_channel chan);
chan              245 drivers/media/platform/ti-vpe/vpdma.h 		int max_w, int max_h, enum vpdma_channel chan, u32 flags);
chan              254 drivers/media/platform/ti-vpe/vpdma.h 		enum vpdma_channel chan, int field, u32 flags, int frame_width,
chan              269 drivers/media/platform/ti-vpe/vpdma.h 		enum vpdma_channel chan);
chan              271 drivers/media/platform/ti-vpe/vpdma.h 		enum vpdma_frame_start_event fs_event, enum vpdma_channel chan);
chan              269 drivers/media/platform/ti-vpe/vpdma_priv.h static inline u32 dtd_pkt_ctl(bool mode, bool dir, int chan, int pri,
chan              273 drivers/media/platform/ti-vpe/vpdma_priv.h 		(dir << DTD_DIR_SHFT) | (chan << DTD_CHAN_SHFT) |
chan              193 drivers/media/radio/si470x/radio-si470x-common.c static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
chan              210 drivers/media/radio/si470x/radio-si470x-common.c 	radio->registers[CHANNEL] |= CHANNEL_TUNE | chan;
chan              261 drivers/media/radio/si470x/radio-si470x-common.c 	int chan, retval;
chan              265 drivers/media/radio/si470x/radio-si470x-common.c 	chan = radio->registers[READCHAN] & READCHAN_READCHAN;
chan              268 drivers/media/radio/si470x/radio-si470x-common.c 	*freq = chan * si470x_get_step(radio) + bands[radio->band].rangelow;
chan              279 drivers/media/radio/si470x/radio-si470x-common.c 	unsigned short chan;
chan              284 drivers/media/radio/si470x/radio-si470x-common.c 	chan = (freq - bands[radio->band].rangelow) / si470x_get_step(radio);
chan              286 drivers/media/radio/si470x/radio-si470x-common.c 	return si470x_set_chan(radio, chan);
chan              483 drivers/media/usb/usbvision/usbvision-video.c 	int chan;
chan              488 drivers/media/usb/usbvision/usbvision-video.c 		chan = vi->index;
chan              490 drivers/media/usb/usbvision/usbvision-video.c 		chan = vi->index + 1; /* skip Television string*/
chan              494 drivers/media/usb/usbvision/usbvision-video.c 	switch (chan) {
chan              501 drivers/media/usb/usbvision/usbvision-video.c 			vi->tuner = chan;
chan               32 drivers/mfd/stm32-timers.c 	status = dmaengine_tx_status(dma->chan, dma->chan->cookie, &state);
chan               80 drivers/mfd/stm32-timers.c 	dma->chan = dma->chans[id];
chan               91 drivers/mfd/stm32-timers.c 	ret = dmaengine_slave_config(dma->chan, &config);
chan               95 drivers/mfd/stm32-timers.c 	desc = dmaengine_prep_slave_single(dma->chan, dma_buf, len,
chan              110 drivers/mfd/stm32-timers.c 	dma_async_issue_pending(dma->chan);
chan              141 drivers/mfd/stm32-timers.c 	dmaengine_terminate_all(dma->chan);
chan              145 drivers/mfd/stm32-timers.c 	dma->chan = NULL;
chan              136 drivers/misc/mic/bus/scif_bus.c 		     void __iomem *rdp, struct dma_chan **chan, int num_chan,
chan              162 drivers/misc/mic/bus/scif_bus.c 	sdev->dma_ch = chan;
chan              112 drivers/misc/mic/bus/scif_bus.h 		     struct dma_chan **chan, int num_chan,
chan              136 drivers/misc/mic/bus/vop_bus.c 		    struct dma_chan *chan)
chan              156 drivers/misc/mic/bus/vop_bus.c 	vdev->dma_ch = chan;
chan              105 drivers/misc/mic/bus/vop_bus.h 		    struct dma_chan *chan);
chan              314 drivers/misc/mic/card/mic_device.c 	struct dma_chan *chan;
chan              320 drivers/misc/mic/card/mic_device.c 		chan = dma_request_channel(mask, NULL, NULL);
chan              321 drivers/misc/mic/card/mic_device.c 		if (chan) {
chan              322 drivers/misc/mic/card/mic_device.c 			mdrv->dma_ch[mdrv->num_dma_ch++] = chan;
chan              326 drivers/misc/mic/card/mic_device.c 	} while (chan);
chan              411 drivers/misc/mic/host/mic_boot.c 	struct dma_chan *chan;
chan              417 drivers/misc/mic/host/mic_boot.c 		chan = dma_request_channel(mask, mdev->ops->dma_filter,
chan              419 drivers/misc/mic/host/mic_boot.c 		if (chan) {
chan              420 drivers/misc/mic/host/mic_boot.c 			mdev->dma_ch[mdev->num_dma_ch++] = chan;
chan              424 drivers/misc/mic/host/mic_boot.c 	} while (chan);
chan              123 drivers/misc/mic/host/mic_device.h 	bool (*dma_filter)(struct dma_chan *chan, void *param);
chan              542 drivers/misc/mic/host/mic_x100.c static bool mic_x100_dma_filter(struct dma_chan *chan, void *param)
chan              544 drivers/misc/mic/host/mic_x100.c 	if (chan->device->dev->parent == (struct device *)param)
chan               81 drivers/misc/mic/scif/scif_dma.c 	struct dma_chan *chan;
chan               93 drivers/misc/mic/scif/scif_dma.c 	chan = sdev->dma_ch[scifdev->dma_ch_idx];
chan               96 drivers/misc/mic/scif/scif_dma.c 	ep->rma_info.dma_chan = chan;
chan              409 drivers/misc/mic/scif/scif_dma.c static int scif_sync_dma(struct scif_hw_dev *sdev, struct dma_chan *chan,
chan              418 drivers/misc/mic/scif/scif_dma.c 	if (!chan) {
chan              424 drivers/misc/mic/scif/scif_dma.c 	ddev = chan->device;
chan              426 drivers/misc/mic/scif/scif_dma.c 	tx = ddev->device_prep_dma_memcpy(chan, 0, 0, 0, flags);
chan              442 drivers/misc/mic/scif/scif_dma.c 		dma_async_issue_pending(chan);
chan              444 drivers/misc/mic/scif/scif_dma.c 		if (dma_sync_wait(chan, cookie) == DMA_COMPLETE) {
chan              475 drivers/misc/mic/scif/scif_dma.c static int scif_async_dma(struct scif_hw_dev *sdev, struct dma_chan *chan)
chan              485 drivers/misc/mic/scif/scif_dma.c 	if (!chan) {
chan              491 drivers/misc/mic/scif/scif_dma.c 	ddev = chan->device;
chan              493 drivers/misc/mic/scif/scif_dma.c 	tx = ddev->device_prep_dma_memcpy(chan, 0, 0, 0, flags);
chan              511 drivers/misc/mic/scif/scif_dma.c 	dma_async_issue_pending(chan);
chan              521 drivers/misc/mic/scif/scif_dma.c 	status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
chan              540 drivers/misc/mic/scif/scif_dma.c static int scif_drain_dma_poll(struct scif_hw_dev *sdev, struct dma_chan *chan)
chan              542 drivers/misc/mic/scif/scif_dma.c 	if (!chan)
chan              544 drivers/misc/mic/scif/scif_dma.c 	return scif_sync_dma(sdev, chan, SCIF_DMA_SYNC_WAIT);
chan              555 drivers/misc/mic/scif/scif_dma.c int scif_drain_dma_intr(struct scif_hw_dev *sdev, struct dma_chan *chan)
chan              557 drivers/misc/mic/scif/scif_dma.c 	if (!chan)
chan              559 drivers/misc/mic/scif/scif_dma.c 	return scif_async_dma(sdev, chan);
chan              572 drivers/misc/mic/scif/scif_dma.c 	struct dma_chan *chan;
chan              581 drivers/misc/mic/scif/scif_dma.c 		chan = ep->rma_info.dma_chan;
chan              585 drivers/misc/mic/scif/scif_dma.c 		if (!chan || !scifdev_alive(ep) ||
chan              616 drivers/misc/mic/scif/scif_dma.c 	struct dma_chan *chan;
chan              624 drivers/misc/mic/scif/scif_dma.c 		chan = ep->rma_info.dma_chan;
chan              628 drivers/misc/mic/scif/scif_dma.c 		if (!chan || !scifdev_alive(ep) ||
chan              868 drivers/misc/mic/scif/scif_dma.c 				 u8 *temp, struct dma_chan *chan,
chan              881 drivers/misc/mic/scif/scif_dma.c 	struct dma_device *dev = chan->device;
chan              955 drivers/misc/mic/scif/scif_dma.c 				dev->device_prep_dma_memcpy(chan,
chan              970 drivers/misc/mic/scif/scif_dma.c 				dma_async_issue_pending(chan);
chan              979 drivers/misc/mic/scif/scif_dma.c 				dev->device_prep_dma_memcpy(chan,
chan              992 drivers/misc/mic/scif/scif_dma.c 				dma_async_issue_pending(chan);
chan              995 drivers/misc/mic/scif/scif_dma.c 				dev->device_prep_dma_memcpy(chan,
chan             1008 drivers/misc/mic/scif/scif_dma.c 				dma_async_issue_pending(chan);
chan             1011 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, temp_dma_addr,
chan             1022 drivers/misc/mic/scif/scif_dma.c 			dma_async_issue_pending(chan);
chan             1049 drivers/misc/mic/scif/scif_dma.c 			ret = scif_drain_dma_intr(rdev->sdev, chan);
chan             1061 drivers/misc/mic/scif/scif_dma.c 	tx = dev->device_prep_dma_memcpy(chan, 0, 0, 0, DMA_PREP_INTERRUPT);
chan             1074 drivers/misc/mic/scif/scif_dma.c 	dma_async_issue_pending(chan);
chan             1089 drivers/misc/mic/scif/scif_dma.c 					   struct dma_chan *chan)
chan             1102 drivers/misc/mic/scif/scif_dma.c 	struct dma_device *dev = chan->device;
chan             1143 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1164 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1175 drivers/misc/mic/scif/scif_dma.c 			dma_async_issue_pending(chan);
chan             1177 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1207 drivers/misc/mic/scif/scif_dma.c 					  struct dma_chan *chan)
chan             1222 drivers/misc/mic/scif/scif_dma.c 	struct dma_device *dev = chan->device;
chan             1314 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1328 drivers/misc/mic/scif/scif_dma.c 			dma_async_issue_pending(chan);
chan             1337 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1349 drivers/misc/mic/scif/scif_dma.c 			dma_async_issue_pending(chan);
chan             1351 drivers/misc/mic/scif/scif_dma.c 			tx = dev->device_prep_dma_memcpy(chan, dst_dma_addr,
chan             1363 drivers/misc/mic/scif/scif_dma.c 			dma_async_issue_pending(chan);
chan             1387 drivers/misc/mic/scif/scif_dma.c 			ret = scif_drain_dma_poll(rdev->sdev, chan);
chan             1535 drivers/misc/mic/scif/scif_dma.c 					  struct dma_chan *chan, off_t loffset)
chan             1544 drivers/misc/mic/scif/scif_dma.c 	if (is_dma_copy_aligned(chan->device, 1, 1, 1))
chan             1545 drivers/misc/mic/scif/scif_dma.c 		return _scif_rma_list_dma_copy_aligned(work, chan);
chan             1551 drivers/misc/mic/scif/scif_dma.c 		return scif_rma_list_dma_copy_aligned(work, chan);
chan             1604 drivers/misc/mic/scif/scif_dma.c 	if (scif_rma_list_dma_copy_unaligned(work, temp, chan, src_local) < 0)
chan             1646 drivers/misc/mic/scif/scif_dma.c 	struct dma_chan *chan;
chan             1787 drivers/misc/mic/scif/scif_dma.c 		chan = ep->rma_info.dma_chan;
chan             1789 drivers/misc/mic/scif/scif_dma.c 						     chan, loffset);
chan              199 drivers/misc/mic/scif/scif_fence.c 	struct dma_chan *chan = ep->rma_info.dma_chan;
chan              200 drivers/misc/mic/scif/scif_fence.c 	struct dma_device *ddev = chan->device;
chan              201 drivers/misc/mic/scif/scif_fence.c 	bool x100 = !is_dma_copy_aligned(chan->device, 1, 1, 1);
chan              209 drivers/misc/mic/scif/scif_fence.c 	tx = ddev->device_prep_dma_memcpy(chan, 0, 0, 0, DMA_PREP_FENCE);
chan              223 drivers/misc/mic/scif/scif_fence.c 	dma_async_issue_pending(chan);
chan              229 drivers/misc/mic/scif/scif_fence.c 		tx = ddev->device_prep_dma_imm_data(chan, dst, val, 0);
chan              243 drivers/misc/mic/scif/scif_fence.c 		tx = ddev->device_prep_dma_memcpy(chan, dst, src, sizeof(val),
chan              271 drivers/misc/mic/scif/scif_fence.c 	dma_async_issue_pending(chan);
chan              589 drivers/misc/mic/scif/scif_fence.c 	struct dma_chan *chan = ep->rma_info.dma_chan;
chan              590 drivers/misc/mic/scif/scif_fence.c 	struct dma_device *ddev = chan->device;
chan              595 drivers/misc/mic/scif/scif_fence.c 	tx = ddev->device_prep_dma_memcpy(chan, 0, 0, 0, DMA_PREP_FENCE);
chan              609 drivers/misc/mic/scif/scif_fence.c 	dma_async_issue_pending(chan);
chan              610 drivers/misc/mic/scif/scif_fence.c 	tx = ddev->device_prep_dma_interrupt(chan, DMA_PREP_INTERRUPT);
chan              627 drivers/misc/mic/scif/scif_fence.c 	dma_async_issue_pending(chan);
chan              374 drivers/misc/mic/scif/scif_rma.h int scif_drain_dma_intr(struct scif_hw_dev *sdev, struct dma_chan *chan);
chan              218 drivers/mmc/host/atmel-mci.c 	struct dma_chan			*chan;
chan              937 drivers/mmc/host/atmel-mci.c 		dma_unmap_sg(host->dma.chan->device->dev,
chan             1084 drivers/mmc/host/atmel-mci.c 	struct dma_chan			*chan;
chan             1117 drivers/mmc/host/atmel-mci.c 	chan = host->dma.chan;
chan             1118 drivers/mmc/host/atmel-mci.c 	if (chan)
chan             1119 drivers/mmc/host/atmel-mci.c 		host->data_chan = chan;
chan             1121 drivers/mmc/host/atmel-mci.c 	if (!chan)
chan             1138 drivers/mmc/host/atmel-mci.c 	sglen = dma_map_sg(chan->device->dev, data->sg,
chan             1141 drivers/mmc/host/atmel-mci.c 	dmaengine_slave_config(chan, &host->dma_conf);
chan             1142 drivers/mmc/host/atmel-mci.c 	desc = dmaengine_prep_slave_sg(chan,
chan             1154 drivers/mmc/host/atmel-mci.c 	dma_unmap_sg(chan->device->dev, data->sg, data->sg_len,
chan             1180 drivers/mmc/host/atmel-mci.c 	struct dma_chan			*chan = host->data_chan;
chan             1183 drivers/mmc/host/atmel-mci.c 	if (chan) {
chan             1185 drivers/mmc/host/atmel-mci.c 		dma_async_issue_pending(chan);
chan             1207 drivers/mmc/host/atmel-mci.c 	struct dma_chan *chan = host->data_chan;
chan             1209 drivers/mmc/host/atmel-mci.c 	if (chan) {
chan             1210 drivers/mmc/host/atmel-mci.c 		dmaengine_terminate_all(chan);
chan             2350 drivers/mmc/host/atmel-mci.c 	host->dma.chan = dma_request_slave_channel_reason(&host->pdev->dev,
chan             2353 drivers/mmc/host/atmel-mci.c 	if (PTR_ERR(host->dma.chan) == -ENODEV) {
chan             2363 drivers/mmc/host/atmel-mci.c 		host->dma.chan = dma_request_channel(mask, pdata->dma_filter,
chan             2365 drivers/mmc/host/atmel-mci.c 		if (!host->dma.chan)
chan             2366 drivers/mmc/host/atmel-mci.c 			host->dma.chan = ERR_PTR(-ENODEV);
chan             2369 drivers/mmc/host/atmel-mci.c 	if (IS_ERR(host->dma.chan))
chan             2370 drivers/mmc/host/atmel-mci.c 		return PTR_ERR(host->dma.chan);
chan             2373 drivers/mmc/host/atmel-mci.c 		 dma_chan_name(host->dma.chan));
chan             2592 drivers/mmc/host/atmel-mci.c 	if (!IS_ERR(host->dma.chan))
chan             2593 drivers/mmc/host/atmel-mci.c 		dma_release_channel(host->dma.chan);
chan             2620 drivers/mmc/host/atmel-mci.c 	if (!IS_ERR(host->dma.chan))
chan             2621 drivers/mmc/host/atmel-mci.c 		dma_release_channel(host->dma.chan);
chan              369 drivers/mmc/host/au1xmmc.c 			u32 chan = DMA_CHANNEL(host);
chan              371 drivers/mmc/host/au1xmmc.c 			chan_tab_t *c = *((chan_tab_t **)chan);
chan              403 drivers/mmc/host/davinci_mmc.c 	struct dma_chan *chan;
chan              415 drivers/mmc/host/davinci_mmc.c 		chan = host->dma_tx;
chan              437 drivers/mmc/host/davinci_mmc.c 		chan = host->dma_rx;
chan              454 drivers/mmc/host/davinci_mmc.c 	dma_async_issue_pending(chan);
chan              239 drivers/mmc/host/jz4740_mmc.c 	struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
chan              242 drivers/mmc/host/jz4740_mmc.c 	dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, dir);
chan              253 drivers/mmc/host/jz4740_mmc.c 	struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
chan              260 drivers/mmc/host/jz4740_mmc.c 	sg_count = dma_map_sg(chan->device->dev,
chan              280 drivers/mmc/host/jz4740_mmc.c 	struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
chan              302 drivers/mmc/host/jz4740_mmc.c 	dmaengine_slave_config(chan, &conf);
chan              303 drivers/mmc/host/jz4740_mmc.c 	desc = dmaengine_prep_slave_sg(chan, data->sg, sg_count,
chan              314 drivers/mmc/host/jz4740_mmc.c 	dma_async_issue_pending(chan);
chan              349 drivers/mmc/host/jz4740_mmc.c 		struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
chan              351 drivers/mmc/host/jz4740_mmc.c 		dmaengine_terminate_all(chan);
chan              621 drivers/mmc/host/mmci.c 	struct dma_chan	*chan;
chan              714 drivers/mmc/host/mmci.c 	struct dma_chan *chan;
chan              717 drivers/mmc/host/mmci.c 		chan = dmae->rx_channel;
chan              719 drivers/mmc/host/mmci.c 		chan = dmae->tx_channel;
chan              721 drivers/mmc/host/mmci.c 	dma_unmap_sg(chan->device->dev, data->sg, data->sg_len,
chan              803 drivers/mmc/host/mmci.c 	struct dma_chan *chan;
chan              811 drivers/mmc/host/mmci.c 		chan = dmae->rx_channel;
chan              814 drivers/mmc/host/mmci.c 		chan = dmae->tx_channel;
chan              818 drivers/mmc/host/mmci.c 	if (!chan)
chan              825 drivers/mmc/host/mmci.c 	device = chan->device;
chan              834 drivers/mmc/host/mmci.c 	dmaengine_slave_config(chan, &conf);
chan              835 drivers/mmc/host/mmci.c 	desc = dmaengine_prep_slave_sg(chan, data->sg, nr_sg,
chan              840 drivers/mmc/host/mmci.c 	*dma_chan = chan;
chan              862 drivers/mmc/host/mmci.c 		return _mmci_dmae_prep_data(host, data, &nd->chan, &nd->desc);
chan              893 drivers/mmc/host/mmci.c 	WARN_ON(!data->host_cookie && (next->desc || next->chan));
chan              896 drivers/mmc/host/mmci.c 	dmae->cur = next->chan;
chan              898 drivers/mmc/host/mmci.c 	next->chan = NULL;
chan              914 drivers/mmc/host/mmci.c 		struct dma_chan *chan;
chan              916 drivers/mmc/host/mmci.c 			chan = dmae->rx_channel;
chan              918 drivers/mmc/host/mmci.c 			chan = dmae->tx_channel;
chan              919 drivers/mmc/host/mmci.c 		dmaengine_terminate_all(chan);
chan              924 drivers/mmc/host/mmci.c 		if (dmae->cur == next->chan) {
chan              930 drivers/mmc/host/mmci.c 		next->chan = NULL;
chan              948 drivers/mmc/host/mxcmmc.c static bool filter(struct dma_chan *chan, void *param)
chan              952 drivers/mmc/host/mxcmmc.c 	if (!imx_dma_is_general_purpose(chan))
chan              955 drivers/mmc/host/mxcmmc.c 	chan->private = &host->dma_data;
chan              921 drivers/mmc/host/omap_hsmmc.c 		struct dma_chan *chan = omap_hsmmc_get_dma_chan(host, host->data);
chan              923 drivers/mmc/host/omap_hsmmc.c 		dmaengine_terminate_all(chan);
chan              924 drivers/mmc/host/omap_hsmmc.c 		dma_unmap_sg(chan->device->dev,
chan             1168 drivers/mmc/host/omap_hsmmc.c 	struct dma_chan *chan;
chan             1179 drivers/mmc/host/omap_hsmmc.c 	chan = omap_hsmmc_get_dma_chan(host, data);
chan             1181 drivers/mmc/host/omap_hsmmc.c 		dma_unmap_sg(chan->device->dev,
chan             1201 drivers/mmc/host/omap_hsmmc.c 				       struct dma_chan *chan)
chan             1215 drivers/mmc/host/omap_hsmmc.c 		dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
chan             1245 drivers/mmc/host/omap_hsmmc.c 	struct dma_chan *chan;
chan             1271 drivers/mmc/host/omap_hsmmc.c 	chan = omap_hsmmc_get_dma_chan(host, data);
chan             1273 drivers/mmc/host/omap_hsmmc.c 	ret = dmaengine_slave_config(chan, &cfg);
chan             1277 drivers/mmc/host/omap_hsmmc.c 	ret = omap_hsmmc_pre_dma_transfer(host, data, NULL, chan);
chan             1281 drivers/mmc/host/omap_hsmmc.c 	tx = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len,
chan             1342 drivers/mmc/host/omap_hsmmc.c 	struct dma_chan *chan;
chan             1350 drivers/mmc/host/omap_hsmmc.c 	chan = omap_hsmmc_get_dma_chan(host, req->data);
chan             1351 drivers/mmc/host/omap_hsmmc.c 	dma_async_issue_pending(chan);
chan              164 drivers/mmc/host/pxamci.c 	struct dma_chan *chan;
chan              191 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_rx;
chan              195 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_tx;
chan              200 drivers/mmc/host/pxamci.c 	ret = dmaengine_slave_config(chan, &config);
chan              206 drivers/mmc/host/pxamci.c 	host->dma_len = dma_map_sg(chan->device->dev, data->sg, data->sg_len,
chan              209 drivers/mmc/host/pxamci.c 	tx = dmaengine_prep_slave_sg(chan, data->sg, host->dma_len, direction,
chan              230 drivers/mmc/host/pxamci.c 		dma_async_issue_pending(chan);
chan              333 drivers/mmc/host/pxamci.c 	struct dma_chan *chan;
chan              339 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_rx;
chan              341 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_tx;
chan              342 drivers/mmc/host/pxamci.c 	dma_unmap_sg(chan->device->dev,
chan              534 drivers/mmc/host/pxamci.c 	struct dma_chan *chan;
chan              543 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_rx;
chan              545 drivers/mmc/host/pxamci.c 		chan = host->dma_chan_tx;
chan              547 drivers/mmc/host/pxamci.c 	status = dmaengine_tx_status(chan, host->dma_cookie, &state);
chan               38 drivers/mmc/host/renesas_sdhi.h 	bool (*filter)(struct dma_chan *chan, void *arg);
chan              157 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	struct dma_chan *chan = host->chan_rx;
chan              188 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE);
chan              190 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		desc = dmaengine_prep_slave_sg(chan, sg, ret, DMA_DEV_TO_MEM,
chan              212 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		dma_release_channel(chan);
chan              214 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		chan = host->chan_tx;
chan              215 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		if (chan) {
chan              217 drivers/mmc/host/renesas_sdhi_sys_dmac.c 			dma_release_channel(chan);
chan              229 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	struct dma_chan *chan = host->chan_tx;
chan              265 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE);
chan              267 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		desc = dmaengine_prep_slave_sg(chan, sg, ret, DMA_MEM_TO_DEV,
chan              289 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		dma_release_channel(chan);
chan              291 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		chan = host->chan_rx;
chan              292 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		if (chan) {
chan              294 drivers/mmc/host/renesas_sdhi_sys_dmac.c 			dma_release_channel(chan);
chan              316 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	struct dma_chan *chan = NULL;
chan              322 drivers/mmc/host/renesas_sdhi_sys_dmac.c 			chan = host->chan_rx;
chan              324 drivers/mmc/host/renesas_sdhi_sys_dmac.c 			chan = host->chan_tx;
chan              331 drivers/mmc/host/renesas_sdhi_sys_dmac.c 	if (chan)
chan              332 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		dma_async_issue_pending(chan);
chan              424 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		struct dma_chan *chan = host->chan_tx;
chan              427 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		dma_release_channel(chan);
chan              430 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		struct dma_chan *chan = host->chan_rx;
chan              433 drivers/mmc/host/renesas_sdhi_sys_dmac.c 		dma_release_channel(chan);
chan              292 drivers/mmc/host/sh_mmcif.c 	struct dma_chan *chan = host->chan_rx;
chan              297 drivers/mmc/host/sh_mmcif.c 	ret = dma_map_sg(chan->device->dev, sg, data->sg_len,
chan              301 drivers/mmc/host/sh_mmcif.c 		desc = dmaengine_prep_slave_sg(chan, sg, ret,
chan              310 drivers/mmc/host/sh_mmcif.c 		dma_async_issue_pending(chan);
chan              321 drivers/mmc/host/sh_mmcif.c 		dma_release_channel(chan);
chan              323 drivers/mmc/host/sh_mmcif.c 		chan = host->chan_tx;
chan              324 drivers/mmc/host/sh_mmcif.c 		if (chan) {
chan              326 drivers/mmc/host/sh_mmcif.c 			dma_release_channel(chan);
chan              342 drivers/mmc/host/sh_mmcif.c 	struct dma_chan *chan = host->chan_tx;
chan              347 drivers/mmc/host/sh_mmcif.c 	ret = dma_map_sg(chan->device->dev, sg, data->sg_len,
chan              351 drivers/mmc/host/sh_mmcif.c 		desc = dmaengine_prep_slave_sg(chan, sg, ret,
chan              360 drivers/mmc/host/sh_mmcif.c 		dma_async_issue_pending(chan);
chan              371 drivers/mmc/host/sh_mmcif.c 		dma_release_channel(chan);
chan              373 drivers/mmc/host/sh_mmcif.c 		chan = host->chan_rx;
chan              374 drivers/mmc/host/sh_mmcif.c 		if (chan) {
chan              376 drivers/mmc/host/sh_mmcif.c 			dma_release_channel(chan);
chan              401 drivers/mmc/host/sh_mmcif.c 				     struct dma_chan *chan,
chan              418 drivers/mmc/host/sh_mmcif.c 	return dmaengine_slave_config(chan, &cfg);
chan              461 drivers/mmc/host/sh_mmcif.c 		struct dma_chan *chan = host->chan_tx;
chan              463 drivers/mmc/host/sh_mmcif.c 		dma_release_channel(chan);
chan              466 drivers/mmc/host/sh_mmcif.c 		struct dma_chan *chan = host->chan_rx;
chan              468 drivers/mmc/host/sh_mmcif.c 		dma_release_channel(chan);
chan               68 drivers/mmc/host/uniphier-sd.c 	struct dma_chan *chan;
chan               91 drivers/mmc/host/uniphier-sd.c 	dma_async_issue_pending(priv->chan);
chan              132 drivers/mmc/host/uniphier-sd.c 	if (!priv->chan)
chan              148 drivers/mmc/host/uniphier-sd.c 	desc = dmaengine_prep_slave_sg(priv->chan, host->sg_ptr, sg_len,
chan              180 drivers/mmc/host/uniphier-sd.c 	struct dma_chan *chan;
chan              182 drivers/mmc/host/uniphier-sd.c 	chan = dma_request_chan(mmc_dev(host->mmc), "rx-tx");
chan              183 drivers/mmc/host/uniphier-sd.c 	if (IS_ERR(chan)) {
chan              190 drivers/mmc/host/uniphier-sd.c 	priv->chan = chan;
chan              191 drivers/mmc/host/uniphier-sd.c 	host->chan_rx = chan;
chan              192 drivers/mmc/host/uniphier-sd.c 	host->chan_tx = chan;
chan              202 drivers/mmc/host/uniphier-sd.c 	if (priv->chan)
chan              203 drivers/mmc/host/uniphier-sd.c 		dma_release_channel(priv->chan);
chan              212 drivers/mmc/host/uniphier-sd.c 	if (priv->chan)
chan              213 drivers/mmc/host/uniphier-sd.c 		dmaengine_terminate_sync(priv->chan);
chan              520 drivers/mmc/host/usdhi6rol0.c 		struct dma_chan *chan = host->chan_tx;
chan              522 drivers/mmc/host/usdhi6rol0.c 		dma_release_channel(chan);
chan              525 drivers/mmc/host/usdhi6rol0.c 		struct dma_chan *chan = host->chan_rx;
chan              527 drivers/mmc/host/usdhi6rol0.c 		dma_release_channel(chan);
chan              565 drivers/mmc/host/usdhi6rol0.c static int usdhi6_dma_setup(struct usdhi6_host *host, struct dma_chan *chan,
chan              586 drivers/mmc/host/usdhi6rol0.c 	ret = dma_map_sg(chan->device->dev, sg, data->sg_len, data_dir);
chan              589 drivers/mmc/host/usdhi6rol0.c 		desc = dmaengine_prep_slave_sg(chan, sg, ret, dir,
chan              460 drivers/mtd/nand/raw/fsmc_nand.c 	struct dma_chan *chan;
chan              470 drivers/mtd/nand/raw/fsmc_nand.c 		chan = host->write_dma_chan;
chan              472 drivers/mtd/nand/raw/fsmc_nand.c 		chan = host->read_dma_chan;
chan              476 drivers/mtd/nand/raw/fsmc_nand.c 	dma_dev = chan->device;
chan              487 drivers/mtd/nand/raw/fsmc_nand.c 	tx = dma_dev->device_prep_dma_memcpy(chan, dma_dst, dma_src,
chan              505 drivers/mtd/nand/raw/fsmc_nand.c 	dma_async_issue_pending(chan);
chan              511 drivers/mtd/nand/raw/fsmc_nand.c 		dmaengine_terminate_all(chan);
chan              823 drivers/mtd/nand/raw/fsmc_nand.c static bool filter(struct dma_chan *chan, void *slave)
chan              825 drivers/mtd/nand/raw/fsmc_nand.c 	chan->private = slave;
chan              382 drivers/mtd/nand/raw/qcom_nandc.c 			struct dma_chan *chan;
chan              728 drivers/mtd/nand/raw/qcom_nandc.c 				  struct dma_chan *chan,
chan              743 drivers/mtd/nand/raw/qcom_nandc.c 	if (chan == nandc->cmd_chan) {
chan              749 drivers/mtd/nand/raw/qcom_nandc.c 	} else if (chan == nandc->tx_chan) {
chan              774 drivers/mtd/nand/raw/qcom_nandc.c 	dma_desc = dmaengine_prep_slave_sg(chan, sgl, sgl_cnt, dir_eng,
chan              787 drivers/mtd/nand/raw/qcom_nandc.c 	if (chan == nandc->cmd_chan)
chan              938 drivers/mtd/nand/raw/qcom_nandc.c 	ret = dmaengine_slave_config(nandc->chan, &slave_conf);
chan              944 drivers/mtd/nand/raw/qcom_nandc.c 	dma_desc = dmaengine_prep_slave_sg(nandc->chan, sgl, 1, dir_eng, 0);
chan             1332 drivers/mtd/nand/raw/qcom_nandc.c 		if (dma_sync_wait(nandc->chan, cookie) != DMA_COMPLETE)
chan             2708 drivers/mtd/nand/raw/qcom_nandc.c 		nandc->chan = dma_request_slave_channel(nandc->dev, "rxtx");
chan             2709 drivers/mtd/nand/raw/qcom_nandc.c 		if (!nandc->chan) {
chan             2743 drivers/mtd/nand/raw/qcom_nandc.c 		if (nandc->chan)
chan             2744 drivers/mtd/nand/raw/qcom_nandc.c 			dma_release_channel(nandc->chan);
chan              382 drivers/mtd/nand/raw/sh_flctl.c 	struct dma_chan *chan;
chan              390 drivers/mtd/nand/raw/sh_flctl.c 		chan = flctl->chan_fifo0_rx;
chan              393 drivers/mtd/nand/raw/sh_flctl.c 		chan = flctl->chan_fifo0_tx;
chan              397 drivers/mtd/nand/raw/sh_flctl.c 	dma_addr = dma_map_single(chan->device->dev, buf, len, dir);
chan              399 drivers/mtd/nand/raw/sh_flctl.c 	if (!dma_mapping_error(chan->device->dev, dma_addr))
chan              400 drivers/mtd/nand/raw/sh_flctl.c 		desc = dmaengine_prep_slave_single(chan, dma_addr, len,
chan              418 drivers/mtd/nand/raw/sh_flctl.c 		dma_async_issue_pending(chan);
chan              433 drivers/mtd/nand/raw/sh_flctl.c 		dmaengine_terminate_all(chan);
chan              442 drivers/mtd/nand/raw/sh_flctl.c 	dma_unmap_single(chan->device->dev, dma_addr, len, dir);
chan               88 drivers/mtd/nand/raw/tango_nand.c 	struct dma_chan *chan;
chan              233 drivers/mtd/nand/raw/tango_nand.c 	struct dma_chan *chan = nfc->chan;
chan              242 drivers/mtd/nand/raw/tango_nand.c 	if (dma_map_sg(chan->device->dev, &sg, 1, dir) != 1)
chan              246 drivers/mtd/nand/raw/tango_nand.c 	desc = dmaengine_prep_slave_sg(chan, &sg, 1, tdir, DMA_PREP_INTERRUPT);
chan              261 drivers/mtd/nand/raw/tango_nand.c 	dma_async_issue_pending(chan);
chan              270 drivers/mtd/nand/raw/tango_nand.c 	dma_unmap_sg(chan->device->dev, &sg, 1, dir);
chan              606 drivers/mtd/nand/raw/tango_nand.c 	dma_release_channel(nfc->chan);
chan              649 drivers/mtd/nand/raw/tango_nand.c 	nfc->chan = dma_request_chan(&pdev->dev, "rxtx");
chan              650 drivers/mtd/nand/raw/tango_nand.c 	if (IS_ERR(nfc->chan))
chan              651 drivers/mtd/nand/raw/tango_nand.c 		return PTR_ERR(nfc->chan);
chan              396 drivers/net/can/sja1000/peak_pci.c 	struct peak_pci_chan *chan = priv->priv;
chan              397 drivers/net/can/sja1000/peak_pci.c 	struct peak_pciec_card *card = chan->pciec_card;
chan              432 drivers/net/can/sja1000/peak_pci.c 	struct peak_pci_chan *chan = priv->priv;
chan              437 drivers/net/can/sja1000/peak_pci.c 	if (chan->prev_dev) {
chan              438 drivers/net/can/sja1000/peak_pci.c 		struct sja1000_priv *prev_priv = netdev_priv(chan->prev_dev);
chan              452 drivers/net/can/sja1000/peak_pci.c 		card->cfg_base = chan->cfg_base;
chan              485 drivers/net/can/sja1000/peak_pci.c 	chan->pciec_card = card;
chan              537 drivers/net/can/sja1000/peak_pci.c 	struct peak_pci_chan *chan = priv->priv;
chan              541 drivers/net/can/sja1000/peak_pci.c 	icr = readw(chan->cfg_base + PITA_ICR);
chan              542 drivers/net/can/sja1000/peak_pci.c 	if (icr & chan->icr_mask)
chan              543 drivers/net/can/sja1000/peak_pci.c 		writew(chan->icr_mask, chan->cfg_base + PITA_ICR);
chan              549 drivers/net/can/sja1000/peak_pci.c 	struct peak_pci_chan *chan;
chan              617 drivers/net/can/sja1000/peak_pci.c 		chan = priv->priv;
chan              619 drivers/net/can/sja1000/peak_pci.c 		chan->cfg_base = cfg_base;
chan              637 drivers/net/can/sja1000/peak_pci.c 		chan->icr_mask = peak_pci_icr_masks[i];
chan              638 drivers/net/can/sja1000/peak_pci.c 		icr |= chan->icr_mask;
chan              644 drivers/net/can/sja1000/peak_pci.c 		chan->prev_dev = pci_get_drvdata(pdev);
chan              671 drivers/net/can/sja1000/peak_pci.c 			 dev->name, priv->reg_base, chan->cfg_base, dev->irq);
chan              680 drivers/net/can/sja1000/peak_pci.c 	pci_set_drvdata(pdev, chan->prev_dev);
chan              687 drivers/net/can/sja1000/peak_pci.c 	chan = NULL;
chan              690 drivers/net/can/sja1000/peak_pci.c 		chan = priv->priv;
chan              691 drivers/net/can/sja1000/peak_pci.c 		prev_dev = chan->prev_dev;
chan              698 drivers/net/can/sja1000/peak_pci.c 	if (chan && chan->pciec_card)
chan              699 drivers/net/can/sja1000/peak_pci.c 		peak_pciec_remove(chan->pciec_card);
chan              722 drivers/net/can/sja1000/peak_pci.c 	struct peak_pci_chan *chan = priv->priv;
chan              723 drivers/net/can/sja1000/peak_pci.c 	void __iomem *cfg_base = chan->cfg_base;
chan              731 drivers/net/can/sja1000/peak_pci.c 		struct net_device *prev_dev = chan->prev_dev;
chan              740 drivers/net/can/sja1000/peak_pci.c 			if (chan->pciec_card)
chan              741 drivers/net/can/sja1000/peak_pci.c 				peak_pciec_remove(chan->pciec_card);
chan              745 drivers/net/can/sja1000/peak_pci.c 		chan = priv->priv;
chan              574 drivers/net/dsa/mv88e6xxx/chip.h 			  enum ptp_pin_function func, unsigned int chan);
chan              335 drivers/net/dsa/mv88e6xxx/ptp.c 				enum ptp_pin_function func, unsigned int chan)
chan               97 drivers/net/ethernet/broadcom/bcm63xx_enet.c static inline u32 enet_dmac_readl(struct bcm_enet_priv *priv, u32 off, int chan)
chan              100 drivers/net/ethernet/broadcom/bcm63xx_enet.c 		bcm63xx_enetdmacreg(off) + chan * priv->dma_chan_width);
chan              104 drivers/net/ethernet/broadcom/bcm63xx_enet.c 				       u32 val, u32 off, int chan)
chan              107 drivers/net/ethernet/broadcom/bcm63xx_enet.c 		bcm63xx_enetdmacreg(off) + chan * priv->dma_chan_width);
chan              110 drivers/net/ethernet/broadcom/bcm63xx_enet.c static inline u32 enet_dmas_readl(struct bcm_enet_priv *priv, u32 off, int chan)
chan              112 drivers/net/ethernet/broadcom/bcm63xx_enet.c 	return bcm_readl(bcm_enet_shared_base[2] + off + chan * priv->dma_chan_width);
chan              116 drivers/net/ethernet/broadcom/bcm63xx_enet.c 				       u32 val, u32 off, int chan)
chan              118 drivers/net/ethernet/broadcom/bcm63xx_enet.c 	bcm_writel(val, bcm_enet_shared_base[2] + off + chan * priv->dma_chan_width);
chan             1139 drivers/net/ethernet/broadcom/bcm63xx_enet.c static void bcm_enet_disable_dma(struct bcm_enet_priv *priv, int chan)
chan             1143 drivers/net/ethernet/broadcom/bcm63xx_enet.c 	enet_dmac_writel(priv, 0, ENETDMAC_CHANCFG, chan);
chan             1149 drivers/net/ethernet/broadcom/bcm63xx_enet.c 		val = enet_dmac_readl(priv, ENETDMAC_CHANCFG, chan);
chan              269 drivers/net/ethernet/broadcom/sb1250-mac.c static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
chan              557 drivers/net/ethernet/broadcom/sb1250-mac.c static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
chan              569 drivers/net/ethernet/broadcom/sb1250-mac.c 	d->sbdma_channel   = chan;
chan              604 drivers/net/ethernet/broadcom/sb1250-mac.c 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CONFIG0);
chan              606 drivers/net/ethernet/broadcom/sb1250-mac.c 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CONFIG1);
chan              608 drivers/net/ethernet/broadcom/sb1250-mac.c 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_DSCR_BASE);
chan              610 drivers/net/ethernet/broadcom/sb1250-mac.c 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_DSCR_CNT);
chan              612 drivers/net/ethernet/broadcom/sb1250-mac.c 		s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_CUR_DSCRADDR);
chan              617 drivers/net/ethernet/broadcom/sb1250-mac.c 			s->sbm_base + R_MAC_DMA_REGISTER(txrx,chan,R_MAC_DMA_OODPKTLOST_RX);
chan             2477 drivers/net/ethernet/broadcom/tg3.c 	int chan;
chan             2479 drivers/net/ethernet/broadcom/tg3.c 	for (chan = 0; chan < 4; chan++) {
chan             2483 drivers/net/ethernet/broadcom/tg3.c 			     (chan * 0x2000) | 0x0200);
chan             2488 drivers/net/ethernet/broadcom/tg3.c 				     test_pat[chan][i]);
chan             2497 drivers/net/ethernet/broadcom/tg3.c 			     (chan * 0x2000) | 0x0200);
chan             2521 drivers/net/ethernet/broadcom/tg3.c 			if (low != test_pat[chan][i] ||
chan             2522 drivers/net/ethernet/broadcom/tg3.c 			    high != test_pat[chan][i+1]) {
chan             2537 drivers/net/ethernet/broadcom/tg3.c 	int chan;
chan             2539 drivers/net/ethernet/broadcom/tg3.c 	for (chan = 0; chan < 4; chan++) {
chan             2543 drivers/net/ethernet/broadcom/tg3.c 			     (chan * 0x2000) | 0x0200);
chan              475 drivers/net/ethernet/cavium/thunder/nic_main.c 	u32 vnic, bgx, lmac, chan;
chan              484 drivers/net/ethernet/cavium/thunder/nic_main.c 	chan = (lmac * hw->chans_per_lmac) + (bgx * hw->chans_per_bgx);
chan              489 drivers/net/ethernet/cavium/thunder/nic_main.c 	nic_reg_write(nic, NIC_PF_CHAN_0_255_RX_BP_CFG | (chan << 3),
chan              491 drivers/net/ethernet/cavium/thunder/nic_main.c 	nic_reg_write(nic, NIC_PF_CHAN_0_255_RX_CFG | (chan << 3),
chan              615 drivers/net/ethernet/cavium/thunder/nic_main.c 	u32 bgx, lmac, chan;
chan              669 drivers/net/ethernet/cavium/thunder/nic_main.c 	chan = (lmac * hw->chans_per_lmac) + (bgx * hw->chans_per_bgx);
chan              671 drivers/net/ethernet/cavium/thunder/nic_main.c 		nic_reg_write(nic, NIC_PF_TL3_0_255_CHAN | (tl3 << 3), chan);
chan              676 drivers/net/ethernet/cavium/thunder/nic_main.c 	nic_reg_write(nic, NIC_PF_CHAN_0_255_TX_CFG | (chan << 3), 1);
chan              199 drivers/net/ethernet/cavium/thunder/q_struct.h 	u64   chan:12;
chan              239 drivers/net/ethernet/cavium/thunder/q_struct.h 	u64   chan:12;
chan             1350 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void mk_tid_release(struct sk_buff *skb, unsigned int chan,
chan             1355 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	set_wr_txq(skb, CPL_PRIORITY_SETUP, chan);
chan             1365 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c static void cxgb4_queue_tid_release(struct tid_info *t, unsigned int chan,
chan             1374 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	adap->tid_release_head = (void **)((uintptr_t)p | chan);
chan             1395 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		unsigned int chan = (uintptr_t)p & 3;
chan             1396 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		p = (void *)p - chan;
chan             1406 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		mk_tid_release(skb, chan, p - adap->tids.tid_tab);
chan             1418 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid,
chan             1444 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		mk_tid_release(skb, chan, tid);
chan             1447 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 		cxgb4_queue_tid_release(t, chan, tid);
chan             1529 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	unsigned int chan;
chan             1547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	chan = rxq_to_chan(&adap->sge, queue);
chan             1548 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	req->opt0 = cpu_to_be64(TX_CHAN_V(chan));
chan             1570 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	unsigned int chan;
chan             1590 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	chan = rxq_to_chan(&adap->sge, queue);
chan             1591 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c 	req->opt0 = cpu_to_be64(TX_CHAN_V(chan));
chan             8852 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		int chan = FW_PORT_CMD_PORTID_G(be32_to_cpu(p->op_to_portid));
chan             8857 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 			if (pi->tx_chan == chan)
chan             9405 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 	int chan, ret;
chan             9413 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 	for (chan = 0; chan < NCHAN; chan++)
chan             9414 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c 		adap->params.tp.tx_modq[chan] = chan;
chan               89 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h cxgb_mk_tid_release(struct sk_buff *skb, u32 len, u32 tid, u16 chan)
chan               97 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h 	set_wr_txq(skb, CPL_PRIORITY_SETUP, chan);
chan              101 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h cxgb_mk_close_con_req(struct sk_buff *skb, u32 len, u32 tid, u16 chan,
chan              110 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h 	set_wr_txq(skb, CPL_PRIORITY_DATA, chan);
chan              115 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h cxgb_mk_abort_req(struct sk_buff *skb, u32 len, u32 tid, u16 chan,
chan              125 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h 	set_wr_txq(skb, CPL_PRIORITY_DATA, chan);
chan              130 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h cxgb_mk_abort_rpl(struct sk_buff *skb, u32 len, u32 tid, u16 chan)
chan              139 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h 	set_wr_txq(skb, CPL_PRIORITY_DATA, chan);
chan              143 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h cxgb_mk_rx_data_ack(struct sk_buff *skb, u32 len, u32 tid, u16 chan,
chan              153 drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h 	set_wr_txq(skb, CPL_PRIORITY_ACK, chan);
chan              857 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c 			 priv->cgr_data.cgr.chan);
chan              215 drivers/net/ethernet/hisilicon/hip04_eth.c 	int chan;
chan              332 drivers/net/ethernet/hisilicon/hip04_eth.c 	val |= priv->chan << PPE_CFG_RX_START_SHIFT;
chan              942 drivers/net/ethernet/hisilicon/hip04_eth.c 	priv->chan = arg.args[1] * RX_DESC_NUM;
chan              408 drivers/net/ethernet/intel/igb/igb_ptp.c static void igb_pin_extts(struct igb_adapter *igb, int chan, int pin)
chan              431 drivers/net/ethernet/intel/igb/igb_ptp.c 	if (chan == 1) {
chan              444 drivers/net/ethernet/intel/igb/igb_ptp.c static void igb_pin_perout(struct igb_adapter *igb, int chan, int pin, int freq)
chan              493 drivers/net/ethernet/intel/igb/igb_ptp.c 		if (chan == 1)
chan              498 drivers/net/ethernet/intel/igb/igb_ptp.c 		if (chan == 1)
chan              663 drivers/net/ethernet/intel/igb/igb_ptp.c 			      enum ptp_pin_function func, unsigned int chan)
chan              456 drivers/net/ethernet/marvell/octeontx2/af/rvu.h 				 int nixlf, u64 chan, u8 *mac_addr);
chan              458 drivers/net/ethernet/marvell/octeontx2/af/rvu.h 				   int nixlf, u64 chan, bool allmulti);
chan              462 drivers/net/ethernet/marvell/octeontx2/af/rvu.h 				       int nixlf, u64 chan);
chan              309 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 				 int nixlf, u64 chan, u8 *mac_addr)
chan              333 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 	entry.kw[0] = chan;
chan              369 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 				   int nixlf, u64 chan, bool allmulti)
chan              387 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 	entry.kw[0] = chan;
chan              447 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 				       int nixlf, u64 chan)
chan              491 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c 	entry.kw[0] = BIT_ULL(13) | chan;
chan              392 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 			   enum ptp_pin_function func, unsigned int chan)
chan              434 drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c 		clock->ptp_info.pin_config[i].chan = i;
chan              131 drivers/net/ethernet/micrel/ks8842.c 	struct dma_chan *chan;
chan              139 drivers/net/ethernet/micrel/ks8842.c 	struct dma_chan *chan;
chan              449 drivers/net/ethernet/micrel/ks8842.c 	ctl->adesc = dmaengine_prep_slave_sg(ctl->chan,
chan              560 drivers/net/ethernet/micrel/ks8842.c 		ctl->adesc = dmaengine_prep_slave_sg(ctl->chan,
chan              865 drivers/net/ethernet/micrel/ks8842.c 	if (tx_ctl->chan)
chan              866 drivers/net/ethernet/micrel/ks8842.c 		dmaengine_terminate_all(tx_ctl->chan);
chan              869 drivers/net/ethernet/micrel/ks8842.c 	if (rx_ctl->chan)
chan              870 drivers/net/ethernet/micrel/ks8842.c 		dmaengine_terminate_all(rx_ctl->chan);
chan              888 drivers/net/ethernet/micrel/ks8842.c 	if (tx_ctl->chan)
chan              889 drivers/net/ethernet/micrel/ks8842.c 		dma_release_channel(tx_ctl->chan);
chan              890 drivers/net/ethernet/micrel/ks8842.c 	tx_ctl->chan = NULL;
chan              892 drivers/net/ethernet/micrel/ks8842.c 	if (rx_ctl->chan)
chan              893 drivers/net/ethernet/micrel/ks8842.c 		dma_release_channel(rx_ctl->chan);
chan              894 drivers/net/ethernet/micrel/ks8842.c 	rx_ctl->chan = NULL;
chan              907 drivers/net/ethernet/micrel/ks8842.c static bool ks8842_dma_filter_fn(struct dma_chan *chan, void *filter_param)
chan              909 drivers/net/ethernet/micrel/ks8842.c 	return chan->chan_id == (long)filter_param;
chan              927 drivers/net/ethernet/micrel/ks8842.c 	tx_ctl->chan = dma_request_channel(mask, ks8842_dma_filter_fn,
chan              929 drivers/net/ethernet/micrel/ks8842.c 	if (!tx_ctl->chan) {
chan              949 drivers/net/ethernet/micrel/ks8842.c 	rx_ctl->chan = dma_request_channel(mask, ks8842_dma_filter_fn,
chan              951 drivers/net/ethernet/micrel/ks8842.c 	if (!rx_ctl->chan) {
chan              900 drivers/net/ethernet/microchip/lan743x_ptp.c 	ptp->pin_config[0].chan = 0;
chan              273 drivers/net/ethernet/pasemi/pasemi_mac.c 				       offsetof(struct pasemi_mac_csring, chan));
chan              280 drivers/net/ethernet/pasemi/pasemi_mac.c 	chno = ring->chan.chno;
chan              286 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (pasemi_dma_alloc_ring(&ring->chan, CS_RING_SIZE))
chan              290 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_DMA_TXCHAN_BASEL_BRBL(ring->chan.ring_dma));
chan              291 drivers/net/ethernet/pasemi/pasemi_mac.c 	val = PAS_DMA_TXCHAN_BASEU_BRBH(ring->chan.ring_dma >> 32);
chan              318 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_start_chan(&ring->chan, PAS_DMA_TXCHAN_TCMDSTA_SZ |
chan              331 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_ring(&ring->chan);
chan              333 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&ring->chan);
chan              355 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_stop_chan(&csring->chan);
chan              358 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_ring(&csring->chan);
chan              359 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&csring->chan);
chan              371 drivers/net/ethernet/pasemi/pasemi_mac.c 				     offsetof(struct pasemi_mac_rxring, chan));
chan              377 drivers/net/ethernet/pasemi/pasemi_mac.c 	chno = ring->chan.chno;
chan              390 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (pasemi_dma_alloc_ring(&ring->chan, RX_RING_SIZE))
chan              400 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_DMA_RXCHAN_BASEL_BRBL(ring->chan.ring_dma));
chan              403 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_DMA_RXCHAN_BASEU_BRBH(ring->chan.ring_dma >> 32) |
chan              439 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&ring->chan);
chan              454 drivers/net/ethernet/pasemi/pasemi_mac.c 				     offsetof(struct pasemi_mac_txring, chan));
chan              461 drivers/net/ethernet/pasemi/pasemi_mac.c 	chno = ring->chan.chno;
chan              473 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (pasemi_dma_alloc_ring(&ring->chan, TX_RING_SIZE))
chan              477 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_DMA_TXCHAN_BASEL_BRBL(ring->chan.ring_dma));
chan              478 drivers/net/ethernet/pasemi/pasemi_mac.c 	val = PAS_DMA_TXCHAN_BASEU_BRBH(ring->chan.ring_dma >> 32);
chan              502 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&ring->chan);
chan              538 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&txring->chan);
chan              573 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&rx_ring(mac)->chan);
chan              634 drivers/net/ethernet/pasemi/pasemi_mac.c 	pcnt = *rx->chan.status & PAS_STATUS_PCNT_M;
chan              638 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (*rx->chan.status & PAS_STATUS_TIMER)
chan              641 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_iob_reg(PAS_IOB_DMA_RXCH_RESET(mac->rx->chan.chno), reg);
chan              649 drivers/net/ethernet/pasemi/pasemi_mac.c 	pcnt = *tx_ring(mac)->chan.status & PAS_STATUS_PCNT_M;
chan              653 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_iob_reg(PAS_IOB_DMA_TXCH_RESET(tx_ring(mac)->chan.chno), reg);
chan              661 drivers/net/ethernet/pasemi/pasemi_mac.c 	struct pasemi_dmachan *chan = &rx_ring(mac)->chan;
chan              667 drivers/net/ethernet/pasemi/pasemi_mac.c 	ccmdsta = read_dma_reg(PAS_DMA_RXCHAN_CCMDSTA(chan->chno));
chan              670 drivers/net/ethernet/pasemi/pasemi_mac.c 		macrx, *chan->status);
chan              680 drivers/net/ethernet/pasemi/pasemi_mac.c 	struct pasemi_dmachan *chan = &tx_ring(mac)->chan;
chan              685 drivers/net/ethernet/pasemi/pasemi_mac.c 	cmdsta = read_dma_reg(PAS_DMA_TXCHAN_TCMDSTA(chan->chno));
chan              688 drivers/net/ethernet/pasemi/pasemi_mac.c 		"tx status 0x%016llx\n", mactx, *chan->status);
chan              696 drivers/net/ethernet/pasemi/pasemi_mac.c 	const struct pasemi_dmachan *chan = &rx->chan;
chan              721 drivers/net/ethernet/pasemi/pasemi_mac.c 		    (*chan->status & PAS_STATUS_ERROR))
chan              799 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_dma_reg(PAS_DMA_RXCHAN_INCR(mac->rx->chan.chno), count << 1);
chan              816 drivers/net/ethernet/pasemi/pasemi_mac.c 	struct pasemi_dmachan *chan = &txring->chan;
chan              852 drivers/net/ethernet/pasemi/pasemi_mac.c 		    (*chan->status & PAS_STATUS_ERROR))
chan              910 drivers/net/ethernet/pasemi/pasemi_mac.c 	const struct pasemi_dmachan *chan = &rxring->chan;
chan              913 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (!(*chan->status & PAS_STATUS_CAUSE_M))
chan              921 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (*chan->status & PAS_STATUS_SOFT)
chan              923 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (*chan->status & PAS_STATUS_ERROR)
chan              928 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_iob_reg(PAS_IOB_DMA_RXCH_RESET(chan->chno), reg);
chan              950 drivers/net/ethernet/pasemi/pasemi_mac.c 	const struct pasemi_dmachan *chan = &txring->chan;
chan              954 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (!(*chan->status & PAS_STATUS_CAUSE_M))
chan              959 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (*chan->status & PAS_STATUS_SOFT)
chan              961 drivers/net/ethernet/pasemi/pasemi_mac.c 	if (*chan->status & PAS_STATUS_ERROR)
chan              969 drivers/net/ethernet/pasemi/pasemi_mac.c 		write_iob_reg(PAS_IOB_DMA_TXCH_RESET(chan->chno), reg);
chan             1101 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_iob_reg(PAS_IOB_DMA_RXCH_CFG(mac->rx->chan.chno),
chan             1104 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_iob_reg(PAS_IOB_DMA_TXCH_CFG(mac->tx->chan.chno),
chan             1108 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_MAC_IPC_CHNL_DCHNO(mac->rx->chan.chno) |
chan             1109 drivers/net/ethernet/pasemi/pasemi_mac.c 		      PAS_MAC_IPC_CHNL_BCH(mac->rx->chan.chno));
chan             1120 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_start_chan(&rx_ring(mac)->chan, PAS_DMA_RXCHAN_CCMDSTA_DU |
chan             1126 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_start_chan(&tx_ring(mac)->chan, PAS_DMA_TXCHAN_TCMDSTA_SZ |
chan             1133 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_dma_reg(PAS_DMA_RXCHAN_INCR(rx_ring(mac)->chan.chno),
chan             1169 drivers/net/ethernet/pasemi/pasemi_mac.c 	ret = request_irq(mac->tx->chan.irq, pasemi_mac_tx_intr, 0,
chan             1173 drivers/net/ethernet/pasemi/pasemi_mac.c 			mac->tx->chan.irq, ret);
chan             1180 drivers/net/ethernet/pasemi/pasemi_mac.c 	ret = request_irq(mac->rx->chan.irq, pasemi_mac_rx_intr, 0,
chan             1184 drivers/net/ethernet/pasemi/pasemi_mac.c 			mac->rx->chan.irq, ret);
chan             1197 drivers/net/ethernet/pasemi/pasemi_mac.c 	free_irq(mac->tx->chan.irq, mac->tx);
chan             1215 drivers/net/ethernet/pasemi/pasemi_mac.c 	int txch = tx_ring(mac)->chan.chno;
chan             1237 drivers/net/ethernet/pasemi/pasemi_mac.c 	int rxch = rx_ring(mac)->chan.chno;
chan             1279 drivers/net/ethernet/pasemi/pasemi_mac.c 	rxch = rx_ring(mac)->chan.chno;
chan             1280 drivers/net/ethernet/pasemi/pasemi_mac.c 	txch = tx_ring(mac)->chan.chno;
chan             1319 drivers/net/ethernet/pasemi/pasemi_mac.c 	free_irq(mac->tx->chan.irq, mac->tx);
chan             1320 drivers/net/ethernet/pasemi/pasemi_mac.c 	free_irq(mac->rx->chan.irq, mac->rx);
chan             1376 drivers/net/ethernet/pasemi/pasemi_mac.c 	csdma = csring->chan.ring_dma + (fill & (CS_RING_SIZE-1)) * 8 + 2;
chan             1407 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_dma_reg(PAS_DMA_TXCHAN_INCR(csring->chan.chno), (cs_size) >> 1);
chan             1419 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), 2);
chan             1525 drivers/net/ethernet/pasemi/pasemi_mac.c 	write_dma_reg(PAS_DMA_TXCHAN_INCR(txring->chan.chno), (nfrags+2) >> 1);
chan             1583 drivers/net/ethernet/pasemi/pasemi_mac.c 	disable_irq(mac->tx->chan.irq);
chan             1584 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_mac_tx_intr(mac->tx->chan.irq, mac->tx);
chan             1585 drivers/net/ethernet/pasemi/pasemi_mac.c 	enable_irq(mac->tx->chan.irq);
chan             1587 drivers/net/ethernet/pasemi/pasemi_mac.c 	disable_irq(mac->rx->chan.irq);
chan             1588 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_mac_rx_intr(mac->rx->chan.irq, mac->rx);
chan             1589 drivers/net/ethernet/pasemi/pasemi_mac.c 	enable_irq(mac->rx->chan.irq);
chan             1804 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&mac->tx->chan);
chan             1805 drivers/net/ethernet/pasemi/pasemi_mac.c 	pasemi_dma_free_chan(&mac->rx->chan);
chan               26 drivers/net/ethernet/pasemi/pasemi_mac.h 	struct pasemi_dmachan chan; /* Must be first */
chan               37 drivers/net/ethernet/pasemi/pasemi_mac.h 	struct pasemi_dmachan chan; /* Must be first */
chan               49 drivers/net/ethernet/pasemi/pasemi_mac.h 	struct pasemi_dmachan chan;
chan               94 drivers/net/ethernet/pasemi/pasemi_mac.h #define TX_DESC(tx, num)	((tx)->chan.ring_virt[(num) & (TX_RING_SIZE-1)])
chan               96 drivers/net/ethernet/pasemi/pasemi_mac.h #define RX_DESC(rx, num)	((rx)->chan.ring_virt[(num) & (RX_RING_SIZE-1)])
chan               99 drivers/net/ethernet/pasemi/pasemi_mac.h #define CS_DESC(cs, num)	((cs)->chan.ring_virt[(num) & (CS_RING_SIZE-1)])
chan               80 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c 	int i, chan;
chan              126 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c 	for (i = 0, chan = 1; i < SXGBE_TX_QUEUES; i++) {
chan              127 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c 		priv->txq[i]->irq_no = irq_of_parse_and_map(node, chan++);
chan              135 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c 		priv->rxq[i]->irq_no = irq_of_parse_and_map(node, chan++);
chan              142 drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c 	priv->lpi_irq = irq_of_parse_and_map(node, chan);
chan              292 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 				    dma_addr_t dma_rx_phy, u32 chan)
chan              300 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 				    dma_addr_t dma_tx_phy, u32 chan)
chan              338 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              343 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_disable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              348 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_dma_start_tx(void __iomem *ioaddr, u32 chan)
chan              368 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_dma_stop_tx(void __iomem *ioaddr, u32 chan)
chan              377 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_dma_start_rx(void __iomem *ioaddr, u32 chan)
chan              387 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c static void sun8i_dwmac_dma_stop_rx(void __iomem *ioaddr, u32 chan)
chan              397 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 				     struct stmmac_extra_stats *x, u32 chan)
chan              115 drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c 				  dma_addr_t dma_rx_phy, u32 chan)
chan              123 drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c 				  dma_addr_t dma_tx_phy, u32 chan)
chan               34 drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c 				 dma_addr_t dma_rx_phy, u32 chan)
chan               42 drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c 				 dma_addr_t dma_tx_phy, u32 chan)
chan              250 drivers/net/ethernet/stmicro/stmmac/dwmac4.h #define MTL_RXQ_DMA_QXMDMACH(chan, q)	((chan) << (8 * (q)))
chan              205 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c static void dwmac4_map_mtl_dma(struct mac_device_info *hw, u32 queue, u32 chan)
chan              217 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c 		value |= MTL_RXQ_DMA_Q04MDMACH(chan);
chan              220 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c 		value |= MTL_RXQ_DMA_QXMDMACH(chan, queue);
chan              560 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c static int dwmac4_irq_mtl_status(struct mac_device_info *hw, u32 chan)
chan              569 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c 	if (mtl_int_qx_status & MTL_INT_QX(chan)) {
chan              571 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c 		u32 status = readl(ioaddr + MTL_CHAN_INT_CTRL(chan));
chan              576 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c 			       ioaddr + MTL_CHAN_INT_CTRL(chan));
chan               73 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 				    dma_addr_t dma_rx_phy, u32 chan)
chan               78 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	value = readl(ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               80 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               82 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(lower_32_bits(dma_rx_phy), ioaddr + DMA_CHAN_RX_BASE_ADDR(chan));
chan               87 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 				    dma_addr_t dma_tx_phy, u32 chan)
chan               92 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan               98 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan              100 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(lower_32_bits(dma_tx_phy), ioaddr + DMA_CHAN_TX_BASE_ADDR(chan));
chan              104 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 				    struct stmmac_dma_cfg *dma_cfg, u32 chan)
chan              109 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	value = readl(ioaddr + DMA_CHAN_CONTROL(chan));
chan              112 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(value, ioaddr + DMA_CHAN_CONTROL(chan));
chan              116 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	       ioaddr + DMA_CHAN_INTR_ENA(chan));
chan              187 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	u32 chan;
chan              189 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	for (chan = 0; chan < number_chan; chan++)
chan              190 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 		writel(riwt, ioaddr + DMA_CHAN_RX_WATCHDOG(chan));
chan              394 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c static void dwmac4_enable_tso(void __iomem *ioaddr, bool en, u32 chan)
chan              400 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 		value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan              402 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 		       ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan              405 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 		value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan              407 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 		       ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan              424 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c static void dwmac4_set_bfsize(void __iomem *ioaddr, int bfsize, u32 chan)
chan              426 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	u32 value = readl(ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan              431 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c 	writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan              185 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_enable_dma_irq(void __iomem *ioaddr, u32 chan);
chan              186 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac410_enable_dma_irq(void __iomem *ioaddr, u32 chan);
chan              187 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_disable_dma_irq(void __iomem *ioaddr, u32 chan);
chan              188 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_dma_start_tx(void __iomem *ioaddr, u32 chan);
chan              189 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_dma_stop_tx(void __iomem *ioaddr, u32 chan);
chan              190 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_dma_start_rx(void __iomem *ioaddr, u32 chan);
chan              191 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_dma_stop_rx(void __iomem *ioaddr, u32 chan);
chan              193 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h 			 struct stmmac_extra_stats *x, u32 chan);
chan              194 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_set_rx_ring_len(void __iomem *ioaddr, u32 len, u32 chan);
chan              195 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_set_tx_ring_len(void __iomem *ioaddr, u32 len, u32 chan);
chan              196 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_set_rx_tail_ptr(void __iomem *ioaddr, u32 tail_ptr, u32 chan);
chan              197 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h void dwmac4_set_tx_tail_ptr(void __iomem *ioaddr, u32 tail_ptr, u32 chan);
chan               35 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_set_rx_tail_ptr(void __iomem *ioaddr, u32 tail_ptr, u32 chan)
chan               37 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(tail_ptr, ioaddr + DMA_CHAN_RX_END_ADDR(chan));
chan               40 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_set_tx_tail_ptr(void __iomem *ioaddr, u32 tail_ptr, u32 chan)
chan               42 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(tail_ptr, ioaddr + DMA_CHAN_TX_END_ADDR(chan));
chan               45 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_dma_start_tx(void __iomem *ioaddr, u32 chan)
chan               47 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan               50 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan               57 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_dma_stop_tx(void __iomem *ioaddr, u32 chan)
chan               59 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 value = readl(ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan               62 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(value, ioaddr + DMA_CHAN_TX_CONTROL(chan));
chan               69 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_dma_start_rx(void __iomem *ioaddr, u32 chan)
chan               71 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 value = readl(ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               75 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               82 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_dma_stop_rx(void __iomem *ioaddr, u32 chan)
chan               84 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 value = readl(ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               87 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan));
chan               90 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_set_tx_ring_len(void __iomem *ioaddr, u32 len, u32 chan)
chan               92 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(len, ioaddr + DMA_CHAN_TX_RING_LEN(chan));
chan               95 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_set_rx_ring_len(void __iomem *ioaddr, u32 len, u32 chan)
chan               97 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(len, ioaddr + DMA_CHAN_RX_RING_LEN(chan));
chan              100 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_enable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              103 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	       DMA_CHAN_INTR_ENA(chan));
chan              106 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac410_enable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              109 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	       ioaddr + DMA_CHAN_INTR_ENA(chan));
chan              112 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c void dwmac4_disable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              114 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(0, ioaddr + DMA_CHAN_INTR_ENA(chan));
chan              118 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 			 struct stmmac_extra_stats *x, u32 chan)
chan              120 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 intr_status = readl(ioaddr + DMA_CHAN_STATUS(chan));
chan              121 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	u32 intr_en = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));
chan              159 drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c 	writel(intr_status & intr_en, ioaddr + DMA_CHAN_STATUS(chan));
chan              133 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan);
chan              134 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_disable_dma_irq(void __iomem *ioaddr, u32 chan);
chan              135 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_dma_start_tx(void __iomem *ioaddr, u32 chan);
chan              136 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_dma_stop_tx(void __iomem *ioaddr, u32 chan);
chan              137 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_dma_start_rx(void __iomem *ioaddr, u32 chan);
chan              138 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h void dwmac_dma_stop_rx(void __iomem *ioaddr, u32 chan);
chan              140 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h 			u32 chan);
chan               40 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan)
chan               45 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_disable_dma_irq(void __iomem *ioaddr, u32 chan)
chan               50 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_dma_start_tx(void __iomem *ioaddr, u32 chan)
chan               57 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_dma_stop_tx(void __iomem *ioaddr, u32 chan)
chan               64 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_dma_start_rx(void __iomem *ioaddr, u32 chan)
chan               71 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c void dwmac_dma_stop_rx(void __iomem *ioaddr, u32 chan)
chan              149 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c 			struct stmmac_extra_stats *x, u32 chan)
chan              198 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c 				    u32 chan)
chan              209 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c 	value |= (chan << XGMAC_QxMDMACH_SHIFT(queue)) & XGMAC_QxMDMACH(queue);
chan              278 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c static int dwxgmac2_host_mtl_irq_status(struct mac_device_info *hw, u32 chan)
chan              285 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c 	if (status & BIT(chan)) {
chan              286 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c 		u32 chan_status = readl(ioaddr + XGMAC_MTL_QINT_STATUS(chan));
chan              291 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c 		writel(~0x0, ioaddr + XGMAC_MTL_QINT_STATUS(chan));
chan               34 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 				   struct stmmac_dma_cfg *dma_cfg, u32 chan)
chan               36 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	u32 value = readl(ioaddr + XGMAC_DMA_CH_CONTROL(chan));
chan               41 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_CONTROL(chan));
chan               42 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(XGMAC_DMA_INT_DEFAULT_EN, ioaddr + XGMAC_DMA_CH_INT_EN(chan));
chan               47 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 				      dma_addr_t phy, u32 chan)
chan               52 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan               55 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan               57 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_HADDR(chan));
chan               58 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_RxDESC_LADDR(chan));
chan               63 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 				      dma_addr_t phy, u32 chan)
chan               68 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan               72 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan               74 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(upper_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_HADDR(chan));
chan               75 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(lower_32_bits(phy), ioaddr + XGMAC_DMA_CH_TxDESC_LADDR(chan));
chan              258 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_enable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              260 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(XGMAC_DMA_INT_DEFAULT_EN, ioaddr + XGMAC_DMA_CH_INT_EN(chan));
chan              263 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_disable_dma_irq(void __iomem *ioaddr, u32 chan)
chan              265 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(0, ioaddr + XGMAC_DMA_CH_INT_EN(chan));
chan              268 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_dma_start_tx(void __iomem *ioaddr, u32 chan)
chan              272 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              274 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              281 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_dma_stop_tx(void __iomem *ioaddr, u32 chan)
chan              285 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              287 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              294 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_dma_start_rx(void __iomem *ioaddr, u32 chan)
chan              298 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              300 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              307 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_dma_stop_rx(void __iomem *ioaddr, u32 chan)
chan              311 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              313 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              317 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 				  struct stmmac_extra_stats *x, u32 chan)
chan              319 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	u32 intr_status = readl(ioaddr + XGMAC_DMA_CH_STATUS(chan));
chan              320 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	u32 intr_en = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan));
chan              354 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(intr_en & intr_status, ioaddr + XGMAC_DMA_CH_STATUS(chan));
chan              438 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_set_rx_ring_len(void __iomem *ioaddr, u32 len, u32 chan)
chan              440 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(len, ioaddr + XGMAC_DMA_CH_RxDESC_RING_LEN(chan));
chan              443 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_set_tx_ring_len(void __iomem *ioaddr, u32 len, u32 chan)
chan              445 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(len, ioaddr + XGMAC_DMA_CH_TxDESC_RING_LEN(chan));
chan              448 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_set_rx_tail_ptr(void __iomem *ioaddr, u32 ptr, u32 chan)
chan              450 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(ptr, ioaddr + XGMAC_DMA_CH_RxDESC_TAIL_LPTR(chan));
chan              453 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_set_tx_tail_ptr(void __iomem *ioaddr, u32 ptr, u32 chan)
chan              455 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(ptr, ioaddr + XGMAC_DMA_CH_TxDESC_TAIL_LPTR(chan));
chan              458 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_enable_tso(void __iomem *ioaddr, bool en, u32 chan)
chan              460 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	u32 value = readl(ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              467 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_TX_CONTROL(chan));
chan              487 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_set_bfsize(void __iomem *ioaddr, int bfsize, u32 chan)
chan              491 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              494 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
chan              497 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c static void dwxgmac2_enable_sph(void __iomem *ioaddr, bool en, u32 chan)
chan              505 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	value = readl(ioaddr + XGMAC_DMA_CH_CONTROL(chan));
chan              510 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c 	writel(value, ioaddr + XGMAC_DMA_CH_CONTROL(chan));
chan              171 drivers/net/ethernet/stmicro/stmmac/hwif.h 			  struct stmmac_dma_cfg *dma_cfg, u32 chan);
chan              174 drivers/net/ethernet/stmicro/stmmac/hwif.h 			     dma_addr_t phy, u32 chan);
chan              177 drivers/net/ethernet/stmicro/stmmac/hwif.h 			     dma_addr_t phy, u32 chan);
chan              190 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*enable_dma_irq)(void __iomem *ioaddr, u32 chan);
chan              191 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*disable_dma_irq)(void __iomem *ioaddr, u32 chan);
chan              192 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*start_tx)(void __iomem *ioaddr, u32 chan);
chan              193 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*stop_tx)(void __iomem *ioaddr, u32 chan);
chan              194 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*start_rx)(void __iomem *ioaddr, u32 chan);
chan              195 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*stop_rx)(void __iomem *ioaddr, u32 chan);
chan              197 drivers/net/ethernet/stmicro/stmmac/hwif.h 			      struct stmmac_extra_stats *x, u32 chan);
chan              203 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*set_tx_ring_len)(void __iomem *ioaddr, u32 len, u32 chan);
chan              204 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*set_rx_ring_len)(void __iomem *ioaddr, u32 len, u32 chan);
chan              205 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*set_rx_tail_ptr)(void __iomem *ioaddr, u32 tail_ptr, u32 chan);
chan              206 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*set_tx_tail_ptr)(void __iomem *ioaddr, u32 tail_ptr, u32 chan);
chan              207 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*enable_tso)(void __iomem *ioaddr, bool en, u32 chan);
chan              209 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*set_bfsize)(void __iomem *ioaddr, int bfsize, u32 chan);
chan              210 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*enable_sph)(void __iomem *ioaddr, bool en, u32 chan);
chan              303 drivers/net/ethernet/stmicro/stmmac/hwif.h 	void (*map_mtl_to_dma)(struct mac_device_info *hw, u32 queue, u32 chan);
chan              314 drivers/net/ethernet/stmicro/stmmac/hwif.h 	int (*host_mtl_irq_status)(struct mac_device_info *hw, u32 chan);
chan             1718 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void stmmac_start_rx_dma(struct stmmac_priv *priv, u32 chan)
chan             1720 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netdev_dbg(priv->dev, "DMA RX processes started in channel %d\n", chan);
chan             1721 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_start_rx(priv, priv->ioaddr, chan);
chan             1731 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void stmmac_start_tx_dma(struct stmmac_priv *priv, u32 chan)
chan             1733 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netdev_dbg(priv->dev, "DMA TX processes started in channel %d\n", chan);
chan             1734 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_start_tx(priv, priv->ioaddr, chan);
chan             1744 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void stmmac_stop_rx_dma(struct stmmac_priv *priv, u32 chan)
chan             1746 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netdev_dbg(priv->dev, "DMA RX processes stopped in channel %d\n", chan);
chan             1747 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_stop_rx(priv, priv->ioaddr, chan);
chan             1757 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
chan             1759 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netdev_dbg(priv->dev, "DMA TX processes stopped in channel %d\n", chan);
chan             1760 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_stop_tx(priv, priv->ioaddr, chan);
chan             1773 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = 0;
chan             1775 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < rx_channels_count; chan++)
chan             1776 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_start_rx_dma(priv, chan);
chan             1778 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channels_count; chan++)
chan             1779 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_start_tx_dma(priv, chan);
chan             1792 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = 0;
chan             1794 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < rx_channels_count; chan++)
chan             1795 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_stop_rx_dma(priv, chan);
chan             1797 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channels_count; chan++)
chan             1798 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_stop_tx_dma(priv, chan);
chan             1815 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = 0;
chan             1847 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < rx_channels_count; chan++) {
chan             1848 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		qmode = priv->plat->rx_queues_cfg[chan].mode_to_use;
chan             1850 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_dma_rx_mode(priv, priv->ioaddr, rxmode, chan,
chan             1853 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				chan);
chan             1856 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channels_count; chan++) {
chan             1857 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		qmode = priv->plat->tx_queues_cfg[chan].mode_to_use;
chan             1859 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_dma_tx_mode(priv, priv->ioaddr, txmode, chan,
chan             1983 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
chan             1985 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	struct stmmac_tx_queue *tx_q = &priv->tx_queue[chan];
chan             1988 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));
chan             1990 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_stop_tx_dma(priv, chan);
chan             1991 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	dma_free_tx_skbufs(priv, chan);
chan             2002 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netdev_tx_reset_queue(netdev_get_tx_queue(priv->dev, chan));
chan             2003 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_start_tx_dma(priv, chan);
chan             2006 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	netif_tx_wake_queue(netdev_get_tx_queue(priv->dev, chan));
chan             2020 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 					  u32 rxmode, u32 chan)
chan             2022 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u8 rxqmode = priv->plat->rx_queues_cfg[chan].mode_to_use;
chan             2023 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u8 txqmode = priv->plat->tx_queues_cfg[chan].mode_to_use;
chan             2038 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_dma_rx_mode(priv, priv->ioaddr, rxmode, chan, rxfifosz, rxqmode);
chan             2039 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	stmmac_dma_tx_mode(priv, priv->ioaddr, txmode, chan, txfifosz, txqmode);
chan             2056 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan)
chan             2059 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 						 &priv->xstats, chan);
chan             2060 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	struct stmmac_channel *ch = &priv->channel[chan];
chan             2062 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) {
chan             2064 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 			stmmac_disable_dma_irq(priv, priv->ioaddr, chan);
chan             2070 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use))
chan             2089 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2096 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < channels_to_check; chan++)
chan             2097 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		status[chan] = stmmac_napi_check(priv, chan);
chan             2099 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channel_count; chan++) {
chan             2100 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		if (unlikely(status[chan] & tx_hard_error_bump_tc)) {
chan             2109 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 								      chan);
chan             2114 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 								    chan);
chan             2117 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		} else if (unlikely(status[chan] == tx_hard_error)) {
chan             2118 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 			stmmac_tx_err(priv, chan);
chan             2189 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = 0;
chan             2214 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < dma_csr_ch; chan++)
chan             2215 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
chan             2218 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < rx_channels_count; chan++) {
chan             2219 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		rx_q = &priv->rx_queue[chan];
chan             2222 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				    rx_q->dma_rx_phy, chan);
chan             2227 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				       rx_q->rx_tail_addr, chan);
chan             2231 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channels_count; chan++) {
chan             2232 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		tx_q = &priv->tx_queue[chan];
chan             2235 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				    tx_q->dma_tx_phy, chan);
chan             2239 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				       tx_q->tx_tail_addr, chan);
chan             2287 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2293 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channel_count; chan++) {
chan             2294 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		struct stmmac_tx_queue *tx_q = &priv->tx_queue[chan];
chan             2304 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2307 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < tx_channels_count; chan++)
chan             2309 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				(DMA_TX_SIZE - 1), chan);
chan             2312 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < rx_channels_count; chan++)
chan             2314 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				(DMA_RX_SIZE - 1), chan);
chan             2369 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2372 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		chan = priv->plat->rx_queues_cfg[queue].chan;
chan             2373 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_map_mtl_to_dma(priv, priv->hw, queue, chan);
chan             2531 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2610 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		for (chan = 0; chan < tx_cnt; chan++)
chan             2611 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 			stmmac_enable_tso(priv, priv->ioaddr, 1, chan);
chan             2616 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		for (chan = 0; chan < rx_cnt; chan++)
chan             2617 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 			stmmac_enable_sph(priv, priv->ioaddr, 1, chan);
chan             2650 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2752 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
chan             2753 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		del_timer_sync(&priv->tx_queue[chan].txtimer);
chan             2772 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             2785 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
chan             2786 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		del_timer_sync(&priv->tx_queue[chan].txtimer);
chan             3670 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = ch->index;
chan             3675 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	work_done = stmmac_rx(priv, budget, chan);
chan             3677 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_enable_dma_irq(priv, priv->ioaddr, chan);
chan             3687 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan = ch->index;
chan             3692 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	work_done = stmmac_tx_clean(priv, DMA_TX_SIZE, chan);
chan             3699 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	tx_q = &priv->tx_queue[chan];
chan             3703 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 				       chan);
chan             3814 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             3827 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < priv->plat->rx_queues_to_use; chan++)
chan             3828 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		stmmac_enable_sph(priv, priv->ioaddr, sph_en, chan);
chan             4763 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	u32 chan;
chan             4777 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 	for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
chan             4778 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c 		del_timer_sync(&priv->tx_queue[chan].txtimer);
chan              127 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c 		plat->rx_queues_cfg[i].chan = i;
chan              416 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c 		plat->rx_queues_cfg[i].chan = i;
chan              187 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c 					 &plat->rx_queues_cfg[queue].chan))
chan              188 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c 			plat->rx_queues_cfg[queue].chan = queue;
chan             1660 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c 	u32 chan, tx_cnt = priv->plat->tx_queues_to_use;
chan             1666 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c 	for (chan = 0; chan < tx_cnt; chan++) {
chan             1667 drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c 		ret = __stmmac_test_jumbo(priv, chan);
chan              639 drivers/net/ethernet/sun/niu.c static int esr_read_rxtx_ctrl(struct niu *np, unsigned long chan, u32 *val)
chan              643 drivers/net/ethernet/sun/niu.c 	err = mdio_read(np, np->port, NIU_ESR_DEV_ADDR, ESR_RXTX_CTRL_L(chan));
chan              647 drivers/net/ethernet/sun/niu.c 				ESR_RXTX_CTRL_H(chan));
chan              655 drivers/net/ethernet/sun/niu.c static int esr_read_glue0(struct niu *np, unsigned long chan, u32 *val)
chan              660 drivers/net/ethernet/sun/niu.c 			ESR_GLUE_CTRL0_L(chan));
chan              664 drivers/net/ethernet/sun/niu.c 				ESR_GLUE_CTRL0_H(chan));
chan              691 drivers/net/ethernet/sun/niu.c static int esr_write_rxtx_ctrl(struct niu *np, unsigned long chan, u32 val)
chan              696 drivers/net/ethernet/sun/niu.c 			 ESR_RXTX_CTRL_L(chan), val & 0xffff);
chan              699 drivers/net/ethernet/sun/niu.c 				 ESR_RXTX_CTRL_H(chan), (val >> 16));
chan              703 drivers/net/ethernet/sun/niu.c static int esr_write_glue0(struct niu *np, unsigned long chan, u32 val)
chan              708 drivers/net/ethernet/sun/niu.c 			ESR_GLUE_CTRL0_L(chan), val & 0xffff);
chan              711 drivers/net/ethernet/sun/niu.c 				 ESR_GLUE_CTRL0_H(chan), (val >> 16));
chan              138 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan;
chan              161 drivers/net/ethernet/ti/davinci_cpdma.c #define tx_chan_num(chan)	(chan)
chan              162 drivers/net/ethernet/ti/davinci_cpdma.c #define rx_chan_num(chan)	((chan) + CPDMA_MAX_CHANNELS)
chan              163 drivers/net/ethernet/ti/davinci_cpdma.c #define is_rx_chan(chan)	((chan)->chan_num >= CPDMA_MAX_CHANNELS)
chan              164 drivers/net/ethernet/ti/davinci_cpdma.c #define is_tx_chan(chan)	(!is_rx_chan(chan))
chan              166 drivers/net/ethernet/ti/davinci_cpdma.c #define chan_linear(chan)	__chan_linear((chan)->chan_num)
chan              174 drivers/net/ethernet/ti/davinci_cpdma.c #define chan_read(chan, fld)		readl((chan)->fld)
chan              177 drivers/net/ethernet/ti/davinci_cpdma.c #define chan_write(chan, fld, v)	writel(v, (chan)->fld)
chan              180 drivers/net/ethernet/ti/davinci_cpdma.c #define cpdma_desc_to_port(chan, mode, directed)			\
chan              182 drivers/net/ethernet/ti/davinci_cpdma.c 		if (!is_rx_chan(chan) && ((directed == 1) ||		\
chan              355 drivers/net/ethernet/ti/davinci_cpdma.c static int cpdma_chan_set_chan_shaper(struct cpdma_chan *chan)
chan              357 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr *ctlr = chan->ctlr;
chan              362 drivers/net/ethernet/ti/davinci_cpdma.c 	if (!chan->rate)
chan              365 drivers/net/ethernet/ti/davinci_cpdma.c 	rate_reg = CPDMA_TX_PRI0_RATE + 4 * chan->chan_num;
chan              366 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(ctlr, rate_reg, chan->rate_factor);
chan              369 drivers/net/ethernet/ti/davinci_cpdma.c 	rmask |= chan->mask;
chan              375 drivers/net/ethernet/ti/davinci_cpdma.c static int cpdma_chan_on(struct cpdma_chan *chan)
chan              377 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr *ctlr = chan->ctlr;
chan              381 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              382 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_IDLE) {
chan              383 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              387 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan              390 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(ctlr, chan->int_set, chan->mask);
chan              391 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->state = CPDMA_STATE_ACTIVE;
chan              392 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->head) {
chan              393 drivers/net/ethernet/ti/davinci_cpdma.c 		chan_write(chan, hdp, desc_phys(pool, chan->head));
chan              394 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan->rxfree)
chan              395 drivers/net/ethernet/ti/davinci_cpdma.c 			chan_write(chan, rxfree, chan->count);
chan              398 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              410 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan;
chan              417 drivers/net/ethernet/ti/davinci_cpdma.c 		chan = ctlr->channels[i];
chan              418 drivers/net/ethernet/ti/davinci_cpdma.c 		if (!chan)
chan              421 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan == ch)
chan              422 drivers/net/ethernet/ti/davinci_cpdma.c 			chan->rate = rate;
chan              424 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan->rate) {
chan              426 drivers/net/ethernet/ti/davinci_cpdma.c 			new_rmask |= chan->mask;
chan              441 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->chan_num);
chan              537 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan;
chan              577 drivers/net/ethernet/ti/davinci_cpdma.c 		chan = ctlr->channels[i];
chan              578 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan) {
chan              579 drivers/net/ethernet/ti/davinci_cpdma.c 			cpdma_chan_set_chan_shaper(chan);
chan              580 drivers/net/ethernet/ti/davinci_cpdma.c 			cpdma_chan_on(chan);
chan              583 drivers/net/ethernet/ti/davinci_cpdma.c 			if (is_tx_chan(chan) && !chan->rate)
chan              683 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan, *most_chan = NULL;
chan              700 drivers/net/ethernet/ti/davinci_cpdma.c 		chan = ctlr->channels[i];
chan              701 drivers/net/ethernet/ti/davinci_cpdma.c 		if (!chan)
chan              704 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan->weight)
chan              705 drivers/net/ethernet/ti/davinci_cpdma.c 			chan->desc_num = (chan->weight * desc_num) / 100;
chan              707 drivers/net/ethernet/ti/davinci_cpdma.c 			chan->desc_num = per_ch_desc;
chan              709 drivers/net/ethernet/ti/davinci_cpdma.c 		desc_cnt -= chan->desc_num;
chan              711 drivers/net/ethernet/ti/davinci_cpdma.c 		if (most_dnum < chan->desc_num) {
chan              712 drivers/net/ethernet/ti/davinci_cpdma.c 			most_dnum = chan->desc_num;
chan              713 drivers/net/ethernet/ti/davinci_cpdma.c 			most_chan = chan;
chan              731 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan;
chan              738 drivers/net/ethernet/ti/davinci_cpdma.c 		chan = ctlr->channels[i];
chan              739 drivers/net/ethernet/ti/davinci_cpdma.c 		if (!chan)
chan              742 drivers/net/ethernet/ti/davinci_cpdma.c 		if (is_rx_chan(chan)) {
chan              743 drivers/net/ethernet/ti/davinci_cpdma.c 			if (!chan->weight)
chan              745 drivers/net/ethernet/ti/davinci_cpdma.c 			rx_weight += chan->weight;
chan              747 drivers/net/ethernet/ti/davinci_cpdma.c 			if (!chan->weight)
chan              749 drivers/net/ethernet/ti/davinci_cpdma.c 			tx_weight += chan->weight;
chan              880 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan *chan;
chan              888 drivers/net/ethernet/ti/davinci_cpdma.c 	chan = devm_kzalloc(ctlr->dev, sizeof(*chan), GFP_KERNEL);
chan              889 drivers/net/ethernet/ti/davinci_cpdma.c 	if (!chan)
chan              895 drivers/net/ethernet/ti/davinci_cpdma.c 		devm_kfree(ctlr->dev, chan);
chan              899 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->ctlr	= ctlr;
chan              900 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->state	= CPDMA_STATE_IDLE;
chan              901 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->chan_num	= chan_num;
chan              902 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->handler	= handler;
chan              903 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->rate	= 0;
chan              904 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->weight	= 0;
chan              906 drivers/net/ethernet/ti/davinci_cpdma.c 	if (is_rx_chan(chan)) {
chan              907 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->hdp	= ctlr->params.rxhdp + offset;
chan              908 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->cp	= ctlr->params.rxcp + offset;
chan              909 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->rxfree	= ctlr->params.rxfree + offset;
chan              910 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->int_set	= CPDMA_RXINTMASKSET;
chan              911 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->int_clear	= CPDMA_RXINTMASKCLEAR;
chan              912 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->td	= CPDMA_RXTEARDOWN;
chan              913 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->dir	= DMA_FROM_DEVICE;
chan              915 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->hdp	= ctlr->params.txhdp + offset;
chan              916 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->cp	= ctlr->params.txcp + offset;
chan              917 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->int_set	= CPDMA_TXINTMASKSET;
chan              918 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->int_clear	= CPDMA_TXINTMASKCLEAR;
chan              919 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->td	= CPDMA_TXTEARDOWN;
chan              920 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->dir	= DMA_TO_DEVICE;
chan              922 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->mask = BIT(chan_linear(chan));
chan              924 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_init(&chan->lock);
chan              926 drivers/net/ethernet/ti/davinci_cpdma.c 	ctlr->channels[chan_num] = chan;
chan              932 drivers/net/ethernet/ti/davinci_cpdma.c 	return chan;
chan              935 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_get_rx_buf_num(struct cpdma_chan *chan)
chan              940 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              941 drivers/net/ethernet/ti/davinci_cpdma.c 	desc_num = chan->desc_num;
chan              942 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              947 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_destroy(struct cpdma_chan *chan)
chan              952 drivers/net/ethernet/ti/davinci_cpdma.c 	if (!chan)
chan              954 drivers/net/ethernet/ti/davinci_cpdma.c 	ctlr = chan->ctlr;
chan              957 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_IDLE)
chan              958 drivers/net/ethernet/ti/davinci_cpdma.c 		cpdma_chan_stop(chan);
chan              959 drivers/net/ethernet/ti/davinci_cpdma.c 	ctlr->channels[chan->chan_num] = NULL;
chan              961 drivers/net/ethernet/ti/davinci_cpdma.c 	devm_kfree(ctlr->dev, chan);
chan              968 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_get_stats(struct cpdma_chan *chan,
chan              972 drivers/net/ethernet/ti/davinci_cpdma.c 	if (!chan)
chan              974 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan              975 drivers/net/ethernet/ti/davinci_cpdma.c 	memcpy(stats, &chan->stats, sizeof(*stats));
chan              976 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              980 drivers/net/ethernet/ti/davinci_cpdma.c static void __cpdma_chan_submit(struct cpdma_chan *chan,
chan              983 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr		*ctlr = chan->ctlr;
chan              984 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_desc __iomem	*prev = chan->tail;
chan              992 drivers/net/ethernet/ti/davinci_cpdma.c 	if (!chan->head) {
chan              993 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.head_enqueue++;
chan              994 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->head = desc;
chan              995 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->tail = desc;
chan              996 drivers/net/ethernet/ti/davinci_cpdma.c 		if (chan->state == CPDMA_STATE_ACTIVE)
chan              997 drivers/net/ethernet/ti/davinci_cpdma.c 			chan_write(chan, hdp, desc_dma);
chan             1003 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->tail = desc;
chan             1004 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->stats.tail_enqueue++;
chan             1009 drivers/net/ethernet/ti/davinci_cpdma.c 	    (chan->state == CPDMA_STATE_ACTIVE)) {
chan             1011 drivers/net/ethernet/ti/davinci_cpdma.c 		chan_write(chan, hdp, desc_dma);
chan             1012 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.misqueued++;
chan             1018 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_chan		*chan = si->chan;
chan             1019 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr		*ctlr = chan->ctlr;
chan             1026 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->count >= chan->desc_num)	{
chan             1027 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.desc_alloc_fail++;
chan             1033 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.desc_alloc_fail++;
chan             1039 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.runt_transmit_buff++;
chan             1043 drivers/net/ethernet/ti/davinci_cpdma.c 	cpdma_desc_to_port(chan, mode, si->directed);
chan             1047 drivers/net/ethernet/ti/davinci_cpdma.c 		dma_sync_single_for_device(ctlr->dev, buffer, len, chan->dir);
chan             1049 drivers/net/ethernet/ti/davinci_cpdma.c 		buffer = dma_map_single(ctlr->dev, si->data_virt, len, chan->dir);
chan             1070 drivers/net/ethernet/ti/davinci_cpdma.c 	__cpdma_chan_submit(chan, desc);
chan             1072 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state == CPDMA_STATE_ACTIVE && chan->rxfree)
chan             1073 drivers/net/ethernet/ti/davinci_cpdma.c 		chan_write(chan, rxfree, 1);
chan             1075 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->count++;
chan             1079 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_idle_submit(struct cpdma_chan *chan, void *token, void *data,
chan             1086 drivers/net/ethernet/ti/davinci_cpdma.c 	si.chan = chan;
chan             1093 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1094 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state == CPDMA_STATE_TEARDOWN) {
chan             1095 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1100 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1104 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_idle_submit_mapped(struct cpdma_chan *chan, void *token,
chan             1111 drivers/net/ethernet/ti/davinci_cpdma.c 	si.chan = chan;
chan             1118 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1119 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state == CPDMA_STATE_TEARDOWN) {
chan             1120 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1125 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1129 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
chan             1136 drivers/net/ethernet/ti/davinci_cpdma.c 	si.chan = chan;
chan             1143 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1144 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_ACTIVE) {
chan             1145 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1150 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1154 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_submit_mapped(struct cpdma_chan *chan, void *token,
chan             1161 drivers/net/ethernet/ti/davinci_cpdma.c 	si.chan = chan;
chan             1168 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1169 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_ACTIVE) {
chan             1170 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1175 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1179 drivers/net/ethernet/ti/davinci_cpdma.c bool cpdma_check_free_tx_desc(struct cpdma_chan *chan)
chan             1181 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr	*ctlr = chan->ctlr;
chan             1186 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1187 drivers/net/ethernet/ti/davinci_cpdma.c 	free_tx_desc = (chan->count < chan->desc_num) &&
chan             1189 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1193 drivers/net/ethernet/ti/davinci_cpdma.c static void __cpdma_chan_free(struct cpdma_chan *chan,
chan             1197 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr		*ctlr = chan->ctlr;
chan             1210 drivers/net/ethernet/ti/davinci_cpdma.c 					chan->dir);
chan             1212 drivers/net/ethernet/ti/davinci_cpdma.c 		dma_unmap_single(ctlr->dev, buff_dma, origlen, chan->dir);
chan             1216 drivers/net/ethernet/ti/davinci_cpdma.c 	(*chan->handler)((void *)token, outlen, status);
chan             1219 drivers/net/ethernet/ti/davinci_cpdma.c static int __cpdma_chan_process(struct cpdma_chan *chan)
chan             1221 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr		*ctlr = chan->ctlr;
chan             1229 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1231 drivers/net/ethernet/ti/davinci_cpdma.c 	desc = chan->head;
chan             1233 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.empty_dequeue++;
chan             1242 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.busy_dequeue++;
chan             1253 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->head = desc_from_phys(pool, desc_read(desc, hw_next));
chan             1254 drivers/net/ethernet/ti/davinci_cpdma.c 	chan_write(chan, cp, desc_dma);
chan             1255 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->count--;
chan             1256 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->stats.good_dequeue++;
chan             1258 drivers/net/ethernet/ti/davinci_cpdma.c 	if ((status & CPDMA_DESC_EOQ) && chan->head) {
chan             1259 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.requeue++;
chan             1260 drivers/net/ethernet/ti/davinci_cpdma.c 		chan_write(chan, hdp, desc_phys(pool, chan->head));
chan             1263 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1269 drivers/net/ethernet/ti/davinci_cpdma.c 	__cpdma_chan_free(chan, desc, outlen, cb_status);
chan             1273 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1277 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_process(struct cpdma_chan *chan, int quota)
chan             1281 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_ACTIVE)
chan             1285 drivers/net/ethernet/ti/davinci_cpdma.c 		ret = __cpdma_chan_process(chan);
chan             1293 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_start(struct cpdma_chan *chan)
chan             1295 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr *ctlr = chan->ctlr;
chan             1300 drivers/net/ethernet/ti/davinci_cpdma.c 	ret = cpdma_chan_set_chan_shaper(chan);
chan             1305 drivers/net/ethernet/ti/davinci_cpdma.c 	ret = cpdma_chan_on(chan);
chan             1312 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_stop(struct cpdma_chan *chan)
chan             1314 drivers/net/ethernet/ti/davinci_cpdma.c 	struct cpdma_ctlr	*ctlr = chan->ctlr;
chan             1320 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1321 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state == CPDMA_STATE_TEARDOWN) {
chan             1322 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1326 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->state = CPDMA_STATE_TEARDOWN;
chan             1327 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(ctlr, chan->int_clear, chan->mask);
chan             1330 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(ctlr, chan->td, chan_linear(chan));
chan             1335 drivers/net/ethernet/ti/davinci_cpdma.c 		u32 cp = chan_read(chan, cp);
chan             1342 drivers/net/ethernet/ti/davinci_cpdma.c 	chan_write(chan, cp, CPDMA_TEARDOWN_VALUE);
chan             1345 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1347 drivers/net/ethernet/ti/davinci_cpdma.c 		ret = __cpdma_chan_process(chan);
chan             1351 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1354 drivers/net/ethernet/ti/davinci_cpdma.c 	while (chan->head) {
chan             1355 drivers/net/ethernet/ti/davinci_cpdma.c 		struct cpdma_desc __iomem *desc = chan->head;
chan             1359 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->head = desc_from_phys(pool, next_dma);
chan             1360 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->count--;
chan             1361 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->stats.teardown_dequeue++;
chan             1364 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1365 drivers/net/ethernet/ti/davinci_cpdma.c 		__cpdma_chan_free(chan, desc, 0, -ENOSYS);
chan             1366 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_lock_irqsave(&chan->lock, flags);
chan             1369 drivers/net/ethernet/ti/davinci_cpdma.c 	chan->state = CPDMA_STATE_IDLE;
chan             1370 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan             1374 drivers/net/ethernet/ti/davinci_cpdma.c int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable)
chan             1378 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_lock_irqsave(&chan->lock, flags);
chan             1379 drivers/net/ethernet/ti/davinci_cpdma.c 	if (chan->state != CPDMA_STATE_ACTIVE) {
chan             1380 drivers/net/ethernet/ti/davinci_cpdma.c 		spin_unlock_irqrestore(&chan->lock, flags);
chan             1384 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(chan->ctlr, enable ? chan->int_set : chan->int_clear,
chan             1385 drivers/net/ethernet/ti/davinci_cpdma.c 		      chan->mask);
chan             1386 drivers/net/ethernet/ti/davinci_cpdma.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan               73 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_get_rx_buf_num(struct cpdma_chan *chan);
chan               74 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_destroy(struct cpdma_chan *chan);
chan               75 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_start(struct cpdma_chan *chan);
chan               76 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_stop(struct cpdma_chan *chan);
chan               78 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_get_stats(struct cpdma_chan *chan,
chan               80 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_submit_mapped(struct cpdma_chan *chan, void *token,
chan               82 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
chan               84 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_idle_submit_mapped(struct cpdma_chan *chan, void *token,
chan               86 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_idle_submit(struct cpdma_chan *chan, void *token, void *data,
chan               88 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_process(struct cpdma_chan *chan, int quota);
chan               92 drivers/net/ethernet/ti/davinci_cpdma.h int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable);
chan               95 drivers/net/ethernet/ti/davinci_cpdma.h bool cpdma_check_free_tx_desc(struct cpdma_chan *chan);
chan             1713 drivers/net/hamradio/scc.c 	int chan;
chan             1793 drivers/net/hamradio/scc.c 			for (chan = 0; chan < 2; chan++)
chan             1795 drivers/net/hamradio/scc.c 				sprintf(device_name, "%s%i", SCC_DriverName, 2*Nchips+chan);
chan             1797 drivers/net/hamradio/scc.c 				SCC_Info[2*Nchips+chan].special = hwcfg.special;
chan             1798 drivers/net/hamradio/scc.c 				SCC_Info[2*Nchips+chan].clock = hwcfg.clock;
chan             1799 drivers/net/hamradio/scc.c 				SCC_Info[2*Nchips+chan].brand = hwcfg.brand;
chan             1800 drivers/net/hamradio/scc.c 				SCC_Info[2*Nchips+chan].option = hwcfg.option;
chan             1801 drivers/net/hamradio/scc.c 				SCC_Info[2*Nchips+chan].enhanced = hwcfg.escc;
chan             1806 drivers/net/hamradio/scc.c 					SCC_Info[2*Nchips+chan].data, 
chan             1807 drivers/net/hamradio/scc.c 					SCC_Info[2*Nchips+chan].ctrl);
chan             1812 drivers/net/hamradio/scc.c 					chan? hwcfg.data_b : hwcfg.data_a, 
chan             1813 drivers/net/hamradio/scc.c 					chan? hwcfg.ctrl_b : hwcfg.ctrl_a,
chan             1819 drivers/net/hamradio/scc.c 					request_region(SCC_Info[2*Nchips+chan].ctrl, 1, "scc ctrl");
chan             1820 drivers/net/hamradio/scc.c 					request_region(SCC_Info[2*Nchips+chan].data, 1, "scc data");
chan             1821 drivers/net/hamradio/scc.c 					if (Nchips+chan != 0 &&
chan             1823 drivers/net/hamradio/scc.c 							  &SCC_Info[2*Nchips+chan]))
chan              134 drivers/net/hyperv/netvsc_trace.h 		 const struct vmbus_channel *chan,
chan              136 drivers/net/hyperv/netvsc_trace.h 	TP_ARGS(ndev, chan, rpkt),
chan              146 drivers/net/hyperv/netvsc_trace.h 		__entry->qid = chan->offermsg.offer.sub_channel_index;
chan              159 drivers/net/hyperv/netvsc_trace.h 		 const struct vmbus_channel *chan,
chan              161 drivers/net/hyperv/netvsc_trace.h 	TP_ARGS(ndev, chan, msg),
chan              169 drivers/net/hyperv/netvsc_trace.h 		__entry->qid = chan->offermsg.offer.sub_channel_index;
chan              187 drivers/net/phy/dp83640.c 	pd[index].chan = 0;
chan              191 drivers/net/phy/dp83640.c 	pd[index].chan = 0;
chan              196 drivers/net/phy/dp83640.c 		pd[index].chan = i - EXTTS0_GPIO;
chan              522 drivers/net/phy/dp83640.c 			      enum ptp_pin_function func, unsigned int chan)
chan               70 drivers/net/ppp/ppp_async.c 	struct ppp_channel chan;	/* interface to generic ppp layer */
chan               97 drivers/net/ppp/ppp_async.c static int ppp_async_send(struct ppp_channel *chan, struct sk_buff *skb);
chan              102 drivers/net/ppp/ppp_async.c static int ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd,
chan              187 drivers/net/ppp/ppp_async.c 	ap->chan.private = ap;
chan              188 drivers/net/ppp/ppp_async.c 	ap->chan.ops = &async_ops;
chan              189 drivers/net/ppp/ppp_async.c 	ap->chan.mtu = PPP_MRU;
chan              191 drivers/net/ppp/ppp_async.c 	ap->chan.speed = speed;
chan              192 drivers/net/ppp/ppp_async.c 	err = ppp_register_channel(&ap->chan);
chan              237 drivers/net/ppp/ppp_async.c 	ppp_unregister_channel(&ap->chan);
chan              297 drivers/net/ppp/ppp_async.c 		if (put_user(ppp_channel_index(&ap->chan), p))
chan              304 drivers/net/ppp/ppp_async.c 		if (put_user(ppp_unit_number(&ap->chan), p))
chan              403 drivers/net/ppp/ppp_async.c ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
chan              405 drivers/net/ppp/ppp_async.c 	struct asyncppp *ap = chan->private;
chan              499 drivers/net/ppp/ppp_async.c 			ppp_input_error(&ap->chan, 0);
chan              500 drivers/net/ppp/ppp_async.c 		ppp_input(&ap->chan, skb);
chan              505 drivers/net/ppp/ppp_async.c 		ppp_output_wakeup(&ap->chan);
chan              628 drivers/net/ppp/ppp_async.c ppp_async_send(struct ppp_channel *chan, struct sk_buff *skb)
chan              630 drivers/net/ppp/ppp_async.c 	struct asyncppp *ap = chan->private;
chan              741 drivers/net/ppp/ppp_async.c 		ppp_output_wakeup(&ap->chan);
chan             1001 drivers/net/ppp/ppp_async.c 				ap->chan.mtu = val;
chan              171 drivers/net/ppp/ppp_generic.c 	struct ppp_channel *chan;	/* public channel data structure */
chan              616 drivers/net/ppp/ppp_generic.c 		struct ppp_channel *chan;
chan              633 drivers/net/ppp/ppp_generic.c 			chan = pch->chan;
chan              635 drivers/net/ppp/ppp_generic.c 			if (chan && chan->ops->ioctl)
chan              636 drivers/net/ppp/ppp_generic.c 				err = chan->ops->ioctl(chan, cmd, arg);
chan              835 drivers/net/ppp/ppp_generic.c 	struct channel *chan;
chan              876 drivers/net/ppp/ppp_generic.c 		chan = ppp_find_channel(pn, unit);
chan              877 drivers/net/ppp/ppp_generic.c 		if (chan) {
chan              878 drivers/net/ppp/ppp_generic.c 			refcount_inc(&chan->file.refcnt);
chan              879 drivers/net/ppp/ppp_generic.c 			file->private_data = &chan->file;
chan             1643 drivers/net/ppp/ppp_generic.c 		if (pch->chan) {
chan             1644 drivers/net/ppp/ppp_generic.c 			if (pch->chan->ops->start_xmit(pch->chan, skb))
chan             1689 drivers/net/ppp/ppp_generic.c 	struct ppp_channel *chan;
chan             1702 drivers/net/ppp/ppp_generic.c 		if (pch->chan) {
chan             1705 drivers/net/ppp/ppp_generic.c 			pch->speed = pch->chan->speed;
chan             1782 drivers/net/ppp/ppp_generic.c 		if (pch->chan == NULL) {
chan             1849 drivers/net/ppp/ppp_generic.c 		mtu = pch->chan->mtu - (hdrlen - 2);
chan             1876 drivers/net/ppp/ppp_generic.c 		chan = pch->chan;
chan             1878 drivers/net/ppp/ppp_generic.c 			!chan->ops->start_xmit(chan, frag))
chan             1908 drivers/net/ppp/ppp_generic.c 	if (pch->chan) {
chan             1911 drivers/net/ppp/ppp_generic.c 			if (!pch->chan->ops->start_xmit(pch->chan, skb)) {
chan             2005 drivers/net/ppp/ppp_generic.c ppp_input(struct ppp_channel *chan, struct sk_buff *skb)
chan             2007 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2044 drivers/net/ppp/ppp_generic.c ppp_input_error(struct ppp_channel *chan, int code)
chan             2046 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2594 drivers/net/ppp/ppp_generic.c int ppp_register_channel(struct ppp_channel *chan)
chan             2596 drivers/net/ppp/ppp_generic.c 	return ppp_register_net_channel(current->nsproxy->net_ns, chan);
chan             2600 drivers/net/ppp/ppp_generic.c int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
chan             2612 drivers/net/ppp/ppp_generic.c 	pch->chan = chan;
chan             2614 drivers/net/ppp/ppp_generic.c 	chan->ppp = pch;
chan             2616 drivers/net/ppp/ppp_generic.c 	pch->file.hdrlen = chan->hdrlen;
chan             2636 drivers/net/ppp/ppp_generic.c int ppp_channel_index(struct ppp_channel *chan)
chan             2638 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2648 drivers/net/ppp/ppp_generic.c int ppp_unit_number(struct ppp_channel *chan)
chan             2650 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2665 drivers/net/ppp/ppp_generic.c char *ppp_dev_name(struct ppp_channel *chan)
chan             2667 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2685 drivers/net/ppp/ppp_generic.c ppp_unregister_channel(struct ppp_channel *chan)
chan             2687 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             2693 drivers/net/ppp/ppp_generic.c 	chan->ppp = NULL;
chan             2701 drivers/net/ppp/ppp_generic.c 	pch->chan = NULL;
chan             2722 drivers/net/ppp/ppp_generic.c ppp_output_wakeup(struct ppp_channel *chan)
chan             2724 drivers/net/ppp/ppp_generic.c 	struct channel *pch = chan->ppp;
chan             3194 drivers/net/ppp/ppp_generic.c 	if (!pch->chan) {
chan               74 drivers/net/ppp/ppp_synctty.c 	struct ppp_channel chan;	/* interface to generic ppp layer */
chan               90 drivers/net/ppp/ppp_synctty.c static int ppp_sync_send(struct ppp_channel *chan, struct sk_buff *skb);
chan               91 drivers/net/ppp/ppp_synctty.c static int ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd,
chan              185 drivers/net/ppp/ppp_synctty.c 	ap->chan.private = ap;
chan              186 drivers/net/ppp/ppp_synctty.c 	ap->chan.ops = &sync_ops;
chan              187 drivers/net/ppp/ppp_synctty.c 	ap->chan.mtu = PPP_MRU;
chan              188 drivers/net/ppp/ppp_synctty.c 	ap->chan.hdrlen = 2;	/* for A/C bytes */
chan              190 drivers/net/ppp/ppp_synctty.c 	ap->chan.speed = speed;
chan              191 drivers/net/ppp/ppp_synctty.c 	err = ppp_register_channel(&ap->chan);
chan              236 drivers/net/ppp/ppp_synctty.c 	ppp_unregister_channel(&ap->chan);
chan              290 drivers/net/ppp/ppp_synctty.c 		if (put_user(ppp_channel_index(&ap->chan), p))
chan              297 drivers/net/ppp/ppp_synctty.c 		if (put_user(ppp_unit_number(&ap->chan), p))
chan              396 drivers/net/ppp/ppp_synctty.c ppp_sync_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
chan              398 drivers/net/ppp/ppp_synctty.c 	struct syncppp *ap = chan->private;
chan              492 drivers/net/ppp/ppp_synctty.c 			ppp_input_error(&ap->chan, 0);
chan              496 drivers/net/ppp/ppp_synctty.c 			ppp_input(&ap->chan, skb);
chan              501 drivers/net/ppp/ppp_synctty.c 		ppp_output_wakeup(&ap->chan);
chan              566 drivers/net/ppp/ppp_synctty.c ppp_sync_send(struct ppp_channel *chan, struct sk_buff *skb)
chan              568 drivers/net/ppp/ppp_synctty.c 	struct syncppp *ap = chan->private;
chan              653 drivers/net/ppp/ppp_synctty.c 		ppp_output_wakeup(&ap->chan);
chan              381 drivers/net/ppp/pppoe.c 		ppp_input(&po->chan, skb);
chan              660 drivers/net/ppp/pppoe.c 		memset(&po->chan, 0, sizeof(po->chan));
chan              692 drivers/net/ppp/pppoe.c 		po->chan.hdrlen = (sizeof(struct pppoe_hdr) +
chan              695 drivers/net/ppp/pppoe.c 		po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr) - 2;
chan              696 drivers/net/ppp/pppoe.c 		po->chan.private = sk;
chan              697 drivers/net/ppp/pppoe.c 		po->chan.ops = &pppoe_chan_ops;
chan              699 drivers/net/ppp/pppoe.c 		error = ppp_register_net_channel(dev_net(dev), &po->chan);
chan              971 drivers/net/ppp/pppoe.c static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb)
chan              973 drivers/net/ppp/pppoe.c 	struct sock *sk = (struct sock *)chan->private;
chan               58 drivers/net/ppp/pppox.c 		ppp_unregister_channel(&pppox_sk(sk)->chan);
chan               83 drivers/net/ppp/pppox.c 		index = ppp_channel_index(&po->chan);
chan              131 drivers/net/ppp/pptp.c static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
chan              133 drivers/net/ppp/pptp.c 	struct sock *sk = (struct sock *) chan->private;
chan              325 drivers/net/ppp/pptp.c 		ppp_input(&po->chan, skb);
chan              440 drivers/net/ppp/pptp.c 	po->chan.private = sk;
chan              441 drivers/net/ppp/pptp.c 	po->chan.ops = &pptp_chan_ops;
chan              454 drivers/net/ppp/pptp.c 	po->chan.mtu = dst_mtu(&rt->dst);
chan              455 drivers/net/ppp/pptp.c 	if (!po->chan.mtu)
chan              456 drivers/net/ppp/pptp.c 		po->chan.mtu = PPP_MRU;
chan              457 drivers/net/ppp/pptp.c 	po->chan.mtu -= PPTP_HEADER_OVERHEAD;
chan              459 drivers/net/ppp/pptp.c 	po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
chan              460 drivers/net/ppp/pptp.c 	error = ppp_register_channel(&po->chan);
chan              567 drivers/net/ppp/pptp.c static int pptp_ppp_ioctl(struct ppp_channel *chan, unsigned int cmd,
chan              570 drivers/net/ppp/pptp.c 	struct sock *sk = (struct sock *) chan->private;
chan              149 drivers/net/wan/cosa.c 	struct channel_data *chan;
chan              260 drivers/net/wan/cosa.c static void cosa_enable_rx(struct channel_data *chan);
chan              261 drivers/net/wan/cosa.c static void cosa_disable_rx(struct channel_data *chan);
chan              264 drivers/net/wan/cosa.c static int cosa_dma_able(struct channel_data *chan, char *buf, int data);
chan              405 drivers/net/wan/cosa.c 			unregister_hdlc_device(cosa->chan[i].netdev);
chan              406 drivers/net/wan/cosa.c 			free_netdev(cosa->chan[i].netdev);
chan              409 drivers/net/wan/cosa.c 		kfree(cosa->chan);
chan              548 drivers/net/wan/cosa.c 	cosa->chan = kcalloc(cosa->nchannels, sizeof(struct channel_data), GFP_KERNEL);
chan              549 drivers/net/wan/cosa.c 	if (!cosa->chan) {
chan              555 drivers/net/wan/cosa.c 		struct channel_data *chan = &cosa->chan[i];
chan              557 drivers/net/wan/cosa.c 		chan->cosa = cosa;
chan              558 drivers/net/wan/cosa.c 		chan->num = i;
chan              559 drivers/net/wan/cosa.c 		sprintf(chan->name, "cosa%dc%d", chan->cosa->num, i);
chan              562 drivers/net/wan/cosa.c 		mutex_init(&chan->rlock);
chan              563 drivers/net/wan/cosa.c 		sema_init(&chan->wsem, 1);
chan              566 drivers/net/wan/cosa.c 		if (!(chan->netdev = alloc_hdlcdev(chan))) {
chan              567 drivers/net/wan/cosa.c 			pr_warn("%s: alloc_hdlcdev failed\n", chan->name);
chan              571 drivers/net/wan/cosa.c 		dev_to_hdlc(chan->netdev)->attach = cosa_net_attach;
chan              572 drivers/net/wan/cosa.c 		dev_to_hdlc(chan->netdev)->xmit = cosa_net_tx;
chan              573 drivers/net/wan/cosa.c 		chan->netdev->netdev_ops = &cosa_ops;
chan              574 drivers/net/wan/cosa.c 		chan->netdev->watchdog_timeo = TX_TIMEOUT;
chan              575 drivers/net/wan/cosa.c 		chan->netdev->base_addr = chan->cosa->datareg;
chan              576 drivers/net/wan/cosa.c 		chan->netdev->irq = chan->cosa->irq;
chan              577 drivers/net/wan/cosa.c 		chan->netdev->dma = chan->cosa->dma;
chan              578 drivers/net/wan/cosa.c 		err = register_hdlc_device(chan->netdev);
chan              580 drivers/net/wan/cosa.c 			netdev_warn(chan->netdev,
chan              582 drivers/net/wan/cosa.c 			free_netdev(chan->netdev);
chan              595 drivers/net/wan/cosa.c 		unregister_hdlc_device(cosa->chan[i].netdev);
chan              596 drivers/net/wan/cosa.c 		free_netdev(cosa->chan[i].netdev);
chan              598 drivers/net/wan/cosa.c 	kfree(cosa->chan);
chan              624 drivers/net/wan/cosa.c 	struct channel_data *chan = dev_to_chan(dev);
chan              628 drivers/net/wan/cosa.c 	if (!(chan->cosa->firmware_status & COSA_FW_START)) {
chan              630 drivers/net/wan/cosa.c 			  chan->cosa->name, chan->cosa->firmware_status);
chan              633 drivers/net/wan/cosa.c 	spin_lock_irqsave(&chan->cosa->lock, flags);
chan              634 drivers/net/wan/cosa.c 	if (chan->usage != 0) {
chan              636 drivers/net/wan/cosa.c 			chan->name, chan->usage);
chan              637 drivers/net/wan/cosa.c 		spin_unlock_irqrestore(&chan->cosa->lock, flags);
chan              640 drivers/net/wan/cosa.c 	chan->setup_rx = cosa_net_setup_rx;
chan              641 drivers/net/wan/cosa.c 	chan->tx_done = cosa_net_tx_done;
chan              642 drivers/net/wan/cosa.c 	chan->rx_done = cosa_net_rx_done;
chan              643 drivers/net/wan/cosa.c 	chan->usage = -1;
chan              644 drivers/net/wan/cosa.c 	chan->cosa->usage++;
chan              645 drivers/net/wan/cosa.c 	spin_unlock_irqrestore(&chan->cosa->lock, flags);
chan              649 drivers/net/wan/cosa.c 		spin_lock_irqsave(&chan->cosa->lock, flags);
chan              650 drivers/net/wan/cosa.c 		chan->usage = 0;
chan              651 drivers/net/wan/cosa.c 		chan->cosa->usage--;
chan              652 drivers/net/wan/cosa.c 		spin_unlock_irqrestore(&chan->cosa->lock, flags);
chan              657 drivers/net/wan/cosa.c 	cosa_enable_rx(chan);
chan              664 drivers/net/wan/cosa.c 	struct channel_data *chan = dev_to_chan(dev);
chan              668 drivers/net/wan/cosa.c 	chan->tx_skb = skb;
chan              669 drivers/net/wan/cosa.c 	cosa_start_tx(chan, skb->data, skb->len);
chan              675 drivers/net/wan/cosa.c 	struct channel_data *chan = dev_to_chan(dev);
chan              677 drivers/net/wan/cosa.c 	if (test_bit(RXBIT, &chan->cosa->rxtx)) {
chan              678 drivers/net/wan/cosa.c 		chan->netdev->stats.rx_errors++;
chan              679 drivers/net/wan/cosa.c 		chan->netdev->stats.rx_missed_errors++;
chan              681 drivers/net/wan/cosa.c 		chan->netdev->stats.tx_errors++;
chan              682 drivers/net/wan/cosa.c 		chan->netdev->stats.tx_aborted_errors++;
chan              684 drivers/net/wan/cosa.c 	cosa_kick(chan->cosa);
chan              685 drivers/net/wan/cosa.c 	if (chan->tx_skb) {
chan              686 drivers/net/wan/cosa.c 		dev_kfree_skb(chan->tx_skb);
chan              687 drivers/net/wan/cosa.c 		chan->tx_skb = NULL;
chan              694 drivers/net/wan/cosa.c 	struct channel_data *chan = dev_to_chan(dev);
chan              699 drivers/net/wan/cosa.c 	cosa_disable_rx(chan);
chan              700 drivers/net/wan/cosa.c 	spin_lock_irqsave(&chan->cosa->lock, flags);
chan              701 drivers/net/wan/cosa.c 	if (chan->rx_skb) {
chan              702 drivers/net/wan/cosa.c 		kfree_skb(chan->rx_skb);
chan              703 drivers/net/wan/cosa.c 		chan->rx_skb = NULL;
chan              705 drivers/net/wan/cosa.c 	if (chan->tx_skb) {
chan              706 drivers/net/wan/cosa.c 		kfree_skb(chan->tx_skb);
chan              707 drivers/net/wan/cosa.c 		chan->tx_skb = NULL;
chan              709 drivers/net/wan/cosa.c 	chan->usage = 0;
chan              710 drivers/net/wan/cosa.c 	chan->cosa->usage--;
chan              711 drivers/net/wan/cosa.c 	spin_unlock_irqrestore(&chan->cosa->lock, flags);
chan              715 drivers/net/wan/cosa.c static char *cosa_net_setup_rx(struct channel_data *chan, int size)
chan              721 drivers/net/wan/cosa.c 	kfree_skb(chan->rx_skb);
chan              722 drivers/net/wan/cosa.c 	chan->rx_skb = dev_alloc_skb(size);
chan              723 drivers/net/wan/cosa.c 	if (chan->rx_skb == NULL) {
chan              724 drivers/net/wan/cosa.c 		pr_notice("%s: Memory squeeze, dropping packet\n", chan->name);
chan              725 drivers/net/wan/cosa.c 		chan->netdev->stats.rx_dropped++;
chan              728 drivers/net/wan/cosa.c 	netif_trans_update(chan->netdev);
chan              729 drivers/net/wan/cosa.c 	return skb_put(chan->rx_skb, size);
chan              732 drivers/net/wan/cosa.c static int cosa_net_rx_done(struct channel_data *chan)
chan              734 drivers/net/wan/cosa.c 	if (!chan->rx_skb) {
chan              735 drivers/net/wan/cosa.c 		pr_warn("%s: rx_done with empty skb!\n", chan->name);
chan              736 drivers/net/wan/cosa.c 		chan->netdev->stats.rx_errors++;
chan              737 drivers/net/wan/cosa.c 		chan->netdev->stats.rx_frame_errors++;
chan              740 drivers/net/wan/cosa.c 	chan->rx_skb->protocol = hdlc_type_trans(chan->rx_skb, chan->netdev);
chan              741 drivers/net/wan/cosa.c 	chan->rx_skb->dev = chan->netdev;
chan              742 drivers/net/wan/cosa.c 	skb_reset_mac_header(chan->rx_skb);
chan              743 drivers/net/wan/cosa.c 	chan->netdev->stats.rx_packets++;
chan              744 drivers/net/wan/cosa.c 	chan->netdev->stats.rx_bytes += chan->cosa->rxsize;
chan              745 drivers/net/wan/cosa.c 	netif_rx(chan->rx_skb);
chan              746 drivers/net/wan/cosa.c 	chan->rx_skb = NULL;
chan              751 drivers/net/wan/cosa.c static int cosa_net_tx_done(struct channel_data *chan, int size)
chan              753 drivers/net/wan/cosa.c 	if (!chan->tx_skb) {
chan              754 drivers/net/wan/cosa.c 		pr_warn("%s: tx_done with empty skb!\n", chan->name);
chan              755 drivers/net/wan/cosa.c 		chan->netdev->stats.tx_errors++;
chan              756 drivers/net/wan/cosa.c 		chan->netdev->stats.tx_aborted_errors++;
chan              759 drivers/net/wan/cosa.c 	dev_consume_skb_irq(chan->tx_skb);
chan              760 drivers/net/wan/cosa.c 	chan->tx_skb = NULL;
chan              761 drivers/net/wan/cosa.c 	chan->netdev->stats.tx_packets++;
chan              762 drivers/net/wan/cosa.c 	chan->netdev->stats.tx_bytes += size;
chan              763 drivers/net/wan/cosa.c 	netif_wake_queue(chan->netdev);
chan              774 drivers/net/wan/cosa.c 	struct channel_data *chan = file->private_data;
chan              775 drivers/net/wan/cosa.c 	struct cosa_data *cosa = chan->cosa;
chan              783 drivers/net/wan/cosa.c 	if (mutex_lock_interruptible(&chan->rlock))
chan              786 drivers/net/wan/cosa.c 	chan->rxdata = kmalloc(COSA_MTU, GFP_DMA|GFP_KERNEL);
chan              787 drivers/net/wan/cosa.c 	if (chan->rxdata == NULL) {
chan              788 drivers/net/wan/cosa.c 		mutex_unlock(&chan->rlock);
chan              792 drivers/net/wan/cosa.c 	chan->rx_status = 0;
chan              793 drivers/net/wan/cosa.c 	cosa_enable_rx(chan);
chan              795 drivers/net/wan/cosa.c 	add_wait_queue(&chan->rxwaitq, &wait);
chan              796 drivers/net/wan/cosa.c 	while (!chan->rx_status) {
chan              801 drivers/net/wan/cosa.c 		if (signal_pending(current) && chan->rx_status == 0) {
chan              802 drivers/net/wan/cosa.c 			chan->rx_status = 1;
chan              803 drivers/net/wan/cosa.c 			remove_wait_queue(&chan->rxwaitq, &wait);
chan              806 drivers/net/wan/cosa.c 			mutex_unlock(&chan->rlock);
chan              810 drivers/net/wan/cosa.c 	remove_wait_queue(&chan->rxwaitq, &wait);
chan              812 drivers/net/wan/cosa.c 	kbuf = chan->rxdata;
chan              813 drivers/net/wan/cosa.c 	count = chan->rxsize;
chan              815 drivers/net/wan/cosa.c 	mutex_unlock(&chan->rlock);
chan              825 drivers/net/wan/cosa.c static char *chrdev_setup_rx(struct channel_data *chan, int size)
chan              828 drivers/net/wan/cosa.c 	chan->rxsize = size;
chan              829 drivers/net/wan/cosa.c 	return chan->rxdata;
chan              832 drivers/net/wan/cosa.c static int chrdev_rx_done(struct channel_data *chan)
chan              834 drivers/net/wan/cosa.c 	if (chan->rx_status) { /* Reader has died */
chan              835 drivers/net/wan/cosa.c 		kfree(chan->rxdata);
chan              836 drivers/net/wan/cosa.c 		up(&chan->wsem);
chan              838 drivers/net/wan/cosa.c 	chan->rx_status = 1;
chan              839 drivers/net/wan/cosa.c 	wake_up_interruptible(&chan->rxwaitq);
chan              848 drivers/net/wan/cosa.c 	struct channel_data *chan = file->private_data;
chan              849 drivers/net/wan/cosa.c 	struct cosa_data *cosa = chan->cosa;
chan              858 drivers/net/wan/cosa.c 	if (down_interruptible(&chan->wsem))
chan              867 drivers/net/wan/cosa.c 		up(&chan->wsem);
chan              871 drivers/net/wan/cosa.c 		up(&chan->wsem);
chan              875 drivers/net/wan/cosa.c 	chan->tx_status=0;
chan              876 drivers/net/wan/cosa.c 	cosa_start_tx(chan, kbuf, count);
chan              879 drivers/net/wan/cosa.c 	add_wait_queue(&chan->txwaitq, &wait);
chan              880 drivers/net/wan/cosa.c 	while (!chan->tx_status) {
chan              885 drivers/net/wan/cosa.c 		if (signal_pending(current) && chan->tx_status == 0) {
chan              886 drivers/net/wan/cosa.c 			chan->tx_status = 1;
chan              887 drivers/net/wan/cosa.c 			remove_wait_queue(&chan->txwaitq, &wait);
chan              889 drivers/net/wan/cosa.c 			chan->tx_status = 1;
chan              891 drivers/net/wan/cosa.c 			up(&chan->wsem);
chan              895 drivers/net/wan/cosa.c 	remove_wait_queue(&chan->txwaitq, &wait);
chan              897 drivers/net/wan/cosa.c 	up(&chan->wsem);
chan              903 drivers/net/wan/cosa.c static int chrdev_tx_done(struct channel_data *chan, int size)
chan              905 drivers/net/wan/cosa.c 	if (chan->tx_status) { /* Writer was interrupted */
chan              906 drivers/net/wan/cosa.c 		kfree(chan->txbuf);
chan              907 drivers/net/wan/cosa.c 		up(&chan->wsem);
chan              909 drivers/net/wan/cosa.c 	chan->tx_status = 1;
chan              910 drivers/net/wan/cosa.c 	wake_up_interruptible(&chan->txwaitq);
chan              923 drivers/net/wan/cosa.c 	struct channel_data *chan;
chan              941 drivers/net/wan/cosa.c 	chan = cosa->chan + n;
chan              943 drivers/net/wan/cosa.c 	file->private_data = chan;
chan              947 drivers/net/wan/cosa.c 	if (chan->usage < 0) { /* in netdev mode */
chan              953 drivers/net/wan/cosa.c 	chan->usage++;
chan              955 drivers/net/wan/cosa.c 	chan->tx_done = chrdev_tx_done;
chan              956 drivers/net/wan/cosa.c 	chan->setup_rx = chrdev_setup_rx;
chan              957 drivers/net/wan/cosa.c 	chan->rx_done = chrdev_rx_done;
chan             1177 drivers/net/wan/cosa.c 	struct channel_data *chan = dev_to_chan(dev);
chan             1178 drivers/net/wan/cosa.c 	rv = cosa_ioctl_common(chan->cosa, chan, cmd,
chan             1206 drivers/net/wan/cosa.c static void cosa_enable_rx(struct channel_data *chan)
chan             1208 drivers/net/wan/cosa.c 	struct cosa_data *cosa = chan->cosa;
chan             1210 drivers/net/wan/cosa.c 	if (!test_and_set_bit(chan->num, &cosa->rxbitmap))
chan             1214 drivers/net/wan/cosa.c static void cosa_disable_rx(struct channel_data *chan)
chan             1216 drivers/net/wan/cosa.c 	struct cosa_data *cosa = chan->cosa;
chan             1218 drivers/net/wan/cosa.c 	if (test_and_clear_bit(chan->num, &cosa->rxbitmap))
chan             1228 drivers/net/wan/cosa.c static int cosa_start_tx(struct channel_data *chan, char *buf, int len)
chan             1230 drivers/net/wan/cosa.c 	struct cosa_data *cosa = chan->cosa;
chan             1236 drivers/net/wan/cosa.c 		chan->cosa->num, chan->num, len);
chan             1242 drivers/net/wan/cosa.c 	chan->txbuf = buf;
chan             1243 drivers/net/wan/cosa.c 	chan->txsize = len;
chan             1245 drivers/net/wan/cosa.c 		chan->txsize = COSA_MTU;
chan             1249 drivers/net/wan/cosa.c 	set_bit(chan->num, &cosa->txbitmap);
chan             1359 drivers/net/wan/cosa.c static int cosa_dma_able(struct channel_data *chan, char *buf, int len)
chan             1368 drivers/net/wan/cosa.c 				chan->name);
chan             1699 drivers/net/wan/cosa.c 		cosa->txsize = cosa->chan[cosa->txchan].txsize;
chan             1700 drivers/net/wan/cosa.c 		if (cosa_dma_able(cosa->chan+cosa->txchan,
chan             1701 drivers/net/wan/cosa.c 			cosa->chan[cosa->txchan].txbuf, cosa->txsize)) {
chan             1702 drivers/net/wan/cosa.c 			cosa->txbuf = cosa->chan[cosa->txchan].txbuf;
chan             1704 drivers/net/wan/cosa.c 			memcpy(cosa->bouncebuf, cosa->chan[cosa->txchan].txbuf,
chan             1841 drivers/net/wan/cosa.c 	cosa->rxchan = cosa->chan + ((cosa->rxsize & 0xe000) >> 13);
chan             1890 drivers/net/wan/cosa.c 		struct channel_data *chan = cosa->chan+cosa->txchan;
chan             1891 drivers/net/wan/cosa.c 		if (chan->tx_done)
chan             1892 drivers/net/wan/cosa.c 			if (chan->tx_done(chan, cosa->txsize))
chan             1893 drivers/net/wan/cosa.c 				clear_bit(chan->num, &cosa->txbitmap);
chan               44 drivers/net/wan/hd64572.c #define get_msci(port)	  (port->chan ?   MSCI1_OFFSET :   MSCI0_OFFSET)
chan               45 drivers/net/wan/hd64572.c #define get_dmac_rx(port) (port->chan ? DMAC1RX_OFFSET : DMAC0RX_OFFSET)
chan               46 drivers/net/wan/hd64572.c #define get_dmac_tx(port) (port->chan ? DMAC1TX_OFFSET : DMAC0TX_OFFSET)
chan               66 drivers/net/wan/hd64572.c 		 (port->chan ? 0x08002200 : 0x00080022), IER0, port->card);
chan               72 drivers/net/wan/hd64572.c 		 (port->chan ? 0x00FF00FF : 0xFF00FF00), IER0, port->card);
chan               81 drivers/net/wan/hd64572.c 	return port->chan * (rx_buffs + tx_buffs) + transmit * rx_buffs + desc;
chan              152 drivers/net/wan/hd64572.c 	sca_out(0, DSR_RX(port->chan), card);
chan              153 drivers/net/wan/hd64572.c 	sca_out(0, DSR_TX(port->chan), card);
chan              156 drivers/net/wan/hd64572.c 	sca_out(DCR_ABORT, DCR_RX(port->chan), card);
chan              157 drivers/net/wan/hd64572.c 	sca_out(DCR_ABORT, DCR_TX(port->chan), card);
chan              167 drivers/net/wan/hd64572.c 	sca_out(DCR_CLEAR_EOF, DCR_RX(port->chan), card);
chan              168 drivers/net/wan/hd64572.c 	sca_out(DCR_CLEAR_EOF, DCR_TX(port->chan), card);
chan              172 drivers/net/wan/hd64572.c 	sca_out(0x14, DMR_RX(port->chan), card); /* Chain mode, Multi-frame */
chan              173 drivers/net/wan/hd64572.c 	sca_out(DIR_EOME, DIR_RX(port->chan), card); /* enable interrupts */
chan              174 drivers/net/wan/hd64572.c 	sca_out(DSR_DE, DSR_RX(port->chan), card); /* DMA enable */
chan              177 drivers/net/wan/hd64572.c 	sca_out(0x14, DMR_TX(port->chan), card); /* Chain mode, Multi-frame */
chan              178 drivers/net/wan/hd64572.c 	sca_out(DIR_EOME, DIR_TX(port->chan), card); /* enable interrupts */
chan              235 drivers/net/wan/hd64572.c 	u8 stat = sca_in(DSR_RX(port->chan), card); /* read DMA Status */
chan              240 drivers/net/wan/hd64572.c 		DSR_RX(port->chan), card);
chan              280 drivers/net/wan/hd64572.c 	sca_out(DSR_DE, DSR_RX(port->chan), card);
chan              295 drivers/net/wan/hd64572.c 	stat = sca_in(DSR_TX(port->chan), card); /* read DMA Status */
chan              299 drivers/net/wan/hd64572.c 		DSR_TX(port->chan), card);
chan              331 drivers/net/wan/hd64572.c 	if (isr0 & (port->chan ? 0x08000000 : 0x00080000))
chan              334 drivers/net/wan/hd64572.c 	if (isr0 & (port->chan ? 0x00002000 : 0x00000020))
chan              337 drivers/net/wan/hd64572.c 	if (isr0 & (port->chan ? 0x00000200 : 0x00000002))
chan              525 drivers/net/wan/hd64572.c 	       sca_in(DSR_RX(port->chan), card), port->rxin,
chan              526 drivers/net/wan/hd64572.c 	       sca_in(DSR_RX(port->chan), card) & DSR_DE ? "" : "in");
chan              535 drivers/net/wan/hd64572.c 	       sca_in(DSR_TX(port->chan), card), port->txin, port->txlast,
chan              536 drivers/net/wan/hd64572.c 	       sca_in(DSR_TX(port->chan), card) & DSR_DE ? "" : "in");
chan              591 drivers/net/wan/hd64572.c 	sca_out(DSR_DE, DSR_TX(port->chan), card); /* Enable TX DMA */
chan               46 drivers/net/wan/hd64572.h #define	M_REG(reg, chan)	(reg + 0x80*chan)		/* MSCI */
chan               47 drivers/net/wan/hd64572.h #define	DRX_REG(reg, chan)	(reg + 0x40*chan)		/* DMA Rx */
chan               48 drivers/net/wan/hd64572.h #define	DTX_REG(reg, chan)	(reg + 0x20*(2*chan + 1))	/* DMA Tx */
chan               49 drivers/net/wan/hd64572.h #define	TRX_REG(reg, chan)	(reg + 0x20*chan)		/* Timer Rx */
chan               50 drivers/net/wan/hd64572.h #define	TTX_REG(reg, chan)	(reg + 0x10*(2*chan + 1))	/* Timer Tx */
chan               51 drivers/net/wan/hd64572.h #define	ST_REG(reg, chan)	(reg + 0x80*chan)		/* Status Cnt */
chan               52 drivers/net/wan/hd64572.h #define IR0_DRX(val, chan)	((val)<<(8*(chan)))		/* Int DMA Rx */
chan               53 drivers/net/wan/hd64572.h #define IR0_DTX(val, chan)	((val)<<(4*(2*chan + 1)))	/* Int DMA Tx */
chan               54 drivers/net/wan/hd64572.h #define IR0_M(val, chan)	((val)<<(8*(chan)))		/* Int MSCI */
chan              126 drivers/net/wan/hd64572.h #define DSR_RX(chan)	(0x48 + 2*chan)	/* DMA Status Reg (Rx) */
chan              127 drivers/net/wan/hd64572.h #define DSR_TX(chan)	(0x49 + 2*chan)	/* DMA Status Reg (Tx) */
chan              128 drivers/net/wan/hd64572.h #define DIR_RX(chan)	(0x4c + 2*chan)	/* DMA Interrupt Enable Reg (Rx) */
chan              129 drivers/net/wan/hd64572.h #define DIR_TX(chan)	(0x4d + 2*chan)	/* DMA Interrupt Enable Reg (Tx) */
chan              130 drivers/net/wan/hd64572.h #define FCT_RX(chan)	(0x50 + 2*chan)	/* Frame End Interrupt Counter (Rx) */
chan              131 drivers/net/wan/hd64572.h #define FCT_TX(chan)	(0x51 + 2*chan)	/* Frame End Interrupt Counter (Tx) */
chan              132 drivers/net/wan/hd64572.h #define DMR_RX(chan)	(0x54 + 2*chan)	/* DMA Mode Reg (Rx) */
chan              133 drivers/net/wan/hd64572.h #define DMR_TX(chan)	(0x55 + 2*chan)	/* DMA Mode Reg (Tx) */
chan              134 drivers/net/wan/hd64572.h #define DCR_RX(chan)	(0x58 + 2*chan)	/* DMA Command Reg (Rx) */
chan              135 drivers/net/wan/hd64572.h #define DCR_TX(chan)	(0x59 + 2*chan)	/* DMA Command Reg (Tx) */
chan               90 drivers/net/wan/pc300too.c 	u8 chan;		/* physical port # - 0 or 1 */
chan              125 drivers/net/wan/pc300too.c 	sca_out(EXS_TES1, (port->chan ? MSCI1_OFFSET : MSCI0_OFFSET) + EXS,
chan              158 drivers/net/wan/pc300too.c 			       PC300_CHMEDIA_MASK(port->chan), init_ctrl);
chan              161 drivers/net/wan/pc300too.c 			       ~PC300_CHMEDIA_MASK(port->chan), init_ctrl);
chan              445 drivers/net/wan/pc300too.c 		port->chan = i;
chan              470 drivers/net/wan/pc300too.c 		netdev_info(dev, "PC300 channel %d\n", port->chan);
chan               76 drivers/net/wan/pci200syn.c 	u8 chan;		/* physical port # - 0 or 1 */
chan              123 drivers/net/wan/pci200syn.c 	sca_out(EXS_TES1, (port->chan ? MSCI1_OFFSET : MSCI0_OFFSET) + EXS,
chan              383 drivers/net/wan/pci200syn.c 		port->chan = i;
chan              403 drivers/net/wan/pci200syn.c 		netdev_info(dev, "PCI200SYN channel %d\n", port->chan);
chan               35 drivers/net/wan/sealevel.c 	struct z8530_channel *chan;
chan               87 drivers/net/wan/sealevel.c 			err = z8530_sync_dma_open(d, slvl->chan);
chan               90 drivers/net/wan/sealevel.c 			err = z8530_sync_open(d, slvl->chan);
chan              101 drivers/net/wan/sealevel.c 				z8530_sync_dma_close(d, slvl->chan);
chan              104 drivers/net/wan/sealevel.c 				z8530_sync_close(d, slvl->chan);
chan              110 drivers/net/wan/sealevel.c 	slvl->chan->rx_function = sealevel_input;
chan              128 drivers/net/wan/sealevel.c 	slvl->chan->rx_function = z8530_null_rx;
chan              135 drivers/net/wan/sealevel.c 			z8530_sync_dma_close(d, slvl->chan);
chan              138 drivers/net/wan/sealevel.c 			z8530_sync_close(d, slvl->chan);
chan              158 drivers/net/wan/sealevel.c 	return z8530_queue_xmit(dev_to_chan(d)->chan, skb);
chan              194 drivers/net/wan/sealevel.c 	sv->chan->netdevice = dev;
chan              222 drivers/net/wan/sealevel.c 	b->dev[0].chan = &b->board.chanA;
chan              225 drivers/net/wan/sealevel.c 	b->dev[1].chan = &b->board.chanB;
chan              318 drivers/net/wan/sealevel.c 	unregister_hdlc_device(b->dev[0].chan->netdevice);
chan              319 drivers/net/wan/sealevel.c 	free_netdev(b->dev[0].chan->netdevice);
chan              340 drivers/net/wan/sealevel.c 		struct net_device *d = b->dev[u].chan->netdevice;
chan              447 drivers/net/wan/z85230.c static void z8530_status(struct z8530_channel *chan)
chan              451 drivers/net/wan/z85230.c 	status = read_zsreg(chan, R0);
chan              452 drivers/net/wan/z85230.c 	altered = chan->status ^ status;
chan              454 drivers/net/wan/z85230.c 	chan->status = status;
chan              458 drivers/net/wan/z85230.c 		chan->netdevice->stats.tx_fifo_errors++;
chan              459 drivers/net/wan/z85230.c 		write_zsctrl(chan, ERR_RES);
chan              460 drivers/net/wan/z85230.c 		z8530_tx_done(chan);
chan              463 drivers/net/wan/z85230.c 	if (altered & chan->dcdcheck)
chan              465 drivers/net/wan/z85230.c 		if (status & chan->dcdcheck) {
chan              466 drivers/net/wan/z85230.c 			pr_info("%s: DCD raised\n", chan->dev->name);
chan              467 drivers/net/wan/z85230.c 			write_zsreg(chan, R3, chan->regs[3] | RxENABLE);
chan              468 drivers/net/wan/z85230.c 			if (chan->netdevice)
chan              469 drivers/net/wan/z85230.c 				netif_carrier_on(chan->netdevice);
chan              471 drivers/net/wan/z85230.c 			pr_info("%s: DCD lost\n", chan->dev->name);
chan              472 drivers/net/wan/z85230.c 			write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE);
chan              473 drivers/net/wan/z85230.c 			z8530_flush_fifo(chan);
chan              474 drivers/net/wan/z85230.c 			if (chan->netdevice)
chan              475 drivers/net/wan/z85230.c 				netif_carrier_off(chan->netdevice);
chan              479 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_EXT_INT);
chan              480 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_H_IUS);
chan              501 drivers/net/wan/z85230.c static void z8530_dma_rx(struct z8530_channel *chan)
chan              503 drivers/net/wan/z85230.c 	if(chan->rxdma_on)
chan              508 drivers/net/wan/z85230.c 		read_zsreg(chan, R7);
chan              509 drivers/net/wan/z85230.c 		read_zsreg(chan, R6);
chan              511 drivers/net/wan/z85230.c 		status=read_zsreg(chan, R1);
chan              515 drivers/net/wan/z85230.c 			z8530_rx_done(chan);	/* Fire up the next one */
chan              517 drivers/net/wan/z85230.c 		write_zsctrl(chan, ERR_RES);
chan              518 drivers/net/wan/z85230.c 		write_zsctrl(chan, RES_H_IUS);
chan              523 drivers/net/wan/z85230.c 		z8530_rx(chan);
chan              535 drivers/net/wan/z85230.c static void z8530_dma_tx(struct z8530_channel *chan)
chan              537 drivers/net/wan/z85230.c 	if(!chan->dma_tx)
chan              540 drivers/net/wan/z85230.c 		z8530_tx(chan);
chan              545 drivers/net/wan/z85230.c 	z8530_tx(chan);
chan              558 drivers/net/wan/z85230.c static void z8530_dma_status(struct z8530_channel *chan)
chan              562 drivers/net/wan/z85230.c 	status=read_zsreg(chan, R0);
chan              563 drivers/net/wan/z85230.c 	altered=chan->status^status;
chan              565 drivers/net/wan/z85230.c 	chan->status=status;
chan              568 drivers/net/wan/z85230.c 	if(chan->dma_tx)
chan              575 drivers/net/wan/z85230.c 			disable_dma(chan->txdma);
chan              576 drivers/net/wan/z85230.c 			clear_dma_ff(chan->txdma);	
chan              577 drivers/net/wan/z85230.c 			chan->txdma_on=0;
chan              579 drivers/net/wan/z85230.c 			z8530_tx_done(chan);
chan              583 drivers/net/wan/z85230.c 	if (altered & chan->dcdcheck)
chan              585 drivers/net/wan/z85230.c 		if (status & chan->dcdcheck) {
chan              586 drivers/net/wan/z85230.c 			pr_info("%s: DCD raised\n", chan->dev->name);
chan              587 drivers/net/wan/z85230.c 			write_zsreg(chan, R3, chan->regs[3] | RxENABLE);
chan              588 drivers/net/wan/z85230.c 			if (chan->netdevice)
chan              589 drivers/net/wan/z85230.c 				netif_carrier_on(chan->netdevice);
chan              591 drivers/net/wan/z85230.c 			pr_info("%s: DCD lost\n", chan->dev->name);
chan              592 drivers/net/wan/z85230.c 			write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE);
chan              593 drivers/net/wan/z85230.c 			z8530_flush_fifo(chan);
chan              594 drivers/net/wan/z85230.c 			if (chan->netdevice)
chan              595 drivers/net/wan/z85230.c 				netif_carrier_off(chan->netdevice);
chan              599 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_EXT_INT);
chan              600 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_H_IUS);
chan              668 drivers/net/wan/z85230.c static void z8530_status_clear(struct z8530_channel *chan)
chan              670 drivers/net/wan/z85230.c 	u8 status=read_zsreg(chan, R0);
chan              672 drivers/net/wan/z85230.c 		write_zsctrl(chan, ERR_RES);
chan              673 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_EXT_INT);
chan              674 drivers/net/wan/z85230.c 	write_zsctrl(chan, RES_H_IUS);
chan              621 drivers/net/wireless/admtek/adm8211.c static int adm8211_rf_set_channel(struct ieee80211_hw *dev, unsigned int chan)
chan              632 drivers/net/wireless/admtek/adm8211.c 		priv->eeprom->antenna_power[chan - 1] : priv->ant_power;
chan              634 drivers/net/wireless/admtek/adm8211.c 		priv->eeprom->tx_power[chan - 1] : priv->tx_power;
chan              636 drivers/net/wireless/admtek/adm8211.c 		priv->eeprom->lpf_cutoff[chan - 1] : priv->lpf_cutoff;
chan              638 drivers/net/wireless/admtek/adm8211.c 		priv->eeprom->lnags_threshold[chan - 1] : priv->lnags_threshold;
chan              651 drivers/net/wireless/admtek/adm8211.c 			adm8211_rfmd2958_reg5[chan - 1]);
chan              653 drivers/net/wireless/admtek/adm8211.c 			adm8211_rfmd2958_reg6[chan - 1]);
chan              664 drivers/net/wireless/admtek/adm8211.c 					      (chan == 14 ?
chan              665 drivers/net/wireless/admtek/adm8211.c 					       2110 : (2033 + (chan * 5))));
chan              673 drivers/net/wireless/admtek/adm8211.c 			(chan == 14 ? 0x054 : (0x7 + (chan * 5))));
chan              678 drivers/net/wireless/admtek/adm8211.c 			(chan == 14 ? 0x229B4 : (0x22967 + (chan * 5))));
chan              696 drivers/net/wireless/admtek/adm8211.c 		if (chan != 14)
chan              747 drivers/net/wireless/admtek/adm8211.c 	reg |= chan;
chan             1303 drivers/net/wireless/admtek/adm8211.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan              460 drivers/net/wireless/ath/ar5523/ar5523.c 	reset.freq = cpu_to_be32(conf->chandef.chan->center_freq);
chan              467 drivers/net/wireless/ath/ar5523/ar5523.c 		   conf->chandef.chan->center_freq);
chan              597 drivers/net/wireless/ath/ar5523/ar5523.c 	rx_status->band = hw->conf.chandef.chan->band;
chan             1153 drivers/net/wireless/ath/ar5523/ar5523.c 	band = ar->hw->wiphy->bands[ar->hw->conf.chandef.chan->band];
chan             1159 drivers/net/wireless/ath/ar5523/ar5523.c 	sta_rate_set = sta->supp_rates[ar->hw->conf.chandef.chan->band];
chan             1197 drivers/net/wireless/ath/ar5523/ar5523.c 		sta_rate_set = sta->supp_rates[ar->hw->conf.chandef.chan->band];
chan             1201 drivers/net/wireless/ath/ar5523/ar5523.c 	band = ar->hw->wiphy->bands[ar->hw->conf.chandef.chan->band];
chan             1080 drivers/net/wireless/ath/ath10k/htt_rx.c 	return def.chan;
chan             1094 drivers/net/wireless/ath/ath10k/htt_rx.c 			return def.chan;
chan             1119 drivers/net/wireless/ath/ath10k/htt_rx.c 	return def.chan;
chan             3513 drivers/net/wireless/ath/ath10k/htt_rx.c 		if (conf && conf->def.chan->band == NL80211_BAND_5GHZ)
chan              554 drivers/net/wireless/ath/ath10k/mac.c 	switch (chandef->chan->band) {
chan              558 drivers/net/wireless/ath/ath10k/mac.c 			if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
chan             1026 drivers/net/wireless/ath/ath10k/mac.c 	channel = chandef->chan;
chan             1481 drivers/net/wireless/ath/ath10k/mac.c 	arg.channel.freq = chandef->chan->center_freq;
chan             1487 drivers/net/wireless/ath/ath10k/mac.c 	arg.channel.max_power = chandef->chan->max_power * 2;
chan             1488 drivers/net/wireless/ath/ath10k/mac.c 	arg.channel.max_reg_power = chandef->chan->max_reg_power * 2;
chan             1489 drivers/net/wireless/ath/ath10k/mac.c 	arg.channel.max_antenna_gain = chandef->chan->max_antenna_gain * 2;
chan             1498 drivers/net/wireless/ath/ath10k/mac.c 			!!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
chan             2183 drivers/net/wireless/ath/ath10k/mac.c 	bss = cfg80211_get_bss(ar->hw->wiphy, def.chan, info->bssid, NULL, 0,
chan             2239 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             2304 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             2526 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             2534 drivers/net/wireless/ath/ath10k/mac.c 	if (def.chan->band == NL80211_BAND_2GHZ)
chan             2679 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             5837 drivers/net/wireless/ath/ath10k/mac.c 		band = def.chan->band;
chan             5883 drivers/net/wireless/ath/ath10k/mac.c 		sband = ar->hw->wiphy->bands[def.chan->band];
chan             6306 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             6890 drivers/net/wireless/ath/ath10k/mac.c 				    struct ieee80211_channel *chan,
chan             6916 drivers/net/wireless/ath/ath10k/mac.c 		ar->scan.roc_freq = chan->center_freq;
chan             6938 drivers/net/wireless/ath/ath10k/mac.c 	arg.channels[0] = chan->center_freq;
chan             7493 drivers/net/wireless/ath/ath10k/mac.c 	band = def.chan->band;
chan             7760 drivers/net/wireless/ath/ath10k/mac.c 		ar->rx_channel = def->chan;
chan             7768 drivers/net/wireless/ath/ath10k/mac.c 		ar->rx_channel = ctx->def.chan;
chan             7798 drivers/net/wireless/ath/ath10k/mac.c 			   vifs[i].old_ctx->def.chan->center_freq,
chan             7799 drivers/net/wireless/ath/ath10k/mac.c 			   vifs[i].new_ctx->def.chan->center_freq,
chan             7871 drivers/net/wireless/ath/ath10k/mac.c 		   ctx->def.chan->center_freq, ctx->def.width, ctx);
chan             7895 drivers/net/wireless/ath/ath10k/mac.c 		   ctx->def.chan->center_freq, ctx->def.width, ctx);
chan             7960 drivers/net/wireless/ath/ath10k/mac.c 		   ctx->def.chan->center_freq, ctx->def.width, ctx, changed);
chan             8029 drivers/net/wireless/ath/ath10k/mac.c 			    ctx->def.chan->center_freq, ret);
chan              188 drivers/net/wireless/ath/ath10k/wmi-ops.h 						const struct wmi_channel_arg *chan);
chan             1427 drivers/net/wireless/ath/ath10k/wmi-ops.h 			    const struct wmi_channel_arg *chan)
chan             1434 drivers/net/wireless/ath/ath10k/wmi-ops.h 	skb = ar->wmi.ops->gen_tdls_peer_update(ar, arg, cap, chan);
chan             3329 drivers/net/wireless/ath/ath10k/wmi-tlv.c 	struct wmi_channel *chan;
chan             3339 drivers/net/wireless/ath/ath10k/wmi-tlv.c 	      sizeof(*tlv) + cap->peer_chan_len * sizeof(*chan);
chan             3384 drivers/net/wireless/ath/ath10k/wmi-tlv.c 	tlv->len = __cpu_to_le16(cap->peer_chan_len * sizeof(*chan));
chan             3391 drivers/net/wireless/ath/ath10k/wmi-tlv.c 		tlv->len = __cpu_to_le16(sizeof(*chan));
chan             3392 drivers/net/wireless/ath/ath10k/wmi-tlv.c 		chan = (void *)tlv->value;
chan             3393 drivers/net/wireless/ath/ath10k/wmi-tlv.c 		ath10k_wmi_put_wmi_channel(chan, &chan_arg[i]);
chan             3396 drivers/net/wireless/ath/ath10k/wmi-tlv.c 		ptr += sizeof(*chan);
chan             7092 drivers/net/wireless/ath/ath10k/wmi.c 	ath10k_wmi_put_wmi_channel(&cmd->chan, &arg->channel);
chan             7098 drivers/net/wireless/ath/ath10k/wmi.c 		   cmd->chan.flags, arg->channel.max_power);
chan             8829 drivers/net/wireless/ath/ath10k/wmi.c 	struct wmi_channel *chan;
chan             8838 drivers/net/wireless/ath/ath10k/wmi.c 	len = sizeof(*cmd) + chan_len * sizeof(*chan);
chan             8871 drivers/net/wireless/ath/ath10k/wmi.c 		chan = (struct wmi_channel *)&peer_cap->peer_chan_list[i];
chan             8872 drivers/net/wireless/ath/ath10k/wmi.c 		ath10k_wmi_put_wmi_channel(chan, &chan_arg[i]);
chan             4257 drivers/net/wireless/ath/ath10k/wmi.h 	struct wmi_channel chan;
chan             4881 drivers/net/wireless/ath/ath10k/wmi.h 	struct wmi_channel chan;
chan             5791 drivers/net/wireless/ath/ath10k/wmi.h 	struct wmi_channel chan;
chan               97 drivers/net/wireless/ath/ath5k/base.c static int ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan,
chan              271 drivers/net/wireless/ath/ath5k/base.c static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
chan              277 drivers/net/wireless/ath/ath5k/base.c static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
chan              279 drivers/net/wireless/ath/ath5k/base.c 	if (band == NL80211_BAND_2GHZ && chan <= 14)
chan              283 drivers/net/wireless/ath/ath5k/base.c 		(((chan & 3) == 0 && chan >= 36 && chan <= 64) ||
chan              285 drivers/net/wireless/ath/ath5k/base.c 		((chan & 3) == 0 && chan >= 100 && chan <= 140) ||
chan              287 drivers/net/wireless/ath/ath5k/base.c 		((chan & 3) == 1 && chan >= 149 && chan <= 165) ||
chan              289 drivers/net/wireless/ath/ath5k/base.c 		(chan == 8 || chan == 12 || chan == 16) ||
chan              291 drivers/net/wireless/ath/ath5k/base.c 		(chan == 184 || chan == 188 || chan == 192 || chan == 196));
chan              451 drivers/net/wireless/ath/ath5k/base.c 		  ah->curchan->center_freq, chandef->chan->center_freq);
chan              475 drivers/net/wireless/ath/ath5k/base.c 	return ath5k_reset(ah, chandef->chan, true);
chan             2746 drivers/net/wireless/ath/ath5k/base.c 	ah->curchan = ah->hw->conf.chandef.chan;
chan             2857 drivers/net/wireless/ath/ath5k/base.c ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan,
chan             2862 drivers/net/wireless/ath/ath5k/base.c 	bool fast = chan && modparam_fastchanswitch ? 1 : 0;
chan             2902 drivers/net/wireless/ath/ath5k/base.c 	if (chan)
chan             2903 drivers/net/wireless/ath/ath5k/base.c 		ah->curchan = chan;
chan              671 drivers/net/wireless/ath/ath5k/mac80211-ops.c 	survey->channel = conf->chandef.chan;
chan              682 drivers/net/wireless/ath/ath6kl/cfg80211.c 			 struct ieee80211_channel *chan,
chan              700 drivers/net/wireless/ath/ath6kl/cfg80211.c 	bss = cfg80211_get_bss(ar->wiphy, chan, bssid,
chan              719 drivers/net/wireless/ath/ath6kl/cfg80211.c 		bss = cfg80211_inform_bss(ar->wiphy, chan,
chan              742 drivers/net/wireless/ath/ath6kl/cfg80211.c 	struct ieee80211_channel *chan;
chan              783 drivers/net/wireless/ath/ath6kl/cfg80211.c 	chan = ieee80211_get_channel(ar->wiphy, (int) channel);
chan              785 drivers/net/wireless/ath/ath6kl/cfg80211.c 	bss = ath6kl_add_bss_if_needed(vif, nw_type, bssid, chan,
chan              795 drivers/net/wireless/ath/ath6kl/cfg80211.c 		cfg80211_ibss_joined(vif->ndev, bssid, chan, GFP_KERNEL);
chan             1633 drivers/net/wireless/ath/ath6kl/cfg80211.c 	if (ibss_param->chandef.chan)
chan             1634 drivers/net/wireless/ath/ath6kl/cfg80211.c 		vif->ch_hint = ibss_param->chandef.chan->center_freq;
chan             2894 drivers/net/wireless/ath/ath6kl/cfg80211.c 	p.ch = cpu_to_le16(info->chandef.chan->center_freq);
chan             2925 drivers/net/wireless/ath/ath6kl/cfg80211.c 	if (ath6kl_set_htcap(vif, info->chandef.chan->band,
chan             3026 drivers/net/wireless/ath/ath6kl/cfg80211.c 				    struct ieee80211_channel *chan,
chan             3044 drivers/net/wireless/ath/ath6kl/cfg80211.c 					     chan->center_freq, duration);
chan             3188 drivers/net/wireless/ath/ath6kl/cfg80211.c 	struct ieee80211_channel *chan = params->chan;
chan             3201 drivers/net/wireless/ath/ath6kl/cfg80211.c 	if (chan)
chan             3202 drivers/net/wireless/ath/ath6kl/cfg80211.c 		freq = chan->center_freq;
chan              509 drivers/net/wireless/ath/ath6kl/wmi.c 	struct ieee80211_channel *chan;
chan              521 drivers/net/wireless/ath/ath6kl/wmi.c 	chan = ieee80211_get_channel(ar->wiphy, freq);
chan              522 drivers/net/wireless/ath/ath6kl/wmi.c 	if (!chan) {
chan              529 drivers/net/wireless/ath/ath6kl/wmi.c 	cfg80211_ready_on_channel(&vif->wdev, id, chan,
chan              542 drivers/net/wireless/ath/ath6kl/wmi.c 	struct ieee80211_channel *chan;
chan              555 drivers/net/wireless/ath/ath6kl/wmi.c 	chan = ieee80211_get_channel(ar->wiphy, freq);
chan              556 drivers/net/wireless/ath/ath6kl/wmi.c 	if (!chan) {
chan              568 drivers/net/wireless/ath/ath6kl/wmi.c 	cfg80211_remain_on_channel_expired(&vif->wdev, id, chan, GFP_ATOMIC);
chan              312 drivers/net/wireless/ath/ath9k/ani.c 	struct ath9k_channel *chan = ah->curchan;
chan              316 drivers/net/wireless/ath/ath9k/ani.c 	if (!chan)
chan              343 drivers/net/wireless/ath/ath9k/ani.c 				chan->channel,
chan              358 drivers/net/wireless/ath/ath9k/ani.c 			chan->channel,
chan              401 drivers/net/wireless/ath/ath9k/ani.c void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
chan              181 drivers/net/wireless/ath/ath9k/ar5008_phy.c static int ar5008_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
chan              191 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              248 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ah->curchan = chan;
chan              254 drivers/net/wireless/ath/ath9k/ar5008_phy.c 			  struct ath9k_channel *chan, int bin)
chan              413 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				    struct ath9k_channel *chan)
chan              424 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	bool is2GHz = IS_CHAN_2GHZ(chan);
chan              430 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		cur_bb_spur = cur_bb_spur - (chan->channel * 10);
chan              460 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	denominator = IS_CHAN_2GHZ(chan) ? 440 : 400;
chan              468 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ar5008_hw_cmn_spur_mitigate(ah, chan, bin);
chan              505 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				  struct ath9k_channel *chan,
chan              530 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		if (IS_CHAN_2GHZ(chan)) {
chan              559 drivers/net/wireless/ath/ath9k/ar5008_phy.c 			      struct ath9k_channel *chan)
chan              567 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ath9k_hw_synth_delay(ah, chan, synthDelay);
chan              616 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				   struct ath9k_channel *chan)
chan              669 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				       struct ath9k_channel *chan)
chan              681 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_HT40(chan)) {
chan              684 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		if (IS_CHAN_HT40PLUS(chan))
chan              693 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ath9k_hw_set11nmac2040(ah, chan);
chan              703 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				 struct ath9k_channel *chan)
chan              709 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_5GHZ(chan)) {
chan              711 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
chan              714 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;
chan              726 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		ah->eep_ops->set_addac(ah, chan);
chan              787 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan              791 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ar5008_hw_override_ini(ah, chan);
chan              792 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ar5008_hw_set_channel_regs(ah, chan);
chan              795 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ath9k_hw_apply_txpower(ah, chan, false);
chan              798 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
chan              806 drivers/net/wireless/ath/ath9k/ar5008_phy.c static void ar5008_hw_set_rfmode(struct ath_hw *ah, struct ath9k_channel *chan)
chan              810 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (chan == NULL)
chan              813 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_2GHZ(chan))
chan              819 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		rfMode |= (IS_CHAN_5GHZ(chan)) ?
chan              822 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan              834 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				      struct ath9k_channel *chan)
chan              840 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_HALF_RATE(chan))
chan              842 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	else if (IS_CHAN_QUARTER_RATE(chan))
chan              845 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              894 drivers/net/wireless/ath/ath9k/ar5008_phy.c 					 struct ath9k_channel *chan)
chan              900 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (chan && IS_CHAN_HALF_RATE(chan))
chan              902 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	else if (chan && IS_CHAN_QUARTER_RATE(chan))
chan              905 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (chan && IS_CHAN_5GHZ(chan))
chan              914 drivers/net/wireless/ath/ath9k/ar5008_phy.c 					 struct ath9k_channel *chan)
chan              920 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (chan && IS_CHAN_HALF_RATE(chan))
chan              922 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	else if (chan && IS_CHAN_QUARTER_RATE(chan))
chan              925 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (chan && IS_CHAN_5GHZ(chan))
chan              938 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	struct ath9k_channel *chan = ah->curchan;
chan             1012 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				chan->channel,
chan             1036 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				chan->channel,
chan             1044 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				chan->channel,
chan             1071 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				chan->channel,
chan             1079 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				chan->channel,
chan             1152 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	struct ath9k_channel *chan = ah->curchan;
chan             1163 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		chan->channel);
chan             1297 drivers/net/wireless/ath/ath9k/ar5008_phy.c 				 struct ath9k_channel *chan, int ht40_delta)
chan             1299 drivers/net/wireless/ath/ath9k/ar5008_phy.c 	if (IS_CHAN_5GHZ(chan)) {
chan             1302 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		if (IS_CHAN_HT20(chan) || IS_CHAN_HT40(chan)) {
chan             1306 drivers/net/wireless/ath/ath9k/ar5008_phy.c 						  IS_CHAN_HT40(chan),
chan             1313 drivers/net/wireless/ath/ath9k/ar5008_phy.c 		if (IS_CHAN_HT20(chan) || IS_CHAN_HT40(chan)) {
chan             1317 drivers/net/wireless/ath/ath9k/ar5008_phy.c 						  IS_CHAN_HT40(chan),
chan               30 drivers/net/wireless/ath/ath9k/ar9002_calib.c 				struct ath9k_channel *chan,
chan               41 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (!((IS_CHAN_2GHZ(chan) || IS_CHAN_A_FAST_CLOCK(ah, chan)) &&
chan               42 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		      IS_CHAN_HT20(chan)))
chan              659 drivers/net/wireless/ath/ath9k/ar9002_calib.c static int ar9002_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
chan              675 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (!ar9002_hw_per_calibration(ah, chan, rxchainmask, currCal))
chan              691 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (ath9k_hw_getnf(ah, chan)) {
chan              715 drivers/net/wireless/ath/ath9k/ar9002_calib.c static bool ar9285_hw_cl_cal(struct ath_hw *ah, struct ath9k_channel *chan)
chan              720 drivers/net/wireless/ath/ath9k/ar9002_calib.c 	if (IS_CHAN_HT20(chan)) {
chan              757 drivers/net/wireless/ath/ath9k/ar9002_calib.c static bool ar9285_hw_clc(struct ath_hw *ah, struct ath9k_channel *chan)
chan              769 drivers/net/wireless/ath/ath9k/ar9002_calib.c 	if (!(ar9285_hw_cl_cal(ah, chan)))
chan              807 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		retv = ar9285_hw_cl_cal(ah, chan);
chan              813 drivers/net/wireless/ath/ath9k/ar9002_calib.c static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
chan              818 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (!ar9285_hw_cl_cal(ah, chan))
chan              821 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (!ar9285_hw_clc(ah, chan))
chan              858 drivers/net/wireless/ath/ath9k/ar9002_calib.c 	ath9k_hw_loadnf(ah, chan);
chan              876 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (ar9002_hw_is_cal_supported(ah, chan, ADC_GAIN_CAL)) {
chan              883 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (ar9002_hw_is_cal_supported(ah, chan, ADC_DC_CAL)) {
chan              890 drivers/net/wireless/ath/ath9k/ar9002_calib.c 		if (ar9002_hw_is_cal_supported(ah, chan, IQ_MISMATCH_CAL)) {
chan              426 drivers/net/wireless/ath/ath9k/ar9002_hw.c void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan)
chan              431 drivers/net/wireless/ath/ath9k/ar9002_hw.c 	if (IS_CHAN_5GHZ(chan))
chan              432 drivers/net/wireless/ath/ath9k/ar9002_hw.c 		modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
chan              434 drivers/net/wireless/ath/ath9k/ar9002_hw.c 		modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;
chan               66 drivers/net/wireless/ath/ath9k/ar9002_phy.c static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
chan               73 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              114 drivers/net/wireless/ath/ath9k/ar9002_phy.c 			if (IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))
chan              155 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	ah->curchan = chan;
chan              169 drivers/net/wireless/ath/ath9k/ar9002_phy.c 				    struct ath9k_channel *chan)
chan              183 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	bool is2GHz = IS_CHAN_2GHZ(chan);
chan              185 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              201 drivers/net/wireless/ath/ath9k/ar9002_phy.c 		if (IS_CHAN_HT40(chan)) {
chan              242 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	if (IS_CHAN_HT40(chan)) {
chan              255 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	if (IS_CHAN_HT40(chan))
chan              264 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	denominator = IS_CHAN_2GHZ(chan) ? 44 : 40;
chan              275 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	ar5008_hw_cmn_spur_mitigate(ah, chan, bin);
chan              305 drivers/net/wireless/ath/ath9k/ar9002_phy.c 					 struct ath9k_channel *chan)
chan              311 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	if (chan && IS_CHAN_5GHZ(chan) && !IS_CHAN_A_FAST_CLOCK(ah, chan)) {
chan              323 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	if (chan && IS_CHAN_HALF_RATE(chan))
chan              325 drivers/net/wireless/ath/ath9k/ar9002_phy.c 	else if (chan && IS_CHAN_QUARTER_RATE(chan))
chan              123 drivers/net/wireless/ath/ath9k/ar9003_calib.c static int ar9003_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
chan              142 drivers/net/wireless/ath/ath9k/ar9003_calib.c 		iscaldone = ar9003_hw_per_calibration(ah, chan,
chan              158 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if (longcal && ath9k_hw_getnf(ah, chan)) {
chan             1304 drivers/net/wireless/ath/ath9k/ar9003_calib.c 					       struct ath9k_channel *chan,
chan             1316 drivers/net/wireless/ath/ath9k/ar9003_calib.c 		ar9003_hw_manual_peak_cal(ah, i, IS_CHAN_2GHZ(chan));
chan             1323 drivers/net/wireless/ath/ath9k/ar9003_calib.c 		if (IS_CHAN_2GHZ(chan)){
chan             1397 drivers/net/wireless/ath/ath9k/ar9003_calib.c 				     struct ath9k_channel *chan)
chan             1414 drivers/net/wireless/ath/ath9k/ar9003_calib.c 		if (!ar9003_hw_rtt_restore(ah, chan))
chan             1454 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if ((IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan)) ||
chan             1478 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if (ath9k_hw_mci_is_enabled(ah) && IS_CHAN_2GHZ(chan) && run_agc_cal)
chan             1501 drivers/net/wireless/ath/ath9k/ar9003_calib.c 		ar9003_hw_do_pcoem_manual_peak_cal(ah, chan, run_rtt_cal);
chan             1509 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if (ath9k_hw_mci_is_enabled(ah) && IS_CHAN_2GHZ(chan) && run_agc_cal)
chan             1584 drivers/net/wireless/ath/ath9k/ar9003_calib.c 				   struct ath9k_channel *chan)
chan             1599 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if (IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))
chan             1634 drivers/net/wireless/ath/ath9k/ar9003_calib.c 	if (AR_SREV_9550(ah) && IS_CHAN_2GHZ(chan)) {
chan             1646 drivers/net/wireless/ath/ath9k/ar9003_calib.c 						  IS_CHAN_2GHZ(chan));
chan             3838 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 				     struct ath9k_channel *chan)
chan             3845 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (IS_CHAN_2GHZ(chan))
chan             3854 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 			value = ar9003_hw_power_interpolate((s32) chan->channel,
chan             3866 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					    struct ath9k_channel *chan)
chan             3873 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (IS_CHAN_2GHZ(chan))
chan             3882 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 			value = ar9003_hw_power_interpolate((s32) chan->channel,
chan             3892 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
chan             3902 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		value = ar9003_hw_atten_chain_get(ah, 1, chan);
chan             3906 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		value = ar9003_hw_atten_chain_get_margin(ah, 1, chan);
chan             3915 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 			value = ar9003_hw_atten_chain_get(ah, i, chan);
chan             3924 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 				value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
chan             4235 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					     struct ath9k_channel *chan)
chan             4237 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	bool is2ghz = IS_CHAN_2GHZ(chan);
chan             4243 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_atten_apply(ah, chan);
chan             4244 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_quick_drop_apply(ah, chan->channel);
chan             4255 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 				      struct ath9k_channel *chan)
chan             4455 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					  struct ath9k_channel *chan,
chan             4461 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	if (IS_CHAN_2GHZ(chan)) {
chan             4724 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					      struct ath9k_channel *chan,
chan             4727 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	bool is2GHz = IS_CHAN_2GHZ(chan);
chan             4730 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	u16 freq = chan->channel;
chan             4738 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	if (IS_CHAN_HT40(chan))
chan             5229 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					       struct ath9k_channel *chan,
chan             5253 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	bool is2ghz = IS_CHAN_2GHZ(chan);
chan             5255 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan             5266 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (IS_CHAN_HT40(chan))
chan             5275 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (IS_CHAN_HT40(chan))
chan             5317 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 				chan->channel);
chan             5418 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 				     struct ath9k_channel *chan,
chan             5426 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	if (IS_CHAN_HT40(chan))
chan             5431 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	if (IS_CHAN_2GHZ(chan)) {
chan             5434 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 			if (IS_CHAN_HT40(chan))
chan             5445 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					struct ath9k_channel *chan, u16 cfgCtl,
chan             5464 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_get_target_power_eeprom(ah, chan, targetPowerValT2);
chan             5467 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (IS_CHAN_2GHZ(chan))
chan             5480 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		paprd_scale_factor = ar9003_get_paprd_scale_factor(ah, chan);
chan             5481 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		min_pwridx = IS_CHAN_HT40(chan) ? ALL_TARGET_HT40_0_8_16 :
chan             5502 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_set_power_per_rate_table(ah, chan,
chan             5541 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_calibration_apply(ah, chan->channel);
chan             5542 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_paprd_set_txpower(ah, chan, targetPowerValT2);
chan             5544 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	ar9003_hw_selfgen_tpc_txpower(ah, chan, targetPowerValT2);
chan             5550 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		ar9003_hw_init_rate_txpower(ah, targetPowerValT2_tpc, chan);
chan             5595 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 					   struct ath9k_channel *chan)
chan             5599 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 	if (IS_CHAN_2GHZ(chan))
chan             5603 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		if (chan->channel >= 5700)
chan             5606 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c 		else if (chan->channel >= 5400)
chan              367 drivers/net/wireless/ath/ath9k/ar9003_eeprom.h 					   struct ath9k_channel *chan);
chan              692 drivers/net/wireless/ath/ath9k/ar9003_mci.c bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan)
chan              698 drivers/net/wireless/ath/ath9k/ar9003_mci.c 	ar9003_mci_2g5g_changed(ah, IS_CHAN_2GHZ(chan));
chan              732 drivers/net/wireless/ath/ath9k/ar9003_mci.c int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
chan              740 drivers/net/wireless/ath/ath9k/ar9003_mci.c 	if (!IS_CHAN_2GHZ(chan) || (mci_hw->bt_state != MCI_BT_SLEEP))
chan              761 drivers/net/wireless/ath/ath9k/ar9003_mci.c 	if (IS_CHAN_2GHZ(chan))
chan              775 drivers/net/wireless/ath/ath9k/ar9003_mci.c 	if (!ath9k_hw_init_cal(ah, chan))
chan              330 drivers/net/wireless/ath/ath9k/ar9003_mci.h bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan);
chan              331 drivers/net/wireless/ath/ath9k/ar9003_mci.h int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
chan              361 drivers/net/wireless/ath/ath9k/ar9003_mci.h static inline bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan)
chan              365 drivers/net/wireless/ath/ath9k/ar9003_mci.h static inline int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
chan               23 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	struct ath9k_channel *chan = ah->curchan;
chan               39 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	if (IS_CHAN_5GHZ(chan)) {
chan               40 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 		if (chan->channel >= UPPER_5G_SUB_BAND_START) {
chan               44 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 		} else if (chan->channel >= MID_5G_SUB_BAND_START) {
chan               57 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 		ath9k_hw_apply_txpower(ah, chan, false);
chan               73 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	struct ath9k_channel *chan = ah->curchan;
chan               76 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	scale = ar9003_get_paprd_scale_factor(ah, chan);
chan              101 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	struct ath9k_channel *chan = ah->curchan;
chan              104 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	scale = ar9003_get_paprd_scale_factor(ah, chan);
chan              106 drivers/net/wireless/ath/ath9k/ar9003_paprd.c 	if (IS_CHAN_HT40(chan))
chan              149 drivers/net/wireless/ath/ath9k/ar9003_phy.c static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
chan              156 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              223 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ah->curchan = chan;
chan              239 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					    struct ath9k_channel *chan)
chan              245 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	u8 *spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah, IS_CHAN_2GHZ(chan));
chan              257 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT40(chan)) {
chan              261 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				synth_freq = chan->channel + 10;
chan              263 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				synth_freq = chan->channel - 10;
chan              266 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			synth_freq = chan->channel;
chan              271 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		synth_freq = chan->channel;
chan              282 drivers/net/wireless/ath/ath9k/ar9003_phy.c 							 IS_CHAN_2GHZ(chan));
chan              470 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				     struct ath9k_channel *chan,
chan              479 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HT40(chan)) {
chan              521 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					 struct ath9k_channel *chan)
chan              531 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_5GHZ(chan)) {
chan              543 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HT40(chan)) {
chan              547 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			synth_freq = chan->channel - 10;
chan              549 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			synth_freq = chan->channel + 10;
chan              552 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		synth_freq = chan->channel;
chan              561 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			ar9003_hw_spur_ofdm_work(ah, chan, freq_offset,
chan              578 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				    struct ath9k_channel *chan)
chan              581 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		ar9003_hw_spur_mitigate_mrc_cck(ah, chan);
chan              582 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ar9003_hw_spur_mitigate_ofdm(ah, chan);
chan              586 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					     struct ath9k_channel *chan)
chan              592 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan && IS_CHAN_HALF_RATE(chan))
chan              594 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	else if (chan && IS_CHAN_QUARTER_RATE(chan))
chan              603 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					 struct ath9k_channel *chan)
chan              609 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan && IS_CHAN_HALF_RATE(chan))
chan              611 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	else if (chan && IS_CHAN_QUARTER_RATE(chan))
chan              620 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				       struct ath9k_channel *chan)
chan              635 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HT40(chan)) {
chan              638 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT40PLUS(chan))
chan              651 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ath9k_hw_set11nmac2040(ah, chan);
chan              660 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			      struct ath9k_channel *chan)
chan              673 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ath9k_hw_synth_delay(ah, chan, synthDelay);
chan              779 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					    struct ath9k_channel *chan)
chan              783 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_2GHZ(chan)) {
chan              784 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT40(chan))
chan              790 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan->channel <= 5350)
chan              792 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	else if ((chan->channel > 5350) && (chan->channel <= 5600))
chan              797 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HT40(chan))
chan              804 drivers/net/wireless/ath/ath9k/ar9003_phy.c 					    struct ath9k_channel *chan)
chan              806 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_2GHZ(chan)) {
chan              807 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT40(chan))
chan              865 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				 struct ath9k_channel *chan)
chan              870 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_5GHZ(chan))
chan              871 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
chan              873 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;
chan              931 drivers/net/wireless/ath/ath9k/ar9003_phy.c 			modes_txgain_index = ar9550_hw_get_modes_txgain_index(ah, chan);
chan              935 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				ar9561_hw_get_modes_txgain_index(ah, chan);
chan              950 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan              962 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan->channel == 2484) {
chan              972 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ar9003_hw_set_channel_regs(ah, chan);
chan              974 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ath9k_hw_apply_txpower(ah, chan, false);
chan              980 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				 struct ath9k_channel *chan)
chan              984 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan == NULL)
chan              987 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_2GHZ(chan))
chan              992 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan              995 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))
chan             1008 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				      struct ath9k_channel *chan)
chan             1018 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_HALF_RATE(chan))
chan             1020 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	else if (IS_CHAN_QUARTER_RATE(chan))
chan             1027 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan             1078 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	struct ath9k_channel *chan = ah->curchan;
chan             1163 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1218 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1226 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1282 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1290 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1320 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				chan->channel,
chan             1405 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	struct ath9k_channel *chan = ah->curchan;
chan             1416 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		chan->channel);
chan             1677 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				      struct ath9k_channel *chan,
chan             1683 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_5GHZ(chan))
chan             1684 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
chan             1686 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;
chan             1722 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan             1731 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (chan->channel == 2484)
chan             1738 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	ar9003_hw_set_rfmode(ah, chan);
chan             1896 drivers/net/wireless/ath/ath9k/ar9003_phy.c 				 struct ath9k_channel *chan)
chan             1898 drivers/net/wireless/ath/ath9k/ar9003_phy.c 	if (IS_CHAN_5GHZ(chan)) {
chan             1901 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT20(chan) || IS_CHAN_HT40(chan)) {
chan             1906 drivers/net/wireless/ath/ath9k/ar9003_phy.c 						  IS_CHAN_HT40(chan));
chan             1916 drivers/net/wireless/ath/ath9k/ar9003_phy.c 		if (IS_CHAN_HT20(chan) || IS_CHAN_HT40(chan)) {
chan             1921 drivers/net/wireless/ath/ath9k/ar9003_phy.c 						  IS_CHAN_HT40(chan));
chan              206 drivers/net/wireless/ath/ath9k/ar9003_rtt.c bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
chan              214 drivers/net/wireless/ath/ath9k/ar9003_rtt.c 		if (IS_CHAN_2GHZ(chan)){
chan               28 drivers/net/wireless/ath/ath9k/ar9003_rtt.h bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan);
chan               59 drivers/net/wireless/ath/ath9k/ar9003_rtt.h static inline bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
chan              414 drivers/net/wireless/ath/ath9k/ath9k.h 	struct ath_chanctx chan;
chan               83 drivers/net/wireless/ath/ath9k/beacon.c 	sband = &common->sbands[sc->cur_chandef.chan->band];
chan               48 drivers/net/wireless/ath/ath9k/calib.c 						    struct ath9k_channel *chan)
chan               52 drivers/net/wireless/ath/ath9k/calib.c 	if (!chan || IS_CHAN_2GHZ(chan))
chan               61 drivers/net/wireless/ath/ath9k/calib.c 				   struct ath9k_channel *chan,
chan               64 drivers/net/wireless/ath/ath9k/calib.c 	s16 calib_nf = ath9k_hw_get_nf_limits(ah, chan)->cal[chain];
chan               69 drivers/net/wireless/ath/ath9k/calib.c 		return ath9k_hw_get_nf_limits(ah, chan)->nominal;
chan               72 drivers/net/wireless/ath/ath9k/calib.c s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
chan               79 drivers/net/wireless/ath/ath9k/calib.c 			   ath9k_hw_get_default_nf(ah, chan, 0);
chan              216 drivers/net/wireless/ath/ath9k/calib.c 		currCal->calData->calType, ah->curchan->chan->center_freq);
chan              243 drivers/net/wireless/ath/ath9k/calib.c int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
chan              249 drivers/net/wireless/ath/ath9k/calib.c 	s16 default_nf = ath9k_hw_get_nf_limits(ah, chan)->nominal;
chan              260 drivers/net/wireless/ath/ath9k/calib.c 			if ((i >= AR5416_MAX_CHAINS) && !IS_CHAN_HT40(chan))
chan              270 drivers/net/wireless/ath/ath9k/calib.c 				    ath9k_hw_get_nf_limits(ah, chan)->cal[i];
chan              353 drivers/net/wireless/ath/ath9k/calib.c 			if ((i >= AR5416_MAX_CHAINS) && !IS_CHAN_HT40(chan))
chan              400 drivers/net/wireless/ath/ath9k/calib.c bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
chan              406 drivers/net/wireless/ath/ath9k/calib.c 	struct ieee80211_channel *c = chan->chan;
chan              426 drivers/net/wireless/ath/ath9k/calib.c 		chan->noisefloor = nf;
chan              433 drivers/net/wireless/ath/ath9k/calib.c 	chan->noisefloor = h[0].privNF;
chan              434 drivers/net/wireless/ath/ath9k/calib.c 	ah->noise = ath9k_hw_getchan_noise(ah, chan, chan->noisefloor);
chan              440 drivers/net/wireless/ath/ath9k/calib.c 				  struct ath9k_channel *chan)
chan              445 drivers/net/wireless/ath/ath9k/calib.c 	ah->caldata->channel = chan->channel;
chan              446 drivers/net/wireless/ath/ath9k/calib.c 	ah->caldata->channelFlags = chan->channelFlags;
chan              450 drivers/net/wireless/ath/ath9k/calib.c 		h[i].privNF = ath9k_hw_get_default_nf(ah, chan, k);
chan              112 drivers/net/wireless/ath/ath9k/calib.h int ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);
chan              113 drivers/net/wireless/ath/ath9k/calib.h bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
chan              115 drivers/net/wireless/ath/ath9k/calib.h 				  struct ath9k_channel *chan);
chan              119 drivers/net/wireless/ath/ath9k/calib.h s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan,
chan               30 drivers/net/wireless/ath/ath9k/channel.c 	struct ieee80211_channel *chan = chandef->chan;
chan               31 drivers/net/wireless/ath/ath9k/channel.c 	int pos = chan->hw_value;
chan               43 drivers/net/wireless/ath/ath9k/channel.c 		chan->center_freq, chandef->width);
chan               92 drivers/net/wireless/ath/ath9k/channel.c 			chan->center_freq);
chan              108 drivers/net/wireless/ath/ath9k/channel.c 	struct ieee80211_channel *chan;
chan              115 drivers/net/wireless/ath/ath9k/channel.c 	chan = &sband->channels[0];
chan              118 drivers/net/wireless/ath/ath9k/channel.c 		cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20);
chan              258 drivers/net/wireless/ath/ath9k/channel.c 	if (ctx == &sc->offchannel.chan) {
chan              537 drivers/net/wireless/ath/ath9k/channel.c 			sc->next_chan = &sc->offchannel.chan;
chan              597 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->next_chan == &sc->offchannel.chan) {
chan              676 drivers/net/wireless/ath/ath9k/channel.c 		    sc->cur_chan == &sc->offchannel.chan)
chan              714 drivers/net/wireless/ath/ath9k/channel.c 		    sc->cur_chan == &sc->offchannel.chan)
chan              745 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->cur_chan == &sc->offchannel.chan ||
chan              755 drivers/net/wireless/ath/ath9k/channel.c 			    sc->next_chan != &sc->offchannel.chan)
chan              791 drivers/net/wireless/ath/ath9k/channel.c 				     struct ieee80211_channel *chan)
chan              795 drivers/net/wireless/ath/ath9k/channel.c 	if (!req->n_ssids || (chan->flags & IEEE80211_CHAN_NO_IR))
chan              809 drivers/net/wireless/ath/ath9k/channel.c 	    (sc->cur_chan != ctx) && (ctx == &sc->offchannel.chan)) {
chan              832 drivers/net/wireless/ath/ath9k/channel.c 	if (sc->next_chan == &sc->offchannel.chan) {
chan              849 drivers/net/wireless/ath/ath9k/channel.c 				       struct ieee80211_channel *chan)
chan              854 drivers/net/wireless/ath/ath9k/channel.c 	cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT);
chan              858 drivers/net/wireless/ath/ath9k/channel.c 	ath_chanctx_switch(sc, &sc->offchannel.chan, &chandef);
chan              884 drivers/net/wireless/ath/ath9k/channel.c 	struct ieee80211_channel *chan;
chan              903 drivers/net/wireless/ath/ath9k/channel.c 	chan = req->channels[sc->offchannel.scan_idx++];
chan              904 drivers/net/wireless/ath/ath9k/channel.c 	sc->offchannel.duration = ath_scan_channel_duration(sc, chan);
chan              907 drivers/net/wireless/ath/ath9k/channel.c 	ath_chanctx_offchan_switch(sc, chan);
chan              916 drivers/net/wireless/ath/ath9k/channel.c 		sc->offchannel.chan.txpower = vif->bss_conf.txpower;
chan              920 drivers/net/wireless/ath/ath9k/channel.c 		sc->offchannel.chan.txpower = vif->bss_conf.txpower;
chan              997 drivers/net/wireless/ath/ath9k/channel.c 	int band = sc->offchannel.chan.chandef.chan->band;
chan             1032 drivers/net/wireless/ath/ath9k/channel.c 	if (!(sc->cur_chan->chandef.chan->flags & IEEE80211_CHAN_NO_IR) &&
chan             1109 drivers/net/wireless/ath/ath9k/channel.c 	int band = sc->cur_chan->chandef.chan->band;
chan             1167 drivers/net/wireless/ath/ath9k/channel.c 	if (sc->cur_chan == &sc->offchannel.chan)
chan             1201 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->cur_chan->chandef.chan !=
chan             1202 drivers/net/wireless/ath/ath9k/channel.c 		    sc->offchannel.chan.chandef.chan)
chan             1214 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->cur_chan != &sc->offchannel.chan)
chan             1262 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->next_chan == &sc->offchannel.chan) {
chan             1279 drivers/net/wireless/ath/ath9k/channel.c 		if (sc->cur_chan != &sc->offchannel.chan) {
chan             1338 drivers/net/wireless/ath/ath9k/channel.c 	struct ieee80211_channel *chan;
chan             1345 drivers/net/wireless/ath/ath9k/channel.c 	chan = &sband->channels[0];
chan             1347 drivers/net/wireless/ath/ath9k/channel.c 	ctx = &sc->offchannel.chan;
chan             1350 drivers/net/wireless/ath/ath9k/channel.c 	cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20);
chan             1358 drivers/net/wireless/ath/ath9k/channel.c 	sc->offchannel.chan.offchannel = true;
chan             1390 drivers/net/wireless/ath/ath9k/channel.c 	if (ctx == &sc->offchannel.chan) {
chan             1409 drivers/net/wireless/ath/ath9k/channel.c 	if (ctx == &sc->offchannel.chan) {
chan              483 drivers/net/wireless/ath/ath9k/common-spectral.c 	u16 fft_len, sample_len, freq = ah->curchan->chan->center_freq;
chan              180 drivers/net/wireless/ath/ath9k/common.c 	band = ah->curchan->chan->band;
chan              303 drivers/net/wireless/ath/ath9k/common.c 	struct ieee80211_channel *chan = chandef->chan;
chan              306 drivers/net/wireless/ath/ath9k/common.c 	ichan->channel = chan->center_freq;
chan              307 drivers/net/wireless/ath/ath9k/common.c 	ichan->chan = chan;
chan              309 drivers/net/wireless/ath/ath9k/common.c 	if (chan->band == NL80211_BAND_5GHZ)
chan              325 drivers/net/wireless/ath/ath9k/common.c 		if (chandef->center_freq1 > chandef->chan->center_freq)
chan              344 drivers/net/wireless/ath/ath9k/common.c 	struct ieee80211_channel *curchan = chandef->chan;
chan              142 drivers/net/wireless/ath/ath9k/debug_sta.c 		if (ah->curchan->chan->band == NL80211_BAND_2GHZ)
chan              186 drivers/net/wireless/ath/ath9k/debug_sta.c 	band = ah->curchan->chan->band;
chan               33 drivers/net/wireless/ath/ath9k/dynack.c 	const struct ath9k_channel *chan = ah->curchan;
chan               35 drivers/net/wireless/ath/ath9k/dynack.c 	if (!chan)
chan               38 drivers/net/wireless/ath/ath9k/dynack.c 	if (IS_CHAN_HT40(chan))
chan               40 drivers/net/wireless/ath/ath9k/dynack.c 	if (IS_CHAN_HALF_RATE(chan))
chan               42 drivers/net/wireless/ath/ath9k/dynack.c 	if (IS_CHAN_QUARTER_RATE(chan))
chan              270 drivers/net/wireless/ath/ath9k/eeprom.c 				       struct ath9k_channel *chan,
chan              282 drivers/net/wireless/ath/ath9k/eeprom.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              286 drivers/net/wireless/ath/ath9k/eeprom.c 				       IS_CHAN_2GHZ(chan))) {
chan              292 drivers/net/wireless/ath/ath9k/eeprom.c 						       IS_CHAN_2GHZ(chan))) {
chan              296 drivers/net/wireless/ath/ath9k/eeprom.c 						IS_CHAN_2GHZ(chan)) && i > 0 &&
chan              298 drivers/net/wireless/ath/ath9k/eeprom.c 						IS_CHAN_2GHZ(chan))) {
chan              311 drivers/net/wireless/ath/ath9k/eeprom.c 					 IS_CHAN_2GHZ(chan));
chan              313 drivers/net/wireless/ath/ath9k/eeprom.c 					 IS_CHAN_2GHZ(chan));
chan              325 drivers/net/wireless/ath/ath9k/eeprom.c 				struct ath9k_channel *chan,
chan              337 drivers/net/wireless/ath/ath9k/eeprom.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              340 drivers/net/wireless/ath/ath9k/eeprom.c 	if (freq <= ath9k_hw_fbin2freq(powInfo[0].bChannel, IS_CHAN_2GHZ(chan))) {
chan              346 drivers/net/wireless/ath/ath9k/eeprom.c 						       IS_CHAN_2GHZ(chan))) {
chan              351 drivers/net/wireless/ath/ath9k/eeprom.c 						IS_CHAN_2GHZ(chan)) && i > 0 &&
chan              353 drivers/net/wireless/ath/ath9k/eeprom.c 						IS_CHAN_2GHZ(chan))) {
chan              366 drivers/net/wireless/ath/ath9k/eeprom.c 					 IS_CHAN_2GHZ(chan));
chan              368 drivers/net/wireless/ath/ath9k/eeprom.c 					 IS_CHAN_2GHZ(chan));
chan              455 drivers/net/wireless/ath/ath9k/eeprom.c 				struct ath9k_channel *chan,
chan              494 drivers/net/wireless/ath/ath9k/eeprom.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              502 drivers/net/wireless/ath/ath9k/eeprom.c 							     IS_CHAN_2GHZ(chan)),
chan              578 drivers/net/wireless/ath/ath9k/eeprom.c 						       (chan)),
chan              662 drivers/net/wireless/ath/ath9k/eeprom.h 	void (*set_board_values)(struct ath_hw *hw, struct ath9k_channel *chan);
chan              663 drivers/net/wireless/ath/ath9k/eeprom.h 	void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan);
chan              664 drivers/net/wireless/ath/ath9k/eeprom.h 	void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan,
chan              689 drivers/net/wireless/ath/ath9k/eeprom.h 				       struct ath9k_channel *chan,
chan              695 drivers/net/wireless/ath/ath9k/eeprom.h 				struct ath9k_channel *chan,
chan              708 drivers/net/wireless/ath/ath9k/eeprom.h 				struct ath9k_channel *chan,
chan              284 drivers/net/wireless/ath/ath9k/eeprom_4k.c 				  struct ath9k_channel *chan)
chan              338 drivers/net/wireless/ath/ath9k/eeprom_4k.c 			ath9k_hw_get_gain_boundaries_pdadcs(ah, chan,
chan              387 drivers/net/wireless/ath/ath9k/eeprom_4k.c 						 struct ath9k_channel *chan,
chan              424 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              431 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_get_legacy_target_powers(ah, chan,
chan              435 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_get_legacy_target_powers(ah, chan,
chan              439 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_get_target_powers(ah, chan,
chan              444 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	if (IS_CHAN_HT40(chan)) {
chan              446 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		ath9k_hw_get_target_powers(ah, chan,
chan              450 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              454 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              483 drivers/net/wireless/ath/ath9k/eeprom_4k.c 					IS_CHAN_2GHZ(chan),
chan              563 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	if (IS_CHAN_HT40(chan)) {
chan              578 drivers/net/wireless/ath/ath9k/eeprom_4k.c 				    struct ath9k_channel *chan,
chan              595 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_set_4k_power_per_rate_table(ah, chan,
chan              600 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	ath9k_hw_set_4k_power_cal_table(ah, chan);
chan              656 drivers/net/wireless/ath/ath9k/eeprom_4k.c 	if (IS_CHAN_HT40(chan)) {
chan              686 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		ht40_delta = (IS_CHAN_HT40(chan)) ? ht40PowerIncForPdadc : 0;
chan              687 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		ar5008_hw_init_rate_txpower(ah, ratesArray, chan, ht40_delta);
chan              757 drivers/net/wireless/ath/ath9k/eeprom_4k.c 					 struct ath9k_channel *chan)
chan              999 drivers/net/wireless/ath/ath9k/eeprom_4k.c 		if (IS_CHAN_HT40(chan))
chan              284 drivers/net/wireless/ath/ath9k/eeprom_9287.c 			    struct ath9k_channel *chan,
chan              292 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              300 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		(u8)FREQ2FBIN(centers.synth_center, IS_CHAN_2GHZ(chan)),
chan              354 drivers/net/wireless/ath/ath9k/eeprom_9287.c 						struct ath9k_channel *chan)
chan              377 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_2GHZ(chan)) {
chan              418 drivers/net/wireless/ath/ath9k/eeprom_9287.c 				ar9287_eeprom_get_tx_gain_index(ah, chan,
chan              428 drivers/net/wireless/ath/ath9k/eeprom_9287.c 				ath9k_hw_get_gain_boundaries_pdadcs(ah, chan,
chan              492 drivers/net/wireless/ath/ath9k/eeprom_9287.c 						     struct ath9k_channel *chan,
chan              529 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              536 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_2GHZ(chan))	{
chan              543 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              547 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              551 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		ath9k_hw_get_target_powers(ah, chan,
chan              556 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		if (IS_CHAN_HT40(chan))	{
chan              559 drivers/net/wireless/ath/ath9k/eeprom_9287.c 			ath9k_hw_get_target_powers(ah, chan,
chan              563 drivers/net/wireless/ath/ath9k/eeprom_9287.c 			ath9k_hw_get_legacy_target_powers(ah, chan,
chan              567 drivers/net/wireless/ath/ath9k/eeprom_9287.c 			ath9k_hw_get_legacy_target_powers(ah, chan,
chan              601 drivers/net/wireless/ath/ath9k/eeprom_9287.c 								IS_CHAN_2GHZ(chan),
chan              681 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_2GHZ(chan))	{
chan              690 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_HT40(chan))	{
chan              698 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		if (IS_CHAN_2GHZ(chan))
chan              707 drivers/net/wireless/ath/ath9k/eeprom_9287.c 					struct ath9k_channel *chan, u16 cfgCtl,
chan              723 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	ath9k_hw_set_ar9287_power_per_rate_table(ah, chan,
chan              728 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	ath9k_hw_set_ar9287_power_cal_table(ah, chan);
chan              763 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_2GHZ(chan))	{
chan              790 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_HT40(chan))	{
chan              837 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		ht40_delta = (IS_CHAN_HT40(chan)) ? ht40PowerIncForPdadc : 0;
chan              838 drivers/net/wireless/ath/ath9k/eeprom_9287.c 		ar5008_hw_init_rate_txpower(ah, ratesArray, chan, ht40_delta);
chan              851 drivers/net/wireless/ath/ath9k/eeprom_9287.c 					     struct ath9k_channel *chan)
chan              895 drivers/net/wireless/ath/ath9k/eeprom_9287.c 	if (IS_CHAN_HT40(chan))
chan               22 drivers/net/wireless/ath/ath9k/eeprom_def.c 		struct ath9k_channel *chan,
chan               31 drivers/net/wireless/ath/ath9k/eeprom_def.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan               38 drivers/net/wireless/ath/ath9k/eeprom_def.c 			(u8)FREQ2FBIN(centers.synth_center, IS_CHAN_2GHZ(chan)),
chan              467 drivers/net/wireless/ath/ath9k/eeprom_def.c 					  struct ath9k_channel *chan)
chan              475 drivers/net/wireless/ath/ath9k/eeprom_def.c 	pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
chan              476 drivers/net/wireless/ath/ath9k/eeprom_def.c 	txRxAttenLocal = IS_CHAN_2GHZ(chan) ? 23 : 44;
chan              509 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_2GHZ(chan)) {
chan              602 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_HT40(chan))
chan              617 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_2GHZ(chan))
chan              638 drivers/net/wireless/ath/ath9k/eeprom_def.c 				   struct ath9k_channel *chan)
chan              651 drivers/net/wireless/ath/ath9k/eeprom_def.c 	pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
chan              659 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              662 drivers/net/wireless/ath/ath9k/eeprom_def.c 					 IS_CHAN_2GHZ(chan));
chan              681 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_2GHZ(chan)) {
chan              762 drivers/net/wireless/ath/ath9k/eeprom_def.c 				  struct ath9k_channel *chan)
chan              782 drivers/net/wireless/ath/ath9k/eeprom_def.c 	modalIdx = IS_CHAN_2GHZ(chan) ? 1 : 0;
chan              795 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_2GHZ(chan)) {
chan              803 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (OLC_FOR_AR9280_20_LATER && IS_CHAN_2GHZ(chan)) {
chan              838 drivers/net/wireless/ath/ath9k/eeprom_def.c 			if (IS_CHAN_2GHZ(chan))
chan              848 drivers/net/wireless/ath/ath9k/eeprom_def.c 				ath9k_get_txgain_index(ah, chan,
chan              855 drivers/net/wireless/ath/ath9k/eeprom_def.c 							chan, pRawDataset,
chan              920 drivers/net/wireless/ath/ath9k/eeprom_def.c 						  struct ath9k_channel *chan,
chan              957 drivers/net/wireless/ath/ath9k/eeprom_def.c 	ath9k_hw_get_channel_centers(ah, chan, &centers);
chan              962 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_2GHZ(chan)) {
chan              967 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              971 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan              975 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_target_powers(ah, chan,
chan              980 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_HT40(chan)) {
chan              982 drivers/net/wireless/ath/ath9k/eeprom_def.c 			ath9k_hw_get_target_powers(ah, chan,
chan              986 drivers/net/wireless/ath/ath9k/eeprom_def.c 			ath9k_hw_get_legacy_target_powers(ah, chan,
chan              990 drivers/net/wireless/ath/ath9k/eeprom_def.c 			ath9k_hw_get_legacy_target_powers(ah, chan,
chan             1000 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_legacy_target_powers(ah, chan,
chan             1004 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ath9k_hw_get_target_powers(ah, chan,
chan             1009 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_HT40(chan)) {
chan             1011 drivers/net/wireless/ath/ath9k/eeprom_def.c 			ath9k_hw_get_target_powers(ah, chan,
chan             1015 drivers/net/wireless/ath/ath9k/eeprom_def.c 			ath9k_hw_get_legacy_target_powers(ah, chan,
chan             1045 drivers/net/wireless/ath/ath9k/eeprom_def.c 				IS_CHAN_2GHZ(chan), AR5416_NUM_BAND_EDGES);
chan             1118 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_2GHZ(chan)) {
chan             1127 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_HT40(chan)) {
chan             1135 drivers/net/wireless/ath/ath9k/eeprom_def.c 		if (IS_CHAN_2GHZ(chan)) {
chan             1143 drivers/net/wireless/ath/ath9k/eeprom_def.c 				    struct ath9k_channel *chan,
chan             1152 drivers/net/wireless/ath/ath9k/eeprom_def.c 		&(pEepData->modalHeader[IS_CHAN_2GHZ(chan)]);
chan             1162 drivers/net/wireless/ath/ath9k/eeprom_def.c 	ath9k_hw_set_def_power_per_rate_table(ah, chan,
chan             1167 drivers/net/wireless/ath/ath9k/eeprom_def.c 	ath9k_hw_set_def_power_cal_table(ah, chan);
chan             1205 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_2GHZ(chan)) {
chan             1243 drivers/net/wireless/ath/ath9k/eeprom_def.c 	if (IS_CHAN_HT40(chan)) {
chan             1285 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ht40_delta = (IS_CHAN_HT40(chan)) ? ht40PowerIncForPdadc : 0;
chan             1286 drivers/net/wireless/ath/ath9k/eeprom_def.c 		ar5008_hw_init_rate_txpower(ah, ratesArray, chan, ht40_delta);
chan              188 drivers/net/wireless/ath/ath9k/htc_drv_main.c 	struct ieee80211_channel *channel = priv->hw->conf.chandef.chan;
chan              248 drivers/net/wireless/ath/ath9k/htc_drv_main.c 	struct ieee80211_channel *channel = hw->conf.chandef.chan;
chan              602 drivers/net/wireless/ath/ath9k/htc_drv_main.c 	sband = priv->hw->wiphy->bands[priv->hw->conf.chandef.chan->band];
chan              912 drivers/net/wireless/ath/ath9k/htc_drv_main.c 	struct ieee80211_channel *curchan = hw->conf.chandef.chan;
chan             1209 drivers/net/wireless/ath/ath9k/htc_drv_main.c 		struct ieee80211_channel *curchan = hw->conf.chandef.chan;
chan              497 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 		if (cur_conf->chandef.chan->band == NL80211_BAND_5GHZ)
chan             1051 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 	rx_status->band = ah->curchan->chan->band;
chan             1052 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 	rx_status->freq = ah->curchan->chan->center_freq;
chan               45 drivers/net/wireless/ath/ath9k/hw-ops.h 				     struct ath9k_channel *chan,
chan               48 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_ops(ah)->calibrate(ah, chan, rxchainmask, longcal);
chan              141 drivers/net/wireless/ath/ath9k/hw-ops.h 				       struct ath9k_channel *chan)
chan              143 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->rf_set_freq(ah, chan);
chan              147 drivers/net/wireless/ath/ath9k/hw-ops.h 					       struct ath9k_channel *chan)
chan              149 drivers/net/wireless/ath/ath9k/hw-ops.h 	ath9k_hw_private_ops(ah)->spur_mitigate_freq(ah, chan);
chan              153 drivers/net/wireless/ath/ath9k/hw-ops.h 					struct ath9k_channel *chan,
chan              159 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->set_rf_regs(ah, chan, modesIndex);
chan              163 drivers/net/wireless/ath/ath9k/hw-ops.h 				    struct ath9k_channel *chan)
chan              165 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->init_bb(ah, chan);
chan              169 drivers/net/wireless/ath/ath9k/hw-ops.h 					     struct ath9k_channel *chan)
chan              171 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->set_channel_regs(ah, chan);
chan              175 drivers/net/wireless/ath/ath9k/hw-ops.h 					struct ath9k_channel *chan)
chan              177 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->process_ini(ah, chan);
chan              189 drivers/net/wireless/ath/ath9k/hw-ops.h 				       struct ath9k_channel *chan)
chan              191 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->set_rfmode(ah, chan);
chan              200 drivers/net/wireless/ath/ath9k/hw-ops.h 					    struct ath9k_channel *chan)
chan              202 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->set_delta_slope(ah, chan);
chan              236 drivers/net/wireless/ath/ath9k/hw-ops.h 				     struct ath9k_channel *chan)
chan              238 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->init_cal(ah, chan);
chan              248 drivers/net/wireless/ath/ath9k/hw-ops.h 					    struct ath9k_channel *chan,
chan              251 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->fast_chan_change(ah, chan,
chan              269 drivers/net/wireless/ath/ath9k/hw-ops.h 					       struct ath9k_channel *chan)
chan              271 drivers/net/wireless/ath/ath9k/hw-ops.h 	return ath9k_hw_private_ops(ah)->compute_pll_control(ah, chan);
chan               43 drivers/net/wireless/ath/ath9k/hw.c 	struct ath9k_channel *chan = ah->curchan;
chan               49 drivers/net/wireless/ath/ath9k/hw.c 	else if (!chan) /* should really check for CCK instead */
chan               51 drivers/net/wireless/ath/ath9k/hw.c 	else if (IS_CHAN_2GHZ(chan))
chan               58 drivers/net/wireless/ath/ath9k/hw.c 	if (chan) {
chan               59 drivers/net/wireless/ath/ath9k/hw.c 		if (IS_CHAN_HT40(chan))
chan               61 drivers/net/wireless/ath/ath9k/hw.c 		if (IS_CHAN_HALF_RATE(chan))
chan               63 drivers/net/wireless/ath/ath9k/hw.c 		if (IS_CHAN_QUARTER_RATE(chan))
chan               98 drivers/net/wireless/ath/ath9k/hw.c void ath9k_hw_synth_delay(struct ath_hw *ah, struct ath9k_channel *chan,
chan              103 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_HALF_RATE(chan))
chan              105 drivers/net/wireless/ath/ath9k/hw.c 	else if (IS_CHAN_QUARTER_RATE(chan))
chan              223 drivers/net/wireless/ath/ath9k/hw.c 				  struct ath9k_channel *chan,
chan              228 drivers/net/wireless/ath/ath9k/hw.c 	if (!IS_CHAN_HT40(chan)) {
chan              230 drivers/net/wireless/ath/ath9k/hw.c 			centers->synth_center = chan->channel;
chan              234 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_HT40PLUS(chan)) {
chan              236 drivers/net/wireless/ath/ath9k/hw.c 			chan->channel + HT40_CHANNEL_CENTER_SHIFT;
chan              240 drivers/net/wireless/ath/ath9k/hw.c 			chan->channel - HT40_CHANNEL_CENTER_SHIFT;
chan              762 drivers/net/wireless/ath/ath9k/hw.c 			      struct ath9k_channel *chan)
chan              766 drivers/net/wireless/ath/ath9k/hw.c 	pll = ath9k_hw_compute_pll_control(ah, chan);
chan             1051 drivers/net/wireless/ath/ath9k/hw.c 	const struct ath9k_channel *chan = ah->curchan;
chan             1061 drivers/net/wireless/ath/ath9k/hw.c 	if (!chan)
chan             1067 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan             1073 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_5GHZ(chan))
chan             1078 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_HALF_RATE(chan)) {
chan             1082 drivers/net/wireless/ath/ath9k/hw.c 		if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan             1089 drivers/net/wireless/ath/ath9k/hw.c 	} else if (IS_CHAN_QUARTER_RATE(chan)) {
chan             1093 drivers/net/wireless/ath/ath9k/hw.c 		if (IS_CHAN_A_FAST_CLOCK(ah, chan))
chan             1127 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_2GHZ(chan) &&
chan             1128 drivers/net/wireless/ath/ath9k/hw.c 	    !IS_CHAN_HALF_RATE(chan) && !IS_CHAN_QUARTER_RATE(chan)) {
chan             1155 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))
chan             1177 drivers/net/wireless/ath/ath9k/hw.c u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan)
chan             1179 drivers/net/wireless/ath/ath9k/hw.c 	u32 ctl = ath_regd_get_band_ctl(reg, chan->chan->band);
chan             1181 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_2GHZ(chan))
chan             1515 drivers/net/wireless/ath/ath9k/hw.c 				struct ath9k_channel *chan)
chan             1538 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_init_pll(ah, chan);
chan             1544 drivers/net/wireless/ath/ath9k/hw.c 				    struct ath9k_channel *chan)
chan             1554 drivers/net/wireless/ath/ath9k/hw.c 		u32 flags_diff = chan->channelFlags ^ ah->curchan->channelFlags;
chan             1577 drivers/net/wireless/ath/ath9k/hw.c 			ath9k_hw_init_pll(ah, chan);
chan             1579 drivers/net/wireless/ath/ath9k/hw.c 		if (ath9k_hw_fast_chan_change(ah, chan, &ini_reloaded)) {
chan             1585 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_set_channel_regs(ah, chan);
chan             1587 drivers/net/wireless/ath/ath9k/hw.c 	r = ath9k_hw_rf_set_freq(ah, chan);
chan             1593 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_apply_txpower(ah, chan, false);
chan             1595 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_set_delta_slope(ah, chan);
chan             1596 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_spur_mitigate_freq(ah, chan);
chan             1599 drivers/net/wireless/ath/ath9k/hw.c 		ah->eep_ops->set_board_values(ah, chan);
chan             1601 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_init_bb(ah, chan);
chan             1606 drivers/net/wireless/ath/ath9k/hw.c 		ath9k_hw_init_cal(ah, chan);
chan             1789 drivers/net/wireless/ath/ath9k/hw.c static int ath9k_hw_do_fastcc(struct ath_hw *ah, struct ath9k_channel *chan)
chan             1804 drivers/net/wireless/ath/ath9k/hw.c 	if (chan->channel == ah->curchan->channel)
chan             1807 drivers/net/wireless/ath/ath9k/hw.c 	if ((ah->curchan->channelFlags | chan->channelFlags) &
chan             1815 drivers/net/wireless/ath/ath9k/hw.c 	    ((chan->channelFlags ^ ah->curchan->channelFlags) & ~CHANNEL_HT))
chan             1832 drivers/net/wireless/ath/ath9k/hw.c 		ah->curchan->channel, chan->channel);
chan             1834 drivers/net/wireless/ath/ath9k/hw.c 	ret = ath9k_hw_channel_change(ah, chan);
chan             1845 drivers/net/wireless/ath/ath9k/hw.c 		ar9002_hw_load_ani_reg(ah, chan);
chan             1869 drivers/net/wireless/ath/ath9k/hw.c int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
chan             1884 drivers/net/wireless/ath/ath9k/hw.c 		start_mci_reset = ar9003_mci_start_reset(ah, chan);
chan             1896 drivers/net/wireless/ath/ath9k/hw.c 	if (caldata && (chan->channel != caldata->channel ||
chan             1897 drivers/net/wireless/ath/ath9k/hw.c 			chan->channelFlags != caldata->channelFlags)) {
chan             1900 drivers/net/wireless/ath/ath9k/hw.c 		ath9k_init_nfcal_hist_buffer(ah, chan);
chan             1904 drivers/net/wireless/ath/ath9k/hw.c 	ah->noise = ath9k_hw_getchan_noise(ah, chan, chan->noisefloor);
chan             1907 drivers/net/wireless/ath/ath9k/hw.c 		r = ath9k_hw_do_fastcc(ah, chan);
chan             1941 drivers/net/wireless/ath/ath9k/hw.c 	if (!ath9k_hw_chip_reset(ah, chan)) {
chan             1965 drivers/net/wireless/ath/ath9k/hw.c 	r = ath9k_hw_process_ini(ah, chan);
chan             1969 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_set_rfmode(ah, chan);
chan             1972 drivers/net/wireless/ath/ath9k/hw.c 		ar9003_mci_reset(ah, false, IS_CHAN_2GHZ(chan), save_fullsleep);
chan             1986 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_set_delta_slope(ah, chan);
chan             1987 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_spur_mitigate_freq(ah, chan);
chan             1988 drivers/net/wireless/ath/ath9k/hw.c 	ah->eep_ops->set_board_values(ah, chan);
chan             1992 drivers/net/wireless/ath/ath9k/hw.c 	r = ath9k_hw_rf_set_freq(ah, chan);
chan             2036 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_init_bb(ah, chan);
chan             2042 drivers/net/wireless/ath/ath9k/hw.c 	if (!ath9k_hw_init_cal(ah, chan))
chan             2045 drivers/net/wireless/ath/ath9k/hw.c 	if (ath9k_hw_mci_is_enabled(ah) && ar9003_mci_end_reset(ah, chan, caldata))
chan             2066 drivers/net/wireless/ath/ath9k/hw.c 		ath9k_hw_loadnf(ah, chan);
chan             2083 drivers/net/wireless/ath/ath9k/hw.c 		ah->radar_conf.ext_channel = IS_CHAN_HT40(chan);
chan             2942 drivers/net/wireless/ath/ath9k/hw.c static int get_antenna_gain(struct ath_hw *ah, struct ath9k_channel *chan)
chan             2946 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_2GHZ(chan))
chan             2954 drivers/net/wireless/ath/ath9k/hw.c void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan,
chan             2962 drivers/net/wireless/ath/ath9k/hw.c 	if (!chan)
chan             2966 drivers/net/wireless/ath/ath9k/hw.c 		ctl = ath9k_regd_get_ctl(reg, chan);
chan             2968 drivers/net/wireless/ath/ath9k/hw.c 	channel = chan->chan;
chan             2972 drivers/net/wireless/ath/ath9k/hw.c 	ah->eep_ops->set_txpower(ah, chan, ctl,
chan             2973 drivers/net/wireless/ath/ath9k/hw.c 				 get_antenna_gain(ah, chan), new_pwr, test);
chan             2979 drivers/net/wireless/ath/ath9k/hw.c 	struct ath9k_channel *chan = ah->curchan;
chan             2980 drivers/net/wireless/ath/ath9k/hw.c 	struct ieee80211_channel *channel = chan->chan;
chan             2986 drivers/net/wireless/ath/ath9k/hw.c 	ath9k_hw_apply_txpower(ah, chan, test);
chan             3065 drivers/net/wireless/ath/ath9k/hw.c void ath9k_hw_set11nmac2040(struct ath_hw *ah, struct ath9k_channel *chan)
chan             3069 drivers/net/wireless/ath/ath9k/hw.c 	if (IS_CHAN_HT40(chan) && !ah->config.cwm_ignore_extcca)
chan              450 drivers/net/wireless/ath/ath9k/hw.h 	struct ieee80211_channel *chan;
chan              635 drivers/net/wireless/ath/ath9k/hw.h 	bool (*init_cal)(struct ath_hw *ah, struct ath9k_channel *chan);
chan              643 drivers/net/wireless/ath/ath9k/hw.h 			   struct ath9k_channel *chan);
chan              645 drivers/net/wireless/ath/ath9k/hw.h 				   struct ath9k_channel *chan);
chan              647 drivers/net/wireless/ath/ath9k/hw.h 			    struct ath9k_channel *chan,
chan              649 drivers/net/wireless/ath/ath9k/hw.h 	void (*set_channel_regs)(struct ath_hw *ah, struct ath9k_channel *chan);
chan              651 drivers/net/wireless/ath/ath9k/hw.h 			struct ath9k_channel *chan);
chan              652 drivers/net/wireless/ath/ath9k/hw.h 	int (*process_ini)(struct ath_hw *ah, struct ath9k_channel *chan);
chan              654 drivers/net/wireless/ath/ath9k/hw.h 	void (*set_rfmode)(struct ath_hw *ah, struct ath9k_channel *chan);
chan              656 drivers/net/wireless/ath/ath9k/hw.h 	void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
chan              661 drivers/net/wireless/ath/ath9k/hw.h 				   struct ath9k_channel *chan);
chan              667 drivers/net/wireless/ath/ath9k/hw.h 	int (*fast_chan_change)(struct ath_hw *ah, struct ath9k_channel *chan,
chan              727 drivers/net/wireless/ath/ath9k/hw.h 	int (*calibrate)(struct ath_hw *ah, struct ath9k_channel *chan,
chan             1024 drivers/net/wireless/ath/ath9k/hw.h int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
chan             1027 drivers/net/wireless/ath/ath9k/hw.h u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan);
chan             1039 drivers/net/wireless/ath/ath9k/hw.h void ath9k_hw_synth_delay(struct ath_hw *ah, struct ath9k_channel *chan,
chan             1050 drivers/net/wireless/ath/ath9k/hw.h 				  struct ath9k_channel *chan,
chan             1068 drivers/net/wireless/ath/ath9k/hw.h void ath9k_hw_set11nmac2040(struct ath_hw *ah, struct ath9k_channel *chan);
chan             1098 drivers/net/wireless/ath/ath9k/hw.h void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan,
chan             1129 drivers/net/wireless/ath/ath9k/hw.h 				 struct ath9k_channel *chan);
chan             1131 drivers/net/wireless/ath/ath9k/hw.h 				 struct ath9k_channel *chan, int bin);
chan             1133 drivers/net/wireless/ath/ath9k/hw.h 				 struct ath9k_channel *chan, int ht40_delta);
chan             1146 drivers/net/wireless/ath/ath9k/hw.h void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
chan             1149 drivers/net/wireless/ath/ath9k/hw.h void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
chan              269 drivers/net/wireless/ath/ath9k/init.c 	sc->cur_chan->txpower = 2 * ah->curchan->chan->max_power;
chan              796 drivers/net/wireless/ath/ath9k/init.c 	struct ieee80211_channel *chan;
chan              804 drivers/net/wireless/ath/ath9k/init.c 		chan = &sband->channels[i];
chan              805 drivers/net/wireless/ath/ath9k/init.c 		ah->curchan = &ah->channels[chan->hw_value];
chan              806 drivers/net/wireless/ath/ath9k/init.c 		cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_HT20);
chan              185 drivers/net/wireless/ath/ath9k/link.c 	tx_info->band = sc->cur_chandef.chan->band;
chan              491 drivers/net/wireless/ath/ath9k/link.c 	struct ath9k_channel *chan = &ah->channels[channel];
chan              494 drivers/net/wireless/ath/ath9k/link.c 	if (chan->noisefloor) {
chan              496 drivers/net/wireless/ath/ath9k/link.c 		survey->noise = ath9k_hw_getchan_noise(ah, chan,
chan              497 drivers/net/wireless/ath/ath9k/link.c 						       chan->noisefloor);
chan              649 drivers/net/wireless/ath/ath9k/main.c 	struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
chan             1111 drivers/net/wireless/ath/ath9k/main.c 	if (ctx == &sc->offchannel.chan)
chan             1495 drivers/net/wireless/ath/ath9k/main.c 	sc->offchannel.chan.rxfilter = *total_flags;
chan             1961 drivers/net/wireless/ath/ath9k/main.c 	struct ieee80211_channel *chan;
chan             1986 drivers/net/wireless/ath/ath9k/main.c 	chan = &sband->channels[idx];
chan             1987 drivers/net/wireless/ath/ath9k/main.c 	pos = chan->hw_value;
chan             1989 drivers/net/wireless/ath/ath9k/main.c 	survey->channel = chan;
chan             2364 drivers/net/wireless/ath/ath9k/main.c 				   struct ieee80211_channel *chan, int duration,
chan             2380 drivers/net/wireless/ath/ath9k/main.c 	sc->offchannel.roc_chan = chan;
chan             2441 drivers/net/wireless/ath/ath9k/main.c 			conf->def.chan->center_freq);
chan             2465 drivers/net/wireless/ath/ath9k/main.c 		conf->def.chan->center_freq);
chan             2485 drivers/net/wireless/ath/ath9k/main.c 		conf->def.chan->center_freq);
chan             2507 drivers/net/wireless/ath/ath9k/main.c 		conf->def.chan->center_freq);
chan             2538 drivers/net/wireless/ath/ath9k/main.c 		conf->def.chan->center_freq);
chan              646 drivers/net/wireless/ath/ath9k/mci.c 	struct ath9k_channel *chan = ah->curchan;
chan              652 drivers/net/wireless/ath/ath9k/mci.c 	if (!chan || !IS_CHAN_2GHZ(chan))
chan              658 drivers/net/wireless/ath/ath9k/mci.c 	wlan_chan = chan->channel - 2402;
chan              663 drivers/net/wireless/ath/ath9k/mci.c 	if (IS_CHAN_HT40PLUS(chan))
chan              665 drivers/net/wireless/ath/ath9k/mci.c 	else if (IS_CHAN_HT40MINUS(chan))
chan              553 drivers/net/wireless/ath/ath9k/recv.c 			if (sc->cur_chan == &sc->offchannel.chan)
chan              934 drivers/net/wireless/ath/ath9k/recv.c 	rx_status->band = ah->curchan->chan->band;
chan              935 drivers/net/wireless/ath/ath9k/recv.c 	rx_status->freq = ah->curchan->chan->center_freq;
chan               83 drivers/net/wireless/ath/ath9k/tx99.c 	tx_info->band = sc->cur_chan->chandef.chan->band;
chan              646 drivers/net/wireless/ath/carl9170/debug.c 		err = carl9170_set_channel(ar, ar->hw->conf.chandef.chan,
chan               51 drivers/net/wireless/ath/carl9170/mac.c 		if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
chan               69 drivers/net/wireless/ath/carl9170/mac.c 		if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
chan               96 drivers/net/wireless/ath/carl9170/mac.c 	if ((ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ) ||
chan              123 drivers/net/wireless/ath/carl9170/mac.c 	if (ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ)
chan              943 drivers/net/wireless/ath/carl9170/main.c 		err = carl9170_set_channel(ar, hw->conf.chandef.chan,
chan              962 drivers/net/wireless/ath/carl9170/main.c 		err = carl9170_set_mac_tpc(ar, ar->hw->conf.chandef.chan);
chan             1648 drivers/net/wireless/ath/carl9170/main.c 	struct ieee80211_channel *chan;
chan             1652 drivers/net/wireless/ath/carl9170/main.c 	chan = ar->channel;
chan             1653 drivers/net/wireless/ath/carl9170/main.c 	if (!chan)
chan             1656 drivers/net/wireless/ath/carl9170/main.c 	if (idx == chan->hw_value) {
chan             1672 drivers/net/wireless/ath/carl9170/main.c 				chan = &band->channels[i];
chan             1682 drivers/net/wireless/ath/carl9170/main.c 	survey->channel = chan;
chan             1685 drivers/net/wireless/ath/carl9170/main.c 	if (ar->channel == chan)
chan             1333 drivers/net/wireless/ath/carl9170/phy.c 					ar->hw->conf.chandef.chan->band);
chan             1343 drivers/net/wireless/ath/carl9170/phy.c 	if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
chan              293 drivers/net/wireless/ath/carl9170/rx.c 	struct ieee80211_channel *chan;
chan              352 drivers/net/wireless/ath/carl9170/rx.c 	chan = ar->channel;
chan              353 drivers/net/wireless/ath/carl9170/rx.c 	if (chan) {
chan              354 drivers/net/wireless/ath/carl9170/rx.c 		status->band = chan->band;
chan              355 drivers/net/wireless/ath/carl9170/rx.c 		status->freq = chan->center_freq;
chan               86 drivers/net/wireless/ath/wcn36xx/wcn36xx.h #define WCN36XX_HW_CHANNEL(__wcn) (__wcn->hw->conf.chandef.chan->hw_value)
chan               87 drivers/net/wireless/ath/wcn36xx/wcn36xx.h #define WCN36XX_BAND(__wcn) (__wcn->hw->conf.chandef.chan->band)
chan               88 drivers/net/wireless/ath/wcn36xx/wcn36xx.h #define WCN36XX_CENTER_FREQ(__wcn) (__wcn->hw->conf.chandef.chan->center_freq)
chan               91 drivers/net/wireless/ath/wcn36xx/wcn36xx.h #define WCN36XX_MAX_POWER(__wcn) (__wcn->hw->conf.chandef.chan->max_power)
chan             1433 drivers/net/wireless/ath/wil6210/cfg80211.c 		     params->chan ? params->chan->hw_value : -1,
chan             1442 drivers/net/wireless/ath/wil6210/cfg80211.c 	if (params->chan && params->chan->hw_value == 0) {
chan             1454 drivers/net/wireless/ath/wil6210/cfg80211.c 	if (!params->chan || params->chan->hw_value == vif->channel) {
chan             1464 drivers/net/wireless/ath/wil6210/cfg80211.c 			vif->channel, params->chan->hw_value);
chan             1469 drivers/net/wireless/ath/wil6210/cfg80211.c 	rc = wmi_mgmt_tx_ext(vif, buf, len, params->chan->hw_value,
chan             1726 drivers/net/wireless/ath/wil6210/cfg80211.c 				 struct ieee80211_channel *chan,
chan             1735 drivers/net/wireless/ath/wil6210/cfg80211.c 		     chan->center_freq, duration, wdev->iftype);
chan             1737 drivers/net/wireless/ath/wil6210/cfg80211.c 	rc = wil_p2p_listen(wil, wdev, duration, chan, cookie);
chan             1922 drivers/net/wireless/ath/wil6210/cfg80211.c 				  int bi, u8 chan, u8 wmi_edmg_channel,
chan             1984 drivers/net/wireless/ath/wil6210/cfg80211.c 	vif->channel = chan;
chan             1996 drivers/net/wireless/ath/wil6210/cfg80211.c 	rc = wmi_pcp_start(vif, bi, wmi_nettype, chan, wmi_edmg_channel,
chan             2117 drivers/net/wireless/ath/wil6210/cfg80211.c 	struct ieee80211_channel *channel = info->chandef.chan;
chan             1408 drivers/net/wireless/ath/wil6210/debugfs.c 	u32 freq = wdev->chandef.chan ? wdev->chandef.chan->center_freq : 0;
chan              137 drivers/net/wireless/ath/wil6210/p2p.c 		   unsigned int duration, struct ieee80211_channel *chan,
chan              144 drivers/net/wireless/ath/wil6210/p2p.c 	if (!chan)
chan              157 drivers/net/wireless/ath/wil6210/p2p.c 	memcpy(&p2p->listen_chan, chan, sizeof(*chan));
chan              180 drivers/net/wireless/ath/wil6210/p2p.c 	cfg80211_ready_on_channel(wdev, *cookie, chan, duration,
chan              336 drivers/net/wireless/ath/wil6210/txrx.c 	struct ieee80211_channel *ch = wil->monitor_chandef.chan;
chan             1311 drivers/net/wireless/ath/wil6210/wil6210.h 		   unsigned int duration, struct ieee80211_channel *chan,
chan             1351 drivers/net/wireless/ath/wil6210/wil6210.h int wmi_pcp_start(struct wil6210_vif *vif, int bi, u8 wmi_nettype, u8 chan,
chan              882 drivers/net/wireless/ath/wil6210/wmi.c 			.chan = channel,
chan             1448 drivers/net/wireless/ath/wil6210/wmi.c 	bss_data.chan = channel;
chan             2186 drivers/net/wireless/ath/wil6210/wmi.c 		  u8 chan, u8 wmi_edmg_chan, u8 hidden_ssid, u8 is_go)
chan             2195 drivers/net/wireless/ath/wil6210/wmi.c 		.channel = chan - 1,
chan             2621 drivers/net/wireless/ath/wil6210/wmi.c 		struct ieee80211_channel *ch = wil->monitor_chandef.chan;
chan             2017 drivers/net/wireless/atmel/at76c50x-usb.c 		 __func__, hw->conf.chandef.chan->hw_value);
chan             2022 drivers/net/wireless/atmel/at76c50x-usb.c 	priv->channel = hw->conf.chandef.chan->hw_value;
chan             1000 drivers/net/wireless/broadcom/b43/b43.h 	return wl->hw->conf.chandef.chan->band;
chan             3881 drivers/net/wireless/broadcom/b43/main.c 			   struct ieee80211_channel *chan)
chan             3887 drivers/net/wireless/broadcom/b43/main.c 	switch (chan->band) {
chan             3902 drivers/net/wireless/broadcom/b43/main.c 		       band_to_string(chan->band));
chan             3912 drivers/net/wireless/broadcom/b43/main.c 	       band_to_string(chan->band));
chan             3990 drivers/net/wireless/broadcom/b43/main.c 		phy->channel = conf->chandef.chan->hw_value;
chan             3993 drivers/net/wireless/broadcom/b43/main.c 		err = b43_switch_band(dev, conf->chandef.chan);
chan             5163 drivers/net/wireless/broadcom/b43/main.c 	survey->channel = conf->chandef.chan;
chan               94 drivers/net/wireless/broadcom/b43/phy_common.c 		phy->channel = phy->chandef->chan->hw_value;
chan              630 drivers/net/wireless/broadcom/b43/phy_ht.c 	u16 freq = dev->phy.chandef->chan->center_freq;
chan             1063 drivers/net/wireless/broadcom/b43/phy_ht.c 	struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
chan              778 drivers/net/wireless/broadcom/b43/phy_lcn.c 	struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
chan             1618 drivers/net/wireless/broadcom/b43/phy_lp.c struct lpphy_rx_iq_comp { u8 chan; s8 c1, c0; };
chan             1621 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 1, .c1 = -66, .c0 = 15, },
chan             1622 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 2, .c1 = -66, .c0 = 15, },
chan             1623 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 3, .c1 = -66, .c0 = 15, },
chan             1624 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 4, .c1 = -66, .c0 = 15, },
chan             1625 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 5, .c1 = -66, .c0 = 15, },
chan             1626 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 6, .c1 = -66, .c0 = 15, },
chan             1627 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 7, .c1 = -66, .c0 = 14, },
chan             1628 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 8, .c1 = -66, .c0 = 14, },
chan             1629 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 9, .c1 = -66, .c0 = 14, },
chan             1630 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 10, .c1 = -66, .c0 = 14, },
chan             1631 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 11, .c1 = -66, .c0 = 14, },
chan             1632 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 12, .c1 = -66, .c0 = 13, },
chan             1633 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 13, .c1 = -66, .c0 = 13, },
chan             1634 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 14, .c1 = -66, .c0 = 13, },
chan             1638 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 1, .c1 = -64, .c0 = 13, },
chan             1639 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 2, .c1 = -64, .c0 = 13, },
chan             1640 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 3, .c1 = -64, .c0 = 13, },
chan             1641 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 4, .c1 = -64, .c0 = 13, },
chan             1642 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 5, .c1 = -64, .c0 = 12, },
chan             1643 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 6, .c1 = -64, .c0 = 12, },
chan             1644 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 7, .c1 = -64, .c0 = 12, },
chan             1645 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 8, .c1 = -64, .c0 = 12, },
chan             1646 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 9, .c1 = -64, .c0 = 12, },
chan             1647 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 10, .c1 = -64, .c0 = 11, },
chan             1648 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 11, .c1 = -64, .c0 = 11, },
chan             1649 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 12, .c1 = -64, .c0 = 11, },
chan             1650 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 13, .c1 = -64, .c0 = 11, },
chan             1651 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 14, .c1 = -64, .c0 = 10, },
chan             1652 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 34, .c1 = -62, .c0 = 24, },
chan             1653 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 38, .c1 = -62, .c0 = 24, },
chan             1654 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 42, .c1 = -62, .c0 = 24, },
chan             1655 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 46, .c1 = -62, .c0 = 23, },
chan             1656 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 36, .c1 = -62, .c0 = 24, },
chan             1657 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 40, .c1 = -62, .c0 = 24, },
chan             1658 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 44, .c1 = -62, .c0 = 23, },
chan             1659 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 48, .c1 = -62, .c0 = 23, },
chan             1660 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 52, .c1 = -62, .c0 = 23, },
chan             1661 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 56, .c1 = -62, .c0 = 22, },
chan             1662 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 60, .c1 = -62, .c0 = 22, },
chan             1663 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 64, .c1 = -62, .c0 = 22, },
chan             1664 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 100, .c1 = -62, .c0 = 16, },
chan             1665 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 104, .c1 = -62, .c0 = 16, },
chan             1666 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 108, .c1 = -62, .c0 = 15, },
chan             1667 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 112, .c1 = -62, .c0 = 14, },
chan             1668 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 116, .c1 = -62, .c0 = 14, },
chan             1669 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 120, .c1 = -62, .c0 = 13, },
chan             1670 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 124, .c1 = -62, .c0 = 12, },
chan             1671 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 128, .c1 = -62, .c0 = 12, },
chan             1672 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 132, .c1 = -62, .c0 = 12, },
chan             1673 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 136, .c1 = -62, .c0 = 11, },
chan             1674 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 140, .c1 = -62, .c0 = 10, },
chan             1675 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 149, .c1 = -61, .c0 = 9, },
chan             1676 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 153, .c1 = -61, .c0 = 9, },
chan             1677 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 157, .c1 = -61, .c0 = 9, },
chan             1678 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 161, .c1 = -61, .c0 = 8, },
chan             1679 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 165, .c1 = -61, .c0 = 8, },
chan             1680 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 184, .c1 = -62, .c0 = 25, },
chan             1681 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 188, .c1 = -62, .c0 = 25, },
chan             1682 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 192, .c1 = -62, .c0 = 25, },
chan             1683 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 196, .c1 = -62, .c0 = 25, },
chan             1684 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 200, .c1 = -62, .c0 = 25, },
chan             1685 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 204, .c1 = -62, .c0 = 25, },
chan             1686 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 208, .c1 = -62, .c0 = 25, },
chan             1687 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 212, .c1 = -62, .c0 = 25, },
chan             1688 drivers/net/wireless/broadcom/b43/phy_lp.c 	{ .chan = 216, .c1 = -62, .c0 = 26, },
chan             1692 drivers/net/wireless/broadcom/b43/phy_lp.c 	.chan = 0,
chan             1853 drivers/net/wireless/broadcom/b43/phy_lp.c 			if (lpphy_5354_iq_table[i].chan == lpphy->channel) {
chan             1861 drivers/net/wireless/broadcom/b43/phy_lp.c 			if (lpphy_rev0_1_iq_table[i].chan == lpphy->channel) {
chan             1236 drivers/net/wireless/broadcom/b43/phy_n.c 		u16 freq = phy->chandef->chan->center_freq;
chan             2281 drivers/net/wireless/broadcom/b43/phy_n.c 		nphy->rssical_chanspec_2G.center_freq = phy->chandef->chan->center_freq;
chan             2283 drivers/net/wireless/broadcom/b43/phy_n.c 		nphy->rssical_chanspec_5G.center_freq = phy->chandef->chan->center_freq;
chan             3055 drivers/net/wireless/broadcom/b43/phy_n.c 			u16 freq = phy->chandef->chan->center_freq;
chan             3744 drivers/net/wireless/broadcom/b43/phy_n.c 	u16 freq = phy->chandef->chan->center_freq;
chan             3939 drivers/net/wireless/broadcom/b43/phy_n.c 	if (phy->chandef->chan->flags & IEEE80211_CHAN_NO_IR)
chan             4056 drivers/net/wireless/broadcom/b43/phy_n.c 	u16 freq = phy->chandef->chan->center_freq;
chan             5272 drivers/net/wireless/broadcom/b43/phy_n.c 	iqcal_chanspec->center_freq = dev->phy.chandef->chan->center_freq;
chan             5573 drivers/net/wireless/broadcom/b43/phy_n.c 						phy->chandef->chan->center_freq;
chan             5611 drivers/net/wireless/broadcom/b43/phy_n.c 	    nphy->txiqlocal_chanspec.center_freq != dev->phy.chandef->chan->center_freq ||
chan             5882 drivers/net/wireless/broadcom/b43/phy_n.c 	struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
chan             5897 drivers/net/wireless/broadcom/b43/phy_n.c 	max = INT_TO_Q52(phy->chandef->chan->max_power);
chan             6675 drivers/net/wireless/broadcom/b43/phy_n.c 	struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan;
chan             2690 drivers/net/wireless/broadcom/b43legacy/main.c 	switch (conf->chandef.chan->band) {
chan             2718 drivers/net/wireless/broadcom/b43legacy/main.c 	if (conf->chandef.chan->hw_value != phy->channel)
chan             2719 drivers/net/wireless/broadcom/b43legacy/main.c 		b43legacy_radio_selectchannel(dev, conf->chandef.chan->hw_value,
chan             3525 drivers/net/wireless/broadcom/b43legacy/main.c 	survey->channel = conf->chandef.chan;
chan              252 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		  ch->chan->center_freq, ch->center_freq1, ch->width);
chan              254 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	primary_offset = ch->chan->center_freq - ch->center_freq1;
chan              304 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	switch (ch->chan->band) {
chan             1354 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	if (params->chandef.chan)
chan             1356 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			  params->chandef.chan->center_freq);
chan             1428 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	if (params->chandef.chan) {
chan             1433 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 				params->chandef.chan->center_freq);
chan             1886 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	struct ieee80211_channel *chan = sme->channel;
chan             1939 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	if (chan) {
chan             1941 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			ieee80211_frequency_to_channel(chan->center_freq);
chan             1942 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		chanspec = channel_to_chanspec(&cfg->d11inf, chan);
chan             1944 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			  cfg->channel, chan->center_freq, chanspec);
chan             2831 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	bss_data.chan = ieee80211_get_channel(wiphy, freq);
chan             3248 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	struct ieee80211_channel *chan;
chan             3261 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	chan = ieee80211_get_channel(req->wiphy, freq);
chan             3262 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	if (!chan)
chan             3266 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		if (req->channels[i] == chan)
chan             3270 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		req->channels[req->n_channels++] = chan;
chan             4483 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		  settings->chandef.chan->hw_value,
chan             4864 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	struct ieee80211_channel *chan = params->chan;
chan             4938 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 		if (chan)
chan             4939 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			freq = chan->center_freq;
chan             5044 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	chandef->chan = ieee80211_get_channel(wiphy, freq);
chan             5652 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 	struct ieee80211_channel *chan;
chan             5668 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			chan = ieee80211_get_channel(cfg->wiphy, cfg->channel);
chan             5670 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c 			cfg80211_ibss_joined(ndev, e->addr, chan, GFP_KERNEL);
chan              800 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c 			struct ieee80211_channel *chan = request->channels[i];
chan              802 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c 			if (chan->flags & (IEEE80211_CHAN_RADAR |
chan              807 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c 							   chan);
chan              809 drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c 				  num_nodfs, chan->hw_value, chanspecs[i]);
chan              273 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c 	u16 chan;
chan              281 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c 		chan = r->channels[i]->hw_value;
chan              282 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c 		brcmf_dbg(SCAN, "[%d] Chan : %u\n", n_chan, chan);
chan              283 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c 		pno_cfg->channel_list[n_chan++] = cpu_to_le16(chan);
chan              536 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c #define RETRYCHAN(chan) ((chan) == SDPCM_EVENT_CHANNEL)
chan             2152 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 		      uint chan)
chan             2192 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 		hd_info.channel = chan;
chan             2200 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 		    ((BRCMF_CTL_ON() && chan == SDPCM_CONTROL_CHANNEL) ||
chan             2201 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 		     (BRCMF_DATA_ON() && chan != SDPCM_CONTROL_CHANNEL)))
chan             2262 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 			    uint chan)
chan             2269 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c 	ret = brcmf_sdio_txpkt_prep(bus, pktq, chan);
chan              377 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 	struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.chandef.chan;
chan              402 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 	struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.chandef.chan;
chan              404 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 	uint chan;
chan              422 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 	chan = CHSPEC_CHANNEL(chanspec);
chan              465 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 		maxpwr_idx = (chan - 1);
chan              467 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 		maxpwr_idx = CHANNEL_POWER_IDX_5G(chan);
chan              503 drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c 			if (chan >= 3 && chan <= 11)
chan              570 drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c 						  conf->chandef.chan->hw_value);
chan             5085 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c 		ch = wlc->pub->ieee_hw->conf.chandef.chan;
chan             7854 drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c 	struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.chandef.chan;
chan               41 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 	u16 chan;
chan             1229 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		if (chan_info_all[i].chan == channel)
chan             1245 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		channel = chan_info_all[i].chan;
chan             1265 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		channel = chan_info_all[i].chan;
chan             1271 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 				if (chan_info_all[j].chan ==
chan             1422 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 			if (channel == chan_info_all[i].chan)
chan             1445 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, uint chan,
chan             1462 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c 		wlc_phy_txpower_sromlimit(ppi, chan, &mintxpwr, &maxtxpwr,
chan             1527 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c wlc_user_txpwr_antport_to_rfport(struct brcms_phy *pi, uint chan, u32 band,
chan              216 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_hal.h void wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint chan, u8 *_min_,
chan              218 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_hal.h void wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, uint chan,
chan               65 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_int.h #define CHAN5G_FREQ(chan)  (5000 + chan*5)
chan               66 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_int.h #define CHAN2G_FREQ(chan)  (2407 + chan*5)
chan              975 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_int.h void wlc_phy_txpower_sromlimit_get_nphy(struct brcms_phy *pi, uint chan,
chan             1065 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_int.h u8 wlc_phy_get_chan_freq_range_nphy(struct brcms_phy *pi, uint chan);
chan              157 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c 	u8 chan;
chan              537 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c 	uint chan;
chan             1382 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c 			if (iqcomp[iqcomp_sz].chan ==
chan             1691 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c 			if (chan_info_2064_lcnphy[i].chan == channel)
chan              280 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 	u16 chan;
chan              314 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 	u16 chan;
chan              362 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 	u16 chan;
chan              401 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 	u16 chan;
chan             20309 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 				if (chan_info_tbl_p_2[i].chan == channel)
chan             20313 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 				if (chan_info_tbl_p_0[i].chan == channel)
chan             20368 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 			if (chan_info_tbl_p_1[i].chan == channel)
chan             20380 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 			if (chan_info_nphy_2055[i].chan == channel)
chan             28557 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c wlc_phy_txpower_sromlimit_get_nphy(struct brcms_phy *pi, uint chan, u8 *max_pwr,
chan             28562 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c 	chan_freq_range = wlc_phy_get_chan_freq_range_nphy(pi, chan);
chan             1991 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	u32 chan;
chan             2020 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	ret = ipw2100_get_ordinal(priv, IPW_ORD_OUR_FREQ, &chan, &len);
chan             2057 drivers/net/wireless/intel/ipw2x00/ipw2100.c 		       txratename, chan, bssid);
chan             2064 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	priv->channel = chan;
chan             4111 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	u32 chan = 0;
chan             4136 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	ret = ipw2100_get_ordinal(priv, IPW_ORD_OUR_FREQ, &chan, &length);
chan             4143 drivers/net/wireless/intel/ipw2x00/ipw2100.c 	out += sprintf(out, "Channel: %d\n", chan);
chan             1533 drivers/net/wireless/intel/iwlegacy/3945-mac.c 	struct ieee80211_channel *chan;
chan             1551 drivers/net/wireless/intel/iwlegacy/3945-mac.c 		chan = il->scan_request->channels[i];
chan             1553 drivers/net/wireless/intel/iwlegacy/3945-mac.c 		if (chan->band != band)
chan             1556 drivers/net/wireless/intel/iwlegacy/3945-mac.c 		scan_ch->channel = chan->hw_value;
chan             1571 drivers/net/wireless/intel/iwlegacy/3945-mac.c 		    (chan->flags & IEEE80211_CHAN_NO_IR)) {
chan              334 drivers/net/wireless/intel/iwlegacy/3945-rs.c 	sband = hw->wiphy->bands[conf->chandef.chan->band];
chan             1389 drivers/net/wireless/intel/iwlegacy/3945.c 	u16 chan;
chan             1396 drivers/net/wireless/intel/iwlegacy/3945.c 	chan = le16_to_cpu(il->active.channel);
chan             1399 drivers/net/wireless/intel/iwlegacy/3945.c 	ch_info = il_get_channel_info(il, il->band, chan);
chan             1401 drivers/net/wireless/intel/iwlegacy/3945.c 		IL_ERR("Failed to get channel info for channel %d [%d]\n", chan,
chan              758 drivers/net/wireless/intel/iwlegacy/4965-mac.c 	struct ieee80211_channel *chan;
chan              777 drivers/net/wireless/intel/iwlegacy/4965-mac.c 		chan = il->scan_request->channels[i];
chan              779 drivers/net/wireless/intel/iwlegacy/4965-mac.c 		if (chan->band != band)
chan              782 drivers/net/wireless/intel/iwlegacy/4965-mac.c 		channel = chan->hw_value;
chan              793 drivers/net/wireless/intel/iwlegacy/4965-mac.c 		    (chan->flags & IEEE80211_CHAN_NO_IR))
chan             5167 drivers/net/wireless/intel/iwlegacy/4965-mac.c 	int i, chan;
chan             5190 drivers/net/wireless/intel/iwlegacy/4965-mac.c 	for (chan = 0; chan < FH49_TCSR_CHNL_NUM; chan++)
chan             5191 drivers/net/wireless/intel/iwlegacy/4965-mac.c 		il_wr(il, FH49_TCSR_CHNL_TX_CONFIG_REG(chan),
chan             6059 drivers/net/wireless/intel/iwlegacy/4965-mac.c 	struct ieee80211_channel *channel = ch_switch->chandef.chan;
chan             2281 drivers/net/wireless/intel/iwlegacy/4965-rs.c 	sband = hw->wiphy->bands[conf->chandef.chan->band];
chan             1481 drivers/net/wireless/intel/iwlegacy/4965.c 	ch = ch_switch->chandef.chan->hw_value;
chan             5023 drivers/net/wireless/intel/iwlegacy/common.c 	struct ieee80211_channel *channel = conf->chandef.chan;
chan              410 drivers/net/wireless/intel/iwlwifi/dvm/devices.c 	ch = ch_switch->chandef.chan->hw_value;
chan              446 drivers/net/wireless/intel/iwlwifi/dvm/devices.c 		ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR;
chan              578 drivers/net/wireless/intel/iwlwifi/dvm/devices.c 	ch = ch_switch->chandef.chan->hw_value;
chan              614 drivers/net/wireless/intel/iwlwifi/dvm/devices.c 		ch_switch->chandef.chan->flags & IEEE80211_CHAN_RADAR;
chan              938 drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c 	struct ieee80211_channel *channel = ch_switch->chandef.chan;
chan             2788 drivers/net/wireless/intel/iwlwifi/dvm/rs.c 	sband = hw->wiphy->bands[conf->chandef.chan->band];
chan               68 drivers/net/wireless/intel/iwlwifi/dvm/rxon.c 		cpu_to_le16(priv->hw->conf.chandef.chan->hw_value);
chan               69 drivers/net/wireless/intel/iwlwifi/dvm/rxon.c 	priv->band = priv->hw->conf.chandef.chan->band;
chan              932 drivers/net/wireless/intel/iwlwifi/dvm/rxon.c 		sband = priv->hw->wiphy->bands[priv->hw->conf.chandef.chan->band];
chan             1162 drivers/net/wireless/intel/iwlwifi/dvm/rxon.c 	struct ieee80211_channel *channel = conf->chandef.chan;
chan              499 drivers/net/wireless/intel/iwlwifi/dvm/scan.c 	struct ieee80211_channel *chan;
chan              517 drivers/net/wireless/intel/iwlwifi/dvm/scan.c 		chan = priv->scan_request->channels[i];
chan              519 drivers/net/wireless/intel/iwlwifi/dvm/scan.c 		if (chan->band != band)
chan              522 drivers/net/wireless/intel/iwlwifi/dvm/scan.c 		channel = chan->hw_value;
chan              525 drivers/net/wireless/intel/iwlwifi/dvm/scan.c 		if (!is_active || (chan->flags & IEEE80211_CHAN_NO_IR))
chan              396 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		struct ieee80211_channel *chan = &data->channels[ch_idx];
chan              399 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		if (txp->channel != 0 && chan->hw_value != txp->channel)
chan              403 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		if (band != chan->band)
chan              406 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		if (chan->max_power < max_txpower_avg &&
chan              408 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 			chan->max_power = max_txpower_avg;
chan              530 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 	struct ieee80211_channel *chan = NULL;
chan              538 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		chan = &data->channels[i];
chan              542 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 	if (!chan)
chan              561 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		chan->flags &= ~clear_ht40_extension_channel;
chan              710 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 	struct ieee80211_channel *chan = &data->channels[0];
chan              713 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 	while (idx < n_channels && chan->band != band)
chan              714 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		chan = &data->channels[++idx];
chan              718 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 	while (idx < n_channels && chan->band == band) {
chan              719 drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c 		chan = &data->channels[++idx];
chan              257 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c 					       int chan, u32 flags)
chan              264 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c 			      chan, flags);
chan              271 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c 		      chan, flags,
chan              167 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 	     chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) {
chan              346 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 	     chanctx_conf->def.chan->band != NL80211_BAND_2GHZ)) {
chan              487 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		struct ieee80211_chanctx_conf *chan = data.primary;
chan              488 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		if (WARN_ON(!chan->def.chan)) {
chan              493 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		if (chan->def.width < NL80211_CHAN_WIDTH_40) {
chan              496 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			if (chan->def.center_freq1 >
chan              497 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			    chan->def.chan->center_freq)
chan              504 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			iwl_ci_mask[chan->def.chan->hw_value][ci_bw_idx];
chan              510 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		struct ieee80211_chanctx_conf *chan = data.secondary;
chan              511 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		if (WARN_ON(!data.secondary->def.chan)) {
chan              516 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 		if (chan->def.width < NL80211_CHAN_WIDTH_40) {
chan              519 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			if (chan->def.center_freq1 >
chan              520 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			    chan->def.chan->center_freq)
chan              527 drivers/net/wireless/intel/iwlwifi/mvm/coex.c 			iwl_ci_mask[chan->def.chan->hw_value][ci_bw_idx];
chan              218 drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c 	u32 freq = peer->chandef.chan->center_freq;
chan               72 drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c 		.channel_num = chandef->chan->hw_value,
chan             1317 drivers/net/wireless/intel/iwlwifi/mvm/fw.c 	struct ieee80211_channel *chan;
chan             1416 drivers/net/wireless/intel/iwlwifi/mvm/fw.c 	chan = &sband->channels[0];
chan             1418 drivers/net/wireless/intel/iwlwifi/mvm/fw.c 	cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT);
chan              542 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c 	iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
chan             2994 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 	if (!(vif->bss_conf.chandef.chan->flags & IEEE80211_CHAN_RADAR)) {
chan             4517 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 		mvmvif->csa_target_freq = chsw->chandef.chan->center_freq;
chan             2104 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 					 u32 chan, u8 band, u8 width,
chan             2108 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 		ci->channel = cpu_to_le32(chan);
chan             2116 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 		ci_v1->channel = chan;
chan             2128 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 	iwl_mvm_set_chan_info(mvm, ci, chandef->chan->hw_value,
chan             2129 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h 			      (chandef->chan->band == NL80211_BAND_2GHZ ?
chan               93 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 	switch (chandef->chan->center_freq - chandef->center_freq1) {
chan              222 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 	ctxt->channel = chandef->chan;
chan              254 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 	    ctxt->channel->band != chandef->chan->band) {
chan              268 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 	ctxt->channel = chandef->chan;
chan              290 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 		struct ieee80211_channel *chan;
chan              301 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 		chan = &sband->channels[0];
chan              303 drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c 		cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT);
chan              340 drivers/net/wireless/intel/iwlwifi/mvm/power.c 	struct ieee80211_channel *chan;
chan              347 drivers/net/wireless/intel/iwlwifi/mvm/power.c 		chan = chanctx_conf->def.chan;
chan              348 drivers/net/wireless/intel/iwlwifi/mvm/power.c 		radar_detect = chan->flags & IEEE80211_CHAN_RADAR;
chan             2029 drivers/net/wireless/intel/iwlwifi/mvm/rs.c 		band = chanctx_conf->def.chan->band;
chan              426 drivers/net/wireless/intel/iwlwifi/mvm/tdls.c 		    mvm->tdls_cs.peer.chandef.chan) {
chan              564 drivers/net/wireless/intel/iwlwifi/mvm/tdls.c 		       sta->addr, chandef->chan->center_freq, chandef->width);
chan              790 drivers/net/wireless/intel/iwlwifi/mvm/tx.c 	enum nl80211_band band = mvmsta->vif->bss_conf.chandef.chan->band;
chan             1875 drivers/net/wireless/intel/iwlwifi/mvm/tx.c 		ba_info->band = chanctx_conf->def.chan->band;
chan              752 drivers/net/wireless/intel/iwlwifi/pcie/tx.c 	int chan;
chan              789 drivers/net/wireless/intel/iwlwifi/pcie/tx.c 	for (chan = 0; chan < FH_TCSR_CHNL_NUM; chan++)
chan              790 drivers/net/wireless/intel/iwlwifi/pcie/tx.c 		iwl_write_direct32(trans, FH_TCSR_CHNL_TX_CONFIG_REG(chan),
chan              396 drivers/net/wireless/intersil/hostap/hostap_80211_rx.c 	int left, chan = 0;
chan              431 drivers/net/wireless/intersil/hostap/hostap_80211_rx.c 				chan = pos[2];
chan              463 drivers/net/wireless/intersil/hostap/hostap_80211_rx.c 		bss->chan = chan;
chan             2790 drivers/net/wireless/intersil/hostap/hostap_hw.c 	u16 chan;
chan             2827 drivers/net/wireless/intersil/hostap/hostap_hw.c 		chan = local->passive_scan_channel;
chan             2831 drivers/net/wireless/intersil/hostap/hostap_hw.c 		chan = local->channel;
chan             2839 drivers/net/wireless/intersil/hostap/hostap_hw.c 				 chan, NULL, 0))
chan             2841 drivers/net/wireless/intersil/hostap/hostap_hw.c 		       "failed\n", dev->name, chan);
chan             1781 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 	int i, chan;
chan             1839 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 		chan = le16_to_cpu(scan->chid);
chan             1841 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 		chan = bss->chan;
chan             1843 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 		chan = 0;
chan             1846 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 	if (chan > 0) {
chan             1847 drivers/net/wireless/intersil/hostap/hostap_ioctl.c 		iwe.u.freq.m = freq_list[chan - 1] * 100000;
chan              637 drivers/net/wireless/intersil/hostap/hostap_wlan.h 	int chan;
chan              172 drivers/net/wireless/intersil/orinoco/cfg.c 	if (!chandef->chan)
chan              178 drivers/net/wireless/intersil/orinoco/cfg.c 	if (chandef->chan->band != NL80211_BAND_2GHZ)
chan              181 drivers/net/wireless/intersil/orinoco/cfg.c 	channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
chan              146 drivers/net/wireless/intersil/orinoco/scan.c 	int chan, freq;
chan              150 drivers/net/wireless/intersil/orinoco/scan.c 	chan = ie ? ie[2] : 0;
chan              151 drivers/net/wireless/intersil/orinoco/scan.c 	freq = ieee80211_channel_to_frequency(chan, NL80211_BAND_2GHZ);
chan              427 drivers/net/wireless/intersil/orinoco/wext.c 	int chan = -1;
chan              437 drivers/net/wireless/intersil/orinoco/wext.c 		chan = frq->m;
chan              447 drivers/net/wireless/intersil/orinoco/wext.c 		chan = ieee80211_frequency_to_channel(frq->m / denom);
chan              450 drivers/net/wireless/intersil/orinoco/wext.c 	if ((chan < 1) || (chan > NUM_CHANNELS) ||
chan              451 drivers/net/wireless/intersil/orinoco/wext.c 	     !(priv->channel_mask & (1 << (chan - 1))))
chan              457 drivers/net/wireless/intersil/orinoco/wext.c 	priv->channel = chan;
chan              463 drivers/net/wireless/intersil/orinoco/wext.c 					chan, NULL);
chan              173 drivers/net/wireless/intersil/p54/eeprom.c 		struct p54_channel_entry *chan = &list->channels[i];
chan              176 drivers/net/wireless/intersil/p54/eeprom.c 		if (chan->band != band)
chan              179 drivers/net/wireless/intersil/p54/eeprom.c 		if (chan->data != CHAN_HAS_ALL) {
chan              182 drivers/net/wireless/intersil/p54/eeprom.c 				  (chan->data & CHAN_HAS_CAL ? "" :
chan              184 drivers/net/wireless/intersil/p54/eeprom.c 				  (chan->data & CHAN_HAS_LIMIT ? "" :
chan              186 drivers/net/wireless/intersil/p54/eeprom.c 				  (chan->data & CHAN_HAS_CURVE ? "" :
chan              188 drivers/net/wireless/intersil/p54/eeprom.c 				  chan->index, chan->freq);
chan              192 drivers/net/wireless/intersil/p54/eeprom.c 		dest->band = chan->band;
chan              193 drivers/net/wireless/intersil/p54/eeprom.c 		dest->center_freq = chan->freq;
chan              194 drivers/net/wireless/intersil/p54/eeprom.c 		dest->max_power = chan->max_power;
chan              403 drivers/net/wireless/intersil/p54/fwio.c 	__le16 freq = cpu_to_le16(priv->hw->conf.chandef.chan->center_freq);
chan              482 drivers/net/wireless/intersil/p54/fwio.c 			struct p54_scan_body *chan = &body->normal;
chan              487 drivers/net/wireless/intersil/p54/fwio.c 			chan->pa_points_per_curve = 8;
chan              488 drivers/net/wireless/intersil/p54/fwio.c 			memset(chan->curve_data, 0, sizeof(chan->curve_data));
chan              489 drivers/net/wireless/intersil/p54/fwio.c 			memcpy(chan->curve_data, entry,
chan              533 drivers/net/wireless/intersil/p54/fwio.c 			  priv->hw->conf.chandef.chan->center_freq));
chan              299 drivers/net/wireless/intersil/p54/main.c 	struct ieee80211_channel *chan = priv->curchan;
chan              301 drivers/net/wireless/intersil/p54/main.c 	if (chan) {
chan              302 drivers/net/wireless/intersil/p54/main.c 		struct survey_info *info = &priv->survey[chan->hw_value];
chan              339 drivers/net/wireless/intersil/p54/main.c 		priv->curchan = priv->hw->conf.chandef.chan;
chan              474 drivers/net/wireless/intersil/p54/main.c 		if (dev->conf.chandef.chan->band == NL80211_BAND_5GHZ)
chan              607 drivers/net/wireless/intersil/p54/main.c 	struct ieee80211_channel *chan;
chan              616 drivers/net/wireless/intersil/p54/main.c 		chan = priv->curchan;
chan              617 drivers/net/wireless/intersil/p54/main.c 		if (chan && chan->hw_value == idx) {
chan              357 drivers/net/wireless/intersil/p54/txrx.c 	if (priv->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ)
chan              363 drivers/net/wireless/intersil/p54/txrx.c 	rx_status->band =  priv->hw->conf.chandef.chan->band;
chan              521 drivers/net/wireless/intersil/p54/txrx.c 	struct ieee80211_channel *chan;
chan              592 drivers/net/wireless/intersil/p54/txrx.c 	chan = priv->curchan;
chan              593 drivers/net/wireless/intersil/p54/txrx.c 	if (chan) {
chan              594 drivers/net/wireless/intersil/p54/txrx.c 		struct survey_info *survey = &priv->survey[chan->hw_value];
chan              626 drivers/net/wireless/mac80211_hwsim.c 				    struct ieee80211_channel *chan);
chan              656 drivers/net/wireless/mac80211_hwsim.c 				rcu_dereference(vif->chanctx_conf)->def.chan);
chan              689 drivers/net/wireless/mac80211_hwsim.c 				rcu_dereference(vif->chanctx_conf)->def.chan);
chan              831 drivers/net/wireless/mac80211_hwsim.c 				      struct ieee80211_channel *chan)
chan              861 drivers/net/wireless/mac80211_hwsim.c 	hdr->rt_channel = cpu_to_le16(chan->center_freq);
chan              879 drivers/net/wireless/mac80211_hwsim.c static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
chan              902 drivers/net/wireless/mac80211_hwsim.c 	hdr->rt_channel = cpu_to_le16(chan->center_freq);
chan             1163 drivers/net/wireless/mac80211_hwsim.c 				rcu_dereference(vif->chanctx_conf)->def.chan))
chan             1218 drivers/net/wireless/mac80211_hwsim.c 					  struct ieee80211_channel *chan)
chan             1229 drivers/net/wireless/mac80211_hwsim.c 	rx_status.freq = chan->center_freq;
chan             1230 drivers/net/wireless/mac80211_hwsim.c 	rx_status.band = chan->band;
chan             1288 drivers/net/wireless/mac80211_hwsim.c 			.channel = chan,
chan             1304 drivers/net/wireless/mac80211_hwsim.c 		if (!hwsim_chans_compat(chan, data2->tmp_chan) &&
chan             1305 drivers/net/wireless/mac80211_hwsim.c 		    !hwsim_chans_compat(chan, data2->channel)) {
chan             1380 drivers/net/wireless/mac80211_hwsim.c 			channel = chanctx_conf->def.chan;
chan             1518 drivers/net/wireless/mac80211_hwsim.c 				    struct ieee80211_channel *chan)
chan             1530 drivers/net/wireless/mac80211_hwsim.c 	mac80211_hwsim_monitor_rx(hw, skb, chan);
chan             1535 drivers/net/wireless/mac80211_hwsim.c 	mac80211_hwsim_tx_frame_no_nl(hw, skb, chan);
chan             1575 drivers/net/wireless/mac80211_hwsim.c 				rcu_dereference(vif->chanctx_conf)->def.chan);
chan             1627 drivers/net/wireless/mac80211_hwsim.c 	if (conf->chandef.chan)
chan             1631 drivers/net/wireless/mac80211_hwsim.c 			  conf->chandef.chan->center_freq,
chan             1648 drivers/net/wireless/mac80211_hwsim.c 	WARN_ON(conf->chandef.chan && data->use_chanctx);
chan             1651 drivers/net/wireless/mac80211_hwsim.c 	if (data->scanning && conf->chandef.chan) {
chan             1661 drivers/net/wireless/mac80211_hwsim.c 		data->channel = conf->chandef.chan;
chan             1672 drivers/net/wireless/mac80211_hwsim.c 		data->channel = conf->chandef.chan;
chan             2196 drivers/net/wireless/mac80211_hwsim.c 			      struct ieee80211_channel *chan,
chan             2208 drivers/net/wireless/mac80211_hwsim.c 	hwsim->roc_chan = chan;
chan             2213 drivers/net/wireless/mac80211_hwsim.c 		  chan->center_freq, duration);
chan             2242 drivers/net/wireless/mac80211_hwsim.c 		  ctx->def.chan->center_freq, ctx->def.width,
chan             2252 drivers/net/wireless/mac80211_hwsim.c 		  ctx->def.chan->center_freq, ctx->def.width,
chan             2265 drivers/net/wireless/mac80211_hwsim.c 		  ctx->def.chan->center_freq, ctx->def.width,
chan              454 drivers/net/wireless/marvell/libertas/cfg.c 	ret = lbs_set_channel(priv, chandef->chan->hw_value);
chan             1675 drivers/net/wireless/marvell/libertas/cfg.c 	*fake++ = params->chandef.chan->hw_value;
chan             1696 drivers/net/wireless/marvell/libertas/cfg.c 				  params->chandef.chan,
chan             1706 drivers/net/wireless/marvell/libertas/cfg.c 	cfg80211_ibss_joined(priv->dev, bssid, params->chandef.chan,
chan             1772 drivers/net/wireless/marvell/libertas/cfg.c 	cmd.bss.ds.channel = params->chandef.chan->hw_value;
chan             1886 drivers/net/wireless/marvell/libertas/cfg.c 	cmd.ds.channel = params->chandef.chan->hw_value;
chan             1927 drivers/net/wireless/marvell/libertas/cfg.c 	if (!params->chandef.chan) {
chan             1932 drivers/net/wireless/marvell/libertas/cfg.c 	ret = lbs_set_channel(priv, params->chandef.chan->hw_value);
chan             1938 drivers/net/wireless/marvell/libertas/cfg.c 	bss = cfg80211_get_bss(wiphy, params->chandef.chan, params->bssid,
chan               87 drivers/net/wireless/marvell/libertas/mesh.c 		uint16_t chan)
chan               94 drivers/net/wireless/marvell/libertas/mesh.c 	cmd.channel = cpu_to_le16(chan);
chan              128 drivers/net/wireless/marvell/libertas/mesh.c 		    action, priv->mesh_tlv, chan, ie->val.mesh_id_len,
chan               54 drivers/net/wireless/marvell/libertas_tf/cmd.c #define CHAN_TO_IDX(chan) ((chan) - 1)
chan              346 drivers/net/wireless/marvell/libertas_tf/main.c 	if (conf->chandef.chan->center_freq != priv->cur_freq) {
chan              347 drivers/net/wireless/marvell/libertas_tf/main.c 		priv->cur_freq = conf->chandef.chan->center_freq;
chan              348 drivers/net/wireless/marvell/libertas_tf/main.c 		lbtf_set_channel(priv, conf->chandef.chan->hw_value);
chan              468 drivers/net/wireless/marvell/libertas_tf/main.c 	survey->channel = conf->chandef.chan;
chan               64 drivers/net/wireless/marvell/mwifiex/11h.c 	constraint->chan = bss_desc->channel;
chan              157 drivers/net/wireless/marvell/mwifiex/11h.c 	cr_req->chan_desc.chan_num = radar_params->chandef->chan->hw_value;
chan              164 drivers/net/wireless/marvell/mwifiex/11h.c 			    radar_params->chandef->chan->hw_value);
chan              234 drivers/net/wireless/marvell/mwifiex/11h.c 					    priv->dfs_chandef.chan->hw_value);
chan              350 drivers/net/wireless/marvell/mwifiex/11n.c 			struct ieee80211_channel *chan =
chan              355 drivers/net/wireless/marvell/mwifiex/11n.c 				if (chan->flags & IEEE80211_CHAN_NO_HT40PLUS) {
chan              364 drivers/net/wireless/marvell/mwifiex/11n.c 				if (chan->flags & IEEE80211_CHAN_NO_HT40MINUS) {
chan              821 drivers/net/wireless/marvell/mwifiex/11n.c u8 mwifiex_get_sec_chan_offset(int chan)
chan              825 drivers/net/wireless/marvell/mwifiex/11n.c 	switch (chan) {
chan               66 drivers/net/wireless/marvell/mwifiex/11n.h u8 mwifiex_get_sec_chan_offset(int chan);
chan              299 drivers/net/wireless/marvell/mwifiex/cfg80211.c 				   struct ieee80211_channel *chan,
chan              305 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	if (!chan || !cookie) {
chan              317 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_SET, chan,
chan              323 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		priv->roc_cfg.chan = *chan;
chan              325 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		cfg80211_ready_on_channel(wdev, *cookie, chan,
chan              349 drivers/net/wireless/marvell/mwifiex/cfg80211.c 					 &priv->roc_cfg.chan, 0);
chan              353 drivers/net/wireless/marvell/mwifiex/cfg80211.c 						   &priv->roc_cfg.chan,
chan              621 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	struct ieee80211_channel *chan;
chan              629 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		chan = &sband->channels[i];
chan              630 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		if ((!(chan->flags & IEEE80211_CHAN_DISABLED)) &&
chan              631 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		    (chan->flags & IEEE80211_CHAN_RADAR))
chan              632 drivers/net/wireless/marvell/mwifiex/cfg80211.c 			chan->flags |= IEEE80211_CHAN_NO_IR;
chan             1539 drivers/net/wireless/marvell/mwifiex/cfg80211.c 			u32 chan = priv->curr_bss_params.bss_descriptor.channel;
chan             1543 drivers/net/wireless/marvell/mwifiex/cfg80211.c 				ieee80211_channel_to_frequency(chan, band));
chan             2130 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	struct ieee80211_channel *chan;
chan             2148 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	chan = ieee80211_get_channel(priv->wdev.wiphy,
chan             2152 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	bss = cfg80211_inform_bss(priv->wdev.wiphy, chan,
chan             2424 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	if (params->chandef.chan->band == NL80211_BAND_2GHZ) {
chan             2474 drivers/net/wireless/marvell/mwifiex/cfg80211.c 				params->chandef.chan->center_freq);
chan             2512 drivers/net/wireless/marvell/mwifiex/cfg80211.c 				     params->chandef.chan, NULL,
chan             2517 drivers/net/wireless/marvell/mwifiex/cfg80211.c 				     params->chandef.chan, GFP_KERNEL);
chan             2564 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	struct ieee80211_channel *chan;
chan             2620 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		chan = request->channels[i];
chan             2621 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		user_scan_cfg->chan_list[i].chan_number = chan->hw_value;
chan             2622 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		user_scan_cfg->chan_list[i].radio_type = chan->band;
chan             2624 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_IR) || !request->n_ssids)
chan             2675 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	struct ieee80211_channel *chan;
chan             2718 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		chan = request->channels[i];
chan             2719 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		bgscan_cfg->chan_list[i].chan_number = chan->hw_value;
chan             2720 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		bgscan_cfg->chan_list[i].radio_type = chan->band;
chan             2722 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_IR) || !request->n_ssids)
chan             3854 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	u16 chan;
chan             3882 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	chan = chandef->chan->hw_value;
chan             3883 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	second_chan_offset = mwifiex_get_sec_chan_offset(chan);
chan             3884 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	band = chandef->chan->band;
chan             3885 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	mwifiex_start_tdls_cs(priv, addr, chan, second_chan_offset, band);
chan             3996 drivers/net/wireless/marvell/mwifiex/cfg80211.c 	struct ieee80211_channel *chan;
chan             4010 drivers/net/wireless/marvell/mwifiex/cfg80211.c 		chan = ieee80211_get_channel(wiphy, freq);
chan             4014 drivers/net/wireless/marvell/mwifiex/cfg80211.c 			cfg80211_chandef_create(chandef, chan, chan_type);
chan             4016 drivers/net/wireless/marvell/mwifiex/cfg80211.c 			cfg80211_chandef_create(chandef, chan,
chan             1734 drivers/net/wireless/marvell/mwifiex/fw.h 	u8 chan;
chan              513 drivers/net/wireless/marvell/mwifiex/main.h 	struct ieee80211_channel chan;
chan             1516 drivers/net/wireless/marvell/mwifiex/main.h 			       struct ieee80211_channel *chan,
chan             1868 drivers/net/wireless/marvell/mwifiex/scan.c 		struct ieee80211_channel *chan;
chan             1887 drivers/net/wireless/marvell/mwifiex/scan.c 		chan = ieee80211_get_channel(priv->wdev.wiphy, freq);
chan             1889 drivers/net/wireless/marvell/mwifiex/scan.c 		if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
chan             1891 drivers/net/wireless/marvell/mwifiex/scan.c 					    chan, CFG80211_BSS_FTYPE_UNKNOWN,
chan             1906 drivers/net/wireless/marvell/mwifiex/scan.c 				if ((chan->flags & IEEE80211_CHAN_RADAR) ||
chan             1907 drivers/net/wireless/marvell/mwifiex/scan.c 				    (chan->flags & IEEE80211_CHAN_NO_IR)) {
chan             1039 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 		u8 chan;
chan             1042 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 		chan = *buf++;
chan             1043 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 		if (!chan) {
chan             1048 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 		band = (chan <= 14) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
chan             1049 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 		freq = ieee80211_channel_to_frequency(chan, band);
chan             1011 drivers/net/wireless/marvell/mwifiex/sta_event.c 						   &priv->roc_cfg.chan,
chan             1165 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c 			   struct ieee80211_channel *chan,
chan             1174 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c 		roc_cfg.band_cfg = chan->band;
chan             1179 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c 			ieee80211_frequency_to_channel(chan->center_freq);
chan              824 drivers/net/wireless/marvell/mwifiex/uap_cmd.c 						     chandef.chan->center_freq);
chan              827 drivers/net/wireless/marvell/mwifiex/uap_cmd.c 	if (chandef.chan->band == NL80211_BAND_2GHZ) {
chan              851 drivers/net/wireless/marvell/mwifiex/uap_cmd.c 		if (chandef.center_freq1 < chandef.chan->center_freq)
chan              328 drivers/net/wireless/marvell/mwifiex/uap_event.c 						   &priv->roc_cfg.chan,
chan              428 drivers/net/wireless/marvell/mwifiex/util.c 	cfg80211_rx_mgmt(&priv->wdev, priv->roc_cfg.chan.center_freq,
chan             2877 drivers/net/wireless/marvell/mwl8k.c 	struct ieee80211_channel *channel = conf->chandef.chan;
chan             3149 drivers/net/wireless/marvell/mwl8k.c 	struct ieee80211_channel *channel = conf->chandef.chan;
chan             4110 drivers/net/wireless/marvell/mwl8k.c 	if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
chan             4545 drivers/net/wireless/marvell/mwl8k.c 	if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
chan             5026 drivers/net/wireless/marvell/mwl8k.c 		if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
chan             5057 drivers/net/wireless/marvell/mwl8k.c 				if (hw->conf.chandef.chan->band ==
chan             5132 drivers/net/wireless/marvell/mwl8k.c 		if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
chan             5426 drivers/net/wireless/marvell/mwl8k.c 	survey->channel = conf->chandef.chan;
chan              159 drivers/net/wireless/mediatek/mt76/mac80211.c 		const struct ieee80211_channel *chan, int n_chan,
chan              168 drivers/net/wireless/mediatek/mt76/mac80211.c 	size = n_chan * sizeof(*chan);
chan              169 drivers/net/wireless/mediatek/mt76/mac80211.c 	chanlist = devm_kmemdup(dev->dev, chan, size, GFP_KERNEL);
chan              173 drivers/net/wireless/mediatek/mt76/mac80211.c 	msband->chan = devm_kcalloc(dev->dev, n_chan, sizeof(*msband->chan),
chan              175 drivers/net/wireless/mediatek/mt76/mac80211.c 	if (!msband->chan)
chan              182 drivers/net/wireless/mediatek/mt76/mac80211.c 	dev->chandef.chan = &sband->channels[0];
chan              417 drivers/net/wireless/mediatek/mt76/mac80211.c 		dev->main_chan = chandef->chan;
chan              419 drivers/net/wireless/mediatek/mt76/mac80211.c 	if (chandef->chan != dev->main_chan) {
chan              420 drivers/net/wireless/mediatek/mt76/mac80211.c 		state = mt76_channel_state(dev, chandef->chan);
chan              431 drivers/net/wireless/mediatek/mt76/mac80211.c 	struct ieee80211_channel *chan;
chan              447 drivers/net/wireless/mediatek/mt76/mac80211.c 	chan = &sband->sband.channels[idx];
chan              448 drivers/net/wireless/mediatek/mt76/mac80211.c 	state = mt76_channel_state(dev, chan);
chan              451 drivers/net/wireless/mediatek/mt76/mac80211.c 	survey->channel = chan;
chan              453 drivers/net/wireless/mediatek/mt76/mac80211.c 	if (chan == dev->main_chan)
chan              329 drivers/net/wireless/mediatek/mt76/mt76.h 	struct mt76_channel_state *chan;
chan              617 drivers/net/wireless/mediatek/mt76/mt76.h 	return &msband->chan[idx];
chan              471 drivers/net/wireless/mediatek/mt76/mt7603/init.c 	struct ieee80211_channel *chan;
chan              503 drivers/net/wireless/mediatek/mt76/mt7603/init.c 		chan = &sband->channels[i];
chan              504 drivers/net/wireless/mediatek/mt76/mt7603/init.c 		chan->max_power = min_t(int, chan->max_reg_power, target_power);
chan              505 drivers/net/wireless/mediatek/mt76/mt7603/init.c 		chan->orig_mpwr = target_power;
chan               46 drivers/net/wireless/mediatek/mt76/mt7603/mac.c 	if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
chan              567 drivers/net/wireless/mediatek/mt76/mt7603/mac.c 		int band = dev->mt76.chandef.chan->band;
chan             1055 drivers/net/wireless/mediatek/mt76/mt7603/mac.c 		if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
chan             1472 drivers/net/wireless/mediatek/mt76/mt7603/mac.c 	state = mt76_channel_state(&dev->mt76, dev->mt76.chandef.chan);
chan              155 drivers/net/wireless/mediatek/mt76/mt7603/main.c 	if (def->chan->band == NL80211_BAND_5GHZ) {
chan              165 drivers/net/wireless/mediatek/mt76/mt7603/main.c 	idx |= (def->chan -
chan              166 drivers/net/wireless/mediatek/mt76/mt7603/main.c 		mt76_hw(dev)->wiphy->bands[def->chan->band]->channels) << 1;
chan              400 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c 		.center_channel = dev->mt76.chandef.chan->hw_value,
chan              446 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c 		.control_chan = chandef->chan->hw_value,
chan              447 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c 		.center_chan = chandef->chan->hw_value,
chan              457 drivers/net/wireless/mediatek/mt76/mt7603/mcu.c 		if (chandef->center_freq1 > chandef->chan->center_freq)
chan              114 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c 				  struct ieee80211_channel *chan,
chan              123 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c 	if (mt7615_ext_pa_enabled(dev, chan->band)) {
chan              124 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c 		if (chan->band == NL80211_BAND_2GHZ)
chan              131 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c 	if (chan->band == NL80211_BAND_2GHZ) {
chan              134 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c 		int group = mt7615_get_channel_group(chan->hw_value);
chan              190 drivers/net/wireless/mediatek/mt76/mt7615/init.c 		struct ieee80211_channel *chan = &sband->channels[i];
chan              197 drivers/net/wireless/mediatek/mt76/mt7615/init.c 			index = mt7615_eeprom_get_power_index(dev, chan, j);
chan              216 drivers/net/wireless/mediatek/mt76/mt7615/init.c 		chan->max_power = min_t(int, chan->max_reg_power,
chan              218 drivers/net/wireless/mediatek/mt76/mt7615/init.c 		chan->orig_mpwr = target_power;
chan              235 drivers/net/wireless/mediatek/mt76/mt7615/init.c 	if (!(chandef->chan->flags & IEEE80211_CHAN_RADAR))
chan               66 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	status->freq = dev->mt76.chandef.chan->center_freq;
chan               67 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	status->band = dev->mt76.chandef.chan->band;
chan              279 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 		int band = dev->mt76.chandef.chan->band;
chan              937 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 		if (dev->mt76.chandef.chan->band == NL80211_BAND_5GHZ)
chan             1250 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	state = mt76_channel_state(mdev, mdev->chandef.chan);
chan             1350 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	if (dev->dfs_state == chandef->chan->dfs_state)
chan             1353 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	dev->dfs_state = chandef->chan->dfs_state;
chan             1355 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 	if (chandef->chan->flags & IEEE80211_CHAN_RADAR) {
chan             1356 drivers/net/wireless/mediatek/mt76/mt7615/mac.c 		if (chandef->chan->dfs_state != NL80211_DFS_AVAILABLE)
chan             1157 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c 	enum nl80211_band band = chandef->chan->band;
chan             1201 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c 		ret = mt7615_eeprom_get_power_index(dev, chandef->chan, i);
chan             1292 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c 		.control_chan = chandef->chan->hw_value,
chan             1300 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c 	if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
chan             1301 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c 	    chandef->chan->dfs_state != NL80211_DFS_AVAILABLE)
chan              162 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h 				  struct ieee80211_channel *chan,
chan              213 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h 	u32 freq = dev->mt76.chandef.chan->center_freq;
chan              216 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h 	if (hw->conf.chandef.chan->center_freq != freq ||
chan              112 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              118 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 	mt76x02_get_rx_gain(dev, chan->band, &rssi_offset, &lna_2g, lna_5g);
chan              119 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 	caldata->lna_gain = mt76x02_get_lna_gain(dev, &lna_2g, lna_5g, chan);
chan              141 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 		if (chandef->chan->band == NL80211_BAND_5GHZ)
chan              153 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 				  struct ieee80211_channel *chan,
chan              156 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 	bool is_2ghz = chan->band == NL80211_BAND_2GHZ;
chan              213 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 			   struct ieee80211_channel *chan, s8 *tp)
chan              216 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 		u8 chan;
chan              234 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 		if (chan->band == NL80211_BAND_5GHZ)
chan              245 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 		if (chan->hw_value <= chan_map[i].chan) {
chan              246 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 			idx = (chan->hw_value == chan_map[i].chan);
chan              254 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 	if (chan->band == NL80211_BAND_2GHZ) {
chan              257 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c 		switch (chan->hw_value) {
chan               21 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h 				  struct ieee80211_channel *chan,
chan               24 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h 			   struct ieee80211_channel *chan, s8 *tp);
chan              263 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 	struct ieee80211_channel *chan;
chan              269 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 		chan = &sband->channels[i];
chan              271 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 		mt76x0_get_tx_power_per_rate(dev, chan, &t);
chan              272 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 		mt76x0_get_power_info(dev, chan, &tp);
chan              274 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 		chan->orig_mpwr = (mt76x02_get_max_rate_power(&t) + tp) / 2;
chan              275 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 		chan->max_power = min_t(int, chan->max_reg_power,
chan              276 drivers/net/wireless/mediatek/mt76/mt76x0/init.c 					chan->orig_mpwr);
chan              505 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              508 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if (chan->band == NL80211_BAND_5GHZ)
chan              520 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	val = (chan->band == NL80211_BAND_5GHZ) ? 0x80055 : 0x80050;
chan              538 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if (chan->band == NL80211_BAND_5GHZ)
chan              546 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              549 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	val = (chan->band == NL80211_BAND_5GHZ) ? 0x80055 : 0x80050;
chan              558 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if (chan->band == NL80211_BAND_5GHZ)
chan              699 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              705 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if (chan->band == NL80211_BAND_5GHZ) {
chan              715 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 			if (chan->hw_value <= bound[i] || !bound[i])
chan              735 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 		if (chan->band == NL80211_BAND_2GHZ)
chan              775 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if (chan->band == NL80211_BAND_5GHZ) {
chan              847 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	mt76x0_get_tx_power_per_rate(dev, dev->mt76.chandef.chan, t);
chan              848 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	mt76x0_get_power_info(dev, dev->mt76.chandef.chan, &info);
chan              861 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              862 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	int is_5ghz = (chan->band == NL80211_BAND_5GHZ) ? 1 : 0;
chan              870 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 		mt76x02_mcu_calibrate(dev, MCU_CAL_VCO, chan->hw_value);
chan              891 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 		if (chan->hw_value < 100)
chan              893 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 		else if (chan->hw_value < 140)
chan              943 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	freq = chandef->chan->center_freq;
chan              945 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	channel = chandef->chan->hw_value;
chan              981 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	mt76x02_phy_set_band(dev, chandef->chan->band,
chan              992 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	mt76x0_phy_set_band(dev, chandef->chan->band);
chan             1041 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 				      dev->mt76.chandef.chan->hw_value);
chan             1061 drivers/net/wireless/mediatek/mt76/mt76x0/phy.c 	if ((dev->mt76.chandef.chan->flags & IEEE80211_CHAN_RADAR) &&
chan              310 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c 		if (dev->mt76.chandef.chan->center_freq >= 5250 &&
chan              311 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c 		    dev->mt76.chandef.chan->center_freq <= 5350) {
chan              725 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c 		if (dev->mt76.chandef.chan->center_freq >= 5250 &&
chan              726 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c 		    dev->mt76.chandef.chan->center_freq <= 5350)
chan              827 drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c 	if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
chan              132 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 			struct ieee80211_channel *chan)
chan              143 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 	if (chan->band == NL80211_BAND_2GHZ)
chan              145 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 	else if (chan->hw_value <= 64)
chan              147 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c 	else if (chan->hw_value <= 128)
chan              181 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.h 			struct ieee80211_channel *chan);
chan              182 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 		int band = dev->mt76.chandef.chan->band;
chan              469 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 					    dev->mt76.chandef.chan->band);
chan              475 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 					    dev->mt76.chandef.chan->band);
chan              479 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 				    dev->mt76.chandef.chan->band);
chan              787 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 	status->freq = dev->mt76.chandef.chan->center_freq;
chan              788 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 	status->band = dev->mt76.chandef.chan->band;
chan              953 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 	state = mt76_channel_state(&dev->mt76, dev->mt76.chandef.chan);
chan             1011 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 		struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan             1012 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c 		u8 ed_th = chan->band == NL80211_BAND_5GHZ ? 0x0e : 0x20;
chan               77 drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c 		enum nl80211_band band = dev->mt76.chandef.chan->band;
chan              251 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              252 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	int channel = chan->hw_value;
chan              257 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	if (chan->band == NL80211_BAND_2GHZ)
chan              264 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	mt76x02_get_rx_gain(dev, chan->band, &val, &lna_2g, lna_5g);
chan              273 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	lna = mt76x02_get_lna_gain(dev, &lna_2g, lna_5g, chan);
chan              279 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 			   struct ieee80211_channel *chan)
chan              284 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	is_5ghz = chan->band == NL80211_BAND_5GHZ;
chan              344 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 			 struct ieee80211_channel *chan,
chan              347 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	int channel = chan->hw_value;
chan              374 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 			 struct ieee80211_channel *chan,
chan              377 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	int channel = chan->hw_value;
chan              425 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 			   struct ieee80211_channel *chan)
chan              434 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	if (chan->band == NL80211_BAND_5GHZ) {
chan              436 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 		mt76x2_get_power_info_5g(dev, t, chan, 0,
chan              438 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 		mt76x2_get_power_info_5g(dev, t, chan, 1,
chan              441 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 		mt76x2_get_power_info_2g(dev, t, chan, 0,
chan              443 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 		mt76x2_get_power_info_2g(dev, t, chan, 1,
chan              458 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c 	enum nl80211_band band = dev->mt76.chandef.chan->band;
chan               44 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h 			   struct ieee80211_channel *chan);
chan               47 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h 			   struct ieee80211_channel *chan);
chan               56 drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h 	if (dev->mt76.chandef.chan->band == NL80211_BAND_2GHZ)
chan              154 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 	struct ieee80211_channel *chan;
chan              160 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		chan = &sband->channels[i];
chan              162 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		mt76x2_get_power_info(dev, &txp, chan);
chan              163 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		mt76x2_get_rate_power(dev, &t, chan);
chan              165 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		chan->orig_mpwr = mt76x02_get_max_rate_power(&t) +
chan              167 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		chan->orig_mpwr = DIV_ROUND_UP(chan->orig_mpwr, 2);
chan              170 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		chan->orig_mpwr += 3;
chan              171 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 		chan->max_power = min_t(int, chan->max_reg_power,
chan              172 drivers/net/wireless/mediatek/mt76/mt76x2/init.c 					chan->orig_mpwr);
chan               33 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan               35 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h 	return ((chan->flags & IEEE80211_CHAN_RADAR) &&
chan               36 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h 		chan->dfs_state != NL80211_DFS_AVAILABLE);
chan               15 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan               24 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	if (chan->band == NL80211_BAND_5GHZ)
chan               27 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	if (mt76x02_ext_pa_enabled(dev, chan->band))
chan               38 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan               39 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	bool is_5ghz = chan->band == NL80211_BAND_5GHZ;
chan              120 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	struct ieee80211_channel *chan = chandef->chan;
chan              122 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	enum nl80211_band band = chan->band;
chan              153 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	freq = chandef->chan->center_freq;
chan              155 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	channel = chan->hw_value;
chan              189 drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c 	mt76x02_phy_set_band(dev, chan->band, ch_group_index & 1);
chan              140 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              146 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	mt76x2_get_power_info(dev, &txp, chan);
chan              153 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	mt76x2_get_rate_power(dev, &t, chan);
chan              205 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan              222 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 		mt76x2_get_power_info(dev, &txp, chan);
chan              224 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 		if (mt76x02_ext_pa_enabled(dev, chan->band))
chan              238 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 		mt76x02_mcu_calibrate(dev, MCU_CAL_DPD, chan->hw_value);
chan              259 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	    dev->mt76.chandef.chan->band == NL80211_BAND_2GHZ &&
chan              270 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	if (dev->mt76.chandef.chan->flags & IEEE80211_CHAN_RADAR)
chan              318 drivers/net/wireless/mediatek/mt76/mt76x2/phy.c 	if (dev->mt76.chandef.chan->band == NL80211_BAND_2GHZ)
chan               13 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	struct ieee80211_channel *chan = dev->mt76.chandef.chan;
chan               14 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	bool is_5ghz = chan->band == NL80211_BAND_5GHZ;
chan               86 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	struct ieee80211_channel *chan = chandef->chan;
chan               87 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	u8 channel = chan->hw_value, bw, bw_index;
chan               91 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	freq = chandef->chan->center_freq;
chan              122 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	mt76x2_phy_set_txpower_regs(dev, chan->band);
chan              123 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	mt76x2_configure_tx_delay(dev, chan->band, bw);
chan              126 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 	mt76x02_phy_set_band(dev, chan->band, ch_group_index & 1);
chan              185 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 			struct ieee80211_channel *chan;
chan              188 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 			chan = dev->mt76.chandef.chan;
chan              189 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 			if (chan->band == NL80211_BAND_5GHZ)
chan              191 drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c 			if (mt76x02_ext_pa_enabled(dev, chan->band))
chan              519 drivers/net/wireless/mediatek/mt7601u/init.c 		const struct ieee80211_channel *chan, int n_chan,
chan              526 drivers/net/wireless/mediatek/mt7601u/init.c 	size = n_chan * sizeof(*chan);
chan              527 drivers/net/wireless/mediatek/mt7601u/init.c 	chanlist = devm_kmemdup(dev->dev, chan, size, GFP_KERNEL);
chan              550 drivers/net/wireless/mediatek/mt7601u/init.c 	dev->chandef.chan = &sband->channels[0];
chan              122 drivers/net/wireless/mediatek/mt7601u/mac.c 		int band = dev->chandef.chan->band;
chan              489 drivers/net/wireless/mediatek/mt7601u/mac.c 	status->freq = dev->chandef.chan->center_freq;
chan              490 drivers/net/wireless/mediatek/mt7601u/mac.c 	status->band = dev->chandef.chan->band;
chan              371 drivers/net/wireless/mediatek/mt7601u/phy.c 	struct ieee80211_channel *chan = chandef->chan;
chan              382 drivers/net/wireless/mediatek/mt7601u/phy.c 	chan_idx = chan->hw_value - 1;
chan              428 drivers/net/wireless/mediatek/mt7601u/phy.c 	mt7601u_apply_ch14_fixup(dev, chan->hw_value);
chan              773 drivers/net/wireless/mediatek/mt7601u/phy.c 	return dev->ee->chan_pwr[dev->chandef.chan->hw_value - 1];
chan              901 drivers/net/wireless/mediatek/mt7601u/phy.c 	if (dev->chandef.chan->hw_value < 5)
chan              903 drivers/net/wireless/mediatek/mt7601u/phy.c 	else if (dev->chandef.chan->hw_value < 9)
chan              444 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	if (params->chan)
chan              445 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		freq = params->chan->center_freq;
chan              734 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	struct ieee80211_channel *chan;
chan              750 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	chan = &sband->channels[idx];
chan              753 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	survey->channel = chan;
chan              756 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	if (chandef->chan) {
chan              757 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		if (chan->hw_value == chandef->chan->hw_value)
chan              761 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 	ret = qtnf_cmd_get_chan_stats(mac, chan->hw_value, &stats);
chan              764 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		if (unlikely(stats.chan_num != chan->hw_value)) {
chan              766 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 			       stats.chan_num, chan->hw_value);
chan              786 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		pr_debug("no stats for channel %u\n", chan->hw_value);
chan              791 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 			 chan->hw_value);
chan              820 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		       ndev->name, chandef->chan->center_freq,
chan              838 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 		 params->chandef.chan->hw_value, params->count,
chan              849 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c 			dev->name, params->chandef.chan->hw_value);
chan             1308 drivers/net/wireless/quantenna/qtnfmac/commands.c 	struct ieee80211_channel *chan;
chan             1331 drivers/net/wireless/quantenna/qtnfmac/commands.c 		band->channels = kcalloc(band->n_channels, sizeof(*chan),
chan             1365 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan = &band->channels[chidx++];
chan             1368 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->hw_value = le16_to_cpu(qchan->hw_value);
chan             1369 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->band = band->band;
chan             1370 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->center_freq = le16_to_cpu(qchan->center_freq);
chan             1371 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->max_antenna_gain = (int)qchan->max_antenna_gain;
chan             1372 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->max_power = (int)qchan->max_power;
chan             1373 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->max_reg_power = (int)qchan->max_reg_power;
chan             1374 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->beacon_found = qchan->beacon_found;
chan             1375 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->dfs_cac_ms = le32_to_cpu(qchan->dfs_cac_ms);
chan             1376 drivers/net/wireless/quantenna/qtnfmac/commands.c 			chan->flags = 0;
chan             1379 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_DISABLED;
chan             1382 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_IR;
chan             1385 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_HT40PLUS;
chan             1388 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_HT40MINUS;
chan             1391 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_OFDM;
chan             1394 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_80MHZ;
chan             1397 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_160MHZ;
chan             1400 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_INDOOR_ONLY;
chan             1403 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_IR_CONCURRENT;
chan             1406 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_20MHZ;
chan             1409 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_NO_10MHZ;
chan             1412 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->flags |= IEEE80211_CHAN_RADAR;
chan             1413 drivers/net/wireless/quantenna/qtnfmac/commands.c 				chan->dfs_state_entered = jiffies;
chan             1416 drivers/net/wireless/quantenna/qtnfmac/commands.c 					chan->dfs_state = NL80211_DFS_USABLE;
chan             1419 drivers/net/wireless/quantenna/qtnfmac/commands.c 					chan->dfs_state = NL80211_DFS_AVAILABLE;
chan             1421 drivers/net/wireless/quantenna/qtnfmac/commands.c 					chan->dfs_state =
chan             1426 drivers/net/wireless/quantenna/qtnfmac/commands.c 				 chan->hw_value, chan->flags, chan->max_power,
chan             1427 drivers/net/wireless/quantenna/qtnfmac/commands.c 				 chan->max_reg_power);
chan             2055 drivers/net/wireless/quantenna/qtnfmac/commands.c 	qch = &tlv->chan;
chan             2512 drivers/net/wireless/quantenna/qtnfmac/commands.c 	cmd->channel = cpu_to_le16(params->chandef.chan->hw_value);
chan             2548 drivers/net/wireless/quantenna/qtnfmac/commands.c 	qlink_chandef_q2cfg(priv_to_wiphy(vif->mac), &resp->chan, chdef);
chan             2574 drivers/net/wireless/quantenna/qtnfmac/commands.c 	qlink_chandef_cfg2q(chdef, &cmd->chan);
chan              176 drivers/net/wireless/quantenna/qtnfmac/event.c 		 le16_to_cpu(join_info->chan.chan.center_freq), status);
chan              181 drivers/net/wireless/quantenna/qtnfmac/event.c 	qlink_chandef_q2cfg(wiphy, &join_info->chan, &chandef);
chan              185 drivers/net/wireless/quantenna/qtnfmac/event.c 			chandef.chan ? chandef.chan->center_freq : 0,
chan              193 drivers/net/wireless/quantenna/qtnfmac/event.c 	bss = cfg80211_get_bss(wiphy, chandef.chan, join_info->bssid,
chan              199 drivers/net/wireless/quantenna/qtnfmac/event.c 			join_info->bssid, chandef.chan->hw_value);
chan              222 drivers/net/wireless/quantenna/qtnfmac/event.c 		bss = cfg80211_inform_bss(wiphy, chandef.chan,
chan              481 drivers/net/wireless/quantenna/qtnfmac/event.c 	qlink_chandef_q2cfg(wiphy, &data->chan, &chandef);
chan              485 drivers/net/wireless/quantenna/qtnfmac/event.c 		       mac->macid, chandef.chan->center_freq,
chan              492 drivers/net/wireless/quantenna/qtnfmac/event.c 		 mac->macid, chandef.chan->hw_value, chandef.center_freq1,
chan              531 drivers/net/wireless/quantenna/qtnfmac/event.c 	qlink_chandef_q2cfg(wiphy, &ev->chan, &chandef);
chan              161 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_channel chan;
chan              671 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_chandef chan;
chan              944 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_chandef chan;
chan             1017 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_chandef chan;
chan             1040 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_chandef chan;
chan             1131 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_chandef chan;
chan             1328 drivers/net/wireless/quantenna/qtnfmac/qlink.h 	struct qlink_channel chan;
chan              119 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	struct ieee80211_channel *chan;
chan              121 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	chan = ieee80211_get_channel(wiphy, le16_to_cpu(qch->chan.center_freq));
chan              123 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	chdef->chan = chan;
chan              132 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	struct ieee80211_channel *chan = chdef->chan;
chan              134 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	qch->chan.hw_value = cpu_to_le16(chan->hw_value);
chan              135 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	qch->chan.center_freq = cpu_to_le16(chan->center_freq);
chan              136 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c 	qch->chan.flags = cpu_to_le32(chan->flags);
chan             3789 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 			      struct ieee80211_channel *chan,
chan             3802 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	max_power = chan->max_power * 2;
chan             3842 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	if (chan->center_freq > 2457) {
chan             4655 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 					 struct ieee80211_channel *chan,
chan             4662 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	enum nl80211_band band = chan->band;
chan             5041 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 					 struct ieee80211_channel *chan,
chan             5048 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	enum nl80211_band band = chan->band;
chan             5159 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	rt2800_config_alc(rt2x00dev, chan, power_level);
chan             5174 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 					 struct ieee80211_channel *chan,
chan             5181 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	enum nl80211_band band = chan->band;
chan             5217 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 					      chan->max_power);
chan             5357 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 				  struct ieee80211_channel *chan,
chan             5362 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 		rt2800_config_txpower_rt3593(rt2x00dev, chan, power_level);
chan             5364 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 		rt2800_config_txpower_rt6352(rt2x00dev, chan, power_level);
chan             5366 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 		rt2800_config_txpower_rt28xx(rt2x00dev, chan, power_level);
chan             5371 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	rt2800_config_txpower(rt2x00dev, rt2x00dev->hw->conf.chandef.chan,
chan             5561 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 		rt2800_config_txpower(rt2x00dev, libconf->conf->chandef.chan,
chan             5565 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 		rt2800_config_txpower(rt2x00dev, libconf->conf->chandef.chan,
chan             10517 drivers/net/wireless/ralink/rt2x00/rt2800lib.c 	survey->channel = conf->chandef.chan;
chan              174 drivers/net/wireless/ralink/rt2x00/rt2x00config.c 	center_channel = spec->channels[conf->chandef.chan->hw_value].channel;
chan              189 drivers/net/wireless/ralink/rt2x00/rt2x00config.c 	return conf->chandef.chan->hw_value;
chan              217 drivers/net/wireless/ralink/rt2x00/rt2x00config.c 			hw_value = conf->chandef.chan->hw_value;
chan              251 drivers/net/wireless/ralink/rt2x00/rt2x00config.c 	rt2x00dev->curr_band = conf->chandef.chan->band;
chan              252 drivers/net/wireless/ralink/rt2x00/rt2x00config.c 	rt2x00dev->curr_freq = conf->chandef.chan->center_freq;
chan              756 drivers/net/wireless/ralink/rt2x00/rt61pci.c 	if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) {
chan              731 drivers/net/wireless/ralink/rt2x00/rt73usb.c 	if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) {
chan              313 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c 			rx_status.freq = dev->conf.chandef.chan->center_freq;
chan              314 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c 			rx_status.band = dev->conf.chandef.chan->band;
chan               54 drivers/net/wireless/realtek/rtl818x/rtl8180/grf5101.c static void grf5101_write_phy_antenna(struct ieee80211_hw *dev, short chan)
chan               62 drivers/net/wireless/realtek/rtl818x/rtl8180/grf5101.c 	if (chan == 14)
chan               82 drivers/net/wireless/realtek/rtl818x/rtl8180/grf5101.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan               84 drivers/net/wireless/realtek/rtl818x/rtl8180/grf5101.c 	u32 chan = channel - 1;
chan               94 drivers/net/wireless/realtek/rtl818x/rtl8180/grf5101.c 	write_grf5101(dev, 0x0B, chan);
chan               59 drivers/net/wireless/realtek/rtl818x/rtl8180/max2820.c static void max2820_write_phy_antenna(struct ieee80211_hw *dev, short chan)
chan               67 drivers/net/wireless/realtek/rtl818x/rtl8180/max2820.c 	if (chan == 14)
chan               94 drivers/net/wireless/realtek/rtl818x/rtl8180/max2820.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq) : 1;
chan               97 drivers/net/wireless/realtek/rtl818x/rtl8180/max2820.c 	u32 chan = max2820_chan[chan_idx];
chan              104 drivers/net/wireless/realtek/rtl818x/rtl8180/max2820.c 	write_max2820(dev, 3, chan);
chan              719 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c 	int chan =
chan              720 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan              723 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c 		rtl8225_rf_set_tx_power(dev, chan);
chan              725 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c 		rtl8225z2_rf_set_tx_power(dev, chan);
chan              727 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.c 	rtl8225_write(dev, 0x7, rtl8225_chan[chan - 1]);
chan              451 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 	int chan =
chan              452 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan              454 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 	rtl8225sez2_rf_set_tx_power(dev, chan);
chan              455 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 	rtl8187se_rf_writereg(dev, 0x7, rtl8225se_chan[chan - 1]);
chan              457 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 		rtl8225se_chan[chan - 1])
chan              458 drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225se.c 		rtl8187se_rf_writereg(dev, 0x7, rtl8225se_chan[chan - 1]);
chan               60 drivers/net/wireless/realtek/rtl818x/rtl8180/sa2400.c static void sa2400_write_phy_antenna(struct ieee80211_hw *dev, short chan)
chan               68 drivers/net/wireless/realtek/rtl818x/rtl8180/sa2400.c 	if (chan == 14)
chan              105 drivers/net/wireless/realtek/rtl818x/rtl8180/sa2400.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan              107 drivers/net/wireless/realtek/rtl818x/rtl8180/sa2400.c 	u32 chan = sa2400_chan[channel - 1];
chan              113 drivers/net/wireless/realtek/rtl818x/rtl8180/sa2400.c 	write_sa2400(dev, 0, chan);
chan              383 drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 	rx_status.freq = dev->conf.chandef.chan->center_freq;
chan              384 drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c 	rx_status.band = dev->conf.chandef.chan->band;
chan              994 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 	int chan =
chan              995 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 		ieee80211_frequency_to_channel(conf->chandef.chan->center_freq);
chan              998 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 		rtl8225_rf_set_tx_power(dev, chan);
chan             1000 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 		rtl8225z2_rf_set_tx_power(dev, chan);
chan             1002 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 		rtl8225z2_b_rf_set_tx_power(dev, chan);
chan             1004 drivers/net/wireless/realtek/rtl818x/rtl8187/rtl8225.c 	rtl8225_write(dev, 0x7, rtl8225_chan[chan - 1]);
chan             1143 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 	channel = hw->conf.chandef.chan->hw_value;
chan             1167 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 		    hw->conf.chandef.chan->center_freq) {
chan             1268 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 	channel = hw->conf.chandef.chan->hw_value;
chan             1298 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 		    hw->conf.chandef.chan->center_freq) {
chan             5276 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 		rx_status->freq = hw->conf.chandef.chan->center_freq;
chan             5277 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 		rx_status->band = hw->conf.chandef.chan->band;
chan             5346 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan             5347 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 	rx_status->band = hw->conf.chandef.chan->band;
chan             5507 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 			 __func__, hw->conf.chandef.chan->hw_value,
chan             5532 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c 		channel = hw->conf.chandef.chan->hw_value;
chan             1054 drivers/net/wireless/realtek/rtlwifi/base.c 		if (NL80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
chan             1351 drivers/net/wireless/realtek/rtlwifi/base.c 		rx_status.freq = hw->conf.chandef.chan->center_freq;
chan             1352 drivers/net/wireless/realtek/rtlwifi/base.c 		rx_status.band = hw->conf.chandef.chan->band;
chan             2505 drivers/net/wireless/realtek/rtlwifi/base.c 		info->band = hw->conf.chandef.chan->band;
chan              651 drivers/net/wireless/realtek/rtlwifi/core.c 		struct ieee80211_channel *channel = hw->conf.chandef.chan;
chan              684 drivers/net/wireless/realtek/rtlwifi/core.c 				(u32)hw->conf.chandef.chan->center_freq;
chan              416 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              417 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              326 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              327 drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              308 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              309 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              377 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              378 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              463 drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              464 drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              369 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              370 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              263 drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              264 drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              289 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              290 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              346 drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              347 drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              489 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan              490 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan              209 drivers/net/wireless/realtek/rtw88/main.c 	struct ieee80211_channel *channel = chandef->chan;
chan               96 drivers/net/wireless/realtek/rtw88/rx.c 	rx_status->freq = hw->conf.chandef.chan->center_freq;
chan               97 drivers/net/wireless/realtek/rtw88/rx.c 	rx_status->band = hw->conf.chandef.chan->band;
chan             2149 drivers/net/wireless/rndis_wlan.c 	int length, i, ret, chan = -1;
chan             2152 drivers/net/wireless/rndis_wlan.c 		chan = ieee80211_frequency_to_channel(channel->center_freq);
chan             2176 drivers/net/wireless/rndis_wlan.c 		   sme->ssid, sme->bssid, chan,
chan             2208 drivers/net/wireless/rndis_wlan.c 		ret = set_channel(usbdev, chan);
chan             2281 drivers/net/wireless/rndis_wlan.c 	struct ieee80211_channel *channel = params->chandef.chan;
chan             2284 drivers/net/wireless/rndis_wlan.c 	int ret, alg, length, chan = -1;
chan             2287 drivers/net/wireless/rndis_wlan.c 		chan = ieee80211_frequency_to_channel(channel->center_freq);
chan             2303 drivers/net/wireless/rndis_wlan.c 		   params->ssid, params->bssid, chan, params->privacy);
chan             2332 drivers/net/wireless/rndis_wlan.c 		ret = set_channel(usbdev, chan);
chan              580 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	struct ieee80211_channel *curchan = hw->conf.chandef.chan;
chan              747 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	channel = bss->chandef.chan;
chan              766 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	channel = vif->bss_conf.chandef.chan;
chan             1219 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	enum nl80211_band band = hw->conf.chandef.chan->band;
chan             1370 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	u8 band = hw->conf.chandef.chan->band;
chan             1776 drivers/net/wireless/rsi/rsi_91x_mac80211.c 			    struct ieee80211_channel *chan, int duration,
chan             1787 drivers/net/wireless/rsi/rsi_91x_mac80211.c 		__func__, chan->hw_value, duration);
chan             1797 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	if (rsi_band_check(common, chan)) {
chan             1804 drivers/net/wireless/rsi/rsi_91x_mac80211.c 	if (rsi_set_channel(common, chan)) {
chan             1813 drivers/net/wireless/rsi/rsi_91x_mac80211.c 		__func__, chan->hw_value);
chan             1304 drivers/net/wireless/rsi/rsi_91x_mgmt.c 	u8 band = hw->conf.chandef.chan->band;
chan              744 drivers/net/wireless/rsi/rsi_mgmt.h int rsi_band_check(struct rsi_common *common, struct ieee80211_channel *chan);
chan              344 drivers/net/wireless/st/cw1200/sta.c 	    (priv->channel != conf->chandef.chan)) {
chan              345 drivers/net/wireless/st/cw1200/sta.c 		struct ieee80211_channel *ch = conf->chandef.chan;
chan              599 drivers/net/wireless/ti/wl1251/main.c 			conf->chandef.chan->center_freq);
chan             1337 drivers/net/wireless/ti/wl1251/main.c 	survey->channel = conf->chandef.chan;
chan              290 drivers/net/wireless/ti/wl12xx/cmd.c 	cmd->channel = ch_switch->chandef.chan->hw_value;
chan               32 drivers/net/wireless/ti/wl18xx/cmd.c 	cmd->channel = ch_switch->chandef.chan->hw_value;
chan               36 drivers/net/wireless/ti/wl18xx/cmd.c 	switch (ch_switch->chandef.chan->band) {
chan               45 drivers/net/wireless/ti/wl18xx/cmd.c 			     ch_switch->chandef.chan->band);
chan             4684 drivers/net/wireless/ti/wlcore/main.c 		     ieee80211_frequency_to_channel(ctx->def.chan->center_freq),
chan             4693 drivers/net/wireless/ti/wlcore/main.c 		     ieee80211_frequency_to_channel(ctx->def.chan->center_freq),
chan             4705 drivers/net/wireless/ti/wlcore/main.c 		ctx->def.chan->center_freq);
chan             4733 drivers/net/wireless/ti/wlcore/main.c 		    ctx->def.chan->dfs_state == NL80211_DFS_USABLE) {
chan             4753 drivers/net/wireless/ti/wlcore/main.c 		ctx->def.chan->center_freq);
chan             4760 drivers/net/wireless/ti/wlcore/main.c 		     ctx->radar_enabled, ctx->def.chan->dfs_state);
chan             4776 drivers/net/wireless/ti/wlcore/main.c 	wlvif->band = ctx->def.chan->band;
chan             4784 drivers/net/wireless/ti/wlcore/main.c 	    ctx->def.chan->dfs_state == NL80211_DFS_USABLE) {
chan             4809 drivers/net/wireless/ti/wlcore/main.c 		     ieee80211_frequency_to_channel(ctx->def.chan->center_freq),
chan             4845 drivers/net/wireless/ti/wlcore/main.c 		new_ctx->def.chan->center_freq);
chan             4863 drivers/net/wireless/ti/wlcore/main.c 	wlvif->band = new_ctx->def.chan->band;
chan             5013 drivers/net/wireless/ti/wlcore/main.c 	survey->channel = conf->chandef.chan;
chan             5639 drivers/net/wireless/ti/wlcore/main.c 				       struct ieee80211_channel *chan,
chan             5647 drivers/net/wireless/ti/wlcore/main.c 	channel = ieee80211_frequency_to_channel(chan->center_freq);
chan             5671 drivers/net/wireless/ti/wlcore/main.c 	ret = wl12xx_start_dev(wl, wlvif, chan->band, channel);
chan              255 drivers/net/wireless/wl3501.h 	u8 			    chan;
chan              600 drivers/net/wireless/wl3501.h 	u8				chan;
chan              597 drivers/net/wireless/wl3501_cs.c 			.chan	= this->chan,
chan              616 drivers/net/wireless/wl3501_cs.c 			.chan	= this->chan,
chan              890 drivers/net/wireless/wl3501_cs.c 				this->chan = this->bss_set[i].ds_pset.chan;
chan              899 drivers/net/wireless/wl3501_cs.c 			this->chan = this->bss_set[i].ds_pset.chan;
chan             1454 drivers/net/wireless/wl3501_cs.c 		this->chan = channel;
chan             1466 drivers/net/wireless/wl3501_cs.c 		ieee80211_channel_to_frequency(this->chan, NL80211_BAND_2GHZ);
chan             1593 drivers/net/wireless/wl3501_cs.c 		iwe.u.freq.m = this->bss_set[i].ds_pset.chan;
chan             1966 drivers/net/wireless/wl3501_cs.c 	this->chan		= iw_default_channel(this->reg_domain);
chan             1143 drivers/net/wireless/zydas/zd1211rw/zd_mac.c 	mac->channel = conf->chandef.chan->hw_value;
chan             1146 drivers/net/wireless/zydas/zd1211rw/zd_mac.c 	return zd_chip_set_channel(&mac->chip, conf->chandef.chan->hw_value);
chan             1526 drivers/ntb/ntb_transport.c 	struct dma_chan *chan = qp->rx_dma_chan;
chan             1534 drivers/ntb/ntb_transport.c 	device = chan->device;
chan             1560 drivers/ntb/ntb_transport.c 	txd = device->device_prep_dma_memcpy(chan, unmap->addr[1],
chan             1593 drivers/ntb/ntb_transport.c 	struct dma_chan *chan = qp->rx_dma_chan;
chan             1596 drivers/ntb/ntb_transport.c 	if (!chan)
chan             1805 drivers/ntb/ntb_transport.c 	struct dma_chan *chan = qp->tx_dma_chan;
chan             1814 drivers/ntb/ntb_transport.c 	device = chan->device;
chan             1834 drivers/ntb/ntb_transport.c 	txd = device->device_prep_dma_memcpy(chan, dest, unmap->addr[0], len,
chan             1849 drivers/ntb/ntb_transport.c 	dma_async_issue_pending(chan);
chan             1864 drivers/ntb/ntb_transport.c 	struct dma_chan *chan = qp->tx_dma_chan;
chan             1876 drivers/ntb/ntb_transport.c 	if (!chan)
chan             1957 drivers/ntb/ntb_transport.c static bool ntb_dma_filter_fn(struct dma_chan *chan, void *node)
chan             1959 drivers/ntb/ntb_transport.c 	return dev_to_node(&chan->dev->device) == (int)(unsigned long)node;
chan             2122 drivers/ntb/ntb_transport.c 		struct dma_chan *chan = qp->tx_dma_chan;
chan             2131 drivers/ntb/ntb_transport.c 		dma_sync_wait(chan, qp->last_cookie);
chan             2132 drivers/ntb/ntb_transport.c 		dmaengine_terminate_all(chan);
chan             2134 drivers/ntb/ntb_transport.c 		dma_unmap_resource(chan->device->dev,
chan             2138 drivers/ntb/ntb_transport.c 		dma_release_channel(chan);
chan             2142 drivers/ntb/ntb_transport.c 		struct dma_chan *chan = qp->rx_dma_chan;
chan             2151 drivers/ntb/ntb_transport.c 		dma_sync_wait(chan, qp->last_cookie);
chan             2152 drivers/ntb/ntb_transport.c 		dmaengine_terminate_all(chan);
chan             2153 drivers/ntb/ntb_transport.c 		dma_release_channel(chan);
chan              854 drivers/ntb/test/ntb_perf.c static bool perf_dma_filter(struct dma_chan *chan, void *data)
chan              861 drivers/ntb/test/ntb_perf.c 	return node == NUMA_NO_NODE || node == dev_to_node(chan->device->dev);
chan             1951 drivers/of/unittest.c static int unittest_i2c_mux_select_chan(struct i2c_mux_core *muxc, u32 chan)
chan               22 drivers/pcmcia/max1600.c 	int chan;
chan               27 drivers/pcmcia/max1600.c 		chan = 0;
chan               30 drivers/pcmcia/max1600.c 		chan = 1;
chan               49 drivers/pcmcia/max1600.c 		name = max1600_gpio_name[chan][i];
chan             2434 drivers/platform/x86/toshiba_acpi.c static int toshiba_iio_accel_get_axis(enum toshiba_iio_accel_chan chan)
chan             2443 drivers/platform/x86/toshiba_acpi.c 	switch (chan) {
chan             2460 drivers/platform/x86/toshiba_acpi.c 				      struct iio_chan_spec const *chan,
chan             2467 drivers/platform/x86/toshiba_acpi.c 		ret = toshiba_iio_accel_get_axis(chan->channel);
chan             2479 drivers/platform/x86/toshiba_acpi.c #define TOSHIBA_IIO_ACCEL_CHANNEL(axis, chan) { \
chan             2482 drivers/platform/x86/toshiba_acpi.c 	.channel = chan, \
chan              188 drivers/power/supply/axp20x_battery.c 	struct iio_channel *chan;
chan              269 drivers/power/supply/axp20x_battery.c 			chan = axp20x_batt->batt_chrg_i;
chan              271 drivers/power/supply/axp20x_battery.c 			chan = axp20x_batt->batt_dischrg_i;
chan              273 drivers/power/supply/axp20x_battery.c 		ret = iio_read_channel_processed(chan, &val->intval);
chan              245 drivers/power/supply/generic-adc-battery.c 	int chan;
chan              286 drivers/power/supply/generic-adc-battery.c 	for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) {
chan              287 drivers/power/supply/generic-adc-battery.c 		adc_bat->channel[chan] = iio_channel_get(&pdev->dev,
chan              288 drivers/power/supply/generic-adc-battery.c 							 gab_chan_name[chan]);
chan              289 drivers/power/supply/generic-adc-battery.c 		if (IS_ERR(adc_bat->channel[chan])) {
chan              290 drivers/power/supply/generic-adc-battery.c 			ret = PTR_ERR(adc_bat->channel[chan]);
chan              291 drivers/power/supply/generic-adc-battery.c 			adc_bat->channel[chan] = NULL;
chan              298 drivers/power/supply/generic-adc-battery.c 				    gab_dyn_props[chan])
chan              303 drivers/power/supply/generic-adc-battery.c 					gab_dyn_props[chan];
chan              356 drivers/power/supply/generic-adc-battery.c 	for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) {
chan              357 drivers/power/supply/generic-adc-battery.c 		if (adc_bat->channel[chan])
chan              358 drivers/power/supply/generic-adc-battery.c 			iio_channel_release(adc_bat->channel[chan]);
chan              368 drivers/power/supply/generic-adc-battery.c 	int chan;
chan              379 drivers/power/supply/generic-adc-battery.c 	for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) {
chan              380 drivers/power/supply/generic-adc-battery.c 		if (adc_bat->channel[chan])
chan              381 drivers/power/supply/generic-adc-battery.c 			iio_channel_release(adc_bat->channel[chan]);
chan              107 drivers/power/supply/lp8788-charger.c 	struct iio_channel *chan[LP8788_NUM_CHG_ADC];
chan              235 drivers/power/supply/lp8788-charger.c 	struct iio_channel *channel = pchg->chan[LP8788_VBATT];
chan              290 drivers/power/supply/lp8788-charger.c 	struct iio_channel *channel = pchg->chan[LP8788_BATT_TEMP];
chan              569 drivers/power/supply/lp8788-charger.c 	struct iio_channel *chan;
chan              575 drivers/power/supply/lp8788-charger.c 	chan = iio_channel_get(dev, pdata->adc_vbatt);
chan              576 drivers/power/supply/lp8788-charger.c 	pchg->chan[LP8788_VBATT] = IS_ERR(chan) ? NULL : chan;
chan              579 drivers/power/supply/lp8788-charger.c 	chan = iio_channel_get(dev, pdata->adc_batt_temp);
chan              580 drivers/power/supply/lp8788-charger.c 	pchg->chan[LP8788_BATT_TEMP] = IS_ERR(chan) ? NULL : chan;
chan              588 drivers/power/supply/lp8788-charger.c 		if (!pchg->chan[i])
chan              591 drivers/power/supply/lp8788-charger.c 		iio_channel_release(pchg->chan[i]);
chan              592 drivers/power/supply/lp8788-charger.c 		pchg->chan[i] = NULL;
chan              172 drivers/power/supply/sbs-manager.c static int sbsm_select(struct i2c_mux_core *muxc, u32 chan)
chan              179 drivers/power/supply/sbs-manager.c 	if (data->cur_chan == chan)
chan              183 drivers/power/supply/sbs-manager.c 	reg = BIT(SBSM_SMB_BAT_OFFSET + chan);
chan              186 drivers/power/supply/sbs-manager.c 		dev_err(dev, "Failed to select channel %i\n", chan);
chan              188 drivers/power/supply/sbs-manager.c 		data->cur_chan = chan;
chan               19 drivers/ptp/ptp_chardev.c 			       enum ptp_pin_function func, unsigned int chan)
chan               31 drivers/ptp/ptp_chardev.c 		rq.extts.index = chan;
chan               36 drivers/ptp/ptp_chardev.c 		rq.perout.index = chan;
chan               49 drivers/ptp/ptp_chardev.c 		    enum ptp_pin_function func, unsigned int chan)
chan               58 drivers/ptp/ptp_chardev.c 		    info->pin_config[i].chan == chan) {
chan               71 drivers/ptp/ptp_chardev.c 		if (chan >= info->n_ext_ts)
chan               75 drivers/ptp/ptp_chardev.c 		if (chan >= info->n_per_out)
chan               79 drivers/ptp/ptp_chardev.c 		if (chan != 0)
chan               86 drivers/ptp/ptp_chardev.c 	if (info->verify(info, pin, func, chan)) {
chan               87 drivers/ptp/ptp_chardev.c 		pr_err("driver cannot use function %u on pin %u\n", func, chan);
chan               93 drivers/ptp/ptp_chardev.c 		ptp_disable_pinfunc(info, func, chan);
chan               95 drivers/ptp/ptp_chardev.c 		pin1->chan = 0;
chan               97 drivers/ptp/ptp_chardev.c 	ptp_disable_pinfunc(info, pin2->func, pin2->chan);
chan               99 drivers/ptp/ptp_chardev.c 	pin2->chan = chan;
chan              373 drivers/ptp/ptp_chardev.c 		err = ptp_set_pinfunc(ptp, pin_index, pd.func, pd.chan);
chan              346 drivers/ptp/ptp_clock.c 		 enum ptp_pin_function func, unsigned int chan)
chan              354 drivers/ptp/ptp_clock.c 		    ptp->info->pin_config[i].chan == chan) {
chan               70 drivers/ptp/ptp_private.h 		    enum ptp_pin_function func, unsigned int chan);
chan              215 drivers/ptp/ptp_sysfs.c 	unsigned int func, chan;
chan              226 drivers/ptp/ptp_sysfs.c 	chan = ptp->info->pin_config[index].chan;
chan              230 drivers/ptp/ptp_sysfs.c 	return snprintf(page, PAGE_SIZE, "%u %u\n", func, chan);
chan              237 drivers/ptp/ptp_sysfs.c 	unsigned int func, chan;
chan              240 drivers/ptp/ptp_sysfs.c 	cnt = sscanf(buf, "%u %u", &func, &chan);
chan              250 drivers/ptp/ptp_sysfs.c 	err = ptp_set_pinfunc(ptp, index, func, chan);
chan              468 drivers/pwm/pwm-atmel-tcb.c 		struct atmel_tcb_channel *chan = &tcbpwm->bkup[i];
chan              470 drivers/pwm/pwm-atmel-tcb.c 		chan->cmr = readl(base + ATMEL_TC_REG(i, CMR));
chan              471 drivers/pwm/pwm-atmel-tcb.c 		chan->ra = readl(base + ATMEL_TC_REG(i, RA));
chan              472 drivers/pwm/pwm-atmel-tcb.c 		chan->rb = readl(base + ATMEL_TC_REG(i, RB));
chan              473 drivers/pwm/pwm-atmel-tcb.c 		chan->rc = readl(base + ATMEL_TC_REG(i, RC));
chan              485 drivers/pwm/pwm-atmel-tcb.c 		struct atmel_tcb_channel *chan = &tcbpwm->bkup[i];
chan              487 drivers/pwm/pwm-atmel-tcb.c 		writel(chan->cmr, base + ATMEL_TC_REG(i, CMR));
chan              488 drivers/pwm/pwm-atmel-tcb.c 		writel(chan->ra, base + ATMEL_TC_REG(i, RA));
chan              489 drivers/pwm/pwm-atmel-tcb.c 		writel(chan->rb, base + ATMEL_TC_REG(i, RB));
chan              490 drivers/pwm/pwm-atmel-tcb.c 		writel(chan->rc, base + ATMEL_TC_REG(i, RC));
chan              491 drivers/pwm/pwm-atmel-tcb.c 		if (chan->enabled) {
chan               49 drivers/pwm/pwm-bcm-kona.c #define PWM_CONTROL_SMOOTH_SHIFT(chan)		(24 + (chan))
chan               50 drivers/pwm/pwm-bcm-kona.c #define PWM_CONTROL_TYPE_SHIFT(chan)		(16 + (chan))
chan               51 drivers/pwm/pwm-bcm-kona.c #define PWM_CONTROL_POLARITY_SHIFT(chan)	(8 + (chan))
chan               52 drivers/pwm/pwm-bcm-kona.c #define PWM_CONTROL_TRIGGER_SHIFT(chan)		(chan)
chan               55 drivers/pwm/pwm-bcm-kona.c #define PRESCALE_SHIFT(chan)			((chan) << 2)
chan               56 drivers/pwm/pwm-bcm-kona.c #define PRESCALE_MASK(chan)			(0x7 << PRESCALE_SHIFT(chan))
chan               60 drivers/pwm/pwm-bcm-kona.c #define PERIOD_COUNT_OFFSET(chan)		(0x00000008 + ((chan) << 3))
chan               64 drivers/pwm/pwm-bcm-kona.c #define DUTY_CYCLE_HIGH_OFFSET(chan)		(0x0000000c + ((chan) << 3))
chan               83 drivers/pwm/pwm-bcm-kona.c 	unsigned int chan)
chan               87 drivers/pwm/pwm-bcm-kona.c 	value |= 1 << PWM_CONTROL_SMOOTH_SHIFT(chan);
chan               88 drivers/pwm/pwm-bcm-kona.c 	value &= ~(1 << PWM_CONTROL_TRIGGER_SHIFT(chan));
chan               98 drivers/pwm/pwm-bcm-kona.c static void kona_pwmc_apply_settings(struct kona_pwmc *kp, unsigned int chan)
chan              103 drivers/pwm/pwm-bcm-kona.c 	value &= ~(1 << PWM_CONTROL_SMOOTH_SHIFT(chan));
chan              104 drivers/pwm/pwm-bcm-kona.c 	value |= 1 << PWM_CONTROL_TRIGGER_SHIFT(chan);
chan              117 drivers/pwm/pwm-bcm-kona.c 	unsigned int value, chan = pwm->hwpwm;
chan              159 drivers/pwm/pwm-bcm-kona.c 		kona_pwmc_prepare_for_settings(kp, chan);
chan              162 drivers/pwm/pwm-bcm-kona.c 		value &= ~PRESCALE_MASK(chan);
chan              163 drivers/pwm/pwm-bcm-kona.c 		value |= prescale << PRESCALE_SHIFT(chan);
chan              166 drivers/pwm/pwm-bcm-kona.c 		writel(pc, kp->base + PERIOD_COUNT_OFFSET(chan));
chan              168 drivers/pwm/pwm-bcm-kona.c 		writel(dc, kp->base + DUTY_CYCLE_HIGH_OFFSET(chan));
chan              170 drivers/pwm/pwm-bcm-kona.c 		kona_pwmc_apply_settings(kp, chan);
chan              180 drivers/pwm/pwm-bcm-kona.c 	unsigned int chan = pwm->hwpwm;
chan              190 drivers/pwm/pwm-bcm-kona.c 	kona_pwmc_prepare_for_settings(kp, chan);
chan              195 drivers/pwm/pwm-bcm-kona.c 		value |= 1 << PWM_CONTROL_POLARITY_SHIFT(chan);
chan              197 drivers/pwm/pwm-bcm-kona.c 		value &= ~(1 << PWM_CONTROL_POLARITY_SHIFT(chan));
chan              201 drivers/pwm/pwm-bcm-kona.c 	kona_pwmc_apply_settings(kp, chan);
chan              232 drivers/pwm/pwm-bcm-kona.c 	unsigned int chan = pwm->hwpwm;
chan              235 drivers/pwm/pwm-bcm-kona.c 	kona_pwmc_prepare_for_settings(kp, chan);
chan              238 drivers/pwm/pwm-bcm-kona.c 	writel(0, kp->base + DUTY_CYCLE_HIGH_OFFSET(chan));
chan              239 drivers/pwm/pwm-bcm-kona.c 	writel(0, kp->base + PERIOD_COUNT_OFFSET(chan));
chan              243 drivers/pwm/pwm-bcm-kona.c 	value &= ~PRESCALE_MASK(chan);
chan              246 drivers/pwm/pwm-bcm-kona.c 	kona_pwmc_apply_settings(kp, chan);
chan              263 drivers/pwm/pwm-bcm-kona.c 	unsigned int chan;
chan              299 drivers/pwm/pwm-bcm-kona.c 	for (chan = 0; chan < kp->chip.npwm; chan++)
chan              300 drivers/pwm/pwm-bcm-kona.c 		value |= (1 << PWM_CONTROL_TYPE_SHIFT(chan));
chan              316 drivers/pwm/pwm-bcm-kona.c 	unsigned int chan;
chan              318 drivers/pwm/pwm-bcm-kona.c 	for (chan = 0; chan < kp->chip.npwm; chan++)
chan              319 drivers/pwm/pwm-bcm-kona.c 		if (pwm_is_enabled(&kp->chip.pwms[chan]))
chan               33 drivers/pwm/pwm-samsung.c #define REG_TCNTB(chan)			(0x0c + ((chan) * 0xc))
chan               34 drivers/pwm/pwm-samsung.c #define REG_TCMPB(chan)			(0x10 + ((chan) * 0xc))
chan               40 drivers/pwm/pwm-samsung.c #define TCFG1_SHIFT(chan)		(4 * (chan))
chan               50 drivers/pwm/pwm-samsung.c #define TCON_START(chan)		BIT(4 * (chan) + 0)
chan               51 drivers/pwm/pwm-samsung.c #define TCON_MANUALUPDATE(chan)		BIT(4 * (chan) + 1)
chan               52 drivers/pwm/pwm-samsung.c #define TCON_INVERT(chan)		BIT(4 * (chan) + 2)
chan               53 drivers/pwm/pwm-samsung.c #define _TCON_AUTORELOAD(chan)		BIT(4 * (chan) + 3)
chan               54 drivers/pwm/pwm-samsung.c #define _TCON_AUTORELOAD4(chan)		BIT(4 * (chan) + 2)
chan               55 drivers/pwm/pwm-samsung.c #define TCON_AUTORELOAD(chan)		\
chan               56 drivers/pwm/pwm-samsung.c 	((chan < 5) ? _TCON_AUTORELOAD(chan) : _TCON_AUTORELOAD4(chan))
chan              140 drivers/pwm/pwm-samsung.c static int pwm_samsung_is_tdiv(struct samsung_pwm_chip *chip, unsigned int chan)
chan              146 drivers/pwm/pwm-samsung.c 	reg >>= TCFG1_SHIFT(chan);
chan              153 drivers/pwm/pwm-samsung.c 					      unsigned int chan)
chan              161 drivers/pwm/pwm-samsung.c 	if (chan >= 2)
chan              169 drivers/pwm/pwm-samsung.c 					  unsigned int chan, unsigned long freq)
chan              176 drivers/pwm/pwm-samsung.c 	if (!pwm_samsung_is_tdiv(chip, chan)) {
chan              177 drivers/pwm/pwm-samsung.c 		clk = (chan < 2) ? chip->tclk0 : chip->tclk1;
chan              185 drivers/pwm/pwm-samsung.c 			"tclk of PWM %d is inoperational, using tdiv\n", chan);
chan              188 drivers/pwm/pwm-samsung.c 	rate = pwm_samsung_get_tin_rate(chip, chan);
chan              209 drivers/pwm/pwm-samsung.c 	pwm_samsung_set_divisor(chip, chan, BIT(div));
chan              307 drivers/pwm/pwm-samsung.c 	struct samsung_pwm_channel *chan = pwm_get_chip_data(pwm);
chan              308 drivers/pwm/pwm-samsung.c 	u32 tin_ns = chan->tin_ns, tcnt, tcmp, oldtcmp;
chan              325 drivers/pwm/pwm-samsung.c 	if (chan->period_ns != period_ns || force_period) {
chan              377 drivers/pwm/pwm-samsung.c 	chan->period_ns = period_ns;
chan              378 drivers/pwm/pwm-samsung.c 	chan->tin_ns = tin_ns;
chan              379 drivers/pwm/pwm-samsung.c 	chan->duty_ns = duty_ns;
chan              514 drivers/pwm/pwm-samsung.c 	unsigned int chan;
chan              561 drivers/pwm/pwm-samsung.c 	for (chan = 0; chan < SAMSUNG_PWM_NUM; ++chan)
chan              562 drivers/pwm/pwm-samsung.c 		if (chip->variant.output_mask & BIT(chan))
chan              563 drivers/pwm/pwm-samsung.c 			pwm_samsung_set_invert(chip, chan, true);
chan              609 drivers/pwm/pwm-samsung.c 		struct samsung_pwm_channel *chan = pwm_get_chip_data(pwm);
chan              611 drivers/pwm/pwm-samsung.c 		if (!chan)
chan              618 drivers/pwm/pwm-samsung.c 		if (chan->period_ns) {
chan              619 drivers/pwm/pwm-samsung.c 			__pwm_samsung_config(chip, pwm, chan->duty_ns,
chan              620 drivers/pwm/pwm-samsung.c 					     chan->period_ns, true);
chan               50 drivers/pwm/pwm-sun4i.c #define PWM_REG_PRESCAL(reg, chan)	(((reg) >> ((chan) * PWMCH_OFFSET)) & PWM_PRESCAL_MASK)
chan               52 drivers/pwm/pwm-sun4i.c #define BIT_CH(bit, chan)	((bit) << ((chan) * PWMCH_OFFSET))
chan              181 drivers/pwm/pwm-tiehrpwm.c static void configure_polarity(struct ehrpwm_pwm_chip *pc, int chan)
chan              192 drivers/pwm/pwm-tiehrpwm.c 	if (chan == 1) {
chan              196 drivers/pwm/pwm-tiehrpwm.c 		if (pc->polarity[chan] == PWM_POLARITY_INVERSED)
chan              204 drivers/pwm/pwm-tiehrpwm.c 		if (pc->polarity[chan] == PWM_POLARITY_INVERSED)
chan              616 drivers/rapidio/devices/rio_mport_cdev.c *prep_dma_xfer(struct dma_chan *chan, struct rio_transfer_io *transfer,
chan              645 drivers/rapidio/devices/rio_mport_cdev.c 	return rio_dma_prep_xfer(chan, transfer->rioid, &tx_data, dir, flags);
chan              699 drivers/rapidio/devices/rio_mport_cdev.c 	struct dma_chan *chan;
chan              710 drivers/rapidio/devices/rio_mport_cdev.c 	chan = priv->dmach;
chan              715 drivers/rapidio/devices/rio_mport_cdev.c 		   dev_name(&chan->dev->device),
chan              719 drivers/rapidio/devices/rio_mport_cdev.c 	tx = prep_dma_xfer(chan, xfer, sgt, nents, dir,
chan              756 drivers/rapidio/devices/rio_mport_cdev.c 	dma_async_issue_pending(chan);
chan              817 drivers/rapidio/devices/rio_mport_cdev.c 	struct dma_chan *chan;
chan              832 drivers/rapidio/devices/rio_mport_cdev.c 	chan = priv->dmach;
chan              839 drivers/rapidio/devices/rio_mport_cdev.c 	req->dmach = chan;
chan              935 drivers/rapidio/devices/rio_mport_cdev.c 	nents = dma_map_sg(chan->device->dev,
chan               47 drivers/rapidio/devices/tsi721_dma.c static inline struct tsi721_bdma_chan *to_tsi721_chan(struct dma_chan *chan)
chan               49 drivers/rapidio/devices/tsi721_dma.c 	return container_of(chan, struct tsi721_bdma_chan, dchan);
chan              411 drivers/rapidio/devices/tsi721_dma.c 	struct dma_chan *dchan = desc->txd.chan;
chan              694 drivers/rapidio/devices/tsi721_dma.c 	struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(txd->chan);
chan             1021 drivers/rapidio/devices/tsi721_dma.c 	struct dma_chan *chan, *_c;
chan             1027 drivers/rapidio/devices/tsi721_dma.c 	list_for_each_entry_safe(chan, _c, &mport->dma.channels,
chan             1029 drivers/rapidio/devices/tsi721_dma.c 		bdma_chan = to_tsi721_chan(chan);
chan             1040 drivers/rapidio/devices/tsi721_dma.c 		list_del(&chan->device_node);
chan             1817 drivers/rapidio/rio.c static bool rio_chan_filter(struct dma_chan *chan, void *arg)
chan             1822 drivers/rapidio/rio.c 	return mport == container_of(chan->device, struct rio_mport, dma);
chan              210 drivers/rapidio/rio_cm.c 	u16 chan;	/* requester channel ID */
chan              403 drivers/rapidio/rio_cm.c 	req->chan = ntohs(hh->src_ch);
chan             1145 drivers/rapidio/rio_cm.c 	new_ch->rem_channel = req->chan;
chan             1716 drivers/rapidio/rio_cm.c 	struct rio_cm_channel chan;
chan             1718 drivers/rapidio/rio_cm.c 	if (copy_from_user(&chan, arg, sizeof(chan)))
chan             1720 drivers/rapidio/rio_cm.c 	if (chan.mport_id >= RIO_MAX_MPORTS)
chan             1723 drivers/rapidio/rio_cm.c 	return riocm_ch_bind(chan.id, chan.mport_id, NULL);
chan             1780 drivers/rapidio/rio_cm.c 	struct rio_cm_channel chan;
chan             1785 drivers/rapidio/rio_cm.c 	if (copy_from_user(&chan, arg, sizeof(chan)))
chan             1787 drivers/rapidio/rio_cm.c 	if (chan.mport_id >= RIO_MAX_MPORTS)
chan             1794 drivers/rapidio/rio_cm.c 		if (cm->mport->id == chan.mport_id) {
chan             1803 drivers/rapidio/rio_cm.c 	if (chan.remote_destid >= RIO_ANY_DESTID(cm->mport->sys_size)) {
chan             1812 drivers/rapidio/rio_cm.c 		if (peer->rdev->destid == chan.remote_destid) {
chan             1823 drivers/rapidio/rio_cm.c 	return riocm_ch_connect(chan.id, cm, peer, chan.remote_channel);
chan              345 drivers/remoteproc/st_remoteproc.c 	struct mbox_chan *chan;
chan              399 drivers/remoteproc/st_remoteproc.c 		chan = mbox_request_channel_byname(&ddata->mbox_client_vq0, "vq0_rx");
chan              400 drivers/remoteproc/st_remoteproc.c 		if (IS_ERR(chan)) {
chan              402 drivers/remoteproc/st_remoteproc.c 			ret = PTR_ERR(chan);
chan              405 drivers/remoteproc/st_remoteproc.c 		ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_RX] = chan;
chan              407 drivers/remoteproc/st_remoteproc.c 		chan = mbox_request_channel_byname(&ddata->mbox_client_vq0, "vq0_tx");
chan              408 drivers/remoteproc/st_remoteproc.c 		if (IS_ERR(chan)) {
chan              410 drivers/remoteproc/st_remoteproc.c 			ret = PTR_ERR(chan);
chan              413 drivers/remoteproc/st_remoteproc.c 		ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_TX] = chan;
chan              415 drivers/remoteproc/st_remoteproc.c 		chan = mbox_request_channel_byname(&ddata->mbox_client_vq1, "vq1_rx");
chan              416 drivers/remoteproc/st_remoteproc.c 		if (IS_ERR(chan)) {
chan              418 drivers/remoteproc/st_remoteproc.c 			ret = PTR_ERR(chan);
chan              421 drivers/remoteproc/st_remoteproc.c 		ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_RX] = chan;
chan              423 drivers/remoteproc/st_remoteproc.c 		chan = mbox_request_channel_byname(&ddata->mbox_client_vq1, "vq1_tx");
chan              424 drivers/remoteproc/st_remoteproc.c 		if (IS_ERR(chan)) {
chan              426 drivers/remoteproc/st_remoteproc.c 			ret = PTR_ERR(chan);
chan              429 drivers/remoteproc/st_remoteproc.c 		ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_TX] = chan;
chan               59 drivers/remoteproc/stm32_rproc.c 	struct mbox_chan *chan;
chan              279 drivers/remoteproc/stm32_rproc.c 		if (ddata->mb[i].chan)
chan              280 drivers/remoteproc/stm32_rproc.c 			mbox_free_channel(ddata->mb[i].chan);
chan              281 drivers/remoteproc/stm32_rproc.c 		ddata->mb[i].chan = NULL;
chan              330 drivers/remoteproc/stm32_rproc.c 		ddata->mb[i].chan = mbox_request_channel_byname(cl, name);
chan              331 drivers/remoteproc/stm32_rproc.c 		if (IS_ERR(ddata->mb[i].chan)) {
chan              333 drivers/remoteproc/stm32_rproc.c 			ddata->mb[i].chan = NULL;
chan              416 drivers/remoteproc/stm32_rproc.c 		if (idx >= 0 && ddata->mb[idx].chan) {
chan              418 drivers/remoteproc/stm32_rproc.c 			err = mbox_send_message(ddata->mb[idx].chan,
chan              460 drivers/remoteproc/stm32_rproc.c 		if (!ddata->mb[i].chan)
chan              462 drivers/remoteproc/stm32_rproc.c 		err = mbox_send_message(ddata->mb[i].chan, (void *)(long)vqid);
chan             7995 drivers/scsi/aic7xxx/aic79xx_core.c 	char chan = SCB_GET_CHANNEL(ahd, scb);
chan             7999 drivers/scsi/aic7xxx/aic79xx_core.c 	match = ((chan == channel) || (channel == ALL_CHANNELS));
chan             5726 drivers/scsi/aic7xxx/aic7xxx_core.c 	char chan = SCB_GET_CHANNEL(ahc, scb);
chan             5730 drivers/scsi/aic7xxx/aic7xxx_core.c 	match = ((chan == channel) || (channel == ALL_CHANNELS));
chan              235 drivers/scsi/cxlflash/lunmgt.c 	u32 chan = sdev->channel;
chan              253 drivers/scsi/cxlflash/lunmgt.c 		lli->port_sel |= CHAN2PORTMASK(chan);
chan              254 drivers/scsi/cxlflash/lunmgt.c 		lli->lun_id[chan] = lun_to_lunid(sdev->lun);
chan              265 drivers/scsi/cxlflash/lunmgt.c 			lli->port_sel &= ~CHAN2PORTMASK(chan);
chan              272 drivers/scsi/cxlflash/lunmgt.c 		__func__, lli->port_sel, chan, lli->lun_id[chan]);
chan              887 drivers/scsi/cxlflash/vlun.c 	u32 chan;
chan              940 drivers/scsi/cxlflash/vlun.c 		chan = PORTMASK2CHAN(lli->port_sel);
chan              941 drivers/scsi/cxlflash/vlun.c 		if (cfg->promote_lun_index == cfg->last_lun_index[chan]) {
chan              946 drivers/scsi/cxlflash/vlun.c 		lind = lli->lun_index = cfg->last_lun_index[chan];
chan              947 drivers/scsi/cxlflash/vlun.c 		fc_port_luns = get_fc_port_luns(cfg, chan);
chan              948 drivers/scsi/cxlflash/vlun.c 		writeq_be(lli->lun_id[chan], &fc_port_luns[lind]);
chan              949 drivers/scsi/cxlflash/vlun.c 		cfg->last_lun_index[chan]--;
chan              951 drivers/scsi/cxlflash/vlun.c 			__func__, lind, chan, lli->lun_id[chan]);
chan              545 drivers/scsi/dpt_i2o.c 	int chan;
chan              570 drivers/scsi/dpt_i2o.c 	for(chan = 0; chan < MAX_CHANNEL; chan++) {
chan              572 drivers/scsi/dpt_i2o.c 			d = pHba->channel[chan].device[id];
chan             1119 drivers/scsi/dpt_i2o.c static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u64 lun)
chan             1123 drivers/scsi/dpt_i2o.c 	if(chan < 0 || chan >= MAX_CHANNEL)
chan             1126 drivers/scsi/dpt_i2o.c 	d = pHba->channel[chan].device[id];
chan              299 drivers/scsi/dpti.h static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u64 lun);
chan               70 drivers/soc/aspeed/aspeed-lpc-snoop.c 	struct aspeed_lpc_snoop_channel chan[NUM_SNOOP_CHANNELS];
chan               83 drivers/soc/aspeed/aspeed-lpc-snoop.c 	struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
chan               87 drivers/soc/aspeed/aspeed-lpc-snoop.c 	if (kfifo_is_empty(&chan->fifo)) {
chan               90 drivers/soc/aspeed/aspeed-lpc-snoop.c 		ret = wait_event_interruptible(chan->wq,
chan               91 drivers/soc/aspeed/aspeed-lpc-snoop.c 				!kfifo_is_empty(&chan->fifo));
chan               95 drivers/soc/aspeed/aspeed-lpc-snoop.c 	ret = kfifo_to_user(&chan->fifo, buffer, count, &copied);
chan              103 drivers/soc/aspeed/aspeed-lpc-snoop.c 	struct aspeed_lpc_snoop_channel *chan = snoop_file_to_chan(file);
chan              105 drivers/soc/aspeed/aspeed-lpc-snoop.c 	poll_wait(file, &chan->wq, pt);
chan              106 drivers/soc/aspeed/aspeed-lpc-snoop.c 	return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0;
chan              117 drivers/soc/aspeed/aspeed-lpc-snoop.c static void put_fifo_with_discard(struct aspeed_lpc_snoop_channel *chan, u8 val)
chan              119 drivers/soc/aspeed/aspeed-lpc-snoop.c 	if (!kfifo_initialized(&chan->fifo))
chan              121 drivers/soc/aspeed/aspeed-lpc-snoop.c 	if (kfifo_is_full(&chan->fifo))
chan              122 drivers/soc/aspeed/aspeed-lpc-snoop.c 		kfifo_skip(&chan->fifo);
chan              123 drivers/soc/aspeed/aspeed-lpc-snoop.c 	kfifo_put(&chan->fifo, val);
chan              124 drivers/soc/aspeed/aspeed-lpc-snoop.c 	wake_up_interruptible(&chan->wq);
chan              149 drivers/soc/aspeed/aspeed-lpc-snoop.c 		put_fifo_with_discard(&lpc_snoop->chan[0], val);
chan              154 drivers/soc/aspeed/aspeed-lpc-snoop.c 		put_fifo_with_discard(&lpc_snoop->chan[1], val);
chan              191 drivers/soc/aspeed/aspeed-lpc-snoop.c 	init_waitqueue_head(&lpc_snoop->chan[channel].wq);
chan              193 drivers/soc/aspeed/aspeed-lpc-snoop.c 	rc = kfifo_alloc(&lpc_snoop->chan[channel].fifo,
chan              198 drivers/soc/aspeed/aspeed-lpc-snoop.c 	lpc_snoop->chan[channel].miscdev.minor = MISC_DYNAMIC_MINOR;
chan              199 drivers/soc/aspeed/aspeed-lpc-snoop.c 	lpc_snoop->chan[channel].miscdev.name =
chan              201 drivers/soc/aspeed/aspeed-lpc-snoop.c 	lpc_snoop->chan[channel].miscdev.fops = &snoop_fops;
chan              202 drivers/soc/aspeed/aspeed-lpc-snoop.c 	lpc_snoop->chan[channel].miscdev.parent = dev;
chan              203 drivers/soc/aspeed/aspeed-lpc-snoop.c 	rc = misc_register(&lpc_snoop->chan[channel].miscdev);
chan              253 drivers/soc/aspeed/aspeed-lpc-snoop.c 	kfifo_free(&lpc_snoop->chan[channel].fifo);
chan              254 drivers/soc/aspeed/aspeed-lpc-snoop.c 	misc_deregister(&lpc_snoop->chan[channel].miscdev);
chan             2440 drivers/soc/fsl/qbman/qman.c 	cgr->chan = p->config->channel;
chan             2493 drivers/soc/fsl/qbman/qman.c 	if (cgr->chan != p->config->channel) {
chan             2497 drivers/soc/fsl/qbman/qman.c 			cgr->chan, p->config->channel);
chan               42 drivers/soc/mediatek/mtk-cmdq-helper.c 	client->chan = mbox_request_channel(&client->client, index);
chan               44 drivers/soc/mediatek/mtk-cmdq-helper.c 	if (IS_ERR(client->chan)) {
chan               48 drivers/soc/mediatek/mtk-cmdq-helper.c 		err = PTR_ERR(client->chan);
chan               65 drivers/soc/mediatek/mtk-cmdq-helper.c 	mbox_free_channel(client->chan);
chan               87 drivers/soc/mediatek/mtk-cmdq-helper.c 	dev = client->chan->mbox->dev;
chan              107 drivers/soc/mediatek/mtk-cmdq-helper.c 	dma_unmap_single(client->chan->mbox->dev, pkt->pa_base, pkt->buf_size,
chan              226 drivers/soc/mediatek/mtk-cmdq-helper.c 	dma_sync_single_for_cpu(client->chan->mbox->dev, pkt->pa_base,
chan              250 drivers/soc/mediatek/mtk-cmdq-helper.c 	dma_sync_single_for_device(client->chan->mbox->dev, pkt->pa_base,
chan              261 drivers/soc/mediatek/mtk-cmdq-helper.c 	err = mbox_send_message(client->chan, pkt);
chan              265 drivers/soc/mediatek/mtk-cmdq-helper.c 	mbox_client_txdone(client->chan, 0);
chan               53 drivers/soc/tegra/fuse/fuse-tegra20.c 	err = dmaengine_slave_config(fuse->apbdma.chan, &fuse->apbdma.config);
chan               57 drivers/soc/tegra/fuse/fuse-tegra20.c 	dma_desc = dmaengine_prep_slave_single(fuse->apbdma.chan,
chan               72 drivers/soc/tegra/fuse/fuse-tegra20.c 	dma_async_issue_pending(fuse->apbdma.chan);
chan               77 drivers/soc/tegra/fuse/fuse-tegra20.c 		dmaengine_terminate_all(fuse->apbdma.chan);
chan               88 drivers/soc/tegra/fuse/fuse-tegra20.c static bool dma_filter(struct dma_chan *chan, void *filter_param)
chan               90 drivers/soc/tegra/fuse/fuse-tegra20.c 	struct device_node *np = chan->device->dev->of_node;
chan              102 drivers/soc/tegra/fuse/fuse-tegra20.c 	fuse->apbdma.chan = dma_request_channel(mask, dma_filter, NULL);
chan              103 drivers/soc/tegra/fuse/fuse-tegra20.c 	if (!fuse->apbdma.chan)
chan              110 drivers/soc/tegra/fuse/fuse-tegra20.c 		dma_release_channel(fuse->apbdma.chan);
chan               46 drivers/soc/tegra/fuse/fuse.h 		struct dma_chan *chan;
chan              144 drivers/soc/ti/knav_dma.c static bool check_config(struct knav_dma_chan *chan, struct knav_dma_cfg *cfg)
chan              146 drivers/soc/ti/knav_dma.c 	if (!memcmp(&chan->cfg, cfg, sizeof(*cfg)))
chan              152 drivers/soc/ti/knav_dma.c static int chan_start(struct knav_dma_chan *chan,
chan              157 drivers/soc/ti/knav_dma.c 	spin_lock(&chan->lock);
chan              158 drivers/soc/ti/knav_dma.c 	if ((chan->direction == DMA_MEM_TO_DEV) && chan->reg_chan) {
chan              163 drivers/soc/ti/knav_dma.c 		writel_relaxed(v, &chan->reg_chan->mode);
chan              164 drivers/soc/ti/knav_dma.c 		writel_relaxed(DMA_ENABLE, &chan->reg_chan->control);
chan              167 drivers/soc/ti/knav_dma.c 	if (chan->reg_tx_sched)
chan              168 drivers/soc/ti/knav_dma.c 		writel_relaxed(cfg->u.tx.priority, &chan->reg_tx_sched->prio);
chan              170 drivers/soc/ti/knav_dma.c 	if (chan->reg_rx_flow) {
chan              186 drivers/soc/ti/knav_dma.c 		writel_relaxed(v, &chan->reg_rx_flow->control);
chan              187 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->tags);
chan              188 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->tag_sel);
chan              192 drivers/soc/ti/knav_dma.c 		writel_relaxed(v, &chan->reg_rx_flow->fdq_sel[0]);
chan              196 drivers/soc/ti/knav_dma.c 		writel_relaxed(v, &chan->reg_rx_flow->fdq_sel[1]);
chan              198 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[0]);
chan              199 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[1]);
chan              200 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[2]);
chan              204 drivers/soc/ti/knav_dma.c 	memcpy(&chan->cfg, cfg, sizeof(*cfg));
chan              205 drivers/soc/ti/knav_dma.c 	spin_unlock(&chan->lock);
chan              210 drivers/soc/ti/knav_dma.c static int chan_teardown(struct knav_dma_chan *chan)
chan              214 drivers/soc/ti/knav_dma.c 	if (!chan->reg_chan)
chan              218 drivers/soc/ti/knav_dma.c 	writel_relaxed(DMA_TEARDOWN, &chan->reg_chan->control);
chan              223 drivers/soc/ti/knav_dma.c 		value = readl_relaxed(&chan->reg_chan->control);
chan              228 drivers/soc/ti/knav_dma.c 	if (readl_relaxed(&chan->reg_chan->control) & DMA_ENABLE) {
chan              236 drivers/soc/ti/knav_dma.c static void chan_stop(struct knav_dma_chan *chan)
chan              238 drivers/soc/ti/knav_dma.c 	spin_lock(&chan->lock);
chan              239 drivers/soc/ti/knav_dma.c 	if (chan->reg_rx_flow) {
chan              241 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->fdq_sel[0]);
chan              242 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->fdq_sel[1]);
chan              243 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[0]);
chan              244 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[1]);
chan              245 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->thresh[2]);
chan              249 drivers/soc/ti/knav_dma.c 	chan_teardown(chan);
chan              252 drivers/soc/ti/knav_dma.c 	if (chan->reg_rx_flow) {
chan              253 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->control);
chan              254 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->tags);
chan              255 drivers/soc/ti/knav_dma.c 		writel_relaxed(0, &chan->reg_rx_flow->tag_sel);
chan              258 drivers/soc/ti/knav_dma.c 	memset(&chan->cfg, 0, sizeof(struct knav_dma_cfg));
chan              259 drivers/soc/ti/knav_dma.c 	spin_unlock(&chan->lock);
chan              320 drivers/soc/ti/knav_dma.c 					struct knav_dma_chan *chan)
chan              325 drivers/soc/ti/knav_dma.c 		((chan->direction == DMA_MEM_TO_DEV) ? "tx chan" : "rx flow"),
chan              326 drivers/soc/ti/knav_dma.c 		chan_number(chan));
chan              328 drivers/soc/ti/knav_dma.c 	if (chan->direction == DMA_MEM_TO_DEV) {
chan              330 drivers/soc/ti/knav_dma.c 			chan->cfg.u.tx.filt_einfo,
chan              331 drivers/soc/ti/knav_dma.c 			chan->cfg.u.tx.filt_pswords,
chan              332 drivers/soc/ti/knav_dma.c 			chan->cfg.u.tx.priority);
chan              335 drivers/soc/ti/knav_dma.c 			chan->cfg.u.rx.einfo_present,
chan              336 drivers/soc/ti/knav_dma.c 			chan->cfg.u.rx.psinfo_present,
chan              337 drivers/soc/ti/knav_dma.c 			chan->cfg.u.rx.desc_type);
chan              339 drivers/soc/ti/knav_dma.c 			chan->cfg.u.rx.dst_q,
chan              340 drivers/soc/ti/knav_dma.c 			chan->cfg.u.rx.thresh);
chan              342 drivers/soc/ti/knav_dma.c 			seq_printf(s, "[%d]", chan->cfg.u.rx.fdq[i]);
chan              350 drivers/soc/ti/knav_dma.c 	struct knav_dma_chan *chan;
chan              352 drivers/soc/ti/knav_dma.c 	list_for_each_entry(chan, &dma->chan_list, list) {
chan              353 drivers/soc/ti/knav_dma.c 		if (atomic_read(&chan->ref_count))
chan              354 drivers/soc/ti/knav_dma.c 			dma_debug_show_channels(s, chan);
chan              428 drivers/soc/ti/knav_dma.c 	struct knav_dma_chan *chan;
chan              470 drivers/soc/ti/knav_dma.c 	list_for_each_entry(chan, &dma->chan_list, list) {
chan              472 drivers/soc/ti/knav_dma.c 			if (chan->channel == chan_num) {
chan              477 drivers/soc/ti/knav_dma.c 			if (chan->flow == chan_num) {
chan              489 drivers/soc/ti/knav_dma.c 	if (atomic_read(&chan->ref_count) >= 1) {
chan              490 drivers/soc/ti/knav_dma.c 		if (!check_config(chan, config)) {
chan              497 drivers/soc/ti/knav_dma.c 	if (atomic_inc_return(&chan->dma->ref_count) <= 1)
chan              498 drivers/soc/ti/knav_dma.c 		knav_dma_hw_init(chan->dma);
chan              500 drivers/soc/ti/knav_dma.c 	if (atomic_inc_return(&chan->ref_count) <= 1)
chan              501 drivers/soc/ti/knav_dma.c 		chan_start(chan, config);
chan              506 drivers/soc/ti/knav_dma.c 	return chan;
chan              518 drivers/soc/ti/knav_dma.c 	struct knav_dma_chan *chan = channel;
chan              525 drivers/soc/ti/knav_dma.c 	if (atomic_dec_return(&chan->ref_count) <= 0)
chan              526 drivers/soc/ti/knav_dma.c 		chan_stop(chan);
chan              528 drivers/soc/ti/knav_dma.c 	if (atomic_dec_return(&chan->dma->ref_count) <= 0)
chan              529 drivers/soc/ti/knav_dma.c 		knav_dma_hw_destroy(chan->dma);
chan              532 drivers/soc/ti/knav_dma.c 			chan->channel, chan->flow, chan->dma->name);
chan              562 drivers/soc/ti/knav_dma.c static int pktdma_init_rx_chan(struct knav_dma_chan *chan, u32 flow)
chan              564 drivers/soc/ti/knav_dma.c 	struct knav_dma_device *dma = chan->dma;
chan              566 drivers/soc/ti/knav_dma.c 	chan->flow = flow;
chan              567 drivers/soc/ti/knav_dma.c 	chan->reg_rx_flow = dma->reg_rx_flow + flow;
chan              568 drivers/soc/ti/knav_dma.c 	chan->channel = DMA_INVALID_ID;
chan              569 drivers/soc/ti/knav_dma.c 	dev_dbg(kdev->dev, "rx flow(%d) (%p)\n", chan->flow, chan->reg_rx_flow);
chan              574 drivers/soc/ti/knav_dma.c static int pktdma_init_tx_chan(struct knav_dma_chan *chan, u32 channel)
chan              576 drivers/soc/ti/knav_dma.c 	struct knav_dma_device *dma = chan->dma;
chan              578 drivers/soc/ti/knav_dma.c 	chan->channel = channel;
chan              579 drivers/soc/ti/knav_dma.c 	chan->reg_chan = dma->reg_tx_chan + channel;
chan              580 drivers/soc/ti/knav_dma.c 	chan->reg_tx_sched = dma->reg_tx_sched + channel;
chan              581 drivers/soc/ti/knav_dma.c 	chan->flow = DMA_INVALID_ID;
chan              582 drivers/soc/ti/knav_dma.c 	dev_dbg(kdev->dev, "tx channel(%d) (%p)\n", chan->channel, chan->reg_chan);
chan              592 drivers/soc/ti/knav_dma.c 	struct knav_dma_chan *chan;
chan              595 drivers/soc/ti/knav_dma.c 	chan = devm_kzalloc(dev, sizeof(*chan), GFP_KERNEL);
chan              596 drivers/soc/ti/knav_dma.c 	if (!chan)
chan              599 drivers/soc/ti/knav_dma.c 	INIT_LIST_HEAD(&chan->list);
chan              600 drivers/soc/ti/knav_dma.c 	chan->dma	= dma;
chan              601 drivers/soc/ti/knav_dma.c 	chan->direction	= DMA_TRANS_NONE;
chan              602 drivers/soc/ti/knav_dma.c 	atomic_set(&chan->ref_count, 0);
chan              603 drivers/soc/ti/knav_dma.c 	spin_lock_init(&chan->lock);
chan              606 drivers/soc/ti/knav_dma.c 		chan->direction = dir;
chan              607 drivers/soc/ti/knav_dma.c 		ret = pktdma_init_tx_chan(chan, chan_num);
chan              609 drivers/soc/ti/knav_dma.c 		chan->direction = dir;
chan              610 drivers/soc/ti/knav_dma.c 		ret = pktdma_init_rx_chan(chan, chan_num);
chan              615 drivers/soc/ti/knav_dma.c 	list_add_tail(&chan->list, &dma->chan_list);
chan              665 drivers/spi/spi-bcm2835.c 	struct dma_chan *chan;
chan              676 drivers/spi/spi-bcm2835.c 		chan  = ctlr->dma_tx;
chan              682 drivers/spi/spi-bcm2835.c 		chan  = ctlr->dma_rx;
chan              688 drivers/spi/spi-bcm2835.c 	desc = dmaengine_prep_slave_sg(chan, sgl, nents, dir, flags);
chan               27 drivers/spi/spi-dw-mid.c static bool mid_spi_dma_chan_filter(struct dma_chan *chan, void *param)
chan               31 drivers/spi/spi-dw-mid.c 	if (s->dma_dev != chan->device->dev)
chan               34 drivers/spi/spi-dw-mid.c 	chan->private = s;
chan              278 drivers/spi/spi-ep93xx.c 	struct dma_chan *chan;
chan              292 drivers/spi/spi-ep93xx.c 		chan = espi->dma_rx;
chan              299 drivers/spi/spi-ep93xx.c 		chan = espi->dma_tx;
chan              307 drivers/spi/spi-ep93xx.c 	ret = dmaengine_slave_config(chan, &conf);
chan              351 drivers/spi/spi-ep93xx.c 	nents = dma_map_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
chan              355 drivers/spi/spi-ep93xx.c 	txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents, conf.direction,
chan              358 drivers/spi/spi-ep93xx.c 		dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
chan              376 drivers/spi/spi-ep93xx.c 	struct dma_chan *chan;
chan              380 drivers/spi/spi-ep93xx.c 		chan = espi->dma_rx;
chan              383 drivers/spi/spi-ep93xx.c 		chan = espi->dma_tx;
chan              387 drivers/spi/spi-ep93xx.c 	dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
chan              574 drivers/spi/spi-ep93xx.c static bool ep93xx_spi_dma_filter(struct dma_chan *chan, void *filter_param)
chan              576 drivers/spi/spi-ep93xx.c 	if (ep93xx_dma_chan_is_m2p(chan))
chan              579 drivers/spi/spi-ep93xx.c 	chan->private = filter_param;
chan             1158 drivers/spi/spi-pl022.c 	struct dma_chan *chan;
chan             1162 drivers/spi/spi-pl022.c 	chan = dma_request_slave_channel_reason(dev, "rx");
chan             1163 drivers/spi/spi-pl022.c 	if (IS_ERR(chan)) {
chan             1164 drivers/spi/spi-pl022.c 		err = PTR_ERR(chan);
chan             1168 drivers/spi/spi-pl022.c 	pl022->dma_rx_channel = chan;
chan             1170 drivers/spi/spi-pl022.c 	chan = dma_request_slave_channel_reason(dev, "tx");
chan             1171 drivers/spi/spi-pl022.c 	if (IS_ERR(chan)) {
chan             1172 drivers/spi/spi-pl022.c 		err = PTR_ERR(chan);
chan             1176 drivers/spi/spi-pl022.c 	pl022->dma_tx_channel = chan;
chan               77 drivers/spi/spi-pxa2xx-dma.c 	struct dma_chan *chan;
chan              102 drivers/spi/spi-pxa2xx-dma.c 		chan = drv_data->controller->dma_tx;
chan              109 drivers/spi/spi-pxa2xx-dma.c 		chan = drv_data->controller->dma_rx;
chan              112 drivers/spi/spi-pxa2xx-dma.c 	ret = dmaengine_slave_config(chan, &cfg);
chan              118 drivers/spi/spi-pxa2xx-dma.c 	return dmaengine_prep_slave_sg(chan, sgt->sgl, sgt->nents, dir,
chan               34 drivers/spi/spi-pxa2xx-pci.c 	bool (*dma_filter)(struct dma_chan *chan, void *param);
chan               63 drivers/spi/spi-pxa2xx-pci.c static bool lpss_dma_filter(struct dma_chan *chan, void *param)
chan               67 drivers/spi/spi-pxa2xx-pci.c 	if (dws->dma_dev != chan->device->dev)
chan               70 drivers/spi/spi-pxa2xx-pci.c 	chan->private = dws;
chan             1533 drivers/spi/spi-pxa2xx.c static bool pxa2xx_spi_idma_filter(struct dma_chan *chan, void *param)
chan             1535 drivers/spi/spi-pxa2xx.c 	return param == chan->device->dev;
chan              396 drivers/spi/spi-qup.c 	struct dma_chan *chan;
chan              400 drivers/spi/spi-qup.c 		chan = master->dma_tx;
chan              402 drivers/spi/spi-qup.c 		chan = master->dma_rx;
chan              404 drivers/spi/spi-qup.c 	desc = dmaengine_prep_slave_sg(chan, sgl, nents, dir, flags);
chan             1031 drivers/spi/spi-rspi.c 	struct dma_chan *chan;
chan             1038 drivers/spi/spi-rspi.c 	chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
chan             1041 drivers/spi/spi-rspi.c 	if (!chan) {
chan             1056 drivers/spi/spi-rspi.c 	ret = dmaengine_slave_config(chan, &cfg);
chan             1059 drivers/spi/spi-rspi.c 		dma_release_channel(chan);
chan             1063 drivers/spi/spi-rspi.c 	return chan;
chan             1171 drivers/spi/spi-sh-msiof.c 	struct dma_chan *chan;
chan             1178 drivers/spi/spi-sh-msiof.c 	chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
chan             1181 drivers/spi/spi-sh-msiof.c 	if (!chan) {
chan             1196 drivers/spi/spi-sh-msiof.c 	ret = dmaengine_slave_config(chan, &cfg);
chan             1199 drivers/spi/spi-sh-msiof.c 		dma_release_channel(chan);
chan             1203 drivers/spi/spi-sh-msiof.c 	return chan;
chan              398 drivers/spi/spi-ti-qspi.c 	struct dma_chan *chan = qspi->rx_chan;
chan              404 drivers/spi/spi-ti-qspi.c 	tx = dmaengine_prep_dma_memcpy(chan, dma_dst, dma_src, len, flags);
chan              421 drivers/spi/spi-ti-qspi.c 	dma_async_issue_pending(chan);
chan              425 drivers/spi/spi-ti-qspi.c 		dmaengine_terminate_sync(chan);
chan              828 drivers/spi/spi-topcliff-pch.c static bool pch_spi_filter(struct dma_chan *chan, void *slave)
chan              832 drivers/spi/spi-topcliff-pch.c 	if ((chan->chan_id == param->chan_id) &&
chan              833 drivers/spi/spi-topcliff-pch.c 	    (param->dma_dev == chan->device->dev)) {
chan              834 drivers/spi/spi-topcliff-pch.c 		chan->private = param;
chan              844 drivers/spi/spi-topcliff-pch.c 	struct dma_chan *chan;
chan              869 drivers/spi/spi-topcliff-pch.c 	chan = dma_request_channel(mask, pch_spi_filter, param);
chan              870 drivers/spi/spi-topcliff-pch.c 	if (!chan) {
chan              876 drivers/spi/spi-topcliff-pch.c 	dma->chan_tx = chan;
chan              884 drivers/spi/spi-topcliff-pch.c 	chan = dma_request_channel(mask, pch_spi_filter, param);
chan              885 drivers/spi/spi-topcliff-pch.c 	if (!chan) {
chan              893 drivers/spi/spi-topcliff-pch.c 	dma->chan_rx = chan;
chan               38 drivers/staging/board/armadillo800eva.c 		.chan		= LCDC_CHAN_MAINLCD,
chan               56 drivers/staging/comedi/comedi.h #define CR_PACK(chan, rng, aref)					\
chan               57 drivers/staging/comedi/comedi.h 	((((aref) & 0x3) << 24) | (((rng) & 0xff) << 16) | (chan))
chan               58 drivers/staging/comedi/comedi.h #define CR_PACK_FLAGS(chan, range, aref, flags)				\
chan               59 drivers/staging/comedi/comedi.h 	(CR_PACK(chan, range, aref) | ((flags) & CR_FLAGS_MASK))
chan              720 drivers/staging/comedi/comedidev.h 						unsigned int chan,
chan              723 drivers/staging/comedi/comedidev.h 	return s->range_table_list[chan]->range[range].min < 0;
chan              743 drivers/staging/comedi/comedidev.h 						 unsigned int chan,
chan              746 drivers/staging/comedi/comedidev.h 	return s->range_table_list[chan]->range[range].min >= 0;
chan              766 drivers/staging/comedi/comedidev.h 						 unsigned int chan,
chan              769 drivers/staging/comedi/comedidev.h 	return !!(s->range_table_list[chan]->range[range].flags & RF_EXTERNAL);
chan               16 drivers/staging/comedi/comedilib.h 			  unsigned int chan, unsigned int *io);
chan               18 drivers/staging/comedi/comedilib.h 		      unsigned int chan, unsigned int io);
chan              258 drivers/staging/comedi/drivers.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              265 drivers/staging/comedi/drivers.c 		data[i] = s->readback[chan];
chan              613 drivers/staging/comedi/drivers.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              614 drivers/staging/comedi/drivers.c 	unsigned int base_chan = (chan < 32) ? 0 : chan;
chan              628 drivers/staging/comedi/drivers.c 		_data[0] = 1 << (chan - base_chan);		    /* mask */
chan              629 drivers/staging/comedi/drivers.c 		_data[1] = data[0] ? (1 << (chan - base_chan)) : 0; /* bits */
chan              637 drivers/staging/comedi/drivers.c 		data[0] = (_data[1] >> (chan - base_chan)) & 1;
chan              168 drivers/staging/comedi/drivers/addi_apci_1500.c 				  unsigned int chan, bool enable)
chan              173 drivers/staging/comedi/drivers/addi_apci_1500.c 	if (chan == 0)
chan              175 drivers/staging/comedi/drivers/addi_apci_1500.c 	else if (chan == 1)
chan              185 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, 0x00, Z8536_CT_CMDSTAT_REG(chan));
chan              574 drivers/staging/comedi/drivers/addi_apci_1500.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              580 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, val & 0xff, Z8536_CT_RELOAD_LSB_REG(chan));
chan              582 drivers/staging/comedi/drivers/addi_apci_1500.c 			    Z8536_CT_RELOAD_MSB_REG(chan));
chan              584 drivers/staging/comedi/drivers/addi_apci_1500.c 		apci1500_timer_enable(dev, chan, true);
chan              586 drivers/staging/comedi/drivers/addi_apci_1500.c 			    Z8536_CT_CMDSTAT_REG(chan));
chan              589 drivers/staging/comedi/drivers/addi_apci_1500.c 		apci1500_timer_enable(dev, chan, false);
chan              594 drivers/staging/comedi/drivers/addi_apci_1500.c 		val = z8536_read(dev, Z8536_CT_CMDSTAT_REG(chan));
chan              601 drivers/staging/comedi/drivers/addi_apci_1500.c 			apci1500_ack_irq(dev, Z8536_CT_CMDSTAT_REG(chan));
chan              645 drivers/staging/comedi/drivers/addi_apci_1500.c 		apci1500_timer_enable(dev, chan, false);
chan              646 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, val, Z8536_CT_MODE_REG(chan));
chan              677 drivers/staging/comedi/drivers/addi_apci_1500.c 		if (chan == 0)
chan              680 drivers/staging/comedi/drivers/addi_apci_1500.c 		val = z8536_read(dev, Z8536_CT_MODE_REG(chan));
chan              686 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, val, Z8536_CT_MODE_REG(chan));
chan              689 drivers/staging/comedi/drivers/addi_apci_1500.c 		if (chan == 0)
chan              704 drivers/staging/comedi/drivers/addi_apci_1500.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              707 drivers/staging/comedi/drivers/addi_apci_1500.c 	cmd = z8536_read(dev, Z8536_CT_CMDSTAT_REG(chan));
chan              713 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, cmd, Z8536_CT_CMDSTAT_REG(chan));
chan              723 drivers/staging/comedi/drivers/addi_apci_1500.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              728 drivers/staging/comedi/drivers/addi_apci_1500.c 	cmd = z8536_read(dev, Z8536_CT_CMDSTAT_REG(chan));
chan              733 drivers/staging/comedi/drivers/addi_apci_1500.c 		z8536_write(dev, cmd, Z8536_CT_CMDSTAT_REG(chan));
chan              735 drivers/staging/comedi/drivers/addi_apci_1500.c 		val = z8536_read(dev, Z8536_CT_VAL_MSB_REG(chan)) << 8;
chan              736 drivers/staging/comedi/drivers/addi_apci_1500.c 		val |= z8536_read(dev, Z8536_CT_VAL_LSB_REG(chan));
chan              210 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned int chan;
chan              238 drivers/staging/comedi/drivers/addi_apci_1564.c 		for (chan = 0; chan < 3; chan++) {
chan              241 drivers/staging/comedi/drivers/addi_apci_1564.c 			iobase = devpriv->counters + APCI1564_COUNTER(chan);
chan              245 drivers/staging/comedi/drivers/addi_apci_1564.c 				s->state |= APCI1564_EVENT_COUNTER(chan);
chan              570 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              571 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan);
chan              620 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              621 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan);
chan              639 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              640 drivers/staging/comedi/drivers/addi_apci_1564.c 	unsigned long iobase = devpriv->counters + APCI1564_COUNTER(chan);
chan               53 drivers/staging/comedi/drivers/addi_apci_16xx.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               57 drivers/staging/comedi/drivers/addi_apci_16xx.c 	if (chan < 8)
chan               59 drivers/staging/comedi/drivers/addi_apci_16xx.c 	else if (chan < 16)
chan               61 drivers/staging/comedi/drivers/addi_apci_16xx.c 	else if (chan < 24)
chan              196 drivers/staging/comedi/drivers/addi_apci_2032.c 			unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              198 drivers/staging/comedi/drivers/addi_apci_2032.c 			if (val & (1 << chan))
chan              398 drivers/staging/comedi/drivers/addi_apci_3120.c 		unsigned int chan = CR_CHAN(chanlist[i]);
chan              402 drivers/staging/comedi/drivers/addi_apci_3120.c 		val = APCI3120_CHANLIST_MUX(chan) |
chan              765 drivers/staging/comedi/drivers/addi_apci_3120.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              776 drivers/staging/comedi/drivers/addi_apci_3120.c 		outw(APCI3120_AO_MUX(chan) | APCI3120_AO_DATA(val),
chan              777 drivers/staging/comedi/drivers/addi_apci_3120.c 		     dev->iobase + APCI3120_AO_REG(chan));
chan              779 drivers/staging/comedi/drivers/addi_apci_3120.c 		s->readback[chan] = val;
chan              111 drivers/staging/comedi/drivers/addi_apci_3501.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              113 drivers/staging/comedi/drivers/addi_apci_3501.c 	unsigned int cfg = APCI3501_AO_DATA_CHAN(chan);
chan              149 drivers/staging/comedi/drivers/addi_apci_3501.c 		s->readback[chan] = val;
chan              277 drivers/staging/comedi/drivers/addi_apci_3501.c 	int chan;
chan              289 drivers/staging/comedi/drivers/addi_apci_3501.c 	for (chan = 0; chan < 8; chan++) {
chan              294 drivers/staging/comedi/drivers/addi_apci_3501.c 				 __func__, chan);
chan              296 drivers/staging/comedi/drivers/addi_apci_3501.c 			outl(val | APCI3501_AO_DATA_CHAN(chan),
chan              382 drivers/staging/comedi/drivers/addi_apci_3xxx.c 	unsigned int chan = CR_CHAN(chanspec);
chan              408 drivers/staging/comedi/drivers/addi_apci_3xxx.c 	writel(chan, dev->mmio + 0);
chan              614 drivers/staging/comedi/drivers/addi_apci_3xxx.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              626 drivers/staging/comedi/drivers/addi_apci_3xxx.c 		writel((val << 8) | chan, dev->mmio + 100);
chan              633 drivers/staging/comedi/drivers/addi_apci_3xxx.c 		s->readback[chan] = val;
chan              669 drivers/staging/comedi/drivers/addi_apci_3xxx.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              680 drivers/staging/comedi/drivers/addi_apci_3xxx.c 		if (chan < 16)
chan               60 drivers/staging/comedi/drivers/adl_pci6208.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               74 drivers/staging/comedi/drivers/adl_pci6208.c 		     dev->iobase + PCI6208_AO_CONTROL(chan));
chan               76 drivers/staging/comedi/drivers/adl_pci6208.c 		s->readback[chan] = val;
chan               37 drivers/staging/comedi/drivers/adl_pci8164.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               41 drivers/staging/comedi/drivers/adl_pci8164.c 		data[i] = inw(dev->iobase + PCI8164_AXIS(chan) + offset);
chan               52 drivers/staging/comedi/drivers/adl_pci8164.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               56 drivers/staging/comedi/drivers/adl_pci8164.c 		outw(data[i], dev->iobase + PCI8164_AXIS(chan) + offset);
chan              210 drivers/staging/comedi/drivers/adl_pci9111.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              214 drivers/staging/comedi/drivers/adl_pci9111.c 		if (chan != i) {
chan              533 drivers/staging/comedi/drivers/adl_pci9111.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              542 drivers/staging/comedi/drivers/adl_pci9111.c 	outb(chan, dev->iobase + PCI9111_AI_CHANNEL_REG);
chan              574 drivers/staging/comedi/drivers/adl_pci9111.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              575 drivers/staging/comedi/drivers/adl_pci9111.c 	unsigned int val = s->readback[chan];
chan              582 drivers/staging/comedi/drivers/adl_pci9111.c 	s->readback[chan] = val;
chan              301 drivers/staging/comedi/drivers/adl_pci9118.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              317 drivers/staging/comedi/drivers/adl_pci9118.c 		    (chan >= (s->n_chan / 2))) {
chan              370 drivers/staging/comedi/drivers/adl_pci9118.c 		unsigned int chan = CR_CHAN(chanlist[i]);
chan              373 drivers/staging/comedi/drivers/adl_pci9118.c 		val = PCI9118_AI_CHANLIST_CHAN(chan) |
chan             1365 drivers/staging/comedi/drivers/adl_pci9118.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1366 drivers/staging/comedi/drivers/adl_pci9118.c 	unsigned int val = s->readback[chan];
chan             1371 drivers/staging/comedi/drivers/adl_pci9118.c 		outl(val, dev->iobase + PCI9118_AO_REG(chan));
chan             1373 drivers/staging/comedi/drivers/adl_pci9118.c 	s->readback[chan] = val;
chan              112 drivers/staging/comedi/drivers/adq12b.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              119 drivers/staging/comedi/drivers/adq12b.c 	val = ADQ12B_CTREG_RANGE(range) | ADQ12B_CTREG_CHAN(chan);
chan              158 drivers/staging/comedi/drivers/adq12b.c 	unsigned int chan;
chan              163 drivers/staging/comedi/drivers/adq12b.c 		for (chan = 0; chan < 8; chan++) {
chan              164 drivers/staging/comedi/drivers/adq12b.c 			if ((mask >> chan) & 0x01) {
chan              165 drivers/staging/comedi/drivers/adq12b.c 				val = (s->state >> chan) & 0x01;
chan              166 drivers/staging/comedi/drivers/adq12b.c 				outb((val << 3) | chan,
chan              202 drivers/staging/comedi/drivers/adv_pci1710.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              208 drivers/staging/comedi/drivers/adv_pci1710.c 		if (aref == AREF_DIFF && (chan & 1)) {
chan              216 drivers/staging/comedi/drivers/adv_pci1710.c 		if (chan != next_chan) {
chan              219 drivers/staging/comedi/drivers/adv_pci1710.c 				i, chan, next_chan, chan0);
chan              259 drivers/staging/comedi/drivers/adv_pci1710.c 		unsigned int chan = CR_CHAN(chanlist[i]);
chan              273 drivers/staging/comedi/drivers/adv_pci1710.c 		outw(PCI171X_MUX_CHAN(chan), dev->iobase + PCI171X_MUX_REG);
chan              276 drivers/staging/comedi/drivers/adv_pci1710.c 		devpriv->act_chanlist[i] = chan;
chan              308 drivers/staging/comedi/drivers/adv_pci1710.c 	unsigned int chan;
chan              317 drivers/staging/comedi/drivers/adv_pci1710.c 		chan = sample >> 12;
chan              318 drivers/staging/comedi/drivers/adv_pci1710.c 		if (chan != devpriv->act_chanlist[cur_chan]) {
chan              321 drivers/staging/comedi/drivers/adv_pci1710.c 				chan, devpriv->act_chanlist[cur_chan]);
chan              641 drivers/staging/comedi/drivers/adv_pci1710.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              643 drivers/staging/comedi/drivers/adv_pci1710.c 	unsigned int val = s->readback[chan];
chan              646 drivers/staging/comedi/drivers/adv_pci1710.c 	devpriv->da_ranges &= ~PCI171X_DAREF_MASK(chan);
chan              647 drivers/staging/comedi/drivers/adv_pci1710.c 	devpriv->da_ranges |= PCI171X_DAREF(chan, range);
chan              652 drivers/staging/comedi/drivers/adv_pci1710.c 		outw(val, dev->iobase + PCI171X_DA_REG(chan));
chan              655 drivers/staging/comedi/drivers/adv_pci1710.c 	s->readback[chan] = val;
chan               75 drivers/staging/comedi/drivers/adv_pci1720.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               82 drivers/staging/comedi/drivers/adv_pci1720.c 	val &= ~PCI1720_AO_RANGE_MASK(chan);
chan               83 drivers/staging/comedi/drivers/adv_pci1720.c 	val |= PCI1720_AO_RANGE(chan, range);
chan               86 drivers/staging/comedi/drivers/adv_pci1720.c 	val = s->readback[chan];
chan               90 drivers/staging/comedi/drivers/adv_pci1720.c 		outb(val & 0xff, dev->iobase + PCI1720_AO_LSB_REG(chan));
chan               91 drivers/staging/comedi/drivers/adv_pci1720.c 		outb((val >> 8) & 0xff, dev->iobase + PCI1720_AO_MSB_REG(chan));
chan               97 drivers/staging/comedi/drivers/adv_pci1720.c 	s->readback[chan] = val;
chan               83 drivers/staging/comedi/drivers/adv_pci1723.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               89 drivers/staging/comedi/drivers/adv_pci1723.c 		outw(val, dev->iobase + PCI1723_AO_REG(chan));
chan               90 drivers/staging/comedi/drivers/adv_pci1723.c 		s->readback[chan] = val;
chan              101 drivers/staging/comedi/drivers/adv_pci1723.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              102 drivers/staging/comedi/drivers/adv_pci1723.c 	unsigned int mask = (chan < 8) ? 0x00ff : 0xff00;
chan               92 drivers/staging/comedi/drivers/adv_pci1724.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               97 drivers/staging/comedi/drivers/adv_pci1724.c 	ctrl = PCI1724_DAC_CTRL_GX(chan) | PCI1724_DAC_CTRL_CX(chan) | mode;
chan              112 drivers/staging/comedi/drivers/adv_pci1724.c 		s->readback[chan] = val;
chan              204 drivers/staging/comedi/drivers/adv_pci1760.c 			      unsigned int chan, bool enable)
chan              213 drivers/staging/comedi/drivers/adv_pci1760.c 		ret |= BIT(chan);
chan              215 drivers/staging/comedi/drivers/adv_pci1760.c 		ret &= ~BIT(chan);
chan              225 drivers/staging/comedi/drivers/adv_pci1760.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              232 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_pwm_enable(dev, chan, false);
chan              238 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_cmd(dev, PCI1760_CMD_SET_PWM_CNT(chan), data[1]);
chan              242 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_pwm_enable(dev, chan, true);
chan              247 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_pwm_enable(dev, chan, false);
chan              252 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_pwm_enable(dev, chan, false);
chan              266 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_cmd(dev, PCI1760_CMD_SET_PWM_HI(chan), hi_div);
chan              269 drivers/staging/comedi/drivers/adv_pci1760.c 		ret = pci1760_cmd(dev, PCI1760_CMD_SET_PWM_LO(chan), lo_div);
chan              275 drivers/staging/comedi/drivers/adv_pci1760.c 				     PCI1760_CMD_SET_PWM_HI(chan));
chan              277 drivers/staging/comedi/drivers/adv_pci1760.c 				     PCI1760_CMD_SET_PWM_LO(chan));
chan              290 drivers/staging/comedi/drivers/adv_pci1760.c 		data[1] = (ret & BIT(chan)) ? 1 : 0;
chan              117 drivers/staging/comedi/drivers/aio_aio12_8.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              129 drivers/staging/comedi/drivers/aio_aio12_8.c 		  AIO12_8_ADC_RANGE(range) | AIO12_8_ADC_CHAN(chan);
chan              160 drivers/staging/comedi/drivers/aio_aio12_8.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              161 drivers/staging/comedi/drivers/aio_aio12_8.c 	unsigned int val = s->readback[chan];
chan              169 drivers/staging/comedi/drivers/aio_aio12_8.c 		outw(val, dev->iobase + AIO12_8_DAC_REG(chan));
chan              171 drivers/staging/comedi/drivers/aio_aio12_8.c 	s->readback[chan] = val;
chan              181 drivers/staging/comedi/drivers/aio_aio12_8.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              190 drivers/staging/comedi/drivers/aio_aio12_8.c 		data[1] = (chan == 1) ? I8254_OSC_BASE_1MHZ : 0;
chan               42 drivers/staging/comedi/drivers/amplc_dio200_common.c static unsigned char clk_gat_sce(unsigned int which, unsigned int chan,
chan               45 drivers/staging/comedi/drivers/amplc_dio200_common.c 	return (which << 5) | (chan << 3) |
chan              474 drivers/staging/comedi/drivers/amplc_dio200_common.c 					    unsigned int chan,
chan              480 drivers/staging/comedi/drivers/amplc_dio200_common.c 		      clk_gat_sce((offset >> 2) & 1, chan, src));
chan              485 drivers/staging/comedi/drivers/amplc_dio200_common.c 					     unsigned int chan,
chan              491 drivers/staging/comedi/drivers/amplc_dio200_common.c 		      clk_gat_sce((offset >> 2) & 1, chan, src));
chan              501 drivers/staging/comedi/drivers/amplc_dio200_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              514 drivers/staging/comedi/drivers/amplc_dio200_common.c 		dio200_subdev_8254_set_gate_src(dev, s, chan, src);
chan              515 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254->gate_src[chan] = src;
chan              518 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[2] = i8254->gate_src[chan];
chan              525 drivers/staging/comedi/drivers/amplc_dio200_common.c 		dio200_subdev_8254_set_clock_src(dev, s, chan, src);
chan              526 drivers/staging/comedi/drivers/amplc_dio200_common.c 		i8254->clock_src[chan] = src;
chan              529 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[1] = i8254->clock_src[chan];
chan              530 drivers/staging/comedi/drivers/amplc_dio200_common.c 		data[2] = clock_period[i8254->clock_src[chan]];
chan              546 drivers/staging/comedi/drivers/amplc_dio200_common.c 	int chan;
chan              584 drivers/staging/comedi/drivers/amplc_dio200_common.c 		for (chan = 0; chan < 3; chan++) {
chan              586 drivers/staging/comedi/drivers/amplc_dio200_common.c 			dio200_subdev_8254_set_gate_src(dev, s, chan, 0);
chan              588 drivers/staging/comedi/drivers/amplc_dio200_common.c 			dio200_subdev_8254_set_clock_src(dev, s, chan, 0);
chan              653 drivers/staging/comedi/drivers/amplc_dio200_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              657 drivers/staging/comedi/drivers/amplc_dio200_common.c 	if (chan < 8)
chan              659 drivers/staging/comedi/drivers/amplc_dio200_common.c 	else if (chan < 16)
chan              661 drivers/staging/comedi/drivers/amplc_dio200_common.c 	else if (chan < 20)
chan              201 drivers/staging/comedi/drivers/amplc_pci224.c static unsigned int pci224_clk_config(unsigned int chan, unsigned int src)
chan              203 drivers/staging/comedi/drivers/amplc_pci224.c 	return ((chan & 3) << 3) | (src & 7);
chan              214 drivers/staging/comedi/drivers/amplc_pci224.c static unsigned int pci224_gat_config(unsigned int chan, unsigned int src)
chan              216 drivers/staging/comedi/drivers/amplc_pci224.c 	return ((chan & 3) << 3) | (src & 7);
chan              387 drivers/staging/comedi/drivers/amplc_pci224.c pci224_ao_set_data(struct comedi_device *dev, int chan, int range,
chan              395 drivers/staging/comedi/drivers/amplc_pci224.c 	outw(1 << chan, dev->iobase + PCI224_DACCEN);
chan              423 drivers/staging/comedi/drivers/amplc_pci224.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              425 drivers/staging/comedi/drivers/amplc_pci224.c 	unsigned int val = s->readback[chan];
chan              430 drivers/staging/comedi/drivers/amplc_pci224.c 		pci224_ao_set_data(dev, chan, range, val);
chan              432 drivers/staging/comedi/drivers/amplc_pci224.c 	s->readback[chan] = val;
chan              632 drivers/staging/comedi/drivers/amplc_pci224.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              634 drivers/staging/comedi/drivers/amplc_pci224.c 		if (chan_mask & (1 << chan)) {
chan              640 drivers/staging/comedi/drivers/amplc_pci224.c 		chan_mask |= 1 << chan;
chan              371 drivers/staging/comedi/drivers/amplc_pci230.c static unsigned int pci230_clk_config(unsigned int chan, unsigned int src)
chan              373 drivers/staging/comedi/drivers/amplc_pci230.c 	return ((chan & 3) << 3) | (src & 7);
chan              384 drivers/staging/comedi/drivers/amplc_pci230.c static unsigned int pci230_gat_config(unsigned int chan, unsigned int src)
chan              386 drivers/staging/comedi/drivers/amplc_pci230.c 	return ((chan & 3) << 3) | (src & 7);
chan              575 drivers/staging/comedi/drivers/amplc_pci230.c 				   unsigned short datum, unsigned int chan)
chan              581 drivers/staging/comedi/drivers/amplc_pci230.c 	     devpriv->daqio + ((chan == 0) ? PCI230_DACOUT1 : PCI230_DACOUT2));
chan              585 drivers/staging/comedi/drivers/amplc_pci230.c 				 unsigned short datum, unsigned int chan)
chan              728 drivers/staging/comedi/drivers/amplc_pci230.c 	unsigned int chan, range, aref;
chan              734 drivers/staging/comedi/drivers/amplc_pci230.c 	chan = CR_CHAN(insn->chanspec);
chan              739 drivers/staging/comedi/drivers/amplc_pci230.c 		if (chan >= s->n_chan / 2) {
chan              759 drivers/staging/comedi/drivers/amplc_pci230.c 		gainshift = chan * 2;
chan              776 drivers/staging/comedi/drivers/amplc_pci230.c 		adcen = 1 << chan;
chan              777 drivers/staging/comedi/drivers/amplc_pci230.c 		gainshift = chan & ~1;
chan              828 drivers/staging/comedi/drivers/amplc_pci230.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              830 drivers/staging/comedi/drivers/amplc_pci230.c 	unsigned int val = s->readback[chan];
chan              842 drivers/staging/comedi/drivers/amplc_pci230.c 		pci230_ao_write_nofifo(dev, val, chan);
chan              844 drivers/staging/comedi/drivers/amplc_pci230.c 	s->readback[chan] = val;
chan              858 drivers/staging/comedi/drivers/amplc_pci230.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              861 drivers/staging/comedi/drivers/amplc_pci230.c 		if (chan < prev_chan) {
chan              875 drivers/staging/comedi/drivers/amplc_pci230.c 		prev_chan = chan;
chan             1074 drivers/staging/comedi/drivers/amplc_pci230.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             1080 drivers/staging/comedi/drivers/amplc_pci230.c 		pci230_ao_write_nofifo(dev, data, chan);
chan             1081 drivers/staging/comedi/drivers/amplc_pci230.c 		s->readback[chan] = data;
chan             1145 drivers/staging/comedi/drivers/amplc_pci230.c 				unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             1149 drivers/staging/comedi/drivers/amplc_pci230.c 				pci230_ao_write_fifo(dev, datum, chan);
chan             1150 drivers/staging/comedi/drivers/amplc_pci230.c 				s->readback[chan] = datum;
chan             1418 drivers/staging/comedi/drivers/amplc_pci230.c 		unsigned int chan = CR_CHAN(chanspec);
chan             1423 drivers/staging/comedi/drivers/amplc_pci230.c 		if (aref == AREF_DIFF && chan >= max_diff_chan) {
chan             1435 drivers/staging/comedi/drivers/amplc_pci230.c 			if (chan <= prev_chan && subseq_len == 0)
chan             1461 drivers/staging/comedi/drivers/amplc_pci230.c 			    ((chan ^ prev_chan) & ~1) == 0) {
chan             1468 drivers/staging/comedi/drivers/amplc_pci230.c 		prev_chan = chan;
chan             2081 drivers/staging/comedi/drivers/amplc_pci230.c 	unsigned int i, chan, range, diff;
chan             2152 drivers/staging/comedi/drivers/amplc_pci230.c 		chan = CR_CHAN(cmd->chanlist[i]);
chan             2155 drivers/staging/comedi/drivers/amplc_pci230.c 			gainshift = 2 * chan;
chan             2170 drivers/staging/comedi/drivers/amplc_pci230.c 			gainshift = chan & ~1;
chan             2171 drivers/staging/comedi/drivers/amplc_pci230.c 			adcen |= 1 << chan;
chan               87 drivers/staging/comedi/drivers/c6xdigio.c 			       unsigned int chan, unsigned int val)
chan               89 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int cmd = C6XDIGIO_DATA_PWM | C6XDIGIO_DATA_CHAN(chan);
chan              112 drivers/staging/comedi/drivers/c6xdigio.c 				 unsigned int chan)
chan              114 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int cmd = C6XDIGIO_DATA_ENCODER | C6XDIGIO_DATA_CHAN(chan);
chan              154 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              155 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int val = (s->state >> (16 * chan)) & 0xffff;
chan              160 drivers/staging/comedi/drivers/c6xdigio.c 		c6xdigio_pwm_write(dev, chan, val);
chan              169 drivers/staging/comedi/drivers/c6xdigio.c 	s->state &= (0xffff << (16 * chan));
chan              170 drivers/staging/comedi/drivers/c6xdigio.c 	s->state |= (val << (16 * chan));
chan              180 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              184 drivers/staging/comedi/drivers/c6xdigio.c 	val = (s->state >> (16 * chan)) & 0xffff;
chan              197 drivers/staging/comedi/drivers/c6xdigio.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              202 drivers/staging/comedi/drivers/c6xdigio.c 		val = c6xdigio_encoder_read(dev, chan);
chan              145 drivers/staging/comedi/drivers/cb_das16_cs.c 	int chan = CR_CHAN(insn->chanspec);
chan              151 drivers/staging/comedi/drivers/cb_das16_cs.c 	outw(DAS16CS_AI_MUX_SINGLE_CHAN(chan),
chan              199 drivers/staging/comedi/drivers/cb_das16_cs.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              200 drivers/staging/comedi/drivers/cb_das16_cs.c 	unsigned int val = s->readback[chan];
chan              213 drivers/staging/comedi/drivers/cb_das16_cs.c 		if (chan)
chan              239 drivers/staging/comedi/drivers/cb_das16_cs.c 	s->readback[chan] = val;
chan              263 drivers/staging/comedi/drivers/cb_das16_cs.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              267 drivers/staging/comedi/drivers/cb_das16_cs.c 	if (chan < 4)
chan              330 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              341 drivers/staging/comedi/drivers/cb_pcidas.c 		chan = 0;
chan              347 drivers/staging/comedi/drivers/cb_pcidas.c 	bits = PCIDAS_AI_CHAN(chan) | PCIDAS_AI_GAIN(range);
chan              409 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              411 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int val = s->readback[chan];
chan              418 drivers/staging/comedi/drivers/cb_pcidas.c 			      PCIDAS_AO_RANGE_MASK(chan));
chan              419 drivers/staging/comedi/drivers/cb_pcidas.c 	devpriv->ao_ctrl |= PCIDAS_AO_DACEN | PCIDAS_AO_RANGE(chan, range);
chan              425 drivers/staging/comedi/drivers/cb_pcidas.c 		outw(val, devpriv->pcibar4 + PCIDAS_AO_DATA_REG(chan));
chan              428 drivers/staging/comedi/drivers/cb_pcidas.c 	s->readback[chan] = val;
chan              440 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              442 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int val = s->readback[chan];
chan              451 drivers/staging/comedi/drivers/cb_pcidas.c 	devpriv->ao_ctrl &= ~(PCIDAS_AO_CHAN_MASK | PCIDAS_AO_RANGE_MASK(chan) |
chan              453 drivers/staging/comedi/drivers/cb_pcidas.c 	devpriv->ao_ctrl |= PCIDAS_AO_DACEN | PCIDAS_AO_RANGE(chan, range) |
chan              454 drivers/staging/comedi/drivers/cb_pcidas.c 			    PCIDAS_AO_CHAN_EN(chan) | PCIDAS_AO_START;
chan              463 drivers/staging/comedi/drivers/cb_pcidas.c 	s->readback[chan] = val;
chan              488 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              501 drivers/staging/comedi/drivers/cb_pcidas.c 		outb(chan & 0xff, devpriv->amcc + AMCC_OP_REG_MCSR_NVDATA);
chan              504 drivers/staging/comedi/drivers/cb_pcidas.c 		outb((chan >> 8) & 0xff,
chan              564 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              569 drivers/staging/comedi/drivers/cb_pcidas.c 		if (s->readback[chan] != val) {
chan              571 drivers/staging/comedi/drivers/cb_pcidas.c 			cb_pcidas_calib_write(dev, (chan << 8) | val, 11,
chan              573 drivers/staging/comedi/drivers/cb_pcidas.c 			s->readback[chan] = val;
chan              601 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              606 drivers/staging/comedi/drivers/cb_pcidas.c 		if (s->readback[chan] != val) {
chan              608 drivers/staging/comedi/drivers/cb_pcidas.c 			s->readback[chan] = val;
chan              616 drivers/staging/comedi/drivers/cb_pcidas.c 				    unsigned int chan, unsigned int val)
chan              622 drivers/staging/comedi/drivers/cb_pcidas.c 		cb_pcidas_calib_write(dev, (chan << 8) | val, 10, true);
chan              634 drivers/staging/comedi/drivers/cb_pcidas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              639 drivers/staging/comedi/drivers/cb_pcidas.c 		if (s->readback[chan] != val) {
chan              640 drivers/staging/comedi/drivers/cb_pcidas.c 			cb_pcidas_trimpot_write(dev, chan, val);
chan              641 drivers/staging/comedi/drivers/cb_pcidas.c 			s->readback[chan] = val;
chan              657 drivers/staging/comedi/drivers/cb_pcidas.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              660 drivers/staging/comedi/drivers/cb_pcidas.c 		if (chan != (chan0 + i) % s->n_chan) {
chan             1042 drivers/staging/comedi/drivers/cb_pcidas.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             1046 drivers/staging/comedi/drivers/cb_pcidas.c 		devpriv->ao_ctrl |= PCIDAS_AO_CHAN_EN(chan);
chan             1048 drivers/staging/comedi/drivers/cb_pcidas.c 		devpriv->ao_ctrl |= PCIDAS_AO_RANGE(chan, range);
chan             2085 drivers/staging/comedi/drivers/cb_pcidas64.c 			unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             2087 drivers/staging/comedi/drivers/cb_pcidas64.c 			if (chan != (chan0 + i)) {
chan             3100 drivers/staging/comedi/drivers/cb_pcidas64.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             3102 drivers/staging/comedi/drivers/cb_pcidas64.c 	unsigned int val = s->readback[chan];
chan             3109 drivers/staging/comedi/drivers/cb_pcidas64.c 	set_dac_range_bits(dev, &devpriv->dac_control1_bits, chan, range);
chan             3118 drivers/staging/comedi/drivers/cb_pcidas64.c 			       devpriv->main_iobase + dac_lsb_4020_reg(chan));
chan             3120 drivers/staging/comedi/drivers/cb_pcidas64.c 			       devpriv->main_iobase + dac_msb_4020_reg(chan));
chan             3123 drivers/staging/comedi/drivers/cb_pcidas64.c 			       devpriv->main_iobase + dac_convert_reg(chan));
chan             3128 drivers/staging/comedi/drivers/cb_pcidas64.c 	s->readback[chan] = val;
chan             3327 drivers/staging/comedi/drivers/cb_pcidas64.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             3329 drivers/staging/comedi/drivers/cb_pcidas64.c 		if (chan != (chan0 + i)) {
chan             3633 drivers/staging/comedi/drivers/cb_pcidas64.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             3642 drivers/staging/comedi/drivers/cb_pcidas64.c 		if (s->readback[chan] != val) {
chan             3643 drivers/staging/comedi/drivers/cb_pcidas64.c 			caldac_write(dev, chan, val);
chan             3644 drivers/staging/comedi/drivers/cb_pcidas64.c 			s->readback[chan] = val;
chan             3686 drivers/staging/comedi/drivers/cb_pcidas64.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             3695 drivers/staging/comedi/drivers/cb_pcidas64.c 		if (s->readback[chan] != val) {
chan             3696 drivers/staging/comedi/drivers/cb_pcidas64.c 			ad8402_write(dev, chan, val);
chan             3697 drivers/staging/comedi/drivers/cb_pcidas64.c 			s->readback[chan] = val;
chan              262 drivers/staging/comedi/drivers/cb_pcidda.c 	unsigned int chan = 4 * (channel % 2);	/* caldac channel base */
chan              275 drivers/staging/comedi/drivers/cb_pcidda.c 	cb_pcidda_write_caldac(dev, caldac, chan + CB_DDA_CALDAC_COURSE_OFFSET,
chan              277 drivers/staging/comedi/drivers/cb_pcidda.c 	cb_pcidda_write_caldac(dev, caldac, chan + CB_DDA_CALDAC_FINE_OFFSET,
chan              279 drivers/staging/comedi/drivers/cb_pcidda.c 	cb_pcidda_write_caldac(dev, caldac, chan + CB_DDA_CALDAC_COURSE_GAIN,
chan              281 drivers/staging/comedi/drivers/cb_pcidda.c 	cb_pcidda_write_caldac(dev, caldac, chan + CB_DDA_CALDAC_FINE_GAIN,
chan              177 drivers/staging/comedi/drivers/cb_pcimdas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              200 drivers/staging/comedi/drivers/cb_pcimdas.c 	outb(PCIMDAS_MUX(chan, chan), devpriv->BADR3 + PCIMDAS_MUX_REG);
chan              226 drivers/staging/comedi/drivers/cb_pcimdas.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              227 drivers/staging/comedi/drivers/cb_pcimdas.c 	unsigned int val = s->readback[chan];
chan              232 drivers/staging/comedi/drivers/cb_pcimdas.c 		outw(val, devpriv->daqio + PCIMDAS_AO_REG(chan));
chan              234 drivers/staging/comedi/drivers/cb_pcimdas.c 	s->readback[chan] = val;
chan               89 drivers/staging/comedi/drivers/cb_pcimdda.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               90 drivers/staging/comedi/drivers/cb_pcimdda.c 	unsigned long offset = dev->iobase + PCIMDDA_DA_CHAN(chan);
chan               91 drivers/staging/comedi/drivers/cb_pcimdda.c 	unsigned int val = s->readback[chan];
chan              109 drivers/staging/comedi/drivers/cb_pcimdda.c 	s->readback[chan] = val;
chan              119 drivers/staging/comedi/drivers/cb_pcimdda.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              122 drivers/staging/comedi/drivers/cb_pcimdda.c 	inw(dev->iobase + PCIMDDA_DA_CHAN(chan));
chan              485 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              488 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
chan              492 drivers/staging/comedi/drivers/comedi_8254.c 		data[i] = comedi_8254_read(i8254, chan);
chan              503 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              505 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
chan              509 drivers/staging/comedi/drivers/comedi_8254.c 		comedi_8254_write(i8254, chan, data[insn->n - 1]);
chan              520 drivers/staging/comedi/drivers/comedi_8254.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              523 drivers/staging/comedi/drivers/comedi_8254.c 	if (i8254->busy[chan])
chan              528 drivers/staging/comedi/drivers/comedi_8254.c 		ret = comedi_8254_set_mode(i8254, chan,
chan              534 drivers/staging/comedi/drivers/comedi_8254.c 		ret = comedi_8254_set_mode(i8254, chan, data[1]);
chan              539 drivers/staging/comedi/drivers/comedi_8254.c 		data[1] = comedi_8254_status(i8254, chan);
chan              120 drivers/staging/comedi/drivers/comedi_8255.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              124 drivers/staging/comedi/drivers/comedi_8255.c 	if (chan < 8)
chan              126 drivers/staging/comedi/drivers/comedi_8255.c 	else if (chan < 16)
chan              128 drivers/staging/comedi/drivers/comedi_8255.c 	else if (chan < 20)
chan              129 drivers/staging/comedi/drivers/comedi_bond.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              138 drivers/staging/comedi/drivers/comedi_bond.c 	for (bdev = *devs++; chan >= bdev->nchans; bdev = *devs++)
chan              139 drivers/staging/comedi/drivers/comedi_bond.c 		chan -= bdev->nchans;
chan              154 drivers/staging/comedi/drivers/comedi_bond.c 		ret = comedi_dio_config(bdev->dev, bdev->subdev, chan, data[0]);
chan              157 drivers/staging/comedi/drivers/comedi_bond.c 		ret = comedi_dio_get_config(bdev->dev, bdev->subdev, chan,
chan               26 drivers/staging/comedi/drivers/comedi_isadma.c 	clear_dma_ff(desc->chan);
chan               27 drivers/staging/comedi/drivers/comedi_isadma.c 	set_dma_mode(desc->chan, desc->mode);
chan               28 drivers/staging/comedi/drivers/comedi_isadma.c 	set_dma_addr(desc->chan, desc->hw_addr);
chan               29 drivers/staging/comedi/drivers/comedi_isadma.c 	set_dma_count(desc->chan, desc->size);
chan               30 drivers/staging/comedi/drivers/comedi_isadma.c 	enable_dma(desc->chan);
chan              108 drivers/staging/comedi/drivers/comedi_isadma.c 	clear_dma_ff(desc->chan);
chan              110 drivers/staging/comedi/drivers/comedi_isadma.c 		disable_dma(desc->chan);
chan              111 drivers/staging/comedi/drivers/comedi_isadma.c 	result = get_dma_residue(desc->chan);
chan              117 drivers/staging/comedi/drivers/comedi_isadma.c 	result1 = get_dma_residue(desc->chan);
chan              119 drivers/staging/comedi/drivers/comedi_isadma.c 		enable_dma(desc->chan);
chan              197 drivers/staging/comedi/drivers/comedi_isadma.c 	dma->chan = dma_chans[0];
chan              206 drivers/staging/comedi/drivers/comedi_isadma.c 		desc->chan = dma_chans[i];
chan              246 drivers/staging/comedi/drivers/comedi_isadma.c 	if (dma->chan2 && dma->chan2 != dma->chan)
chan              248 drivers/staging/comedi/drivers/comedi_isadma.c 	if (dma->chan)
chan              249 drivers/staging/comedi/drivers/comedi_isadma.c 		free_dma(dma->chan);
chan               34 drivers/staging/comedi/drivers/comedi_isadma.h 	unsigned int chan;
chan               54 drivers/staging/comedi/drivers/comedi_isadma.h 	unsigned int chan;
chan              421 drivers/staging/comedi/drivers/comedi_test.c 	int i, chan = CR_CHAN(insn->chanspec);
chan              424 drivers/staging/comedi/drivers/comedi_test.c 		data[i] = devpriv->ao_loopbacks[chan];
chan              474 drivers/staging/comedi/drivers/comedi_test.c 				unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              477 drivers/staging/comedi/drivers/comedi_test.c 				pd = &devpriv->ao_loopbacks[chan];
chan              621 drivers/staging/comedi/drivers/comedi_test.c 	int i, chan = CR_CHAN(insn->chanspec);
chan              624 drivers/staging/comedi/drivers/comedi_test.c 		devpriv->ao_loopbacks[chan] = data[i];
chan               73 drivers/staging/comedi/drivers/dac02.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               81 drivers/staging/comedi/drivers/dac02.c 		s->readback[chan] = val;
chan               95 drivers/staging/comedi/drivers/dac02.c 		outb((val << 4) & 0xf0, dev->iobase + DAC02_AO_LSB(chan));
chan               96 drivers/staging/comedi/drivers/dac02.c 		outb((val >> 4) & 0xff, dev->iobase + DAC02_AO_MSB(chan));
chan              267 drivers/staging/comedi/drivers/daqboard2000.c static void db2k_setup_sampling(struct comedi_device *dev, int chan, int gain)
chan              274 drivers/staging/comedi/drivers/daqboard2000.c 	word2 = (chan << 6) & 0x00c0;
chan              275 drivers/staging/comedi/drivers/daqboard2000.c 	switch (chan / 4) {
chan              322 drivers/staging/comedi/drivers/daqboard2000.c 	int gain, chan;
chan              340 drivers/staging/comedi/drivers/daqboard2000.c 	chan = CR_CHAN(insn->chanspec);
chan              349 drivers/staging/comedi/drivers/daqboard2000.c 		db2k_setup_sampling(dev, chan, gain);
chan              386 drivers/staging/comedi/drivers/daqboard2000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              390 drivers/staging/comedi/drivers/daqboard2000.c 	if ((status & DB2K_DAC_STATUS_DAC_BUSY(chan)) == 0)
chan              399 drivers/staging/comedi/drivers/daqboard2000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              406 drivers/staging/comedi/drivers/daqboard2000.c 		writew(val, dev->mmio + DB2K_REG_DAC_SETTING(chan));
chan              412 drivers/staging/comedi/drivers/daqboard2000.c 		s->readback[chan] = val;
chan              175 drivers/staging/comedi/drivers/das08.c 	int chan;
chan              180 drivers/staging/comedi/drivers/das08.c 	chan = CR_CHAN(insn->chanspec);
chan              191 drivers/staging/comedi/drivers/das08.c 	devpriv->do_mux_bits |= DAS08_CONTROL_MUX(chan);
chan              304 drivers/staging/comedi/drivers/das08.c 			      unsigned int chan, unsigned int data)
chan              313 drivers/staging/comedi/drivers/das08.c 		outb(lsb, dev->iobase + DAS08JR_AO_LSB_REG(chan));
chan              314 drivers/staging/comedi/drivers/das08.c 		outb(msb, dev->iobase + DAS08JR_AO_MSB_REG(chan));
chan              318 drivers/staging/comedi/drivers/das08.c 		outb(lsb, dev->iobase + DAS08AOX_AO_LSB_REG(chan));
chan              319 drivers/staging/comedi/drivers/das08.c 		outb(msb, dev->iobase + DAS08AOX_AO_MSB_REG(chan));
chan              330 drivers/staging/comedi/drivers/das08.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              331 drivers/staging/comedi/drivers/das08.c 	unsigned int val = s->readback[chan];
chan              336 drivers/staging/comedi/drivers/das08.c 		das08_ao_set_data(dev, chan, val);
chan              338 drivers/staging/comedi/drivers/das08.c 	s->readback[chan] = val;
chan              491 drivers/staging/comedi/drivers/das16.c 	residue = comedi_isadma_disable_on_sample(desc->chan,
chan              566 drivers/staging/comedi/drivers/das16.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              569 drivers/staging/comedi/drivers/das16.c 		if (chan != ((chan0 + i) % s->n_chan)) {
chan              775 drivers/staging/comedi/drivers/das16.c 	comedi_isadma_disable(dma->chan);
chan              827 drivers/staging/comedi/drivers/das16.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              834 drivers/staging/comedi/drivers/das16.c 	das16_ai_set_mux_range(dev, chan, chan, range);
chan              861 drivers/staging/comedi/drivers/das16.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              867 drivers/staging/comedi/drivers/das16.c 		s->readback[chan] = val;
chan              871 drivers/staging/comedi/drivers/das16.c 		outb(val & 0xff, dev->iobase + DAS16_AO_LSB_REG(chan));
chan              872 drivers/staging/comedi/drivers/das16.c 		outb((val >> 8) & 0xff, dev->iobase + DAS16_AO_MSB_REG(chan));
chan              112 drivers/staging/comedi/drivers/das16m1.c 		unsigned int chan = CR_CHAN(chanspec[i]);
chan              116 drivers/staging/comedi/drivers/das16m1.c 		outb(DAS16M1_Q_CHAN(chan) | DAS16M1_Q_RANGE(range),
chan              155 drivers/staging/comedi/drivers/das16m1.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              157 drivers/staging/comedi/drivers/das16m1.c 		if ((i % 2) != (chan % 2)) {
chan              369 drivers/staging/comedi/drivers/das1800.c 	unsigned int residue = comedi_isadma_disable(desc->chan);
chan              439 drivers/staging/comedi/drivers/das1800.c 			if (desc->chan)
chan              440 drivers/staging/comedi/drivers/das1800.c 				comedi_isadma_disable(desc->chan);
chan              821 drivers/staging/comedi/drivers/das1800.c 		unsigned int chan = CR_CHAN(chanlist[i]);
chan              825 drivers/staging/comedi/drivers/das1800.c 		val = chan | ((range & 0x3) << 8);
chan              989 drivers/staging/comedi/drivers/das1800.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1000 drivers/staging/comedi/drivers/das1800.c 		s->readback[chan] = val;
chan             1005 drivers/staging/comedi/drivers/das1800.c 		outb(DAC(chan), dev->iobase + DAS1800_SELECT);
chan             1009 drivers/staging/comedi/drivers/das1800.c 		if (chan != update_chan) {
chan              258 drivers/staging/comedi/drivers/das6402.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              262 drivers/staging/comedi/drivers/das6402.c 		if (chan != chan0 + i) {
chan              280 drivers/staging/comedi/drivers/das6402.c 		if (aref0 == AREF_DIFF && chan > (s->n_chan / 2)) {
chan              383 drivers/staging/comedi/drivers/das6402.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              388 drivers/staging/comedi/drivers/das6402.c 	if (aref == AREF_DIFF && chan > (s->n_chan / 2))
chan              397 drivers/staging/comedi/drivers/das6402.c 	outw(DAS6402_AI_MUX_HI(chan) | DAS6402_AI_MUX_LO(chan),
chan              422 drivers/staging/comedi/drivers/das6402.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              429 drivers/staging/comedi/drivers/das6402.c 	val &= ~DAS6402_AO_RANGE_MASK(chan);
chan              430 drivers/staging/comedi/drivers/das6402.c 	val |= DAS6402_AO_RANGE(chan, range);
chan              451 drivers/staging/comedi/drivers/das6402.c 		s->readback[chan] = val;
chan              460 drivers/staging/comedi/drivers/das6402.c 			outw(val, dev->iobase + DAS6402_AO_DATA_REG(chan));
chan              467 drivers/staging/comedi/drivers/das6402.c 			     dev->iobase + DAS6402_AO_LSB_REG(chan));
chan              469 drivers/staging/comedi/drivers/das6402.c 			     dev->iobase + DAS6402_AO_LSB_REG(chan));
chan              481 drivers/staging/comedi/drivers/das6402.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              487 drivers/staging/comedi/drivers/das6402.c 	inw(dev->iobase + DAS6402_AO_LSB_REG(chan));
chan              274 drivers/staging/comedi/drivers/das800.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              277 drivers/staging/comedi/drivers/das800.c 		if (chan != (chan0 + i) % s->n_chan) {
chan              527 drivers/staging/comedi/drivers/das800.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              538 drivers/staging/comedi/drivers/das800.c 	das800_ind_write(dev, chan | devpriv->do_bits, CONTROL1);
chan              163 drivers/staging/comedi/drivers/dmm32at.c 	unsigned int chan = CR_CHAN(chanspec);
chan              165 drivers/staging/comedi/drivers/dmm32at.c 	unsigned int last_chan = (chan + nchan - 1) % s->n_chan;
chan              173 drivers/staging/comedi/drivers/dmm32at.c 	outb(chan, dev->iobase + DMM32AT_AI_LO_CHAN_REG);
chan              242 drivers/staging/comedi/drivers/dmm32at.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              245 drivers/staging/comedi/drivers/dmm32at.c 		if (chan != (chan0 + i) % s->n_chan) {
chan              456 drivers/staging/comedi/drivers/dmm32at.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              465 drivers/staging/comedi/drivers/dmm32at.c 		outb((val >> 8) | DMM32AT_AO_MSB_DACH(chan),
chan              476 drivers/staging/comedi/drivers/dmm32at.c 		s->readback[chan] = val;
chan              474 drivers/staging/comedi/drivers/dt2801.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              477 drivers/staging/comedi/drivers/dt2801.c 	dt2801_writedata(dev, chan);
chan              480 drivers/staging/comedi/drivers/dt2801.c 	s->readback[chan] = data[0];
chan              245 drivers/staging/comedi/drivers/dt2811.c 	unsigned int chan = CR_CHAN(chanspec);
chan              248 drivers/staging/comedi/drivers/dt2811.c 	outb(DT2811_ADGCR_CHAN(chan) | DT2811_ADGCR_GAIN(range),
chan              500 drivers/staging/comedi/drivers/dt2811.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              501 drivers/staging/comedi/drivers/dt2811.c 	unsigned int val = s->readback[chan];
chan              506 drivers/staging/comedi/drivers/dt2811.c 		outb(val & 0xff, dev->iobase + DT2811_DADATA_LO_REG(chan));
chan              508 drivers/staging/comedi/drivers/dt2811.c 		     dev->iobase + DT2811_DADATA_HI_REG(chan));
chan              510 drivers/staging/comedi/drivers/dt2811.c 	s->readback[chan] = val;
chan               73 drivers/staging/comedi/drivers/dt2814.c 	int chan;
chan               77 drivers/staging/comedi/drivers/dt2814.c 		chan = CR_CHAN(insn->chanspec);
chan               79 drivers/staging/comedi/drivers/dt2814.c 		outb(chan, dev->iobase + DT2814_CSR);
chan              174 drivers/staging/comedi/drivers/dt2814.c 	int chan;
chan              179 drivers/staging/comedi/drivers/dt2814.c 	chan = CR_CHAN(cmd->chanlist[0]);
chan              182 drivers/staging/comedi/drivers/dt2814.c 	outb(chan | DT2814_ENB | (trigvar << 5), dev->iobase + DT2814_CSR);
chan               77 drivers/staging/comedi/drivers/dt2815.c 	int chan = CR_CHAN(insn->chanspec);
chan               80 drivers/staging/comedi/drivers/dt2815.c 		data[i] = devpriv->ao_readback[chan];
chan               90 drivers/staging/comedi/drivers/dt2815.c 	int chan = CR_CHAN(insn->chanspec);
chan               96 drivers/staging/comedi/drivers/dt2815.c 		lo = ((data[i] & 0x0f) << 4) | (chan << 1) | 0x01;
chan              111 drivers/staging/comedi/drivers/dt2815.c 		devpriv->ao_readback[chan] = data[i];
chan               38 drivers/staging/comedi/drivers/dt2817.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               43 drivers/staging/comedi/drivers/dt2817.c 	if (chan < 8)
chan               45 drivers/staging/comedi/drivers/dt2817.c 	else if (chan < 16)
chan               47 drivers/staging/comedi/drivers/dt2817.c 	else if (chan < 24)
chan              362 drivers/staging/comedi/drivers/dt282x.c 		comedi_isadma_disable(desc->chan);
chan              451 drivers/staging/comedi/drivers/dt282x.c 	comedi_isadma_disable(desc->chan);
chan              471 drivers/staging/comedi/drivers/dt282x.c 	comedi_isadma_disable(desc->chan);
chan              575 drivers/staging/comedi/drivers/dt282x.c 		unsigned int chan = CR_CHAN(chanlist[i]);
chan              580 drivers/staging/comedi/drivers/dt282x.c 		     DT2821_ADCSR_CHAN(chan),
chan              800 drivers/staging/comedi/drivers/dt282x.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              804 drivers/staging/comedi/drivers/dt282x.c 	devpriv->dacsr |= DT2821_DACSR_SSEL | DT2821_DACSR_YSEL(chan);
chan              809 drivers/staging/comedi/drivers/dt282x.c 		s->readback[chan] = val;
chan              980 drivers/staging/comedi/drivers/dt282x.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              984 drivers/staging/comedi/drivers/dt282x.c 	if (chan < 8)
chan              248 drivers/staging/comedi/drivers/dt3000.c 				    unsigned int subsys, unsigned int chan,
chan              253 drivers/staging/comedi/drivers/dt3000.c 	writew(chan, dev->mmio + DPR_PARAMS(0));
chan              262 drivers/staging/comedi/drivers/dt3000.c 			     unsigned int chan, unsigned int data)
chan              266 drivers/staging/comedi/drivers/dt3000.c 	writew(chan, dev->mmio + DPR_PARAMS(0));
chan              458 drivers/staging/comedi/drivers/dt3000.c 	unsigned int chan, range, aref;
chan              463 drivers/staging/comedi/drivers/dt3000.c 		chan = CR_CHAN(cmd->chanlist[i]);
chan              466 drivers/staging/comedi/drivers/dt3000.c 		writew((range << 6) | chan, dev->mmio + DPR_ADC_BUFFER + i);
chan              511 drivers/staging/comedi/drivers/dt3000.c 	unsigned int chan, gain, aref;
chan              513 drivers/staging/comedi/drivers/dt3000.c 	chan = CR_CHAN(insn->chanspec);
chan              519 drivers/staging/comedi/drivers/dt3000.c 		data[i] = dt3k_readsingle(dev, DPR_SUBSYS_AI, chan, gain);
chan              529 drivers/staging/comedi/drivers/dt3000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              530 drivers/staging/comedi/drivers/dt3000.c 	unsigned int val = s->readback[chan];
chan              535 drivers/staging/comedi/drivers/dt3000.c 		dt3k_writesingle(dev, DPR_SUBSYS_AO, chan, val);
chan              537 drivers/staging/comedi/drivers/dt3000.c 	s->readback[chan] = val;
chan              559 drivers/staging/comedi/drivers/dt3000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              563 drivers/staging/comedi/drivers/dt3000.c 	if (chan < 4)
chan              577 drivers/staging/comedi/drivers/dt9812.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              583 drivers/staging/comedi/drivers/dt9812.c 		ret = dt9812_analog_in(dev, chan, &val, DT9812_GAIN_1);
chan              612 drivers/staging/comedi/drivers/dt9812.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              619 drivers/staging/comedi/drivers/dt9812.c 		ret = dt9812_analog_out(dev, chan, val);
chan              623 drivers/staging/comedi/drivers/dt9812.c 		s->readback[chan] = val;
chan               71 drivers/staging/comedi/drivers/dyna_pci10xx.c 	unsigned int chan, range;
chan               74 drivers/staging/comedi/drivers/dyna_pci10xx.c 	chan = CR_CHAN(insn->chanspec);
chan               82 drivers/staging/comedi/drivers/dyna_pci10xx.c 		outw_p(0x0000 + range + chan, dev->iobase + 2);
chan               55 drivers/staging/comedi/drivers/fl512.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               59 drivers/staging/comedi/drivers/fl512.c 	outb(chan, dev->iobase + FL512_AI_MUX_REG);
chan               82 drivers/staging/comedi/drivers/fl512.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               83 drivers/staging/comedi/drivers/fl512.c 	unsigned int val = s->readback[chan];
chan               90 drivers/staging/comedi/drivers/fl512.c 		outb(val & 0x0ff, dev->iobase + FL512_AO_DATA_REG(chan));
chan               91 drivers/staging/comedi/drivers/fl512.c 		outb((val >> 8) & 0xf, dev->iobase + FL512_AO_DATA_REG(chan));
chan               92 drivers/staging/comedi/drivers/fl512.c 		inb(dev->iobase + FL512_AO_TRIG_REG(chan));
chan               94 drivers/staging/comedi/drivers/fl512.c 	s->readback[chan] = val;
chan              337 drivers/staging/comedi/drivers/gsc_hpdi.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              339 drivers/staging/comedi/drivers/gsc_hpdi.c 		if (chan != i) {
chan              106 drivers/staging/comedi/drivers/icp_multi.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              115 drivers/staging/comedi/drivers/icp_multi.c 		adc_csr = ICP_MULTI_ADC_CSR_DI_CHAN(chan) |
chan              118 drivers/staging/comedi/drivers/icp_multi.c 		adc_csr = ICP_MULTI_ADC_CSR_SE_CHAN(chan);
chan              159 drivers/staging/comedi/drivers/icp_multi.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              165 drivers/staging/comedi/drivers/icp_multi.c 	dac_csr = ICP_MULTI_DAC_CSR_CHAN(chan);
chan              184 drivers/staging/comedi/drivers/icp_multi.c 		s->readback[chan] = val;
chan              149 drivers/staging/comedi/drivers/ii_pci20kc.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              155 drivers/staging/comedi/drivers/ii_pci20kc.c 		s->readback[chan] = val;
chan              160 drivers/staging/comedi/drivers/ii_pci20kc.c 		writeb(val & 0xff, iobase + II20K_AO_LSB_REG(chan));
chan              161 drivers/staging/comedi/drivers/ii_pci20kc.c 		writeb((val >> 8) & 0xff, iobase + II20K_AO_MSB_REG(chan));
chan              162 drivers/staging/comedi/drivers/ii_pci20kc.c 		writeb(0x00, iobase + II20K_AO_STRB_REG(chan));
chan              187 drivers/staging/comedi/drivers/ii_pci20kc.c 	unsigned int chan = CR_CHAN(chanspec);
chan              212 drivers/staging/comedi/drivers/ii_pci20kc.c 	      II20K_AI_CHANLIST_CHAN(chan);
chan              322 drivers/staging/comedi/drivers/ii_pci20kc.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              326 drivers/staging/comedi/drivers/ii_pci20kc.c 	if (chan < 8)
chan              328 drivers/staging/comedi/drivers/ii_pci20kc.c 	else if (chan < 16)
chan              330 drivers/staging/comedi/drivers/ii_pci20kc.c 	else if (chan < 24)
chan              217 drivers/staging/comedi/drivers/jr3_pci.c 					 unsigned int chan)
chan              225 drivers/staging/comedi/drivers/jr3_pci.c 	if (chan < 56) {
chan              226 drivers/staging/comedi/drivers/jr3_pci.c 		unsigned int axis = chan % 8;
chan              227 drivers/staging/comedi/drivers/jr3_pci.c 		unsigned int filter = chan / 8;
chan              256 drivers/staging/comedi/drivers/jr3_pci.c 	} else if (chan == 56) {
chan              258 drivers/staging/comedi/drivers/jr3_pci.c 	} else if (chan == 57) {
chan              271 drivers/staging/comedi/drivers/jr3_pci.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              287 drivers/staging/comedi/drivers/jr3_pci.c 		data[i] = jr3_pci_ai_read_chan(dev, s, chan);
chan               46 drivers/staging/comedi/drivers/ke_counter.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               54 drivers/staging/comedi/drivers/ke_counter.c 		outb((val >> 24) & 0xff, dev->iobase + KE_SIGN_REG(chan));
chan               55 drivers/staging/comedi/drivers/ke_counter.c 		outb((val >> 16) & 0xff, dev->iobase + KE_MSB_REG(chan));
chan               56 drivers/staging/comedi/drivers/ke_counter.c 		outb((val >> 8) & 0xff, dev->iobase + KE_MID_REG(chan));
chan               57 drivers/staging/comedi/drivers/ke_counter.c 		outb((val >> 0) & 0xff, dev->iobase + KE_LSB_REG(chan));
chan               68 drivers/staging/comedi/drivers/ke_counter.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               74 drivers/staging/comedi/drivers/ke_counter.c 		inb(dev->iobase + KE_LATCH_REG(chan));
chan               76 drivers/staging/comedi/drivers/ke_counter.c 		val = inb(dev->iobase + KE_LSB_REG(chan));
chan               77 drivers/staging/comedi/drivers/ke_counter.c 		val |= (inb(dev->iobase + KE_MID_REG(chan)) << 8);
chan               78 drivers/staging/comedi/drivers/ke_counter.c 		val |= (inb(dev->iobase + KE_MSB_REG(chan)) << 16);
chan               79 drivers/staging/comedi/drivers/ke_counter.c 		val |= (inb(dev->iobase + KE_SIGN_REG(chan)) << 24);
chan               89 drivers/staging/comedi/drivers/ke_counter.c 	unsigned int chan;
chan               91 drivers/staging/comedi/drivers/ke_counter.c 	for (chan = 0; chan < 3; chan++)
chan               92 drivers/staging/comedi/drivers/ke_counter.c 		outb(0, dev->iobase + KE_RESET_REG(chan));
chan              402 drivers/staging/comedi/drivers/me4000.c 	int chan;
chan              415 drivers/staging/comedi/drivers/me4000.c 	for (chan = 0; chan < 4; chan++)
chan              416 drivers/staging/comedi/drivers/me4000.c 		outl(0x8000, dev->iobase + ME4000_AO_SINGLE_REG(chan));
chan              422 drivers/staging/comedi/drivers/me4000.c 	for (chan = 0; chan < 4; chan++)
chan              423 drivers/staging/comedi/drivers/me4000.c 		outl(val, dev->iobase + ME4000_AO_CTRL_REG(chan));
chan              465 drivers/staging/comedi/drivers/me4000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              472 drivers/staging/comedi/drivers/me4000.c 	entry = chan | ME4000_AI_LIST_RANGE(range);
chan              486 drivers/staging/comedi/drivers/me4000.c 		if (chan >= (s->n_chan / 2)) {
chan              542 drivers/staging/comedi/drivers/me4000.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              559 drivers/staging/comedi/drivers/me4000.c 			if (chan >= (s->n_chan / 2)) {
chan              634 drivers/staging/comedi/drivers/me4000.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              639 drivers/staging/comedi/drivers/me4000.c 		entry = chan | ME4000_AI_LIST_RANGE(range);
chan              997 drivers/staging/comedi/drivers/me4000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1001 drivers/staging/comedi/drivers/me4000.c 	tmp = inl(dev->iobase + ME4000_AO_CTRL_REG(chan));
chan             1003 drivers/staging/comedi/drivers/me4000.c 	outl(tmp, dev->iobase + ME4000_AO_CTRL_REG(chan));
chan             1006 drivers/staging/comedi/drivers/me4000.c 	outl(0x0, dev->iobase + ME4000_AO_CTRL_REG(chan));
chan             1009 drivers/staging/comedi/drivers/me4000.c 	outl(data[0], dev->iobase + ME4000_AO_SINGLE_REG(chan));
chan             1012 drivers/staging/comedi/drivers/me4000.c 	s->readback[chan] = data[0];
chan             1046 drivers/staging/comedi/drivers/me4000.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1051 drivers/staging/comedi/drivers/me4000.c 	if (chan < 8)
chan             1053 drivers/staging/comedi/drivers/me4000.c 	else if (chan < 16)
chan             1055 drivers/staging/comedi/drivers/me4000.c 	else if (chan < 24)
chan              155 drivers/staging/comedi/drivers/me_daq.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              159 drivers/staging/comedi/drivers/me_daq.c 	if (chan < 16)
chan              234 drivers/staging/comedi/drivers/me_daq.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              246 drivers/staging/comedi/drivers/me_daq.c 		if (chan > 7 || comedi_range_is_unipolar(s, range))
chan              261 drivers/staging/comedi/drivers/me_daq.c 	val = ME_AI_FIFO_CHANLIST_CHAN(chan) | ME_AI_FIFO_CHANLIST_GAIN(range);
chan              301 drivers/staging/comedi/drivers/me_daq.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              303 drivers/staging/comedi/drivers/me_daq.c 	unsigned int val = s->readback[chan];
chan              315 drivers/staging/comedi/drivers/me_daq.c 	devpriv->dac_ctrl &= ~ME_DAC_CTRL_MASK(chan);
chan              317 drivers/staging/comedi/drivers/me_daq.c 		devpriv->dac_ctrl |= ME_DAC_CTRL_GAIN(chan);
chan              319 drivers/staging/comedi/drivers/me_daq.c 		devpriv->dac_ctrl |= ME_DAC_CTRL_BIPOLAR(chan);
chan              329 drivers/staging/comedi/drivers/me_daq.c 		writew(val, dev->mmio + ME_AO_DATA_REG(chan));
chan              331 drivers/staging/comedi/drivers/me_daq.c 	s->readback[chan] = val;
chan               34 drivers/staging/comedi/drivers/mf6x4.c #define MF6X4_ADCTRL_CHAN(x)	BIT(chan)
chan              126 drivers/staging/comedi/drivers/mf6x4.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              132 drivers/staging/comedi/drivers/mf6x4.c 	iowrite16(MF6X4_ADCTRL_CHAN(chan), dev->mmio + MF6X4_ADCTRL_REG);
chan              160 drivers/staging/comedi/drivers/mf6x4.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              161 drivers/staging/comedi/drivers/mf6x4.c 	unsigned int val = s->readback[chan];
chan              172 drivers/staging/comedi/drivers/mf6x4.c 		iowrite16(val, dev->mmio + MF6X4_DAC_REG(chan));
chan              174 drivers/staging/comedi/drivers/mf6x4.c 	s->readback[chan] = val;
chan               99 drivers/staging/comedi/drivers/multiq3.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              104 drivers/staging/comedi/drivers/multiq3.c 	multiq3_set_ctrl(dev, MULTIQ3_CTRL_EN | MULTIQ3_CTRL_AI_CHAN(chan));
chan              136 drivers/staging/comedi/drivers/multiq3.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              137 drivers/staging/comedi/drivers/multiq3.c 	unsigned int val = s->readback[chan];
chan              143 drivers/staging/comedi/drivers/multiq3.c 				      MULTIQ3_CTRL_AO_CHAN(chan));
chan              147 drivers/staging/comedi/drivers/multiq3.c 	s->readback[chan] = val;
chan              179 drivers/staging/comedi/drivers/multiq3.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              186 drivers/staging/comedi/drivers/multiq3.c 				      MULTIQ3_CTRL_E_CHAN(chan));
chan              221 drivers/staging/comedi/drivers/multiq3.c 				  unsigned int chan)
chan              223 drivers/staging/comedi/drivers/multiq3.c 	multiq3_set_ctrl(dev, MULTIQ3_CTRL_EN | MULTIQ3_CTRL_E_CHAN(chan));
chan              238 drivers/staging/comedi/drivers/multiq3.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              242 drivers/staging/comedi/drivers/multiq3.c 		multiq3_encoder_reset(dev, chan);
chan              116 drivers/staging/comedi/drivers/ni_6527.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              131 drivers/staging/comedi/drivers/ni_6527.c 			devpriv->filter_enable |= 1 << chan;
chan              133 drivers/staging/comedi/drivers/ni_6527.c 			devpriv->filter_enable &= ~(1 << chan);
chan              352 drivers/staging/comedi/drivers/ni_65xx.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              353 drivers/staging/comedi/drivers/ni_65xx.c 	unsigned int chan_mask = NI_65XX_CHAN_TO_MASK(chan);
chan              354 drivers/staging/comedi/drivers/ni_65xx.c 	unsigned int port = base_port + NI_65XX_CHAN_TO_PORT(chan);
chan              562 drivers/staging/comedi/drivers/ni_660x.c 				      unsigned int chan, unsigned int out_sel)
chan              569 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              571 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              575 drivers/staging/comedi/drivers/ni_660x.c 		    chan >= 8 && chan <= 23) {
chan              588 drivers/staging/comedi/drivers/ni_660x.c 		bits = ni_660x_read(dev, idle_chip, NI660X_IO_CFG(chan));
chan              589 drivers/staging/comedi/drivers/ni_660x.c 		bits &= ~NI660X_IO_CFG_OUT_SEL_MASK(chan);
chan              590 drivers/staging/comedi/drivers/ni_660x.c 		bits |= NI660X_IO_CFG_OUT_SEL(chan, 0);		/* high-z */
chan              591 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_write(dev, idle_chip, bits, NI660X_IO_CFG(chan));
chan              595 drivers/staging/comedi/drivers/ni_660x.c 	bits = ni_660x_read(dev, active_chip, NI660X_IO_CFG(chan));
chan              596 drivers/staging/comedi/drivers/ni_660x.c 	bits &= ~NI660X_IO_CFG_OUT_SEL_MASK(chan);
chan              597 drivers/staging/comedi/drivers/ni_660x.c 	bits |= NI660X_IO_CFG_OUT_SEL(chan, out_sel);
chan              598 drivers/staging/comedi/drivers/ni_660x.c 	ni_660x_write(dev, active_chip, bits, NI660X_IO_CFG(chan));
chan              602 drivers/staging/comedi/drivers/ni_660x.c 				      unsigned int chan,
chan              608 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              610 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              612 drivers/staging/comedi/drivers/ni_660x.c 	bit = 1ULL << chan;
chan              617 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_select_pfi_output(dev, chan, devpriv->io_cfg[chan]);
chan              621 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_select_pfi_output(dev, chan, 0);
chan              626 drivers/staging/comedi/drivers/ni_660x.c 					      unsigned int chan)
chan              631 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              633 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              635 drivers/staging/comedi/drivers/ni_660x.c 	bit = 1ULL << chan;
chan              641 drivers/staging/comedi/drivers/ni_660x.c 				   unsigned int chan, unsigned int source)
chan              645 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              647 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              651 drivers/staging/comedi/drivers/ni_660x.c 		if (chan < 8)
chan              655 drivers/staging/comedi/drivers/ni_660x.c 		if (chan > 31)
chan              662 drivers/staging/comedi/drivers/ni_660x.c 	devpriv->io_cfg[chan] = source;
chan              663 drivers/staging/comedi/drivers/ni_660x.c 	if (ni_660x_get_pfi_direction(dev, chan) == COMEDI_OUTPUT)
chan              664 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_select_pfi_output(dev, chan, devpriv->io_cfg[chan]);
chan              668 drivers/staging/comedi/drivers/ni_660x.c static int ni_660x_get_pfi_routing(struct comedi_device *dev, unsigned int chan)
chan              672 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              674 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              676 drivers/staging/comedi/drivers/ni_660x.c 	return devpriv->io_cfg[chan];
chan              680 drivers/staging/comedi/drivers/ni_660x.c 				   unsigned int chan, unsigned int value)
chan              684 drivers/staging/comedi/drivers/ni_660x.c 	if (chan >= NI_PFI(0))
chan              686 drivers/staging/comedi/drivers/ni_660x.c 		chan -= NI_PFI(0);
chan              688 drivers/staging/comedi/drivers/ni_660x.c 	val = ni_660x_read(dev, 0, NI660X_IO_CFG(chan));
chan              689 drivers/staging/comedi/drivers/ni_660x.c 	val &= ~NI660X_IO_CFG_IN_SEL_MASK(chan);
chan              690 drivers/staging/comedi/drivers/ni_660x.c 	val |= NI660X_IO_CFG_IN_SEL(chan, value);
chan              691 drivers/staging/comedi/drivers/ni_660x.c 	ni_660x_write(dev, 0, val, NI660X_IO_CFG(chan));
chan              699 drivers/staging/comedi/drivers/ni_660x.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              704 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_set_pfi_direction(dev, chan, COMEDI_OUTPUT);
chan              708 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_set_pfi_direction(dev, chan, COMEDI_INPUT);
chan              712 drivers/staging/comedi/drivers/ni_660x.c 		data[1] = ni_660x_get_pfi_direction(dev, chan);
chan              716 drivers/staging/comedi/drivers/ni_660x.c 		ret = ni_660x_set_pfi_routing(dev, chan, data[1]);
chan              722 drivers/staging/comedi/drivers/ni_660x.c 		data[1] = ni_660x_get_pfi_routing(dev, chan);
chan              726 drivers/staging/comedi/drivers/ni_660x.c 		ni_660x_set_pfi_filter(dev, chan, data[1]);
chan              975 drivers/staging/comedi/drivers/ni_660x.c 	unsigned int chan;
chan              986 drivers/staging/comedi/drivers/ni_660x.c 		for (chan = 0; chan < NI660X_MAX_DMA_CHANNEL; ++chan)
chan              987 drivers/staging/comedi/drivers/ni_660x.c 			devpriv->dma_cfg[chip] |= NI660X_DMA_CFG_SEL_NONE(chan);
chan              992 drivers/staging/comedi/drivers/ni_660x.c 		for (chan = 0; chan < NI660X_NUM_PFI_CHANNELS; ++chan)
chan              993 drivers/staging/comedi/drivers/ni_660x.c 			ni_660x_write(dev, chip, 0, NI660X_IO_CFG(chan));
chan               77 drivers/staging/comedi/drivers/ni_670x.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               78 drivers/staging/comedi/drivers/ni_670x.c 	unsigned int val = s->readback[chan];
chan               94 drivers/staging/comedi/drivers/ni_670x.c 		writel(((chan & 15) << 1) | ((chan & 16) >> 4),
chan               99 drivers/staging/comedi/drivers/ni_670x.c 	s->readback[chan] = val;
chan              170 drivers/staging/comedi/drivers/ni_at_a2150.c 	residue = comedi_isadma_disable(desc->chan);
chan              233 drivers/staging/comedi/drivers/ni_at_a2150.c 	comedi_isadma_disable(desc->chan);
chan              373 drivers/staging/comedi/drivers/ni_at_a2150.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              376 drivers/staging/comedi/drivers/ni_at_a2150.c 		if (chan != (chan0 + i)) {
chan              382 drivers/staging/comedi/drivers/ni_at_a2150.c 		if (chan == 2)
chan              506 drivers/staging/comedi/drivers/ni_at_a2150.c 	comedi_isadma_disable(desc->chan);
chan              131 drivers/staging/comedi/drivers/ni_at_ao.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              132 drivers/staging/comedi/drivers/ni_at_ao.c 	unsigned int val = s->readback[chan];
chan              135 drivers/staging/comedi/drivers/ni_at_ao.c 	if (chan == 0)
chan              143 drivers/staging/comedi/drivers/ni_at_ao.c 		     dev->iobase + ATAO_AO_REG(chan));
chan              145 drivers/staging/comedi/drivers/ni_at_ao.c 	s->readback[chan] = val;
chan              147 drivers/staging/comedi/drivers/ni_at_ao.c 	if (chan == 0)
chan              172 drivers/staging/comedi/drivers/ni_at_ao.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              176 drivers/staging/comedi/drivers/ni_at_ao.c 	if (chan < 4)
chan              237 drivers/staging/comedi/drivers/ni_at_ao.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              241 drivers/staging/comedi/drivers/ni_at_ao.c 		unsigned int bitstring = ((chan & 0x7) << 8) | val;
chan              256 drivers/staging/comedi/drivers/ni_at_ao.c 		outw(ATAO_CFG2_CALLD(chan), dev->iobase + ATAO_CFG2_REG);
chan              259 drivers/staging/comedi/drivers/ni_at_ao.c 		s->readback[chan] = val;
chan              302 drivers/staging/comedi/drivers/ni_atmio16d.c 	unsigned int sample_count, tmp, chan, gain;
chan              325 drivers/staging/comedi/drivers/ni_atmio16d.c 		chan = CR_CHAN(cmd->chanlist[i]);
chan              328 drivers/staging/comedi/drivers/ni_atmio16d.c 		tmp = chan | (gain << 6);
chan              474 drivers/staging/comedi/drivers/ni_atmio16d.c 	int chan;
chan              478 drivers/staging/comedi/drivers/ni_atmio16d.c 	chan = CR_CHAN(insn->chanspec);
chan              487 drivers/staging/comedi/drivers/ni_atmio16d.c 	outw(chan | (gain << 6), dev->iobase + MUX_GAIN_REG);
chan              514 drivers/staging/comedi/drivers/ni_atmio16d.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              515 drivers/staging/comedi/drivers/ni_atmio16d.c 	unsigned int reg = (chan) ? DAC1_REG : DAC0_REG;
chan              519 drivers/staging/comedi/drivers/ni_atmio16d.c 	if (chan == 0 && devpriv->dac0_coding == dac_2comp)
chan              521 drivers/staging/comedi/drivers/ni_atmio16d.c 	if (chan == 1 && devpriv->dac1_coding == dac_2comp)
chan              527 drivers/staging/comedi/drivers/ni_atmio16d.c 		s->readback[chan] = val;
chan              557 drivers/staging/comedi/drivers/ni_atmio16d.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              561 drivers/staging/comedi/drivers/ni_atmio16d.c 	if (chan < 4)
chan              138 drivers/staging/comedi/drivers/ni_daq_700.c 	unsigned int chan	= CR_CHAN(insn->chanspec);
chan              153 drivers/staging/comedi/drivers/ni_daq_700.c 	outb(chan | 0x80, dev->iobase + CMD_R1);
chan              122 drivers/staging/comedi/drivers/ni_labpc_common.c 				       unsigned int chan,
chan              141 drivers/staging/comedi/drivers/ni_labpc_common.c 		chan *= 2;
chan              142 drivers/staging/comedi/drivers/ni_labpc_common.c 	devpriv->cmd1 = CMD1_MA(chan);
chan              231 drivers/staging/comedi/drivers/ni_labpc_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              240 drivers/staging/comedi/drivers/ni_labpc_common.c 	labpc_ai_set_chan_and_gain(dev, MODE_SINGLE_CHAN, chan, range, aref);
chan              451 drivers/staging/comedi/drivers/ni_labpc_common.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              459 drivers/staging/comedi/drivers/ni_labpc_common.c 			if (chan != chan0) {
chan              466 drivers/staging/comedi/drivers/ni_labpc_common.c 			if (chan != i) {
chan              473 drivers/staging/comedi/drivers/ni_labpc_common.c 			if (chan != (cmd->chanlist_len - i - 1)) {
chan              623 drivers/staging/comedi/drivers/ni_labpc_common.c 	unsigned int chan = CR_CHAN(chanspec);
chan              672 drivers/staging/comedi/drivers/ni_labpc_common.c 	labpc_ai_set_chan_and_gain(dev, mode, chan, range, aref);
chan              892 drivers/staging/comedi/drivers/ni_labpc_common.c 			   unsigned int chan, unsigned int val)
chan              896 drivers/staging/comedi/drivers/ni_labpc_common.c 	devpriv->write_byte(dev, val & 0xff, DAC_LSB_REG(chan));
chan              897 drivers/staging/comedi/drivers/ni_labpc_common.c 	devpriv->write_byte(dev, (val >> 8) & 0xff, DAC_MSB_REG(chan));
chan              899 drivers/staging/comedi/drivers/ni_labpc_common.c 	s->readback[chan] = val;
chan             1126 drivers/staging/comedi/drivers/ni_labpc_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1135 drivers/staging/comedi/drivers/ni_labpc_common.c 		if (s->readback[chan] != val) {
chan             1136 drivers/staging/comedi/drivers/ni_labpc_common.c 			write_caldac(dev, chan, val);
chan             1137 drivers/staging/comedi/drivers/ni_labpc_common.c 			s->readback[chan] = val;
chan             1163 drivers/staging/comedi/drivers/ni_labpc_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1167 drivers/staging/comedi/drivers/ni_labpc_common.c 	if (chan < 16 || chan > 127)
chan             1181 drivers/staging/comedi/drivers/ni_labpc_common.c 		labpc_eeprom_write(dev, chan, val);
chan             1182 drivers/staging/comedi/drivers/ni_labpc_common.c 		s->readback[chan] = val;
chan               89 drivers/staging/comedi/drivers/ni_labpc_isadma.c 	residue = comedi_isadma_disable(desc->chan);
chan             1612 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan, range, aref;
chan             1622 drivers/staging/comedi/drivers/ni_mio_common.c 		chan = CR_CHAN(list[0]);
chan             1627 drivers/staging/comedi/drivers/ni_mio_common.c 			      NI_M_CFG_BYPASS_AI_CHAN(chan) |
chan             1641 drivers/staging/comedi/drivers/ni_mio_common.c 		chan = CR_CHAN(list[i]);
chan             1661 drivers/staging/comedi/drivers/ni_mio_common.c 		config_bits |= NI_M_AI_CFG_CHAN_SEL(chan);
chan             1662 drivers/staging/comedi/drivers/ni_mio_common.c 		config_bits |= NI_M_AI_CFG_BANK_SEL(chan);
chan             1711 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan, range, aref;
chan             1763 drivers/staging/comedi/drivers/ni_mio_common.c 			chan = devpriv->ai_calib_source;
chan             1765 drivers/staging/comedi/drivers/ni_mio_common.c 			chan = CR_CHAN(list[i]);
chan             1801 drivers/staging/comedi/drivers/ni_mio_common.c 		hi |= NI_E_AI_CFG_HI_CHAN(chan);
chan             2556 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan;
chan             2572 drivers/staging/comedi/drivers/ni_mio_common.c 		chan = CR_CHAN(chanspec[i]);
chan             2580 drivers/staging/comedi/drivers/ni_mio_common.c 			ni_writeb(dev, 0, NI_M_AO_REF_ATTENUATION_REG(chan));
chan             2584 drivers/staging/comedi/drivers/ni_mio_common.c 			ni_writeb(dev, 0, NI_M_AO_REF_ATTENUATION_REG(chan));
chan             2589 drivers/staging/comedi/drivers/ni_mio_common.c 				  NI_M_AO_REF_ATTENUATION_REG(chan));
chan             2594 drivers/staging/comedi/drivers/ni_mio_common.c 				  NI_M_AO_REF_ATTENUATION_REG(chan));
chan             2615 drivers/staging/comedi/drivers/ni_mio_common.c 		ni_writeb(dev, conf, NI_M_AO_CFG_BANK_REG(chan));
chan             2616 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->ao_conf[chan] = conf;
chan             2617 drivers/staging/comedi/drivers/ni_mio_common.c 		ni_writeb(dev, i, NI_M_AO_WAVEFORM_ORDER_REG(chan));
chan             2629 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan;
chan             2635 drivers/staging/comedi/drivers/ni_mio_common.c 		chan = CR_CHAN(chanspec[i]);
chan             2637 drivers/staging/comedi/drivers/ni_mio_common.c 		conf = NI_E_AO_DACSEL(chan);
chan             2658 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->ao_conf[chan] = conf;
chan             2683 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             2689 drivers/staging/comedi/drivers/ni_mio_common.c 		ni_ao_win_outw(dev, 1 << chan, NI671X_AO_IMMEDIATE_REG);
chan             2691 drivers/staging/comedi/drivers/ni_mio_common.c 		reg = NI671X_DAC_DIRECT_DATA_REG(chan);
chan             2693 drivers/staging/comedi/drivers/ni_mio_common.c 		reg = NI_M_DAC_DIRECT_DATA_REG(chan);
chan             2695 drivers/staging/comedi/drivers/ni_mio_common.c 		reg = NI_E_DAC_DIRECT_DATA_REG(chan);
chan             2703 drivers/staging/comedi/drivers/ni_mio_common.c 		s->readback[chan] = val;
chan             3173 drivers/staging/comedi/drivers/ni_mio_common.c 			int chan = CR_CHAN(cmd->chanlist[i]);
chan             3175 drivers/staging/comedi/drivers/ni_mio_common.c 			bits |= 1 << chan;
chan             3176 drivers/staging/comedi/drivers/ni_mio_common.c 			ni_ao_win_outw(dev, chan, NI611X_AO_WAVEFORM_GEN_REG);
chan             3536 drivers/staging/comedi/drivers/ni_mio_common.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan             3538 drivers/staging/comedi/drivers/ni_mio_common.c 		if (chan != i)
chan             4435 drivers/staging/comedi/drivers/ni_mio_common.c 	int chan;
chan             4459 drivers/staging/comedi/drivers/ni_mio_common.c 		chan = 0;
chan             4463 drivers/staging/comedi/drivers/ni_mio_common.c 				maxdata_list[chan] =
chan             4465 drivers/staging/comedi/drivers/ni_mio_common.c 				chan++;
chan             4469 drivers/staging/comedi/drivers/ni_mio_common.c 		for (chan = 0; chan < s->n_chan; chan++)
chan             4475 drivers/staging/comedi/drivers/ni_mio_common.c 		for (chan = 0; chan < s->n_chan; chan++)
chan             4541 drivers/staging/comedi/drivers/ni_mio_common.c 					   unsigned int chan)
chan             4544 drivers/staging/comedi/drivers/ni_mio_common.c 	switch (chan) {
chan             4573 drivers/staging/comedi/drivers/ni_mio_common.c 				  unsigned int chan, unsigned int source)
chan             4576 drivers/staging/comedi/drivers/ni_mio_common.c 	if (source != ni_old_get_pfi_routing(dev, chan))
chan             4582 drivers/staging/comedi/drivers/ni_mio_common.c 						unsigned int chan)
chan             4585 drivers/staging/comedi/drivers/ni_mio_common.c 	const unsigned int array_offset = chan / 3;
chan             4587 drivers/staging/comedi/drivers/ni_mio_common.c 	return NI_M_PFI_OUT_SEL_TO_SRC(chan,
chan             4592 drivers/staging/comedi/drivers/ni_mio_common.c 				       unsigned int chan, unsigned int source)
chan             4595 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int index = chan / 3;
chan             4601 drivers/staging/comedi/drivers/ni_mio_common.c 	val &= ~NI_M_PFI_OUT_SEL_MASK(chan);
chan             4602 drivers/staging/comedi/drivers/ni_mio_common.c 	val |= NI_M_PFI_OUT_SEL(chan, source);
chan             4610 drivers/staging/comedi/drivers/ni_mio_common.c 				       unsigned int chan)
chan             4614 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NI_PFI(0)) {
chan             4616 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= NI_PFI(0);
chan             4619 drivers/staging/comedi/drivers/ni_mio_common.c 			? ni_m_series_get_pfi_routing(dev, chan)
chan             4620 drivers/staging/comedi/drivers/ni_mio_common.c 			: ni_old_get_pfi_routing(dev, chan);
chan             4625 drivers/staging/comedi/drivers/ni_mio_common.c 			      unsigned int chan, unsigned int source)
chan             4629 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NI_PFI(0)) {
chan             4631 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= NI_PFI(0);
chan             4634 drivers/staging/comedi/drivers/ni_mio_common.c 			? ni_m_series_set_pfi_routing(dev, chan, source)
chan             4635 drivers/staging/comedi/drivers/ni_mio_common.c 			: ni_old_set_pfi_routing(dev, chan, source);
chan             4639 drivers/staging/comedi/drivers/ni_mio_common.c 				unsigned int chan,
chan             4648 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NI_PFI(0)) {
chan             4650 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= NI_PFI(0);
chan             4654 drivers/staging/comedi/drivers/ni_mio_common.c 	bits &= ~NI_M_PFI_FILTER_SEL_MASK(chan);
chan             4655 drivers/staging/comedi/drivers/ni_mio_common.c 	bits |= NI_M_PFI_FILTER_SEL(chan, filter);
chan             4660 drivers/staging/comedi/drivers/ni_mio_common.c static void ni_set_pfi_direction(struct comedi_device *dev, int chan,
chan             4663 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NI_PFI(0)) {
chan             4665 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= NI_PFI(0);
chan             4668 drivers/staging/comedi/drivers/ni_mio_common.c 	ni_set_bits(dev, NISTC_IO_BIDIR_PIN_REG, 1 << chan, direction);
chan             4671 drivers/staging/comedi/drivers/ni_mio_common.c static int ni_get_pfi_direction(struct comedi_device *dev, int chan)
chan             4675 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NI_PFI(0)) {
chan             4677 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= NI_PFI(0);
chan             4679 drivers/staging/comedi/drivers/ni_mio_common.c 	return devpriv->io_bidirection_pin_reg & (1 << chan) ?
chan             4688 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan;
chan             4693 drivers/staging/comedi/drivers/ni_mio_common.c 	chan = CR_CHAN(insn->chanspec);
chan             4698 drivers/staging/comedi/drivers/ni_mio_common.c 		ni_set_pfi_direction(dev, chan, data[0]);
chan             4701 drivers/staging/comedi/drivers/ni_mio_common.c 		data[1] = ni_get_pfi_direction(dev, chan);
chan             4704 drivers/staging/comedi/drivers/ni_mio_common.c 		return ni_set_pfi_routing(dev, chan, data[1]);
chan             4706 drivers/staging/comedi/drivers/ni_mio_common.c 		data[1] = ni_get_pfi_routing(dev, chan);
chan             4709 drivers/staging/comedi/drivers/ni_mio_common.c 		return ni_config_pfi_filter(dev, chan, data[1]);
chan             5050 drivers/staging/comedi/drivers/ni_mio_common.c 				       unsigned int chan, unsigned int source)
chan             5054 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
chan             5055 drivers/staging/comedi/drivers/ni_mio_common.c 		if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5061 drivers/staging/comedi/drivers/ni_mio_common.c 				__func__, chan, NISTC_RTSI_TRIG_OLD_CLK_CHAN);
chan             5088 drivers/staging/comedi/drivers/ni_mio_common.c 			       unsigned int chan, unsigned int src)
chan             5092 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= TRIGGER_LINE(0))
chan             5094 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= TRIGGER_LINE(0);
chan             5096 drivers/staging/comedi/drivers/ni_mio_common.c 	if (ni_valid_rtsi_output_source(dev, chan, src) == 0)
chan             5098 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan < 4) {
chan             5099 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->rtsi_trig_a_output_reg &= ~NISTC_RTSI_TRIG_MASK(chan);
chan             5100 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->rtsi_trig_a_output_reg |= NISTC_RTSI_TRIG(chan, src);
chan             5103 drivers/staging/comedi/drivers/ni_mio_common.c 	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
chan             5104 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK(chan);
chan             5105 drivers/staging/comedi/drivers/ni_mio_common.c 		devpriv->rtsi_trig_b_output_reg |= NISTC_RTSI_TRIG(chan, src);
chan             5108 drivers/staging/comedi/drivers/ni_mio_common.c 	} else if (chan != NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5120 drivers/staging/comedi/drivers/ni_mio_common.c 					unsigned int chan)
chan             5124 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= TRIGGER_LINE(0))
chan             5126 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= TRIGGER_LINE(0);
chan             5128 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan < 4) {
chan             5129 drivers/staging/comedi/drivers/ni_mio_common.c 		return NISTC_RTSI_TRIG_TO_SRC(chan,
chan             5131 drivers/staging/comedi/drivers/ni_mio_common.c 	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
chan             5132 drivers/staging/comedi/drivers/ni_mio_common.c 		return NISTC_RTSI_TRIG_TO_SRC(chan,
chan             5134 drivers/staging/comedi/drivers/ni_mio_common.c 	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5142 drivers/staging/comedi/drivers/ni_mio_common.c static void ni_set_rtsi_direction(struct comedi_device *dev, int chan,
chan             5148 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= TRIGGER_LINE(0))
chan             5150 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= TRIGGER_LINE(0);
chan             5153 drivers/staging/comedi/drivers/ni_mio_common.c 		if (chan < max_chan) {
chan             5155 drivers/staging/comedi/drivers/ni_mio_common.c 			    NISTC_RTSI_TRIG_DIR(chan, devpriv->is_m_series);
chan             5156 drivers/staging/comedi/drivers/ni_mio_common.c 		} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5161 drivers/staging/comedi/drivers/ni_mio_common.c 		if (chan < max_chan) {
chan             5163 drivers/staging/comedi/drivers/ni_mio_common.c 			    ~NISTC_RTSI_TRIG_DIR(chan, devpriv->is_m_series);
chan             5164 drivers/staging/comedi/drivers/ni_mio_common.c 		} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5173 drivers/staging/comedi/drivers/ni_mio_common.c static int ni_get_rtsi_direction(struct comedi_device *dev, int chan)
chan             5178 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan >= TRIGGER_LINE(0))
chan             5180 drivers/staging/comedi/drivers/ni_mio_common.c 		chan -= TRIGGER_LINE(0);
chan             5182 drivers/staging/comedi/drivers/ni_mio_common.c 	if (chan < max_chan) {
chan             5184 drivers/staging/comedi/drivers/ni_mio_common.c 			NISTC_RTSI_TRIG_DIR(chan, devpriv->is_m_series))
chan             5186 drivers/staging/comedi/drivers/ni_mio_common.c 	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
chan             5200 drivers/staging/comedi/drivers/ni_mio_common.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             5205 drivers/staging/comedi/drivers/ni_mio_common.c 		ni_set_rtsi_direction(dev, chan, data[0]);
chan             5208 drivers/staging/comedi/drivers/ni_mio_common.c 		int ret = ni_get_rtsi_direction(dev, chan);
chan             5222 drivers/staging/comedi/drivers/ni_mio_common.c 		return ni_set_rtsi_routing(dev, chan, data[1]);
chan             5224 drivers/staging/comedi/drivers/ni_mio_common.c 		int ret = ni_get_rtsi_routing(dev, chan);
chan              898 drivers/staging/comedi/drivers/ni_tio.c 	unsigned int chan = CR_CHAN(gate_source);
chan              902 drivers/staging/comedi/drivers/ni_tio.c 	switch (chan) {
chan              910 drivers/staging/comedi/drivers/ni_tio.c 		gate_sel = chan & 0x1f;
chan              914 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_RTSI_GATE_SELECT(i)) {
chan              915 drivers/staging/comedi/drivers/ni_tio.c 				gate_sel = chan & 0x1f;
chan              922 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_GATE_PIN_GATE_SELECT(i)) {
chan              923 drivers/staging/comedi/drivers/ni_tio.c 				gate_sel = chan & 0x1f;
chan              937 drivers/staging/comedi/drivers/ni_tio.c 	unsigned int chan = CR_CHAN(gate_source);
chan              941 drivers/staging/comedi/drivers/ni_tio.c 	switch (chan) {
chan              950 drivers/staging/comedi/drivers/ni_tio.c 		gate_sel = chan & 0x1f;
chan              954 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_RTSI_GATE_SELECT(i)) {
chan              955 drivers/staging/comedi/drivers/ni_tio.c 				gate_sel = chan & 0x1f;
chan              962 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_PFI_GATE_SELECT(i)) {
chan              963 drivers/staging/comedi/drivers/ni_tio.c 				gate_sel = chan & 0x1f;
chan              977 drivers/staging/comedi/drivers/ni_tio.c 	unsigned int chan = CR_CHAN(gate_source);
chan              981 drivers/staging/comedi/drivers/ni_tio.c 	switch (chan) {
chan              987 drivers/staging/comedi/drivers/ni_tio.c 		gate2_sel = chan & 0x1f;
chan              994 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_RTSI_GATE_SELECT(i)) {
chan              995 drivers/staging/comedi/drivers/ni_tio.c 				gate2_sel = chan & 0x1f;
chan             1002 drivers/staging/comedi/drivers/ni_tio.c 			if (chan == NI_GPCT_UP_DOWN_PIN_GATE_SELECT(i)) {
chan             1003 drivers/staging/comedi/drivers/ni_tio.c 				gate2_sel = chan & 0x1f;
chan             1066 drivers/staging/comedi/drivers/ni_tio.c 	int chan = CR_CHAN(src) & (~NI_GPCT_DISABLED_GATE_SELECT);
chan             1077 drivers/staging/comedi/drivers/ni_tio.c 			ret = ni_m_set_gate(counter, chan);
chan             1080 drivers/staging/comedi/drivers/ni_tio.c 			ret = ni_660x_set_gate(counter, chan);
chan             1099 drivers/staging/comedi/drivers/ni_tio.c 			ret = ni_m_set_gate2(counter, chan);
chan             1102 drivers/staging/comedi/drivers/ni_tio.c 			ret = ni_660x_set_gate2(counter, chan);
chan              213 drivers/staging/comedi/drivers/pcl711.c 	unsigned int chan = CR_CHAN(chanspec);
chan              223 drivers/staging/comedi/drivers/pcl711.c 			chan &= 0x7;
chan              226 drivers/staging/comedi/drivers/pcl711.c 			if (chan < 8)
chan              232 drivers/staging/comedi/drivers/pcl711.c 	outb(mux | PCL711_MUX_CHAN(chan), dev->iobase + PCL711_MUX_REG);
chan              358 drivers/staging/comedi/drivers/pcl711.c 			    unsigned int chan, unsigned int val)
chan              360 drivers/staging/comedi/drivers/pcl711.c 	outb(val & 0xff, dev->iobase + PCL711_AO_LSB_REG(chan));
chan              361 drivers/staging/comedi/drivers/pcl711.c 	outb((val >> 8) & 0xff, dev->iobase + PCL711_AO_MSB_REG(chan));
chan              369 drivers/staging/comedi/drivers/pcl711.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              370 drivers/staging/comedi/drivers/pcl711.c 	unsigned int val = s->readback[chan];
chan              375 drivers/staging/comedi/drivers/pcl711.c 		pcl711_ao_write(dev, chan, val);
chan              377 drivers/staging/comedi/drivers/pcl711.c 	s->readback[chan] = val;
chan              237 drivers/staging/comedi/drivers/pcl726.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              244 drivers/staging/comedi/drivers/pcl726.c 		s->readback[chan] = val;
chan              247 drivers/staging/comedi/drivers/pcl726.c 		if (comedi_chan_range_is_bipolar(s, chan, range))
chan              251 drivers/staging/comedi/drivers/pcl726.c 		outb((val >> 8) & 0xff, dev->iobase + PCL726_AO_MSB_REG(chan));
chan              252 drivers/staging/comedi/drivers/pcl726.c 		outb(val & 0xff, dev->iobase + PCL726_AO_LSB_REG(chan));
chan              536 drivers/staging/comedi/drivers/pcl812.c 	comedi_isadma_disable(dma->chan);
chan              558 drivers/staging/comedi/drivers/pcl812.c 	unsigned int chan = CR_CHAN(chanspec);
chan              571 drivers/staging/comedi/drivers/pcl812.c 			if (chan < 8)
chan              578 drivers/staging/comedi/drivers/pcl812.c 	outb(mux | PCL812_MUX_CHAN(chan), dev->iobase + PCL812_MUX_REG);
chan              777 drivers/staging/comedi/drivers/pcl812.c 	unsigned int chan = s->async->cur_chan;
chan              792 drivers/staging/comedi/drivers/pcl812.c 	if (cmd->chanlist[chan] != cmd->chanlist[next_chan])
chan              900 drivers/staging/comedi/drivers/pcl812.c 		comedi_isadma_disable(devpriv->dma->chan);
chan              945 drivers/staging/comedi/drivers/pcl812.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              946 drivers/staging/comedi/drivers/pcl812.c 	unsigned int val = s->readback[chan];
chan              951 drivers/staging/comedi/drivers/pcl812.c 		outb(val & 0xff, dev->iobase + PCL812_AO_LSB_REG(chan));
chan              952 drivers/staging/comedi/drivers/pcl812.c 		outb((val >> 8) & 0x0f, dev->iobase + PCL812_AO_MSB_REG(chan));
chan              954 drivers/staging/comedi/drivers/pcl812.c 	s->readback[chan] = val;
chan              989 drivers/staging/comedi/drivers/pcl812.c 	unsigned int chan;
chan             1004 drivers/staging/comedi/drivers/pcl812.c 	for (chan = 0; chan < board->n_aochan; chan++) {
chan             1005 drivers/staging/comedi/drivers/pcl812.c 		outb(0, dev->iobase + PCL812_AO_LSB_REG(chan));
chan             1006 drivers/staging/comedi/drivers/pcl812.c 		outb(0, dev->iobase + PCL812_AO_MSB_REG(chan));
chan              122 drivers/staging/comedi/drivers/pcl816.c 	comedi_isadma_disable(dma->chan);
chan              137 drivers/staging/comedi/drivers/pcl816.c 				     unsigned int chan,
chan              140 drivers/staging/comedi/drivers/pcl816.c 	outb(chan, dev->iobase + PCL816_MUX_REG);
chan              444 drivers/staging/comedi/drivers/pcl816.c 	outb((dma->chan << 4) | dev->irq,
chan              507 drivers/staging/comedi/drivers/pcl816.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              514 drivers/staging/comedi/drivers/pcl816.c 	pcl816_ai_set_chan_range(dev, chan, range);
chan              515 drivers/staging/comedi/drivers/pcl816.c 	pcl816_ai_set_chan_scan(dev, chan, chan);
chan              311 drivers/staging/comedi/drivers/pcl818.c 	comedi_isadma_disable(dma->chan);
chan              326 drivers/staging/comedi/drivers/pcl818.c 				     unsigned int chan,
chan              329 drivers/staging/comedi/drivers/pcl818.c 	outb(chan, dev->iobase + PCL818_MUX_REG);
chan              383 drivers/staging/comedi/drivers/pcl818.c 					      unsigned int *chan)
chan              390 drivers/staging/comedi/drivers/pcl818.c 	if (chan)
chan              391 drivers/staging/comedi/drivers/pcl818.c 		*chan = val & 0xf;
chan              398 drivers/staging/comedi/drivers/pcl818.c 					 unsigned int *chan)
chan              405 drivers/staging/comedi/drivers/pcl818.c 	if (chan)
chan              406 drivers/staging/comedi/drivers/pcl818.c 		*chan = val & 0xf;
chan              426 drivers/staging/comedi/drivers/pcl818.c 				   unsigned int chan, unsigned int val)
chan              433 drivers/staging/comedi/drivers/pcl818.c 	if (chan != expected_chan) {
chan              438 drivers/staging/comedi/drivers/pcl818.c 			chan, expected_chan);
chan              461 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan;
chan              470 drivers/staging/comedi/drivers/pcl818.c 	val = pcl818_ai_get_sample(dev, s, &chan);
chan              471 drivers/staging/comedi/drivers/pcl818.c 	pcl818_ai_write_sample(dev, s, chan, val);
chan              482 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan;
chan              492 drivers/staging/comedi/drivers/pcl818.c 		chan = val & 0xf;
chan              494 drivers/staging/comedi/drivers/pcl818.c 		if (!pcl818_ai_write_sample(dev, s, chan, val))
chan              503 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan;
chan              528 drivers/staging/comedi/drivers/pcl818.c 		val = pcl818_ai_get_fifo_sample(dev, s, &chan);
chan              529 drivers/staging/comedi/drivers/pcl818.c 		if (!pcl818_ai_write_sample(dev, s, chan, val))
chan              782 drivers/staging/comedi/drivers/pcl818.c 		comedi_isadma_disable(dma->chan);
chan              805 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              812 drivers/staging/comedi/drivers/pcl818.c 	pcl818_ai_set_chan_range(dev, chan, range);
chan              813 drivers/staging/comedi/drivers/pcl818.c 	pcl818_ai_set_chan_scan(dev, chan, chan);
chan              835 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              836 drivers/staging/comedi/drivers/pcl818.c 	unsigned int val = s->readback[chan];
chan              842 drivers/staging/comedi/drivers/pcl818.c 		     dev->iobase + PCL818_AO_LSB_REG(chan));
chan              844 drivers/staging/comedi/drivers/pcl818.c 		     dev->iobase + PCL818_AO_MSB_REG(chan));
chan              846 drivers/staging/comedi/drivers/pcl818.c 	s->readback[chan] = val;
chan              880 drivers/staging/comedi/drivers/pcl818.c 	unsigned int chan;
chan              899 drivers/staging/comedi/drivers/pcl818.c 	for (chan = 0; chan < board->n_aochan; chan++) {
chan              900 drivers/staging/comedi/drivers/pcl818.c 		outb(0, dev->iobase + PCL818_AO_LSB_REG(chan));
chan              901 drivers/staging/comedi/drivers/pcl818.c 		outb(0, dev->iobase + PCL818_AO_MSB_REG(chan));
chan              165 drivers/staging/comedi/drivers/pcm3724.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              169 drivers/staging/comedi/drivers/pcm3724.c 	if (chan < 8)
chan              171 drivers/staging/comedi/drivers/pcm3724.c 	else if (chan < 16)
chan              173 drivers/staging/comedi/drivers/pcm3724.c 	else if (chan < 20)
chan               72 drivers/staging/comedi/drivers/pcmad.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               79 drivers/staging/comedi/drivers/pcmad.c 		outb(chan, dev->iobase + PCMAD_CONVERT);
chan               64 drivers/staging/comedi/drivers/pcmda12.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               65 drivers/staging/comedi/drivers/pcmda12.c 	unsigned int val = s->readback[chan];
chan               66 drivers/staging/comedi/drivers/pcmda12.c 	unsigned long ioreg = dev->iobase + (chan * 2);
chan               81 drivers/staging/comedi/drivers/pcmda12.c 	s->readback[chan] = val;
chan              341 drivers/staging/comedi/drivers/pcmmio.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              343 drivers/staging/comedi/drivers/pcmmio.c 		if (triggered & (1 << chan))
chan              395 drivers/staging/comedi/drivers/pcmmio.c 			unsigned int chan = CR_CHAN(chanspec);
chan              399 drivers/staging/comedi/drivers/pcmmio.c 			bits |= (1 << chan);
chan              400 drivers/staging/comedi/drivers/pcmmio.c 			pol_bits |= (((aref || range) ? 1 : 0) << chan);
chan              536 drivers/staging/comedi/drivers/pcmmio.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              559 drivers/staging/comedi/drivers/pcmmio.c 	if (chan > 7) {
chan              560 drivers/staging/comedi/drivers/pcmmio.c 		chan -= 8;
chan              566 drivers/staging/comedi/drivers/pcmmio.c 	if (chan % 2)
chan              568 drivers/staging/comedi/drivers/pcmmio.c 	cmd |= PCMMIO_AI_CMD_CHAN_SEL(chan / 2);
chan              619 drivers/staging/comedi/drivers/pcmmio.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              630 drivers/staging/comedi/drivers/pcmmio.c 	if (chan > 3) {
chan              631 drivers/staging/comedi/drivers/pcmmio.c 		cmd |= PCMMIO_AO_CMD_CHAN_SEL(chan - 4);
chan              634 drivers/staging/comedi/drivers/pcmmio.c 		cmd |= PCMMIO_AO_CMD_CHAN_SEL(chan);
chan              659 drivers/staging/comedi/drivers/pcmmio.c 		s->readback[chan] = val;
chan              320 drivers/staging/comedi/drivers/pcmuio.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              322 drivers/staging/comedi/drivers/pcmuio.c 		if (triggered & (1 << chan))
chan              391 drivers/staging/comedi/drivers/pcmuio.c 			unsigned int chan = CR_CHAN(chanspec);
chan              395 drivers/staging/comedi/drivers/pcmuio.c 			bits |= (1 << chan);
chan              396 drivers/staging/comedi/drivers/pcmuio.c 			pol_bits |= ((aref || range) ? 1 : 0) << chan;
chan              265 drivers/staging/comedi/drivers/quatech_daqp_cs.c 	unsigned int chan = CR_CHAN(chanspec);
chan              270 drivers/staging/comedi/drivers/quatech_daqp_cs.c 	val = DAQP_SCANLIST_CHANNEL(chan) | DAQP_SCANLIST_GAIN(range);
chan              637 drivers/staging/comedi/drivers/quatech_daqp_cs.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              656 drivers/staging/comedi/drivers/quatech_daqp_cs.c 		outw((chan << 12) | comedi_offset_munge(s, val),
chan              659 drivers/staging/comedi/drivers/quatech_daqp_cs.c 		s->readback[chan] = val;
chan              418 drivers/staging/comedi/drivers/rtd520.c 	unsigned int chan = CR_CHAN(chanspec);
chan              423 drivers/staging/comedi/drivers/rtd520.c 	r |= chan & 0xf;
chan              999 drivers/staging/comedi/drivers/rtd520.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1000 drivers/staging/comedi/drivers/rtd520.c 	unsigned int bit = (chan == 0) ? FS_DAC1_NOT_EMPTY : FS_DAC2_NOT_EMPTY;
chan             1015 drivers/staging/comedi/drivers/rtd520.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1021 drivers/staging/comedi/drivers/rtd520.c 	writew(range & 7, dev->mmio + LAS0_DAC_CTRL(chan));
chan             1035 drivers/staging/comedi/drivers/rtd520.c 		writew(val, devpriv->las1 + LAS1_DAC_FIFO(chan));
chan             1036 drivers/staging/comedi/drivers/rtd520.c 		writew(0, dev->mmio + LAS0_UPDATE_DAC(chan));
chan             1042 drivers/staging/comedi/drivers/rtd520.c 		s->readback[chan] = data[i];
chan             1094 drivers/staging/comedi/drivers/rtd520.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1110 drivers/staging/comedi/drivers/rtd520.c 		max_src = (chan == 0) ? 3 : 4;
chan             1114 drivers/staging/comedi/drivers/rtd520.c 		devpriv->timer_gate_src[chan] = src;
chan             1115 drivers/staging/comedi/drivers/rtd520.c 		writeb(src, dev->mmio + LAS0_8254_GATE_SEL(chan));
chan             1118 drivers/staging/comedi/drivers/rtd520.c 		data[2] = devpriv->timer_gate_src[chan];
chan             1132 drivers/staging/comedi/drivers/rtd520.c 		switch (chan) {
chan             1148 drivers/staging/comedi/drivers/rtd520.c 		devpriv->timer_clk_src[chan] = src;
chan             1149 drivers/staging/comedi/drivers/rtd520.c 		writeb(src, dev->mmio + LAS0_8254_CLK_SEL(chan));
chan             1152 drivers/staging/comedi/drivers/rtd520.c 		src = devpriv->timer_clk_src[chan];
chan             1153 drivers/staging/comedi/drivers/rtd520.c 		data[1] = devpriv->timer_clk_src[chan];
chan              156 drivers/staging/comedi/drivers/rti800.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              165 drivers/staging/comedi/drivers/rti800.c 	muxgain_bits = chan | (gain << 5);
chan              209 drivers/staging/comedi/drivers/rti800.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              210 drivers/staging/comedi/drivers/rti800.c 	int reg_lo = chan ? RTI800_DAC1LO : RTI800_DAC0LO;
chan              211 drivers/staging/comedi/drivers/rti800.c 	int reg_hi = chan ? RTI800_DAC1HI : RTI800_DAC0HI;
chan              217 drivers/staging/comedi/drivers/rti800.c 		s->readback[chan] = val;
chan              219 drivers/staging/comedi/drivers/rti800.c 		if (devpriv->dac_2comp[chan])
chan               47 drivers/staging/comedi/drivers/rti802.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               50 drivers/staging/comedi/drivers/rti802.c 	outb(chan, dev->iobase + RTI802_SELECT);
chan               55 drivers/staging/comedi/drivers/rti802.c 		s->readback[chan] = val;
chan               58 drivers/staging/comedi/drivers/rti802.c 		if (devpriv->dac_coding[chan] == dac_2comp)
chan              176 drivers/staging/comedi/drivers/s526.c 			    unsigned int chan, unsigned int val)
chan              179 drivers/staging/comedi/drivers/s526.c 	outw((val >> 16) & 0xffff, dev->iobase + S526_GPCT_MSB_REG(chan));
chan              180 drivers/staging/comedi/drivers/s526.c 	outw(val & 0xffff, dev->iobase + S526_GPCT_LSB_REG(chan));
chan              184 drivers/staging/comedi/drivers/s526.c 				   unsigned int chan)
chan              189 drivers/staging/comedi/drivers/s526.c 	val = inw(dev->iobase + S526_GPCT_LSB_REG(chan)) & 0xffff;
chan              190 drivers/staging/comedi/drivers/s526.c 	val |= (inw(dev->iobase + S526_GPCT_MSB_REG(chan)) & 0xff) << 16;
chan              200 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              204 drivers/staging/comedi/drivers/s526.c 		data[i] = s526_gpct_read(dev, chan);
chan              215 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              230 drivers/staging/comedi/drivers/s526.c 		devpriv->gpct_config[chan] = data[0];
chan              235 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              242 drivers/staging/comedi/drivers/s526.c 			     dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              276 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              279 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[2]);
chan              284 drivers/staging/comedi/drivers/s526.c 			     dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              291 drivers/staging/comedi/drivers/s526.c 			     dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              294 drivers/staging/comedi/drivers/s526.c 			     dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              307 drivers/staging/comedi/drivers/s526.c 		devpriv->gpct_config[chan] = data[0];
chan              314 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              317 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[2]);
chan              324 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              327 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[3]);
chan              332 drivers/staging/comedi/drivers/s526.c 			outw(val, dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              344 drivers/staging/comedi/drivers/s526.c 		devpriv->gpct_config[chan] = data[0];
chan              351 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              354 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[2]);
chan              361 drivers/staging/comedi/drivers/s526.c 		outw(val, dev->iobase + S526_GPCT_MODE_REG(chan));
chan              364 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[3]);
chan              369 drivers/staging/comedi/drivers/s526.c 			outw(val, dev->iobase + S526_GPCT_CTRL_REG(chan));
chan              386 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              388 drivers/staging/comedi/drivers/s526.c 	inw(dev->iobase + S526_GPCT_MODE_REG(chan));	/* Is this required? */
chan              391 drivers/staging/comedi/drivers/s526.c 	switch (devpriv->gpct_config[chan]) {
chan              406 drivers/staging/comedi/drivers/s526.c 		s526_gpct_write(dev, chan, data[0]);
chan              438 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              444 drivers/staging/comedi/drivers/s526.c 	ctrl = S526_AI_CTRL_CONV(chan) | S526_AI_CTRL_READ(chan) |
chan              477 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              478 drivers/staging/comedi/drivers/s526.c 	unsigned int ctrl = S526_AO_CTRL_CHAN(chan);
chan              479 drivers/staging/comedi/drivers/s526.c 	unsigned int val = s->readback[chan];
chan              496 drivers/staging/comedi/drivers/s526.c 	s->readback[chan] = val;
chan              519 drivers/staging/comedi/drivers/s526.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              527 drivers/staging/comedi/drivers/s526.c 	if (chan < 4)
chan              516 drivers/staging/comedi/drivers/s626.c 			u16 chan, int16_t dacdata)
chan              526 drivers/staging/comedi/drivers/s626.c 	signmask = 1 << chan;
chan              550 drivers/staging/comedi/drivers/s626.c 	ws_image = (chan & 2) ? S626_WS1 : S626_WS2;
chan              577 drivers/staging/comedi/drivers/s626.c 	val |= ((u32)(chan & 1) << 15);	/* Address the DAC channel
chan              588 drivers/staging/comedi/drivers/s626.c 	u32 chan;
chan              597 drivers/staging/comedi/drivers/s626.c 	chan = s626_trimchan[logical_chan];
chan              631 drivers/staging/comedi/drivers/s626.c 	return s626_send_dac(dev, (chan << 8) | dac_data);
chan              664 drivers/staging/comedi/drivers/s626.c 				  unsigned int chan, u16 value)
chan              666 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRB(chan),
chan              675 drivers/staging/comedi/drivers/s626.c 			 unsigned int chan, u32 value)
chan              677 drivers/staging/comedi/drivers/s626.c 	s626_debi_write(dev, S626_LP_CNTR(chan), value);
chan              678 drivers/staging/comedi/drivers/s626.c 	s626_debi_write(dev, S626_LP_CNTR(chan) + 2, value >> 16);
chan              687 drivers/staging/comedi/drivers/s626.c 				 unsigned int chan)
chan              692 drivers/staging/comedi/drivers/s626.c 	if (chan < 3)
chan              697 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRB(chan), ~S626_CRBMSK_INTCTRL, set);
chan              707 drivers/staging/comedi/drivers/s626.c 			    unsigned int chan, u16 setup,
chan              771 drivers/staging/comedi/drivers/s626.c 		devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
chan              772 drivers/staging/comedi/drivers/s626.c 						S626_INDXMASK(chan));
chan              778 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRA(chan),
chan              780 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRB(chan),
chan              785 drivers/staging/comedi/drivers/s626.c 			    unsigned int chan, u16 setup,
chan              856 drivers/staging/comedi/drivers/s626.c 		devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
chan              857 drivers/staging/comedi/drivers/s626.c 						S626_INDXMASK(chan));
chan              863 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRA(chan),
chan              865 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRB(chan),
chan              870 drivers/staging/comedi/drivers/s626.c 			  unsigned int chan,
chan              873 drivers/staging/comedi/drivers/s626.c 	if (chan < 3)
chan              874 drivers/staging/comedi/drivers/s626.c 		s626_set_mode_a(dev, chan, setup, disable_int_src);
chan              876 drivers/staging/comedi/drivers/s626.c 		s626_set_mode_b(dev, chan, setup, disable_int_src);
chan              883 drivers/staging/comedi/drivers/s626.c 			    unsigned int chan, u16 enab)
chan              888 drivers/staging/comedi/drivers/s626.c 	if (chan < 3) {
chan              895 drivers/staging/comedi/drivers/s626.c 	s626_debi_replace(dev, S626_LP_CRB(chan), ~mask, set);
chan              904 drivers/staging/comedi/drivers/s626.c 			       unsigned int chan, u16 trig)
chan              910 drivers/staging/comedi/drivers/s626.c 	if (chan < 3) {
chan              911 drivers/staging/comedi/drivers/s626.c 		reg = S626_LP_CRA(chan);
chan              915 drivers/staging/comedi/drivers/s626.c 		reg = S626_LP_CRB(chan);
chan              928 drivers/staging/comedi/drivers/s626.c 			     unsigned int chan, u16 int_source)
chan              931 drivers/staging/comedi/drivers/s626.c 	u16 cra_reg = S626_LP_CRA(chan);
chan              932 drivers/staging/comedi/drivers/s626.c 	u16 crb_reg = S626_LP_CRB(chan);
chan              934 drivers/staging/comedi/drivers/s626.c 	if (chan < 3) {
chan              962 drivers/staging/comedi/drivers/s626.c 	devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
chan              963 drivers/staging/comedi/drivers/s626.c 					S626_INDXMASK(chan));
chan              969 drivers/staging/comedi/drivers/s626.c 		devpriv->counter_int_enabs |= S626_OVERMASK(chan);
chan              972 drivers/staging/comedi/drivers/s626.c 		devpriv->counter_int_enabs |= S626_INDXMASK(chan);
chan              975 drivers/staging/comedi/drivers/s626.c 		devpriv->counter_int_enabs |= (S626_OVERMASK(chan) |
chan              976 drivers/staging/comedi/drivers/s626.c 					       S626_INDXMASK(chan));
chan              985 drivers/staging/comedi/drivers/s626.c 			     unsigned int chan)
chan              987 drivers/staging/comedi/drivers/s626.c 	if (chan < 3) {
chan              990 drivers/staging/comedi/drivers/s626.c 		cra = s626_debi_read(dev, S626_LP_CRA(chan));
chan              993 drivers/staging/comedi/drivers/s626.c 		s626_debi_write(dev, S626_LP_CRA(chan),
chan              995 drivers/staging/comedi/drivers/s626.c 		s626_debi_write(dev, S626_LP_CRA(chan), cra);
chan              999 drivers/staging/comedi/drivers/s626.c 		crb = s626_debi_read(dev, S626_LP_CRB(chan));
chan             1003 drivers/staging/comedi/drivers/s626.c 		s626_debi_write(dev, S626_LP_CRB(chan),
chan             1005 drivers/staging/comedi/drivers/s626.c 		s626_debi_write(dev, S626_LP_CRB(chan), crb);
chan             1014 drivers/staging/comedi/drivers/s626.c static int s626_dio_set_irq(struct comedi_device *dev, unsigned int chan)
chan             1016 drivers/staging/comedi/drivers/s626.c 	unsigned int group = chan / 16;
chan             1017 drivers/staging/comedi/drivers/s626.c 	unsigned int mask = 1 << (chan - (16 * group));
chan             1490 drivers/staging/comedi/drivers/s626.c 	u16 chan = CR_CHAN(insn->chanspec);
chan             1503 drivers/staging/comedi/drivers/s626.c 		adc_spec = (chan << 8) | (S626_GSEL_BIPOLAR5V);
chan             1505 drivers/staging/comedi/drivers/s626.c 		adc_spec = (chan << 8) | (S626_GSEL_BIPOLAR10V);
chan             1651 drivers/staging/comedi/drivers/s626.c 			    unsigned int chan, int tick)
chan             1669 drivers/staging/comedi/drivers/s626.c 	s626_set_mode(dev, chan, setup, false);
chan             1672 drivers/staging/comedi/drivers/s626.c 	s626_preload(dev, chan, tick);
chan             1678 drivers/staging/comedi/drivers/s626.c 	s626_set_load_trig(dev, chan, 0);
chan             1679 drivers/staging/comedi/drivers/s626.c 	s626_pulse_index(dev, chan);
chan             1682 drivers/staging/comedi/drivers/s626.c 	s626_set_load_trig(dev, chan, 1);
chan             1685 drivers/staging/comedi/drivers/s626.c 	s626_set_int_src(dev, chan, S626_INTSRC_OVER);
chan             1687 drivers/staging/comedi/drivers/s626.c 	s626_set_latch_source(dev, chan, value_latchsrc);
chan             1926 drivers/staging/comedi/drivers/s626.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1935 drivers/staging/comedi/drivers/s626.c 		ret = s626_set_dac(dev, chan, dacdata);
chan             1939 drivers/staging/comedi/drivers/s626.c 		s->readback[chan] = data[i];
chan             2018 drivers/staging/comedi/drivers/s626.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             2039 drivers/staging/comedi/drivers/s626.c 	s626_set_mode(dev, chan, setup, true);
chan             2040 drivers/staging/comedi/drivers/s626.c 	s626_preload(dev, chan, data[0]);
chan             2041 drivers/staging/comedi/drivers/s626.c 	s626_pulse_index(dev, chan);
chan             2042 drivers/staging/comedi/drivers/s626.c 	s626_set_latch_source(dev, chan, value_latchsrc);
chan             2043 drivers/staging/comedi/drivers/s626.c 	s626_set_enable(dev, chan, (enab != 0));
chan             2053 drivers/staging/comedi/drivers/s626.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             2054 drivers/staging/comedi/drivers/s626.c 	u16 cntr_latch_reg = S626_LP_CNTR(chan);
chan             2076 drivers/staging/comedi/drivers/s626.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             2079 drivers/staging/comedi/drivers/s626.c 	s626_preload(dev, chan, data[0]);
chan             2085 drivers/staging/comedi/drivers/s626.c 	s626_set_load_trig(dev, chan, 0);
chan             2086 drivers/staging/comedi/drivers/s626.c 	s626_pulse_index(dev, chan);
chan             2087 drivers/staging/comedi/drivers/s626.c 	s626_set_load_trig(dev, chan, 2);
chan             2101 drivers/staging/comedi/drivers/s626.c 	int chan;
chan             2119 drivers/staging/comedi/drivers/s626.c 	for (chan = 0; chan < S626_ENCODER_CHANNELS; chan++) {
chan             2120 drivers/staging/comedi/drivers/s626.c 		s626_set_mode(dev, chan, setup, true);
chan             2121 drivers/staging/comedi/drivers/s626.c 		s626_set_int_src(dev, chan, 0);
chan             2122 drivers/staging/comedi/drivers/s626.c 		s626_reset_cap_flags(dev, chan);
chan             2123 drivers/staging/comedi/drivers/s626.c 		s626_set_enable(dev, chan, S626_CLKENAB_ALWAYS);
chan             2171 drivers/staging/comedi/drivers/s626.c 	u16 chan;
chan             2393 drivers/staging/comedi/drivers/s626.c 	for (chan = 0; chan < S626_DAC_CHANNELS; chan++) {
chan             2394 drivers/staging/comedi/drivers/s626.c 		ret = s626_set_dac(dev, chan, 0);
chan               85 drivers/staging/comedi/drivers/ssv_dnp.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan               94 drivers/staging/comedi/drivers/ssv_dnp.c 	if (chan < 8) {			/* Port A */
chan               95 drivers/staging/comedi/drivers/ssv_dnp.c 		mask = 1 << chan;
chan               97 drivers/staging/comedi/drivers/ssv_dnp.c 	} else if (chan < 16) {		/* Port B */
chan               98 drivers/staging/comedi/drivers/ssv_dnp.c 		mask = 1 << (chan - 8);
chan              110 drivers/staging/comedi/drivers/ssv_dnp.c 		mask = 1 << ((chan - 16) * 2);
chan              392 drivers/staging/comedi/drivers/usbdux.c 			unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              404 drivers/staging/comedi/drivers/usbdux.c 			*datap++ = chan << 6;
chan              405 drivers/staging/comedi/drivers/usbdux.c 			s->readback[chan] = val;
chan              587 drivers/staging/comedi/drivers/usbdux.c static u8 create_adc_command(unsigned int chan, unsigned int range)
chan              592 drivers/staging/comedi/drivers/usbdux.c 	return (chan << 4) | ((p == 1) << 2) | ((r == 1) << 3);
chan              676 drivers/staging/comedi/drivers/usbdux.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              679 drivers/staging/comedi/drivers/usbdux.c 		devpriv->dux_commands[i + 2] = create_adc_command(chan, range);
chan              742 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              754 drivers/staging/comedi/drivers/usbdux.c 	devpriv->dux_commands[1] = create_adc_command(chan, range);
chan              802 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              815 drivers/staging/comedi/drivers/usbdux.c 	devpriv->dux_commands[4] = chan << 6;
chan              827 drivers/staging/comedi/drivers/usbdux.c 		s->readback[chan] = val;
chan             1059 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1073 drivers/staging/comedi/drivers/usbdux.c 		data[i] = le16_to_cpu(devpriv->insn_buf[chan + 1]);
chan             1088 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1095 drivers/staging/comedi/drivers/usbdux.c 	devpriv->dux_commands[1] = chan;
chan             1276 drivers/staging/comedi/drivers/usbdux.c 			       unsigned int chan,
chan             1281 drivers/staging/comedi/drivers/usbdux.c 	char pwm_mask = (1 << chan);	/* DIO bit for the PWM data */
chan             1282 drivers/staging/comedi/drivers/usbdux.c 	char sgn_mask = (16 << chan);	/* DIO bit for the sign */
chan             1306 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1319 drivers/staging/comedi/drivers/usbdux.c 	usbdux_pwm_pattern(dev, s, chan, data[0], 0);
chan             1330 drivers/staging/comedi/drivers/usbdux.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1356 drivers/staging/comedi/drivers/usbdux.c 		usbdux_pwm_pattern(dev, s, chan, data[1], (data[2] != 0));
chan              332 drivers/staging/comedi/drivers/usbduxfast.c 		unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              335 drivers/staging/comedi/drivers/usbduxfast.c 		if (chan != i) {
chan              767 drivers/staging/comedi/drivers/usbduxfast.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              830 drivers/staging/comedi/drivers/usbduxfast.c 		for (j = chan; (j < n) && (i < insn->n); j = j + 16) {
chan              352 drivers/staging/comedi/drivers/usbduxsigma.c 			unsigned int chan = CR_CHAN(cmd->chanlist[i]);
chan              362 drivers/staging/comedi/drivers/usbduxsigma.c 			*datap++ = chan;
chan              363 drivers/staging/comedi/drivers/usbduxsigma.c 			s->readback[chan] = val;
chan              545 drivers/staging/comedi/drivers/usbduxsigma.c static void create_adc_command(unsigned int chan,
chan              548 drivers/staging/comedi/drivers/usbduxsigma.c 	if (chan < 8)
chan              549 drivers/staging/comedi/drivers/usbduxsigma.c 		(*muxsg0) = (*muxsg0) | (1 << chan);
chan              550 drivers/staging/comedi/drivers/usbduxsigma.c 	else if (chan < 16)
chan              551 drivers/staging/comedi/drivers/usbduxsigma.c 		(*muxsg1) = (*muxsg1) | (1 << (chan - 8));
chan              651 drivers/staging/comedi/drivers/usbduxsigma.c 		unsigned int chan  = CR_CHAN(cmd->chanlist[i]);
chan              653 drivers/staging/comedi/drivers/usbduxsigma.c 		create_adc_command(chan, &muxsg0, &muxsg1);
chan              699 drivers/staging/comedi/drivers/usbduxsigma.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              712 drivers/staging/comedi/drivers/usbduxsigma.c 	create_adc_command(chan, &muxsg0, &muxsg1);
chan              770 drivers/staging/comedi/drivers/usbduxsigma.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              783 drivers/staging/comedi/drivers/usbduxsigma.c 		devpriv->dux_commands[3] = chan;	/* channel number */
chan              789 drivers/staging/comedi/drivers/usbduxsigma.c 		s->readback[chan] = data[i];
chan             1119 drivers/staging/comedi/drivers/usbduxsigma.c 				    unsigned int chan,
chan             1124 drivers/staging/comedi/drivers/usbduxsigma.c 	char pwm_mask = (1 << chan);	/* DIO bit for the PWM data */
chan             1125 drivers/staging/comedi/drivers/usbduxsigma.c 	char sgn_mask = (16 << chan);	/* DIO bit for the sign */
chan             1149 drivers/staging/comedi/drivers/usbduxsigma.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1162 drivers/staging/comedi/drivers/usbduxsigma.c 	usbduxsigma_pwm_pattern(dev, s, chan, data[0], 0);
chan             1173 drivers/staging/comedi/drivers/usbduxsigma.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan             1199 drivers/staging/comedi/drivers/usbduxsigma.c 		usbduxsigma_pwm_pattern(dev, s, chan, data[1], (data[2] != 0));
chan             1208 drivers/staging/comedi/drivers/usbduxsigma.c static int usbduxsigma_getstatusinfo(struct comedi_device *dev, int chan)
chan             1216 drivers/staging/comedi/drivers/usbduxsigma.c 	switch (chan) {
chan              239 drivers/staging/comedi/drivers/vmk80xx.c 	int chan;
chan              244 drivers/staging/comedi/drivers/vmk80xx.c 	chan = CR_CHAN(insn->chanspec);
chan              248 drivers/staging/comedi/drivers/vmk80xx.c 		if (!chan)
chan              258 drivers/staging/comedi/drivers/vmk80xx.c 		devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
chan              287 drivers/staging/comedi/drivers/vmk80xx.c 	int chan;
chan              293 drivers/staging/comedi/drivers/vmk80xx.c 	chan = CR_CHAN(insn->chanspec);
chan              298 drivers/staging/comedi/drivers/vmk80xx.c 		if (!chan)
chan              306 drivers/staging/comedi/drivers/vmk80xx.c 		devpriv->usb_tx_buf[VMK8061_CH_REG] = chan;
chan              328 drivers/staging/comedi/drivers/vmk80xx.c 	int chan;
chan              333 drivers/staging/comedi/drivers/vmk80xx.c 	chan = CR_CHAN(insn->chanspec);
chan              343 drivers/staging/comedi/drivers/vmk80xx.c 		data[n] = devpriv->usb_rx_buf[reg + chan];
chan              440 drivers/staging/comedi/drivers/vmk80xx.c 	int chan;
chan              445 drivers/staging/comedi/drivers/vmk80xx.c 	chan = CR_CHAN(insn->chanspec);
chan              449 drivers/staging/comedi/drivers/vmk80xx.c 		if (!chan)
chan              469 drivers/staging/comedi/drivers/vmk80xx.c 			data[n] = devpriv->usb_rx_buf[reg[0] * (chan + 1) + 1]
chan              484 drivers/staging/comedi/drivers/vmk80xx.c 	unsigned int chan = CR_CHAN(insn->chanspec);
chan              493 drivers/staging/comedi/drivers/vmk80xx.c 			if (!chan) {
chan              523 drivers/staging/comedi/drivers/vmk80xx.c 	int chan;
chan              528 drivers/staging/comedi/drivers/vmk80xx.c 	chan = CR_CHAN(insn->chanspec);
chan              530 drivers/staging/comedi/drivers/vmk80xx.c 	if (!chan)
chan              548 drivers/staging/comedi/drivers/vmk80xx.c 		devpriv->usb_tx_buf[6 + chan] = val;
chan              130 drivers/staging/comedi/kcomedilib/kcomedilib_main.c 			  unsigned int chan, unsigned int *io)
chan              140 drivers/staging/comedi/kcomedilib/kcomedilib_main.c 	insn.chanspec = CR_PACK(chan, 0, 0);
chan              151 drivers/staging/comedi/kcomedilib/kcomedilib_main.c 		      unsigned int chan, unsigned int io)
chan              159 drivers/staging/comedi/kcomedilib/kcomedilib_main.c 	insn.chanspec = CR_PACK(chan, 0, 0);
chan               52 drivers/staging/comedi/range.c 	int subd, chan;
chan               59 drivers/staging/comedi/range.c 	chan = (it.range_type >> 16) & 0xff;
chan               69 drivers/staging/comedi/range.c 		if (chan >= s->n_chan)
chan               71 drivers/staging/comedi/range.c 		lr = s->range_table_list[chan];
chan              113 drivers/staging/comedi/range.c 	int chan, range_len, i;
chan              117 drivers/staging/comedi/range.c 		chan = CR_CHAN(chanspec);
chan              120 drivers/staging/comedi/range.c 		else if (s->range_table_list && chan < s->n_chan)
chan              121 drivers/staging/comedi/range.c 			range_len = s->range_table_list[chan]->length;
chan              124 drivers/staging/comedi/range.c 		if (chan >= s->n_chan ||
chan              128 drivers/staging/comedi/range.c 				 i, chanspec, chan, range_len);
chan              429 drivers/staging/fbtft/fbtft-core.c static unsigned int chan_to_field(unsigned int chan, struct fb_bitfield *bf)
chan              431 drivers/staging/fbtft/fbtft-core.c 	chan &= 0xffff;
chan              432 drivers/staging/fbtft/fbtft-core.c 	chan >>= 16 - bf->length;
chan              433 drivers/staging/fbtft/fbtft-core.c 	return chan << bf->offset;
chan              151 drivers/staging/iio/accel/adis16203.c 			       struct iio_chan_spec const *chan,
chan              158 drivers/staging/iio/accel/adis16203.c 	u8 addr = adis16203_addresses[chan->scan_index];
chan              164 drivers/staging/iio/accel/adis16203.c 			      struct iio_chan_spec const *chan,
chan              175 drivers/staging/iio/accel/adis16203.c 		return adis_single_conversion(indio_dev, chan,
chan              178 drivers/staging/iio/accel/adis16203.c 		switch (chan->type) {
chan              180 drivers/staging/iio/accel/adis16203.c 			if (chan->channel == 0) {
chan              203 drivers/staging/iio/accel/adis16203.c 		addr = adis16203_addresses[chan->scan_index];
chan              246 drivers/staging/iio/accel/adis16240.c 			      struct iio_chan_spec const *chan,
chan              257 drivers/staging/iio/accel/adis16240.c 		return adis_single_conversion(indio_dev, chan,
chan              260 drivers/staging/iio/accel/adis16240.c 		switch (chan->type) {
chan              262 drivers/staging/iio/accel/adis16240.c 			if (chan->channel == 0) {
chan              288 drivers/staging/iio/accel/adis16240.c 		addr = adis16240_addresses[chan->scan_index][0];
chan              295 drivers/staging/iio/accel/adis16240.c 		addr = adis16240_addresses[chan->scan_index][1];
chan              306 drivers/staging/iio/accel/adis16240.c 			       struct iio_chan_spec const *chan,
chan              316 drivers/staging/iio/accel/adis16240.c 		addr = adis16240_addresses[chan->scan_index][0];
chan              551 drivers/staging/iio/adc/ad7192.c 			   struct iio_chan_spec const *chan,
chan              561 drivers/staging/iio/adc/ad7192.c 		return ad_sigma_delta_single_conversion(indio_dev, chan, val);
chan              563 drivers/staging/iio/adc/ad7192.c 		switch (chan->type) {
chan              579 drivers/staging/iio/adc/ad7192.c 			*val = -(1 << (chan->scan_type.realbits - 1));
chan              583 drivers/staging/iio/adc/ad7192.c 		if (chan->type == IIO_TEMP)
chan              600 drivers/staging/iio/adc/ad7192.c 			    struct iio_chan_spec const *chan,
chan              661 drivers/staging/iio/adc/ad7192.c 				    struct iio_chan_spec const *chan,
chan              677 drivers/staging/iio/adc/ad7192.c 			     struct iio_chan_spec const *chan,
chan              748 drivers/staging/iio/adc/ad7192.c 	struct iio_chan_spec *chan;
chan              762 drivers/staging/iio/adc/ad7192.c 	chan = devm_kcalloc(indio_dev->dev.parent, indio_dev->num_channels,
chan              763 drivers/staging/iio/adc/ad7192.c 			    sizeof(*chan), GFP_KERNEL);
chan              764 drivers/staging/iio/adc/ad7192.c 	if (!chan)
chan              767 drivers/staging/iio/adc/ad7192.c 	indio_dev->channels = chan;
chan              770 drivers/staging/iio/adc/ad7192.c 		*chan = channels[i];
chan              771 drivers/staging/iio/adc/ad7192.c 		chan->info_mask_shared_by_all |=
chan              773 drivers/staging/iio/adc/ad7192.c 		if (chan->type != IIO_TEMP)
chan              774 drivers/staging/iio/adc/ad7192.c 			chan->info_mask_shared_by_type_available |=
chan              776 drivers/staging/iio/adc/ad7192.c 		chan++;
chan              503 drivers/staging/iio/adc/ad7280a.c static void ad7280_voltage_channel_init(struct iio_chan_spec *chan, int i)
chan              505 drivers/staging/iio/adc/ad7280a.c 	chan->type = IIO_VOLTAGE;
chan              506 drivers/staging/iio/adc/ad7280a.c 	chan->differential = 1;
chan              507 drivers/staging/iio/adc/ad7280a.c 	chan->channel = i;
chan              508 drivers/staging/iio/adc/ad7280a.c 	chan->channel2 = chan->channel + 1;
chan              511 drivers/staging/iio/adc/ad7280a.c static void ad7280_temp_channel_init(struct iio_chan_spec *chan, int i)
chan              513 drivers/staging/iio/adc/ad7280a.c 	chan->type = IIO_TEMP;
chan              514 drivers/staging/iio/adc/ad7280a.c 	chan->channel = i;
chan              517 drivers/staging/iio/adc/ad7280a.c static void ad7280_common_fields_init(struct iio_chan_spec *chan, int addr,
chan              520 drivers/staging/iio/adc/ad7280a.c 	chan->indexed = 1;
chan              521 drivers/staging/iio/adc/ad7280a.c 	chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              522 drivers/staging/iio/adc/ad7280a.c 	chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
chan              523 drivers/staging/iio/adc/ad7280a.c 	chan->address = addr;
chan              524 drivers/staging/iio/adc/ad7280a.c 	chan->scan_index = cnt;
chan              525 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.sign = 'u';
chan              526 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.realbits = 12;
chan              527 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.storagebits = 32;
chan              530 drivers/staging/iio/adc/ad7280a.c static void ad7280_total_voltage_channel_init(struct iio_chan_spec *chan,
chan              533 drivers/staging/iio/adc/ad7280a.c 	chan->type = IIO_VOLTAGE;
chan              534 drivers/staging/iio/adc/ad7280a.c 	chan->differential = 1;
chan              535 drivers/staging/iio/adc/ad7280a.c 	chan->channel = 0;
chan              536 drivers/staging/iio/adc/ad7280a.c 	chan->channel2 = dev * AD7280A_CELLS_PER_DEV;
chan              537 drivers/staging/iio/adc/ad7280a.c 	chan->address = AD7280A_ALL_CELLS;
chan              538 drivers/staging/iio/adc/ad7280a.c 	chan->indexed = 1;
chan              539 drivers/staging/iio/adc/ad7280a.c 	chan->info_mask_separate = BIT(IIO_CHAN_INFO_RAW);
chan              540 drivers/staging/iio/adc/ad7280a.c 	chan->info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE);
chan              541 drivers/staging/iio/adc/ad7280a.c 	chan->scan_index = cnt;
chan              542 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.sign = 'u';
chan              543 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.realbits = 32;
chan              544 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.storagebits = 32;
chan              547 drivers/staging/iio/adc/ad7280a.c static void ad7280_timestamp_channel_init(struct iio_chan_spec *chan, int cnt)
chan              549 drivers/staging/iio/adc/ad7280a.c 	chan->type = IIO_TIMESTAMP;
chan              550 drivers/staging/iio/adc/ad7280a.c 	chan->channel = -1;
chan              551 drivers/staging/iio/adc/ad7280a.c 	chan->scan_index = cnt;
chan              552 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.sign = 's';
chan              553 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.realbits = 64;
chan              554 drivers/staging/iio/adc/ad7280a.c 	chan->scan_type.storagebits = 64;
chan              560 drivers/staging/iio/adc/ad7280a.c 	struct iio_chan_spec *chan;
chan              563 drivers/staging/iio/adc/ad7280a.c 		chan = &st->channels[*cnt];
chan              567 drivers/staging/iio/adc/ad7280a.c 			ad7280_voltage_channel_init(chan, i);
chan              570 drivers/staging/iio/adc/ad7280a.c 			ad7280_temp_channel_init(chan, i);
chan              574 drivers/staging/iio/adc/ad7280a.c 		ad7280_common_fields_init(chan, addr, *cnt);
chan              866 drivers/staging/iio/adc/ad7280a.c 			   struct iio_chan_spec const *chan,
chan              877 drivers/staging/iio/adc/ad7280a.c 		if (chan->address == AD7280A_ALL_CELLS)
chan              880 drivers/staging/iio/adc/ad7280a.c 			ret = ad7280_read_channel(st, chan->address >> 8,
chan              881 drivers/staging/iio/adc/ad7280a.c 						  chan->address & 0xFF);
chan              891 drivers/staging/iio/adc/ad7280a.c 		if ((chan->address & 0xFF) <= AD7280A_CELL_VOLTAGE_6)
chan              101 drivers/staging/iio/cdc/ad7150.c 			   struct iio_chan_spec const *chan,
chan              108 drivers/staging/iio/cdc/ad7150.c 	int channel = chan->channel;
chan              131 drivers/staging/iio/cdc/ad7150.c 				    const struct iio_chan_spec *chan,
chan              171 drivers/staging/iio/cdc/ad7150.c 				     unsigned int chan,
chan              182 drivers/staging/iio/cdc/ad7150.c 	event_code = IIO_UNMOD_EVENT_CODE(IIO_CAPACITANCE, chan, type, dir);
chan              190 drivers/staging/iio/cdc/ad7150.c 		value = chip->threshold[rising][chan];
chan              192 drivers/staging/iio/cdc/ad7150.c 						 ad7150_addresses[chan][3],
chan              195 drivers/staging/iio/cdc/ad7150.c 		sens = chip->mag_sensitivity[rising][chan];
chan              196 drivers/staging/iio/cdc/ad7150.c 		timeout = chip->mag_timeout[rising][chan];
chan              199 drivers/staging/iio/cdc/ad7150.c 		sens = chip->thresh_sensitivity[rising][chan];
chan              200 drivers/staging/iio/cdc/ad7150.c 		timeout = chip->thresh_timeout[rising][chan];
chan              206 drivers/staging/iio/cdc/ad7150.c 					ad7150_addresses[chan][4],
chan              211 drivers/staging/iio/cdc/ad7150.c 					ad7150_addresses[chan][5],
chan              216 drivers/staging/iio/cdc/ad7150.c 				     const struct iio_chan_spec *chan,
chan              230 drivers/staging/iio/cdc/ad7150.c 	event_code = IIO_UNMOD_EVENT_CODE(chan->type, chan->channel, type, dir);
chan              276 drivers/staging/iio/cdc/ad7150.c 	ret = ad7150_write_event_params(indio_dev, chan->channel, type, dir);
chan              284 drivers/staging/iio/cdc/ad7150.c 				   const struct iio_chan_spec *chan,
chan              296 drivers/staging/iio/cdc/ad7150.c 		*val = chip->mag_sensitivity[rising][chan->channel];
chan              299 drivers/staging/iio/cdc/ad7150.c 		*val = chip->thresh_sensitivity[rising][chan->channel];
chan              302 drivers/staging/iio/cdc/ad7150.c 		*val = chip->threshold[rising][chan->channel];
chan              310 drivers/staging/iio/cdc/ad7150.c 				    const struct iio_chan_spec *chan,
chan              323 drivers/staging/iio/cdc/ad7150.c 		chip->mag_sensitivity[rising][chan->channel] = val;
chan              326 drivers/staging/iio/cdc/ad7150.c 		chip->thresh_sensitivity[rising][chan->channel] = val;
chan              329 drivers/staging/iio/cdc/ad7150.c 		chip->threshold[rising][chan->channel] = val;
chan              337 drivers/staging/iio/cdc/ad7150.c 	ret = ad7150_write_event_params(indio_dev, chan->channel, type, dir);
chan              354 drivers/staging/iio/cdc/ad7150.c 	int chan = IIO_EVENT_CODE_EXTRACT_CHAN(this_attr->address);
chan              360 drivers/staging/iio/cdc/ad7150.c 		value = chip->mag_timeout[rising][chan];
chan              363 drivers/staging/iio/cdc/ad7150.c 		value = chip->thresh_timeout[rising][chan];
chan              380 drivers/staging/iio/cdc/ad7150.c 	int chan = IIO_EVENT_CODE_EXTRACT_CHAN(this_attr->address);
chan              398 drivers/staging/iio/cdc/ad7150.c 		chip->mag_timeout[rising][chan] = data;
chan              401 drivers/staging/iio/cdc/ad7150.c 		chip->thresh_timeout[rising][chan] = data;
chan              408 drivers/staging/iio/cdc/ad7150.c 	ret = ad7150_write_event_params(indio_dev, chan, type, dir);
chan              418 drivers/staging/iio/cdc/ad7150.c #define AD7150_TIMEOUT(chan, type, dir, ev_type, ev_dir)		\
chan              419 drivers/staging/iio/cdc/ad7150.c 	IIO_DEVICE_ATTR(in_capacitance##chan##_##type##_##dir##_timeout, \
chan              424 drivers/staging/iio/cdc/ad7150.c 				     chan,				\
chan              219 drivers/staging/iio/cdc/ad7746.c 				 struct iio_chan_spec const *chan)
chan              225 drivers/staging/iio/cdc/ad7746.c 	switch (chan->type) {
chan              227 drivers/staging/iio/cdc/ad7746.c 		cap_setup = (chan->address & 0xFF) | AD7746_CAPSETUP_CAPEN;
chan              233 drivers/staging/iio/cdc/ad7746.c 		if (chip->capdac_set != chan->channel) {
chan              236 drivers/staging/iio/cdc/ad7746.c 				chip->capdac[chan->channel][0]);
chan              241 drivers/staging/iio/cdc/ad7746.c 				chip->capdac[chan->channel][1]);
chan              245 drivers/staging/iio/cdc/ad7746.c 			chip->capdac_set = chan->channel;
chan              250 drivers/staging/iio/cdc/ad7746.c 		vt_setup = (chan->address & 0xFF) | AD7746_VTSETUP_VTEN;
chan              421 drivers/staging/iio/cdc/ad7746.c 			    struct iio_chan_spec const *chan,
chan              440 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              484 drivers/staging/iio/cdc/ad7746.c 		chip->capdac[chan->channel][chan->differential] = val > 0 ?
chan              489 drivers/staging/iio/cdc/ad7746.c 						chip->capdac[chan->channel][0]);
chan              494 drivers/staging/iio/cdc/ad7746.c 						chip->capdac[chan->channel][1]);
chan              498 drivers/staging/iio/cdc/ad7746.c 		chip->capdac_set = chan->channel;
chan              508 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              529 drivers/staging/iio/cdc/ad7746.c 			   struct iio_chan_spec const *chan,
chan              542 drivers/staging/iio/cdc/ad7746.c 		ret = ad7746_select_channel(indio_dev, chan);
chan              557 drivers/staging/iio/cdc/ad7746.c 						    chan->address >> 8, 3,
chan              565 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              574 drivers/staging/iio/cdc/ad7746.c 			if (chan->channel == 1) /* supply_raw*/
chan              584 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              615 drivers/staging/iio/cdc/ad7746.c 		*val = AD7746_CAPDAC_DACP(chip->capdac[chan->channel]
chan              616 drivers/staging/iio/cdc/ad7746.c 					  [chan->differential]) * 338646;
chan              621 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              641 drivers/staging/iio/cdc/ad7746.c 		switch (chan->type) {
chan              499 drivers/staging/iio/impedance-analyzer/ad5933.c 			   struct iio_chan_spec const *chan,
chan              460 drivers/staging/iio/resolver/ad2s1210.c 			     struct iio_chan_spec const *chan,
chan              476 drivers/staging/iio/resolver/ad2s1210.c 	switch (chan->type) {
chan              493 drivers/staging/iio/resolver/ad2s1210.c 	switch (chan->type) {
chan               32 drivers/staging/isdn/hysdn/hysdn_sched.c 	       unsigned short chan)
chan               35 drivers/staging/isdn/hysdn/hysdn_sched.c 	switch (chan) {
chan               57 drivers/staging/isdn/hysdn/hysdn_sched.c 		printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len);
chan               75 drivers/staging/isdn/hysdn/hysdn_sched.c 	       unsigned short volatile *len, unsigned short volatile *chan,
chan               89 drivers/staging/isdn/hysdn/hysdn_sched.c 			*chan = card->async_channel;
chan               99 drivers/staging/isdn/hysdn/hysdn_sched.c 		*chan = CHAN_ERRLOG;	/* and channel */
chan              107 drivers/staging/isdn/hysdn/hysdn_sched.c 		*chan = CHAN_ERRLOG;	/* and channel */
chan              119 drivers/staging/isdn/hysdn/hysdn_sched.c 			*chan = CHAN_NDIS_DATA;
chan              132 drivers/staging/isdn/hysdn/hysdn_sched.c 			*chan = CHAN_CAPI;
chan              150 drivers/staging/isdn/hysdn/hysdn_sched.c hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
chan              156 drivers/staging/isdn/hysdn/hysdn_sched.c 		hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
chan              171 drivers/staging/isdn/hysdn/hysdn_sched.c 	card->async_channel = chan;
chan              162 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan chan[1];
chan              166 drivers/staging/mt7621-dma/mtk-hsdma.c 		struct mtk_hsdma_chan *chan)
chan              168 drivers/staging/mt7621-dma/mtk-hsdma.c 	return container_of(chan->vchan.chan.device, struct mtk_hsdam_engine,
chan              174 drivers/staging/mt7621-dma/mtk-hsdma.c 	return container_of(c, struct mtk_hsdma_chan, vchan.chan);
chan              195 drivers/staging/mt7621-dma/mtk-hsdma.c 				 struct mtk_hsdma_chan *chan)
chan              197 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->tx_idx = 0;
chan              198 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->rx_idx = HSDMA_DESCS_NUM - 1;
chan              200 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_TX_CTX, chan->tx_idx);
chan              201 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_RX_CRX, chan->rx_idx);
chan              204 drivers/staging/mt7621-dma/mtk-hsdma.c 			0x1 << (chan->id + HSDMA_RST_TX_SHIFT));
chan              206 drivers/staging/mt7621-dma/mtk-hsdma.c 			0x1 << (chan->id + HSDMA_RST_RX_SHIFT));
chan              233 drivers/staging/mt7621-dma/mtk-hsdma.c 			    struct mtk_hsdma_chan *chan)
chan              240 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->tx_idx, chan->rx_idx);
chan              243 drivers/staging/mt7621-dma/mtk-hsdma.c 		tx_desc = &chan->tx_ring[i];
chan              244 drivers/staging/mt7621-dma/mtk-hsdma.c 		rx_desc = &chan->rx_ring[i];
chan              254 drivers/staging/mt7621-dma/mtk-hsdma.c 			    struct mtk_hsdma_chan *chan)
chan              266 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->tx_ring[i].addr0 = 0;
chan              267 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->tx_ring[i].flags = HSDMA_DESC_LS0 | HSDMA_DESC_DONE;
chan              270 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->rx_ring[i].addr0 = 0;
chan              271 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->rx_ring[i].flags = 0;
chan              275 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_reset_chan(hsdma, chan);
chan              286 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c);
chan              287 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdam_engine *hsdma = mtk_hsdma_chan_get_dev(chan);
chan              291 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_lock_bh(&chan->vchan.lock);
chan              292 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->desc = NULL;
chan              293 drivers/staging/mt7621-dma/mtk-hsdma.c 	clear_bit(chan->id, &hsdma->chan_issued);
chan              294 drivers/staging/mt7621-dma/mtk-hsdma.c 	vchan_get_all_descriptors(&chan->vchan, &head);
chan              295 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_unlock_bh(&chan->vchan.lock);
chan              297 drivers/staging/mt7621-dma/mtk-hsdma.c 	vchan_dma_desc_free_list(&chan->vchan, &head);
chan              304 drivers/staging/mt7621-dma/mtk-hsdma.c 			hsdma_dump_desc(hsdma, chan);
chan              305 drivers/staging/mt7621-dma/mtk-hsdma.c 			mtk_hsdma_reset(hsdma, chan);
chan              316 drivers/staging/mt7621-dma/mtk-hsdma.c 				    struct mtk_hsdma_chan *chan)
chan              325 drivers/staging/mt7621-dma/mtk-hsdma.c 	sg = &chan->desc->sg[0];
chan              327 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->desc->num_sgs = DIV_ROUND_UP(len, HSDMA_MAX_PLEN);
chan              331 drivers/staging/mt7621-dma/mtk-hsdma.c 	for (i = 0; i < chan->desc->num_sgs; i++) {
chan              332 drivers/staging/mt7621-dma/mtk-hsdma.c 		tx_desc = &chan->tx_ring[chan->tx_idx];
chan              347 drivers/staging/mt7621-dma/mtk-hsdma.c 			chan->tx_idx = HSDMA_NEXT_DESC(chan->tx_idx);
chan              359 drivers/staging/mt7621-dma/mtk-hsdma.c 	rx_idx = HSDMA_NEXT_DESC(chan->rx_idx);
chan              362 drivers/staging/mt7621-dma/mtk-hsdma.c 	for (i = 0; i < chan->desc->num_sgs; i++) {
chan              363 drivers/staging/mt7621-dma/mtk-hsdma.c 		rx_desc = &chan->rx_ring[rx_idx];
chan              381 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_TX_CTX, chan->tx_idx);
chan              386 drivers/staging/mt7621-dma/mtk-hsdma.c static int gdma_next_desc(struct mtk_hsdma_chan *chan)
chan              390 drivers/staging/mt7621-dma/mtk-hsdma.c 	vdesc = vchan_next_desc(&chan->vchan);
chan              392 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->desc = NULL;
chan              395 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->desc = to_mtk_hsdma_desc(vdesc);
chan              396 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->next_sg = 0;
chan              402 drivers/staging/mt7621-dma/mtk-hsdma.c 				struct mtk_hsdma_chan *chan)
chan              408 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_lock_bh(&chan->vchan.lock);
chan              409 drivers/staging/mt7621-dma/mtk-hsdma.c 	desc = chan->desc;
chan              411 drivers/staging/mt7621-dma/mtk-hsdma.c 		if (chan->next_sg == desc->num_sgs) {
chan              414 drivers/staging/mt7621-dma/mtk-hsdma.c 			chan_issued = gdma_next_desc(chan);
chan              421 drivers/staging/mt7621-dma/mtk-hsdma.c 		set_bit(chan->id, &hsdma->chan_issued);
chan              422 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_unlock_bh(&chan->vchan.lock);
chan              446 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c);
chan              447 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdam_engine *hsdma = mtk_hsdma_chan_get_dev(chan);
chan              449 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_lock_bh(&chan->vchan.lock);
chan              450 drivers/staging/mt7621-dma/mtk-hsdma.c 	if (vchan_issue_pending(&chan->vchan) && !chan->desc) {
chan              451 drivers/staging/mt7621-dma/mtk-hsdma.c 		if (gdma_next_desc(chan)) {
chan              452 drivers/staging/mt7621-dma/mtk-hsdma.c 			set_bit(chan->id, &hsdma->chan_issued);
chan              458 drivers/staging/mt7621-dma/mtk-hsdma.c 	spin_unlock_bh(&chan->vchan.lock);
chan              465 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan = to_mtk_hsdma_chan(c);
chan              481 drivers/staging/mt7621-dma/mtk-hsdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              503 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan;
chan              506 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan = &hsdma->chan[0];
chan              507 drivers/staging/mt7621-dma/mtk-hsdma.c 		if (chan->desc)
chan              508 drivers/staging/mt7621-dma/mtk-hsdma.c 			mtk_hsdma_start_transfer(hsdma, chan);
chan              516 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan;
chan              519 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan = &hsdma->chan[0];
chan              520 drivers/staging/mt7621-dma/mtk-hsdma.c 	next_idx = HSDMA_NEXT_DESC(chan->rx_idx);
chan              527 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->next_sg += cnt;
chan              528 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->rx_idx = (chan->rx_idx + cnt) & HSDMA_DESCS_MASK;
chan              532 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_RX_CRX, chan->rx_idx);
chan              534 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_chan_done(hsdma, chan);
chan              546 drivers/staging/mt7621-dma/mtk-hsdma.c 				struct mtk_hsdma_chan *chan)
chan              550 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->tx_ring = dma_alloc_coherent(hsdma->ddev.dev,
chan              551 drivers/staging/mt7621-dma/mtk-hsdma.c 			2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring),
chan              552 drivers/staging/mt7621-dma/mtk-hsdma.c 			&chan->desc_addr, GFP_ATOMIC | __GFP_ZERO);
chan              553 drivers/staging/mt7621-dma/mtk-hsdma.c 	if (!chan->tx_ring)
chan              556 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->rx_ring = &chan->tx_ring[HSDMA_DESCS_NUM];
chan              560 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->tx_ring[i].flags = HSDMA_DESC_LS0 | HSDMA_DESC_DONE;
chan              568 drivers/staging/mt7621-dma/mtk-hsdma.c 				struct mtk_hsdma_chan *chan)
chan              570 drivers/staging/mt7621-dma/mtk-hsdma.c 	if (chan->tx_ring) {
chan              572 drivers/staging/mt7621-dma/mtk-hsdma.c 				2 * HSDMA_DESCS_NUM * sizeof(*chan->tx_ring),
chan              573 drivers/staging/mt7621-dma/mtk-hsdma.c 				chan->tx_ring, chan->desc_addr);
chan              574 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->tx_ring = NULL;
chan              575 drivers/staging/mt7621-dma/mtk-hsdma.c 		chan->rx_ring = NULL;
chan              581 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan;
chan              586 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan = &hsdma->chan[0];
chan              587 drivers/staging/mt7621-dma/mtk-hsdma.c 	ret = mtk_hsdam_alloc_desc(hsdma, chan);
chan              592 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_TX_BASE, chan->desc_addr);
chan              595 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_write(hsdma, HSDMA_REG_RX_BASE, chan->desc_addr +
chan              599 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_reset_chan(hsdma, chan);
chan              620 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan;
chan              629 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan = &hsdma->chan[0];
chan              630 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdam_free_desc(hsdma, chan);
chan              639 drivers/staging/mt7621-dma/mtk-hsdma.c 	mtk_hsdma_reset_chan(hsdma, chan);
chan              650 drivers/staging/mt7621-dma/mtk-hsdma.c 	struct mtk_hsdma_chan *chan;
chan              702 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan = &hsdma->chan[0];
chan              703 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->id = 0;
chan              704 drivers/staging/mt7621-dma/mtk-hsdma.c 	chan->vchan.desc_free = mtk_hsdma_desc_free;
chan              705 drivers/staging/mt7621-dma/mtk-hsdma.c 	vchan_init(&chan->vchan, dd);
chan              128 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan chan[];
chan              135 drivers/staging/ralink-gdma/ralink-gdma.c 	int (*start_transfer)(struct gdma_dmaengine_chan *chan);
chan              139 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan)
chan              141 drivers/staging/ralink-gdma/ralink-gdma.c 	return container_of(chan->vchan.chan.device, struct gdma_dma_dev,
chan              147 drivers/staging/ralink-gdma/ralink-gdma.c 	return container_of(c, struct gdma_dmaengine_chan, vchan.chan);
chan              184 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              185 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
chan              198 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->slave_id = config->slave_id;
chan              199 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->fifo_addr = config->dst_addr;
chan              200 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->burst_size = gdma_dma_maxburst(config->dst_maxburst);
chan              207 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->slave_id = config->slave_id;
chan              208 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->fifo_addr = config->src_addr;
chan              209 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->burst_size = gdma_dma_maxburst(config->src_maxburst);
chan              222 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              223 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
chan              228 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              229 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->desc = NULL;
chan              230 drivers/staging/ralink-gdma/ralink-gdma.c 	clear_bit(chan->id, &dma_dev->chan_issued);
chan              231 drivers/staging/ralink-gdma/ralink-gdma.c 	vchan_get_all_descriptors(&chan->vchan, &head);
chan              232 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              234 drivers/staging/ralink-gdma/ralink-gdma.c 	vchan_dma_desc_free_list(&chan->vchan, &head);
chan              238 drivers/staging/ralink-gdma/ralink-gdma.c 	while (gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)) &
chan              242 drivers/staging/ralink-gdma/ralink-gdma.c 				chan->id);
chan              244 drivers/staging/ralink-gdma/ralink-gdma.c 			gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), 0);
chan              253 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->id, i);
chan              270 drivers/staging/ralink-gdma/ralink-gdma.c static int rt305x_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
chan              272 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
chan              278 drivers/staging/ralink-gdma/ralink-gdma.c 	ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
chan              281 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->id, ctrl0);
chan              282 drivers/staging/ralink-gdma/ralink-gdma.c 		rt305x_dump_reg(dma_dev, chan->id);
chan              286 drivers/staging/ralink-gdma/ralink-gdma.c 	sg = &chan->desc->sg[chan->next_sg];
chan              287 drivers/staging/ralink-gdma/ralink-gdma.c 	if (chan->desc->direction == DMA_MEM_TO_DEV) {
chan              289 drivers/staging/ralink-gdma/ralink-gdma.c 		dst_addr = chan->fifo_addr;
chan              292 drivers/staging/ralink-gdma/ralink-gdma.c 			(chan->slave_id << GDMA_RT305X_CTRL0_DST_REQ_SHIFT);
chan              293 drivers/staging/ralink-gdma/ralink-gdma.c 	} else if (chan->desc->direction == DMA_DEV_TO_MEM) {
chan              294 drivers/staging/ralink-gdma/ralink-gdma.c 		src_addr = chan->fifo_addr;
chan              297 drivers/staging/ralink-gdma/ralink-gdma.c 			(chan->slave_id << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) |
chan              299 drivers/staging/ralink-gdma/ralink-gdma.c 	} else if (chan->desc->direction == DMA_MEM_TO_MEM) {
chan              311 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->desc->direction);
chan              316 drivers/staging/ralink-gdma/ralink-gdma.c 		 (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) |
chan              318 drivers/staging/ralink-gdma/ralink-gdma.c 	ctrl1 = chan->id << GDMA_REG_CTRL1_NEXT_SHIFT;
chan              320 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->next_sg++;
chan              321 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr);
chan              322 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr);
chan              323 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1);
chan              327 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0);
chan              347 drivers/staging/ralink-gdma/ralink-gdma.c static int rt3883_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
chan              349 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
chan              355 drivers/staging/ralink-gdma/ralink-gdma.c 	ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
chan              358 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->id, ctrl0);
chan              359 drivers/staging/ralink-gdma/ralink-gdma.c 		rt3883_dump_reg(dma_dev, chan->id);
chan              363 drivers/staging/ralink-gdma/ralink-gdma.c 	sg = &chan->desc->sg[chan->next_sg];
chan              364 drivers/staging/ralink-gdma/ralink-gdma.c 	if (chan->desc->direction == DMA_MEM_TO_DEV) {
chan              366 drivers/staging/ralink-gdma/ralink-gdma.c 		dst_addr = chan->fifo_addr;
chan              369 drivers/staging/ralink-gdma/ralink-gdma.c 			(chan->slave_id << GDMA_REG_CTRL1_DST_REQ_SHIFT);
chan              370 drivers/staging/ralink-gdma/ralink-gdma.c 	} else if (chan->desc->direction == DMA_DEV_TO_MEM) {
chan              371 drivers/staging/ralink-gdma/ralink-gdma.c 		src_addr = chan->fifo_addr;
chan              374 drivers/staging/ralink-gdma/ralink-gdma.c 		ctrl1 = (chan->slave_id << GDMA_REG_CTRL1_SRC_REQ_SHIFT) |
chan              377 drivers/staging/ralink-gdma/ralink-gdma.c 	} else if (chan->desc->direction == DMA_MEM_TO_MEM) {
chan              386 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->desc->direction);
chan              391 drivers/staging/ralink-gdma/ralink-gdma.c 		 (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) |
chan              393 drivers/staging/ralink-gdma/ralink-gdma.c 	ctrl1 |= chan->id << GDMA_REG_CTRL1_NEXT_SHIFT;
chan              395 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->next_sg++;
chan              396 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr);
chan              397 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr);
chan              398 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1);
chan              402 drivers/staging/ralink-gdma/ralink-gdma.c 	gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0);
chan              408 drivers/staging/ralink-gdma/ralink-gdma.c 				      struct gdma_dmaengine_chan *chan)
chan              410 drivers/staging/ralink-gdma/ralink-gdma.c 	return dma_dev->data->start_transfer(chan);
chan              413 drivers/staging/ralink-gdma/ralink-gdma.c static int gdma_next_desc(struct gdma_dmaengine_chan *chan)
chan              417 drivers/staging/ralink-gdma/ralink-gdma.c 	vdesc = vchan_next_desc(&chan->vchan);
chan              419 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->desc = NULL;
chan              422 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->desc = to_gdma_dma_desc(vdesc);
chan              423 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->next_sg = 0;
chan              429 drivers/staging/ralink-gdma/ralink-gdma.c 			      struct gdma_dmaengine_chan *chan)
chan              436 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              437 drivers/staging/ralink-gdma/ralink-gdma.c 	desc = chan->desc;
chan              441 drivers/staging/ralink-gdma/ralink-gdma.c 			if (chan->next_sg == desc->num_sgs)
chan              442 drivers/staging/ralink-gdma/ralink-gdma.c 				chan->next_sg = 0;
chan              445 drivers/staging/ralink-gdma/ralink-gdma.c 			desc->residue -= desc->sg[chan->next_sg - 1].len;
chan              446 drivers/staging/ralink-gdma/ralink-gdma.c 			if (chan->next_sg == desc->num_sgs) {
chan              449 drivers/staging/ralink-gdma/ralink-gdma.c 				chan_issued = gdma_next_desc(chan);
chan              456 drivers/staging/ralink-gdma/ralink-gdma.c 			chan->id);
chan              459 drivers/staging/ralink-gdma/ralink-gdma.c 		set_bit(chan->id, &dma_dev->chan_issued);
chan              460 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              480 drivers/staging/ralink-gdma/ralink-gdma.c 			gdma_dma_chan_irq(dma_dev, &dma_dev->chan[i]);
chan              496 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              497 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
chan              500 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              501 drivers/staging/ralink-gdma/ralink-gdma.c 	if (vchan_issue_pending(&chan->vchan) && !chan->desc) {
chan              502 drivers/staging/ralink-gdma/ralink-gdma.c 		if (gdma_next_desc(chan)) {
chan              503 drivers/staging/ralink-gdma/ralink-gdma.c 			set_bit(chan->id, &dma_dev->chan_issued);
chan              507 drivers/staging/ralink-gdma/ralink-gdma.c 				chan->id);
chan              510 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              518 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              554 drivers/staging/ralink-gdma/ralink-gdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              565 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              573 drivers/staging/ralink-gdma/ralink-gdma.c 	chan->burst_size = gdma_dma_maxburst(len >> 2);
chan              601 drivers/staging/ralink-gdma/ralink-gdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              609 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              648 drivers/staging/ralink-gdma/ralink-gdma.c 	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
chan              659 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
chan              669 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_lock_irqsave(&chan->vchan.lock, flags);
chan              670 drivers/staging/ralink-gdma/ralink-gdma.c 	desc = chan->desc;
chan              679 drivers/staging/ralink-gdma/ralink-gdma.c 				((chan->next_sg - 1) * desc->sg[0].len);
chan              683 drivers/staging/ralink-gdma/ralink-gdma.c 		vdesc = vchan_find_desc(&chan->vchan, cookie);
chan              687 drivers/staging/ralink-gdma/ralink-gdma.c 	spin_unlock_irqrestore(&chan->vchan.lock, flags);
chan              707 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan;
chan              727 drivers/staging/ralink-gdma/ralink-gdma.c 			chan = &dma_dev->chan[i];
chan              728 drivers/staging/ralink-gdma/ralink-gdma.c 			if (chan->desc) {
chan              730 drivers/staging/ralink-gdma/ralink-gdma.c 				gdma_start_transfer(dma_dev, chan);
chan              734 drivers/staging/ralink-gdma/ralink-gdma.c 					chan->id);
chan              795 drivers/staging/ralink-gdma/ralink-gdma.c 	struct gdma_dmaengine_chan *chan;
chan              815 drivers/staging/ralink-gdma/ralink-gdma.c 			       struct_size(dma_dev, chan, data->chancnt),
chan              864 drivers/staging/ralink-gdma/ralink-gdma.c 		chan = &dma_dev->chan[i];
chan              865 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->id = i;
chan              866 drivers/staging/ralink-gdma/ralink-gdma.c 		chan->vchan.desc_free = gdma_dma_desc_free;
chan              867 drivers/staging/ralink-gdma/ralink-gdma.c 		vchan_init(&chan->vchan, dd);
chan             3919 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 					   u8 chan)
chan             3924 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 		if (channel_set[i].ChannelNum == chan)
chan              815 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c 		rtl92e_set_tx_power(dev, priv->chan);
chan              982 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c 		 priv->chan, priv);
chan              984 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c 	_rtl92e_phy_switch_channel(dev, priv->chan);
chan             1035 drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c 	priv->chan = channel;
chan              304 drivers/staging/rtl8192e/rtl8192e/rtl_core.c 	priv->chan = ch;
chan              307 drivers/staging/rtl8192e/rtl8192e/rtl_core.c 		priv->rf_set_chan(dev, priv->chan);
chan              906 drivers/staging/rtl8192e/rtl8192e/rtl_core.c 	priv->chan = 1;
chan             1470 drivers/staging/rtl8192e/rtl8192e/rtl_core.c 				    __func__, priv->chan);
chan              410 drivers/staging/rtl8192e/rtl8192e/rtl_core.h 	short	chan;
chan              331 drivers/staging/rtl8192e/rtllib_softmac_wx.c 	short chan;
chan              341 drivers/staging/rtl8192e/rtllib_softmac_wx.c 	chan = ieee->current_network.channel;
chan              378 drivers/staging/rtl8192e/rtllib_softmac_wx.c 			ieee->set_chan(ieee->dev, chan + 2);
chan              380 drivers/staging/rtl8192e/rtllib_softmac_wx.c 			ieee->set_chan(ieee->dev, chan - 2);
chan              382 drivers/staging/rtl8192e/rtllib_softmac_wx.c 			ieee->set_chan(ieee->dev, chan);
chan              385 drivers/staging/rtl8192e/rtllib_softmac_wx.c 		ieee->set_chan(ieee->dev, chan);
chan              303 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 	short chan;
chan              308 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 	chan = ieee->current_network.channel;
chan              330 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 			ieee->set_chan(ieee->dev, chan + 2);
chan              332 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 			ieee->set_chan(ieee->dev, chan - 2);
chan              334 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 			ieee->set_chan(ieee->dev, chan);
chan              337 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 		ieee->set_chan(ieee->dev, chan);
chan               70 drivers/staging/rtl8192u/r8190_rtl8256.c 					if (priv->chan == 3 || priv->chan == 9)
chan              844 drivers/staging/rtl8192u/r8192U.h 	short chan;
chan              697 drivers/staging/rtl8192u/r8192U_core.c 	priv->chan = ch;
chan              704 drivers/staging/rtl8192u/r8192U_core.c 		priv->rf_set_chan(dev, priv->chan);
chan             2104 drivers/staging/rtl8192u/r8192U_core.c 	priv->chan = 1; /* set to channel 1 */
chan             2795 drivers/staging/rtl8192u/r8192U_core.c 		rtl8192_phy_setTxPower(dev, priv->chan);
chan             1385 drivers/staging/rtl8192u/r819xU_phy.c 		 priv->chan);
chan             1388 drivers/staging/rtl8192u/r819xU_phy.c 	rtl8192_phy_FinishSwChnlNow(dev, priv->chan);
chan             1441 drivers/staging/rtl8192u/r819xU_phy.c 	priv->chan = channel;
chan             1519 drivers/staging/rtl8192u/r819xU_phy.c 		if (priv->chan == 14 && !priv->bcck_in_ch14) {
chan             1522 drivers/staging/rtl8192u/r819xU_phy.c 		} else if (priv->chan != 14 && priv->bcck_in_ch14) {
chan             1550 drivers/staging/rtl8192u/r819xU_phy.c 		if (priv->chan == 14 && !priv->bcck_in_ch14) {
chan             1553 drivers/staging/rtl8192u/r819xU_phy.c 		} else if (priv->chan != 14 && priv->bcck_in_ch14) {
chan              329 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 					   u8 chan)
chan              334 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 		if (channel_set[i].ChannelNum == chan) {
chan             4359 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c 			info.chan = survey_channel;
chan             1270 drivers/staging/rtl8723bs/hal/hal_com.c 			u8 chan = *(u8 *)pValue1;
chan             1271 drivers/staging/rtl8723bs/hal/hal_com.c 			*(s16 *)pValue2 = pHalData->noise[chan];
chan             1274 drivers/staging/rtl8723bs/hal/hal_com.c 				chan, pHalData->noise[chan]);
chan             1324 drivers/staging/rtl8723bs/hal/hal_com.c 				pinfo->chan, pinfo->bPauseDIG, pinfo->IGIValue, pinfo->max_time);
chan             1327 drivers/staging/rtl8723bs/hal/hal_com.c 			pHalData->noise[pinfo->chan] = ODM_InbandNoise_Monitor(podmpriv, pinfo->bPauseDIG, pinfo->IGIValue, pinfo->max_time);
chan             1328 drivers/staging/rtl8723bs/hal/hal_com.c 			DBG_871X("chan_%d, noise = %d (dBm)\n", pinfo->chan, pHalData->noise[pinfo->chan]);
chan              296 drivers/staging/rtl8723bs/include/hal_com.h 	u8 chan;
chan              117 drivers/staging/rtl8723bs/include/ioctl_cfg80211.h #define rtw_cfg80211_ready_on_channel(adapter, cookie, chan, channel_type, duration, gfp)  cfg80211_ready_on_channel((adapter)->rtw_wdev, cookie, chan, duration, gfp)
chan              118 drivers/staging/rtl8723bs/include/ioctl_cfg80211.h #define rtw_cfg80211_remain_on_channel_expired(adapter, cookie, chan, chan_type, gfp) cfg80211_remain_on_channel_expired((adapter)->rtw_wdev, cookie, chan, gfp)
chan              220 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c static int rtw_ieee80211_channel_to_frequency(int chan, int band)
chan              225 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 		if (chan == 14)
chan              227 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c              else if (chan < 14)
chan              228 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 			return 2407 + chan * 5;
chan              425 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 	struct ieee80211_channel *chan;
chan              470 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 	chan = ieee80211_get_channel(wiphy, freq);
chan              471 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 	cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, chan, GFP_ATOMIC);
chan             3092 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 	struct ieee80211_channel *chan = params->chan;
chan             3100 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 	u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
chan             3095 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 						u8 chan = rtw_get_oper_ch(padapter);
chan             3099 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 							chan, pDM_Odm->noise_level.noise[ODM_RF_PATH_A],
chan             4825 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 			info.chan = pmlmeext->cur_channel ;/* rtw_get_oper_ch(padapter); */
chan             4832 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 			rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR,&(info.chan), &(padapter->recvpriv.noise));
chan             4833 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 			DBG_871X("chan:%d, noise_level:%d\n", info.chan, padapter->recvpriv.noise);
chan               45 drivers/staging/rtl8723bs/os_dep/wifi_regd.c static int rtw_ieee80211_channel_to_frequency(int chan, int band)
chan               52 drivers/staging/rtl8723bs/os_dep/wifi_regd.c 	if (chan == 14)
chan               54 drivers/staging/rtl8723bs/os_dep/wifi_regd.c 	else if (chan < 14)
chan               55 drivers/staging/rtl8723bs/os_dep/wifi_regd.c 		return 2407 + chan * 5;
chan              381 drivers/staging/sm750fb/sm750.c static inline unsigned int chan_to_field(unsigned int chan,
chan              384 drivers/staging/sm750fb/sm750.c 	chan &= 0xffff;
chan              385 drivers/staging/sm750fb/sm750.c 	chan >>= 16 - bf->length;
chan              386 drivers/staging/sm750fb/sm750.c 	return chan << bf->offset;
chan             1364 drivers/staging/vt6655/device_main.c 		set_channel(priv, conf->chandef.chan);
chan             1366 drivers/staging/vt6655/device_main.c 		if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
chan             1385 drivers/staging/vt6655/device_main.c 			    conf->chandef.chan->hw_value);
chan             1447 drivers/staging/vt6655/device_main.c 			    conf->chandef.chan->hw_value);
chan               54 drivers/staging/vt6655/dpc.c 	sband = hw->wiphy->bands[hw->conf.chandef.chan->band];
chan               91 drivers/staging/vt6655/dpc.c 	rx_status.band = hw->conf.chandef.chan->band;
chan               94 drivers/staging/vt6655/dpc.c 	rx_status.freq = hw->conf.chandef.chan->center_freq;
chan             1296 drivers/staging/vt6655/rxtx.c 			    priv->hw->conf.chandef.chan->hw_value);
chan               86 drivers/staging/vt6656/dpc.c 	sband = hw->wiphy->bands[hw->conf.chandef.chan->band];
chan              140 drivers/staging/vt6656/dpc.c 	rx_status.band = hw->conf.chandef.chan->band;
chan              143 drivers/staging/vt6656/dpc.c 	rx_status.freq = hw->conf.chandef.chan->center_freq;
chan              686 drivers/staging/vt6656/main_usb.c 		vnt_set_channel(priv, conf->chandef.chan->hw_value);
chan              688 drivers/staging/vt6656/main_usb.c 		if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
chan              701 drivers/staging/vt6656/main_usb.c 				conf->chandef.chan->hw_value);
chan              760 drivers/staging/vt6656/main_usb.c 				conf->chandef.chan->hw_value);
chan              745 drivers/staging/vt6656/rf.c 			u16 hw_value = priv->hw->conf.chandef.chan->hw_value;
chan              126 drivers/staging/vt6656/wcmd.c 				priv->hw->conf.chandef.chan->hw_value);
chan             1742 drivers/staging/wilc1000/wilc_hif.c 			   u32 duration, u16 chan,
chan             1749 drivers/staging/wilc1000/wilc_hif.c 	roc.ch = chan;
chan              217 drivers/staging/wilc1000/wilc_hif.h 			   u32 duration, u16 chan,
chan              215 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	channelnum = ieee80211_frequency_to_channel(chandef->chan->center_freq);
chan             1114 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 			     struct ieee80211_channel *chan,
chan             1131 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	ret = wilc_remain_on_channel(vif, id, duration, chan->hw_value,
chan             1137 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	vif->wilc->op_ch = chan->hw_value;
chan             1139 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	priv->remain_on_ch_params.listen_ch = chan;
chan             1145 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	cfg80211_ready_on_channel(wdev, *cookie, chan, duration, GFP_KERNEL);
chan             1221 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 	struct ieee80211_channel *chan = params->chan;
chan             1258 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 		wilc_set_mac_chnl_num(vif, chan->hw_value);
chan             1259 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 		vif->wilc->op_ch = chan->hw_value;
chan             1269 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 			wilc_set_mac_chnl_num(vif, chan->hw_value);
chan             1270 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 			vif->wilc->op_ch = chan->hw_value;
chan              441 drivers/staging/wlan-ng/cfg80211.c 	int chan = -1;
chan              449 drivers/staging/wlan-ng/cfg80211.c 		chan = ieee80211_frequency_to_channel(channel->center_freq);
chan              452 drivers/staging/wlan-ng/cfg80211.c 						chan);
chan             1139 drivers/staging/wlan-ng/prism2sta.c 		int chan;
chan             1145 drivers/staging/wlan-ng/prism2sta.c 		chan = result->chid - 1;
chan             1147 drivers/staging/wlan-ng/prism2sta.c 		if (chan < 0 || chan >= HFA384x_CHINFORESULT_MAX)
chan             1150 drivers/staging/wlan-ng/prism2sta.c 		chinforesult = &hw->channel_info.results.result[chan];
chan             1151 drivers/staging/wlan-ng/prism2sta.c 		chinforesult->chid = chan;
chan             1157 drivers/staging/wlan-ng/prism2sta.c 			 chan + 1,
chan               42 drivers/thermal/hisi_thermal.c #define HI3660_OFFSET(chan)		((chan) * 0x40)
chan               43 drivers/thermal/hisi_thermal.c #define HI3660_TEMP(chan)		(HI3660_OFFSET(chan) + 0x1C)
chan               44 drivers/thermal/hisi_thermal.c #define HI3660_TH(chan)			(HI3660_OFFSET(chan) + 0x20)
chan               45 drivers/thermal/hisi_thermal.c #define HI3660_LAG(chan)		(HI3660_OFFSET(chan) + 0x28)
chan               46 drivers/thermal/hisi_thermal.c #define HI3660_INT_EN(chan)		(HI3660_OFFSET(chan) + 0x2C)
chan               47 drivers/thermal/hisi_thermal.c #define HI3660_INT_CLR(chan)		(HI3660_OFFSET(chan) + 0x30)
chan              400 drivers/tty/ipwireless/tty.c 				int chan = ipwireless_ppp_channel_index(
chan              403 drivers/tty/ipwireless/tty.c 				if (chan < 0)
chan              405 drivers/tty/ipwireless/tty.c 				if (put_user(chan, (int __user *) arg))
chan              415 drivers/tty/mips_ejtag_fdc.c 					    unsigned int chan)
chan              424 drivers/tty/mips_ejtag_fdc.c 	dport = &priv->ports[chan];
chan              436 drivers/tty/mips_ejtag_fdc.c 			priv->driver_name, chan, word.word,
chan              445 drivers/tty/mips_ejtag_fdc.c 			mips_ejtag_fdc_write(priv, REG_FDTX(chan), word.word);
chan              229 drivers/tty/rocket.c static void sModemReset(CONTROLLER_T * CtlP, int chan, int on);
chan              230 drivers/tty/rocket.c static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on);
chan              426 drivers/tty/rocket.c 		clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan              454 drivers/tty/rocket.c 		clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan              606 drivers/tty/rocket.c init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
chan              614 drivers/tty/rocket.c 	line = SetLineNumber(board, aiop, chan);
chan              631 drivers/tty/rocket.c 	info->chan = chan;
chan              652 drivers/tty/rocket.c 	if (sInitChan(ctlp, &info->channel, aiop, chan) == 0) {
chan              654 drivers/tty/rocket.c 				board, aiop, chan);
chan              990 drivers/tty/rocket.c 	clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan             1007 drivers/tty/rocket.c 	clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan             1263 drivers/tty/rocket.c 		sModemReset(info->ctlp, info->chan, reset);
chan             1265 drivers/tty/rocket.c 		sPCIModemReset(info->ctlp, info->chan, reset);
chan             1405 drivers/tty/rocket.c 	set_bit((info->aiop * 8) + info->chan,
chan             1482 drivers/tty/rocket.c 	clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan             1535 drivers/tty/rocket.c 		set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan             1628 drivers/tty/rocket.c 		set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
chan             1882 drivers/tty/rocket.c 	int num_aiops, aiop, max_num_aiops, num_chan, chan;
chan             2155 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2156 drivers/tty/rocket.c 			init_r_port(i, aiop, chan, dev);
chan             2164 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2165 drivers/tty/rocket.c 			sPCIModemReset(ctlp, chan, 1);
chan             2167 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2168 drivers/tty/rocket.c 			sPCIModemReset(ctlp, chan, 0);
chan             2204 drivers/tty/rocket.c 	int aiop, chan;
chan             2277 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2278 drivers/tty/rocket.c 			init_r_port(i, aiop, chan, NULL);
chan             2284 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2285 drivers/tty/rocket.c 			sModemReset(ctlp, chan, 1);
chan             2287 drivers/tty/rocket.c 		for (chan = 0; chan < num_chan; chan++)
chan             2288 drivers/tty/rocket.c 			sModemReset(ctlp, chan, 0);
chan             3073 drivers/tty/rocket.c static void sModemReset(CONTROLLER_T * CtlP, int chan, int on)
chan             3090 drivers/tty/rocket.c 	sOutB(addr + chan, 0);	/* apply or remove reset */
chan             3098 drivers/tty/rocket.c static void sPCIModemReset(CONTROLLER_T * CtlP, int chan, int on)
chan             3105 drivers/tty/rocket.c 	sOutB(addr + chan, 0);	/* apply or remove reset */
chan             1134 drivers/tty/rocket_int.h 	unsigned int chan:3;
chan              331 drivers/tty/serial/8250/8250_dw.c static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
chan              336 drivers/tty/serial/8250/8250_dw.c static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
chan              338 drivers/tty/serial/8250/8250_dw.c 	return param == chan->device->dev;
chan              244 drivers/tty/serial/8250/8250_lpss.c static bool lpss8250_dma_filter(struct dma_chan *chan, void *param)
chan              248 drivers/tty/serial/8250/8250_lpss.c 	if (dws->dma_dev != chan->device->dev)
chan              251 drivers/tty/serial/8250/8250_lpss.c 	chan->private = dws;
chan              235 drivers/tty/serial/8250/8250_mid.c static bool mid8250_dma_filter(struct dma_chan *chan, void *param)
chan              239 drivers/tty/serial/8250/8250_mid.c 	if (s->dma_dev != chan->device->dev || s->chan_id != chan->chan_id)
chan              242 drivers/tty/serial/8250/8250_mid.c 	chan->private = s;
chan              431 drivers/tty/serial/8250/8250_mtk.c static bool mtk8250_dma_filter(struct dma_chan *chan, void *param)
chan             1094 drivers/tty/serial/8250/8250_omap.c static bool the_no_dma_filter_fn(struct dma_chan *chan, void *param)
chan              236 drivers/tty/serial/amba-pl011.c 	struct dma_chan		*chan;
chan              252 drivers/tty/serial/amba-pl011.c 	struct dma_chan		*chan;
chan              371 drivers/tty/serial/amba-pl011.c static int pl011_sgbuf_init(struct dma_chan *chan, struct pl011_sgbuf *sg,
chan              376 drivers/tty/serial/amba-pl011.c 	sg->buf = dma_alloc_coherent(chan->device->dev,
chan              390 drivers/tty/serial/amba-pl011.c static void pl011_sgbuf_free(struct dma_chan *chan, struct pl011_sgbuf *sg,
chan              394 drivers/tty/serial/amba-pl011.c 		dma_free_coherent(chan->device->dev,
chan              413 drivers/tty/serial/amba-pl011.c 	struct dma_chan *chan;
chan              417 drivers/tty/serial/amba-pl011.c 	chan = dma_request_slave_channel_reason(dev, "tx");
chan              418 drivers/tty/serial/amba-pl011.c 	if (IS_ERR(chan)) {
chan              419 drivers/tty/serial/amba-pl011.c 		if (PTR_ERR(chan) == -EPROBE_DEFER) {
chan              434 drivers/tty/serial/amba-pl011.c 		chan = dma_request_channel(mask, plat->dma_filter,
chan              436 drivers/tty/serial/amba-pl011.c 		if (!chan) {
chan              442 drivers/tty/serial/amba-pl011.c 	dmaengine_slave_config(chan, &tx_conf);
chan              443 drivers/tty/serial/amba-pl011.c 	uap->dmatx.chan = chan;
chan              446 drivers/tty/serial/amba-pl011.c 		 dma_chan_name(uap->dmatx.chan));
chan              449 drivers/tty/serial/amba-pl011.c 	chan = dma_request_slave_channel(dev, "rx");
chan              451 drivers/tty/serial/amba-pl011.c 	if (!chan && plat && plat->dma_rx_param) {
chan              452 drivers/tty/serial/amba-pl011.c 		chan = dma_request_channel(mask, plat->dma_filter, plat->dma_rx_param);
chan              454 drivers/tty/serial/amba-pl011.c 		if (!chan) {
chan              460 drivers/tty/serial/amba-pl011.c 	if (chan) {
chan              476 drivers/tty/serial/amba-pl011.c 		if (0 == dma_get_slave_caps(chan, &caps)) {
chan              479 drivers/tty/serial/amba-pl011.c 				dma_release_channel(chan);
chan              485 drivers/tty/serial/amba-pl011.c 		dmaengine_slave_config(chan, &rx_conf);
chan              486 drivers/tty/serial/amba-pl011.c 		uap->dmarx.chan = chan;
chan              528 drivers/tty/serial/amba-pl011.c 			 dma_chan_name(uap->dmarx.chan));
chan              534 drivers/tty/serial/amba-pl011.c 	if (uap->dmatx.chan)
chan              535 drivers/tty/serial/amba-pl011.c 		dma_release_channel(uap->dmatx.chan);
chan              536 drivers/tty/serial/amba-pl011.c 	if (uap->dmarx.chan)
chan              537 drivers/tty/serial/amba-pl011.c 		dma_release_channel(uap->dmarx.chan);
chan              557 drivers/tty/serial/amba-pl011.c 		dma_unmap_sg(dmatx->chan->device->dev, &dmatx->sg, 1,
chan              601 drivers/tty/serial/amba-pl011.c 	struct dma_chan *chan = dmatx->chan;
chan              602 drivers/tty/serial/amba-pl011.c 	struct dma_device *dma_dev = chan->device;
chan              652 drivers/tty/serial/amba-pl011.c 	desc = dmaengine_prep_slave_sg(chan, &dmatx->sg, 1, DMA_MEM_TO_DEV,
chan              673 drivers/tty/serial/amba-pl011.c 	dma_dev->device_issue_pending(chan);
chan              816 drivers/tty/serial/amba-pl011.c 	dmaengine_terminate_async(uap->dmatx.chan);
chan              819 drivers/tty/serial/amba-pl011.c 		dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1,
chan              831 drivers/tty/serial/amba-pl011.c 	struct dma_chan *rxchan = uap->dmarx.chan;
chan              953 drivers/tty/serial/amba-pl011.c 	struct dma_chan *rxchan = dmarx->chan;
chan             1002 drivers/tty/serial/amba-pl011.c 	struct dma_chan *rxchan = dmarx->chan;
chan             1068 drivers/tty/serial/amba-pl011.c 	struct dma_chan *rxchan = uap->dmarx.chan;
chan             1118 drivers/tty/serial/amba-pl011.c 	if (!uap->dmatx.chan)
chan             1134 drivers/tty/serial/amba-pl011.c 	if (!uap->dmarx.chan)
chan             1138 drivers/tty/serial/amba-pl011.c 	ret = pl011_sgbuf_init(uap->dmarx.chan, &uap->dmarx.sgbuf_a,
chan             1146 drivers/tty/serial/amba-pl011.c 	ret = pl011_sgbuf_init(uap->dmarx.chan, &uap->dmarx.sgbuf_b,
chan             1151 drivers/tty/serial/amba-pl011.c 		pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_a,
chan             1203 drivers/tty/serial/amba-pl011.c 		dmaengine_terminate_all(uap->dmatx.chan);
chan             1205 drivers/tty/serial/amba-pl011.c 			dma_unmap_sg(uap->dmatx.chan->device->dev, &uap->dmatx.sg, 1,
chan             1215 drivers/tty/serial/amba-pl011.c 		dmaengine_terminate_all(uap->dmarx.chan);
chan             1217 drivers/tty/serial/amba-pl011.c 		pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_a, DMA_FROM_DEVICE);
chan             1218 drivers/tty/serial/amba-pl011.c 		pl011_sgbuf_free(uap->dmarx.chan, &uap->dmarx.sgbuf_b, DMA_FROM_DEVICE);
chan              866 drivers/tty/serial/atmel_serial.c 	struct dma_chan *chan = atmel_port->chan_tx;
chan              871 drivers/tty/serial/atmel_serial.c 	if (chan)
chan              872 drivers/tty/serial/atmel_serial.c 		dmaengine_terminate_all(chan);
chan              910 drivers/tty/serial/atmel_serial.c 	struct dma_chan *chan = atmel_port->chan_tx;
chan              912 drivers/tty/serial/atmel_serial.c 	if (chan) {
chan              913 drivers/tty/serial/atmel_serial.c 		dmaengine_terminate_all(chan);
chan              914 drivers/tty/serial/atmel_serial.c 		dma_release_channel(chan);
chan              931 drivers/tty/serial/atmel_serial.c 	struct dma_chan *chan = atmel_port->chan_tx;
chan              988 drivers/tty/serial/atmel_serial.c 		desc = dmaengine_prep_slave_sg(chan,
chan             1088 drivers/tty/serial/atmel_serial.c 	struct dma_chan *chan = atmel_port->chan_rx;
chan             1090 drivers/tty/serial/atmel_serial.c 	if (chan) {
chan             1091 drivers/tty/serial/atmel_serial.c 		dmaengine_terminate_all(chan);
chan             1092 drivers/tty/serial/atmel_serial.c 		dma_release_channel(chan);
chan             1107 drivers/tty/serial/atmel_serial.c 	struct dma_chan *chan = atmel_port->chan_rx;
chan             1115 drivers/tty/serial/atmel_serial.c 	dmastat = dmaengine_tx_status(chan,
chan              592 drivers/tty/serial/imx.c 	struct dma_chan	*chan = sport->dma_chan_tx;
chan              622 drivers/tty/serial/imx.c 	desc = dmaengine_prep_slave_sg(chan, sgl, ret,
chan              643 drivers/tty/serial/imx.c 	dma_async_issue_pending(chan);
chan             1075 drivers/tty/serial/imx.c 	struct dma_chan	*chan = sport->dma_chan_rx;
chan             1085 drivers/tty/serial/imx.c 	status = dmaengine_tx_status(chan, sport->rx_cookie, &state);
chan             1151 drivers/tty/serial/imx.c 	struct dma_chan	*chan = sport->dma_chan_rx;
chan             1167 drivers/tty/serial/imx.c 	desc = dmaengine_prep_dma_cyclic(chan, sg_dma_address(sgl),
chan             1182 drivers/tty/serial/imx.c 	dma_async_issue_pending(chan);
chan              164 drivers/tty/serial/msm_serial.c 	struct dma_chan		*chan;
chan              254 drivers/tty/serial/msm_serial.c 	dmaengine_terminate_all(dma->chan);
chan              276 drivers/tty/serial/msm_serial.c 	if (dma->chan) {
chan              278 drivers/tty/serial/msm_serial.c 		dma_release_channel(dma->chan);
chan              284 drivers/tty/serial/msm_serial.c 	if (dma->chan) {
chan              286 drivers/tty/serial/msm_serial.c 		dma_release_channel(dma->chan);
chan              304 drivers/tty/serial/msm_serial.c 	dma->chan = dma_request_slave_channel_reason(dev, "tx");
chan              305 drivers/tty/serial/msm_serial.c 	if (IS_ERR(dma->chan))
chan              317 drivers/tty/serial/msm_serial.c 	ret = dmaengine_slave_config(dma->chan, &conf);
chan              331 drivers/tty/serial/msm_serial.c 	dma_release_channel(dma->chan);
chan              347 drivers/tty/serial/msm_serial.c 	dma->chan = dma_request_slave_channel_reason(dev, "rx");
chan              348 drivers/tty/serial/msm_serial.c 	if (IS_ERR(dma->chan))
chan              364 drivers/tty/serial/msm_serial.c 	ret = dmaengine_slave_config(dma->chan, &conf);
chan              379 drivers/tty/serial/msm_serial.c 	dma_release_channel(dma->chan);
chan              444 drivers/tty/serial/msm_serial.c 	status = dmaengine_tx_status(dma->chan, dma->cookie, &state);
chan              492 drivers/tty/serial/msm_serial.c 	dma->desc = dmaengine_prep_slave_single(dma->chan, dma->phys,
chan              529 drivers/tty/serial/msm_serial.c 	dma_async_issue_pending(dma->chan);
chan              606 drivers/tty/serial/msm_serial.c 	if (!dma->chan)
chan              615 drivers/tty/serial/msm_serial.c 	dma->desc = dmaengine_prep_slave_single(dma->chan, dma->phys,
chan              645 drivers/tty/serial/msm_serial.c 	dma_async_issue_pending(dma->chan);
chan              674 drivers/tty/serial/msm_serial.c 	if (dma->chan)
chan              908 drivers/tty/serial/msm_serial.c 	if (!dma->chan || dma_count < dma_min)
chan              952 drivers/tty/serial/msm_serial.c 			dmaengine_terminate_all(dma->chan);
chan             1249 drivers/tty/serial/msm_serial.c 	if (dma->chan) /* Terminate if any */
chan              699 drivers/tty/serial/pch_uart.c static bool filter(struct dma_chan *chan, void *slave)
chan              703 drivers/tty/serial/pch_uart.c 	if ((chan->chan_id == param->chan_id) && (param->dma_dev ==
chan              704 drivers/tty/serial/pch_uart.c 						  chan->device->dev)) {
chan              705 drivers/tty/serial/pch_uart.c 		chan->private = param;
chan              715 drivers/tty/serial/pch_uart.c 	struct dma_chan *chan;
chan              733 drivers/tty/serial/pch_uart.c 	chan = dma_request_channel(mask, filter, param);
chan              734 drivers/tty/serial/pch_uart.c 	if (!chan) {
chan              739 drivers/tty/serial/pch_uart.c 	priv->chan_tx = chan;
chan              747 drivers/tty/serial/pch_uart.c 	chan = dma_request_channel(mask, filter, param);
chan              748 drivers/tty/serial/pch_uart.c 	if (!chan) {
chan              759 drivers/tty/serial/pch_uart.c 	priv->chan_rx = chan;
chan             1253 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_rx_saved;
chan             1257 drivers/tty/serial/sh-sci.c 	dmaengine_terminate_sync(chan);
chan             1258 drivers/tty/serial/sh-sci.c 	dma_free_coherent(chan->device->dev, s->buf_len_rx * 2, s->rx_buf[0],
chan             1260 drivers/tty/serial/sh-sci.c 	dma_release_channel(chan);
chan             1289 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_rx;
chan             1323 drivers/tty/serial/sh-sci.c 	dma_async_issue_pending(chan);
chan             1335 drivers/tty/serial/sh-sci.c 	dmaengine_terminate_async(chan);
chan             1343 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_tx_saved;
chan             1348 drivers/tty/serial/sh-sci.c 	dmaengine_terminate_sync(chan);
chan             1349 drivers/tty/serial/sh-sci.c 	dma_unmap_single(chan->device->dev, s->tx_dma_addr, UART_XMIT_SIZE,
chan             1351 drivers/tty/serial/sh-sci.c 	dma_release_channel(chan);
chan             1356 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_rx;
chan             1365 drivers/tty/serial/sh-sci.c 		desc = dmaengine_prep_slave_sg(chan,
chan             1381 drivers/tty/serial/sh-sci.c 	dma_async_issue_pending(chan);
chan             1389 drivers/tty/serial/sh-sci.c 		dmaengine_terminate_async(chan);
chan             1401 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_tx;
chan             1428 drivers/tty/serial/sh-sci.c 	desc = dmaengine_prep_slave_single(chan, buf, s->tx_dma_len,
chan             1437 drivers/tty/serial/sh-sci.c 	dma_sync_single_for_device(chan->device->dev, buf, s->tx_dma_len,
chan             1453 drivers/tty/serial/sh-sci.c 	dma_async_issue_pending(chan);
chan             1467 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan = s->chan_rx;
chan             1495 drivers/tty/serial/sh-sci.c 	dmaengine_pause(chan);
chan             1533 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan;
chan             1537 drivers/tty/serial/sh-sci.c 	chan = dma_request_slave_channel(port->dev,
chan             1539 drivers/tty/serial/sh-sci.c 	if (!chan) {
chan             1556 drivers/tty/serial/sh-sci.c 	ret = dmaengine_slave_config(chan, &cfg);
chan             1559 drivers/tty/serial/sh-sci.c 		dma_release_channel(chan);
chan             1563 drivers/tty/serial/sh-sci.c 	return chan;
chan             1569 drivers/tty/serial/sh-sci.c 	struct dma_chan *chan;
chan             1592 drivers/tty/serial/sh-sci.c 	chan = sci_request_dma_chan(port, DMA_MEM_TO_DEV);
chan             1593 drivers/tty/serial/sh-sci.c 	dev_dbg(port->dev, "%s: TX: got channel %p\n", __func__, chan);
chan             1594 drivers/tty/serial/sh-sci.c 	if (chan) {
chan             1596 drivers/tty/serial/sh-sci.c 		s->tx_dma_addr = dma_map_single(chan->device->dev,
chan             1600 drivers/tty/serial/sh-sci.c 		if (dma_mapping_error(chan->device->dev, s->tx_dma_addr)) {
chan             1602 drivers/tty/serial/sh-sci.c 			dma_release_channel(chan);
chan             1609 drivers/tty/serial/sh-sci.c 			s->chan_tx_saved = s->chan_tx = chan;
chan             1613 drivers/tty/serial/sh-sci.c 	chan = sci_request_dma_chan(port, DMA_DEV_TO_MEM);
chan             1614 drivers/tty/serial/sh-sci.c 	dev_dbg(port->dev, "%s: RX: got channel %p\n", __func__, chan);
chan             1615 drivers/tty/serial/sh-sci.c 	if (chan) {
chan             1621 drivers/tty/serial/sh-sci.c 		buf = dma_alloc_coherent(chan->device->dev, s->buf_len_rx * 2,
chan             1626 drivers/tty/serial/sh-sci.c 			dma_release_channel(chan);
chan             1645 drivers/tty/serial/sh-sci.c 		s->chan_rx_saved = s->chan_rx = chan;
chan               95 drivers/uio/uio_hv_generic.c 	struct vmbus_channel *chan = context;
chan               96 drivers/uio/uio_hv_generic.c 	struct hv_device *hv_dev = chan->device_obj;
chan               99 drivers/uio/uio_hv_generic.c 	chan->inbound.ring_buffer->interrupt_mask = 1;
chan              438 drivers/usb/dwc2/hcd.c 				   struct dwc2_host_chan *chan)
chan              449 drivers/usb/dwc2/hcd.c 	if (!chan)
chan              452 drivers/usb/dwc2/hcd.c 	hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan              453 drivers/usb/dwc2/hcd.c 	hcsplt = dwc2_readl(hsotg, HCSPLT(chan->hc_num));
chan              454 drivers/usb/dwc2/hcd.c 	hctsiz = dwc2_readl(hsotg, HCTSIZ(chan->hc_num));
chan              455 drivers/usb/dwc2/hcd.c 	hc_dma = dwc2_readl(hsotg, HCDMA(chan->hc_num));
chan              457 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "  Assigned to channel %p:\n", chan);
chan              463 drivers/usb/dwc2/hcd.c 		chan->dev_addr, chan->ep_num, chan->ep_is_in);
chan              464 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    ep_type: %d\n", chan->ep_type);
chan              465 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    max_packet: %d\n", chan->max_packet);
chan              466 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    data_pid_start: %d\n", chan->data_pid_start);
chan              467 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    xfer_started: %d\n", chan->xfer_started);
chan              468 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    halt_status: %d\n", chan->halt_status);
chan              469 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    xfer_buf: %p\n", chan->xfer_buf);
chan              471 drivers/usb/dwc2/hcd.c 		(unsigned long)chan->xfer_dma);
chan              472 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    xfer_len: %d\n", chan->xfer_len);
chan              473 drivers/usb/dwc2/hcd.c 	dev_dbg(hsotg->dev, "    qh: %p\n", chan->qh);
chan              488 drivers/usb/dwc2/hcd.c 		struct dwc2_host_chan *chan = hsotg->hc_ptr_array[i];
chan              490 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    %2d: %p\n", i, chan);
chan              531 drivers/usb/dwc2/hcd.c 				      struct dwc2_host_chan *chan)
chan              535 drivers/usb/dwc2/hcd.c 	switch (chan->ep_type) {
chan              543 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in) {
chan              548 drivers/usb/dwc2/hcd.c 			if (chan->do_ping)
chan              552 drivers/usb/dwc2/hcd.c 		if (chan->do_split) {
chan              554 drivers/usb/dwc2/hcd.c 			if (chan->complete_split)
chan              560 drivers/usb/dwc2/hcd.c 		if (chan->error_state)
chan              574 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in)
chan              576 drivers/usb/dwc2/hcd.c 		if (chan->error_state)
chan              578 drivers/usb/dwc2/hcd.c 		if (chan->do_split) {
chan              579 drivers/usb/dwc2/hcd.c 			if (chan->complete_split)
chan              593 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in) {
chan              603 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcintmsk, HCINTMSK(chan->hc_num));
chan              604 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              609 drivers/usb/dwc2/hcd.c 				    struct dwc2_host_chan *chan)
chan              618 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              622 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              624 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan              628 drivers/usb/dwc2/hcd.c 	if (chan->error_state && !chan->do_split &&
chan              629 drivers/usb/dwc2/hcd.c 	    chan->ep_type != USB_ENDPOINT_XFER_ISOC) {
chan              630 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              633 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in) {
chan              635 drivers/usb/dwc2/hcd.c 			if (chan->ep_type != USB_ENDPOINT_XFER_INT)
chan              640 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcintmsk, HCINTMSK(chan->hc_num));
chan              641 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              646 drivers/usb/dwc2/hcd.c 				struct dwc2_host_chan *chan)
chan              651 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              653 drivers/usb/dwc2/hcd.c 		dwc2_hc_enable_dma_ints(hsotg, chan);
chan              655 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              657 drivers/usb/dwc2/hcd.c 		dwc2_hc_enable_slave_ints(hsotg, chan);
chan              662 drivers/usb/dwc2/hcd.c 	intmsk |= 1 << chan->hc_num;
chan              664 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              671 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              686 drivers/usb/dwc2/hcd.c static void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan)
chan              688 drivers/usb/dwc2/hcd.c 	u8 hc_num = chan->hc_num;
chan              693 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              702 drivers/usb/dwc2/hcd.c 	dwc2_hc_enable_ints(hsotg, chan);
chan              708 drivers/usb/dwc2/hcd.c 	hcchar = chan->dev_addr << HCCHAR_DEVADDR_SHIFT & HCCHAR_DEVADDR_MASK;
chan              709 drivers/usb/dwc2/hcd.c 	hcchar |= chan->ep_num << HCCHAR_EPNUM_SHIFT & HCCHAR_EPNUM_MASK;
chan              710 drivers/usb/dwc2/hcd.c 	if (chan->ep_is_in)
chan              712 drivers/usb/dwc2/hcd.c 	if (chan->speed == USB_SPEED_LOW)
chan              714 drivers/usb/dwc2/hcd.c 	hcchar |= chan->ep_type << HCCHAR_EPTYPE_SHIFT & HCCHAR_EPTYPE_MASK;
chan              715 drivers/usb/dwc2/hcd.c 	hcchar |= chan->max_packet << HCCHAR_MPS_SHIFT & HCCHAR_MPS_MASK;
chan              717 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan)) {
chan              724 drivers/usb/dwc2/hcd.c 			 chan->dev_addr);
chan              726 drivers/usb/dwc2/hcd.c 			 chan->ep_num);
chan              728 drivers/usb/dwc2/hcd.c 			 chan->ep_is_in);
chan              730 drivers/usb/dwc2/hcd.c 			 chan->speed == USB_SPEED_LOW);
chan              732 drivers/usb/dwc2/hcd.c 			 chan->ep_type);
chan              734 drivers/usb/dwc2/hcd.c 			 chan->max_packet);
chan              738 drivers/usb/dwc2/hcd.c 	if (chan->do_split) {
chan              739 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              743 drivers/usb/dwc2/hcd.c 				 chan->complete_split ? "CSPLIT" : "SSPLIT");
chan              744 drivers/usb/dwc2/hcd.c 		if (chan->complete_split)
chan              746 drivers/usb/dwc2/hcd.c 		hcsplt |= chan->xact_pos << HCSPLT_XACTPOS_SHIFT &
chan              748 drivers/usb/dwc2/hcd.c 		hcsplt |= chan->hub_addr << HCSPLT_HUBADDR_SHIFT &
chan              750 drivers/usb/dwc2/hcd.c 		hcsplt |= chan->hub_port << HCSPLT_PRTADDR_SHIFT &
chan              752 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan)) {
chan              754 drivers/usb/dwc2/hcd.c 				 chan->complete_split);
chan              756 drivers/usb/dwc2/hcd.c 				 chan->xact_pos);
chan              758 drivers/usb/dwc2/hcd.c 				 chan->hub_addr);
chan              760 drivers/usb/dwc2/hcd.c 				 chan->hub_port);
chan              762 drivers/usb/dwc2/hcd.c 				 chan->ep_is_in);
chan              764 drivers/usb/dwc2/hcd.c 				 chan->max_packet);
chan              766 drivers/usb/dwc2/hcd.c 				 chan->xfer_len);
chan              801 drivers/usb/dwc2/hcd.c void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
chan              806 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan              817 drivers/usb/dwc2/hcd.c 		if (!chan->do_split &&
chan              818 drivers/usb/dwc2/hcd.c 		    (chan->ep_type == USB_ENDPOINT_XFER_ISOC ||
chan              819 drivers/usb/dwc2/hcd.c 		     chan->ep_type == USB_ENDPOINT_XFER_INT)) {
chan              840 drivers/usb/dwc2/hcd.c 		dwc2_writel(hsotg, hcintmsk, HCINTMSK(chan->hc_num));
chan              847 drivers/usb/dwc2/hcd.c 		dwc2_writel(hsotg, ~hcintmsk, HCINT(chan->hc_num));
chan              854 drivers/usb/dwc2/hcd.c 		chan->halt_status = halt_status;
chan              856 drivers/usb/dwc2/hcd.c 		hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan              872 drivers/usb/dwc2/hcd.c 	if (chan->halt_pending) {
chan              880 drivers/usb/dwc2/hcd.c 			 __func__, chan->hc_num);
chan              884 drivers/usb/dwc2/hcd.c 	hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan              889 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              893 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              899 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              904 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_CONTROL ||
chan              905 drivers/usb/dwc2/hcd.c 		    chan->ep_type == USB_ENDPOINT_XFER_BULK) {
chan              924 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              928 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcchar, HCCHAR(chan->hc_num));
chan              929 drivers/usb/dwc2/hcd.c 	chan->halt_status = halt_status;
chan              932 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              934 drivers/usb/dwc2/hcd.c 		chan->halt_pending = 1;
chan              935 drivers/usb/dwc2/hcd.c 		chan->halt_on_queue = 0;
chan              937 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan              939 drivers/usb/dwc2/hcd.c 		chan->halt_on_queue = 1;
chan              942 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan)) {
chan              944 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan              948 drivers/usb/dwc2/hcd.c 			 chan->halt_pending);
chan              950 drivers/usb/dwc2/hcd.c 			 chan->halt_on_queue);
chan              952 drivers/usb/dwc2/hcd.c 			 chan->halt_status);
chan              965 drivers/usb/dwc2/hcd.c void dwc2_hc_cleanup(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan)
chan              969 drivers/usb/dwc2/hcd.c 	chan->xfer_started = 0;
chan              971 drivers/usb/dwc2/hcd.c 	list_del_init(&chan->split_order_list_entry);
chan              977 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, 0, HCINTMSK(chan->hc_num));
chan              980 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcintmsk, HCINT(chan->hc_num));
chan              994 drivers/usb/dwc2/hcd.c 				       struct dwc2_host_chan *chan, u32 *hcchar)
chan              996 drivers/usb/dwc2/hcd.c 	if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan              997 drivers/usb/dwc2/hcd.c 	    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1030 drivers/usb/dwc2/hcd.c 		host_speed = (chan->speed != USB_SPEED_HIGH &&
chan             1031 drivers/usb/dwc2/hcd.c 			      !chan->do_split) ? chan->speed : USB_SPEED_HIGH;
chan             1049 drivers/usb/dwc2/hcd.c 					    chan->xfer_len + bytes_in_fifo);
chan             1056 drivers/usb/dwc2/hcd.c 		wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1);
chan             1068 drivers/usb/dwc2/hcd.c 				      chan->qh, wire_frame, frame_number,
chan             1081 drivers/usb/dwc2/hcd.c 			chan->qh->next_active_frame =
chan             1092 drivers/usb/dwc2/hcd.c static void dwc2_set_pid_isoc(struct dwc2_host_chan *chan)
chan             1095 drivers/usb/dwc2/hcd.c 	if (chan->speed == USB_SPEED_HIGH) {
chan             1096 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in) {
chan             1097 drivers/usb/dwc2/hcd.c 			if (chan->multi_count == 1)
chan             1098 drivers/usb/dwc2/hcd.c 				chan->data_pid_start = DWC2_HC_PID_DATA0;
chan             1099 drivers/usb/dwc2/hcd.c 			else if (chan->multi_count == 2)
chan             1100 drivers/usb/dwc2/hcd.c 				chan->data_pid_start = DWC2_HC_PID_DATA1;
chan             1102 drivers/usb/dwc2/hcd.c 				chan->data_pid_start = DWC2_HC_PID_DATA2;
chan             1104 drivers/usb/dwc2/hcd.c 			if (chan->multi_count == 1)
chan             1105 drivers/usb/dwc2/hcd.c 				chan->data_pid_start = DWC2_HC_PID_DATA0;
chan             1107 drivers/usb/dwc2/hcd.c 				chan->data_pid_start = DWC2_HC_PID_MDATA;
chan             1110 drivers/usb/dwc2/hcd.c 		chan->data_pid_start = DWC2_HC_PID_DATA0;
chan             1129 drivers/usb/dwc2/hcd.c 				 struct dwc2_host_chan *chan)
chan             1135 drivers/usb/dwc2/hcd.c 	u32 *data_buf = (u32 *)chan->xfer_buf;
chan             1137 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1140 drivers/usb/dwc2/hcd.c 	remaining_count = chan->xfer_len - chan->xfer_count;
chan             1141 drivers/usb/dwc2/hcd.c 	if (remaining_count > chan->max_packet)
chan             1142 drivers/usb/dwc2/hcd.c 		byte_count = chan->max_packet;
chan             1151 drivers/usb/dwc2/hcd.c 			dwc2_writel(hsotg, *data_buf, HCFIFO(chan->hc_num));
chan             1157 drivers/usb/dwc2/hcd.c 			dwc2_writel(hsotg, data, HCFIFO(chan->hc_num));
chan             1161 drivers/usb/dwc2/hcd.c 	chan->xfer_count += byte_count;
chan             1162 drivers/usb/dwc2/hcd.c 	chan->xfer_buf += byte_count;
chan             1175 drivers/usb/dwc2/hcd.c 			    struct dwc2_host_chan *chan)
chan             1180 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1182 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1186 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hctsiz, HCTSIZ(chan->hc_num));
chan             1188 drivers/usb/dwc2/hcd.c 	hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan             1191 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcchar, HCCHAR(chan->hc_num));
chan             1228 drivers/usb/dwc2/hcd.c 				   struct dwc2_host_chan *chan)
chan             1237 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1240 drivers/usb/dwc2/hcd.c 	if (chan->do_ping) {
chan             1242 drivers/usb/dwc2/hcd.c 			if (dbg_hc(chan))
chan             1244 drivers/usb/dwc2/hcd.c 			dwc2_hc_do_ping(hsotg, chan);
chan             1245 drivers/usb/dwc2/hcd.c 			chan->xfer_started = 1;
chan             1249 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan             1255 drivers/usb/dwc2/hcd.c 	if (chan->do_split) {
chan             1256 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan             1260 drivers/usb/dwc2/hcd.c 		if (chan->complete_split && !chan->ep_is_in)
chan             1265 drivers/usb/dwc2/hcd.c 			chan->xfer_len = 0;
chan             1266 drivers/usb/dwc2/hcd.c 		else if (chan->ep_is_in || chan->xfer_len > chan->max_packet)
chan             1267 drivers/usb/dwc2/hcd.c 			chan->xfer_len = chan->max_packet;
chan             1268 drivers/usb/dwc2/hcd.c 		else if (!chan->ep_is_in && chan->xfer_len > 188)
chan             1269 drivers/usb/dwc2/hcd.c 			chan->xfer_len = 188;
chan             1271 drivers/usb/dwc2/hcd.c 		hctsiz |= chan->xfer_len << TSIZ_XFERSIZE_SHIFT &
chan             1275 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1276 drivers/usb/dwc2/hcd.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan             1281 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan             1287 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1288 drivers/usb/dwc2/hcd.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1297 drivers/usb/dwc2/hcd.c 				chan->multi_count * chan->max_packet;
chan             1299 drivers/usb/dwc2/hcd.c 			if (chan->xfer_len > max_periodic_len)
chan             1300 drivers/usb/dwc2/hcd.c 				chan->xfer_len = max_periodic_len;
chan             1301 drivers/usb/dwc2/hcd.c 		} else if (chan->xfer_len > max_hc_xfer_size) {
chan             1306 drivers/usb/dwc2/hcd.c 			chan->xfer_len =
chan             1307 drivers/usb/dwc2/hcd.c 				max_hc_xfer_size - chan->max_packet + 1;
chan             1310 drivers/usb/dwc2/hcd.c 		if (chan->xfer_len > 0) {
chan             1311 drivers/usb/dwc2/hcd.c 			num_packets = (chan->xfer_len + chan->max_packet - 1) /
chan             1312 drivers/usb/dwc2/hcd.c 					chan->max_packet;
chan             1315 drivers/usb/dwc2/hcd.c 				chan->xfer_len = num_packets * chan->max_packet;
chan             1322 drivers/usb/dwc2/hcd.c 		if (chan->ep_is_in)
chan             1327 drivers/usb/dwc2/hcd.c 			chan->xfer_len = num_packets * chan->max_packet;
chan             1329 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1330 drivers/usb/dwc2/hcd.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan             1335 drivers/usb/dwc2/hcd.c 			chan->multi_count = num_packets;
chan             1337 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan             1338 drivers/usb/dwc2/hcd.c 			dwc2_set_pid_isoc(chan);
chan             1340 drivers/usb/dwc2/hcd.c 		hctsiz |= chan->xfer_len << TSIZ_XFERSIZE_SHIFT &
chan             1344 drivers/usb/dwc2/hcd.c 		ec_mc = chan->multi_count;
chan             1347 drivers/usb/dwc2/hcd.c 	chan->start_pkt_count = num_packets;
chan             1349 drivers/usb/dwc2/hcd.c 	hctsiz |= chan->data_pid_start << TSIZ_SC_MC_PID_SHIFT &
chan             1351 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hctsiz, HCTSIZ(chan->hc_num));
chan             1352 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan)) {
chan             1354 drivers/usb/dwc2/hcd.c 			 hctsiz, chan->hc_num);
chan             1357 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1372 drivers/usb/dwc2/hcd.c 		if (chan->align_buf) {
chan             1373 drivers/usb/dwc2/hcd.c 			if (dbg_hc(chan))
chan             1375 drivers/usb/dwc2/hcd.c 			dma_addr = chan->align_buf;
chan             1377 drivers/usb/dwc2/hcd.c 			dma_addr = chan->xfer_dma;
chan             1379 drivers/usb/dwc2/hcd.c 		dwc2_writel(hsotg, (u32)dma_addr, HCDMA(chan->hc_num));
chan             1381 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan             1383 drivers/usb/dwc2/hcd.c 				 (unsigned long)dma_addr, chan->hc_num);
chan             1387 drivers/usb/dwc2/hcd.c 	if (chan->do_split) {
chan             1388 drivers/usb/dwc2/hcd.c 		u32 hcsplt = dwc2_readl(hsotg, HCSPLT(chan->hc_num));
chan             1391 drivers/usb/dwc2/hcd.c 		dwc2_writel(hsotg, hcsplt, HCSPLT(chan->hc_num));
chan             1394 drivers/usb/dwc2/hcd.c 	hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan             1397 drivers/usb/dwc2/hcd.c 	dwc2_hc_set_even_odd_frame(hsotg, chan, &hcchar);
chan             1402 drivers/usb/dwc2/hcd.c 			 __func__, chan->hc_num, hcchar);
chan             1408 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1413 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcchar, HCCHAR(chan->hc_num));
chan             1414 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1416 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1418 drivers/usb/dwc2/hcd.c 	chan->xfer_started = 1;
chan             1419 drivers/usb/dwc2/hcd.c 	chan->requests++;
chan             1422 drivers/usb/dwc2/hcd.c 	    !chan->ep_is_in && chan->xfer_len > 0)
chan             1424 drivers/usb/dwc2/hcd.c 		dwc2_hc_write_packet(hsotg, chan);
chan             1442 drivers/usb/dwc2/hcd.c 				 struct dwc2_host_chan *chan)
chan             1447 drivers/usb/dwc2/hcd.c 	if (chan->do_ping)
chan             1450 drivers/usb/dwc2/hcd.c 	if (chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan             1451 drivers/usb/dwc2/hcd.c 		dwc2_set_pid_isoc(chan);
chan             1454 drivers/usb/dwc2/hcd.c 	hctsiz |= chan->data_pid_start << TSIZ_SC_MC_PID_SHIFT &
chan             1458 drivers/usb/dwc2/hcd.c 	hctsiz |= (chan->ntd - 1) << TSIZ_NTD_SHIFT & TSIZ_NTD_MASK;
chan             1461 drivers/usb/dwc2/hcd.c 	hctsiz |= chan->schinfo << TSIZ_SCHINFO_SHIFT & TSIZ_SCHINFO_MASK;
chan             1463 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan)) {
chan             1465 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1467 drivers/usb/dwc2/hcd.c 			 chan->data_pid_start);
chan             1468 drivers/usb/dwc2/hcd.c 		dev_vdbg(hsotg->dev, "	 NTD: %d\n", chan->ntd - 1);
chan             1471 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hctsiz, HCTSIZ(chan->hc_num));
chan             1473 drivers/usb/dwc2/hcd.c 	dma_sync_single_for_device(hsotg->dev, chan->desc_list_addr,
chan             1474 drivers/usb/dwc2/hcd.c 				   chan->desc_list_sz, DMA_TO_DEVICE);
chan             1476 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, chan->desc_list_addr, HCDMA(chan->hc_num));
chan             1478 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1480 drivers/usb/dwc2/hcd.c 			 &chan->desc_list_addr, chan->hc_num);
chan             1482 drivers/usb/dwc2/hcd.c 	hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan             1484 drivers/usb/dwc2/hcd.c 	hcchar |= chan->multi_count << HCCHAR_MULTICNT_SHIFT &
chan             1490 drivers/usb/dwc2/hcd.c 			 __func__, chan->hc_num, hcchar);
chan             1496 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1501 drivers/usb/dwc2/hcd.c 	dwc2_writel(hsotg, hcchar, HCCHAR(chan->hc_num));
chan             1502 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1504 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1506 drivers/usb/dwc2/hcd.c 	chan->xfer_started = 1;
chan             1507 drivers/usb/dwc2/hcd.c 	chan->requests++;
chan             1531 drivers/usb/dwc2/hcd.c 				     struct dwc2_host_chan *chan)
chan             1533 drivers/usb/dwc2/hcd.c 	if (dbg_hc(chan))
chan             1535 drivers/usb/dwc2/hcd.c 			 chan->hc_num);
chan             1537 drivers/usb/dwc2/hcd.c 	if (chan->do_split)
chan             1541 drivers/usb/dwc2/hcd.c 	if (chan->data_pid_start == DWC2_HC_PID_SETUP)
chan             1545 drivers/usb/dwc2/hcd.c 	if (chan->ep_is_in) {
chan             1558 drivers/usb/dwc2/hcd.c 		u32 hcchar = dwc2_readl(hsotg, HCCHAR(chan->hc_num));
chan             1560 drivers/usb/dwc2/hcd.c 		dwc2_hc_set_even_odd_frame(hsotg, chan, &hcchar);
chan             1563 drivers/usb/dwc2/hcd.c 		if (dbg_hc(chan))
chan             1566 drivers/usb/dwc2/hcd.c 		dwc2_writel(hsotg, hcchar, HCCHAR(chan->hc_num));
chan             1567 drivers/usb/dwc2/hcd.c 		chan->requests++;
chan             1573 drivers/usb/dwc2/hcd.c 	if (chan->xfer_count < chan->xfer_len) {
chan             1574 drivers/usb/dwc2/hcd.c 		if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1575 drivers/usb/dwc2/hcd.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1577 drivers/usb/dwc2/hcd.c 						HCCHAR(chan->hc_num));
chan             1579 drivers/usb/dwc2/hcd.c 			dwc2_hc_set_even_odd_frame(hsotg, chan,
chan             1584 drivers/usb/dwc2/hcd.c 		dwc2_hc_write_packet(hsotg, chan);
chan             1585 drivers/usb/dwc2/hcd.c 		chan->requests++;
chan             2305 drivers/usb/dwc2/hcd.c 	struct dwc2_host_chan *chan, *chan_tmp;
chan             2324 drivers/usb/dwc2/hcd.c 	list_for_each_entry_safe(chan, chan_tmp, &hsotg->free_hc_list,
chan             2326 drivers/usb/dwc2/hcd.c 		list_del_init(&chan->hc_list_entry);
chan             2330 drivers/usb/dwc2/hcd.c 		chan = hsotg->hc_ptr_array[i];
chan             2331 drivers/usb/dwc2/hcd.c 		list_add_tail(&chan->hc_list_entry, &hsotg->free_hc_list);
chan             2332 drivers/usb/dwc2/hcd.c 		dwc2_hc_cleanup(hsotg, chan);
chan             2340 drivers/usb/dwc2/hcd.c 			       struct dwc2_host_chan *chan,
chan             2345 drivers/usb/dwc2/hcd.c 	chan->do_split = 1;
chan             2346 drivers/usb/dwc2/hcd.c 	chan->xact_pos = qtd->isoc_split_pos;
chan             2347 drivers/usb/dwc2/hcd.c 	chan->complete_split = qtd->complete_split;
chan             2349 drivers/usb/dwc2/hcd.c 	chan->hub_addr = (u8)hub_addr;
chan             2350 drivers/usb/dwc2/hcd.c 	chan->hub_port = (u8)hub_port;
chan             2354 drivers/usb/dwc2/hcd.c 			      struct dwc2_host_chan *chan,
chan             2362 drivers/usb/dwc2/hcd.c 		chan->ep_type = USB_ENDPOINT_XFER_CONTROL;
chan             2367 drivers/usb/dwc2/hcd.c 			chan->do_ping = 0;
chan             2368 drivers/usb/dwc2/hcd.c 			chan->ep_is_in = 0;
chan             2369 drivers/usb/dwc2/hcd.c 			chan->data_pid_start = DWC2_HC_PID_SETUP;
chan             2371 drivers/usb/dwc2/hcd.c 				chan->xfer_dma = urb->setup_dma;
chan             2373 drivers/usb/dwc2/hcd.c 				chan->xfer_buf = urb->setup_packet;
chan             2374 drivers/usb/dwc2/hcd.c 			chan->xfer_len = 8;
chan             2379 drivers/usb/dwc2/hcd.c 			chan->data_pid_start = qtd->data_toggle;
chan             2389 drivers/usb/dwc2/hcd.c 				chan->ep_is_in = 1;
chan             2391 drivers/usb/dwc2/hcd.c 				chan->ep_is_in =
chan             2393 drivers/usb/dwc2/hcd.c 			if (chan->ep_is_in)
chan             2394 drivers/usb/dwc2/hcd.c 				chan->do_ping = 0;
chan             2395 drivers/usb/dwc2/hcd.c 			chan->data_pid_start = DWC2_HC_PID_DATA1;
chan             2396 drivers/usb/dwc2/hcd.c 			chan->xfer_len = 0;
chan             2398 drivers/usb/dwc2/hcd.c 				chan->xfer_dma = hsotg->status_buf_dma;
chan             2400 drivers/usb/dwc2/hcd.c 				chan->xfer_buf = hsotg->status_buf;
chan             2406 drivers/usb/dwc2/hcd.c 		chan->ep_type = USB_ENDPOINT_XFER_BULK;
chan             2410 drivers/usb/dwc2/hcd.c 		chan->ep_type = USB_ENDPOINT_XFER_INT;
chan             2414 drivers/usb/dwc2/hcd.c 		chan->ep_type = USB_ENDPOINT_XFER_ISOC;
chan             2422 drivers/usb/dwc2/hcd.c 			chan->xfer_dma = urb->dma;
chan             2423 drivers/usb/dwc2/hcd.c 			chan->xfer_dma += frame_desc->offset +
chan             2426 drivers/usb/dwc2/hcd.c 			chan->xfer_buf = urb->buf;
chan             2427 drivers/usb/dwc2/hcd.c 			chan->xfer_buf += frame_desc->offset +
chan             2431 drivers/usb/dwc2/hcd.c 		chan->xfer_len = frame_desc->length - qtd->isoc_split_offset;
chan             2433 drivers/usb/dwc2/hcd.c 		if (chan->xact_pos == DWC2_HCSPLT_XACTPOS_ALL) {
chan             2434 drivers/usb/dwc2/hcd.c 			if (chan->xfer_len <= 188)
chan             2435 drivers/usb/dwc2/hcd.c 				chan->xact_pos = DWC2_HCSPLT_XACTPOS_ALL;
chan             2437 drivers/usb/dwc2/hcd.c 				chan->xact_pos = DWC2_HCSPLT_XACTPOS_BEGIN;
chan             2445 drivers/usb/dwc2/hcd.c 					    struct dwc2_host_chan *chan)
chan             2448 drivers/usb/dwc2/hcd.c 	    chan->max_packet > DWC2_KMEM_UNALIGNED_BUF_SIZE)
chan             2464 drivers/usb/dwc2/hcd.c 		chan->align_buf = 0;
chan             2468 drivers/usb/dwc2/hcd.c 	chan->align_buf = qh->dw_align_buf_dma;
chan             2580 drivers/usb/dwc2/hcd.c 	struct dwc2_host_chan *chan;
chan             2597 drivers/usb/dwc2/hcd.c 	chan = list_first_entry(&hsotg->free_hc_list, struct dwc2_host_chan,
chan             2601 drivers/usb/dwc2/hcd.c 	list_del_init(&chan->hc_list_entry);
chan             2605 drivers/usb/dwc2/hcd.c 	qh->channel = chan;
chan             2612 drivers/usb/dwc2/hcd.c 	chan->dev_addr = dwc2_hcd_get_dev_addr(&urb->pipe_info);
chan             2613 drivers/usb/dwc2/hcd.c 	chan->ep_num = dwc2_hcd_get_ep_num(&urb->pipe_info);
chan             2614 drivers/usb/dwc2/hcd.c 	chan->speed = qh->dev_speed;
chan             2615 drivers/usb/dwc2/hcd.c 	chan->max_packet = qh->maxp;
chan             2617 drivers/usb/dwc2/hcd.c 	chan->xfer_started = 0;
chan             2618 drivers/usb/dwc2/hcd.c 	chan->halt_status = DWC2_HC_XFER_NO_HALT_STATUS;
chan             2619 drivers/usb/dwc2/hcd.c 	chan->error_state = (qtd->error_count > 0);
chan             2620 drivers/usb/dwc2/hcd.c 	chan->halt_on_queue = 0;
chan             2621 drivers/usb/dwc2/hcd.c 	chan->halt_pending = 0;
chan             2622 drivers/usb/dwc2/hcd.c 	chan->requests = 0;
chan             2631 drivers/usb/dwc2/hcd.c 	chan->ep_is_in = (dwc2_hcd_is_pipe_in(&urb->pipe_info) != 0);
chan             2632 drivers/usb/dwc2/hcd.c 	if (chan->ep_is_in)
chan             2633 drivers/usb/dwc2/hcd.c 		chan->do_ping = 0;
chan             2635 drivers/usb/dwc2/hcd.c 		chan->do_ping = qh->ping_state;
chan             2637 drivers/usb/dwc2/hcd.c 	chan->data_pid_start = qh->data_toggle;
chan             2638 drivers/usb/dwc2/hcd.c 	chan->multi_count = 1;
chan             2645 drivers/usb/dwc2/hcd.c 		chan->xfer_dma = urb->dma + urb->actual_length;
chan             2647 drivers/usb/dwc2/hcd.c 		chan->xfer_buf = (u8 *)urb->buf + urb->actual_length;
chan             2649 drivers/usb/dwc2/hcd.c 	chan->xfer_len = urb->length - urb->actual_length;
chan             2650 drivers/usb/dwc2/hcd.c 	chan->xfer_count = 0;
chan             2654 drivers/usb/dwc2/hcd.c 		dwc2_hc_init_split(hsotg, chan, qtd, urb);
chan             2656 drivers/usb/dwc2/hcd.c 		chan->do_split = 0;
chan             2659 drivers/usb/dwc2/hcd.c 	dwc2_hc_init_xfer(hsotg, chan, qtd);
chan             2663 drivers/usb/dwc2/hcd.c 	    chan->ep_is_in && (chan->xfer_dma & 0x3)) {
chan             2665 drivers/usb/dwc2/hcd.c 		if (dwc2_alloc_split_dma_aligned_buf(hsotg, qh, chan)) {
chan             2669 drivers/usb/dwc2/hcd.c 			chan->align_buf = 0;
chan             2670 drivers/usb/dwc2/hcd.c 			chan->multi_count = 0;
chan             2671 drivers/usb/dwc2/hcd.c 			list_add_tail(&chan->hc_list_entry,
chan             2683 drivers/usb/dwc2/hcd.c 			     (chan->xfer_dma & 0x3));
chan             2684 drivers/usb/dwc2/hcd.c 		chan->align_buf = 0;
chan             2687 drivers/usb/dwc2/hcd.c 	if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             2688 drivers/usb/dwc2/hcd.c 	    chan->ep_type == USB_ENDPOINT_XFER_ISOC)
chan             2693 drivers/usb/dwc2/hcd.c 		chan->multi_count = qh->maxp_mult;
chan             2696 drivers/usb/dwc2/hcd.c 		chan->desc_list_addr = qh->desc_list_dma;
chan             2697 drivers/usb/dwc2/hcd.c 		chan->desc_list_sz = qh->desc_list_sz;
chan             2700 drivers/usb/dwc2/hcd.c 	dwc2_hc_init(hsotg, chan);
chan             2701 drivers/usb/dwc2/hcd.c 	chan->qh = qh;
chan             2817 drivers/usb/dwc2/hcd.c 				  struct dwc2_host_chan *chan,
chan             2822 drivers/usb/dwc2/hcd.c 	if (chan->do_split)
chan             2824 drivers/usb/dwc2/hcd.c 		list_move_tail(&chan->split_order_list_entry,
chan             2829 drivers/usb/dwc2/hcd.c 			if (!chan->xfer_started ||
chan             2830 drivers/usb/dwc2/hcd.c 			    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             2831 drivers/usb/dwc2/hcd.c 				dwc2_hcd_start_xfer_ddma(hsotg, chan->qh);
chan             2832 drivers/usb/dwc2/hcd.c 				chan->qh->ping_state = 0;
chan             2834 drivers/usb/dwc2/hcd.c 		} else if (!chan->xfer_started) {
chan             2835 drivers/usb/dwc2/hcd.c 			dwc2_hc_start_transfer(hsotg, chan);
chan             2836 drivers/usb/dwc2/hcd.c 			chan->qh->ping_state = 0;
chan             2838 drivers/usb/dwc2/hcd.c 	} else if (chan->halt_pending) {
chan             2840 drivers/usb/dwc2/hcd.c 	} else if (chan->halt_on_queue) {
chan             2841 drivers/usb/dwc2/hcd.c 		dwc2_hc_halt(hsotg, chan, chan->halt_status);
chan             2842 drivers/usb/dwc2/hcd.c 	} else if (chan->do_ping) {
chan             2843 drivers/usb/dwc2/hcd.c 		if (!chan->xfer_started)
chan             2844 drivers/usb/dwc2/hcd.c 			dwc2_hc_start_transfer(hsotg, chan);
chan             2845 drivers/usb/dwc2/hcd.c 	} else if (!chan->ep_is_in ||
chan             2846 drivers/usb/dwc2/hcd.c 		   chan->data_pid_start == DWC2_HC_PID_SETUP) {
chan             2847 drivers/usb/dwc2/hcd.c 		if ((fifo_dwords_avail * 4) >= chan->max_packet) {
chan             2848 drivers/usb/dwc2/hcd.c 			if (!chan->xfer_started) {
chan             2849 drivers/usb/dwc2/hcd.c 				dwc2_hc_start_transfer(hsotg, chan);
chan             2852 drivers/usb/dwc2/hcd.c 				retval = dwc2_hc_continue_transfer(hsotg, chan);
chan             2858 drivers/usb/dwc2/hcd.c 		if (!chan->xfer_started) {
chan             2859 drivers/usb/dwc2/hcd.c 			dwc2_hc_start_transfer(hsotg, chan);
chan             2862 drivers/usb/dwc2/hcd.c 			retval = dwc2_hc_continue_transfer(hsotg, chan);
chan             3837 drivers/usb/dwc2/hcd.c 	struct dwc2_host_chan *chan;
chan             3853 drivers/usb/dwc2/hcd.c 		chan = hsotg->hc_ptr_array[i];
chan             3857 drivers/usb/dwc2/hcd.c 			chan->dev_addr, chan->ep_num, chan->ep_is_in);
chan             3858 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    speed: %d\n", chan->speed);
chan             3859 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    ep_type: %d\n", chan->ep_type);
chan             3860 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    max_packet: %d\n", chan->max_packet);
chan             3862 drivers/usb/dwc2/hcd.c 			chan->data_pid_start);
chan             3863 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    multi_count: %d\n", chan->multi_count);
chan             3865 drivers/usb/dwc2/hcd.c 			chan->xfer_started);
chan             3866 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    xfer_buf: %p\n", chan->xfer_buf);
chan             3868 drivers/usb/dwc2/hcd.c 			(unsigned long)chan->xfer_dma);
chan             3869 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    xfer_len: %d\n", chan->xfer_len);
chan             3870 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    xfer_count: %d\n", chan->xfer_count);
chan             3872 drivers/usb/dwc2/hcd.c 			chan->halt_on_queue);
chan             3874 drivers/usb/dwc2/hcd.c 			chan->halt_pending);
chan             3875 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    halt_status: %d\n", chan->halt_status);
chan             3876 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    do_split: %d\n", chan->do_split);
chan             3878 drivers/usb/dwc2/hcd.c 			chan->complete_split);
chan             3879 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    hub_addr: %d\n", chan->hub_addr);
chan             3880 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    hub_port: %d\n", chan->hub_port);
chan             3881 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    xact_pos: %d\n", chan->xact_pos);
chan             3882 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    requests: %d\n", chan->requests);
chan             3883 drivers/usb/dwc2/hcd.c 		dev_dbg(hsotg->dev, "    qh: %p\n", chan->qh);
chan             3885 drivers/usb/dwc2/hcd.c 		if (chan->xfer_started) {
chan             3900 drivers/usb/dwc2/hcd.c 		if (!(chan->xfer_started && chan->qh))
chan             3903 drivers/usb/dwc2/hcd.c 		list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) {
chan             4949 drivers/usb/dwc2/hcd.c 		struct dwc2_host_chan *chan = hsotg->hc_ptr_array[i];
chan             4951 drivers/usb/dwc2/hcd.c 		if (chan) {
chan             4953 drivers/usb/dwc2/hcd.c 				i, chan);
chan             4955 drivers/usb/dwc2/hcd.c 			kfree(chan);
chan              454 drivers/usb/dwc2/hcd.h 	struct dwc2_host_chan *chan;
chan              481 drivers/usb/dwc2/hcd.h void dwc2_hc_cleanup(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan);
chan              482 drivers/usb/dwc2/hcd.h void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
chan              485 drivers/usb/dwc2/hcd.h 				 struct dwc2_host_chan *chan);
chan              591 drivers/usb/dwc2/hcd.h 				 struct dwc2_host_chan *chan, int chnum,
chan              759 drivers/usb/dwc2/hcd.h 			       struct dwc2_host_chan *chan, int chnum,
chan              233 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_host_chan *chan;
chan              252 drivers/usb/dwc2/hcd_ddma.c 	chan = qh->channel;
chan              262 drivers/usb/dwc2/hcd_ddma.c 			hsotg->frame_list[j] |= 1 << chan->hc_num;
chan              264 drivers/usb/dwc2/hcd_ddma.c 			hsotg->frame_list[j] &= ~(1 << chan->hc_num);
chan              280 drivers/usb/dwc2/hcd_ddma.c 	chan->schinfo = 0;
chan              281 drivers/usb/dwc2/hcd_ddma.c 	if (chan->speed == USB_SPEED_HIGH && qh->host_interval) {
chan              286 drivers/usb/dwc2/hcd_ddma.c 			chan->schinfo |= j;
chan              290 drivers/usb/dwc2/hcd_ddma.c 		chan->schinfo = 0xff;
chan              297 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_host_chan *chan = qh->channel;
chan              313 drivers/usb/dwc2/hcd_ddma.c 	if (chan->qh) {
chan              314 drivers/usb/dwc2/hcd_ddma.c 		if (!list_empty(&chan->hc_list_entry))
chan              315 drivers/usb/dwc2/hcd_ddma.c 			list_del(&chan->hc_list_entry);
chan              316 drivers/usb/dwc2/hcd_ddma.c 		dwc2_hc_cleanup(hsotg, chan);
chan              317 drivers/usb/dwc2/hcd_ddma.c 		list_add_tail(&chan->hc_list_entry, &hsotg->free_hc_list);
chan              318 drivers/usb/dwc2/hcd_ddma.c 		chan->qh = NULL;
chan              690 drivers/usb/dwc2/hcd_ddma.c 				    struct dwc2_host_chan *chan,
chan              695 drivers/usb/dwc2/hcd_ddma.c 	int len = chan->xfer_len;
chan              697 drivers/usb/dwc2/hcd_ddma.c 	if (len > HOST_DMA_NBYTES_LIMIT - (chan->max_packet - 1))
chan              698 drivers/usb/dwc2/hcd_ddma.c 		len = HOST_DMA_NBYTES_LIMIT - (chan->max_packet - 1);
chan              700 drivers/usb/dwc2/hcd_ddma.c 	if (chan->ep_is_in) {
chan              703 drivers/usb/dwc2/hcd_ddma.c 		if (len > 0 && chan->max_packet)
chan              704 drivers/usb/dwc2/hcd_ddma.c 			num_packets = (len + chan->max_packet - 1)
chan              705 drivers/usb/dwc2/hcd_ddma.c 					/ chan->max_packet;
chan              711 drivers/usb/dwc2/hcd_ddma.c 		len = num_packets * chan->max_packet;
chan              721 drivers/usb/dwc2/hcd_ddma.c 	dma_desc->buf = (u32)chan->xfer_dma;
chan              733 drivers/usb/dwc2/hcd_ddma.c 	if (len > chan->xfer_len) {
chan              734 drivers/usb/dwc2/hcd_ddma.c 		chan->xfer_len = 0;
chan              736 drivers/usb/dwc2/hcd_ddma.c 		chan->xfer_dma += len;
chan              737 drivers/usb/dwc2/hcd_ddma.c 		chan->xfer_len -= len;
chan              745 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_host_chan *chan = qh->channel;
chan              749 drivers/usb/dwc2/hcd_ddma.c 		 (unsigned long)chan->xfer_dma, chan->xfer_len);
chan              763 drivers/usb/dwc2/hcd_ddma.c 			chan->xfer_dma = qtd->urb->dma +
chan              765 drivers/usb/dwc2/hcd_ddma.c 			chan->xfer_len = qtd->urb->length -
chan              768 drivers/usb/dwc2/hcd_ddma.c 				 (unsigned long)chan->xfer_dma, chan->xfer_len);
chan              786 drivers/usb/dwc2/hcd_ddma.c 			dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc);
chan              794 drivers/usb/dwc2/hcd_ddma.c 		} while (chan->xfer_len > 0 &&
chan              824 drivers/usb/dwc2/hcd_ddma.c 		chan->ntd = n_desc;
chan              850 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_host_chan *chan = qh->channel;
chan              853 drivers/usb/dwc2/hcd_ddma.c 	switch (chan->ep_type) {
chan              857 drivers/usb/dwc2/hcd_ddma.c 		dwc2_hc_start_transfer_ddma(hsotg, chan);
chan              862 drivers/usb/dwc2/hcd_ddma.c 		dwc2_hc_start_transfer_ddma(hsotg, chan);
chan              869 drivers/usb/dwc2/hcd_ddma.c 		if (!chan->xfer_started) {
chan              877 drivers/usb/dwc2/hcd_ddma.c 			chan->ntd = dwc2_max_desc_num(qh);
chan              880 drivers/usb/dwc2/hcd_ddma.c 			dwc2_hc_start_transfer_ddma(hsotg, chan);
chan              893 drivers/usb/dwc2/hcd_ddma.c 					struct dwc2_host_chan *chan,
chan              914 drivers/usb/dwc2/hcd_ddma.c 	if (chan->ep_is_in)
chan              947 drivers/usb/dwc2/hcd_ddma.c 		if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE)
chan              962 drivers/usb/dwc2/hcd_ddma.c 					 struct dwc2_host_chan *chan,
chan              971 drivers/usb/dwc2/hcd_ddma.c 	qh = chan->qh;
chan              974 drivers/usb/dwc2/hcd_ddma.c 	if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE) {
chan             1032 drivers/usb/dwc2/hcd_ddma.c 			rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh,
chan             1037 drivers/usb/dwc2/hcd_ddma.c 						    chan->speed);
chan             1068 drivers/usb/dwc2/hcd_ddma.c 					       struct dwc2_host_chan *chan,
chan             1077 drivers/usb/dwc2/hcd_ddma.c 	if (chan->ep_is_in)
chan             1115 drivers/usb/dwc2/hcd_ddma.c 			 chan->hc_num);
chan             1119 drivers/usb/dwc2/hcd_ddma.c 	if (chan->ep_type == USB_ENDPOINT_XFER_CONTROL) {
chan             1150 drivers/usb/dwc2/hcd_ddma.c 				      struct dwc2_host_chan *chan,
chan             1156 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_qh *qh = chan->qh;
chan             1178 drivers/usb/dwc2/hcd_ddma.c 	failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc,
chan             1209 drivers/usb/dwc2/hcd_ddma.c 				dwc2_hcd_save_data_toggle(hsotg, chan, chnum,
chan             1222 drivers/usb/dwc2/hcd_ddma.c 					     struct dwc2_host_chan *chan,
chan             1227 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_qh *qh = chan->qh;
chan             1232 drivers/usb/dwc2/hcd_ddma.c 	if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE) {
chan             1247 drivers/usb/dwc2/hcd_ddma.c 			if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd,
chan             1267 drivers/usb/dwc2/hcd_ddma.c 			dwc2_hcd_save_data_toggle(hsotg, chan, chnum, NULL);
chan             1271 drivers/usb/dwc2/hcd_ddma.c 		if (chan->hcint & HCINTMSK_NYET) {
chan             1300 drivers/usb/dwc2/hcd_ddma.c 				 struct dwc2_host_chan *chan, int chnum,
chan             1303 drivers/usb/dwc2/hcd_ddma.c 	struct dwc2_qh *qh = chan->qh;
chan             1307 drivers/usb/dwc2/hcd_ddma.c 	if (chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1308 drivers/usb/dwc2/hcd_ddma.c 		dwc2_complete_isoc_xfer_ddma(hsotg, chan, halt_status);
chan             1330 drivers/usb/dwc2/hcd_ddma.c 				dwc2_hc_halt(hsotg, chan, halt_status);
chan             1341 drivers/usb/dwc2/hcd_ddma.c 			if (!chan->halt_status)
chan             1353 drivers/usb/dwc2/hcd_ddma.c 		dwc2_complete_non_isoc_xfer_ddma(hsotg, chan, chnum,
chan               98 drivers/usb/dwc2/hcd_intr.c 				    struct dwc2_host_chan *chan,
chan              104 drivers/usb/dwc2/hcd_intr.c 	if (!chan->qh)
chan              107 drivers/usb/dwc2/hcd_intr.c 	if (chan->qh->dev_speed == USB_SPEED_HIGH)
chan              127 drivers/usb/dwc2/hcd_intr.c 		chan->qh->tt_buffer_dirty = 1;
chan              130 drivers/usb/dwc2/hcd_intr.c 			chan->qh->tt_buffer_dirty = 0;
chan              189 drivers/usb/dwc2/hcd_intr.c 	struct dwc2_host_chan *chan;
chan              196 drivers/usb/dwc2/hcd_intr.c 	chan = hsotg->hc_ptr_array[chnum];
chan              197 drivers/usb/dwc2/hcd_intr.c 	if (!chan) {
chan              211 drivers/usb/dwc2/hcd_intr.c 			 chan->data_pid_start);
chan              219 drivers/usb/dwc2/hcd_intr.c 			dwc2_read_packet(hsotg, chan->xfer_buf, bcnt);
chan              222 drivers/usb/dwc2/hcd_intr.c 			chan->xfer_count += bcnt;
chan              223 drivers/usb/dwc2/hcd_intr.c 			chan->xfer_buf += bcnt;
chan              437 drivers/usb/dwc2/hcd_intr.c 				       struct dwc2_host_chan *chan, int chnum,
chan              447 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_is_in) {
chan              450 drivers/usb/dwc2/hcd_intr.c 			length = chan->xfer_len - count;
chan              453 drivers/usb/dwc2/hcd_intr.c 		} else if (chan->qh->do_split) {
chan              456 drivers/usb/dwc2/hcd_intr.c 			length = chan->xfer_len;
chan              469 drivers/usb/dwc2/hcd_intr.c 		length = (chan->start_pkt_count - count) * chan->max_packet;
chan              491 drivers/usb/dwc2/hcd_intr.c 				 struct dwc2_host_chan *chan, int chnum,
chan              498 drivers/usb/dwc2/hcd_intr.c 	int xfer_length = dwc2_get_actual_xfer_length(hsotg, chan, chnum, qtd,
chan              511 drivers/usb/dwc2/hcd_intr.c 	if (xfer_length && chan->ep_type == USB_ENDPOINT_XFER_BULK &&
chan              514 drivers/usb/dwc2/hcd_intr.c 	    !(urb->length % chan->max_packet)) {
chan              523 drivers/usb/dwc2/hcd_intr.c 		 __func__, (chan->ep_is_in ? "IN" : "OUT"), chnum);
chan              524 drivers/usb/dwc2/hcd_intr.c 	dev_vdbg(hsotg->dev, "  chan->xfer_len %d\n", chan->xfer_len);
chan              541 drivers/usb/dwc2/hcd_intr.c 			       struct dwc2_host_chan *chan, int chnum,
chan              547 drivers/usb/dwc2/hcd_intr.c 	if (chan->ep_type != USB_ENDPOINT_XFER_CONTROL) {
chan              548 drivers/usb/dwc2/hcd_intr.c 		if (WARN(!chan || !chan->qh,
chan              553 drivers/usb/dwc2/hcd_intr.c 			chan->qh->data_toggle = DWC2_HC_PID_DATA0;
chan              555 drivers/usb/dwc2/hcd_intr.c 			chan->qh->data_toggle = DWC2_HC_PID_DATA1;
chan              585 drivers/usb/dwc2/hcd_intr.c 		struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
chan              601 drivers/usb/dwc2/hcd_intr.c 					chan, chnum, qtd, halt_status, NULL);
chan              605 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_is_in)
chan              620 drivers/usb/dwc2/hcd_intr.c 					chan, chnum, qtd, halt_status, NULL);
chan              623 drivers/usb/dwc2/hcd_intr.c 		if (chan->qh->do_split &&
chan              624 drivers/usb/dwc2/hcd_intr.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in &&
chan              705 drivers/usb/dwc2/hcd_intr.c 				 struct dwc2_host_chan *chan,
chan              713 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan              715 drivers/usb/dwc2/hcd_intr.c 			 __func__, chan->hc_num, halt_status);
chan              751 drivers/usb/dwc2/hcd_intr.c 	dwc2_deactivate_qh(hsotg, chan->qh, free_qtd);
chan              759 drivers/usb/dwc2/hcd_intr.c 	if (!list_empty(&chan->hc_list_entry))
chan              760 drivers/usb/dwc2/hcd_intr.c 		list_del(&chan->hc_list_entry);
chan              761 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_cleanup(hsotg, chan);
chan              762 drivers/usb/dwc2/hcd_intr.c 	list_add_tail(&chan->hc_list_entry, &hsotg->free_hc_list);
chan              767 drivers/usb/dwc2/hcd_intr.c 		switch (chan->ep_type) {
chan              784 drivers/usb/dwc2/hcd_intr.c 	haintmsk &= ~(1 << chan->hc_num);
chan              804 drivers/usb/dwc2/hcd_intr.c 			      struct dwc2_host_chan *chan, struct dwc2_qtd *qtd,
chan              807 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan              811 drivers/usb/dwc2/hcd_intr.c 		if (dbg_hc(chan))
chan              813 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd, halt_status);
chan              818 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_halt(hsotg, chan, halt_status);
chan              820 drivers/usb/dwc2/hcd_intr.c 	if (chan->halt_on_queue) {
chan              824 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_type == USB_ENDPOINT_XFER_CONTROL ||
chan              825 drivers/usb/dwc2/hcd_intr.c 		    chan->ep_type == USB_ENDPOINT_XFER_BULK) {
chan              843 drivers/usb/dwc2/hcd_intr.c 			list_move_tail(&chan->qh->qh_list_entry,
chan              864 drivers/usb/dwc2/hcd_intr.c 					    struct dwc2_host_chan *chan,
chan              872 drivers/usb/dwc2/hcd_intr.c 	if (chan->hcint & HCINTMSK_NYET) {
chan              879 drivers/usb/dwc2/hcd_intr.c 		chan->qh->ping_state = 1;
chan              892 drivers/usb/dwc2/hcd_intr.c 	if (chan->ep_is_in) {
chan              898 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, halt_status);
chan              904 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd, halt_status);
chan              914 drivers/usb/dwc2/hcd_intr.c 					struct dwc2_host_chan *chan, int chnum,
chan              922 drivers/usb/dwc2/hcd_intr.c 	if (!chan->ep_is_in || (hctsiz & TSIZ_PKTCNT_MASK) == 0)
chan              924 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd, halt_status);
chan              927 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, halt_status);
chan              931 drivers/usb/dwc2/hcd_intr.c 				       struct dwc2_host_chan *chan, int chnum,
chan              943 drivers/usb/dwc2/hcd_intr.c 	len = dwc2_get_actual_xfer_length(hsotg, chan, chnum, qtd,
chan              952 drivers/usb/dwc2/hcd_intr.c 	if (chan->align_buf) {
chan              954 drivers/usb/dwc2/hcd_intr.c 		dma_unmap_single(hsotg->dev, chan->qh->dw_align_buf_dma,
chan              956 drivers/usb/dwc2/hcd_intr.c 		memcpy(qtd->urb->buf + (chan->xfer_dma - qtd->urb->dma),
chan              957 drivers/usb/dwc2/hcd_intr.c 		       chan->qh->dw_align_buf, len);
chan              974 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd,
chan              977 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd,
chan              989 drivers/usb/dwc2/hcd_intr.c 				  struct dwc2_host_chan *chan, int chnum,
chan              997 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1008 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, halt_status);
chan             1016 drivers/usb/dwc2/hcd_intr.c 	if (chan->qh->do_split) {
chan             1017 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in &&
chan             1020 drivers/usb/dwc2/hcd_intr.c 			    dwc2_xfercomp_isoc_split_in(hsotg, chan, chnum,
chan             1042 drivers/usb/dwc2/hcd_intr.c 			urb_xfer_done = dwc2_update_urb_state(hsotg, chan,
chan             1049 drivers/usb/dwc2/hcd_intr.c 				dwc2_hcd_save_data_toggle(hsotg, chan, chnum,
chan             1063 drivers/usb/dwc2/hcd_intr.c 		dwc2_complete_non_periodic_xfer(hsotg, chan, chnum, qtd,
chan             1068 drivers/usb/dwc2/hcd_intr.c 		urb_xfer_done = dwc2_update_urb_state(hsotg, chan, chnum, urb,
chan             1077 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1078 drivers/usb/dwc2/hcd_intr.c 		dwc2_complete_non_periodic_xfer(hsotg, chan, chnum, qtd,
chan             1083 drivers/usb/dwc2/hcd_intr.c 		urb_xfer_done = dwc2_update_urb_state(hsotg, chan, chnum, urb,
chan             1097 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1098 drivers/usb/dwc2/hcd_intr.c 		dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd,
chan             1105 drivers/usb/dwc2/hcd_intr.c 			halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
chan             1108 drivers/usb/dwc2/hcd_intr.c 		dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd,
chan             1122 drivers/usb/dwc2/hcd_intr.c 			       struct dwc2_host_chan *chan, int chnum,
chan             1132 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             1155 drivers/usb/dwc2/hcd_intr.c 		chan->qh->data_toggle = 0;
chan             1159 drivers/usb/dwc2/hcd_intr.c 	dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_STALL);
chan             1172 drivers/usb/dwc2/hcd_intr.c 				      struct dwc2_host_chan *chan, int chnum,
chan             1177 drivers/usb/dwc2/hcd_intr.c 	u32 xfer_length = dwc2_get_actual_xfer_length(hsotg, chan, chnum,
chan             1190 drivers/usb/dwc2/hcd_intr.c 		 __func__, (chan->ep_is_in ? "IN" : "OUT"), chnum);
chan             1192 drivers/usb/dwc2/hcd_intr.c 		 chan->start_pkt_count);
chan             1195 drivers/usb/dwc2/hcd_intr.c 	dev_vdbg(hsotg->dev, "  chan->max_packet %d\n", chan->max_packet);
chan             1209 drivers/usb/dwc2/hcd_intr.c 			     struct dwc2_host_chan *chan, int chnum,
chan             1222 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1245 drivers/usb/dwc2/hcd_intr.c 	if (chan->do_split) {
chan             1246 drivers/usb/dwc2/hcd_intr.c 		if (chan->complete_split)
chan             1251 drivers/usb/dwc2/hcd_intr.c 				!(chan->ep_type == USB_ENDPOINT_XFER_CONTROL &&
chan             1252 drivers/usb/dwc2/hcd_intr.c 				  chan->ep_is_in);
chan             1253 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NAK);
chan             1260 drivers/usb/dwc2/hcd_intr.c 		if (hsotg->params.host_dma && chan->ep_is_in) {
chan             1278 drivers/usb/dwc2/hcd_intr.c 		if (!chan->qh->ping_state) {
chan             1279 drivers/usb/dwc2/hcd_intr.c 			dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
chan             1281 drivers/usb/dwc2/hcd_intr.c 			dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1283 drivers/usb/dwc2/hcd_intr.c 			if (chan->speed == USB_SPEED_HIGH)
chan             1284 drivers/usb/dwc2/hcd_intr.c 				chan->qh->ping_state = 1;
chan             1292 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NAK);
chan             1296 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NAK);
chan             1314 drivers/usb/dwc2/hcd_intr.c 			     struct dwc2_host_chan *chan, int chnum,
chan             1319 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1323 drivers/usb/dwc2/hcd_intr.c 	if (chan->do_split) {
chan             1325 drivers/usb/dwc2/hcd_intr.c 		if (!chan->ep_is_in &&
chan             1326 drivers/usb/dwc2/hcd_intr.c 		    chan->data_pid_start != DWC2_HC_PID_SETUP)
chan             1327 drivers/usb/dwc2/hcd_intr.c 			qtd->ssplit_out_xfer_count = chan->xfer_len;
chan             1329 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_type != USB_ENDPOINT_XFER_ISOC || chan->ep_is_in) {
chan             1331 drivers/usb/dwc2/hcd_intr.c 			dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_ACK);
chan             1334 drivers/usb/dwc2/hcd_intr.c 			switch (chan->xact_pos) {
chan             1365 drivers/usb/dwc2/hcd_intr.c 		if (chan->qh->ping_state) {
chan             1366 drivers/usb/dwc2/hcd_intr.c 			chan->qh->ping_state = 0;
chan             1374 drivers/usb/dwc2/hcd_intr.c 			dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_ACK);
chan             1393 drivers/usb/dwc2/hcd_intr.c 			      struct dwc2_host_chan *chan, int chnum,
chan             1396 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1404 drivers/usb/dwc2/hcd_intr.c 	if (chan->do_split && chan->complete_split) {
chan             1405 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_is_in && chan->ep_type == USB_ENDPOINT_XFER_ISOC &&
chan             1413 drivers/usb/dwc2/hcd_intr.c 				dwc2_release_channel(hsotg, chan, qtd,
chan             1416 drivers/usb/dwc2/hcd_intr.c 				dwc2_release_channel(hsotg, chan, qtd,
chan             1422 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1423 drivers/usb/dwc2/hcd_intr.c 		    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1424 drivers/usb/dwc2/hcd_intr.c 			struct dwc2_qh *qh = chan->qh;
chan             1484 drivers/usb/dwc2/hcd_intr.c 				dwc2_halt_channel(hsotg, chan, qtd,
chan             1491 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NYET);
chan             1495 drivers/usb/dwc2/hcd_intr.c 	chan->qh->ping_state = 1;
chan             1498 drivers/usb/dwc2/hcd_intr.c 	dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb, qtd,
chan             1500 drivers/usb/dwc2/hcd_intr.c 	dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1506 drivers/usb/dwc2/hcd_intr.c 	dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_NYET);
chan             1517 drivers/usb/dwc2/hcd_intr.c 				struct dwc2_host_chan *chan, int chnum,
chan             1523 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
chan             1526 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             1531 drivers/usb/dwc2/hcd_intr.c 	if (chan->ep_type != USB_ENDPOINT_XFER_ISOC) {
chan             1533 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_BABBLE_ERR);
chan             1537 drivers/usb/dwc2/hcd_intr.c 		halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum,
chan             1539 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, halt_status);
chan             1551 drivers/usb/dwc2/hcd_intr.c 				struct dwc2_host_chan *chan, int chnum,
chan             1567 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
chan             1603 drivers/usb/dwc2/hcd_intr.c 	switch (chan->speed) {
chan             1632 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             1644 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_halt(hsotg, chan, DWC2_HC_XFER_AHB_ERR);
chan             1655 drivers/usb/dwc2/hcd_intr.c 				 struct dwc2_host_chan *chan, int chnum,
chan             1661 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
chan             1664 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             1673 drivers/usb/dwc2/hcd_intr.c 		if (!chan->qh->ping_state) {
chan             1674 drivers/usb/dwc2/hcd_intr.c 			dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
chan             1676 drivers/usb/dwc2/hcd_intr.c 			dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1677 drivers/usb/dwc2/hcd_intr.c 			if (!chan->ep_is_in && chan->speed == USB_SPEED_HIGH)
chan             1678 drivers/usb/dwc2/hcd_intr.c 				chan->qh->ping_state = 1;
chan             1685 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_XACT_ERR);
chan             1689 drivers/usb/dwc2/hcd_intr.c 		if (chan->do_split && chan->complete_split)
chan             1691 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_XACT_ERR);
chan             1697 drivers/usb/dwc2/hcd_intr.c 			halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
chan             1699 drivers/usb/dwc2/hcd_intr.c 			dwc2_halt_channel(hsotg, chan, qtd, halt_status);
chan             1713 drivers/usb/dwc2/hcd_intr.c 				  struct dwc2_host_chan *chan, int chnum,
chan             1718 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1722 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
chan             1729 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_FRAME_OVERRUN);
chan             1732 drivers/usb/dwc2/hcd_intr.c 		halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum,
chan             1734 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, halt_status);
chan             1746 drivers/usb/dwc2/hcd_intr.c 				    struct dwc2_host_chan *chan, int chnum,
chan             1752 drivers/usb/dwc2/hcd_intr.c 	if (chan->ep_is_in)
chan             1759 drivers/usb/dwc2/hcd_intr.c 	dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
chan             1771 drivers/usb/dwc2/hcd_intr.c 				struct dwc2_host_chan *chan, int chnum,
chan             1780 drivers/usb/dwc2/hcd_intr.c 	if (chan->halt_status == DWC2_HC_XFER_NO_HALT_STATUS) {
chan             1797 drivers/usb/dwc2/hcd_intr.c 			chan->hcint, hcintmsk, hcsplt);
chan             1817 drivers/usb/dwc2/hcd_intr.c 		chan->halt_pending = 0;
chan             1818 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, chan->halt_status);
chan             1831 drivers/usb/dwc2/hcd_intr.c 				    struct dwc2_host_chan *chan, int chnum,
chan             1837 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             1847 drivers/usb/dwc2/hcd_intr.c 		if (chan->speed == USB_SPEED_HIGH && !chan->ep_is_in &&
chan             1848 drivers/usb/dwc2/hcd_intr.c 		    (chan->ep_type == USB_ENDPOINT_XFER_CONTROL ||
chan             1849 drivers/usb/dwc2/hcd_intr.c 		     chan->ep_type == USB_ENDPOINT_XFER_BULK)) {
chan             1854 drivers/usb/dwc2/hcd_intr.c 	if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE ||
chan             1855 drivers/usb/dwc2/hcd_intr.c 	    (chan->halt_status == DWC2_HC_XFER_AHB_ERR &&
chan             1858 drivers/usb/dwc2/hcd_intr.c 			dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             1859 drivers/usb/dwc2/hcd_intr.c 						    chan->halt_status);
chan             1867 drivers/usb/dwc2/hcd_intr.c 			dwc2_release_channel(hsotg, chan, qtd,
chan             1868 drivers/usb/dwc2/hcd_intr.c 					     chan->halt_status);
chan             1874 drivers/usb/dwc2/hcd_intr.c 	if (chan->hcint & HCINTMSK_XFERCOMPL) {
chan             1882 drivers/usb/dwc2/hcd_intr.c 		if (chan->ep_type == USB_ENDPOINT_XFER_ISOC && !chan->ep_is_in)
chan             1883 drivers/usb/dwc2/hcd_intr.c 			dwc2_hc_ack_intr(hsotg, chan, chnum, qtd);
chan             1884 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_xfercomp_intr(hsotg, chan, chnum, qtd);
chan             1885 drivers/usb/dwc2/hcd_intr.c 	} else if (chan->hcint & HCINTMSK_STALL) {
chan             1886 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_stall_intr(hsotg, chan, chnum, qtd);
chan             1887 drivers/usb/dwc2/hcd_intr.c 	} else if ((chan->hcint & HCINTMSK_XACTERR) &&
chan             1890 drivers/usb/dwc2/hcd_intr.c 			if (chan->hcint &
chan             1906 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd);
chan             1907 drivers/usb/dwc2/hcd_intr.c 	} else if ((chan->hcint & HCINTMSK_XCS_XACT) &&
chan             1909 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd);
chan             1910 drivers/usb/dwc2/hcd_intr.c 	} else if ((chan->hcint & HCINTMSK_AHBERR) &&
chan             1912 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_ahberr_intr(hsotg, chan, chnum, qtd);
chan             1913 drivers/usb/dwc2/hcd_intr.c 	} else if (chan->hcint & HCINTMSK_BBLERR) {
chan             1914 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_babble_intr(hsotg, chan, chnum, qtd);
chan             1915 drivers/usb/dwc2/hcd_intr.c 	} else if (chan->hcint & HCINTMSK_FRMOVRUN) {
chan             1916 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_frmovrun_intr(hsotg, chan, chnum, qtd);
chan             1918 drivers/usb/dwc2/hcd_intr.c 		if (chan->hcint & HCINTMSK_NYET) {
chan             1925 drivers/usb/dwc2/hcd_intr.c 			dwc2_hc_nyet_intr(hsotg, chan, chnum, qtd);
chan             1926 drivers/usb/dwc2/hcd_intr.c 		} else if ((chan->hcint & HCINTMSK_NAK) &&
chan             1935 drivers/usb/dwc2/hcd_intr.c 			dwc2_hc_nak_intr(hsotg, chan, chnum, qtd);
chan             1936 drivers/usb/dwc2/hcd_intr.c 		} else if ((chan->hcint & HCINTMSK_ACK) &&
chan             1945 drivers/usb/dwc2/hcd_intr.c 			dwc2_hc_ack_intr(hsotg, chan, chnum, qtd);
chan             1947 drivers/usb/dwc2/hcd_intr.c 			if (chan->ep_type == USB_ENDPOINT_XFER_INT ||
chan             1948 drivers/usb/dwc2/hcd_intr.c 			    chan->ep_type == USB_ENDPOINT_XFER_ISOC) {
chan             1958 drivers/usb/dwc2/hcd_intr.c 				dwc2_halt_channel(hsotg, chan, qtd,
chan             1966 drivers/usb/dwc2/hcd_intr.c 					chan->hcint,
chan             1974 drivers/usb/dwc2/hcd_intr.c 			 chan->hcint);
chan             1978 drivers/usb/dwc2/hcd_intr.c 		dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
chan             1980 drivers/usb/dwc2/hcd_intr.c 		dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
chan             1981 drivers/usb/dwc2/hcd_intr.c 		dwc2_halt_channel(hsotg, chan, qtd, DWC2_HC_XFER_XACT_ERR);
chan             1997 drivers/usb/dwc2/hcd_intr.c 				struct dwc2_host_chan *chan, int chnum,
chan             2000 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan))
chan             2005 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_chhltd_intr_dma(hsotg, chan, chnum, qtd);
chan             2007 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_halt_status_ok(hsotg, chan, chnum, qtd))
chan             2009 drivers/usb/dwc2/hcd_intr.c 		dwc2_release_channel(hsotg, chan, qtd, chan->halt_status);
chan             2035 drivers/usb/dwc2/hcd_intr.c 	struct dwc2_host_chan *chan;
chan             2038 drivers/usb/dwc2/hcd_intr.c 	chan = hsotg->hc_ptr_array[chnum];
chan             2042 drivers/usb/dwc2/hcd_intr.c 	if (!chan) {
chan             2048 drivers/usb/dwc2/hcd_intr.c 	if (dbg_hc(chan)) {
chan             2062 drivers/usb/dwc2/hcd_intr.c 	if (!chan->qh) {
chan             2067 drivers/usb/dwc2/hcd_intr.c 	chan->hcint = hcint;
chan             2075 drivers/usb/dwc2/hcd_intr.c 	if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE) {
chan             2082 drivers/usb/dwc2/hcd_intr.c 			dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
chan             2083 drivers/usb/dwc2/hcd_intr.c 						    chan->halt_status);
chan             2085 drivers/usb/dwc2/hcd_intr.c 			dwc2_release_channel(hsotg, chan, NULL,
chan             2086 drivers/usb/dwc2/hcd_intr.c 					     chan->halt_status);
chan             2090 drivers/usb/dwc2/hcd_intr.c 	if (list_empty(&chan->qh->qtd_list)) {
chan             2099 drivers/usb/dwc2/hcd_intr.c 			chan->hcint, hcintmsk, hcint);
chan             2100 drivers/usb/dwc2/hcd_intr.c 		chan->halt_status = DWC2_HC_XFER_NO_HALT_STATUS;
chan             2102 drivers/usb/dwc2/hcd_intr.c 		chan->hcint = 0;
chan             2106 drivers/usb/dwc2/hcd_intr.c 	qtd = list_first_entry(&chan->qh->qtd_list, struct dwc2_qtd,
chan             2115 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_xfercomp_intr(hsotg, chan, chnum, qtd);
chan             2125 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_chhltd_intr(hsotg, chan, chnum, qtd);
chan             2126 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2130 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_ahberr_intr(hsotg, chan, chnum, qtd);
chan             2131 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2135 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_stall_intr(hsotg, chan, chnum, qtd);
chan             2136 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2140 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_nak_intr(hsotg, chan, chnum, qtd);
chan             2141 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2145 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_ack_intr(hsotg, chan, chnum, qtd);
chan             2146 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2150 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_nyet_intr(hsotg, chan, chnum, qtd);
chan             2151 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2155 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd);
chan             2156 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2160 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_babble_intr(hsotg, chan, chnum, qtd);
chan             2161 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2165 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_frmovrun_intr(hsotg, chan, chnum, qtd);
chan             2166 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2170 drivers/usb/dwc2/hcd_intr.c 		dwc2_hc_datatglerr_intr(hsotg, chan, chnum, qtd);
chan             2171 drivers/usb/dwc2/hcd_intr.c 		if (!dwc2_check_qtd_still_ok(qtd, chan->qh))
chan             2176 drivers/usb/dwc2/hcd_intr.c 	chan->hcint = 0;
chan             2189 drivers/usb/dwc2/hcd_intr.c 	struct dwc2_host_chan *chan, *chan_tmp;
chan             2204 drivers/usb/dwc2/hcd_intr.c 	list_for_each_entry_safe(chan, chan_tmp, &hsotg->split_order,
chan             2206 drivers/usb/dwc2/hcd_intr.c 		int hc_num = chan->hc_num;
chan              374 drivers/usb/gadget/udc/bcm63xx_udc.c static inline u32 usb_dmac_readl(struct bcm63xx_udc *udc, u32 off, int chan)
chan              377 drivers/usb/gadget/udc/bcm63xx_udc.c 			(ENETDMA_CHAN_WIDTH * chan));
chan              381 drivers/usb/gadget/udc/bcm63xx_udc.c 					int chan)
chan              384 drivers/usb/gadget/udc/bcm63xx_udc.c 			(ENETDMA_CHAN_WIDTH * chan));
chan              387 drivers/usb/gadget/udc/bcm63xx_udc.c static inline u32 usb_dmas_readl(struct bcm63xx_udc *udc, u32 off, int chan)
chan              390 drivers/usb/gadget/udc/bcm63xx_udc.c 			(ENETDMA_CHAN_WIDTH * chan));
chan              394 drivers/usb/gadget/udc/bcm63xx_udc.c 					int chan)
chan              397 drivers/usb/gadget/udc/bcm63xx_udc.c 			(ENETDMA_CHAN_WIDTH * chan));
chan              108 drivers/usb/gadget/udc/omap_udc.h #define	UDC_TXDMA(chan)			(UDC_BASE + 0x50 - 4 + 4 * (chan))
chan              112 drivers/usb/gadget/udc/omap_udc.h #define	UDC_RXDMA(chan)			(UDC_BASE + 0x60 - 4 + 4 * (chan))
chan               26 drivers/usb/musb/tusb6010_omap.c 	struct dma_chan		*chan;
chan              297 drivers/usb/musb/tusb6010_omap.c 	ret = dmaengine_slave_config(dma_data->chan, &dma_cfg);
chan              303 drivers/usb/musb/tusb6010_omap.c 	dma_desc = dmaengine_prep_slave_single(dma_data->chan, dma_addr,
chan              342 drivers/usb/musb/tusb6010_omap.c 	dma_async_issue_pending(dma_data->chan);
chan              372 drivers/usb/musb/tusb6010_omap.c 		dmaengine_terminate_all(chdat->dma_data->chan);
chan              508 drivers/usb/musb/tusb6010_omap.c 	dmaengine_terminate_sync(chdat->dma_data->chan);
chan              528 drivers/usb/musb/tusb6010_omap.c 		if (tusb_dma && tusb_dma->dma_pool[i].chan)
chan              529 drivers/usb/musb/tusb6010_omap.c 			dma_release_channel(tusb_dma->dma_pool[i].chan);
chan              554 drivers/usb/musb/tusb6010_omap.c 			dma_data->chan = dma_request_chan(musb->controller,
chan              556 drivers/usb/musb/tusb6010_omap.c 			if (IS_ERR(dma_data->chan)) {
chan              559 drivers/usb/musb/tusb6010_omap.c 				ret = PTR_ERR(dma_data->chan);
chan              576 drivers/usb/musb/tusb6010_omap.c 			dma_release_channel(dma_data->chan);
chan              119 drivers/usb/renesas_usbhs/fifo.c 		struct dma_chan *chan = NULL;
chan              122 drivers/usb/renesas_usbhs/fifo.c 			chan = usbhsf_dma_chan_get(fifo, pkt);
chan              123 drivers/usb/renesas_usbhs/fifo.c 		if (chan) {
chan              124 drivers/usb/renesas_usbhs/fifo.c 			dmaengine_terminate_all(chan);
chan              801 drivers/usb/renesas_usbhs/fifo.c 	struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
chan              803 drivers/usb/renesas_usbhs/fifo.c 	return info->dma_map_ctrl(chan->device->dev, pkt, map);
chan              813 drivers/usb/renesas_usbhs/fifo.c 	struct dma_chan *chan;
chan              821 drivers/usb/renesas_usbhs/fifo.c 	chan = usbhsf_dma_chan_get(fifo, pkt);
chan              824 drivers/usb/renesas_usbhs/fifo.c 	desc = dmaengine_prep_slave_single(chan, pkt->dma + pkt->actual,
chan              844 drivers/usb/renesas_usbhs/fifo.c 	dma_async_issue_pending(chan);
chan             1152 drivers/usb/renesas_usbhs/fifo.c 					   struct dma_chan *chan, int dtln)
chan             1159 drivers/usb/renesas_usbhs/fifo.c 	dmaengine_tx_status(chan, pkt->cookie, &state);
chan             1177 drivers/usb/renesas_usbhs/fifo.c 	struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
chan             1189 drivers/usb/renesas_usbhs/fifo.c 	pkt->actual = usbhs_dma_calc_received_size(pkt, chan, rcv_len);
chan             1221 drivers/usb/renesas_usbhs/fifo.c static bool usbhsf_dma_filter(struct dma_chan *chan, void *param)
chan             1233 drivers/usb/renesas_usbhs/fifo.c 	chan->private = slave;
chan              691 drivers/video/fbdev/atmel_lcdfb.c static inline unsigned int chan_to_field(unsigned int chan, const struct fb_bitfield *bf)
chan              693 drivers/video/fbdev/atmel_lcdfb.c 	chan &= 0xffff;
chan              694 drivers/video/fbdev/atmel_lcdfb.c 	chan >>= 16 - bf->length;
chan              695 drivers/video/fbdev/atmel_lcdfb.c 	return chan << bf->offset;
chan               20 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeon_i2c_chan 	*chan = data;
chan               21 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeonfb_info	*rinfo = chan->rinfo;
chan               24 drivers/video/fbdev/aty/radeon_i2c.c 	val = INREG(chan->ddc_reg) & ~(VGA_DDC_CLK_OUT_EN);
chan               28 drivers/video/fbdev/aty/radeon_i2c.c 	OUTREG(chan->ddc_reg, val);
chan               29 drivers/video/fbdev/aty/radeon_i2c.c 	(void)INREG(chan->ddc_reg);
chan               34 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeon_i2c_chan 	*chan = data;
chan               35 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeonfb_info	*rinfo = chan->rinfo;
chan               38 drivers/video/fbdev/aty/radeon_i2c.c 	val = INREG(chan->ddc_reg) & ~(VGA_DDC_DATA_OUT_EN);
chan               42 drivers/video/fbdev/aty/radeon_i2c.c 	OUTREG(chan->ddc_reg, val);
chan               43 drivers/video/fbdev/aty/radeon_i2c.c 	(void)INREG(chan->ddc_reg);
chan               48 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeon_i2c_chan 	*chan = data;
chan               49 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeonfb_info	*rinfo = chan->rinfo;
chan               52 drivers/video/fbdev/aty/radeon_i2c.c 	val = INREG(chan->ddc_reg);
chan               59 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeon_i2c_chan 	*chan = data;
chan               60 drivers/video/fbdev/aty/radeon_i2c.c 	struct radeonfb_info	*rinfo = chan->rinfo;
chan               63 drivers/video/fbdev/aty/radeon_i2c.c 	val = INREG(chan->ddc_reg);
chan               68 drivers/video/fbdev/aty/radeon_i2c.c static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name)
chan               72 drivers/video/fbdev/aty/radeon_i2c.c 	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
chan               74 drivers/video/fbdev/aty/radeon_i2c.c 	chan->adapter.owner		= THIS_MODULE;
chan               75 drivers/video/fbdev/aty/radeon_i2c.c 	chan->adapter.algo_data		= &chan->algo;
chan               76 drivers/video/fbdev/aty/radeon_i2c.c 	chan->adapter.dev.parent	= &chan->rinfo->pdev->dev;
chan               77 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.setsda		= radeon_gpio_setsda;
chan               78 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.setscl		= radeon_gpio_setscl;
chan               79 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.getsda		= radeon_gpio_getsda;
chan               80 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.getscl		= radeon_gpio_getscl;
chan               81 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.udelay		= 10;
chan               82 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.timeout		= 20;
chan               83 drivers/video/fbdev/aty/radeon_i2c.c 	chan->algo.data 		= chan;	
chan               85 drivers/video/fbdev/aty/radeon_i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan               88 drivers/video/fbdev/aty/radeon_i2c.c 	radeon_gpio_setsda(chan, 1);
chan               89 drivers/video/fbdev/aty/radeon_i2c.c 	radeon_gpio_setscl(chan, 1);
chan               92 drivers/video/fbdev/aty/radeon_i2c.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan               94 drivers/video/fbdev/aty/radeon_i2c.c 		dev_dbg(&chan->rinfo->pdev->dev, "I2C bus %s registered.\n", name);
chan               96 drivers/video/fbdev/aty/radeon_i2c.c 		dev_warn(&chan->rinfo->pdev->dev, "Failed to register I2C bus %s.\n", name);
chan              146 drivers/video/fbdev/geode/gx1fb_core.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              148 drivers/video/fbdev/geode/gx1fb_core.c 	chan &= 0xffff;
chan              149 drivers/video/fbdev/geode/gx1fb_core.c 	chan >>= 16 - bf->length;
chan              150 drivers/video/fbdev/geode/gx1fb_core.c 	return chan << bf->offset;
chan              171 drivers/video/fbdev/geode/gxfb_core.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              173 drivers/video/fbdev/geode/gxfb_core.c 	chan &= 0xffff;
chan              174 drivers/video/fbdev/geode/gxfb_core.c 	chan >>= 16 - bf->length;
chan              175 drivers/video/fbdev/geode/gxfb_core.c 	return chan << bf->offset;
chan              279 drivers/video/fbdev/geode/lxfb_core.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              281 drivers/video/fbdev/geode/lxfb_core.c 	chan &= 0xffff;
chan              282 drivers/video/fbdev/geode/lxfb_core.c 	chan >>= 16 - bf->length;
chan              283 drivers/video/fbdev/geode/lxfb_core.c 	return chan << bf->offset;
chan              570 drivers/video/fbdev/hyperv_fb.c static inline u32 chan_to_field(u32 chan, struct fb_bitfield *bf)
chan              572 drivers/video/fbdev/hyperv_fb.c 	return ((chan & 0xffff) >> (16 - bf->length)) << bf->offset;
chan               44 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_i2c_chan    *chan = data;
chan               45 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_par         *par = chan->par;
chan               49 drivers/video/fbdev/i810/i810-i2c.c 		i810_writel(mmio, chan->ddc_base, SCL_DIR_MASK | SCL_VAL_MASK);
chan               51 drivers/video/fbdev/i810/i810-i2c.c 		i810_writel(mmio, chan->ddc_base, SCL_DIR | SCL_DIR_MASK | SCL_VAL_MASK);
chan               52 drivers/video/fbdev/i810/i810-i2c.c 	i810_readl(mmio, chan->ddc_base);	/* flush posted write */
chan               57 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_i2c_chan    *chan = data;
chan               58 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_par         *par = chan->par;
chan               62 drivers/video/fbdev/i810/i810-i2c.c 		i810_writel(mmio, chan->ddc_base, SDA_DIR_MASK | SDA_VAL_MASK);
chan               64 drivers/video/fbdev/i810/i810-i2c.c 		i810_writel(mmio, chan->ddc_base, SDA_DIR | SDA_DIR_MASK | SDA_VAL_MASK);
chan               65 drivers/video/fbdev/i810/i810-i2c.c 	i810_readl(mmio, chan->ddc_base);	/* flush posted write */
chan               70 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_i2c_chan    *chan = data;
chan               71 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_par         *par = chan->par;
chan               74 drivers/video/fbdev/i810/i810-i2c.c 	i810_writel(mmio, chan->ddc_base, SCL_DIR_MASK);
chan               75 drivers/video/fbdev/i810/i810-i2c.c 	i810_writel(mmio, chan->ddc_base, 0);
chan               76 drivers/video/fbdev/i810/i810-i2c.c 	return ((i810_readl(mmio, chan->ddc_base) & SCL_VAL_IN) != 0);
chan               81 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_i2c_chan    *chan = data;
chan               82 drivers/video/fbdev/i810/i810-i2c.c         struct i810fb_par         *par = chan->par;
chan               85 drivers/video/fbdev/i810/i810-i2c.c 	i810_writel(mmio, chan->ddc_base, SDA_DIR_MASK);
chan               86 drivers/video/fbdev/i810/i810-i2c.c 	i810_writel(mmio, chan->ddc_base, 0);
chan               87 drivers/video/fbdev/i810/i810-i2c.c 	return ((i810_readl(mmio, chan->ddc_base) & SDA_VAL_IN) != 0);
chan               90 drivers/video/fbdev/i810/i810-i2c.c static int i810_setup_i2c_bus(struct i810fb_i2c_chan *chan, const char *name)
chan               94 drivers/video/fbdev/i810/i810-i2c.c         strcpy(chan->adapter.name, name);
chan               95 drivers/video/fbdev/i810/i810-i2c.c         chan->adapter.owner             = THIS_MODULE;
chan               96 drivers/video/fbdev/i810/i810-i2c.c         chan->adapter.algo_data         = &chan->algo;
chan               97 drivers/video/fbdev/i810/i810-i2c.c         chan->adapter.dev.parent        = &chan->par->dev->dev;
chan               98 drivers/video/fbdev/i810/i810-i2c.c 	chan->algo.setsda               = i810i2c_setsda;
chan               99 drivers/video/fbdev/i810/i810-i2c.c 	chan->algo.setscl               = i810i2c_setscl;
chan              100 drivers/video/fbdev/i810/i810-i2c.c 	chan->algo.getsda               = i810i2c_getsda;
chan              101 drivers/video/fbdev/i810/i810-i2c.c 	chan->algo.getscl               = i810i2c_getscl;
chan              102 drivers/video/fbdev/i810/i810-i2c.c 	chan->algo.udelay               = 10;
chan              103 drivers/video/fbdev/i810/i810-i2c.c         chan->algo.timeout              = (HZ/2);
chan              104 drivers/video/fbdev/i810/i810-i2c.c         chan->algo.data                 = chan;
chan              106 drivers/video/fbdev/i810/i810-i2c.c         i2c_set_adapdata(&chan->adapter, chan);
chan              109 drivers/video/fbdev/i810/i810-i2c.c         chan->algo.setsda(chan, 1);
chan              110 drivers/video/fbdev/i810/i810-i2c.c         chan->algo.setscl(chan, 1);
chan              113 drivers/video/fbdev/i810/i810-i2c.c         rc = i2c_bit_add_bus(&chan->adapter);
chan              116 drivers/video/fbdev/i810/i810-i2c.c                 dev_dbg(&chan->par->dev->dev, "I2C bus %s registered.\n",name);
chan              118 drivers/video/fbdev/i810/i810-i2c.c                 dev_warn(&chan->par->dev->dev, "Failed to register I2C bus "
chan              120 drivers/video/fbdev/i810/i810-i2c.c 		chan->par = NULL;
chan              128 drivers/video/fbdev/i810/i810-i2c.c         par->chan[0].par        = par;
chan              129 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[1].par        = par;
chan              130 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[2].par        = par;
chan              132 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[0].ddc_base = GPIOA;
chan              133 drivers/video/fbdev/i810/i810-i2c.c 	i810_setup_i2c_bus(&par->chan[0], "I810-DDC");
chan              134 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[1].ddc_base = GPIOB;
chan              135 drivers/video/fbdev/i810/i810-i2c.c 	i810_setup_i2c_bus(&par->chan[1], "I810-I2C");
chan              136 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[2].ddc_base = GPIOC;
chan              137 drivers/video/fbdev/i810/i810-i2c.c 	i810_setup_i2c_bus(&par->chan[2], "I810-GPIOC");
chan              142 drivers/video/fbdev/i810/i810-i2c.c         if (par->chan[0].par)
chan              143 drivers/video/fbdev/i810/i810-i2c.c 		i2c_del_adapter(&par->chan[0].adapter);
chan              144 drivers/video/fbdev/i810/i810-i2c.c         par->chan[0].par = NULL;
chan              146 drivers/video/fbdev/i810/i810-i2c.c 	if (par->chan[1].par)
chan              147 drivers/video/fbdev/i810/i810-i2c.c 		i2c_del_adapter(&par->chan[1].adapter);
chan              148 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[1].par = NULL;
chan              150 drivers/video/fbdev/i810/i810-i2c.c 	if (par->chan[2].par)
chan              151 drivers/video/fbdev/i810/i810-i2c.c 		i2c_del_adapter(&par->chan[2].adapter);
chan              152 drivers/video/fbdev/i810/i810-i2c.c 	par->chan[2].par = NULL;
chan              162 drivers/video/fbdev/i810/i810-i2c.c 		edid = fb_ddc_read(&par->chan[conn].adapter);
chan              264 drivers/video/fbdev/i810/i810.h 	struct i810fb_i2c_chan   chan[3];
chan              251 drivers/video/fbdev/imxfb.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              253 drivers/video/fbdev/imxfb.c 	chan &= 0xffff;
chan              254 drivers/video/fbdev/imxfb.c 	chan >>= 16 - bf->length;
chan              255 drivers/video/fbdev/imxfb.c 	return chan << bf->offset;
chan               56 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_i2c_chan *chan = data;
chan               57 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_info *dinfo = chan->dinfo;
chan               60 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, (state ? SCL_VAL_OUT : 0) |
chan               62 drivers/video/fbdev/intelfb/intelfb_i2c.c 	val = INREG(chan->reg);
chan               67 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_i2c_chan *chan = data;
chan               68 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_info *dinfo = chan->dinfo;
chan               71 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, (state ? SDA_VAL_OUT : 0) |
chan               73 drivers/video/fbdev/intelfb/intelfb_i2c.c 	val = INREG(chan->reg);
chan               78 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_i2c_chan *chan = data;
chan               79 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_info *dinfo = chan->dinfo;
chan               82 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, SCL_DIR_MASK);
chan               83 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, 0);
chan               84 drivers/video/fbdev/intelfb/intelfb_i2c.c 	val = INREG(chan->reg);
chan               90 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_i2c_chan *chan = data;
chan               91 drivers/video/fbdev/intelfb/intelfb_i2c.c 	struct intelfb_info *dinfo = chan->dinfo;
chan               94 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, SDA_DIR_MASK);
chan               95 drivers/video/fbdev/intelfb/intelfb_i2c.c 	OUTREG(chan->reg, 0);
chan               96 drivers/video/fbdev/intelfb/intelfb_i2c.c 	val = INREG(chan->reg);
chan              101 drivers/video/fbdev/intelfb/intelfb_i2c.c 				 struct intelfb_i2c_chan *chan,
chan              107 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->dinfo			= dinfo;
chan              108 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->reg			= reg;
chan              109 drivers/video/fbdev/intelfb/intelfb_i2c.c 	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
chan              111 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->adapter.class		= class;
chan              112 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->adapter.owner		= THIS_MODULE;
chan              113 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->adapter.algo_data		= &chan->algo;
chan              114 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->adapter.dev.parent	= &chan->dinfo->pdev->dev;
chan              115 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.setsda		= intelfb_gpio_setsda;
chan              116 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.setscl		= intelfb_gpio_setscl;
chan              117 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.getsda		= intelfb_gpio_getsda;
chan              118 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.getscl		= intelfb_gpio_getscl;
chan              119 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.udelay		= 40;
chan              120 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.timeout		= 20;
chan              121 drivers/video/fbdev/intelfb/intelfb_i2c.c 	chan->algo.data			= chan;
chan              123 drivers/video/fbdev/intelfb/intelfb_i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan              126 drivers/video/fbdev/intelfb/intelfb_i2c.c 	intelfb_gpio_setsda(chan, 1);
chan              127 drivers/video/fbdev/intelfb/intelfb_i2c.c 	intelfb_gpio_setscl(chan, 1);
chan              130 drivers/video/fbdev/intelfb/intelfb_i2c.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan               69 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c static inline unsigned int chan_to_field(unsigned int chan,
chan               72 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c 	chan &= 0xffff;
chan               73 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c 	chan >>= 16 - bf->length;
chan               74 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c 	return chan << bf->offset;
chan              299 drivers/video/fbdev/mmp/fb/mmpfb.c static unsigned int chan_to_field(unsigned int chan, struct fb_bitfield *bf)
chan              301 drivers/video/fbdev/mmp/fb/mmpfb.c 	return ((chan & 0xffff) >> (16 - bf->length)) << bf->offset;
chan              460 drivers/video/fbdev/mx3fb.c 	dmaengine_terminate_all(mx3_fbi->txd->chan);
chan              759 drivers/video/fbdev/mx3fb.c 	struct dma_chan *chan = tx_desc->txd.chan;
chan              760 drivers/video/fbdev/mx3fb.c 	struct idmac_channel *ichannel = to_idmac_chan(chan);
chan             1018 drivers/video/fbdev/mx3fb.c static u32 chan_to_field(unsigned int chan, struct fb_bitfield *bf)
chan             1020 drivers/video/fbdev/mx3fb.c 	chan &= 0xffff;
chan             1021 drivers/video/fbdev/mx3fb.c 	chan >>= 16 - bf->length;
chan             1022 drivers/video/fbdev/mx3fb.c 	return chan << bf->offset;
chan             1523 drivers/video/fbdev/mx3fb.c static bool chan_filter(struct dma_chan *chan, void *arg)
chan             1529 drivers/video/fbdev/mx3fb.c 	if (!imx_dma_is_ipu(chan))
chan             1538 drivers/video/fbdev/mx3fb.c 	return rq->id == chan->chan_id &&
chan             1539 drivers/video/fbdev/mx3fb.c 		mx3fb_pdata->dma_dev == chan->device->dev;
chan             1559 drivers/video/fbdev/mx3fb.c 	struct dma_chan *chan;
chan             1596 drivers/video/fbdev/mx3fb.c 	chan = dma_request_channel(mask, chan_filter, &rq);
chan             1597 drivers/video/fbdev/mx3fb.c 	if (!chan) {
chan             1604 drivers/video/fbdev/mx3fb.c 	ret = init_fb_chan(mx3fb, to_idmac_chan(chan));
chan             1613 drivers/video/fbdev/mx3fb.c 	dma_release_channel(chan);
chan             1627 drivers/video/fbdev/mx3fb.c 	struct dma_chan *chan;
chan             1629 drivers/video/fbdev/mx3fb.c 	chan = &mx3_fbi->idmac_channel->dma_chan;
chan             1634 drivers/video/fbdev/mx3fb.c 	dma_release_channel(chan);
chan               30 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_i2c_chan *chan = data;
chan               31 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_par *par = chan->par;
chan               34 drivers/video/fbdev/nvidia/nv_i2c.c 	val = NVReadCrtc(par, chan->ddc_base + 1) & 0xf0;
chan               41 drivers/video/fbdev/nvidia/nv_i2c.c 	NVWriteCrtc(par, chan->ddc_base + 1, val | 0x01);
chan               46 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_i2c_chan *chan = data;
chan               47 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_par *par = chan->par;
chan               50 drivers/video/fbdev/nvidia/nv_i2c.c 	val = NVReadCrtc(par, chan->ddc_base + 1) & 0xf0;
chan               57 drivers/video/fbdev/nvidia/nv_i2c.c 	NVWriteCrtc(par, chan->ddc_base + 1, val | 0x01);
chan               62 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_i2c_chan *chan = data;
chan               63 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_par *par = chan->par;
chan               66 drivers/video/fbdev/nvidia/nv_i2c.c 	if (NVReadCrtc(par, chan->ddc_base) & 0x04)
chan               74 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_i2c_chan *chan = data;
chan               75 drivers/video/fbdev/nvidia/nv_i2c.c 	struct nvidia_par *par = chan->par;
chan               78 drivers/video/fbdev/nvidia/nv_i2c.c 	if (NVReadCrtc(par, chan->ddc_base) & 0x08)
chan               84 drivers/video/fbdev/nvidia/nv_i2c.c static int nvidia_setup_i2c_bus(struct nvidia_i2c_chan *chan, const char *name,
chan               89 drivers/video/fbdev/nvidia/nv_i2c.c 	strcpy(chan->adapter.name, name);
chan               90 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->adapter.owner = THIS_MODULE;
chan               91 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->adapter.class = i2c_class;
chan               92 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->adapter.algo_data = &chan->algo;
chan               93 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->adapter.dev.parent = &chan->par->pci_dev->dev;
chan               94 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.setsda = nvidia_gpio_setsda;
chan               95 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.setscl = nvidia_gpio_setscl;
chan               96 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.getsda = nvidia_gpio_getsda;
chan               97 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.getscl = nvidia_gpio_getscl;
chan               98 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.udelay = 40;
chan               99 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.timeout = msecs_to_jiffies(2);
chan              100 drivers/video/fbdev/nvidia/nv_i2c.c 	chan->algo.data = chan;
chan              102 drivers/video/fbdev/nvidia/nv_i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan              105 drivers/video/fbdev/nvidia/nv_i2c.c 	nvidia_gpio_setsda(chan, 1);
chan              106 drivers/video/fbdev/nvidia/nv_i2c.c 	nvidia_gpio_setscl(chan, 1);
chan              109 drivers/video/fbdev/nvidia/nv_i2c.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan              111 drivers/video/fbdev/nvidia/nv_i2c.c 		dev_dbg(&chan->par->pci_dev->dev,
chan              114 drivers/video/fbdev/nvidia/nv_i2c.c 		dev_warn(&chan->par->pci_dev->dev,
chan              116 drivers/video/fbdev/nvidia/nv_i2c.c 		chan->par = NULL;
chan              124 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[0].par = par;
chan              125 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[1].par = par;
chan              126 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[2].par = par;
chan              128 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[0].ddc_base = (par->reverse_i2c) ? 0x36 : 0x3e;
chan              129 drivers/video/fbdev/nvidia/nv_i2c.c  	nvidia_setup_i2c_bus(&par->chan[0], "nvidia #0",
chan              132 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[1].ddc_base = (par->reverse_i2c) ? 0x3e : 0x36;
chan              133 drivers/video/fbdev/nvidia/nv_i2c.c  	nvidia_setup_i2c_bus(&par->chan[1], "nvidia #1",
chan              136 drivers/video/fbdev/nvidia/nv_i2c.c 	par->chan[2].ddc_base = 0x50;
chan              137 drivers/video/fbdev/nvidia/nv_i2c.c  	nvidia_setup_i2c_bus(&par->chan[2], "nvidia #2", 0);
chan              145 drivers/video/fbdev/nvidia/nv_i2c.c 		if (!par->chan[i].par)
chan              147 drivers/video/fbdev/nvidia/nv_i2c.c 		i2c_del_adapter(&par->chan[i].adapter);
chan              148 drivers/video/fbdev/nvidia/nv_i2c.c 		par->chan[i].par = NULL;
chan              157 drivers/video/fbdev/nvidia/nv_i2c.c 	if (par->chan[conn - 1].par)
chan              158 drivers/video/fbdev/nvidia/nv_i2c.c 		edid = fb_ddc_read(&par->chan[conn - 1].adapter);
chan              153 drivers/video/fbdev/nvidia/nv_type.h 	struct nvidia_i2c_chan chan[3];
chan              933 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 	int chan = 0, chan2 = 0;
chan              953 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 			chan = 0;
chan              957 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 			chan = 1;
chan              961 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 			chan = 0;
chan              966 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 				chan = 0;
chan              974 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 			chan = 0;
chan              982 drivers/video/fbdev/omap2/omapfb/dss/dispc.c 		val = FLD_MOD(val, chan, shift, shift);
chan              474 drivers/video/fbdev/pxa168fb.c static unsigned int chan_to_field(unsigned int chan, struct fb_bitfield *bf)
chan              476 drivers/video/fbdev/pxa168fb.c 	return ((chan & 0xffff) >> (16 - bf->length)) << bf->offset;
chan              134 drivers/video/fbdev/pxafb.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              136 drivers/video/fbdev/pxafb.c 	chan &= 0xffff;
chan              137 drivers/video/fbdev/pxafb.c 	chan >>= 16 - bf->length;
chan              138 drivers/video/fbdev/pxafb.c 	return chan << bf->offset;
chan             1771 drivers/video/fbdev/riva/fbdev.c 		if (!par->chan[i].par)
chan               29 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_i2c_chan 	*chan = data;
chan               30 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_par 	*par = chan->par;
chan               33 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
chan               41 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
chan               47 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_i2c_chan 	*chan = data;
chan               48 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_par 	*par = chan->par;
chan               51 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
chan               59 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base + 1);
chan               65 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_i2c_chan 	*chan = data;
chan               66 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_par 	*par = chan->par;
chan               69 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base);
chan               78 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_i2c_chan 	*chan = data;
chan               79 drivers/video/fbdev/riva/rivafb-i2c.c 	struct riva_par 	*par = chan->par;
chan               82 drivers/video/fbdev/riva/rivafb-i2c.c 	VGA_WR08(par->riva.PCIO, 0x3d4, chan->ddc_base);
chan               89 drivers/video/fbdev/riva/rivafb-i2c.c static int riva_setup_i2c_bus(struct riva_i2c_chan *chan, const char *name,
chan               94 drivers/video/fbdev/riva/rivafb-i2c.c 	strcpy(chan->adapter.name, name);
chan               95 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->adapter.owner		= THIS_MODULE;
chan               96 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->adapter.class		= i2c_class;
chan               97 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->adapter.algo_data		= &chan->algo;
chan               98 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->adapter.dev.parent	= &chan->par->pdev->dev;
chan               99 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.setsda		= riva_gpio_setsda;
chan              100 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.setscl		= riva_gpio_setscl;
chan              101 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.getsda		= riva_gpio_getsda;
chan              102 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.getscl		= riva_gpio_getscl;
chan              103 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.udelay		= 40;
chan              104 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.timeout		= msecs_to_jiffies(2);
chan              105 drivers/video/fbdev/riva/rivafb-i2c.c 	chan->algo.data 		= chan;
chan              107 drivers/video/fbdev/riva/rivafb-i2c.c 	i2c_set_adapdata(&chan->adapter, chan);
chan              110 drivers/video/fbdev/riva/rivafb-i2c.c 	riva_gpio_setsda(chan, 1);
chan              111 drivers/video/fbdev/riva/rivafb-i2c.c 	riva_gpio_setscl(chan, 1);
chan              114 drivers/video/fbdev/riva/rivafb-i2c.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan              116 drivers/video/fbdev/riva/rivafb-i2c.c 		dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name);
chan              118 drivers/video/fbdev/riva/rivafb-i2c.c 		dev_warn(&chan->par->pdev->dev,
chan              120 drivers/video/fbdev/riva/rivafb-i2c.c 		chan->par = NULL;
chan              128 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[0].par	= par;
chan              129 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[1].par	= par;
chan              130 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[2].par        = par;
chan              132 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[0].ddc_base = 0x36;
chan              133 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[1].ddc_base = 0x3e;
chan              134 drivers/video/fbdev/riva/rivafb-i2c.c 	par->chan[2].ddc_base = 0x50;
chan              135 drivers/video/fbdev/riva/rivafb-i2c.c 	riva_setup_i2c_bus(&par->chan[0], "BUS1", I2C_CLASS_HWMON);
chan              136 drivers/video/fbdev/riva/rivafb-i2c.c 	riva_setup_i2c_bus(&par->chan[1], "BUS2", 0);
chan              137 drivers/video/fbdev/riva/rivafb-i2c.c 	riva_setup_i2c_bus(&par->chan[2], "BUS3", 0);
chan              145 drivers/video/fbdev/riva/rivafb-i2c.c 		if (!par->chan[i].par)
chan              147 drivers/video/fbdev/riva/rivafb-i2c.c 		i2c_del_adapter(&par->chan[i].adapter);
chan              148 drivers/video/fbdev/riva/rivafb-i2c.c 		par->chan[i].par = NULL;
chan              156 drivers/video/fbdev/riva/rivafb-i2c.c 	if (par->chan[conn].par)
chan              157 drivers/video/fbdev/riva/rivafb-i2c.c 		edid = fb_ddc_read(&par->chan[conn].adapter);
chan               66 drivers/video/fbdev/riva/rivafb.h 	struct riva_i2c_chan chan[3];
chan              722 drivers/video/fbdev/s3c-fb.c static inline unsigned int chan_to_field(unsigned int chan,
chan              725 drivers/video/fbdev/s3c-fb.c 	chan &= 0xffff;
chan              726 drivers/video/fbdev/s3c-fb.c 	chan >>= 16 - bf->length;
chan              727 drivers/video/fbdev/s3c-fb.c 	return chan << bf->offset;
chan              478 drivers/video/fbdev/s3c2410fb.c static inline unsigned int chan_to_field(unsigned int chan,
chan              481 drivers/video/fbdev/s3c2410fb.c 	chan &= 0xffff;
chan              482 drivers/video/fbdev/s3c2410fb.c 	chan >>= 16 - bf->length;
chan              483 drivers/video/fbdev/s3c2410fb.c 	return chan << bf->offset;
chan              247 drivers/video/fbdev/sa1100fb.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              249 drivers/video/fbdev/sa1100fb.c 	chan &= 0xffff;
chan              250 drivers/video/fbdev/sa1100fb.c 	chan >>= 16 - bf->length;
chan              251 drivers/video/fbdev/sa1100fb.c 	return chan << bf->offset;
chan               47 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan               50 drivers/video/fbdev/savage/savagefb-i2c.c 	r = readl(chan->ioaddr + chan->reg);
chan               55 drivers/video/fbdev/savage/savagefb-i2c.c 	writel(r, chan->ioaddr + chan->reg);
chan               56 drivers/video/fbdev/savage/savagefb-i2c.c 	readl(chan->ioaddr + chan->reg);	/* flush posted write */
chan               61 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan               64 drivers/video/fbdev/savage/savagefb-i2c.c 	r = readl(chan->ioaddr + chan->reg);
chan               69 drivers/video/fbdev/savage/savagefb-i2c.c 	writel(r, chan->ioaddr + chan->reg);
chan               70 drivers/video/fbdev/savage/savagefb-i2c.c 	readl(chan->ioaddr + chan->reg);	/* flush posted write */
chan               75 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan               77 drivers/video/fbdev/savage/savagefb-i2c.c 	return (0 != (readl(chan->ioaddr + chan->reg) & SAVAGE4_I2C_SCL_IN));
chan               82 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan               84 drivers/video/fbdev/savage/savagefb-i2c.c 	return (0 != (readl(chan->ioaddr + chan->reg) & SAVAGE4_I2C_SDA_IN));
chan               89 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan               92 drivers/video/fbdev/savage/savagefb-i2c.c 	r = VGArCR(chan->reg, chan->par);
chan              100 drivers/video/fbdev/savage/savagefb-i2c.c 	VGAwCR(chan->reg, r, chan->par);
chan              105 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan              108 drivers/video/fbdev/savage/savagefb-i2c.c 	r = VGArCR(chan->reg, chan->par);
chan              116 drivers/video/fbdev/savage/savagefb-i2c.c 	VGAwCR(chan->reg, r, chan->par);
chan              121 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan              123 drivers/video/fbdev/savage/savagefb-i2c.c 	return (VGArCR(chan->reg, chan->par) & PROSAVAGE_I2C_SCL_IN) ? 1 : 0;
chan              128 drivers/video/fbdev/savage/savagefb-i2c.c 	struct savagefb_i2c_chan *chan = data;
chan              130 drivers/video/fbdev/savage/savagefb-i2c.c 	return (VGArCR(chan->reg, chan->par) & PROSAVAGE_I2C_SDA_IN) ? 1 : 0;
chan              133 drivers/video/fbdev/savage/savagefb-i2c.c static int savage_setup_i2c_bus(struct savagefb_i2c_chan *chan,
chan              138 drivers/video/fbdev/savage/savagefb-i2c.c 	if (chan->par) {
chan              139 drivers/video/fbdev/savage/savagefb-i2c.c 		strcpy(chan->adapter.name, name);
chan              140 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->adapter.owner		= THIS_MODULE;
chan              141 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->adapter.algo_data		= &chan->algo;
chan              142 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->adapter.dev.parent	= &chan->par->pcidev->dev;
chan              143 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->algo.udelay		= 10;
chan              144 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->algo.timeout		= 20;
chan              145 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->algo.data 		= chan;
chan              147 drivers/video/fbdev/savage/savagefb-i2c.c 		i2c_set_adapdata(&chan->adapter, chan);
chan              150 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->algo.setsda(chan, 1);
chan              151 drivers/video/fbdev/savage/savagefb-i2c.c 		chan->algo.setscl(chan, 1);
chan              154 drivers/video/fbdev/savage/savagefb-i2c.c 		rc = i2c_bit_add_bus(&chan->adapter);
chan              157 drivers/video/fbdev/savage/savagefb-i2c.c 			dev_dbg(&chan->par->pcidev->dev,
chan              160 drivers/video/fbdev/savage/savagefb-i2c.c 			dev_warn(&chan->par->pcidev->dev,
chan              170 drivers/video/fbdev/savage/savagefb-i2c.c 	par->chan.par	= par;
chan              176 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.reg         = CR_SERIAL2;
chan              177 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.ioaddr      = par->mmio.vbase;
chan              178 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setsda = prosavage_gpio_setsda;
chan              179 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setscl = prosavage_gpio_setscl;
chan              180 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getsda = prosavage_gpio_getsda;
chan              181 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getscl = prosavage_gpio_getscl;
chan              184 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.reg = CR_SERIAL1;
chan              186 drivers/video/fbdev/savage/savagefb-i2c.c 			par->chan.reg = CR_SERIAL2;
chan              187 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.ioaddr      = par->mmio.vbase;
chan              188 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setsda = prosavage_gpio_setsda;
chan              189 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setscl = prosavage_gpio_setscl;
chan              190 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getsda = prosavage_gpio_getsda;
chan              191 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getscl = prosavage_gpio_getscl;
chan              194 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.reg         = MM_SERIAL1;
chan              195 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.ioaddr      = par->mmio.vbase;
chan              196 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setsda = savage4_gpio_setsda;
chan              197 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.setscl = savage4_gpio_setscl;
chan              198 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getsda = savage4_gpio_getsda;
chan              199 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.algo.getscl = savage4_gpio_getscl;
chan              202 drivers/video/fbdev/savage/savagefb-i2c.c 		par->chan.par = NULL;
chan              205 drivers/video/fbdev/savage/savagefb-i2c.c 	savage_setup_i2c_bus(&par->chan, "SAVAGE DDC2");
chan              212 drivers/video/fbdev/savage/savagefb-i2c.c 	if (par->chan.par)
chan              213 drivers/video/fbdev/savage/savagefb-i2c.c 		i2c_del_adapter(&par->chan.adapter);
chan              215 drivers/video/fbdev/savage/savagefb-i2c.c 	par->chan.par = NULL;
chan              223 drivers/video/fbdev/savage/savagefb-i2c.c 	if (par->chan.par)
chan              224 drivers/video/fbdev/savage/savagefb-i2c.c 		edid = fb_ddc_read(&par->chan.adapter);
chan              192 drivers/video/fbdev/savage/savagefb.h 	struct savagefb_i2c_chan chan;
chan              283 drivers/video/fbdev/sh_mobile_lcdcfb.c static int lcdc_chan_is_sublcd(struct sh_mobile_lcdc_chan *chan)
chan              285 drivers/video/fbdev/sh_mobile_lcdcfb.c 	return chan->cfg->chan == LCDC_CHAN_SUBLCD;
chan              288 drivers/video/fbdev/sh_mobile_lcdcfb.c static void lcdc_write_chan(struct sh_mobile_lcdc_chan *chan,
chan              291 drivers/video/fbdev/sh_mobile_lcdcfb.c 	iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr]);
chan              293 drivers/video/fbdev/sh_mobile_lcdcfb.c 		iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr] +
chan              297 drivers/video/fbdev/sh_mobile_lcdcfb.c static void lcdc_write_chan_mirror(struct sh_mobile_lcdc_chan *chan,
chan              300 drivers/video/fbdev/sh_mobile_lcdcfb.c 	iowrite32(data, chan->lcdc->base + chan->reg_offs[reg_nr] +
chan              304 drivers/video/fbdev/sh_mobile_lcdcfb.c static unsigned long lcdc_read_chan(struct sh_mobile_lcdc_chan *chan,
chan              307 drivers/video/fbdev/sh_mobile_lcdcfb.c 	return ioread32(chan->lcdc->base + chan->reg_offs[reg_nr]);
chan             2012 drivers/video/fbdev/sh_mobile_lcdcfb.c 		 dev_name(ch->lcdc->dev), (ch->cfg->chan == LCDC_CHAN_MAINLCD) ?
chan             2567 drivers/video/fbdev/sh_mobile_lcdcfb.c 		switch (pdata->ch[i].chan) {
chan              898 drivers/video/fbdev/sm501fb.c static inline unsigned int chan_to_field(unsigned int chan,
chan              901 drivers/video/fbdev/sm501fb.c 	chan &= 0xffff;
chan              902 drivers/video/fbdev/sm501fb.c 	chan >>= 16 - bf->length;
chan              903 drivers/video/fbdev/sm501fb.c 	return chan << bf->offset;
chan              879 drivers/video/fbdev/sm712fb.c static inline unsigned int chan_to_field(unsigned int chan,
chan              882 drivers/video/fbdev/sm712fb.c 	chan &= 0xffff;
chan              883 drivers/video/fbdev/sm712fb.c 	chan >>= 16 - bf->length;
chan              884 drivers/video/fbdev/sm712fb.c 	return chan << bf->offset;
chan             1170 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1171 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1185 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1186 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1204 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1205 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1212 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1213 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1220 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1221 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1235 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1236 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1250 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1251 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1258 drivers/video/fbdev/tdfxfb.c 	struct tdfxfb_i2c_chan 	*chan = data;
chan             1259 drivers/video/fbdev/tdfxfb.c 	struct tdfx_par 	*par = chan->par;
chan             1264 drivers/video/fbdev/tdfxfb.c static int tdfxfb_setup_ddc_bus(struct tdfxfb_i2c_chan *chan, const char *name,
chan             1269 drivers/video/fbdev/tdfxfb.c 	strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name));
chan             1270 drivers/video/fbdev/tdfxfb.c 	chan->adapter.owner		= THIS_MODULE;
chan             1271 drivers/video/fbdev/tdfxfb.c 	chan->adapter.class		= I2C_CLASS_DDC;
chan             1272 drivers/video/fbdev/tdfxfb.c 	chan->adapter.algo_data		= &chan->algo;
chan             1273 drivers/video/fbdev/tdfxfb.c 	chan->adapter.dev.parent	= dev;
chan             1274 drivers/video/fbdev/tdfxfb.c 	chan->algo.setsda		= tdfxfb_ddc_setsda;
chan             1275 drivers/video/fbdev/tdfxfb.c 	chan->algo.setscl		= tdfxfb_ddc_setscl;
chan             1276 drivers/video/fbdev/tdfxfb.c 	chan->algo.getsda		= tdfxfb_ddc_getsda;
chan             1277 drivers/video/fbdev/tdfxfb.c 	chan->algo.getscl		= tdfxfb_ddc_getscl;
chan             1278 drivers/video/fbdev/tdfxfb.c 	chan->algo.udelay		= 10;
chan             1279 drivers/video/fbdev/tdfxfb.c 	chan->algo.timeout		= msecs_to_jiffies(500);
chan             1280 drivers/video/fbdev/tdfxfb.c 	chan->algo.data 		= chan;
chan             1282 drivers/video/fbdev/tdfxfb.c 	i2c_set_adapdata(&chan->adapter, chan);
chan             1284 drivers/video/fbdev/tdfxfb.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan             1288 drivers/video/fbdev/tdfxfb.c 		chan->par = NULL;
chan             1293 drivers/video/fbdev/tdfxfb.c static int tdfxfb_setup_i2c_bus(struct tdfxfb_i2c_chan *chan, const char *name,
chan             1298 drivers/video/fbdev/tdfxfb.c 	strlcpy(chan->adapter.name, name, sizeof(chan->adapter.name));
chan             1299 drivers/video/fbdev/tdfxfb.c 	chan->adapter.owner		= THIS_MODULE;
chan             1300 drivers/video/fbdev/tdfxfb.c 	chan->adapter.algo_data		= &chan->algo;
chan             1301 drivers/video/fbdev/tdfxfb.c 	chan->adapter.dev.parent	= dev;
chan             1302 drivers/video/fbdev/tdfxfb.c 	chan->algo.setsda		= tdfxfb_i2c_setsda;
chan             1303 drivers/video/fbdev/tdfxfb.c 	chan->algo.setscl		= tdfxfb_i2c_setscl;
chan             1304 drivers/video/fbdev/tdfxfb.c 	chan->algo.getsda		= tdfxfb_i2c_getsda;
chan             1305 drivers/video/fbdev/tdfxfb.c 	chan->algo.getscl		= tdfxfb_i2c_getscl;
chan             1306 drivers/video/fbdev/tdfxfb.c 	chan->algo.udelay		= 10;
chan             1307 drivers/video/fbdev/tdfxfb.c 	chan->algo.timeout		= msecs_to_jiffies(500);
chan             1308 drivers/video/fbdev/tdfxfb.c 	chan->algo.data 		= chan;
chan             1310 drivers/video/fbdev/tdfxfb.c 	i2c_set_adapdata(&chan->adapter, chan);
chan             1312 drivers/video/fbdev/tdfxfb.c 	rc = i2c_bit_add_bus(&chan->adapter);
chan             1316 drivers/video/fbdev/tdfxfb.c 		chan->par = NULL;
chan             1328 drivers/video/fbdev/tdfxfb.c 	par->chan[0].par = par;
chan             1329 drivers/video/fbdev/tdfxfb.c 	par->chan[1].par = par;
chan             1331 drivers/video/fbdev/tdfxfb.c 	tdfxfb_setup_ddc_bus(&par->chan[0], "Voodoo3-DDC", info->dev);
chan             1332 drivers/video/fbdev/tdfxfb.c 	tdfxfb_setup_i2c_bus(&par->chan[1], "Voodoo3-I2C", info->dev);
chan             1337 drivers/video/fbdev/tdfxfb.c 	if (par->chan[0].par)
chan             1338 drivers/video/fbdev/tdfxfb.c 		i2c_del_adapter(&par->chan[0].adapter);
chan             1339 drivers/video/fbdev/tdfxfb.c 	par->chan[0].par = NULL;
chan             1341 drivers/video/fbdev/tdfxfb.c 	if (par->chan[1].par)
chan             1342 drivers/video/fbdev/tdfxfb.c 		i2c_del_adapter(&par->chan[1].adapter);
chan             1343 drivers/video/fbdev/tdfxfb.c 	par->chan[1].par = NULL;
chan             1352 drivers/video/fbdev/tdfxfb.c 	if (par->chan[0].par)
chan             1353 drivers/video/fbdev/tdfxfb.c 		edid = fb_ddc_read(&par->chan[0].adapter);
chan              132 drivers/video/fbdev/vt8500lcdfb.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              134 drivers/video/fbdev/vt8500lcdfb.c 	chan &= 0xffff;
chan              135 drivers/video/fbdev/vt8500lcdfb.c 	chan >>= 16 - bf->length;
chan              136 drivers/video/fbdev/vt8500lcdfb.c 	return chan << bf->offset;
chan              185 drivers/video/fbdev/wm8505fb.c static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
chan              187 drivers/video/fbdev/wm8505fb.c 	chan &= 0xffff;
chan              188 drivers/video/fbdev/wm8505fb.c 	chan >>= 16 - bf->length;
chan              189 drivers/video/fbdev/wm8505fb.c 	return chan << bf->offset;
chan              137 drivers/visorbus/visorbus_main.c 	struct visorchannel *chan;
chan              142 drivers/visorbus/visorbus_main.c 	chan = dev->visorchannel;
chan              147 drivers/visorbus/visorbus_main.c 		    visor_check_channel(visorchannel_get_header(chan),
chan              712 drivers/visorbus/visorbus_main.c static int get_vbus_header_info(struct visorchannel *chan,
chan              718 drivers/visorbus/visorbus_main.c 	if (!visor_check_channel(visorchannel_get_header(chan),
chan              727 drivers/visorbus/visorbus_main.c 	err = visorchannel_read(chan, sizeof(struct channel_header), hdr_info,
chan              752 drivers/visorbus/visorbus_main.c static void write_vbus_chp_info(struct visorchannel *chan,
chan              762 drivers/visorbus/visorbus_main.c 	visorchannel_write(chan, off, info, sizeof(*info));
chan              778 drivers/visorbus/visorbus_main.c static void write_vbus_bus_info(struct visorchannel *chan,
chan              788 drivers/visorbus/visorbus_main.c 	visorchannel_write(chan, off, info, sizeof(*info));
chan              805 drivers/visorbus/visorbus_main.c static void write_vbus_dev_info(struct visorchannel *chan,
chan              816 drivers/visorbus/visorbus_main.c 	visorchannel_write(chan, off, info, sizeof(*info));
chan             1192 drivers/visorbus/visorchipset.c 	struct visorchannel *chan;
chan             1201 drivers/visorbus/visorchipset.c 	chan = visorchannel_create(addr, GFP_KERNEL,
chan             1203 drivers/visorbus/visorchipset.c 	if (!chan)
chan             1205 drivers/visorbus/visorchipset.c 	dev->controlvm_channel = chan;
chan               16 include/acpi/pcc.h extern void pcc_mbox_free_channel(struct mbox_chan *chan);
chan               23 include/acpi/pcc.h static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
chan              244 include/linux/amba/pl022.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan              122 include/linux/amba/pl08x.h bool pl08x_filter_id(struct dma_chan *chan, void *chan_id);
chan              124 include/linux/amba/pl08x.h static inline bool pl08x_filter_id(struct dma_chan *chan, void *chan_id)
chan              217 include/linux/amba/serial.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan               30 include/linux/async_tx.h 	struct dma_chan *chan;
chan               91 include/linux/async_tx.h 		struct dma_chan *chan = tx->chan;
chan               92 include/linux/async_tx.h 		struct dma_device *dma = chan->device;
chan               94 include/linux/async_tx.h 		dma->device_issue_pending(chan);
chan              158 include/linux/async_tx.h void async_tx_submit(struct dma_chan *chan, struct dma_async_tx_descriptor *tx,
chan                8 include/linux/dma/mmp-pdma.h bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param);
chan               10 include/linux/dma/mmp-pdma.h static inline bool mmp_pdma_filter_fn(struct dma_chan *chan, void *param)
chan               17 include/linux/dma/mxs-dma.h         struct dma_chan *chan, u32 *pio, unsigned int npio,
chan               20 include/linux/dma/mxs-dma.h 	return dmaengine_prep_slave_sg(chan, (struct scatterlist *)pio, npio,
chan              282 include/linux/dmaengine.h 	struct dma_chan *chan;
chan              426 include/linux/dmaengine.h static inline const char *dma_chan_name(struct dma_chan *chan)
chan              428 include/linux/dmaengine.h 	return dev_name(&chan->dev->device);
chan              444 include/linux/dmaengine.h typedef bool (*dma_filter_fn)(struct dma_chan *chan, void *filter_param);
chan              500 include/linux/dmaengine.h 	struct dma_chan *chan;
chan              750 include/linux/dmaengine.h 	int (*device_alloc_chan_resources)(struct dma_chan *chan);
chan              751 include/linux/dmaengine.h 	void (*device_free_chan_resources)(struct dma_chan *chan);
chan              754 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
chan              757 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dst, dma_addr_t *src,
chan              760 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t *src,	unsigned int src_cnt,
chan              763 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
chan              767 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
chan              771 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
chan              774 include/linux/dmaengine.h 		struct dma_chan *chan, struct scatterlist *sg,
chan              777 include/linux/dmaengine.h 		struct dma_chan *chan, unsigned long flags);
chan              780 include/linux/dmaengine.h 		struct dma_chan *chan, struct scatterlist *sgl,
chan              784 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              788 include/linux/dmaengine.h 		struct dma_chan *chan, struct dma_interleaved_template *xt,
chan              791 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dst, u64 data,
chan              794 include/linux/dmaengine.h 	int (*device_config)(struct dma_chan *chan,
chan              796 include/linux/dmaengine.h 	int (*device_pause)(struct dma_chan *chan);
chan              797 include/linux/dmaengine.h 	int (*device_resume)(struct dma_chan *chan);
chan              798 include/linux/dmaengine.h 	int (*device_terminate_all)(struct dma_chan *chan);
chan              799 include/linux/dmaengine.h 	void (*device_synchronize)(struct dma_chan *chan);
chan              801 include/linux/dmaengine.h 	enum dma_status (*device_tx_status)(struct dma_chan *chan,
chan              804 include/linux/dmaengine.h 	void (*device_issue_pending)(struct dma_chan *chan);
chan              807 include/linux/dmaengine.h static inline int dmaengine_slave_config(struct dma_chan *chan,
chan              810 include/linux/dmaengine.h 	if (chan->device->device_config)
chan              811 include/linux/dmaengine.h 		return chan->device->device_config(chan, config);
chan              822 include/linux/dmaengine.h 	struct dma_chan *chan, dma_addr_t buf, size_t len,
chan              830 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_slave_sg)
chan              833 include/linux/dmaengine.h 	return chan->device->device_prep_slave_sg(chan, &sg, 1,
chan              838 include/linux/dmaengine.h 	struct dma_chan *chan, struct scatterlist *sgl,	unsigned int sg_len,
chan              841 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_slave_sg)
chan              844 include/linux/dmaengine.h 	return chan->device->device_prep_slave_sg(chan, sgl, sg_len,
chan              851 include/linux/dmaengine.h 	struct dma_chan *chan, struct scatterlist *sgl,	unsigned int sg_len,
chan              855 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_slave_sg)
chan              858 include/linux/dmaengine.h 	return chan->device->device_prep_slave_sg(chan, sgl, sg_len,
chan              864 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
chan              868 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_dma_cyclic)
chan              871 include/linux/dmaengine.h 	return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
chan              876 include/linux/dmaengine.h 		struct dma_chan *chan, struct dma_interleaved_template *xt,
chan              879 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_interleaved_dma)
chan              882 include/linux/dmaengine.h 	return chan->device->device_prep_interleaved_dma(chan, xt, flags);
chan              886 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
chan              889 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_dma_memset)
chan              892 include/linux/dmaengine.h 	return chan->device->device_prep_dma_memset(chan, dest, value,
chan              897 include/linux/dmaengine.h 		struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
chan              900 include/linux/dmaengine.h 	if (!chan || !chan->device || !chan->device->device_prep_dma_memcpy)
chan              903 include/linux/dmaengine.h 	return chan->device->device_prep_dma_memcpy(chan, dest, src,
chan              914 include/linux/dmaengine.h static inline int dmaengine_terminate_all(struct dma_chan *chan)
chan              916 include/linux/dmaengine.h 	if (chan->device->device_terminate_all)
chan              917 include/linux/dmaengine.h 		return chan->device->device_terminate_all(chan);
chan              943 include/linux/dmaengine.h static inline int dmaengine_terminate_async(struct dma_chan *chan)
chan              945 include/linux/dmaengine.h 	if (chan->device->device_terminate_all)
chan              946 include/linux/dmaengine.h 		return chan->device->device_terminate_all(chan);
chan              969 include/linux/dmaengine.h static inline void dmaengine_synchronize(struct dma_chan *chan)
chan              973 include/linux/dmaengine.h 	if (chan->device->device_synchronize)
chan              974 include/linux/dmaengine.h 		chan->device->device_synchronize(chan);
chan              991 include/linux/dmaengine.h static inline int dmaengine_terminate_sync(struct dma_chan *chan)
chan              995 include/linux/dmaengine.h 	ret = dmaengine_terminate_async(chan);
chan              999 include/linux/dmaengine.h 	dmaengine_synchronize(chan);
chan             1004 include/linux/dmaengine.h static inline int dmaengine_pause(struct dma_chan *chan)
chan             1006 include/linux/dmaengine.h 	if (chan->device->device_pause)
chan             1007 include/linux/dmaengine.h 		return chan->device->device_pause(chan);
chan             1012 include/linux/dmaengine.h static inline int dmaengine_resume(struct dma_chan *chan)
chan             1014 include/linux/dmaengine.h 	if (chan->device->device_resume)
chan             1015 include/linux/dmaengine.h 		return chan->device->device_resume(chan);
chan             1020 include/linux/dmaengine.h static inline enum dma_status dmaengine_tx_status(struct dma_chan *chan,
chan             1023 include/linux/dmaengine.h 	return chan->device->device_tx_status(chan, cookie, state);
chan             1185 include/linux/dmaengine.h 				  struct dma_chan *chan);
chan             1239 include/linux/dmaengine.h static inline void dma_async_issue_pending(struct dma_chan *chan)
chan             1241 include/linux/dmaengine.h 	chan->device->device_issue_pending(chan);
chan             1255 include/linux/dmaengine.h static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
chan             1261 include/linux/dmaengine.h 	status = chan->device->device_tx_status(chan, cookie, &state);
chan             1303 include/linux/dmaengine.h enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
chan             1314 include/linux/dmaengine.h void dma_release_channel(struct dma_chan *chan);
chan             1315 include/linux/dmaengine.h int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps);
chan             1321 include/linux/dmaengine.h static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
chan             1354 include/linux/dmaengine.h static inline void dma_release_channel(struct dma_chan *chan)
chan             1357 include/linux/dmaengine.h static inline int dma_get_slave_caps(struct dma_chan *chan,
chan             1371 include/linux/dmaengine.h 	ret = dma_get_slave_caps(tx->chan, &caps);
chan             1408 include/linux/dmaengine.h struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
chan             1420 include/linux/dmaengine.h 	struct dma_chan *chan;
chan             1422 include/linux/dmaengine.h 	chan = dma_request_slave_channel(dev, name);
chan             1423 include/linux/dmaengine.h 	if (chan)
chan             1424 include/linux/dmaengine.h 		return chan;
chan              183 include/linux/firmware/intel/stratix10-svc-client.h void stratix10_svc_free_channel(struct stratix10_svc_chan *chan);
chan              196 include/linux/firmware/intel/stratix10-svc-client.h void *stratix10_svc_allocate_memory(struct stratix10_svc_chan *chan,
chan              204 include/linux/firmware/intel/stratix10-svc-client.h void stratix10_svc_free_memory(struct stratix10_svc_chan *chan, void *kaddr);
chan              214 include/linux/firmware/intel/stratix10-svc-client.h int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg);
chan              224 include/linux/firmware/intel/stratix10-svc-client.h void stratix10_svc_done(struct stratix10_svc_chan *chan);
chan               47 include/linux/if_pppox.h 	struct ppp_channel chan;
chan              121 include/linux/iio/adc/ad_sigma_delta.h 	const struct iio_chan_spec *chan, int *val);
chan              157 include/linux/iio/common/cros_ec_sensors_core.h 			      struct iio_chan_spec const *chan,
chan              172 include/linux/iio/common/cros_ec_sensors_core.h 				    struct iio_chan_spec const *chan,
chan              189 include/linux/iio/common/cros_ec_sensors_core.h 			       struct iio_chan_spec const *chan,
chan               46 include/linux/iio/consumer.h void iio_channel_release(struct iio_channel *chan);
chan               73 include/linux/iio/consumer.h void devm_iio_channel_release(struct device *dev, struct iio_channel *chan);
chan               90 include/linux/iio/consumer.h void iio_channel_release_all(struct iio_channel *chan);
chan              116 include/linux/iio/consumer.h void devm_iio_channel_release_all(struct device *dev, struct iio_channel *chan);
chan              195 include/linux/iio/consumer.h int iio_read_channel_raw(struct iio_channel *chan,
chan              209 include/linux/iio/consumer.h int iio_read_channel_average_raw(struct iio_channel *chan, int *val);
chan              224 include/linux/iio/consumer.h int iio_read_channel_processed(struct iio_channel *chan, int *val);
chan              235 include/linux/iio/consumer.h int iio_write_channel_attribute(struct iio_channel *chan, int val,
chan              249 include/linux/iio/consumer.h int iio_read_channel_attribute(struct iio_channel *chan, int *val,
chan              260 include/linux/iio/consumer.h int iio_write_channel_raw(struct iio_channel *chan, int val);
chan              271 include/linux/iio/consumer.h int iio_read_max_channel_raw(struct iio_channel *chan, int *val);
chan              287 include/linux/iio/consumer.h int iio_read_avail_channel_raw(struct iio_channel *chan,
chan              300 include/linux/iio/consumer.h int iio_read_avail_channel_attribute(struct iio_channel *chan,
chan              324 include/linux/iio/consumer.h int iio_read_channel_offset(struct iio_channel *chan, int *val,
chan              337 include/linux/iio/consumer.h int iio_read_channel_scale(struct iio_channel *chan, int *val,
chan              360 include/linux/iio/consumer.h int iio_convert_raw_to_processed(struct iio_channel *chan, int raw,
chan              370 include/linux/iio/consumer.h unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan);
chan              382 include/linux/iio/consumer.h ssize_t iio_read_channel_ext_info(struct iio_channel *chan,
chan              397 include/linux/iio/consumer.h ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
chan               25 include/linux/iio/events.h 		       type, chan, chan1, chan2)			\
chan               29 include/linux/iio/events.h 	 ((u16)chan))
chan               79 include/linux/iio/iio.h 	uintptr_t priv, const struct iio_chan_spec *chan, char *buf);
chan               81 include/linux/iio/iio.h 	uintptr_t priv, const struct iio_chan_spec *chan, char *buf);
chan               83 include/linux/iio/iio.h 	uintptr_t priv, const struct iio_chan_spec *chan, const char *buf,
chan              129 include/linux/iio/iio.h 			      const struct iio_chan_spec *chan, char *buf);
chan              278 include/linux/iio/iio.h static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
chan              281 include/linux/iio/iio.h 	return (chan->info_mask_separate & BIT(type)) |
chan              282 include/linux/iio/iio.h 		(chan->info_mask_shared_by_type & BIT(type)) |
chan              283 include/linux/iio/iio.h 		(chan->info_mask_shared_by_dir & BIT(type)) |
chan              284 include/linux/iio/iio.h 		(chan->info_mask_shared_by_all & BIT(type));
chan              295 include/linux/iio/iio.h static inline bool iio_channel_has_available(const struct iio_chan_spec *chan,
chan              298 include/linux/iio/iio.h 	return (chan->info_mask_separate_available & BIT(type)) |
chan              299 include/linux/iio/iio.h 		(chan->info_mask_shared_by_type_available & BIT(type)) |
chan              300 include/linux/iio/iio.h 		(chan->info_mask_shared_by_dir_available & BIT(type)) |
chan              301 include/linux/iio/iio.h 		(chan->info_mask_shared_by_all_available & BIT(type));
chan              398 include/linux/iio/iio.h 			struct iio_chan_spec const *chan,
chan              404 include/linux/iio/iio.h 			struct iio_chan_spec const *chan,
chan              411 include/linux/iio/iio.h 			  struct iio_chan_spec const *chan,
chan              418 include/linux/iio/iio.h 			 struct iio_chan_spec const *chan,
chan              424 include/linux/iio/iio.h 			 struct iio_chan_spec const *chan,
chan              428 include/linux/iio/iio.h 				 const struct iio_chan_spec *chan,
chan              433 include/linux/iio/iio.h 				  const struct iio_chan_spec *chan,
chan              439 include/linux/iio/iio.h 				const struct iio_chan_spec *chan,
chan              445 include/linux/iio/iio.h 				 const struct iio_chan_spec *chan,
chan              161 include/linux/iio/imu/adis.h 	const struct iio_chan_spec *chan, unsigned int error_mask,
chan              164 include/linux/iio/imu/adis.h #define ADIS_VOLTAGE_CHAN(addr, si, chan, name, info_all, bits) { \
chan              167 include/linux/iio/imu/adis.h 	.channel = (chan), \
chan               43 include/linux/mailbox_client.h int mbox_send_message(struct mbox_chan *chan, void *mssg);
chan               44 include/linux/mailbox_client.h int mbox_flush(struct mbox_chan *chan, unsigned long timeout);
chan               45 include/linux/mailbox_client.h void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
chan               46 include/linux/mailbox_client.h bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
chan               47 include/linux/mailbox_client.h void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
chan               47 include/linux/mailbox_controller.h 	int (*send_data)(struct mbox_chan *chan, void *data);
chan               48 include/linux/mailbox_controller.h 	int (*flush)(struct mbox_chan *chan, unsigned long timeout);
chan               49 include/linux/mailbox_controller.h 	int (*startup)(struct mbox_chan *chan);
chan               50 include/linux/mailbox_controller.h 	void (*shutdown)(struct mbox_chan *chan);
chan               51 include/linux/mailbox_controller.h 	bool (*last_tx_done)(struct mbox_chan *chan);
chan               52 include/linux/mailbox_controller.h 	bool (*peek_data)(struct mbox_chan *chan);
chan              131 include/linux/mailbox_controller.h void mbox_chan_received_data(struct mbox_chan *chan, void *data); /* atomic */
chan              132 include/linux/mailbox_controller.h void mbox_chan_txdone(struct mbox_chan *chan, int r); /* atomic */
chan              116 include/linux/mfd/stm32-timers.h 	struct dma_chan *chan;
chan               54 include/linux/mfd/viperboard.h 	u8 chan;
chan               14 include/linux/mtd/lpc32xx_mlc.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan               14 include/linux/mtd/lpc32xx_slc.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan               23 include/linux/omap-mailbox.h void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
chan               24 include/linux/omap-mailbox.h void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
chan               14 include/linux/platform_data/crypto-ux500.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan               64 include/linux/platform_data/dma-coh901318.h bool coh901318_filter_id(struct dma_chan *chan, void *chan_id);
chan               66 include/linux/platform_data/dma-coh901318.h static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id)
chan               71 include/linux/platform_data/dma-ep93xx.h static inline bool ep93xx_dma_chan_is_m2p(struct dma_chan *chan)
chan               73 include/linux/platform_data/dma-ep93xx.h 	return !strcmp(dev_name(chan->device->dev), "ep93xx-dma-m2p");
chan               85 include/linux/platform_data/dma-ep93xx.h ep93xx_dma_chan_direction(struct dma_chan *chan)
chan               87 include/linux/platform_data/dma-ep93xx.h 	if (!ep93xx_dma_chan_is_m2p(chan))
chan               91 include/linux/platform_data/dma-ep93xx.h 	return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
chan               57 include/linux/platform_data/dma-imx.h static inline int imx_dma_is_ipu(struct dma_chan *chan)
chan               59 include/linux/platform_data/dma-imx.h 	return !strcmp(dev_name(chan->device->dev), "ipu-core");
chan               62 include/linux/platform_data/dma-imx.h static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
chan               64 include/linux/platform_data/dma-imx.h 	return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
chan               65 include/linux/platform_data/dma-imx.h 		!strcmp(chan->device->dev->driver->name, "imx-dma");
chan               22 include/linux/platform_data/dma-mcf-edma.h bool mcf_edma_filter_fn(struct dma_chan *chan, void *param);
chan                9 include/linux/platform_data/dma-s3c24xx.h #define S3C24XX_DMA_CHANREQ(src, chan)	((BIT(3) | src) << chan * 4)
chan               48 include/linux/platform_data/dma-s3c24xx.h bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);
chan              164 include/linux/platform_data/dma-ste-dma40.h bool stedma40_filter(struct dma_chan *chan, void *data);
chan              178 include/linux/platform_data/dma-ste-dma40.h dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
chan              189 include/linux/platform_data/dma-ste-dma40.h 	return dmaengine_prep_slave_sg(chan, &sg, 1, direction, flags);
chan              193 include/linux/platform_data/dma-ste-dma40.h static inline bool stedma40_filter(struct dma_chan *chan, void *data)
chan              199 include/linux/platform_data/dma-ste-dma40.h dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
chan               48 include/linux/platform_data/edma.h #define EDMA_CTLR_CHAN(ctlr, chan)	(((ctlr) << 16) | (chan))
chan               52 include/linux/platform_data/edma.h #define EDMA_FILTER_PARAM(ctlr, chan)	((int[]) { EDMA_CTLR_CHAN(ctlr, chan) })
chan               45 include/linux/platform_data/ntc_thermistor.h 	struct iio_channel *chan;
chan               17 include/linux/platform_data/usb-musb-ux500.h 	bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
chan              141 include/linux/ptp_clock_kernel.h 		      enum ptp_pin_function func, unsigned int chan);
chan              234 include/linux/ptp_clock_kernel.h 		 enum ptp_pin_function func, unsigned int chan);
chan              258 include/linux/ptp_clock_kernel.h 			       enum ptp_pin_function func, unsigned int chan)
chan               41 include/linux/relay.h 	struct rchan *chan;		/* associated channel */
chan              175 include/linux/relay.h extern int relay_late_setup_files(struct rchan *chan,
chan              178 include/linux/relay.h extern void relay_close(struct rchan *chan);
chan              179 include/linux/relay.h extern void relay_flush(struct rchan *chan);
chan              180 include/linux/relay.h extern void relay_subbufs_consumed(struct rchan *chan,
chan              183 include/linux/relay.h extern void relay_reset(struct rchan *chan);
chan              202 include/linux/relay.h static inline void relay_write(struct rchan *chan,
chan              210 include/linux/relay.h 	buf = *this_cpu_ptr(chan->buf);
chan              211 include/linux/relay.h 	if (unlikely(buf->offset + length > chan->subbuf_size))
chan              230 include/linux/relay.h static inline void __relay_write(struct rchan *chan,
chan              236 include/linux/relay.h 	buf = *get_cpu_ptr(chan->buf);
chan              237 include/linux/relay.h 	if (unlikely(buf->offset + length > buf->chan->subbuf_size))
chan              241 include/linux/relay.h 	put_cpu_ptr(chan->buf);
chan              255 include/linux/relay.h static inline void *relay_reserve(struct rchan *chan, size_t length)
chan              258 include/linux/relay.h 	struct rchan_buf *buf = *get_cpu_ptr(chan->buf);
chan              260 include/linux/relay.h 	if (unlikely(buf->offset + length > buf->chan->subbuf_size)) {
chan              269 include/linux/relay.h 	put_cpu_ptr(chan->buf);
chan              284 include/linux/relay.h 	BUG_ON(length >= buf->chan->subbuf_size - 1);
chan              126 include/linux/shdma-base.h bool shdma_chan_filter(struct dma_chan *chan, void *arg);
chan              128 include/linux/shdma-base.h static inline bool shdma_chan_filter(struct dma_chan *chan, void *arg)
chan                5 include/linux/sirfsoc_dma.h bool sirfsoc_dma_filter_id(struct dma_chan *chan, void *chan_id);
chan               22 include/linux/soc/mediatek/mtk-cmdq.h 	struct mbox_chan *chan;
chan               23 include/linux/spi/pxa2xx_spi.h 	bool (*dma_filter)(struct dma_chan *chan, void *param);
chan              128 include/linux/stm.h int notrace stm_source_write(struct stm_source_data *data, unsigned int chan,
chan              112 include/linux/stmmac.h 	u32 chan;
chan              297 include/net/bluetooth/bluetooth.h 	struct l2cap_chan *chan;
chan              918 include/net/bluetooth/hci_core.h void hci_chan_del(struct hci_chan *chan);
chan             1460 include/net/bluetooth/hci_core.h void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags);
chan              610 include/net/bluetooth/l2cap.h 	struct l2cap_chan	*(*new_connection) (struct l2cap_chan *chan);
chan              611 include/net/bluetooth/l2cap.h 	int			(*recv) (struct l2cap_chan * chan,
chan              613 include/net/bluetooth/l2cap.h 	void			(*teardown) (struct l2cap_chan *chan, int err);
chan              614 include/net/bluetooth/l2cap.h 	void			(*close) (struct l2cap_chan *chan);
chan              615 include/net/bluetooth/l2cap.h 	void			(*state_change) (struct l2cap_chan *chan,
chan              617 include/net/bluetooth/l2cap.h 	void			(*ready) (struct l2cap_chan *chan);
chan              618 include/net/bluetooth/l2cap.h 	void			(*defer) (struct l2cap_chan *chan);
chan              619 include/net/bluetooth/l2cap.h 	void			(*resume) (struct l2cap_chan *chan);
chan              620 include/net/bluetooth/l2cap.h 	void			(*suspend) (struct l2cap_chan *chan);
chan              621 include/net/bluetooth/l2cap.h 	void			(*set_shutdown) (struct l2cap_chan *chan);
chan              622 include/net/bluetooth/l2cap.h 	long			(*get_sndtimeo) (struct l2cap_chan *chan);
chan              623 include/net/bluetooth/l2cap.h 	struct sk_buff		*(*alloc_skb) (struct l2cap_chan *chan,
chan              683 include/net/bluetooth/l2cap.h 	struct l2cap_chan	*chan;
chan              805 include/net/bluetooth/l2cap.h static inline void l2cap_chan_lock(struct l2cap_chan *chan)
chan              807 include/net/bluetooth/l2cap.h 	mutex_lock_nested(&chan->lock, atomic_read(&chan->nesting));
chan              810 include/net/bluetooth/l2cap.h static inline void l2cap_chan_unlock(struct l2cap_chan *chan)
chan              812 include/net/bluetooth/l2cap.h 	mutex_unlock(&chan->lock);
chan              815 include/net/bluetooth/l2cap.h static inline void l2cap_set_timer(struct l2cap_chan *chan,
chan              818 include/net/bluetooth/l2cap.h 	BT_DBG("chan %p state %s timeout %ld", chan,
chan              819 include/net/bluetooth/l2cap.h 	       state_to_string(chan->state), timeout);
chan              824 include/net/bluetooth/l2cap.h 		l2cap_chan_hold(chan);
chan              829 include/net/bluetooth/l2cap.h static inline bool l2cap_clear_timer(struct l2cap_chan *chan,
chan              838 include/net/bluetooth/l2cap.h 		l2cap_chan_put(chan);
chan              847 include/net/bluetooth/l2cap.h #define __set_ack_timer(c) l2cap_set_timer(c, &chan->ack_timer, \
chan              851 include/net/bluetooth/l2cap.h static inline int __seq_offset(struct l2cap_chan *chan, __u16 seq1, __u16 seq2)
chan              856 include/net/bluetooth/l2cap.h 		return chan->tx_win_max + 1 - seq2 + seq1;
chan              859 include/net/bluetooth/l2cap.h static inline __u16 __next_seq(struct l2cap_chan *chan, __u16 seq)
chan              861 include/net/bluetooth/l2cap.h 	return (seq + 1) % (chan->tx_win_max + 1);
chan              864 include/net/bluetooth/l2cap.h static inline struct l2cap_chan *l2cap_chan_no_new_connection(struct l2cap_chan *chan)
chan              869 include/net/bluetooth/l2cap.h static inline int l2cap_chan_no_recv(struct l2cap_chan *chan, struct sk_buff *skb)
chan              874 include/net/bluetooth/l2cap.h static inline struct sk_buff *l2cap_chan_no_alloc_skb(struct l2cap_chan *chan,
chan              881 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_teardown(struct l2cap_chan *chan, int err)
chan              885 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_close(struct l2cap_chan *chan)
chan              889 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_ready(struct l2cap_chan *chan)
chan              893 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_state_change(struct l2cap_chan *chan,
chan              898 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_defer(struct l2cap_chan *chan)
chan              902 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_suspend(struct l2cap_chan *chan)
chan              906 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_resume(struct l2cap_chan *chan)
chan              910 include/net/bluetooth/l2cap.h static inline void l2cap_chan_no_set_shutdown(struct l2cap_chan *chan)
chan              914 include/net/bluetooth/l2cap.h static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
chan              925 include/net/bluetooth/l2cap.h void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan);
chan              926 include/net/bluetooth/l2cap.h void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
chan              928 include/net/bluetooth/l2cap.h int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
chan              929 include/net/bluetooth/l2cap.h int l2cap_add_scid(struct l2cap_chan *chan,  __u16 scid);
chan              932 include/net/bluetooth/l2cap.h void l2cap_chan_close(struct l2cap_chan *chan, int reason);
chan              933 include/net/bluetooth/l2cap.h int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
chan              935 include/net/bluetooth/l2cap.h int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len);
chan              936 include/net/bluetooth/l2cap.h void l2cap_chan_busy(struct l2cap_chan *chan, int busy);
chan              937 include/net/bluetooth/l2cap.h int l2cap_chan_check_security(struct l2cap_chan *chan, bool initiator);
chan              938 include/net/bluetooth/l2cap.h void l2cap_chan_set_defaults(struct l2cap_chan *chan);
chan              939 include/net/bluetooth/l2cap.h int l2cap_ertm_init(struct l2cap_chan *chan);
chan              940 include/net/bluetooth/l2cap.h void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan);
chan              941 include/net/bluetooth/l2cap.h void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan);
chan              942 include/net/bluetooth/l2cap.h void l2cap_chan_del(struct l2cap_chan *chan, int err);
chan              943 include/net/bluetooth/l2cap.h void l2cap_send_conn_req(struct l2cap_chan *chan);
chan              944 include/net/bluetooth/l2cap.h void l2cap_move_start(struct l2cap_chan *chan);
chan              945 include/net/bluetooth/l2cap.h void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan,
chan              947 include/net/bluetooth/l2cap.h void __l2cap_physical_cfm(struct l2cap_chan *chan, int result);
chan              592 include/net/cfg80211.h 	struct ieee80211_channel *chan;
chan              615 include/net/cfg80211.h 		if (chandef->center_freq1 > chandef->chan->center_freq)
chan              648 include/net/cfg80211.h 	return (chandef1->chan == chandef2->chan &&
chan              749 include/net/cfg80211.h 		return min(chandef->chan->max_reg_power - 6,
chan              750 include/net/cfg80211.h 			   chandef->chan->max_power);
chan              752 include/net/cfg80211.h 		return min(chandef->chan->max_reg_power - 3,
chan              753 include/net/cfg80211.h 			   chandef->chan->max_power);
chan              757 include/net/cfg80211.h 	return chandef->chan->max_power;
chan             2140 include/net/cfg80211.h 	struct ieee80211_channel *chan;
chan             2845 include/net/cfg80211.h 	struct ieee80211_channel *chan;
chan             3724 include/net/cfg80211.h 					     struct ieee80211_channel *chan);
chan             3794 include/net/cfg80211.h 				     struct ieee80211_channel *chan,
chan             5016 include/net/cfg80211.h int ieee80211_channel_to_frequency(int chan, enum nl80211_band band);
chan             5665 include/net/cfg80211.h 		.chan = rx_channel,
chan             5680 include/net/cfg80211.h 		.chan = rx_channel,
chan             5782 include/net/cfg80211.h 		.chan = rx_channel,
chan             5801 include/net/cfg80211.h 		.chan = rx_channel,
chan             6650 include/net/cfg80211.h 			       struct ieee80211_channel *chan,
chan             6661 include/net/cfg80211.h 					struct ieee80211_channel *chan,
chan             6672 include/net/cfg80211.h 			      struct ieee80211_channel *chan, gfp_t gfp);
chan             3926 include/net/mac80211.h 				 struct ieee80211_channel *chan,
chan             6032 include/net/mac80211.h 	       conf->chandef.center_freq1 < conf->chandef.chan->center_freq;
chan             6039 include/net/mac80211.h 	       conf->chandef.center_freq1 > conf->chandef.chan->center_freq;
chan               43 include/sound/designware_i2s.h 	bool (*filter)(struct dma_chan *chan, void *slave);
chan               52 include/sound/designware_i2s.h 	bool (*filter)(struct dma_chan *chan, void *slave);
chan               35 include/sound/dmaengine_pcm.h 	struct dma_chan *chan);
chan               24 include/sound/emu8000_reg.h #define EMU8000_CMD(reg, chan) ((reg)<<5 | (chan))
chan               30 include/sound/emu8000_reg.h #define EMU8000_CPF_READ(emu, chan) \
chan               31 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(0, (chan)))
chan               32 include/sound/emu8000_reg.h #define EMU8000_PTRX_READ(emu, chan) \
chan               33 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (chan)))
chan               34 include/sound/emu8000_reg.h #define EMU8000_CVCF_READ(emu, chan) \
chan               35 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(2, (chan)))
chan               36 include/sound/emu8000_reg.h #define EMU8000_VTFT_READ(emu, chan) \
chan               37 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(3, (chan)))
chan               38 include/sound/emu8000_reg.h #define EMU8000_PSST_READ(emu, chan) \
chan               39 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(6, (chan)))
chan               40 include/sound/emu8000_reg.h #define EMU8000_CSL_READ(emu, chan) \
chan               41 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(7, (chan)))
chan               42 include/sound/emu8000_reg.h #define EMU8000_CCCA_READ(emu, chan) \
chan               43 include/sound/emu8000_reg.h 	snd_emu8000_peek_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(0, (chan)))
chan               70 include/sound/emu8000_reg.h #define EMU8000_INIT1_READ(emu, chan) \
chan               71 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(2, (chan)))
chan               72 include/sound/emu8000_reg.h #define EMU8000_INIT2_READ(emu, chan) \
chan               73 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(2, (chan)))
chan               74 include/sound/emu8000_reg.h #define EMU8000_INIT3_READ(emu, chan) \
chan               75 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(3, (chan)))
chan               76 include/sound/emu8000_reg.h #define EMU8000_INIT4_READ(emu, chan) \
chan               77 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(3, (chan)))
chan               78 include/sound/emu8000_reg.h #define EMU8000_ENVVOL_READ(emu, chan) \
chan               79 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(4, (chan)))
chan               80 include/sound/emu8000_reg.h #define EMU8000_DCYSUSV_READ(emu, chan) \
chan               81 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(5, (chan)))
chan               82 include/sound/emu8000_reg.h #define EMU8000_ENVVAL_READ(emu, chan) \
chan               83 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(6, (chan)))
chan               84 include/sound/emu8000_reg.h #define EMU8000_DCYSUS_READ(emu, chan) \
chan               85 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA1(emu), EMU8000_CMD(7, (chan)))
chan               86 include/sound/emu8000_reg.h #define EMU8000_ATKHLDV_READ(emu, chan) \
chan               87 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(4, (chan)))
chan               88 include/sound/emu8000_reg.h #define EMU8000_LFO1VAL_READ(emu, chan) \
chan               89 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(5, (chan)))
chan               90 include/sound/emu8000_reg.h #define EMU8000_ATKHLD_READ(emu, chan) \
chan               91 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(6, (chan)))
chan               92 include/sound/emu8000_reg.h #define EMU8000_LFO2VAL_READ(emu, chan) \
chan               93 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA2(emu), EMU8000_CMD(7, (chan)))
chan               94 include/sound/emu8000_reg.h #define EMU8000_IP_READ(emu, chan) \
chan               95 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(0, (chan)))
chan               96 include/sound/emu8000_reg.h #define EMU8000_IFATN_READ(emu, chan) \
chan               97 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(1, (chan)))
chan               98 include/sound/emu8000_reg.h #define EMU8000_PEFE_READ(emu, chan) \
chan               99 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(2, (chan)))
chan              100 include/sound/emu8000_reg.h #define EMU8000_FMMOD_READ(emu, chan) \
chan              101 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(3, (chan)))
chan              102 include/sound/emu8000_reg.h #define EMU8000_TREMFRQ_READ(emu, chan) \
chan              103 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(4, (chan)))
chan              104 include/sound/emu8000_reg.h #define EMU8000_FM2FRQ2_READ(emu, chan) \
chan              105 include/sound/emu8000_reg.h 	snd_emu8000_peek((emu), EMU8000_DATA3(emu), EMU8000_CMD(5, (chan)))
chan              108 include/sound/emu8000_reg.h #define EMU8000_CPF_WRITE(emu, chan, val) \
chan              109 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(0, (chan)), (val))
chan              110 include/sound/emu8000_reg.h #define EMU8000_PTRX_WRITE(emu, chan, val) \
chan              111 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(1, (chan)), (val))
chan              112 include/sound/emu8000_reg.h #define EMU8000_CVCF_WRITE(emu, chan, val) \
chan              113 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(2, (chan)), (val))
chan              114 include/sound/emu8000_reg.h #define EMU8000_VTFT_WRITE(emu, chan, val) \
chan              115 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(3, (chan)), (val))
chan              116 include/sound/emu8000_reg.h #define EMU8000_PSST_WRITE(emu, chan, val) \
chan              117 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(6, (chan)), (val))
chan              118 include/sound/emu8000_reg.h #define EMU8000_CSL_WRITE(emu, chan, val) \
chan              119 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(7, (chan)), (val))
chan              120 include/sound/emu8000_reg.h #define EMU8000_CCCA_WRITE(emu, chan, val) \
chan              121 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA1(emu), EMU8000_CMD(0, (chan)), (val))
chan              151 include/sound/emu8000_reg.h #define EMU8000_INIT1_WRITE(emu, chan, val) \
chan              152 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(2, (chan)), (val))
chan              153 include/sound/emu8000_reg.h #define EMU8000_INIT2_WRITE(emu, chan, val) \
chan              154 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(2, (chan)), (val))
chan              155 include/sound/emu8000_reg.h #define EMU8000_INIT3_WRITE(emu, chan, val) \
chan              156 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(3, (chan)), (val))
chan              157 include/sound/emu8000_reg.h #define EMU8000_INIT4_WRITE(emu, chan, val) \
chan              158 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(3, (chan)), (val))
chan              159 include/sound/emu8000_reg.h #define EMU8000_ENVVOL_WRITE(emu, chan, val) \
chan              160 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(4, (chan)), (val))
chan              161 include/sound/emu8000_reg.h #define EMU8000_DCYSUSV_WRITE(emu, chan, val) \
chan              162 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(5, (chan)), (val))
chan              163 include/sound/emu8000_reg.h #define EMU8000_ENVVAL_WRITE(emu, chan, val) \
chan              164 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(6, (chan)), (val))
chan              165 include/sound/emu8000_reg.h #define EMU8000_DCYSUS_WRITE(emu, chan, val) \
chan              166 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA1(emu), EMU8000_CMD(7, (chan)), (val))
chan              167 include/sound/emu8000_reg.h #define EMU8000_ATKHLDV_WRITE(emu, chan, val) \
chan              168 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(4, (chan)), (val))
chan              169 include/sound/emu8000_reg.h #define EMU8000_LFO1VAL_WRITE(emu, chan, val) \
chan              170 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(5, (chan)), (val))
chan              171 include/sound/emu8000_reg.h #define EMU8000_ATKHLD_WRITE(emu, chan, val) \
chan              172 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(6, (chan)), (val))
chan              173 include/sound/emu8000_reg.h #define EMU8000_LFO2VAL_WRITE(emu, chan, val) \
chan              174 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA2(emu), EMU8000_CMD(7, (chan)), (val))
chan              175 include/sound/emu8000_reg.h #define EMU8000_IP_WRITE(emu, chan, val) \
chan              176 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(0, (chan)), (val))
chan              177 include/sound/emu8000_reg.h #define EMU8000_IFATN_WRITE(emu, chan, val) \
chan              178 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(1, (chan)), (val))
chan              179 include/sound/emu8000_reg.h #define EMU8000_PEFE_WRITE(emu, chan, val) \
chan              180 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(2, (chan)), (val))
chan              181 include/sound/emu8000_reg.h #define EMU8000_FMMOD_WRITE(emu, chan, val) \
chan              182 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(3, (chan)), (val))
chan              183 include/sound/emu8000_reg.h #define EMU8000_TREMFRQ_WRITE(emu, chan, val) \
chan              184 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(4, (chan)), (val))
chan              185 include/sound/emu8000_reg.h #define EMU8000_FM2FRQ2_WRITE(emu, chan, val) \
chan              186 include/sound/emu8000_reg.h 	snd_emu8000_poke((emu), EMU8000_DATA3(emu), EMU8000_CMD(5, (chan)), (val))
chan              188 include/sound/emu8000_reg.h #define EMU8000_0080_WRITE(emu, chan, val) \
chan              189 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(4, (chan)), (val))
chan              190 include/sound/emu8000_reg.h #define EMU8000_00A0_WRITE(emu, chan, val) \
chan              191 include/sound/emu8000_reg.h 	snd_emu8000_poke_dw((emu), EMU8000_DATA0(emu), EMU8000_CMD(5, (chan)), (val))
chan              170 include/sound/emux_synth.h 	struct snd_midi_channel *chan;	/* Midi channel for this note */
chan              280 include/sound/opl3.h 	struct snd_midi_channel *chan;	/* Midi channel for this note */
chan               69 include/sound/seq_midi_emul.h 	void (*note_on)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
chan               70 include/sound/seq_midi_emul.h 	void (*note_off)(void *private_data,int note, int vel, struct snd_midi_channel *chan); /* release note */
chan               71 include/sound/seq_midi_emul.h 	void (*key_press)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
chan               72 include/sound/seq_midi_emul.h 	void (*note_terminate)(void *private_data, int note, struct snd_midi_channel *chan); /* terminate note immediately */
chan               73 include/sound/seq_midi_emul.h 	void (*control)(void *private_data, int type, struct snd_midi_channel *chan);
chan               74 include/sound/seq_midi_emul.h 	void (*nrpn)(void *private_data, struct snd_midi_channel *chan,
chan               12 include/sound/spear_spdif.h 	bool (*filter)(struct dma_chan *chan, void *slave);
chan               14 include/trace/events/tegra_apb_dma.h 		__string(chan,	dev_name(&dc->dev->device))
chan               19 include/trace/events/tegra_apb_dma.h 		__assign_str(chan, dev_name(&dc->dev->device));
chan               24 include/trace/events/tegra_apb_dma.h 		  __get_str(chan), __entry->cookie, __entry->residue)
chan               31 include/trace/events/tegra_apb_dma.h 		__string(chan,	dev_name(&dc->dev->device))
chan               36 include/trace/events/tegra_apb_dma.h 		__assign_str(chan, dev_name(&dc->dev->device));
chan               41 include/trace/events/tegra_apb_dma.h 		  __get_str(chan), __entry->count, __entry->ptr)
chan               48 include/trace/events/tegra_apb_dma.h 		__string(chan,	dev_name(&dc->dev->device))
chan               52 include/trace/events/tegra_apb_dma.h 		__assign_str(chan, dev_name(&dc->dev->device));
chan               55 include/trace/events/tegra_apb_dma.h 	TP_printk("%s: irq %d\n",  __get_str(chan), __entry->irq)
chan              166 include/uapi/linux/ptp_clock.h 	unsigned int chan;
chan              175 include/video/sh_mobile_lcdc.h 	int chan;
chan              202 include/video/tdfx.h 	struct tdfxfb_i2c_chan chan[2];
chan               36 kernel/relay.c 	buf->chan->cb->buf_unmapped(buf, vma->vm_file);
chan              104 kernel/relay.c 	if (length != (unsigned long)buf->chan->alloc_size)
chan              110 kernel/relay.c 	buf->chan->cb->buf_mapped(buf, filp);
chan              162 kernel/relay.c static struct rchan_buf *relay_create_buf(struct rchan *chan)
chan              166 kernel/relay.c 	if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t *))
chan              172 kernel/relay.c 	buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t *),
chan              177 kernel/relay.c 	buf->start = relay_alloc_buf(buf, &chan->alloc_size);
chan              181 kernel/relay.c 	buf->chan = chan;
chan              182 kernel/relay.c 	kref_get(&buf->chan->kref);
chan              199 kernel/relay.c 	struct rchan *chan = container_of(kref, struct rchan, kref);
chan              200 kernel/relay.c 	kfree(chan);
chan              209 kernel/relay.c 	struct rchan *chan = buf->chan;
chan              218 kernel/relay.c 	*per_cpu_ptr(chan->buf, buf->cpu) = NULL;
chan              221 kernel/relay.c 	kref_put(&chan->kref, relay_destroy_channel);
chan              258 kernel/relay.c 	return (ready >= buf->chan->n_subbufs) ? 1 : 0;
chan              370 kernel/relay.c 	for (i = 0; i < buf->chan->n_subbufs; i++)
chan              373 kernel/relay.c 	buf->chan->cb->subbuf_start(buf, buf->data, NULL, 0);
chan              387 kernel/relay.c void relay_reset(struct rchan *chan)
chan              392 kernel/relay.c 	if (!chan)
chan              395 kernel/relay.c 	if (chan->is_global && (buf = *per_cpu_ptr(chan->buf, 0))) {
chan              402 kernel/relay.c 		if ((buf = *per_cpu_ptr(chan->buf, i)))
chan              415 kernel/relay.c static struct dentry *relay_create_buf_file(struct rchan *chan,
chan              425 kernel/relay.c 	snprintf(tmpname, NAME_MAX, "%s%d", chan->base_filename, cpu);
chan              428 kernel/relay.c 	dentry = chan->cb->create_buf_file(tmpname, chan->parent,
chan              430 kernel/relay.c 					   &chan->is_global);
chan              444 kernel/relay.c static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu)
chan              449 kernel/relay.c  	if (chan->is_global)
chan              450 kernel/relay.c 		return *per_cpu_ptr(chan->buf, 0);
chan              452 kernel/relay.c 	buf = relay_create_buf(chan);
chan              456 kernel/relay.c 	if (chan->has_base_filename) {
chan              457 kernel/relay.c 		dentry = relay_create_buf_file(chan, buf, cpu);
chan              463 kernel/relay.c 		dentry = chan->cb->create_buf_file(NULL, NULL,
chan              465 kernel/relay.c 						   &chan->is_global);
chan              473 kernel/relay.c  	if(chan->is_global) {
chan              474 kernel/relay.c 		*per_cpu_ptr(chan->buf, 0) = buf;
chan              497 kernel/relay.c 	buf->chan->cb->remove_buf_file(buf->dentry);
chan              501 kernel/relay.c static void setup_callbacks(struct rchan *chan,
chan              505 kernel/relay.c 		chan->cb = &default_channel_callbacks;
chan              519 kernel/relay.c 	chan->cb = cb;
chan              524 kernel/relay.c 	struct rchan *chan;
chan              528 kernel/relay.c 	list_for_each_entry(chan, &relay_channels, list) {
chan              529 kernel/relay.c 		if ((buf = *per_cpu_ptr(chan->buf, cpu)))
chan              531 kernel/relay.c 		buf = relay_open_buf(chan, cpu);
chan              537 kernel/relay.c 		*per_cpu_ptr(chan->buf, cpu) = buf;
chan              571 kernel/relay.c 	struct rchan *chan;
chan              579 kernel/relay.c 	chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
chan              580 kernel/relay.c 	if (!chan)
chan              583 kernel/relay.c 	chan->buf = alloc_percpu(struct rchan_buf *);
chan              584 kernel/relay.c 	if (!chan->buf) {
chan              585 kernel/relay.c 		kfree(chan);
chan              589 kernel/relay.c 	chan->version = RELAYFS_CHANNEL_VERSION;
chan              590 kernel/relay.c 	chan->n_subbufs = n_subbufs;
chan              591 kernel/relay.c 	chan->subbuf_size = subbuf_size;
chan              592 kernel/relay.c 	chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs);
chan              593 kernel/relay.c 	chan->parent = parent;
chan              594 kernel/relay.c 	chan->private_data = private_data;
chan              596 kernel/relay.c 		chan->has_base_filename = 1;
chan              597 kernel/relay.c 		strlcpy(chan->base_filename, base_filename, NAME_MAX);
chan              599 kernel/relay.c 	setup_callbacks(chan, cb);
chan              600 kernel/relay.c 	kref_init(&chan->kref);
chan              604 kernel/relay.c 		buf = relay_open_buf(chan, i);
chan              607 kernel/relay.c 		*per_cpu_ptr(chan->buf, i) = buf;
chan              609 kernel/relay.c 	list_add(&chan->list, &relay_channels);
chan              612 kernel/relay.c 	return chan;
chan              616 kernel/relay.c 		if ((buf = *per_cpu_ptr(chan->buf, i)))
chan              620 kernel/relay.c 	kref_put(&chan->kref, relay_destroy_channel);
chan              654 kernel/relay.c int relay_late_setup_files(struct rchan *chan,
chan              665 kernel/relay.c 	if (!chan || !base_filename)
chan              668 kernel/relay.c 	strlcpy(chan->base_filename, base_filename, NAME_MAX);
chan              672 kernel/relay.c 	if (unlikely(chan->has_base_filename)) {
chan              676 kernel/relay.c 	chan->has_base_filename = 1;
chan              677 kernel/relay.c 	chan->parent = parent;
chan              679 kernel/relay.c 	if (chan->is_global) {
chan              681 kernel/relay.c 		buf = *per_cpu_ptr(chan->buf, 0);
chan              683 kernel/relay.c 			dentry = relay_create_buf_file(chan, buf, 0);
chan              684 kernel/relay.c 			if (dentry && !WARN_ON_ONCE(!chan->is_global)) {
chan              700 kernel/relay.c 		buf = *per_cpu_ptr(chan->buf, i);
chan              707 kernel/relay.c 		dentry = relay_create_buf_file(chan, buf, i);
chan              751 kernel/relay.c 	if (unlikely(length > buf->chan->subbuf_size))
chan              754 kernel/relay.c 	if (buf->offset != buf->chan->subbuf_size + 1) {
chan              755 kernel/relay.c 		buf->prev_padding = buf->chan->subbuf_size - buf->offset;
chan              756 kernel/relay.c 		old_subbuf = buf->subbufs_produced % buf->chan->n_subbufs;
chan              761 kernel/relay.c 				buf->chan->subbuf_size -
chan              764 kernel/relay.c 			buf->early_bytes += buf->chan->subbuf_size -
chan              779 kernel/relay.c 	new_subbuf = buf->subbufs_produced % buf->chan->n_subbufs;
chan              780 kernel/relay.c 	new = buf->start + new_subbuf * buf->chan->subbuf_size;
chan              782 kernel/relay.c 	if (!buf->chan->cb->subbuf_start(buf, new, old, buf->prev_padding)) {
chan              783 kernel/relay.c 		buf->offset = buf->chan->subbuf_size + 1;
chan              789 kernel/relay.c 	if (unlikely(length + buf->offset > buf->chan->subbuf_size))
chan              795 kernel/relay.c 	buf->chan->last_toobig = length;
chan              813 kernel/relay.c void relay_subbufs_consumed(struct rchan *chan,
chan              819 kernel/relay.c 	if (!chan || cpu >= NR_CPUS)
chan              822 kernel/relay.c 	buf = *per_cpu_ptr(chan->buf, cpu);
chan              823 kernel/relay.c 	if (!buf || subbufs_consumed > chan->n_subbufs)
chan              839 kernel/relay.c void relay_close(struct rchan *chan)
chan              844 kernel/relay.c 	if (!chan)
chan              848 kernel/relay.c 	if (chan->is_global && (buf = *per_cpu_ptr(chan->buf, 0)))
chan              852 kernel/relay.c 			if ((buf = *per_cpu_ptr(chan->buf, i)))
chan              855 kernel/relay.c 	if (chan->last_toobig)
chan              858 kernel/relay.c 		       chan->last_toobig, chan->subbuf_size);
chan              860 kernel/relay.c 	list_del(&chan->list);
chan              861 kernel/relay.c 	kref_put(&chan->kref, relay_destroy_channel);
chan              872 kernel/relay.c void relay_flush(struct rchan *chan)
chan              877 kernel/relay.c 	if (!chan)
chan              880 kernel/relay.c 	if (chan->is_global && (buf = *per_cpu_ptr(chan->buf, 0))) {
chan              887 kernel/relay.c 		if ((buf = *per_cpu_ptr(chan->buf, i)))
chan              969 kernel/relay.c 	size_t subbuf_size = buf->chan->subbuf_size;
chan              970 kernel/relay.c 	size_t n_subbufs = buf->chan->n_subbufs;
chan              978 kernel/relay.c 		relay_subbufs_consumed(buf->chan, buf->cpu, 1);
chan              986 kernel/relay.c 		read_subbuf = read_pos / buf->chan->subbuf_size;
chan              991 kernel/relay.c 		relay_subbufs_consumed(buf->chan, buf->cpu, 1);
chan             1001 kernel/relay.c 	size_t subbuf_size = buf->chan->subbuf_size;
chan             1002 kernel/relay.c 	size_t n_subbufs = buf->chan->n_subbufs;
chan             1048 kernel/relay.c 	size_t subbuf_size = buf->chan->subbuf_size;
chan             1078 kernel/relay.c 	size_t subbuf_size = buf->chan->subbuf_size;
chan             1079 kernel/relay.c 	size_t n_subbufs = buf->chan->n_subbufs;
chan             1107 kernel/relay.c 	size_t subbuf_size = buf->chan->subbuf_size;
chan             1108 kernel/relay.c 	size_t n_subbufs = buf->chan->n_subbufs;
chan             1169 kernel/relay.c 	if (rbuf->bytes_consumed >= rbuf->chan->subbuf_size) {
chan             1170 kernel/relay.c 		relay_subbufs_consumed(rbuf->chan, rbuf->cpu, 1);
chan             1171 kernel/relay.c 		rbuf->bytes_consumed %= rbuf->chan->subbuf_size;
chan             1207 kernel/relay.c 	unsigned int subbuf_size = rbuf->chan->subbuf_size;
chan             1209 kernel/relay.c 	uint32_t alloc_size = (uint32_t) rbuf->chan->alloc_size;
chan             1237 kernel/relay.c 	subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT;
chan              427 kernel/trace/blktrace.c 	bt = buf->chan->private_data;
chan              104 net/9p/trans_virtio.c 	struct virtio_chan *chan = client->trans;
chan              107 net/9p/trans_virtio.c 	if (chan)
chan              108 net/9p/trans_virtio.c 		chan->inuse = false;
chan              127 net/9p/trans_virtio.c 	struct virtio_chan *chan = vq->vdev->priv;
chan              135 net/9p/trans_virtio.c 	spin_lock_irqsave(&chan->lock, flags);
chan              136 net/9p/trans_virtio.c 	while ((req = virtqueue_get_buf(chan->vq, &len)) != NULL) {
chan              137 net/9p/trans_virtio.c 		if (!chan->ring_bufs_avail) {
chan              138 net/9p/trans_virtio.c 			chan->ring_bufs_avail = 1;
chan              144 net/9p/trans_virtio.c 			p9_client_cb(chan->client, req, REQ_STATUS_RCVD);
chan              147 net/9p/trans_virtio.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              150 net/9p/trans_virtio.c 		wake_up(chan->vc_wq);
chan              256 net/9p/trans_virtio.c 	struct virtio_chan *chan = client->trans;
chan              263 net/9p/trans_virtio.c 	spin_lock_irqsave(&chan->lock, flags);
chan              267 net/9p/trans_virtio.c 	out = pack_sg_list(chan->sg, 0,
chan              270 net/9p/trans_virtio.c 		sgs[out_sgs++] = chan->sg;
chan              272 net/9p/trans_virtio.c 	in = pack_sg_list(chan->sg, out,
chan              275 net/9p/trans_virtio.c 		sgs[out_sgs + in_sgs++] = chan->sg + out;
chan              277 net/9p/trans_virtio.c 	err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req,
chan              281 net/9p/trans_virtio.c 			chan->ring_bufs_avail = 0;
chan              282 net/9p/trans_virtio.c 			spin_unlock_irqrestore(&chan->lock, flags);
chan              283 net/9p/trans_virtio.c 			err = wait_event_killable(*chan->vc_wq,
chan              284 net/9p/trans_virtio.c 						  chan->ring_bufs_avail);
chan              291 net/9p/trans_virtio.c 			spin_unlock_irqrestore(&chan->lock, flags);
chan              297 net/9p/trans_virtio.c 	virtqueue_kick(chan->vq);
chan              298 net/9p/trans_virtio.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              304 net/9p/trans_virtio.c static int p9_get_mapped_pages(struct virtio_chan *chan,
chan              323 net/9p/trans_virtio.c 		if (atomic_read(&vp_pinned) >= chan->p9_max_pages) {
chan              325 net/9p/trans_virtio.c 			      (atomic_read(&vp_pinned) < chan->p9_max_pages));
chan              395 net/9p/trans_virtio.c 	struct virtio_chan *chan = client->trans;
chan              405 net/9p/trans_virtio.c 		int n = p9_get_mapped_pages(chan, &out_pages, uodata,
chan              424 net/9p/trans_virtio.c 		int n = p9_get_mapped_pages(chan, &in_pages, uidata,
chan              439 net/9p/trans_virtio.c 	spin_lock_irqsave(&chan->lock, flags);
chan              444 net/9p/trans_virtio.c 	out = pack_sg_list(chan->sg, 0,
chan              448 net/9p/trans_virtio.c 		sgs[out_sgs++] = chan->sg;
chan              451 net/9p/trans_virtio.c 		sgs[out_sgs++] = chan->sg + out;
chan              452 net/9p/trans_virtio.c 		out += pack_sg_list_p(chan->sg, out, VIRTQUEUE_NUM,
chan              463 net/9p/trans_virtio.c 	in = pack_sg_list(chan->sg, out,
chan              466 net/9p/trans_virtio.c 		sgs[out_sgs + in_sgs++] = chan->sg + out;
chan              469 net/9p/trans_virtio.c 		sgs[out_sgs + in_sgs++] = chan->sg + out + in;
chan              470 net/9p/trans_virtio.c 		in += pack_sg_list_p(chan->sg, out + in, VIRTQUEUE_NUM,
chan              475 net/9p/trans_virtio.c 	err = virtqueue_add_sgs(chan->vq, sgs, out_sgs, in_sgs, req,
chan              479 net/9p/trans_virtio.c 			chan->ring_bufs_avail = 0;
chan              480 net/9p/trans_virtio.c 			spin_unlock_irqrestore(&chan->lock, flags);
chan              481 net/9p/trans_virtio.c 			err = wait_event_killable(*chan->vc_wq,
chan              482 net/9p/trans_virtio.c 						  chan->ring_bufs_avail);
chan              489 net/9p/trans_virtio.c 			spin_unlock_irqrestore(&chan->lock, flags);
chan              496 net/9p/trans_virtio.c 	virtqueue_kick(chan->vq);
chan              497 net/9p/trans_virtio.c 	spin_unlock_irqrestore(&chan->lock, flags);
chan              529 net/9p/trans_virtio.c 	struct virtio_chan *chan;
chan              534 net/9p/trans_virtio.c 	chan = vdev->priv;
chan              535 net/9p/trans_virtio.c 	tag_len = strlen(chan->tag);
chan              537 net/9p/trans_virtio.c 	memcpy(buf, chan->tag, tag_len + 1);
chan              557 net/9p/trans_virtio.c 	struct virtio_chan *chan;
chan              565 net/9p/trans_virtio.c 	chan = kmalloc(sizeof(struct virtio_chan), GFP_KERNEL);
chan              566 net/9p/trans_virtio.c 	if (!chan) {
chan              572 net/9p/trans_virtio.c 	chan->vdev = vdev;
chan              575 net/9p/trans_virtio.c 	chan->vq = virtio_find_single_vq(vdev, req_done, "requests");
chan              576 net/9p/trans_virtio.c 	if (IS_ERR(chan->vq)) {
chan              577 net/9p/trans_virtio.c 		err = PTR_ERR(chan->vq);
chan              580 net/9p/trans_virtio.c 	chan->vq->vdev->priv = chan;
chan              581 net/9p/trans_virtio.c 	spin_lock_init(&chan->lock);
chan              583 net/9p/trans_virtio.c 	sg_init_table(chan->sg, VIRTQUEUE_NUM);
chan              585 net/9p/trans_virtio.c 	chan->inuse = false;
chan              600 net/9p/trans_virtio.c 	chan->tag = tag;
chan              605 net/9p/trans_virtio.c 	chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL);
chan              606 net/9p/trans_virtio.c 	if (!chan->vc_wq) {
chan              610 net/9p/trans_virtio.c 	init_waitqueue_head(chan->vc_wq);
chan              611 net/9p/trans_virtio.c 	chan->ring_bufs_avail = 1;
chan              613 net/9p/trans_virtio.c 	chan->p9_max_pages = nr_free_buffer_pages()/4;
chan              618 net/9p/trans_virtio.c 	list_add_tail(&chan->chan_list, &virtio_chan_list);
chan              631 net/9p/trans_virtio.c 	kfree(chan);
chan              654 net/9p/trans_virtio.c 	struct virtio_chan *chan;
chan              662 net/9p/trans_virtio.c 	list_for_each_entry(chan, &virtio_chan_list, chan_list) {
chan              663 net/9p/trans_virtio.c 		if (!strcmp(devname, chan->tag)) {
chan              664 net/9p/trans_virtio.c 			if (!chan->inuse) {
chan              665 net/9p/trans_virtio.c 				chan->inuse = true;
chan              679 net/9p/trans_virtio.c 	client->trans = (void *)chan;
chan              681 net/9p/trans_virtio.c 	chan->client = client;
chan              694 net/9p/trans_virtio.c 	struct virtio_chan *chan = vdev->priv;
chan              700 net/9p/trans_virtio.c 	list_del(&chan->chan_list);
chan              704 net/9p/trans_virtio.c 	while (chan->inuse) {
chan              722 net/9p/trans_virtio.c 	kfree(chan->tag);
chan              723 net/9p/trans_virtio.c 	kfree(chan->vc_wq);
chan              724 net/9p/trans_virtio.c 	kfree(chan);
chan               67 net/atm/pppoatm.c 	struct ppp_channel chan;	/* interface to generic ppp layer */
chan               94 net/atm/pppoatm.c static inline struct pppoatm_vcc *chan_to_pvcc(const struct ppp_channel *chan)
chan               96 net/atm/pppoatm.c 	return (struct pppoatm_vcc *) (chan->private);
chan              173 net/atm/pppoatm.c 	ppp_unregister_channel(&pvcc->chan);
chan              202 net/atm/pppoatm.c 		if (pvcc->chan.ppp == NULL) {	/* Not bound yet! */
chan              216 net/atm/pppoatm.c 			pvcc->chan.mtu += LLC_LEN;
chan              224 net/atm/pppoatm.c 	ppp_input(&pvcc->chan, skb);
chan              229 net/atm/pppoatm.c 	ppp_input_error(&pvcc->chan, 0);
chan              287 net/atm/pppoatm.c static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
chan              289 net/atm/pppoatm.c 	struct pppoatm_vcc *pvcc = chan_to_pvcc(chan);
chan              368 net/atm/pppoatm.c static int pppoatm_devppp_ioctl(struct ppp_channel *chan, unsigned int cmd,
chan              373 net/atm/pppoatm.c 		return put_user(chan_to_pvcc(chan)->flags, (int __user *) arg)
chan              376 net/atm/pppoatm.c 		return get_user(chan_to_pvcc(chan)->flags, (int __user *) arg)
chan              414 net/atm/pppoatm.c 	pvcc->chan.private = pvcc;
chan              415 net/atm/pppoatm.c 	pvcc->chan.ops = &pppoatm_ops;
chan              416 net/atm/pppoatm.c 	pvcc->chan.mtu = atmvcc->qos.txtp.max_sdu - PPP_HDRLEN -
chan              419 net/atm/pppoatm.c 	pvcc->wakeup_tasklet.data = (unsigned long) &pvcc->chan;
chan              420 net/atm/pppoatm.c 	err = ppp_register_channel(&pvcc->chan);
chan              465 net/atm/pppoatm.c 		    chan), (int __user *) argp) ? -EFAULT : 0;
chan              468 net/atm/pppoatm.c 		    chan), (int __user *) argp) ? -EFAULT : 0;
chan               34 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan               57 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan              117 net/bluetooth/6lowpan.c 		       &peer->chan->dst, peer->chan->dst_type);
chan              119 net/bluetooth/6lowpan.c 		if (bacmp(&peer->chan->dst, ba))
chan              122 net/bluetooth/6lowpan.c 		if (type == peer->chan->dst_type) {
chan              134 net/bluetooth/6lowpan.c __peer_lookup_chan(struct lowpan_btle_dev *dev, struct l2cap_chan *chan)
chan              139 net/bluetooth/6lowpan.c 		if (peer->chan == chan)
chan              152 net/bluetooth/6lowpan.c 		if (peer->chan->conn == conn)
chan              198 net/bluetooth/6lowpan.c 		       &peer->chan->dst, peer->chan->dst_type,
chan              372 net/bluetooth/6lowpan.c static int chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
chan              378 net/bluetooth/6lowpan.c 	peer = lookup_peer(chan->conn);
chan              382 net/bluetooth/6lowpan.c 	dev = lookup_dev(chan->conn);
chan              412 net/bluetooth/6lowpan.c 		lowpan_cb(skb)->chan = NULL;
chan              429 net/bluetooth/6lowpan.c 		*peer_addr = peer->chan->dst;
chan              430 net/bluetooth/6lowpan.c 		*peer_addr_type = peer->chan->dst_type;
chan              431 net/bluetooth/6lowpan.c 		lowpan_cb(skb)->chan = peer->chan;
chan              456 net/bluetooth/6lowpan.c static int send_pkt(struct l2cap_chan *chan, struct sk_buff *skb,
chan              466 net/bluetooth/6lowpan.c 	chan->data = skb;
chan              474 net/bluetooth/6lowpan.c 	err = l2cap_chan_send(chan, &msg, skb->len);
chan              511 net/bluetooth/6lowpan.c 			       &pentry->chan->dst, pentry->chan->dst_type,
chan              512 net/bluetooth/6lowpan.c 			       &pentry->peer_addr, pentry->chan);
chan              513 net/bluetooth/6lowpan.c 			ret = send_pkt(pentry->chan, local_skb, netdev);
chan              551 net/bluetooth/6lowpan.c 		if (lowpan_cb(skb)->chan) {
chan              554 net/bluetooth/6lowpan.c 			       &lowpan_cb(skb)->addr, lowpan_cb(skb)->chan);
chan              555 net/bluetooth/6lowpan.c 			err = send_pkt(lowpan_cb(skb)->chan, skb, netdev);
chan              638 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan              640 net/bluetooth/6lowpan.c 	chan = l2cap_chan_create();
chan              641 net/bluetooth/6lowpan.c 	if (!chan)
chan              644 net/bluetooth/6lowpan.c 	l2cap_chan_set_defaults(chan);
chan              646 net/bluetooth/6lowpan.c 	chan->chan_type = L2CAP_CHAN_CONN_ORIENTED;
chan              647 net/bluetooth/6lowpan.c 	chan->mode = L2CAP_MODE_LE_FLOWCTL;
chan              648 net/bluetooth/6lowpan.c 	chan->imtu = 1280;
chan              650 net/bluetooth/6lowpan.c 	return chan;
chan              653 net/bluetooth/6lowpan.c static struct l2cap_chan *add_peer_chan(struct l2cap_chan *chan,
chan              663 net/bluetooth/6lowpan.c 	peer->chan = chan;
chan              666 net/bluetooth/6lowpan.c 	baswap((void *)peer->lladdr, &chan->dst);
chan              680 net/bluetooth/6lowpan.c 	return peer->chan;
chan              683 net/bluetooth/6lowpan.c static int setup_netdev(struct l2cap_chan *chan, struct lowpan_btle_dev **dev)
chan              695 net/bluetooth/6lowpan.c 	baswap((void *)netdev->dev_addr, &chan->src);
chan              698 net/bluetooth/6lowpan.c 	SET_NETDEV_DEV(netdev, &chan->conn->hcon->hdev->dev);
chan              703 net/bluetooth/6lowpan.c 	(*dev)->hdev = chan->conn->hcon->hdev;
chan              722 net/bluetooth/6lowpan.c 	       netdev->ifindex, &chan->dst, chan->dst_type,
chan              723 net/bluetooth/6lowpan.c 	       &chan->src, chan->src_type);
chan              732 net/bluetooth/6lowpan.c static inline void chan_ready_cb(struct l2cap_chan *chan)
chan              737 net/bluetooth/6lowpan.c 	dev = lookup_dev(chan->conn);
chan              739 net/bluetooth/6lowpan.c 	BT_DBG("chan %p conn %p dev %p", chan, chan->conn, dev);
chan              742 net/bluetooth/6lowpan.c 		if (setup_netdev(chan, &dev) < 0) {
chan              743 net/bluetooth/6lowpan.c 			l2cap_chan_del(chan, -ENOENT);
chan              752 net/bluetooth/6lowpan.c 	add_peer_chan(chan, dev, new_netdev);
chan              758 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan              760 net/bluetooth/6lowpan.c 	chan = chan_create();
chan              761 net/bluetooth/6lowpan.c 	if (!chan)
chan              764 net/bluetooth/6lowpan.c 	chan->ops = pchan->ops;
chan              766 net/bluetooth/6lowpan.c 	BT_DBG("chan %p pchan %p", chan, pchan);
chan              768 net/bluetooth/6lowpan.c 	return chan;
chan              782 net/bluetooth/6lowpan.c static void chan_close_cb(struct l2cap_chan *chan)
chan              790 net/bluetooth/6lowpan.c 	BT_DBG("chan %p conn %p", chan, chan->conn);
chan              792 net/bluetooth/6lowpan.c 	if (chan->conn && chan->conn->hcon) {
chan              793 net/bluetooth/6lowpan.c 		if (!is_bt_6lowpan(chan->conn->hcon))
chan              806 net/bluetooth/6lowpan.c 		peer = __peer_lookup_chan(dev, chan);
chan              813 net/bluetooth/6lowpan.c 			BT_DBG("chan %p orig refcnt %d", chan,
chan              814 net/bluetooth/6lowpan.c 			       kref_read(&chan->kref));
chan              816 net/bluetooth/6lowpan.c 			l2cap_chan_put(chan);
chan              839 net/bluetooth/6lowpan.c static void chan_state_change_cb(struct l2cap_chan *chan, int state, int err)
chan              841 net/bluetooth/6lowpan.c 	BT_DBG("chan %p conn %p state %s err %d", chan, chan->conn,
chan              845 net/bluetooth/6lowpan.c static struct sk_buff *chan_alloc_skb_cb(struct l2cap_chan *chan,
chan              856 net/bluetooth/6lowpan.c static void chan_suspend_cb(struct l2cap_chan *chan)
chan              860 net/bluetooth/6lowpan.c 	BT_DBG("chan %p suspend", chan);
chan              862 net/bluetooth/6lowpan.c 	dev = lookup_dev(chan->conn);
chan              869 net/bluetooth/6lowpan.c static void chan_resume_cb(struct l2cap_chan *chan)
chan              873 net/bluetooth/6lowpan.c 	BT_DBG("chan %p resume", chan);
chan              875 net/bluetooth/6lowpan.c 	dev = lookup_dev(chan->conn);
chan              882 net/bluetooth/6lowpan.c static long chan_get_sndtimeo_cb(struct l2cap_chan *chan)
chan              914 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan              917 net/bluetooth/6lowpan.c 	chan = chan_create();
chan              918 net/bluetooth/6lowpan.c 	if (!chan)
chan              921 net/bluetooth/6lowpan.c 	chan->ops = &bt_6lowpan_chan_ops;
chan              923 net/bluetooth/6lowpan.c 	err = l2cap_chan_connect(chan, cpu_to_le16(L2CAP_PSM_IPSP), 0,
chan              926 net/bluetooth/6lowpan.c 	BT_DBG("chan %p err %d", chan, err);
chan              928 net/bluetooth/6lowpan.c 		l2cap_chan_put(chan);
chan              943 net/bluetooth/6lowpan.c 	BT_DBG("peer %p chan %p", peer, peer->chan);
chan              945 net/bluetooth/6lowpan.c 	l2cap_chan_close(peer->chan, ENOENT);
chan              953 net/bluetooth/6lowpan.c 	struct l2cap_chan *chan;
chan              959 net/bluetooth/6lowpan.c 	chan = chan_create();
chan              960 net/bluetooth/6lowpan.c 	if (!chan)
chan              963 net/bluetooth/6lowpan.c 	chan->ops = &bt_6lowpan_chan_ops;
chan              964 net/bluetooth/6lowpan.c 	chan->state = BT_LISTEN;
chan              965 net/bluetooth/6lowpan.c 	chan->src_type = BDADDR_LE_PUBLIC;
chan              967 net/bluetooth/6lowpan.c 	atomic_set(&chan->nesting, L2CAP_NESTING_PARENT);
chan              969 net/bluetooth/6lowpan.c 	BT_DBG("chan %p src type %d", chan, chan->src_type);
chan              971 net/bluetooth/6lowpan.c 	err = l2cap_add_psm(chan, addr, cpu_to_le16(L2CAP_PSM_IPSP));
chan              973 net/bluetooth/6lowpan.c 		l2cap_chan_put(chan);
chan              978 net/bluetooth/6lowpan.c 	return chan;
chan             1036 net/bluetooth/6lowpan.c 			new_peer->chan = peer->chan;
chan             1047 net/bluetooth/6lowpan.c 		l2cap_chan_close(peer->chan, ENOENT);
chan             1185 net/bluetooth/6lowpan.c 				   &peer->chan->dst, peer->chan->dst_type);
chan               44 net/bluetooth/a2mp.c 	struct l2cap_chan *chan = mgr->a2mp_chan;
chan               61 net/bluetooth/a2mp.c 	l2cap_chan_send(chan, &msg, total_len);
chan              241 net/bluetooth/a2mp.c 		struct l2cap_chan *chan;
chan              245 net/bluetooth/a2mp.c 		list_for_each_entry(chan, &conn->chan_l, list) {
chan              247 net/bluetooth/a2mp.c 			BT_DBG("chan %p state %s", chan,
chan              248 net/bluetooth/a2mp.c 			       state_to_string(chan->state));
chan              250 net/bluetooth/a2mp.c 			if (chan->scid == L2CAP_CID_A2MP)
chan              253 net/bluetooth/a2mp.c 			l2cap_chan_lock(chan);
chan              255 net/bluetooth/a2mp.c 			if (chan->state == BT_CONNECT)
chan              256 net/bluetooth/a2mp.c 				l2cap_send_conn_req(chan);
chan              258 net/bluetooth/a2mp.c 			l2cap_chan_unlock(chan);
chan              596 net/bluetooth/a2mp.c static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
chan              599 net/bluetooth/a2mp.c 	struct amp_mgr *mgr = chan->data;
chan              696 net/bluetooth/a2mp.c static void a2mp_chan_close_cb(struct l2cap_chan *chan)
chan              698 net/bluetooth/a2mp.c 	l2cap_chan_put(chan);
chan              701 net/bluetooth/a2mp.c static void a2mp_chan_state_change_cb(struct l2cap_chan *chan, int state,
chan              704 net/bluetooth/a2mp.c 	struct amp_mgr *mgr = chan->data;
chan              709 net/bluetooth/a2mp.c 	BT_DBG("chan %p state %s", chan, state_to_string(state));
chan              711 net/bluetooth/a2mp.c 	chan->state = state;
chan              721 net/bluetooth/a2mp.c static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan,
chan              753 net/bluetooth/a2mp.c 	struct l2cap_chan *chan;
chan              756 net/bluetooth/a2mp.c 	chan = l2cap_chan_create();
chan              757 net/bluetooth/a2mp.c 	if (!chan)
chan              760 net/bluetooth/a2mp.c 	BT_DBG("chan %p", chan);
chan              762 net/bluetooth/a2mp.c 	chan->chan_type = L2CAP_CHAN_FIXED;
chan              763 net/bluetooth/a2mp.c 	chan->scid = L2CAP_CID_A2MP;
chan              764 net/bluetooth/a2mp.c 	chan->dcid = L2CAP_CID_A2MP;
chan              765 net/bluetooth/a2mp.c 	chan->omtu = L2CAP_A2MP_DEFAULT_MTU;
chan              766 net/bluetooth/a2mp.c 	chan->imtu = L2CAP_A2MP_DEFAULT_MTU;
chan              767 net/bluetooth/a2mp.c 	chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
chan              769 net/bluetooth/a2mp.c 	chan->ops = &a2mp_chan_ops;
chan              771 net/bluetooth/a2mp.c 	l2cap_chan_set_defaults(chan);
chan              772 net/bluetooth/a2mp.c 	chan->remote_max_tx = chan->max_tx;
chan              773 net/bluetooth/a2mp.c 	chan->remote_tx_win = chan->tx_win;
chan              775 net/bluetooth/a2mp.c 	chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
chan              776 net/bluetooth/a2mp.c 	chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
chan              778 net/bluetooth/a2mp.c 	skb_queue_head_init(&chan->tx_q);
chan              780 net/bluetooth/a2mp.c 	chan->mode = L2CAP_MODE_ERTM;
chan              782 net/bluetooth/a2mp.c 	err = l2cap_ertm_init(chan);
chan              784 net/bluetooth/a2mp.c 		l2cap_chan_del(chan, 0);
chan              788 net/bluetooth/a2mp.c 	chan->conf_state = 0;
chan              791 net/bluetooth/a2mp.c 		__l2cap_chan_add(conn, chan);
chan              793 net/bluetooth/a2mp.c 		l2cap_chan_add(conn, chan);
chan              795 net/bluetooth/a2mp.c 	chan->remote_mps = chan->omtu;
chan              796 net/bluetooth/a2mp.c 	chan->mps = chan->omtu;
chan              798 net/bluetooth/a2mp.c 	chan->state = BT_CONNECTED;
chan              800 net/bluetooth/a2mp.c 	return chan;
chan              837 net/bluetooth/a2mp.c 	struct l2cap_chan *chan;
chan              847 net/bluetooth/a2mp.c 	chan = a2mp_chan_open(conn, locked);
chan              848 net/bluetooth/a2mp.c 	if (!chan) {
chan              853 net/bluetooth/a2mp.c 	mgr->a2mp_chan = chan;
chan              854 net/bluetooth/a2mp.c 	chan->data = mgr;
chan             1014 net/bluetooth/a2mp.c void a2mp_discover_amp(struct l2cap_chan *chan)
chan             1016 net/bluetooth/a2mp.c 	struct l2cap_conn *conn = chan->conn;
chan             1020 net/bluetooth/a2mp.c 	BT_DBG("chan %p conn %p mgr %p", chan, conn, mgr);
chan             1028 net/bluetooth/a2mp.c 	mgr->bredr_chan = chan;
chan              131 net/bluetooth/a2mp.h void a2mp_discover_amp(struct l2cap_chan *chan);
chan              144 net/bluetooth/a2mp.h static inline void a2mp_discover_amp(struct l2cap_chan *chan)
chan              527 net/bluetooth/amp.c void amp_create_logical_link(struct l2cap_chan *chan)
chan              529 net/bluetooth/amp.c 	struct hci_conn *hs_hcon = chan->hs_hcon;
chan              533 net/bluetooth/amp.c 	BT_DBG("chan %p hs_hcon %p dst %pMR", chan, hs_hcon,
chan              534 net/bluetooth/amp.c 	       &chan->conn->hcon->dst);
chan              539 net/bluetooth/amp.c 	hdev = hci_dev_hold(chan->hs_hcon->hdev);
chan              545 net/bluetooth/amp.c 	cp.tx_flow_spec.id = chan->local_id;
chan              546 net/bluetooth/amp.c 	cp.tx_flow_spec.stype = chan->local_stype;
chan              547 net/bluetooth/amp.c 	cp.tx_flow_spec.msdu = cpu_to_le16(chan->local_msdu);
chan              548 net/bluetooth/amp.c 	cp.tx_flow_spec.sdu_itime = cpu_to_le32(chan->local_sdu_itime);
chan              549 net/bluetooth/amp.c 	cp.tx_flow_spec.acc_lat = cpu_to_le32(chan->local_acc_lat);
chan              550 net/bluetooth/amp.c 	cp.tx_flow_spec.flush_to = cpu_to_le32(chan->local_flush_to);
chan              552 net/bluetooth/amp.c 	cp.rx_flow_spec.id = chan->remote_id;
chan              553 net/bluetooth/amp.c 	cp.rx_flow_spec.stype = chan->remote_stype;
chan              554 net/bluetooth/amp.c 	cp.rx_flow_spec.msdu = cpu_to_le16(chan->remote_msdu);
chan              555 net/bluetooth/amp.c 	cp.rx_flow_spec.sdu_itime = cpu_to_le32(chan->remote_sdu_itime);
chan              556 net/bluetooth/amp.c 	cp.rx_flow_spec.acc_lat = cpu_to_le32(chan->remote_acc_lat);
chan              557 net/bluetooth/amp.c 	cp.rx_flow_spec.flush_to = cpu_to_le32(chan->remote_flush_to);
chan               42 net/bluetooth/amp.h void amp_create_logical_link(struct l2cap_chan *chan);
chan               45 net/bluetooth/amp.h static inline void amp_create_logical_link(struct l2cap_chan *chan)
chan               57 net/bluetooth/amp.h void amp_create_logical_link(struct l2cap_chan *chan);
chan              544 net/bluetooth/bnep/core.c 	struct l2cap_conn *conn = l2cap_pi(session->sock->sk)->chan->conn;
chan              572 net/bluetooth/bnep/core.c 	baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
chan              573 net/bluetooth/bnep/core.c 	baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
chan              350 net/bluetooth/cmtp/core.c 	s = __cmtp_get_session(&l2cap_pi(sock->sk)->chan->dst);
chan              356 net/bluetooth/cmtp/core.c 	bacpy(&session->bdaddr, &l2cap_pi(sock->sk)->chan->dst);
chan              358 net/bluetooth/cmtp/core.c 	session->mtu = min_t(uint, l2cap_pi(sock->sk)->chan->omtu,
chan              359 net/bluetooth/cmtp/core.c 					l2cap_pi(sock->sk)->chan->imtu);
chan             1645 net/bluetooth/hci_conn.c 	struct hci_chan *chan;
chan             1654 net/bluetooth/hci_conn.c 	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
chan             1655 net/bluetooth/hci_conn.c 	if (!chan)
chan             1658 net/bluetooth/hci_conn.c 	chan->conn = hci_conn_get(conn);
chan             1659 net/bluetooth/hci_conn.c 	skb_queue_head_init(&chan->data_q);
chan             1660 net/bluetooth/hci_conn.c 	chan->state = BT_CONNECTED;
chan             1662 net/bluetooth/hci_conn.c 	list_add_rcu(&chan->list, &conn->chan_list);
chan             1664 net/bluetooth/hci_conn.c 	return chan;
chan             1667 net/bluetooth/hci_conn.c void hci_chan_del(struct hci_chan *chan)
chan             1669 net/bluetooth/hci_conn.c 	struct hci_conn *conn = chan->conn;
chan             1672 net/bluetooth/hci_conn.c 	BT_DBG("%s hcon %p chan %p", hdev->name, conn, chan);
chan             1674 net/bluetooth/hci_conn.c 	list_del_rcu(&chan->list);
chan             1683 net/bluetooth/hci_conn.c 	skb_queue_purge(&chan->data_q);
chan             1684 net/bluetooth/hci_conn.c 	kfree(chan);
chan             1689 net/bluetooth/hci_conn.c 	struct hci_chan *chan, *n;
chan             1693 net/bluetooth/hci_conn.c 	list_for_each_entry_safe(chan, n, &conn->chan_list, list)
chan             1694 net/bluetooth/hci_conn.c 		hci_chan_del(chan);
chan             3720 net/bluetooth/hci_core.c static void hci_queue_acl(struct hci_chan *chan, struct sk_buff_head *queue,
chan             3723 net/bluetooth/hci_core.c 	struct hci_conn *conn = chan->conn;
chan             3737 net/bluetooth/hci_core.c 		hci_add_acl_hdr(skb, chan->handle, flags);
chan             3782 net/bluetooth/hci_core.c void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags)
chan             3784 net/bluetooth/hci_core.c 	struct hci_dev *hdev = chan->conn->hdev;
chan             3786 net/bluetooth/hci_core.c 	BT_DBG("%s chan %p flags 0x%4.4x", hdev->name, chan, flags);
chan             3788 net/bluetooth/hci_core.c 	hci_queue_acl(chan, &chan->data_q, skb, flags);
chan             3902 net/bluetooth/hci_core.c 	struct hci_chan *chan = NULL;
chan             3942 net/bluetooth/hci_core.c 				chan = tmp;
chan             3952 net/bluetooth/hci_core.c 	if (!chan)
chan             3955 net/bluetooth/hci_core.c 	switch (chan->conn->type) {
chan             3971 net/bluetooth/hci_core.c 		bt_dev_err(hdev, "unknown link type %d", chan->conn->type);
chan             3976 net/bluetooth/hci_core.c 	BT_DBG("chan %p quote %d", chan, *quote);
chan             3977 net/bluetooth/hci_core.c 	return chan;
chan             3991 net/bluetooth/hci_core.c 		struct hci_chan *chan;
chan             4001 net/bluetooth/hci_core.c 		list_for_each_entry_rcu(chan, &conn->chan_list, list) {
chan             4004 net/bluetooth/hci_core.c 			if (chan->sent) {
chan             4005 net/bluetooth/hci_core.c 				chan->sent = 0;
chan             4009 net/bluetooth/hci_core.c 			if (skb_queue_empty(&chan->data_q))
chan             4012 net/bluetooth/hci_core.c 			skb = skb_peek(&chan->data_q);
chan             4018 net/bluetooth/hci_core.c 			BT_DBG("chan %p skb %p promoted to %d", chan, skb,
chan             4050 net/bluetooth/hci_core.c 	struct hci_chan *chan;
chan             4057 net/bluetooth/hci_core.c 	       (chan = hci_chan_sent(hdev, ACL_LINK, &quote))) {
chan             4058 net/bluetooth/hci_core.c 		u32 priority = (skb_peek(&chan->data_q))->priority;
chan             4059 net/bluetooth/hci_core.c 		while (quote-- && (skb = skb_peek(&chan->data_q))) {
chan             4060 net/bluetooth/hci_core.c 			BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
chan             4067 net/bluetooth/hci_core.c 			skb = skb_dequeue(&chan->data_q);
chan             4069 net/bluetooth/hci_core.c 			hci_conn_enter_active_mode(chan->conn,
chan             4076 net/bluetooth/hci_core.c 			chan->sent++;
chan             4077 net/bluetooth/hci_core.c 			chan->conn->sent++;
chan             4088 net/bluetooth/hci_core.c 	struct hci_chan *chan;
chan             4103 net/bluetooth/hci_core.c 	       (chan = hci_chan_sent(hdev, type, &quote))) {
chan             4104 net/bluetooth/hci_core.c 		u32 priority = (skb_peek(&chan->data_q))->priority;
chan             4105 net/bluetooth/hci_core.c 		while (quote > 0 && (skb = skb_peek(&chan->data_q))) {
chan             4108 net/bluetooth/hci_core.c 			BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
chan             4115 net/bluetooth/hci_core.c 			skb = skb_dequeue(&chan->data_q);
chan             4121 net/bluetooth/hci_core.c 			hci_conn_enter_active_mode(chan->conn,
chan             4130 net/bluetooth/hci_core.c 			chan->sent += blocks;
chan             4131 net/bluetooth/hci_core.c 			chan->conn->sent += blocks;
chan             4212 net/bluetooth/hci_core.c 	struct hci_chan *chan;
chan             4231 net/bluetooth/hci_core.c 	while (cnt && (chan = hci_chan_sent(hdev, LE_LINK, &quote))) {
chan             4232 net/bluetooth/hci_core.c 		u32 priority = (skb_peek(&chan->data_q))->priority;
chan             4233 net/bluetooth/hci_core.c 		while (quote-- && (skb = skb_peek(&chan->data_q))) {
chan             4234 net/bluetooth/hci_core.c 			BT_DBG("chan %p skb %p len %d priority %u", chan, skb,
chan             4241 net/bluetooth/hci_core.c 			skb = skb_dequeue(&chan->data_q);
chan             4247 net/bluetooth/hci_core.c 			chan->sent++;
chan             4248 net/bluetooth/hci_core.c 			chan->conn->sent++;
chan             3703 net/bluetooth/hci_event.c 	struct hci_chan *chan;
chan             3709 net/bluetooth/hci_event.c 		chan = hci_chan_lookup_handle(hdev, handle);
chan             3710 net/bluetooth/hci_event.c 		if (chan)
chan             3711 net/bluetooth/hci_event.c 			return chan->conn;
chan             1468 net/bluetooth/hci_sock.c static int hci_mgmt_cmd(struct hci_mgmt_chan *chan, struct sock *sk,
chan             1504 net/bluetooth/hci_sock.c 	if (chan->channel == HCI_CHANNEL_CONTROL) {
chan             1517 net/bluetooth/hci_sock.c 	if (opcode >= chan->handler_count ||
chan             1518 net/bluetooth/hci_sock.c 	    chan->handlers[opcode].func == NULL) {
chan             1525 net/bluetooth/hci_sock.c 	handler = &chan->handlers[opcode];
chan             1573 net/bluetooth/hci_sock.c 	if (hdev && chan->hdev_init)
chan             1574 net/bluetooth/hci_sock.c 		chan->hdev_init(sk, hdev);
chan             1680 net/bluetooth/hci_sock.c 	struct hci_mgmt_chan *chan;
chan             1711 net/bluetooth/hci_sock.c 		chan = __hci_mgmt_chan_find(hci_pi(sk)->channel);
chan             1712 net/bluetooth/hci_sock.c 		if (chan)
chan             1713 net/bluetooth/hci_sock.c 			err = hci_mgmt_cmd(chan, sk, msg, len);
chan              786 net/bluetooth/hidp/core.c 		 &l2cap_pi(session->ctrl_sock->sk)->chan->src);
chan              792 net/bluetooth/hidp/core.c 		 &l2cap_pi(session->ctrl_sock->sk)->chan->dst);
chan              944 net/bluetooth/hidp/core.c 	session->ctrl_mtu = min_t(uint, l2cap_pi(ctrl)->chan->omtu,
chan              945 net/bluetooth/hidp/core.c 					l2cap_pi(ctrl)->chan->imtu);
chan              946 net/bluetooth/hidp/core.c 	session->intr_mtu = min_t(uint, l2cap_pi(intr)->chan->omtu,
chan              947 net/bluetooth/hidp/core.c 					l2cap_pi(intr)->chan->imtu);
chan             1322 net/bluetooth/hidp/core.c 	ctrl_chan = l2cap_pi(ctrl_sock->sk)->chan;
chan             1323 net/bluetooth/hidp/core.c 	intr_chan = l2cap_pi(intr_sock->sk)->chan;
chan             1354 net/bluetooth/hidp/core.c 	struct l2cap_chan *chan;
chan             1364 net/bluetooth/hidp/core.c 	chan = l2cap_pi(ctrl_sock->sk)->chan;
chan             1366 net/bluetooth/hidp/core.c 	l2cap_chan_lock(chan);
chan             1367 net/bluetooth/hidp/core.c 	if (chan->conn)
chan             1368 net/bluetooth/hidp/core.c 		conn = l2cap_conn_get(chan->conn);
chan             1369 net/bluetooth/hidp/core.c 	l2cap_chan_unlock(chan);
chan             1374 net/bluetooth/hidp/core.c 	ret = hidp_session_new(&session, &chan->dst, ctrl_sock,
chan               58 net/bluetooth/l2cap_core.c static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size);
chan               59 net/bluetooth/l2cap_core.c static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err);
chan               61 net/bluetooth/l2cap_core.c static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
chan              189 net/bluetooth/l2cap_core.c int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm)
chan              195 net/bluetooth/l2cap_core.c 	if (psm && __l2cap_global_chan_by_addr(psm, src, chan->src_type)) {
chan              201 net/bluetooth/l2cap_core.c 		chan->psm = psm;
chan              202 net/bluetooth/l2cap_core.c 		chan->sport = psm;
chan              207 net/bluetooth/l2cap_core.c 		if (chan->src_type == BDADDR_BREDR) {
chan              220 net/bluetooth/l2cap_core.c 							 chan->src_type)) {
chan              221 net/bluetooth/l2cap_core.c 				chan->psm   = cpu_to_le16(p);
chan              222 net/bluetooth/l2cap_core.c 				chan->sport = cpu_to_le16(p);
chan              234 net/bluetooth/l2cap_core.c int l2cap_add_scid(struct l2cap_chan *chan,  __u16 scid)
chan              239 net/bluetooth/l2cap_core.c 	chan->omtu = L2CAP_DEFAULT_MTU;
chan              240 net/bluetooth/l2cap_core.c 	chan->chan_type = L2CAP_CHAN_FIXED;
chan              242 net/bluetooth/l2cap_core.c 	chan->scid = scid;
chan              266 net/bluetooth/l2cap_core.c static void l2cap_state_change(struct l2cap_chan *chan, int state)
chan              268 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p %s -> %s", chan, state_to_string(chan->state),
chan              271 net/bluetooth/l2cap_core.c 	chan->state = state;
chan              272 net/bluetooth/l2cap_core.c 	chan->ops->state_change(chan, state, 0);
chan              275 net/bluetooth/l2cap_core.c static inline void l2cap_state_change_and_error(struct l2cap_chan *chan,
chan              278 net/bluetooth/l2cap_core.c 	chan->state = state;
chan              279 net/bluetooth/l2cap_core.c 	chan->ops->state_change(chan, chan->state, err);
chan              282 net/bluetooth/l2cap_core.c static inline void l2cap_chan_set_err(struct l2cap_chan *chan, int err)
chan              284 net/bluetooth/l2cap_core.c 	chan->ops->state_change(chan, chan->state, err);
chan              287 net/bluetooth/l2cap_core.c static void __set_retrans_timer(struct l2cap_chan *chan)
chan              289 net/bluetooth/l2cap_core.c 	if (!delayed_work_pending(&chan->monitor_timer) &&
chan              290 net/bluetooth/l2cap_core.c 	    chan->retrans_timeout) {
chan              291 net/bluetooth/l2cap_core.c 		l2cap_set_timer(chan, &chan->retrans_timer,
chan              292 net/bluetooth/l2cap_core.c 				msecs_to_jiffies(chan->retrans_timeout));
chan              296 net/bluetooth/l2cap_core.c static void __set_monitor_timer(struct l2cap_chan *chan)
chan              298 net/bluetooth/l2cap_core.c 	__clear_retrans_timer(chan);
chan              299 net/bluetooth/l2cap_core.c 	if (chan->monitor_timeout) {
chan              300 net/bluetooth/l2cap_core.c 		l2cap_set_timer(chan, &chan->monitor_timer,
chan              301 net/bluetooth/l2cap_core.c 				msecs_to_jiffies(chan->monitor_timeout));
chan              414 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
chan              416 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              419 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
chan              422 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan              424 net/bluetooth/l2cap_core.c 	if (chan->state == BT_CONNECTED || chan->state == BT_CONFIG)
chan              426 net/bluetooth/l2cap_core.c 	else if (chan->state == BT_CONNECT &&
chan              427 net/bluetooth/l2cap_core.c 		 chan->sec_level != BT_SECURITY_SDP)
chan              432 net/bluetooth/l2cap_core.c 	l2cap_chan_close(chan, reason);
chan              434 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan              436 net/bluetooth/l2cap_core.c 	chan->ops->close(chan);
chan              439 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan              444 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan              446 net/bluetooth/l2cap_core.c 	chan = kzalloc(sizeof(*chan), GFP_ATOMIC);
chan              447 net/bluetooth/l2cap_core.c 	if (!chan)
chan              450 net/bluetooth/l2cap_core.c 	mutex_init(&chan->lock);
chan              453 net/bluetooth/l2cap_core.c 	atomic_set(&chan->nesting, L2CAP_NESTING_NORMAL);
chan              456 net/bluetooth/l2cap_core.c 	list_add(&chan->global_l, &chan_list);
chan              459 net/bluetooth/l2cap_core.c 	INIT_DELAYED_WORK(&chan->chan_timer, l2cap_chan_timeout);
chan              461 net/bluetooth/l2cap_core.c 	chan->state = BT_OPEN;
chan              463 net/bluetooth/l2cap_core.c 	kref_init(&chan->kref);
chan              466 net/bluetooth/l2cap_core.c 	set_bit(CONF_NOT_COMPLETE, &chan->conf_state);
chan              468 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan              470 net/bluetooth/l2cap_core.c 	return chan;
chan              476 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = container_of(kref, struct l2cap_chan, kref);
chan              478 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan              481 net/bluetooth/l2cap_core.c 	list_del(&chan->global_l);
chan              484 net/bluetooth/l2cap_core.c 	kfree(chan);
chan              502 net/bluetooth/l2cap_core.c void l2cap_chan_set_defaults(struct l2cap_chan *chan)
chan              504 net/bluetooth/l2cap_core.c 	chan->fcs  = L2CAP_FCS_CRC16;
chan              505 net/bluetooth/l2cap_core.c 	chan->max_tx = L2CAP_DEFAULT_MAX_TX;
chan              506 net/bluetooth/l2cap_core.c 	chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
chan              507 net/bluetooth/l2cap_core.c 	chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
chan              508 net/bluetooth/l2cap_core.c 	chan->remote_max_tx = chan->max_tx;
chan              509 net/bluetooth/l2cap_core.c 	chan->remote_tx_win = chan->tx_win;
chan              510 net/bluetooth/l2cap_core.c 	chan->ack_win = L2CAP_DEFAULT_TX_WINDOW;
chan              511 net/bluetooth/l2cap_core.c 	chan->sec_level = BT_SECURITY_LOW;
chan              512 net/bluetooth/l2cap_core.c 	chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
chan              513 net/bluetooth/l2cap_core.c 	chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
chan              514 net/bluetooth/l2cap_core.c 	chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
chan              515 net/bluetooth/l2cap_core.c 	chan->conf_state = 0;
chan              517 net/bluetooth/l2cap_core.c 	set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
chan              521 net/bluetooth/l2cap_core.c static void l2cap_le_flowctl_init(struct l2cap_chan *chan, u16 tx_credits)
chan              523 net/bluetooth/l2cap_core.c 	chan->sdu = NULL;
chan              524 net/bluetooth/l2cap_core.c 	chan->sdu_last_frag = NULL;
chan              525 net/bluetooth/l2cap_core.c 	chan->sdu_len = 0;
chan              526 net/bluetooth/l2cap_core.c 	chan->tx_credits = tx_credits;
chan              528 net/bluetooth/l2cap_core.c 	chan->mps = min_t(u16, chan->imtu, chan->conn->mtu - L2CAP_HDR_SIZE);
chan              530 net/bluetooth/l2cap_core.c 	chan->rx_credits = (chan->imtu / chan->mps) + 1;
chan              532 net/bluetooth/l2cap_core.c 	skb_queue_head_init(&chan->tx_q);
chan              535 net/bluetooth/l2cap_core.c void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
chan              538 net/bluetooth/l2cap_core.c 	       __le16_to_cpu(chan->psm), chan->dcid);
chan              542 net/bluetooth/l2cap_core.c 	chan->conn = conn;
chan              544 net/bluetooth/l2cap_core.c 	switch (chan->chan_type) {
chan              547 net/bluetooth/l2cap_core.c 		chan->scid = l2cap_alloc_cid(conn);
chan              549 net/bluetooth/l2cap_core.c 			chan->omtu = L2CAP_DEFAULT_MTU;
chan              554 net/bluetooth/l2cap_core.c 		chan->scid = L2CAP_CID_CONN_LESS;
chan              555 net/bluetooth/l2cap_core.c 		chan->dcid = L2CAP_CID_CONN_LESS;
chan              556 net/bluetooth/l2cap_core.c 		chan->omtu = L2CAP_DEFAULT_MTU;
chan              565 net/bluetooth/l2cap_core.c 		chan->scid = L2CAP_CID_SIGNALING;
chan              566 net/bluetooth/l2cap_core.c 		chan->dcid = L2CAP_CID_SIGNALING;
chan              567 net/bluetooth/l2cap_core.c 		chan->omtu = L2CAP_DEFAULT_MTU;
chan              570 net/bluetooth/l2cap_core.c 	chan->local_id		= L2CAP_BESTEFFORT_ID;
chan              571 net/bluetooth/l2cap_core.c 	chan->local_stype	= L2CAP_SERV_BESTEFFORT;
chan              572 net/bluetooth/l2cap_core.c 	chan->local_msdu	= L2CAP_DEFAULT_MAX_SDU_SIZE;
chan              573 net/bluetooth/l2cap_core.c 	chan->local_sdu_itime	= L2CAP_DEFAULT_SDU_ITIME;
chan              574 net/bluetooth/l2cap_core.c 	chan->local_acc_lat	= L2CAP_DEFAULT_ACC_LAT;
chan              575 net/bluetooth/l2cap_core.c 	chan->local_flush_to	= L2CAP_EFS_DEFAULT_FLUSH_TO;
chan              577 net/bluetooth/l2cap_core.c 	l2cap_chan_hold(chan);
chan              580 net/bluetooth/l2cap_core.c 	if (chan->chan_type != L2CAP_CHAN_FIXED ||
chan              581 net/bluetooth/l2cap_core.c 	    test_bit(FLAG_HOLD_HCI_CONN, &chan->flags))
chan              584 net/bluetooth/l2cap_core.c 	list_add(&chan->list, &conn->chan_l);
chan              587 net/bluetooth/l2cap_core.c void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
chan              590 net/bluetooth/l2cap_core.c 	__l2cap_chan_add(conn, chan);
chan              594 net/bluetooth/l2cap_core.c void l2cap_chan_del(struct l2cap_chan *chan, int err)
chan              596 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              598 net/bluetooth/l2cap_core.c 	__clear_chan_timer(chan);
chan              600 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, conn %p, err %d, state %s", chan, conn, err,
chan              601 net/bluetooth/l2cap_core.c 	       state_to_string(chan->state));
chan              603 net/bluetooth/l2cap_core.c 	chan->ops->teardown(chan, err);
chan              608 net/bluetooth/l2cap_core.c 		list_del(&chan->list);
chan              610 net/bluetooth/l2cap_core.c 		l2cap_chan_put(chan);
chan              612 net/bluetooth/l2cap_core.c 		chan->conn = NULL;
chan              618 net/bluetooth/l2cap_core.c 		if (chan->chan_type != L2CAP_CHAN_FIXED ||
chan              619 net/bluetooth/l2cap_core.c 		    test_bit(FLAG_HOLD_HCI_CONN, &chan->flags))
chan              622 net/bluetooth/l2cap_core.c 		if (mgr && mgr->bredr_chan == chan)
chan              626 net/bluetooth/l2cap_core.c 	if (chan->hs_hchan) {
chan              627 net/bluetooth/l2cap_core.c 		struct hci_chan *hs_hchan = chan->hs_hchan;
chan              629 net/bluetooth/l2cap_core.c 		BT_DBG("chan %p disconnect hs_hchan %p", chan, hs_hchan);
chan              633 net/bluetooth/l2cap_core.c 	if (test_bit(CONF_NOT_COMPLETE, &chan->conf_state))
chan              636 net/bluetooth/l2cap_core.c 	switch(chan->mode) {
chan              641 net/bluetooth/l2cap_core.c 		skb_queue_purge(&chan->tx_q);
chan              645 net/bluetooth/l2cap_core.c 		__clear_retrans_timer(chan);
chan              646 net/bluetooth/l2cap_core.c 		__clear_monitor_timer(chan);
chan              647 net/bluetooth/l2cap_core.c 		__clear_ack_timer(chan);
chan              649 net/bluetooth/l2cap_core.c 		skb_queue_purge(&chan->srej_q);
chan              651 net/bluetooth/l2cap_core.c 		l2cap_seq_list_free(&chan->srej_list);
chan              652 net/bluetooth/l2cap_core.c 		l2cap_seq_list_free(&chan->retrans_list);
chan              657 net/bluetooth/l2cap_core.c 		skb_queue_purge(&chan->tx_q);
chan              670 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan              674 net/bluetooth/l2cap_core.c 	list_for_each_entry(chan, &conn->chan_l, list) {
chan              675 net/bluetooth/l2cap_core.c 		l2cap_chan_lock(chan);
chan              676 net/bluetooth/l2cap_core.c 		bacpy(&chan->dst, &hcon->dst);
chan              677 net/bluetooth/l2cap_core.c 		chan->dst_type = bdaddr_dst_type(hcon);
chan              678 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan              684 net/bluetooth/l2cap_core.c static void l2cap_chan_le_connect_reject(struct l2cap_chan *chan)
chan              686 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              690 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_DEFER_SETUP, &chan->flags))
chan              695 net/bluetooth/l2cap_core.c 	l2cap_state_change(chan, BT_DISCONN);
chan              697 net/bluetooth/l2cap_core.c 	rsp.dcid    = cpu_to_le16(chan->scid);
chan              698 net/bluetooth/l2cap_core.c 	rsp.mtu     = cpu_to_le16(chan->imtu);
chan              699 net/bluetooth/l2cap_core.c 	rsp.mps     = cpu_to_le16(chan->mps);
chan              700 net/bluetooth/l2cap_core.c 	rsp.credits = cpu_to_le16(chan->rx_credits);
chan              703 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_LE_CONN_RSP, sizeof(rsp),
chan              707 net/bluetooth/l2cap_core.c static void l2cap_chan_connect_reject(struct l2cap_chan *chan)
chan              709 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              713 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_DEFER_SETUP, &chan->flags))
chan              718 net/bluetooth/l2cap_core.c 	l2cap_state_change(chan, BT_DISCONN);
chan              720 net/bluetooth/l2cap_core.c 	rsp.scid   = cpu_to_le16(chan->dcid);
chan              721 net/bluetooth/l2cap_core.c 	rsp.dcid   = cpu_to_le16(chan->scid);
chan              725 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_RSP, sizeof(rsp), &rsp);
chan              728 net/bluetooth/l2cap_core.c void l2cap_chan_close(struct l2cap_chan *chan, int reason)
chan              730 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              732 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
chan              734 net/bluetooth/l2cap_core.c 	switch (chan->state) {
chan              736 net/bluetooth/l2cap_core.c 		chan->ops->teardown(chan, 0);
chan              741 net/bluetooth/l2cap_core.c 		if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED) {
chan              742 net/bluetooth/l2cap_core.c 			__set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
chan              743 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, reason);
chan              745 net/bluetooth/l2cap_core.c 			l2cap_chan_del(chan, reason);
chan              749 net/bluetooth/l2cap_core.c 		if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED) {
chan              751 net/bluetooth/l2cap_core.c 				l2cap_chan_connect_reject(chan);
chan              753 net/bluetooth/l2cap_core.c 				l2cap_chan_le_connect_reject(chan);
chan              756 net/bluetooth/l2cap_core.c 		l2cap_chan_del(chan, reason);
chan              761 net/bluetooth/l2cap_core.c 		l2cap_chan_del(chan, reason);
chan              765 net/bluetooth/l2cap_core.c 		chan->ops->teardown(chan, 0);
chan              771 net/bluetooth/l2cap_core.c static inline u8 l2cap_get_auth_type(struct l2cap_chan *chan)
chan              773 net/bluetooth/l2cap_core.c 	switch (chan->chan_type) {
chan              775 net/bluetooth/l2cap_core.c 		switch (chan->sec_level) {
chan              786 net/bluetooth/l2cap_core.c 		if (chan->psm == cpu_to_le16(L2CAP_PSM_3DSP)) {
chan              787 net/bluetooth/l2cap_core.c 			if (chan->sec_level == BT_SECURITY_LOW)
chan              788 net/bluetooth/l2cap_core.c 				chan->sec_level = BT_SECURITY_SDP;
chan              790 net/bluetooth/l2cap_core.c 		if (chan->sec_level == BT_SECURITY_HIGH ||
chan              791 net/bluetooth/l2cap_core.c 		    chan->sec_level == BT_SECURITY_FIPS)
chan              797 net/bluetooth/l2cap_core.c 		if (chan->psm == cpu_to_le16(L2CAP_PSM_SDP)) {
chan              798 net/bluetooth/l2cap_core.c 			if (chan->sec_level == BT_SECURITY_LOW)
chan              799 net/bluetooth/l2cap_core.c 				chan->sec_level = BT_SECURITY_SDP;
chan              801 net/bluetooth/l2cap_core.c 			if (chan->sec_level == BT_SECURITY_HIGH ||
chan              802 net/bluetooth/l2cap_core.c 			    chan->sec_level == BT_SECURITY_FIPS)
chan              809 net/bluetooth/l2cap_core.c 		switch (chan->sec_level) {
chan              823 net/bluetooth/l2cap_core.c int l2cap_chan_check_security(struct l2cap_chan *chan, bool initiator)
chan              825 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan              829 net/bluetooth/l2cap_core.c 		return smp_conn_security(conn->hcon, chan->sec_level);
chan              831 net/bluetooth/l2cap_core.c 	auth_type = l2cap_get_auth_type(chan);
chan              833 net/bluetooth/l2cap_core.c 	return hci_conn_security(conn->hcon, chan->sec_level, auth_type,
chan              884 net/bluetooth/l2cap_core.c static bool __chan_is_moving(struct l2cap_chan *chan)
chan              886 net/bluetooth/l2cap_core.c 	return chan->move_state != L2CAP_MOVE_STABLE &&
chan              887 net/bluetooth/l2cap_core.c 	       chan->move_state != L2CAP_MOVE_WAIT_PREPARE;
chan              890 net/bluetooth/l2cap_core.c static void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb)
chan              892 net/bluetooth/l2cap_core.c 	struct hci_conn *hcon = chan->conn->hcon;
chan              895 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, skb %p len %d priority %u", chan, skb, skb->len,
chan              898 net/bluetooth/l2cap_core.c 	if (chan->hs_hcon && !__chan_is_moving(chan)) {
chan              899 net/bluetooth/l2cap_core.c 		if (chan->hs_hchan)
chan              900 net/bluetooth/l2cap_core.c 			hci_send_acl(chan->hs_hchan, skb, ACL_COMPLETE);
chan              912 net/bluetooth/l2cap_core.c 	    (!test_bit(FLAG_FLUSHABLE, &chan->flags) &&
chan              918 net/bluetooth/l2cap_core.c 	bt_cb(skb)->force_active = test_bit(FLAG_FORCE_ACTIVE, &chan->flags);
chan              919 net/bluetooth/l2cap_core.c 	hci_send_acl(chan->conn->hchan, skb, flags);
chan              970 net/bluetooth/l2cap_core.c static inline void __unpack_control(struct l2cap_chan *chan,
chan              973 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags)) {
chan             1022 net/bluetooth/l2cap_core.c static inline void __pack_control(struct l2cap_chan *chan,
chan             1026 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags)) {
chan             1035 net/bluetooth/l2cap_core.c static inline unsigned int __ertm_hdr_size(struct l2cap_chan *chan)
chan             1037 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             1043 net/bluetooth/l2cap_core.c static struct sk_buff *l2cap_create_sframe_pdu(struct l2cap_chan *chan,
chan             1048 net/bluetooth/l2cap_core.c 	int hlen = __ertm_hdr_size(chan);
chan             1050 net/bluetooth/l2cap_core.c 	if (chan->fcs == L2CAP_FCS_CRC16)
chan             1060 net/bluetooth/l2cap_core.c 	lh->cid = cpu_to_le16(chan->dcid);
chan             1062 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             1067 net/bluetooth/l2cap_core.c 	if (chan->fcs == L2CAP_FCS_CRC16) {
chan             1076 net/bluetooth/l2cap_core.c static void l2cap_send_sframe(struct l2cap_chan *chan,
chan             1082 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             1087 net/bluetooth/l2cap_core.c 	if (__chan_is_moving(chan))
chan             1090 net/bluetooth/l2cap_core.c 	if (test_and_clear_bit(CONN_SEND_FBIT, &chan->conn_state) &&
chan             1095 net/bluetooth/l2cap_core.c 		clear_bit(CONN_RNR_SENT, &chan->conn_state);
chan             1097 net/bluetooth/l2cap_core.c 		set_bit(CONN_RNR_SENT, &chan->conn_state);
chan             1100 net/bluetooth/l2cap_core.c 		chan->last_acked_seq = control->reqseq;
chan             1101 net/bluetooth/l2cap_core.c 		__clear_ack_timer(chan);
chan             1107 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             1112 net/bluetooth/l2cap_core.c 	skb = l2cap_create_sframe_pdu(chan, control_field);
chan             1114 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, skb);
chan             1117 net/bluetooth/l2cap_core.c static void l2cap_send_rr_or_rnr(struct l2cap_chan *chan, bool poll)
chan             1121 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, poll %d", chan, poll);
chan             1127 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state))
chan             1132 net/bluetooth/l2cap_core.c 	control.reqseq = chan->buffer_seq;
chan             1133 net/bluetooth/l2cap_core.c 	l2cap_send_sframe(chan, &control);
chan             1136 net/bluetooth/l2cap_core.c static inline int __l2cap_no_conn_pending(struct l2cap_chan *chan)
chan             1138 net/bluetooth/l2cap_core.c 	if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED)
chan             1141 net/bluetooth/l2cap_core.c 	return !test_bit(CONF_CONNECT_PEND, &chan->conf_state);
chan             1144 net/bluetooth/l2cap_core.c static bool __amp_capable(struct l2cap_chan *chan)
chan             1146 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1166 net/bluetooth/l2cap_core.c 	if (chan->chan_policy == BT_CHANNEL_POLICY_AMP_PREFERRED)
chan             1172 net/bluetooth/l2cap_core.c static bool l2cap_check_efs(struct l2cap_chan *chan)
chan             1178 net/bluetooth/l2cap_core.c void l2cap_send_conn_req(struct l2cap_chan *chan)
chan             1180 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1183 net/bluetooth/l2cap_core.c 	req.scid = cpu_to_le16(chan->scid);
chan             1184 net/bluetooth/l2cap_core.c 	req.psm  = chan->psm;
chan             1186 net/bluetooth/l2cap_core.c 	chan->ident = l2cap_get_ident(conn);
chan             1188 net/bluetooth/l2cap_core.c 	set_bit(CONF_CONNECT_PEND, &chan->conf_state);
chan             1190 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_REQ, sizeof(req), &req);
chan             1193 net/bluetooth/l2cap_core.c static void l2cap_send_create_chan_req(struct l2cap_chan *chan, u8 amp_id)
chan             1196 net/bluetooth/l2cap_core.c 	req.scid = cpu_to_le16(chan->scid);
chan             1197 net/bluetooth/l2cap_core.c 	req.psm  = chan->psm;
chan             1200 net/bluetooth/l2cap_core.c 	chan->ident = l2cap_get_ident(chan->conn);
chan             1202 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(chan->conn, chan->ident, L2CAP_CREATE_CHAN_REQ,
chan             1206 net/bluetooth/l2cap_core.c static void l2cap_move_setup(struct l2cap_chan *chan)
chan             1210 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1212 net/bluetooth/l2cap_core.c 	if (chan->mode != L2CAP_MODE_ERTM)
chan             1215 net/bluetooth/l2cap_core.c 	__clear_retrans_timer(chan);
chan             1216 net/bluetooth/l2cap_core.c 	__clear_monitor_timer(chan);
chan             1217 net/bluetooth/l2cap_core.c 	__clear_ack_timer(chan);
chan             1219 net/bluetooth/l2cap_core.c 	chan->retry_count = 0;
chan             1220 net/bluetooth/l2cap_core.c 	skb_queue_walk(&chan->tx_q, skb) {
chan             1227 net/bluetooth/l2cap_core.c 	chan->expected_tx_seq = chan->buffer_seq;
chan             1229 net/bluetooth/l2cap_core.c 	clear_bit(CONN_REJ_ACT, &chan->conn_state);
chan             1230 net/bluetooth/l2cap_core.c 	clear_bit(CONN_SREJ_ACT, &chan->conn_state);
chan             1231 net/bluetooth/l2cap_core.c 	l2cap_seq_list_clear(&chan->retrans_list);
chan             1232 net/bluetooth/l2cap_core.c 	l2cap_seq_list_clear(&chan->srej_list);
chan             1233 net/bluetooth/l2cap_core.c 	skb_queue_purge(&chan->srej_q);
chan             1235 net/bluetooth/l2cap_core.c 	chan->tx_state = L2CAP_TX_STATE_XMIT;
chan             1236 net/bluetooth/l2cap_core.c 	chan->rx_state = L2CAP_RX_STATE_MOVE;
chan             1238 net/bluetooth/l2cap_core.c 	set_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             1241 net/bluetooth/l2cap_core.c static void l2cap_move_done(struct l2cap_chan *chan)
chan             1243 net/bluetooth/l2cap_core.c 	u8 move_role = chan->move_role;
chan             1244 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1246 net/bluetooth/l2cap_core.c 	chan->move_state = L2CAP_MOVE_STABLE;
chan             1247 net/bluetooth/l2cap_core.c 	chan->move_role = L2CAP_MOVE_ROLE_NONE;
chan             1249 net/bluetooth/l2cap_core.c 	if (chan->mode != L2CAP_MODE_ERTM)
chan             1254 net/bluetooth/l2cap_core.c 		l2cap_tx(chan, NULL, NULL, L2CAP_EV_EXPLICIT_POLL);
chan             1255 net/bluetooth/l2cap_core.c 		chan->rx_state = L2CAP_RX_STATE_WAIT_F;
chan             1258 net/bluetooth/l2cap_core.c 		chan->rx_state = L2CAP_RX_STATE_WAIT_P;
chan             1263 net/bluetooth/l2cap_core.c static void l2cap_chan_ready(struct l2cap_chan *chan)
chan             1269 net/bluetooth/l2cap_core.c 	if (chan->state == BT_CONNECTED)
chan             1273 net/bluetooth/l2cap_core.c 	chan->conf_state = 0;
chan             1274 net/bluetooth/l2cap_core.c 	__clear_chan_timer(chan);
chan             1276 net/bluetooth/l2cap_core.c 	if (chan->mode == L2CAP_MODE_LE_FLOWCTL && !chan->tx_credits)
chan             1277 net/bluetooth/l2cap_core.c 		chan->ops->suspend(chan);
chan             1279 net/bluetooth/l2cap_core.c 	chan->state = BT_CONNECTED;
chan             1281 net/bluetooth/l2cap_core.c 	chan->ops->ready(chan);
chan             1284 net/bluetooth/l2cap_core.c static void l2cap_le_connect(struct l2cap_chan *chan)
chan             1286 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1289 net/bluetooth/l2cap_core.c 	if (test_and_set_bit(FLAG_LE_CONN_REQ_SENT, &chan->flags))
chan             1292 net/bluetooth/l2cap_core.c 	l2cap_le_flowctl_init(chan, 0);
chan             1294 net/bluetooth/l2cap_core.c 	req.psm     = chan->psm;
chan             1295 net/bluetooth/l2cap_core.c 	req.scid    = cpu_to_le16(chan->scid);
chan             1296 net/bluetooth/l2cap_core.c 	req.mtu     = cpu_to_le16(chan->imtu);
chan             1297 net/bluetooth/l2cap_core.c 	req.mps     = cpu_to_le16(chan->mps);
chan             1298 net/bluetooth/l2cap_core.c 	req.credits = cpu_to_le16(chan->rx_credits);
chan             1300 net/bluetooth/l2cap_core.c 	chan->ident = l2cap_get_ident(conn);
chan             1302 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_LE_CONN_REQ,
chan             1306 net/bluetooth/l2cap_core.c static void l2cap_le_start(struct l2cap_chan *chan)
chan             1308 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1310 net/bluetooth/l2cap_core.c 	if (!smp_conn_security(conn->hcon, chan->sec_level))
chan             1313 net/bluetooth/l2cap_core.c 	if (!chan->psm) {
chan             1314 net/bluetooth/l2cap_core.c 		l2cap_chan_ready(chan);
chan             1318 net/bluetooth/l2cap_core.c 	if (chan->state == BT_CONNECT)
chan             1319 net/bluetooth/l2cap_core.c 		l2cap_le_connect(chan);
chan             1322 net/bluetooth/l2cap_core.c static void l2cap_start_connection(struct l2cap_chan *chan)
chan             1324 net/bluetooth/l2cap_core.c 	if (__amp_capable(chan)) {
chan             1325 net/bluetooth/l2cap_core.c 		BT_DBG("chan %p AMP capable: discover AMPs", chan);
chan             1326 net/bluetooth/l2cap_core.c 		a2mp_discover_amp(chan);
chan             1327 net/bluetooth/l2cap_core.c 	} else if (chan->conn->hcon->type == LE_LINK) {
chan             1328 net/bluetooth/l2cap_core.c 		l2cap_le_start(chan);
chan             1330 net/bluetooth/l2cap_core.c 		l2cap_send_conn_req(chan);
chan             1367 net/bluetooth/l2cap_core.c static void l2cap_do_start(struct l2cap_chan *chan)
chan             1369 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1372 net/bluetooth/l2cap_core.c 		l2cap_le_start(chan);
chan             1384 net/bluetooth/l2cap_core.c 	if (!l2cap_chan_check_security(chan, true) ||
chan             1385 net/bluetooth/l2cap_core.c 	    !__l2cap_no_conn_pending(chan))
chan             1389 net/bluetooth/l2cap_core.c 		l2cap_start_connection(chan);
chan             1391 net/bluetooth/l2cap_core.c 		__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
chan             1410 net/bluetooth/l2cap_core.c static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err)
chan             1412 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             1418 net/bluetooth/l2cap_core.c 	if (chan->mode == L2CAP_MODE_ERTM && chan->state == BT_CONNECTED) {
chan             1419 net/bluetooth/l2cap_core.c 		__clear_retrans_timer(chan);
chan             1420 net/bluetooth/l2cap_core.c 		__clear_monitor_timer(chan);
chan             1421 net/bluetooth/l2cap_core.c 		__clear_ack_timer(chan);
chan             1424 net/bluetooth/l2cap_core.c 	if (chan->scid == L2CAP_CID_A2MP) {
chan             1425 net/bluetooth/l2cap_core.c 		l2cap_state_change(chan, BT_DISCONN);
chan             1429 net/bluetooth/l2cap_core.c 	req.dcid = cpu_to_le16(chan->dcid);
chan             1430 net/bluetooth/l2cap_core.c 	req.scid = cpu_to_le16(chan->scid);
chan             1434 net/bluetooth/l2cap_core.c 	l2cap_state_change_and_error(chan, BT_DISCONN, err);
chan             1440 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan, *tmp;
chan             1446 net/bluetooth/l2cap_core.c 	list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
chan             1447 net/bluetooth/l2cap_core.c 		l2cap_chan_lock(chan);
chan             1449 net/bluetooth/l2cap_core.c 		if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
chan             1450 net/bluetooth/l2cap_core.c 			l2cap_chan_ready(chan);
chan             1451 net/bluetooth/l2cap_core.c 			l2cap_chan_unlock(chan);
chan             1455 net/bluetooth/l2cap_core.c 		if (chan->state == BT_CONNECT) {
chan             1456 net/bluetooth/l2cap_core.c 			if (!l2cap_chan_check_security(chan, true) ||
chan             1457 net/bluetooth/l2cap_core.c 			    !__l2cap_no_conn_pending(chan)) {
chan             1458 net/bluetooth/l2cap_core.c 				l2cap_chan_unlock(chan);
chan             1462 net/bluetooth/l2cap_core.c 			if (!l2cap_mode_supported(chan->mode, conn->feat_mask)
chan             1464 net/bluetooth/l2cap_core.c 					&chan->conf_state)) {
chan             1465 net/bluetooth/l2cap_core.c 				l2cap_chan_close(chan, ECONNRESET);
chan             1466 net/bluetooth/l2cap_core.c 				l2cap_chan_unlock(chan);
chan             1471 net/bluetooth/l2cap_core.c 				l2cap_start_connection(chan);
chan             1473 net/bluetooth/l2cap_core.c 				l2cap_chan_close(chan, ECONNREFUSED);
chan             1475 net/bluetooth/l2cap_core.c 		} else if (chan->state == BT_CONNECT2) {
chan             1478 net/bluetooth/l2cap_core.c 			rsp.scid = cpu_to_le16(chan->dcid);
chan             1479 net/bluetooth/l2cap_core.c 			rsp.dcid = cpu_to_le16(chan->scid);
chan             1481 net/bluetooth/l2cap_core.c 			if (l2cap_chan_check_security(chan, false)) {
chan             1482 net/bluetooth/l2cap_core.c 				if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
chan             1485 net/bluetooth/l2cap_core.c 					chan->ops->defer(chan);
chan             1488 net/bluetooth/l2cap_core.c 					l2cap_state_change(chan, BT_CONFIG);
chan             1497 net/bluetooth/l2cap_core.c 			l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_RSP,
chan             1500 net/bluetooth/l2cap_core.c 			if (test_bit(CONF_REQ_SENT, &chan->conf_state) ||
chan             1502 net/bluetooth/l2cap_core.c 				l2cap_chan_unlock(chan);
chan             1506 net/bluetooth/l2cap_core.c 			set_bit(CONF_REQ_SENT, &chan->conf_state);
chan             1508 net/bluetooth/l2cap_core.c 				       l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
chan             1509 net/bluetooth/l2cap_core.c 			chan->num_conf_req++;
chan             1512 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             1553 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             1563 net/bluetooth/l2cap_core.c 	list_for_each_entry(chan, &conn->chan_l, list) {
chan             1565 net/bluetooth/l2cap_core.c 		l2cap_chan_lock(chan);
chan             1567 net/bluetooth/l2cap_core.c 		if (chan->scid == L2CAP_CID_A2MP) {
chan             1568 net/bluetooth/l2cap_core.c 			l2cap_chan_unlock(chan);
chan             1573 net/bluetooth/l2cap_core.c 			l2cap_le_start(chan);
chan             1574 net/bluetooth/l2cap_core.c 		} else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
chan             1576 net/bluetooth/l2cap_core.c 				l2cap_chan_ready(chan);
chan             1577 net/bluetooth/l2cap_core.c 		} else if (chan->state == BT_CONNECT) {
chan             1578 net/bluetooth/l2cap_core.c 			l2cap_do_start(chan);
chan             1581 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             1595 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             1601 net/bluetooth/l2cap_core.c 	list_for_each_entry(chan, &conn->chan_l, list) {
chan             1602 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_FORCE_RELIABLE, &chan->flags))
chan             1603 net/bluetooth/l2cap_core.c 			l2cap_chan_set_err(chan, err);
chan             1702 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan, *l;
chan             1731 net/bluetooth/l2cap_core.c 	list_for_each_entry_safe(chan, l, &conn->chan_l, list) {
chan             1732 net/bluetooth/l2cap_core.c 		l2cap_chan_hold(chan);
chan             1733 net/bluetooth/l2cap_core.c 		l2cap_chan_lock(chan);
chan             1735 net/bluetooth/l2cap_core.c 		l2cap_chan_del(chan, err);
chan             1737 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             1739 net/bluetooth/l2cap_core.c 		chan->ops->close(chan);
chan             1740 net/bluetooth/l2cap_core.c 		l2cap_chan_put(chan);
chan             1832 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
chan             1835 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1837 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             1839 net/bluetooth/l2cap_core.c 	if (!chan->conn) {
chan             1840 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             1841 net/bluetooth/l2cap_core.c 		l2cap_chan_put(chan);
chan             1845 net/bluetooth/l2cap_core.c 	l2cap_tx(chan, NULL, NULL, L2CAP_EV_MONITOR_TO);
chan             1847 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             1848 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             1853 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
chan             1856 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1858 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             1860 net/bluetooth/l2cap_core.c 	if (!chan->conn) {
chan             1861 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             1862 net/bluetooth/l2cap_core.c 		l2cap_chan_put(chan);
chan             1866 net/bluetooth/l2cap_core.c 	l2cap_tx(chan, NULL, NULL, L2CAP_EV_RETRANS_TO);
chan             1867 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             1868 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             1871 net/bluetooth/l2cap_core.c static void l2cap_streaming_send(struct l2cap_chan *chan,
chan             1877 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, skbs %p", chan, skbs);
chan             1879 net/bluetooth/l2cap_core.c 	if (__chan_is_moving(chan))
chan             1882 net/bluetooth/l2cap_core.c 	skb_queue_splice_tail_init(skbs, &chan->tx_q);
chan             1884 net/bluetooth/l2cap_core.c 	while (!skb_queue_empty(&chan->tx_q)) {
chan             1886 net/bluetooth/l2cap_core.c 		skb = skb_dequeue(&chan->tx_q);
chan             1892 net/bluetooth/l2cap_core.c 		control->txseq = chan->next_tx_seq;
chan             1894 net/bluetooth/l2cap_core.c 		__pack_control(chan, control, skb);
chan             1896 net/bluetooth/l2cap_core.c 		if (chan->fcs == L2CAP_FCS_CRC16) {
chan             1901 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, skb);
chan             1905 net/bluetooth/l2cap_core.c 		chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
chan             1906 net/bluetooth/l2cap_core.c 		chan->frames_sent++;
chan             1910 net/bluetooth/l2cap_core.c static int l2cap_ertm_send(struct l2cap_chan *chan)
chan             1916 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1918 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONNECTED)
chan             1921 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_REMOTE_BUSY, &chan->conn_state))
chan             1924 net/bluetooth/l2cap_core.c 	if (__chan_is_moving(chan))
chan             1927 net/bluetooth/l2cap_core.c 	while (chan->tx_send_head &&
chan             1928 net/bluetooth/l2cap_core.c 	       chan->unacked_frames < chan->remote_tx_win &&
chan             1929 net/bluetooth/l2cap_core.c 	       chan->tx_state == L2CAP_TX_STATE_XMIT) {
chan             1931 net/bluetooth/l2cap_core.c 		skb = chan->tx_send_head;
chan             1936 net/bluetooth/l2cap_core.c 		if (test_and_clear_bit(CONN_SEND_FBIT, &chan->conn_state))
chan             1939 net/bluetooth/l2cap_core.c 		control->reqseq = chan->buffer_seq;
chan             1940 net/bluetooth/l2cap_core.c 		chan->last_acked_seq = chan->buffer_seq;
chan             1941 net/bluetooth/l2cap_core.c 		control->txseq = chan->next_tx_seq;
chan             1943 net/bluetooth/l2cap_core.c 		__pack_control(chan, control, skb);
chan             1945 net/bluetooth/l2cap_core.c 		if (chan->fcs == L2CAP_FCS_CRC16) {
chan             1958 net/bluetooth/l2cap_core.c 		__set_retrans_timer(chan);
chan             1960 net/bluetooth/l2cap_core.c 		chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
chan             1961 net/bluetooth/l2cap_core.c 		chan->unacked_frames++;
chan             1962 net/bluetooth/l2cap_core.c 		chan->frames_sent++;
chan             1965 net/bluetooth/l2cap_core.c 		if (skb_queue_is_last(&chan->tx_q, skb))
chan             1966 net/bluetooth/l2cap_core.c 			chan->tx_send_head = NULL;
chan             1968 net/bluetooth/l2cap_core.c 			chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
chan             1970 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, tx_skb);
chan             1975 net/bluetooth/l2cap_core.c 	       chan->unacked_frames, skb_queue_len(&chan->tx_q));
chan             1980 net/bluetooth/l2cap_core.c static void l2cap_ertm_resend(struct l2cap_chan *chan)
chan             1987 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             1989 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_REMOTE_BUSY, &chan->conn_state))
chan             1992 net/bluetooth/l2cap_core.c 	if (__chan_is_moving(chan))
chan             1995 net/bluetooth/l2cap_core.c 	while (chan->retrans_list.head != L2CAP_SEQ_LIST_CLEAR) {
chan             1996 net/bluetooth/l2cap_core.c 		seq = l2cap_seq_list_pop(&chan->retrans_list);
chan             1998 net/bluetooth/l2cap_core.c 		skb = l2cap_ertm_seq_in_queue(&chan->tx_q, seq);
chan             2008 net/bluetooth/l2cap_core.c 		if (chan->max_tx != 0 &&
chan             2009 net/bluetooth/l2cap_core.c 		    bt_cb(skb)->l2cap.retries > chan->max_tx) {
chan             2010 net/bluetooth/l2cap_core.c 			BT_DBG("Retry limit exceeded (%d)", chan->max_tx);
chan             2011 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             2012 net/bluetooth/l2cap_core.c 			l2cap_seq_list_clear(&chan->retrans_list);
chan             2016 net/bluetooth/l2cap_core.c 		control.reqseq = chan->buffer_seq;
chan             2017 net/bluetooth/l2cap_core.c 		if (test_and_clear_bit(CONN_SEND_FBIT, &chan->conn_state))
chan             2032 net/bluetooth/l2cap_core.c 			l2cap_seq_list_clear(&chan->retrans_list);
chan             2037 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_EXT_CTRL, &chan->flags)) {
chan             2046 net/bluetooth/l2cap_core.c 		if (chan->fcs == L2CAP_FCS_CRC16) {
chan             2053 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, tx_skb);
chan             2057 net/bluetooth/l2cap_core.c 		chan->last_acked_seq = chan->buffer_seq;
chan             2061 net/bluetooth/l2cap_core.c static void l2cap_retransmit(struct l2cap_chan *chan,
chan             2064 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             2066 net/bluetooth/l2cap_core.c 	l2cap_seq_list_append(&chan->retrans_list, control->reqseq);
chan             2067 net/bluetooth/l2cap_core.c 	l2cap_ertm_resend(chan);
chan             2070 net/bluetooth/l2cap_core.c static void l2cap_retransmit_all(struct l2cap_chan *chan,
chan             2075 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             2078 net/bluetooth/l2cap_core.c 		set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             2080 net/bluetooth/l2cap_core.c 	l2cap_seq_list_clear(&chan->retrans_list);
chan             2082 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_REMOTE_BUSY, &chan->conn_state))
chan             2085 net/bluetooth/l2cap_core.c 	if (chan->unacked_frames) {
chan             2086 net/bluetooth/l2cap_core.c 		skb_queue_walk(&chan->tx_q, skb) {
chan             2088 net/bluetooth/l2cap_core.c 			    skb == chan->tx_send_head)
chan             2092 net/bluetooth/l2cap_core.c 		skb_queue_walk_from(&chan->tx_q, skb) {
chan             2093 net/bluetooth/l2cap_core.c 			if (skb == chan->tx_send_head)
chan             2096 net/bluetooth/l2cap_core.c 			l2cap_seq_list_append(&chan->retrans_list,
chan             2100 net/bluetooth/l2cap_core.c 		l2cap_ertm_resend(chan);
chan             2104 net/bluetooth/l2cap_core.c static void l2cap_send_ack(struct l2cap_chan *chan)
chan             2107 net/bluetooth/l2cap_core.c 	u16 frames_to_ack = __seq_offset(chan, chan->buffer_seq,
chan             2108 net/bluetooth/l2cap_core.c 					 chan->last_acked_seq);
chan             2112 net/bluetooth/l2cap_core.c 	       chan, chan->last_acked_seq, chan->buffer_seq);
chan             2117 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state) &&
chan             2118 net/bluetooth/l2cap_core.c 	    chan->rx_state == L2CAP_RX_STATE_RECV) {
chan             2119 net/bluetooth/l2cap_core.c 		__clear_ack_timer(chan);
chan             2121 net/bluetooth/l2cap_core.c 		control.reqseq = chan->buffer_seq;
chan             2122 net/bluetooth/l2cap_core.c 		l2cap_send_sframe(chan, &control);
chan             2124 net/bluetooth/l2cap_core.c 		if (!test_bit(CONN_REMOTE_BUSY, &chan->conn_state)) {
chan             2125 net/bluetooth/l2cap_core.c 			l2cap_ertm_send(chan);
chan             2127 net/bluetooth/l2cap_core.c 			if (chan->buffer_seq == chan->last_acked_seq)
chan             2134 net/bluetooth/l2cap_core.c 		threshold = chan->ack_win;
chan             2142 net/bluetooth/l2cap_core.c 			__clear_ack_timer(chan);
chan             2144 net/bluetooth/l2cap_core.c 			control.reqseq = chan->buffer_seq;
chan             2145 net/bluetooth/l2cap_core.c 			l2cap_send_sframe(chan, &control);
chan             2150 net/bluetooth/l2cap_core.c 			__set_ack_timer(chan);
chan             2154 net/bluetooth/l2cap_core.c static inline int l2cap_skbuff_fromiovec(struct l2cap_chan *chan,
chan             2158 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             2175 net/bluetooth/l2cap_core.c 		tmp = chan->ops->alloc_skb(chan, 0, count,
chan             2198 net/bluetooth/l2cap_core.c static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
chan             2201 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             2206 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p psm 0x%2.2x len %zu", chan,
chan             2207 net/bluetooth/l2cap_core.c 	       __le16_to_cpu(chan->psm), len);
chan             2211 net/bluetooth/l2cap_core.c 	skb = chan->ops->alloc_skb(chan, hlen, count,
chan             2218 net/bluetooth/l2cap_core.c 	lh->cid = cpu_to_le16(chan->dcid);
chan             2220 net/bluetooth/l2cap_core.c 	put_unaligned(chan->psm, (__le16 *) skb_put(skb, L2CAP_PSMLEN_SIZE));
chan             2222 net/bluetooth/l2cap_core.c 	err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
chan             2230 net/bluetooth/l2cap_core.c static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
chan             2233 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             2238 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p len %zu", chan, len);
chan             2242 net/bluetooth/l2cap_core.c 	skb = chan->ops->alloc_skb(chan, L2CAP_HDR_SIZE, count,
chan             2249 net/bluetooth/l2cap_core.c 	lh->cid = cpu_to_le16(chan->dcid);
chan             2252 net/bluetooth/l2cap_core.c 	err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
chan             2260 net/bluetooth/l2cap_core.c static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan,
chan             2264 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             2269 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p len %zu", chan, len);
chan             2274 net/bluetooth/l2cap_core.c 	hlen = __ertm_hdr_size(chan);
chan             2279 net/bluetooth/l2cap_core.c 	if (chan->fcs == L2CAP_FCS_CRC16)
chan             2284 net/bluetooth/l2cap_core.c 	skb = chan->ops->alloc_skb(chan, hlen, count,
chan             2291 net/bluetooth/l2cap_core.c 	lh->cid = cpu_to_le16(chan->dcid);
chan             2295 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             2303 net/bluetooth/l2cap_core.c 	err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
chan             2309 net/bluetooth/l2cap_core.c 	bt_cb(skb)->l2cap.fcs = chan->fcs;
chan             2314 net/bluetooth/l2cap_core.c static int l2cap_segment_sdu(struct l2cap_chan *chan,
chan             2323 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
chan             2331 net/bluetooth/l2cap_core.c 	pdu_len = chan->conn->mtu;
chan             2334 net/bluetooth/l2cap_core.c 	if (!chan->hs_hcon)
chan             2338 net/bluetooth/l2cap_core.c 	if (chan->fcs)
chan             2341 net/bluetooth/l2cap_core.c 	pdu_len -= __ertm_hdr_size(chan);
chan             2344 net/bluetooth/l2cap_core.c 	pdu_len = min_t(size_t, pdu_len, chan->remote_mps);
chan             2356 net/bluetooth/l2cap_core.c 		skb = l2cap_create_iframe_pdu(chan, msg, pdu_len, sdu_len);
chan             2381 net/bluetooth/l2cap_core.c static struct sk_buff *l2cap_create_le_flowctl_pdu(struct l2cap_chan *chan,
chan             2385 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             2390 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p len %zu", chan, len);
chan             2402 net/bluetooth/l2cap_core.c 	skb = chan->ops->alloc_skb(chan, hlen, count,
chan             2409 net/bluetooth/l2cap_core.c 	lh->cid = cpu_to_le16(chan->dcid);
chan             2415 net/bluetooth/l2cap_core.c 	err = l2cap_skbuff_fromiovec(chan, msg, len, count, skb);
chan             2424 net/bluetooth/l2cap_core.c static int l2cap_segment_le_sdu(struct l2cap_chan *chan,
chan             2432 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, msg %p, len %zu", chan, msg, len);
chan             2435 net/bluetooth/l2cap_core.c 	pdu_len = chan->remote_mps - L2CAP_SDULEN_SIZE;
chan             2441 net/bluetooth/l2cap_core.c 		skb = l2cap_create_le_flowctl_pdu(chan, msg, pdu_len, sdu_len);
chan             2460 net/bluetooth/l2cap_core.c static void l2cap_le_flowctl_send(struct l2cap_chan *chan)
chan             2464 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             2466 net/bluetooth/l2cap_core.c 	while (chan->tx_credits && !skb_queue_empty(&chan->tx_q)) {
chan             2467 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, skb_dequeue(&chan->tx_q));
chan             2468 net/bluetooth/l2cap_core.c 		chan->tx_credits--;
chan             2472 net/bluetooth/l2cap_core.c 	BT_DBG("Sent %d credits %u queued %u", sent, chan->tx_credits,
chan             2473 net/bluetooth/l2cap_core.c 	       skb_queue_len(&chan->tx_q));
chan             2476 net/bluetooth/l2cap_core.c int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len)
chan             2482 net/bluetooth/l2cap_core.c 	if (!chan->conn)
chan             2486 net/bluetooth/l2cap_core.c 	if (chan->chan_type == L2CAP_CHAN_CONN_LESS) {
chan             2487 net/bluetooth/l2cap_core.c 		skb = l2cap_create_connless_pdu(chan, msg, len);
chan             2494 net/bluetooth/l2cap_core.c 		if (chan->state != BT_CONNECTED) {
chan             2499 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, skb);
chan             2503 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             2506 net/bluetooth/l2cap_core.c 		if (len > chan->omtu)
chan             2511 net/bluetooth/l2cap_core.c 		err = l2cap_segment_le_sdu(chan, &seg_queue, msg, len);
chan             2513 net/bluetooth/l2cap_core.c 		if (chan->state != BT_CONNECTED) {
chan             2521 net/bluetooth/l2cap_core.c 		skb_queue_splice_tail_init(&seg_queue, &chan->tx_q);
chan             2523 net/bluetooth/l2cap_core.c 		l2cap_le_flowctl_send(chan);
chan             2525 net/bluetooth/l2cap_core.c 		if (!chan->tx_credits)
chan             2526 net/bluetooth/l2cap_core.c 			chan->ops->suspend(chan);
chan             2534 net/bluetooth/l2cap_core.c 		if (len > chan->omtu)
chan             2538 net/bluetooth/l2cap_core.c 		skb = l2cap_create_basic_pdu(chan, msg, len);
chan             2545 net/bluetooth/l2cap_core.c 		if (chan->state != BT_CONNECTED) {
chan             2550 net/bluetooth/l2cap_core.c 		l2cap_do_send(chan, skb);
chan             2557 net/bluetooth/l2cap_core.c 		if (len > chan->omtu) {
chan             2568 net/bluetooth/l2cap_core.c 		err = l2cap_segment_sdu(chan, &seg_queue, msg, len);
chan             2573 net/bluetooth/l2cap_core.c 		if (chan->state != BT_CONNECTED) {
chan             2581 net/bluetooth/l2cap_core.c 		if (chan->mode == L2CAP_MODE_ERTM)
chan             2582 net/bluetooth/l2cap_core.c 			l2cap_tx(chan, NULL, &seg_queue, L2CAP_EV_DATA_REQUEST);
chan             2584 net/bluetooth/l2cap_core.c 			l2cap_streaming_send(chan, &seg_queue);
chan             2595 net/bluetooth/l2cap_core.c 		BT_DBG("bad state %1.1x", chan->mode);
chan             2603 net/bluetooth/l2cap_core.c static void l2cap_send_srej(struct l2cap_chan *chan, u16 txseq)
chan             2608 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, txseq %u", chan, txseq);
chan             2614 net/bluetooth/l2cap_core.c 	for (seq = chan->expected_tx_seq; seq != txseq;
chan             2615 net/bluetooth/l2cap_core.c 	     seq = __next_seq(chan, seq)) {
chan             2616 net/bluetooth/l2cap_core.c 		if (!l2cap_ertm_seq_in_queue(&chan->srej_q, seq)) {
chan             2618 net/bluetooth/l2cap_core.c 			l2cap_send_sframe(chan, &control);
chan             2619 net/bluetooth/l2cap_core.c 			l2cap_seq_list_append(&chan->srej_list, seq);
chan             2623 net/bluetooth/l2cap_core.c 	chan->expected_tx_seq = __next_seq(chan, txseq);
chan             2626 net/bluetooth/l2cap_core.c static void l2cap_send_srej_tail(struct l2cap_chan *chan)
chan             2630 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             2632 net/bluetooth/l2cap_core.c 	if (chan->srej_list.tail == L2CAP_SEQ_LIST_CLEAR)
chan             2638 net/bluetooth/l2cap_core.c 	control.reqseq = chan->srej_list.tail;
chan             2639 net/bluetooth/l2cap_core.c 	l2cap_send_sframe(chan, &control);
chan             2642 net/bluetooth/l2cap_core.c static void l2cap_send_srej_list(struct l2cap_chan *chan, u16 txseq)
chan             2648 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, txseq %u", chan, txseq);
chan             2655 net/bluetooth/l2cap_core.c 	initial_head = chan->srej_list.head;
chan             2658 net/bluetooth/l2cap_core.c 		seq = l2cap_seq_list_pop(&chan->srej_list);
chan             2663 net/bluetooth/l2cap_core.c 		l2cap_send_sframe(chan, &control);
chan             2664 net/bluetooth/l2cap_core.c 		l2cap_seq_list_append(&chan->srej_list, seq);
chan             2665 net/bluetooth/l2cap_core.c 	} while (chan->srej_list.head != initial_head);
chan             2668 net/bluetooth/l2cap_core.c static void l2cap_process_reqseq(struct l2cap_chan *chan, u16 reqseq)
chan             2673 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, reqseq %u", chan, reqseq);
chan             2675 net/bluetooth/l2cap_core.c 	if (chan->unacked_frames == 0 || reqseq == chan->expected_ack_seq)
chan             2679 net/bluetooth/l2cap_core.c 	       chan->expected_ack_seq, chan->unacked_frames);
chan             2681 net/bluetooth/l2cap_core.c 	for (ackseq = chan->expected_ack_seq; ackseq != reqseq;
chan             2682 net/bluetooth/l2cap_core.c 	     ackseq = __next_seq(chan, ackseq)) {
chan             2684 net/bluetooth/l2cap_core.c 		acked_skb = l2cap_ertm_seq_in_queue(&chan->tx_q, ackseq);
chan             2686 net/bluetooth/l2cap_core.c 			skb_unlink(acked_skb, &chan->tx_q);
chan             2688 net/bluetooth/l2cap_core.c 			chan->unacked_frames--;
chan             2692 net/bluetooth/l2cap_core.c 	chan->expected_ack_seq = reqseq;
chan             2694 net/bluetooth/l2cap_core.c 	if (chan->unacked_frames == 0)
chan             2695 net/bluetooth/l2cap_core.c 		__clear_retrans_timer(chan);
chan             2697 net/bluetooth/l2cap_core.c 	BT_DBG("unacked_frames %u", chan->unacked_frames);
chan             2700 net/bluetooth/l2cap_core.c static void l2cap_abort_rx_srej_sent(struct l2cap_chan *chan)
chan             2702 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             2704 net/bluetooth/l2cap_core.c 	chan->expected_tx_seq = chan->buffer_seq;
chan             2705 net/bluetooth/l2cap_core.c 	l2cap_seq_list_clear(&chan->srej_list);
chan             2706 net/bluetooth/l2cap_core.c 	skb_queue_purge(&chan->srej_q);
chan             2707 net/bluetooth/l2cap_core.c 	chan->rx_state = L2CAP_RX_STATE_RECV;
chan             2710 net/bluetooth/l2cap_core.c static void l2cap_tx_state_xmit(struct l2cap_chan *chan,
chan             2714 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
chan             2719 net/bluetooth/l2cap_core.c 		if (chan->tx_send_head == NULL)
chan             2720 net/bluetooth/l2cap_core.c 			chan->tx_send_head = skb_peek(skbs);
chan             2722 net/bluetooth/l2cap_core.c 		skb_queue_splice_tail_init(skbs, &chan->tx_q);
chan             2723 net/bluetooth/l2cap_core.c 		l2cap_ertm_send(chan);
chan             2727 net/bluetooth/l2cap_core.c 		set_bit(CONN_LOCAL_BUSY, &chan->conn_state);
chan             2729 net/bluetooth/l2cap_core.c 		if (chan->rx_state == L2CAP_RX_STATE_SREJ_SENT) {
chan             2733 net/bluetooth/l2cap_core.c 			l2cap_abort_rx_srej_sent(chan);
chan             2736 net/bluetooth/l2cap_core.c 		l2cap_send_ack(chan);
chan             2741 net/bluetooth/l2cap_core.c 		clear_bit(CONN_LOCAL_BUSY, &chan->conn_state);
chan             2743 net/bluetooth/l2cap_core.c 		if (test_bit(CONN_RNR_SENT, &chan->conn_state)) {
chan             2750 net/bluetooth/l2cap_core.c 			local_control.reqseq = chan->buffer_seq;
chan             2751 net/bluetooth/l2cap_core.c 			l2cap_send_sframe(chan, &local_control);
chan             2753 net/bluetooth/l2cap_core.c 			chan->retry_count = 1;
chan             2754 net/bluetooth/l2cap_core.c 			__set_monitor_timer(chan);
chan             2755 net/bluetooth/l2cap_core.c 			chan->tx_state = L2CAP_TX_STATE_WAIT_F;
chan             2759 net/bluetooth/l2cap_core.c 		l2cap_process_reqseq(chan, control->reqseq);
chan             2762 net/bluetooth/l2cap_core.c 		l2cap_send_rr_or_rnr(chan, 1);
chan             2763 net/bluetooth/l2cap_core.c 		chan->retry_count = 1;
chan             2764 net/bluetooth/l2cap_core.c 		__set_monitor_timer(chan);
chan             2765 net/bluetooth/l2cap_core.c 		__clear_ack_timer(chan);
chan             2766 net/bluetooth/l2cap_core.c 		chan->tx_state = L2CAP_TX_STATE_WAIT_F;
chan             2769 net/bluetooth/l2cap_core.c 		l2cap_send_rr_or_rnr(chan, 1);
chan             2770 net/bluetooth/l2cap_core.c 		chan->retry_count = 1;
chan             2771 net/bluetooth/l2cap_core.c 		__set_monitor_timer(chan);
chan             2772 net/bluetooth/l2cap_core.c 		chan->tx_state = L2CAP_TX_STATE_WAIT_F;
chan             2782 net/bluetooth/l2cap_core.c static void l2cap_tx_state_wait_f(struct l2cap_chan *chan,
chan             2786 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skbs %p, event %d", chan, control, skbs,
chan             2791 net/bluetooth/l2cap_core.c 		if (chan->tx_send_head == NULL)
chan             2792 net/bluetooth/l2cap_core.c 			chan->tx_send_head = skb_peek(skbs);
chan             2794 net/bluetooth/l2cap_core.c 		skb_queue_splice_tail_init(skbs, &chan->tx_q);
chan             2798 net/bluetooth/l2cap_core.c 		set_bit(CONN_LOCAL_BUSY, &chan->conn_state);
chan             2800 net/bluetooth/l2cap_core.c 		if (chan->rx_state == L2CAP_RX_STATE_SREJ_SENT) {
chan             2804 net/bluetooth/l2cap_core.c 			l2cap_abort_rx_srej_sent(chan);
chan             2807 net/bluetooth/l2cap_core.c 		l2cap_send_ack(chan);
chan             2812 net/bluetooth/l2cap_core.c 		clear_bit(CONN_LOCAL_BUSY, &chan->conn_state);
chan             2814 net/bluetooth/l2cap_core.c 		if (test_bit(CONN_RNR_SENT, &chan->conn_state)) {
chan             2820 net/bluetooth/l2cap_core.c 			local_control.reqseq = chan->buffer_seq;
chan             2821 net/bluetooth/l2cap_core.c 			l2cap_send_sframe(chan, &local_control);
chan             2823 net/bluetooth/l2cap_core.c 			chan->retry_count = 1;
chan             2824 net/bluetooth/l2cap_core.c 			__set_monitor_timer(chan);
chan             2825 net/bluetooth/l2cap_core.c 			chan->tx_state = L2CAP_TX_STATE_WAIT_F;
chan             2829 net/bluetooth/l2cap_core.c 		l2cap_process_reqseq(chan, control->reqseq);
chan             2835 net/bluetooth/l2cap_core.c 			__clear_monitor_timer(chan);
chan             2836 net/bluetooth/l2cap_core.c 			if (chan->unacked_frames > 0)
chan             2837 net/bluetooth/l2cap_core.c 				__set_retrans_timer(chan);
chan             2838 net/bluetooth/l2cap_core.c 			chan->retry_count = 0;
chan             2839 net/bluetooth/l2cap_core.c 			chan->tx_state = L2CAP_TX_STATE_XMIT;
chan             2840 net/bluetooth/l2cap_core.c 			BT_DBG("recv fbit tx_state 0x2.2%x", chan->tx_state);
chan             2847 net/bluetooth/l2cap_core.c 		if (chan->max_tx == 0 || chan->retry_count < chan->max_tx) {
chan             2848 net/bluetooth/l2cap_core.c 			l2cap_send_rr_or_rnr(chan, 1);
chan             2849 net/bluetooth/l2cap_core.c 			__set_monitor_timer(chan);
chan             2850 net/bluetooth/l2cap_core.c 			chan->retry_count++;
chan             2852 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNABORTED);
chan             2860 net/bluetooth/l2cap_core.c static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
chan             2864 net/bluetooth/l2cap_core.c 	       chan, control, skbs, event, chan->tx_state);
chan             2866 net/bluetooth/l2cap_core.c 	switch (chan->tx_state) {
chan             2868 net/bluetooth/l2cap_core.c 		l2cap_tx_state_xmit(chan, control, skbs, event);
chan             2871 net/bluetooth/l2cap_core.c 		l2cap_tx_state_wait_f(chan, control, skbs, event);
chan             2879 net/bluetooth/l2cap_core.c static void l2cap_pass_to_tx(struct l2cap_chan *chan,
chan             2882 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             2883 net/bluetooth/l2cap_core.c 	l2cap_tx(chan, control, NULL, L2CAP_EV_RECV_REQSEQ_AND_FBIT);
chan             2886 net/bluetooth/l2cap_core.c static void l2cap_pass_to_tx_fbit(struct l2cap_chan *chan,
chan             2889 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             2890 net/bluetooth/l2cap_core.c 	l2cap_tx(chan, control, NULL, L2CAP_EV_RECV_FBIT);
chan             2897 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             2903 net/bluetooth/l2cap_core.c 	list_for_each_entry(chan, &conn->chan_l, list) {
chan             2904 net/bluetooth/l2cap_core.c 		if (chan->chan_type != L2CAP_CHAN_RAW)
chan             2908 net/bluetooth/l2cap_core.c 		if (bt_cb(skb)->l2cap.chan == chan)
chan             2914 net/bluetooth/l2cap_core.c 		if (chan->ops->recv(chan, nskb))
chan             3055 net/bluetooth/l2cap_core.c static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size)
chan             3059 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             3061 net/bluetooth/l2cap_core.c 		efs.id		= chan->local_id;
chan             3062 net/bluetooth/l2cap_core.c 		efs.stype	= chan->local_stype;
chan             3063 net/bluetooth/l2cap_core.c 		efs.msdu	= cpu_to_le16(chan->local_msdu);
chan             3064 net/bluetooth/l2cap_core.c 		efs.sdu_itime	= cpu_to_le32(chan->local_sdu_itime);
chan             3072 net/bluetooth/l2cap_core.c 		efs.msdu	= cpu_to_le16(chan->local_msdu);
chan             3073 net/bluetooth/l2cap_core.c 		efs.sdu_itime	= cpu_to_le32(chan->local_sdu_itime);
chan             3088 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = container_of(work, struct l2cap_chan,
chan             3092 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             3094 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             3096 net/bluetooth/l2cap_core.c 	frames_to_ack = __seq_offset(chan, chan->buffer_seq,
chan             3097 net/bluetooth/l2cap_core.c 				     chan->last_acked_seq);
chan             3100 net/bluetooth/l2cap_core.c 		l2cap_send_rr_or_rnr(chan, 0);
chan             3102 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             3103 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             3106 net/bluetooth/l2cap_core.c int l2cap_ertm_init(struct l2cap_chan *chan)
chan             3110 net/bluetooth/l2cap_core.c 	chan->next_tx_seq = 0;
chan             3111 net/bluetooth/l2cap_core.c 	chan->expected_tx_seq = 0;
chan             3112 net/bluetooth/l2cap_core.c 	chan->expected_ack_seq = 0;
chan             3113 net/bluetooth/l2cap_core.c 	chan->unacked_frames = 0;
chan             3114 net/bluetooth/l2cap_core.c 	chan->buffer_seq = 0;
chan             3115 net/bluetooth/l2cap_core.c 	chan->frames_sent = 0;
chan             3116 net/bluetooth/l2cap_core.c 	chan->last_acked_seq = 0;
chan             3117 net/bluetooth/l2cap_core.c 	chan->sdu = NULL;
chan             3118 net/bluetooth/l2cap_core.c 	chan->sdu_last_frag = NULL;
chan             3119 net/bluetooth/l2cap_core.c 	chan->sdu_len = 0;
chan             3121 net/bluetooth/l2cap_core.c 	skb_queue_head_init(&chan->tx_q);
chan             3123 net/bluetooth/l2cap_core.c 	chan->local_amp_id = AMP_ID_BREDR;
chan             3124 net/bluetooth/l2cap_core.c 	chan->move_id = AMP_ID_BREDR;
chan             3125 net/bluetooth/l2cap_core.c 	chan->move_state = L2CAP_MOVE_STABLE;
chan             3126 net/bluetooth/l2cap_core.c 	chan->move_role = L2CAP_MOVE_ROLE_NONE;
chan             3128 net/bluetooth/l2cap_core.c 	if (chan->mode != L2CAP_MODE_ERTM)
chan             3131 net/bluetooth/l2cap_core.c 	chan->rx_state = L2CAP_RX_STATE_RECV;
chan             3132 net/bluetooth/l2cap_core.c 	chan->tx_state = L2CAP_TX_STATE_XMIT;
chan             3134 net/bluetooth/l2cap_core.c 	INIT_DELAYED_WORK(&chan->retrans_timer, l2cap_retrans_timeout);
chan             3135 net/bluetooth/l2cap_core.c 	INIT_DELAYED_WORK(&chan->monitor_timer, l2cap_monitor_timeout);
chan             3136 net/bluetooth/l2cap_core.c 	INIT_DELAYED_WORK(&chan->ack_timer, l2cap_ack_timeout);
chan             3138 net/bluetooth/l2cap_core.c 	skb_queue_head_init(&chan->srej_q);
chan             3140 net/bluetooth/l2cap_core.c 	err = l2cap_seq_list_init(&chan->srej_list, chan->tx_win);
chan             3144 net/bluetooth/l2cap_core.c 	err = l2cap_seq_list_init(&chan->retrans_list, chan->remote_tx_win);
chan             3146 net/bluetooth/l2cap_core.c 		l2cap_seq_list_free(&chan->srej_list);
chan             3176 net/bluetooth/l2cap_core.c static void __l2cap_set_ertm_timeouts(struct l2cap_chan *chan,
chan             3179 net/bluetooth/l2cap_core.c 	if (chan->local_amp_id != AMP_ID_BREDR && chan->hs_hcon) {
chan             3180 net/bluetooth/l2cap_core.c 		u64 ertm_to = chan->hs_hcon->hdev->amp_be_flush_to;
chan             3214 net/bluetooth/l2cap_core.c static inline void l2cap_txwin_setup(struct l2cap_chan *chan)
chan             3216 net/bluetooth/l2cap_core.c 	if (chan->tx_win > L2CAP_DEFAULT_TX_WINDOW &&
chan             3217 net/bluetooth/l2cap_core.c 	    __l2cap_ews_supported(chan->conn)) {
chan             3219 net/bluetooth/l2cap_core.c 		set_bit(FLAG_EXT_CTRL, &chan->flags);
chan             3220 net/bluetooth/l2cap_core.c 		chan->tx_win_max = L2CAP_DEFAULT_EXT_WINDOW;
chan             3222 net/bluetooth/l2cap_core.c 		chan->tx_win = min_t(u16, chan->tx_win,
chan             3224 net/bluetooth/l2cap_core.c 		chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
chan             3226 net/bluetooth/l2cap_core.c 	chan->ack_win = chan->tx_win;
chan             3229 net/bluetooth/l2cap_core.c static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size)
chan             3232 net/bluetooth/l2cap_core.c 	struct l2cap_conf_rfc rfc = { .mode = chan->mode };
chan             3237 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             3239 net/bluetooth/l2cap_core.c 	if (chan->num_conf_req || chan->num_conf_rsp)
chan             3242 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             3245 net/bluetooth/l2cap_core.c 		if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state))
chan             3248 net/bluetooth/l2cap_core.c 		if (__l2cap_efs_supported(chan->conn))
chan             3249 net/bluetooth/l2cap_core.c 			set_bit(FLAG_EFS_ENABLE, &chan->flags);
chan             3253 net/bluetooth/l2cap_core.c 		chan->mode = l2cap_select_mode(rfc.mode, chan->conn->feat_mask);
chan             3258 net/bluetooth/l2cap_core.c 	if (chan->imtu != L2CAP_DEFAULT_MTU)
chan             3259 net/bluetooth/l2cap_core.c 		l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu, endptr - ptr);
chan             3261 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             3266 net/bluetooth/l2cap_core.c 		if (!(chan->conn->feat_mask & L2CAP_FEAT_ERTM) &&
chan             3267 net/bluetooth/l2cap_core.c 		    !(chan->conn->feat_mask & L2CAP_FEAT_STREAMING))
chan             3283 net/bluetooth/l2cap_core.c 		rfc.max_transmit    = chan->max_tx;
chan             3285 net/bluetooth/l2cap_core.c 		__l2cap_set_ertm_timeouts(chan, &rfc);
chan             3287 net/bluetooth/l2cap_core.c 		size = min_t(u16, L2CAP_DEFAULT_MAX_PDU_SIZE, chan->conn->mtu -
chan             3292 net/bluetooth/l2cap_core.c 		l2cap_txwin_setup(chan);
chan             3294 net/bluetooth/l2cap_core.c 		rfc.txwin_size = min_t(u16, chan->tx_win,
chan             3300 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
chan             3301 net/bluetooth/l2cap_core.c 			l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
chan             3303 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             3305 net/bluetooth/l2cap_core.c 					   chan->tx_win, endptr - ptr);
chan             3307 net/bluetooth/l2cap_core.c 		if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
chan             3308 net/bluetooth/l2cap_core.c 			if (chan->fcs == L2CAP_FCS_NONE ||
chan             3309 net/bluetooth/l2cap_core.c 			    test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
chan             3310 net/bluetooth/l2cap_core.c 				chan->fcs = L2CAP_FCS_NONE;
chan             3312 net/bluetooth/l2cap_core.c 						   chan->fcs, endptr - ptr);
chan             3317 net/bluetooth/l2cap_core.c 		l2cap_txwin_setup(chan);
chan             3324 net/bluetooth/l2cap_core.c 		size = min_t(u16, L2CAP_DEFAULT_MAX_PDU_SIZE, chan->conn->mtu -
chan             3332 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
chan             3333 net/bluetooth/l2cap_core.c 			l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
chan             3335 net/bluetooth/l2cap_core.c 		if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
chan             3336 net/bluetooth/l2cap_core.c 			if (chan->fcs == L2CAP_FCS_NONE ||
chan             3337 net/bluetooth/l2cap_core.c 			    test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
chan             3338 net/bluetooth/l2cap_core.c 				chan->fcs = L2CAP_FCS_NONE;
chan             3340 net/bluetooth/l2cap_core.c 						   chan->fcs, endptr - ptr);
chan             3345 net/bluetooth/l2cap_core.c 	req->dcid  = cpu_to_le16(chan->dcid);
chan             3351 net/bluetooth/l2cap_core.c static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size)
chan             3356 net/bluetooth/l2cap_core.c 	void *req = chan->conf_req;
chan             3357 net/bluetooth/l2cap_core.c 	int len = chan->conf_len;
chan             3367 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             3387 net/bluetooth/l2cap_core.c 			chan->flush_to = val;
chan             3403 net/bluetooth/l2cap_core.c 				set_bit(CONF_RECV_NO_FCS, &chan->conf_state);
chan             3416 net/bluetooth/l2cap_core.c 			if (!(chan->conn->local_fixed_chan & L2CAP_FC_A2MP))
chan             3418 net/bluetooth/l2cap_core.c 			set_bit(FLAG_EXT_CTRL, &chan->flags);
chan             3419 net/bluetooth/l2cap_core.c 			set_bit(CONF_EWS_RECV, &chan->conf_state);
chan             3420 net/bluetooth/l2cap_core.c 			chan->tx_win_max = L2CAP_DEFAULT_EXT_WINDOW;
chan             3421 net/bluetooth/l2cap_core.c 			chan->remote_tx_win = val;
chan             3433 net/bluetooth/l2cap_core.c 	if (chan->num_conf_rsp || chan->num_conf_req > 1)
chan             3436 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             3439 net/bluetooth/l2cap_core.c 		if (!test_bit(CONF_STATE2_DEVICE, &chan->conf_state)) {
chan             3440 net/bluetooth/l2cap_core.c 			chan->mode = l2cap_select_mode(rfc.mode,
chan             3441 net/bluetooth/l2cap_core.c 						       chan->conn->feat_mask);
chan             3446 net/bluetooth/l2cap_core.c 			if (__l2cap_efs_supported(chan->conn))
chan             3447 net/bluetooth/l2cap_core.c 				set_bit(FLAG_EFS_ENABLE, &chan->flags);
chan             3452 net/bluetooth/l2cap_core.c 		if (chan->mode != rfc.mode)
chan             3459 net/bluetooth/l2cap_core.c 	if (chan->mode != rfc.mode) {
chan             3461 net/bluetooth/l2cap_core.c 		rfc.mode = chan->mode;
chan             3463 net/bluetooth/l2cap_core.c 		if (chan->num_conf_rsp == 1)
chan             3477 net/bluetooth/l2cap_core.c 			chan->omtu = mtu;
chan             3478 net/bluetooth/l2cap_core.c 			set_bit(CONF_MTU_DONE, &chan->conf_state);
chan             3480 net/bluetooth/l2cap_core.c 		l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->omtu, endptr - ptr);
chan             3483 net/bluetooth/l2cap_core.c 			if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
chan             3485 net/bluetooth/l2cap_core.c 			    efs.stype != chan->local_stype) {
chan             3489 net/bluetooth/l2cap_core.c 				if (chan->num_conf_req >= 1)
chan             3498 net/bluetooth/l2cap_core.c 				set_bit(CONF_LOC_CONF_PEND, &chan->conf_state);
chan             3504 net/bluetooth/l2cap_core.c 			chan->fcs = L2CAP_FCS_NONE;
chan             3505 net/bluetooth/l2cap_core.c 			set_bit(CONF_MODE_DONE, &chan->conf_state);
chan             3509 net/bluetooth/l2cap_core.c 			if (!test_bit(CONF_EWS_RECV, &chan->conf_state))
chan             3510 net/bluetooth/l2cap_core.c 				chan->remote_tx_win = rfc.txwin_size;
chan             3514 net/bluetooth/l2cap_core.c 			chan->remote_max_tx = rfc.max_transmit;
chan             3517 net/bluetooth/l2cap_core.c 				     chan->conn->mtu - L2CAP_EXT_HDR_SIZE -
chan             3520 net/bluetooth/l2cap_core.c 			chan->remote_mps = size;
chan             3522 net/bluetooth/l2cap_core.c 			__l2cap_set_ertm_timeouts(chan, &rfc);
chan             3524 net/bluetooth/l2cap_core.c 			set_bit(CONF_MODE_DONE, &chan->conf_state);
chan             3529 net/bluetooth/l2cap_core.c 			if (test_bit(FLAG_EFS_ENABLE, &chan->flags)) {
chan             3530 net/bluetooth/l2cap_core.c 				chan->remote_id = efs.id;
chan             3531 net/bluetooth/l2cap_core.c 				chan->remote_stype = efs.stype;
chan             3532 net/bluetooth/l2cap_core.c 				chan->remote_msdu = le16_to_cpu(efs.msdu);
chan             3533 net/bluetooth/l2cap_core.c 				chan->remote_flush_to =
chan             3535 net/bluetooth/l2cap_core.c 				chan->remote_acc_lat =
chan             3537 net/bluetooth/l2cap_core.c 				chan->remote_sdu_itime =
chan             3547 net/bluetooth/l2cap_core.c 				     chan->conn->mtu - L2CAP_EXT_HDR_SIZE -
chan             3550 net/bluetooth/l2cap_core.c 			chan->remote_mps = size;
chan             3552 net/bluetooth/l2cap_core.c 			set_bit(CONF_MODE_DONE, &chan->conf_state);
chan             3563 net/bluetooth/l2cap_core.c 			rfc.mode = chan->mode;
chan             3567 net/bluetooth/l2cap_core.c 			set_bit(CONF_OUTPUT_DONE, &chan->conf_state);
chan             3569 net/bluetooth/l2cap_core.c 	rsp->scid   = cpu_to_le16(chan->dcid);
chan             3576 net/bluetooth/l2cap_core.c static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
chan             3587 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
chan             3600 net/bluetooth/l2cap_core.c 				chan->imtu = L2CAP_DEFAULT_MIN_MTU;
chan             3602 net/bluetooth/l2cap_core.c 				chan->imtu = val;
chan             3603 net/bluetooth/l2cap_core.c 			l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu,
chan             3610 net/bluetooth/l2cap_core.c 			chan->flush_to = val;
chan             3612 net/bluetooth/l2cap_core.c 					   chan->flush_to, endptr - ptr);
chan             3619 net/bluetooth/l2cap_core.c 			if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
chan             3620 net/bluetooth/l2cap_core.c 			    rfc.mode != chan->mode)
chan             3622 net/bluetooth/l2cap_core.c 			chan->fcs = 0;
chan             3630 net/bluetooth/l2cap_core.c 			chan->ack_win = min_t(u16, val, chan->ack_win);
chan             3632 net/bluetooth/l2cap_core.c 					   chan->tx_win, endptr - ptr);
chan             3639 net/bluetooth/l2cap_core.c 			if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
chan             3641 net/bluetooth/l2cap_core.c 			    efs.stype != chan->local_stype)
chan             3653 net/bluetooth/l2cap_core.c 						&chan->conf_state);
chan             3658 net/bluetooth/l2cap_core.c 	if (chan->mode == L2CAP_MODE_BASIC && chan->mode != rfc.mode)
chan             3661 net/bluetooth/l2cap_core.c 	chan->mode = rfc.mode;
chan             3666 net/bluetooth/l2cap_core.c 			chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
chan             3667 net/bluetooth/l2cap_core.c 			chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
chan             3668 net/bluetooth/l2cap_core.c 			chan->mps    = le16_to_cpu(rfc.max_pdu_size);
chan             3669 net/bluetooth/l2cap_core.c 			if (!test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             3670 net/bluetooth/l2cap_core.c 				chan->ack_win = min_t(u16, chan->ack_win,
chan             3673 net/bluetooth/l2cap_core.c 			if (test_bit(FLAG_EFS_ENABLE, &chan->flags)) {
chan             3674 net/bluetooth/l2cap_core.c 				chan->local_msdu = le16_to_cpu(efs.msdu);
chan             3675 net/bluetooth/l2cap_core.c 				chan->local_sdu_itime =
chan             3677 net/bluetooth/l2cap_core.c 				chan->local_acc_lat = le32_to_cpu(efs.acc_lat);
chan             3678 net/bluetooth/l2cap_core.c 				chan->local_flush_to =
chan             3684 net/bluetooth/l2cap_core.c 			chan->mps    = le16_to_cpu(rfc.max_pdu_size);
chan             3688 net/bluetooth/l2cap_core.c 	req->dcid   = cpu_to_le16(chan->dcid);
chan             3694 net/bluetooth/l2cap_core.c static int l2cap_build_conf_rsp(struct l2cap_chan *chan, void *data,
chan             3700 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             3702 net/bluetooth/l2cap_core.c 	rsp->scid   = cpu_to_le16(chan->dcid);
chan             3709 net/bluetooth/l2cap_core.c void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan)
chan             3712 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             3714 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             3716 net/bluetooth/l2cap_core.c 	rsp.dcid    = cpu_to_le16(chan->scid);
chan             3717 net/bluetooth/l2cap_core.c 	rsp.mtu     = cpu_to_le16(chan->imtu);
chan             3718 net/bluetooth/l2cap_core.c 	rsp.mps     = cpu_to_le16(chan->mps);
chan             3719 net/bluetooth/l2cap_core.c 	rsp.credits = cpu_to_le16(chan->rx_credits);
chan             3722 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_LE_CONN_RSP, sizeof(rsp),
chan             3726 net/bluetooth/l2cap_core.c void __l2cap_connect_rsp_defer(struct l2cap_chan *chan)
chan             3729 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             3733 net/bluetooth/l2cap_core.c 	rsp.scid   = cpu_to_le16(chan->dcid);
chan             3734 net/bluetooth/l2cap_core.c 	rsp.dcid   = cpu_to_le16(chan->scid);
chan             3738 net/bluetooth/l2cap_core.c 	if (chan->hs_hcon)
chan             3743 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p rsp_code %u", chan, rsp_code);
chan             3745 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, rsp_code, sizeof(rsp), &rsp);
chan             3747 net/bluetooth/l2cap_core.c 	if (test_and_set_bit(CONF_REQ_SENT, &chan->conf_state))
chan             3751 net/bluetooth/l2cap_core.c 		       l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
chan             3752 net/bluetooth/l2cap_core.c 	chan->num_conf_req++;
chan             3755 net/bluetooth/l2cap_core.c static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len)
chan             3762 net/bluetooth/l2cap_core.c 	u16 txwin_ext = chan->ack_win;
chan             3764 net/bluetooth/l2cap_core.c 		.mode = chan->mode,
chan             3767 net/bluetooth/l2cap_core.c 		.max_pdu_size = cpu_to_le16(chan->imtu),
chan             3768 net/bluetooth/l2cap_core.c 		.txwin_size = min_t(u16, chan->ack_win, L2CAP_DEFAULT_TX_WINDOW),
chan             3771 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
chan             3773 net/bluetooth/l2cap_core.c 	if ((chan->mode != L2CAP_MODE_ERTM) && (chan->mode != L2CAP_MODE_STREAMING))
chan             3797 net/bluetooth/l2cap_core.c 		chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout);
chan             3798 net/bluetooth/l2cap_core.c 		chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout);
chan             3799 net/bluetooth/l2cap_core.c 		chan->mps = le16_to_cpu(rfc.max_pdu_size);
chan             3800 net/bluetooth/l2cap_core.c 		if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             3801 net/bluetooth/l2cap_core.c 			chan->ack_win = min_t(u16, chan->ack_win, txwin_ext);
chan             3803 net/bluetooth/l2cap_core.c 			chan->ack_win = min_t(u16, chan->ack_win,
chan             3807 net/bluetooth/l2cap_core.c 		chan->mps    = le16_to_cpu(rfc.max_pdu_size);
chan             3842 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan = NULL, *pchan;
chan             3883 net/bluetooth/l2cap_core.c 	chan = pchan->ops->new_connection(pchan);
chan             3884 net/bluetooth/l2cap_core.c 	if (!chan)
chan             3894 net/bluetooth/l2cap_core.c 	bacpy(&chan->src, &conn->hcon->src);
chan             3895 net/bluetooth/l2cap_core.c 	bacpy(&chan->dst, &conn->hcon->dst);
chan             3896 net/bluetooth/l2cap_core.c 	chan->src_type = bdaddr_src_type(conn->hcon);
chan             3897 net/bluetooth/l2cap_core.c 	chan->dst_type = bdaddr_dst_type(conn->hcon);
chan             3898 net/bluetooth/l2cap_core.c 	chan->psm  = psm;
chan             3899 net/bluetooth/l2cap_core.c 	chan->dcid = scid;
chan             3900 net/bluetooth/l2cap_core.c 	chan->local_amp_id = amp_id;
chan             3902 net/bluetooth/l2cap_core.c 	__l2cap_chan_add(conn, chan);
chan             3904 net/bluetooth/l2cap_core.c 	dcid = chan->scid;
chan             3906 net/bluetooth/l2cap_core.c 	__set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
chan             3908 net/bluetooth/l2cap_core.c 	chan->ident = cmd->ident;
chan             3911 net/bluetooth/l2cap_core.c 		if (l2cap_chan_check_security(chan, false)) {
chan             3912 net/bluetooth/l2cap_core.c 			if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
chan             3913 net/bluetooth/l2cap_core.c 				l2cap_state_change(chan, BT_CONNECT2);
chan             3916 net/bluetooth/l2cap_core.c 				chan->ops->defer(chan);
chan             3923 net/bluetooth/l2cap_core.c 					l2cap_state_change(chan, BT_CONFIG);
chan             3926 net/bluetooth/l2cap_core.c 					l2cap_state_change(chan, BT_CONNECT2);
chan             3932 net/bluetooth/l2cap_core.c 			l2cap_state_change(chan, BT_CONNECT2);
chan             3937 net/bluetooth/l2cap_core.c 		l2cap_state_change(chan, BT_CONNECT2);
chan             3967 net/bluetooth/l2cap_core.c 	if (chan && !test_bit(CONF_REQ_SENT, &chan->conf_state) &&
chan             3970 net/bluetooth/l2cap_core.c 		set_bit(CONF_REQ_SENT, &chan->conf_state);
chan             3972 net/bluetooth/l2cap_core.c 			       l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
chan             3973 net/bluetooth/l2cap_core.c 		chan->num_conf_req++;
chan             3976 net/bluetooth/l2cap_core.c 	return chan;
chan             4004 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4022 net/bluetooth/l2cap_core.c 		chan = __l2cap_get_chan_by_scid(conn, scid);
chan             4023 net/bluetooth/l2cap_core.c 		if (!chan) {
chan             4028 net/bluetooth/l2cap_core.c 		chan = __l2cap_get_chan_by_ident(conn, cmd->ident);
chan             4029 net/bluetooth/l2cap_core.c 		if (!chan) {
chan             4037 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             4041 net/bluetooth/l2cap_core.c 		l2cap_state_change(chan, BT_CONFIG);
chan             4042 net/bluetooth/l2cap_core.c 		chan->ident = 0;
chan             4043 net/bluetooth/l2cap_core.c 		chan->dcid = dcid;
chan             4044 net/bluetooth/l2cap_core.c 		clear_bit(CONF_CONNECT_PEND, &chan->conf_state);
chan             4046 net/bluetooth/l2cap_core.c 		if (test_and_set_bit(CONF_REQ_SENT, &chan->conf_state))
chan             4050 net/bluetooth/l2cap_core.c 			       l2cap_build_conf_req(chan, req, sizeof(req)), req);
chan             4051 net/bluetooth/l2cap_core.c 		chan->num_conf_req++;
chan             4055 net/bluetooth/l2cap_core.c 		set_bit(CONF_CONNECT_PEND, &chan->conf_state);
chan             4059 net/bluetooth/l2cap_core.c 		l2cap_chan_del(chan, ECONNREFUSED);
chan             4063 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             4071 net/bluetooth/l2cap_core.c static inline void set_default_fcs(struct l2cap_chan *chan)
chan             4076 net/bluetooth/l2cap_core.c 	if (chan->mode != L2CAP_MODE_ERTM && chan->mode != L2CAP_MODE_STREAMING)
chan             4077 net/bluetooth/l2cap_core.c 		chan->fcs = L2CAP_FCS_NONE;
chan             4078 net/bluetooth/l2cap_core.c 	else if (!test_bit(CONF_RECV_NO_FCS, &chan->conf_state))
chan             4079 net/bluetooth/l2cap_core.c 		chan->fcs = L2CAP_FCS_CRC16;
chan             4082 net/bluetooth/l2cap_core.c static void l2cap_send_efs_conf_rsp(struct l2cap_chan *chan, void *data,
chan             4085 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             4087 net/bluetooth/l2cap_core.c 	BT_DBG("conn %p chan %p ident %d flags 0x%4.4x", conn, chan, ident,
chan             4090 net/bluetooth/l2cap_core.c 	clear_bit(CONF_LOC_CONF_PEND, &chan->conf_state);
chan             4091 net/bluetooth/l2cap_core.c 	set_bit(CONF_OUTPUT_DONE, &chan->conf_state);
chan             4094 net/bluetooth/l2cap_core.c 		       l2cap_build_conf_rsp(chan, data,
chan             4117 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4128 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_scid(conn, dcid);
chan             4129 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             4134 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONFIG && chan->state != BT_CONNECT2) {
chan             4135 net/bluetooth/l2cap_core.c 		cmd_reject_invalid_cid(conn, cmd->ident, chan->scid,
chan             4136 net/bluetooth/l2cap_core.c 				       chan->dcid);
chan             4142 net/bluetooth/l2cap_core.c 	if (chan->conf_len + len > sizeof(chan->conf_req)) {
chan             4144 net/bluetooth/l2cap_core.c 			       l2cap_build_conf_rsp(chan, rsp,
chan             4150 net/bluetooth/l2cap_core.c 	memcpy(chan->conf_req + chan->conf_len, req->data, len);
chan             4151 net/bluetooth/l2cap_core.c 	chan->conf_len += len;
chan             4156 net/bluetooth/l2cap_core.c 			       l2cap_build_conf_rsp(chan, rsp,
chan             4162 net/bluetooth/l2cap_core.c 	len = l2cap_parse_conf_req(chan, rsp, sizeof(rsp));
chan             4164 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             4168 net/bluetooth/l2cap_core.c 	chan->ident = cmd->ident;
chan             4170 net/bluetooth/l2cap_core.c 	chan->num_conf_rsp++;
chan             4173 net/bluetooth/l2cap_core.c 	chan->conf_len = 0;
chan             4175 net/bluetooth/l2cap_core.c 	if (!test_bit(CONF_OUTPUT_DONE, &chan->conf_state))
chan             4178 net/bluetooth/l2cap_core.c 	if (test_bit(CONF_INPUT_DONE, &chan->conf_state)) {
chan             4179 net/bluetooth/l2cap_core.c 		set_default_fcs(chan);
chan             4181 net/bluetooth/l2cap_core.c 		if (chan->mode == L2CAP_MODE_ERTM ||
chan             4182 net/bluetooth/l2cap_core.c 		    chan->mode == L2CAP_MODE_STREAMING)
chan             4183 net/bluetooth/l2cap_core.c 			err = l2cap_ertm_init(chan);
chan             4186 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, -err);
chan             4188 net/bluetooth/l2cap_core.c 			l2cap_chan_ready(chan);
chan             4193 net/bluetooth/l2cap_core.c 	if (!test_and_set_bit(CONF_REQ_SENT, &chan->conf_state)) {
chan             4196 net/bluetooth/l2cap_core.c 			       l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
chan             4197 net/bluetooth/l2cap_core.c 		chan->num_conf_req++;
chan             4202 net/bluetooth/l2cap_core.c 	if (test_bit(CONF_REM_CONF_PEND, &chan->conf_state) &&
chan             4203 net/bluetooth/l2cap_core.c 	    test_bit(CONF_LOC_CONF_PEND, &chan->conf_state)) {
chan             4208 net/bluetooth/l2cap_core.c 		if (!chan->hs_hcon)
chan             4209 net/bluetooth/l2cap_core.c 			l2cap_send_efs_conf_rsp(chan, rsp, cmd->ident, flags);
chan             4211 net/bluetooth/l2cap_core.c 			chan->ident = cmd->ident;
chan             4215 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             4225 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4239 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_scid(conn, scid);
chan             4240 net/bluetooth/l2cap_core.c 	if (!chan)
chan             4245 net/bluetooth/l2cap_core.c 		l2cap_conf_rfc_get(chan, rsp->data, len);
chan             4246 net/bluetooth/l2cap_core.c 		clear_bit(CONF_REM_CONF_PEND, &chan->conf_state);
chan             4250 net/bluetooth/l2cap_core.c 		set_bit(CONF_REM_CONF_PEND, &chan->conf_state);
chan             4252 net/bluetooth/l2cap_core.c 		if (test_bit(CONF_LOC_CONF_PEND, &chan->conf_state)) {
chan             4255 net/bluetooth/l2cap_core.c 			len = l2cap_parse_conf_rsp(chan, rsp->data, len,
chan             4258 net/bluetooth/l2cap_core.c 				l2cap_send_disconn_req(chan, ECONNRESET);
chan             4262 net/bluetooth/l2cap_core.c 			if (!chan->hs_hcon) {
chan             4263 net/bluetooth/l2cap_core.c 				l2cap_send_efs_conf_rsp(chan, buf, cmd->ident,
chan             4266 net/bluetooth/l2cap_core.c 				if (l2cap_check_efs(chan)) {
chan             4267 net/bluetooth/l2cap_core.c 					amp_create_logical_link(chan);
chan             4268 net/bluetooth/l2cap_core.c 					chan->ident = cmd->ident;
chan             4275 net/bluetooth/l2cap_core.c 		if (chan->num_conf_rsp <= L2CAP_CONF_MAX_CONF_RSP) {
chan             4279 net/bluetooth/l2cap_core.c 				l2cap_send_disconn_req(chan, ECONNRESET);
chan             4285 net/bluetooth/l2cap_core.c 			len = l2cap_parse_conf_rsp(chan, rsp->data, len,
chan             4288 net/bluetooth/l2cap_core.c 				l2cap_send_disconn_req(chan, ECONNRESET);
chan             4294 net/bluetooth/l2cap_core.c 			chan->num_conf_req++;
chan             4302 net/bluetooth/l2cap_core.c 		l2cap_chan_set_err(chan, ECONNRESET);
chan             4304 net/bluetooth/l2cap_core.c 		__set_chan_timer(chan, L2CAP_DISC_REJ_TIMEOUT);
chan             4305 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             4312 net/bluetooth/l2cap_core.c 	set_bit(CONF_INPUT_DONE, &chan->conf_state);
chan             4314 net/bluetooth/l2cap_core.c 	if (test_bit(CONF_OUTPUT_DONE, &chan->conf_state)) {
chan             4315 net/bluetooth/l2cap_core.c 		set_default_fcs(chan);
chan             4317 net/bluetooth/l2cap_core.c 		if (chan->mode == L2CAP_MODE_ERTM ||
chan             4318 net/bluetooth/l2cap_core.c 		    chan->mode == L2CAP_MODE_STREAMING)
chan             4319 net/bluetooth/l2cap_core.c 			err = l2cap_ertm_init(chan);
chan             4322 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, -err);
chan             4324 net/bluetooth/l2cap_core.c 			l2cap_chan_ready(chan);
chan             4328 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             4339 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4351 net/bluetooth/l2cap_core.c 	chan = __l2cap_get_chan_by_scid(conn, dcid);
chan             4352 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             4358 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             4360 net/bluetooth/l2cap_core.c 	rsp.dcid = cpu_to_le16(chan->scid);
chan             4361 net/bluetooth/l2cap_core.c 	rsp.scid = cpu_to_le16(chan->dcid);
chan             4364 net/bluetooth/l2cap_core.c 	chan->ops->set_shutdown(chan);
chan             4366 net/bluetooth/l2cap_core.c 	l2cap_chan_hold(chan);
chan             4367 net/bluetooth/l2cap_core.c 	l2cap_chan_del(chan, ECONNRESET);
chan             4369 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             4371 net/bluetooth/l2cap_core.c 	chan->ops->close(chan);
chan             4372 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             4385 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4397 net/bluetooth/l2cap_core.c 	chan = __l2cap_get_chan_by_scid(conn, scid);
chan             4398 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             4403 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             4405 net/bluetooth/l2cap_core.c 	if (chan->state != BT_DISCONN) {
chan             4406 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             4411 net/bluetooth/l2cap_core.c 	l2cap_chan_hold(chan);
chan             4412 net/bluetooth/l2cap_core.c 	l2cap_chan_del(chan, 0);
chan             4414 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             4416 net/bluetooth/l2cap_core.c 	chan->ops->close(chan);
chan             4417 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             4544 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4576 net/bluetooth/l2cap_core.c 	chan = l2cap_connect(conn, cmd, data, L2CAP_CREATE_CHAN_RSP,
chan             4578 net/bluetooth/l2cap_core.c 	if (chan) {
chan             4586 net/bluetooth/l2cap_core.c 			cmd_reject_invalid_cid(conn, cmd->ident, chan->scid,
chan             4587 net/bluetooth/l2cap_core.c 					       chan->dcid);
chan             4591 net/bluetooth/l2cap_core.c 		BT_DBG("mgr %p bredr_chan %p hs_hcon %p", mgr, chan, hs_hcon);
chan             4593 net/bluetooth/l2cap_core.c 		mgr->bredr_chan = chan;
chan             4594 net/bluetooth/l2cap_core.c 		chan->hs_hcon = hs_hcon;
chan             4595 net/bluetooth/l2cap_core.c 		chan->fcs = L2CAP_FCS_NONE;
chan             4615 net/bluetooth/l2cap_core.c static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id)
chan             4620 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, dest_amp_id %d", chan, dest_amp_id);
chan             4622 net/bluetooth/l2cap_core.c 	ident = l2cap_get_ident(chan->conn);
chan             4623 net/bluetooth/l2cap_core.c 	chan->ident = ident;
chan             4625 net/bluetooth/l2cap_core.c 	req.icid = cpu_to_le16(chan->scid);
chan             4628 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(chan->conn, ident, L2CAP_MOVE_CHAN_REQ, sizeof(req),
chan             4631 net/bluetooth/l2cap_core.c 	__set_chan_timer(chan, L2CAP_MOVE_TIMEOUT);
chan             4634 net/bluetooth/l2cap_core.c static void l2cap_send_move_chan_rsp(struct l2cap_chan *chan, u16 result)
chan             4638 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, result 0x%4.4x", chan, result);
chan             4640 net/bluetooth/l2cap_core.c 	rsp.icid = cpu_to_le16(chan->dcid);
chan             4643 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(chan->conn, chan->ident, L2CAP_MOVE_CHAN_RSP,
chan             4647 net/bluetooth/l2cap_core.c static void l2cap_send_move_chan_cfm(struct l2cap_chan *chan, u16 result)
chan             4651 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, result 0x%4.4x", chan, result);
chan             4653 net/bluetooth/l2cap_core.c 	chan->ident = l2cap_get_ident(chan->conn);
chan             4655 net/bluetooth/l2cap_core.c 	cfm.icid = cpu_to_le16(chan->scid);
chan             4658 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(chan->conn, chan->ident, L2CAP_MOVE_CHAN_CFM,
chan             4661 net/bluetooth/l2cap_core.c 	__set_chan_timer(chan, L2CAP_MOVE_TIMEOUT);
chan             4688 net/bluetooth/l2cap_core.c static void __release_logical_link(struct l2cap_chan *chan)
chan             4690 net/bluetooth/l2cap_core.c 	chan->hs_hchan = NULL;
chan             4691 net/bluetooth/l2cap_core.c 	chan->hs_hcon = NULL;
chan             4696 net/bluetooth/l2cap_core.c static void l2cap_logical_fail(struct l2cap_chan *chan)
chan             4699 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONNECTED) {
chan             4701 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             4705 net/bluetooth/l2cap_core.c 	switch (chan->move_role) {
chan             4707 net/bluetooth/l2cap_core.c 		l2cap_move_done(chan);
chan             4708 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_rsp(chan, L2CAP_MR_NOT_SUPP);
chan             4711 net/bluetooth/l2cap_core.c 		if (chan->move_state == L2CAP_MOVE_WAIT_LOGICAL_COMP ||
chan             4712 net/bluetooth/l2cap_core.c 		    chan->move_state == L2CAP_MOVE_WAIT_LOGICAL_CFM) {
chan             4716 net/bluetooth/l2cap_core.c 			l2cap_move_done(chan);
chan             4722 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_cfm(chan, L2CAP_MC_UNCONFIRMED);
chan             4727 net/bluetooth/l2cap_core.c static void l2cap_logical_finish_create(struct l2cap_chan *chan,
chan             4732 net/bluetooth/l2cap_core.c 	chan->hs_hchan = hchan;
chan             4733 net/bluetooth/l2cap_core.c 	chan->hs_hcon->l2cap_data = chan->conn;
chan             4735 net/bluetooth/l2cap_core.c 	l2cap_send_efs_conf_rsp(chan, &rsp, chan->ident, 0);
chan             4737 net/bluetooth/l2cap_core.c 	if (test_bit(CONF_INPUT_DONE, &chan->conf_state)) {
chan             4740 net/bluetooth/l2cap_core.c 		set_default_fcs(chan);
chan             4742 net/bluetooth/l2cap_core.c 		err = l2cap_ertm_init(chan);
chan             4744 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, -err);
chan             4746 net/bluetooth/l2cap_core.c 			l2cap_chan_ready(chan);
chan             4750 net/bluetooth/l2cap_core.c static void l2cap_logical_finish_move(struct l2cap_chan *chan,
chan             4753 net/bluetooth/l2cap_core.c 	chan->hs_hcon = hchan->conn;
chan             4754 net/bluetooth/l2cap_core.c 	chan->hs_hcon->l2cap_data = chan->conn;
chan             4756 net/bluetooth/l2cap_core.c 	BT_DBG("move_state %d", chan->move_state);
chan             4758 net/bluetooth/l2cap_core.c 	switch (chan->move_state) {
chan             4763 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_WAIT_RSP_SUCCESS;
chan             4766 net/bluetooth/l2cap_core.c 		if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             4767 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOCAL_BUSY;
chan             4768 net/bluetooth/l2cap_core.c 		} else if (chan->move_role == L2CAP_MOVE_ROLE_INITIATOR) {
chan             4769 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_CONFIRM_RSP;
chan             4770 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_cfm(chan, L2CAP_MC_CONFIRMED);
chan             4771 net/bluetooth/l2cap_core.c 		} else if (chan->move_role == L2CAP_MOVE_ROLE_RESPONDER) {
chan             4772 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_CONFIRM;
chan             4773 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_rsp(chan, L2CAP_MR_SUCCESS);
chan             4778 net/bluetooth/l2cap_core.c 		__release_logical_link(chan);
chan             4780 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_STABLE;
chan             4785 net/bluetooth/l2cap_core.c void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan,
chan             4788 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, hchan %p, status %d", chan, hchan, status);
chan             4791 net/bluetooth/l2cap_core.c 		l2cap_logical_fail(chan);
chan             4792 net/bluetooth/l2cap_core.c 		__release_logical_link(chan);
chan             4796 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONNECTED) {
chan             4798 net/bluetooth/l2cap_core.c 		if (chan->local_amp_id != AMP_ID_BREDR)
chan             4799 net/bluetooth/l2cap_core.c 			l2cap_logical_finish_create(chan, hchan);
chan             4801 net/bluetooth/l2cap_core.c 		l2cap_logical_finish_move(chan, hchan);
chan             4805 net/bluetooth/l2cap_core.c void l2cap_move_start(struct l2cap_chan *chan)
chan             4807 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             4809 net/bluetooth/l2cap_core.c 	if (chan->local_amp_id == AMP_ID_BREDR) {
chan             4810 net/bluetooth/l2cap_core.c 		if (chan->chan_policy != BT_CHANNEL_POLICY_AMP_PREFERRED)
chan             4812 net/bluetooth/l2cap_core.c 		chan->move_role = L2CAP_MOVE_ROLE_INITIATOR;
chan             4813 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_WAIT_PREPARE;
chan             4816 net/bluetooth/l2cap_core.c 		chan->move_role = L2CAP_MOVE_ROLE_INITIATOR;
chan             4817 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_WAIT_RSP_SUCCESS;
chan             4818 net/bluetooth/l2cap_core.c 		chan->move_id = 0;
chan             4819 net/bluetooth/l2cap_core.c 		l2cap_move_setup(chan);
chan             4820 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_req(chan, 0);
chan             4824 net/bluetooth/l2cap_core.c static void l2cap_do_create(struct l2cap_chan *chan, int result,
chan             4827 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state),
chan             4830 net/bluetooth/l2cap_core.c 	chan->fcs = L2CAP_FCS_NONE;
chan             4833 net/bluetooth/l2cap_core.c 	if (chan->state == BT_CONNECT) {
chan             4835 net/bluetooth/l2cap_core.c 			chan->local_amp_id = local_amp_id;
chan             4836 net/bluetooth/l2cap_core.c 			l2cap_send_create_chan_req(chan, remote_amp_id);
chan             4839 net/bluetooth/l2cap_core.c 			l2cap_send_conn_req(chan);
chan             4846 net/bluetooth/l2cap_core.c 	if (__l2cap_no_conn_pending(chan)) {
chan             4849 net/bluetooth/l2cap_core.c 		rsp.scid = cpu_to_le16(chan->dcid);
chan             4850 net/bluetooth/l2cap_core.c 		rsp.dcid = cpu_to_le16(chan->scid);
chan             4862 net/bluetooth/l2cap_core.c 		l2cap_send_cmd(chan->conn, chan->ident, L2CAP_CREATE_CHAN_RSP,
chan             4866 net/bluetooth/l2cap_core.c 			l2cap_state_change(chan, BT_CONFIG);
chan             4867 net/bluetooth/l2cap_core.c 			set_bit(CONF_REQ_SENT, &chan->conf_state);
chan             4868 net/bluetooth/l2cap_core.c 			l2cap_send_cmd(chan->conn, l2cap_get_ident(chan->conn),
chan             4870 net/bluetooth/l2cap_core.c 				       l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
chan             4871 net/bluetooth/l2cap_core.c 			chan->num_conf_req++;
chan             4876 net/bluetooth/l2cap_core.c static void l2cap_do_move_initiate(struct l2cap_chan *chan, u8 local_amp_id,
chan             4879 net/bluetooth/l2cap_core.c 	l2cap_move_setup(chan);
chan             4880 net/bluetooth/l2cap_core.c 	chan->move_id = local_amp_id;
chan             4881 net/bluetooth/l2cap_core.c 	chan->move_state = L2CAP_MOVE_WAIT_RSP;
chan             4883 net/bluetooth/l2cap_core.c 	l2cap_send_move_chan_req(chan, remote_amp_id);
chan             4886 net/bluetooth/l2cap_core.c static void l2cap_do_move_respond(struct l2cap_chan *chan, int result)
chan             4895 net/bluetooth/l2cap_core.c 			chan->hs_hcon = hchan->conn;
chan             4896 net/bluetooth/l2cap_core.c 			chan->hs_hcon->l2cap_data = chan->conn;
chan             4897 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_CONFIRM;
chan             4898 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_rsp(chan, L2CAP_MR_SUCCESS);
chan             4900 net/bluetooth/l2cap_core.c 			l2cap_logical_cfm(chan, hchan, L2CAP_MR_SUCCESS);
chan             4903 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOGICAL_CFM;
chan             4907 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_rsp(chan, L2CAP_MR_NOT_ALLOWED);
chan             4911 net/bluetooth/l2cap_core.c static void l2cap_do_move_cancel(struct l2cap_chan *chan, int result)
chan             4913 net/bluetooth/l2cap_core.c 	if (chan->move_role == L2CAP_MOVE_ROLE_RESPONDER) {
chan             4920 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_rsp(chan, rsp_result);
chan             4923 net/bluetooth/l2cap_core.c 	chan->move_role = L2CAP_MOVE_ROLE_NONE;
chan             4924 net/bluetooth/l2cap_core.c 	chan->move_state = L2CAP_MOVE_STABLE;
chan             4927 net/bluetooth/l2cap_core.c 	l2cap_ertm_send(chan);
chan             4931 net/bluetooth/l2cap_core.c void __l2cap_physical_cfm(struct l2cap_chan *chan, int result)
chan             4933 net/bluetooth/l2cap_core.c 	u8 local_amp_id = chan->local_amp_id;
chan             4934 net/bluetooth/l2cap_core.c 	u8 remote_amp_id = chan->remote_amp_id;
chan             4937 net/bluetooth/l2cap_core.c 	       chan, result, local_amp_id, remote_amp_id);
chan             4939 net/bluetooth/l2cap_core.c 	if (chan->state == BT_DISCONN || chan->state == BT_CLOSED)
chan             4942 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONNECTED) {
chan             4943 net/bluetooth/l2cap_core.c 		l2cap_do_create(chan, result, local_amp_id, remote_amp_id);
chan             4945 net/bluetooth/l2cap_core.c 		l2cap_do_move_cancel(chan, result);
chan             4947 net/bluetooth/l2cap_core.c 		switch (chan->move_role) {
chan             4949 net/bluetooth/l2cap_core.c 			l2cap_do_move_initiate(chan, local_amp_id,
chan             4953 net/bluetooth/l2cap_core.c 			l2cap_do_move_respond(chan, result);
chan             4956 net/bluetooth/l2cap_core.c 			l2cap_do_move_cancel(chan, result);
chan             4968 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             4982 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_dcid(conn, icid);
chan             4983 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             4991 net/bluetooth/l2cap_core.c 	chan->ident = cmd->ident;
chan             4993 net/bluetooth/l2cap_core.c 	if (chan->scid < L2CAP_CID_DYN_START ||
chan             4994 net/bluetooth/l2cap_core.c 	    chan->chan_policy == BT_CHANNEL_POLICY_BREDR_ONLY ||
chan             4995 net/bluetooth/l2cap_core.c 	    (chan->mode != L2CAP_MODE_ERTM &&
chan             4996 net/bluetooth/l2cap_core.c 	     chan->mode != L2CAP_MODE_STREAMING)) {
chan             5001 net/bluetooth/l2cap_core.c 	if (chan->local_amp_id == req->dest_amp_id) {
chan             5024 net/bluetooth/l2cap_core.c 	if ((__chan_is_moving(chan) ||
chan             5025 net/bluetooth/l2cap_core.c 	     chan->move_role != L2CAP_MOVE_ROLE_NONE) &&
chan             5031 net/bluetooth/l2cap_core.c 	chan->move_role = L2CAP_MOVE_ROLE_RESPONDER;
chan             5032 net/bluetooth/l2cap_core.c 	l2cap_move_setup(chan);
chan             5033 net/bluetooth/l2cap_core.c 	chan->move_id = req->dest_amp_id;
chan             5034 net/bluetooth/l2cap_core.c 	icid = chan->dcid;
chan             5038 net/bluetooth/l2cap_core.c 		if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             5039 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOCAL_BUSY;
chan             5042 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_CONFIRM;
chan             5046 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_WAIT_PREPARE;
chan             5053 net/bluetooth/l2cap_core.c 	l2cap_send_move_chan_rsp(chan, result);
chan             5055 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5062 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5065 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_scid(conn, icid);
chan             5066 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             5071 net/bluetooth/l2cap_core.c 	__clear_chan_timer(chan);
chan             5073 net/bluetooth/l2cap_core.c 		__set_chan_timer(chan, L2CAP_MOVE_ERTX_TIMEOUT);
chan             5075 net/bluetooth/l2cap_core.c 	switch (chan->move_state) {
chan             5080 net/bluetooth/l2cap_core.c 		chan->move_state = L2CAP_MOVE_WAIT_LOGICAL_CFM;
chan             5086 net/bluetooth/l2cap_core.c 				    &chan->conn_state)) {
chan             5087 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOCAL_BUSY;
chan             5092 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_CONFIRM_RSP;
chan             5093 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_cfm(chan, L2CAP_MC_CONFIRMED);
chan             5102 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOGICAL_CFM;
chan             5107 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_LOGICAL_COMP;
chan             5113 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_cfm(chan, L2CAP_MC_UNCONFIRMED);
chan             5125 net/bluetooth/l2cap_core.c 		chan->hs_hcon = hchan->conn;
chan             5126 net/bluetooth/l2cap_core.c 		chan->hs_hcon->l2cap_data = chan->conn;
chan             5130 net/bluetooth/l2cap_core.c 			l2cap_send_move_chan_cfm(chan, L2CAP_MC_CONFIRMED);
chan             5135 net/bluetooth/l2cap_core.c 			chan->move_state = L2CAP_MOVE_WAIT_RSP_SUCCESS;
chan             5138 net/bluetooth/l2cap_core.c 		l2cap_logical_cfm(chan, hchan, L2CAP_MR_SUCCESS);
chan             5142 net/bluetooth/l2cap_core.c 		chan->move_id = chan->local_amp_id;
chan             5143 net/bluetooth/l2cap_core.c 		l2cap_move_done(chan);
chan             5144 net/bluetooth/l2cap_core.c 		l2cap_send_move_chan_cfm(chan, L2CAP_MC_UNCONFIRMED);
chan             5147 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5153 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5155 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_ident(conn, ident);
chan             5156 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             5162 net/bluetooth/l2cap_core.c 	__clear_chan_timer(chan);
chan             5164 net/bluetooth/l2cap_core.c 	if (chan->move_role == L2CAP_MOVE_ROLE_INITIATOR) {
chan             5166 net/bluetooth/l2cap_core.c 			chan->move_role = L2CAP_MOVE_ROLE_RESPONDER;
chan             5169 net/bluetooth/l2cap_core.c 			chan->move_id = chan->local_amp_id;
chan             5170 net/bluetooth/l2cap_core.c 			l2cap_move_done(chan);
chan             5174 net/bluetooth/l2cap_core.c 	l2cap_send_move_chan_cfm(chan, L2CAP_MC_UNCONFIRMED);
chan             5176 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5207 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5218 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_dcid(conn, icid);
chan             5219 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             5225 net/bluetooth/l2cap_core.c 	if (chan->move_state == L2CAP_MOVE_WAIT_CONFIRM) {
chan             5227 net/bluetooth/l2cap_core.c 			chan->local_amp_id = chan->move_id;
chan             5228 net/bluetooth/l2cap_core.c 			if (chan->local_amp_id == AMP_ID_BREDR)
chan             5229 net/bluetooth/l2cap_core.c 				__release_logical_link(chan);
chan             5231 net/bluetooth/l2cap_core.c 			chan->move_id = chan->local_amp_id;
chan             5234 net/bluetooth/l2cap_core.c 		l2cap_move_done(chan);
chan             5239 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5249 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5259 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_scid(conn, icid);
chan             5260 net/bluetooth/l2cap_core.c 	if (!chan)
chan             5263 net/bluetooth/l2cap_core.c 	__clear_chan_timer(chan);
chan             5265 net/bluetooth/l2cap_core.c 	if (chan->move_state == L2CAP_MOVE_WAIT_CONFIRM_RSP) {
chan             5266 net/bluetooth/l2cap_core.c 		chan->local_amp_id = chan->move_id;
chan             5268 net/bluetooth/l2cap_core.c 		if (chan->local_amp_id == AMP_ID_BREDR && chan->hs_hchan)
chan             5269 net/bluetooth/l2cap_core.c 			__release_logical_link(chan);
chan             5271 net/bluetooth/l2cap_core.c 		l2cap_move_done(chan);
chan             5274 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5336 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5358 net/bluetooth/l2cap_core.c 	chan = __l2cap_get_chan_by_ident(conn, cmd->ident);
chan             5359 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             5366 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             5375 net/bluetooth/l2cap_core.c 		chan->ident = 0;
chan             5376 net/bluetooth/l2cap_core.c 		chan->dcid = dcid;
chan             5377 net/bluetooth/l2cap_core.c 		chan->omtu = mtu;
chan             5378 net/bluetooth/l2cap_core.c 		chan->remote_mps = mps;
chan             5379 net/bluetooth/l2cap_core.c 		chan->tx_credits = credits;
chan             5380 net/bluetooth/l2cap_core.c 		l2cap_chan_ready(chan);
chan             5389 net/bluetooth/l2cap_core.c 			l2cap_chan_del(chan, ECONNREFUSED);
chan             5394 net/bluetooth/l2cap_core.c 		if (chan->sec_level < sec_level)
chan             5395 net/bluetooth/l2cap_core.c 			chan->sec_level = sec_level;
chan             5398 net/bluetooth/l2cap_core.c 		clear_bit(FLAG_LE_CONN_REQ_SENT, &chan->flags);
chan             5400 net/bluetooth/l2cap_core.c 		smp_conn_security(hcon, chan->sec_level);
chan             5404 net/bluetooth/l2cap_core.c 		l2cap_chan_del(chan, ECONNREFUSED);
chan             5408 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5502 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan, *pchan;
chan             5528 net/bluetooth/l2cap_core.c 		chan = NULL;
chan             5538 net/bluetooth/l2cap_core.c 		chan = NULL;
chan             5545 net/bluetooth/l2cap_core.c 		chan = NULL;
chan             5552 net/bluetooth/l2cap_core.c 		chan = NULL;
chan             5556 net/bluetooth/l2cap_core.c 	chan = pchan->ops->new_connection(pchan);
chan             5557 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             5562 net/bluetooth/l2cap_core.c 	bacpy(&chan->src, &conn->hcon->src);
chan             5563 net/bluetooth/l2cap_core.c 	bacpy(&chan->dst, &conn->hcon->dst);
chan             5564 net/bluetooth/l2cap_core.c 	chan->src_type = bdaddr_src_type(conn->hcon);
chan             5565 net/bluetooth/l2cap_core.c 	chan->dst_type = bdaddr_dst_type(conn->hcon);
chan             5566 net/bluetooth/l2cap_core.c 	chan->psm  = psm;
chan             5567 net/bluetooth/l2cap_core.c 	chan->dcid = scid;
chan             5568 net/bluetooth/l2cap_core.c 	chan->omtu = mtu;
chan             5569 net/bluetooth/l2cap_core.c 	chan->remote_mps = mps;
chan             5571 net/bluetooth/l2cap_core.c 	__l2cap_chan_add(conn, chan);
chan             5573 net/bluetooth/l2cap_core.c 	l2cap_le_flowctl_init(chan, __le16_to_cpu(req->credits));
chan             5575 net/bluetooth/l2cap_core.c 	dcid = chan->scid;
chan             5576 net/bluetooth/l2cap_core.c 	credits = chan->rx_credits;
chan             5578 net/bluetooth/l2cap_core.c 	__set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
chan             5580 net/bluetooth/l2cap_core.c 	chan->ident = cmd->ident;
chan             5582 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
chan             5583 net/bluetooth/l2cap_core.c 		l2cap_state_change(chan, BT_CONNECT2);
chan             5590 net/bluetooth/l2cap_core.c 		chan->ops->defer(chan);
chan             5592 net/bluetooth/l2cap_core.c 		l2cap_chan_ready(chan);
chan             5605 net/bluetooth/l2cap_core.c 	if (chan) {
chan             5606 net/bluetooth/l2cap_core.c 		rsp.mtu = cpu_to_le16(chan->imtu);
chan             5607 net/bluetooth/l2cap_core.c 		rsp.mps = cpu_to_le16(chan->mps);
chan             5627 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5639 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_dcid(conn, cid);
chan             5640 net/bluetooth/l2cap_core.c 	if (!chan)
chan             5643 net/bluetooth/l2cap_core.c 	max_credits = LE_FLOWCTL_MAX_CREDITS - chan->tx_credits;
chan             5646 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             5647 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan             5655 net/bluetooth/l2cap_core.c 	chan->tx_credits += credits;
chan             5658 net/bluetooth/l2cap_core.c 	l2cap_le_flowctl_send(chan);
chan             5660 net/bluetooth/l2cap_core.c 	if (chan->tx_credits)
chan             5661 net/bluetooth/l2cap_core.c 		chan->ops->resume(chan);
chan             5663 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5673 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             5680 net/bluetooth/l2cap_core.c 	chan = __l2cap_get_chan_by_ident(conn, cmd->ident);
chan             5681 net/bluetooth/l2cap_core.c 	if (!chan)
chan             5684 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             5685 net/bluetooth/l2cap_core.c 	l2cap_chan_del(chan, ECONNREFUSED);
chan             5686 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             5830 net/bluetooth/l2cap_core.c static int l2cap_check_fcs(struct l2cap_chan *chan,  struct sk_buff *skb)
chan             5835 net/bluetooth/l2cap_core.c 	if (test_bit(FLAG_EXT_CTRL, &chan->flags))
chan             5840 net/bluetooth/l2cap_core.c 	if (chan->fcs == L2CAP_FCS_CRC16) {
chan             5851 net/bluetooth/l2cap_core.c static void l2cap_send_i_or_rr_or_rnr(struct l2cap_chan *chan)
chan             5855 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             5860 net/bluetooth/l2cap_core.c 	control.reqseq = chan->buffer_seq;
chan             5861 net/bluetooth/l2cap_core.c 	set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             5863 net/bluetooth/l2cap_core.c 	if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             5865 net/bluetooth/l2cap_core.c 		l2cap_send_sframe(chan, &control);
chan             5868 net/bluetooth/l2cap_core.c 	if (test_and_clear_bit(CONN_REMOTE_BUSY, &chan->conn_state) &&
chan             5869 net/bluetooth/l2cap_core.c 	    chan->unacked_frames > 0)
chan             5870 net/bluetooth/l2cap_core.c 		__set_retrans_timer(chan);
chan             5873 net/bluetooth/l2cap_core.c 	l2cap_ertm_send(chan);
chan             5875 net/bluetooth/l2cap_core.c 	if (!test_bit(CONN_LOCAL_BUSY, &chan->conn_state) &&
chan             5876 net/bluetooth/l2cap_core.c 	    test_bit(CONN_SEND_FBIT, &chan->conn_state)) {
chan             5881 net/bluetooth/l2cap_core.c 		l2cap_send_sframe(chan, &control);
chan             5904 net/bluetooth/l2cap_core.c static int l2cap_reassemble_sdu(struct l2cap_chan *chan, struct sk_buff *skb,
chan             5911 net/bluetooth/l2cap_core.c 		if (chan->sdu)
chan             5914 net/bluetooth/l2cap_core.c 		err = chan->ops->recv(chan, skb);
chan             5918 net/bluetooth/l2cap_core.c 		if (chan->sdu)
chan             5924 net/bluetooth/l2cap_core.c 		chan->sdu_len = get_unaligned_le16(skb->data);
chan             5927 net/bluetooth/l2cap_core.c 		if (chan->sdu_len > chan->imtu) {
chan             5932 net/bluetooth/l2cap_core.c 		if (skb->len >= chan->sdu_len)
chan             5935 net/bluetooth/l2cap_core.c 		chan->sdu = skb;
chan             5936 net/bluetooth/l2cap_core.c 		chan->sdu_last_frag = skb;
chan             5943 net/bluetooth/l2cap_core.c 		if (!chan->sdu)
chan             5946 net/bluetooth/l2cap_core.c 		append_skb_frag(chan->sdu, skb,
chan             5947 net/bluetooth/l2cap_core.c 				&chan->sdu_last_frag);
chan             5950 net/bluetooth/l2cap_core.c 		if (chan->sdu->len >= chan->sdu_len)
chan             5957 net/bluetooth/l2cap_core.c 		if (!chan->sdu)
chan             5960 net/bluetooth/l2cap_core.c 		append_skb_frag(chan->sdu, skb,
chan             5961 net/bluetooth/l2cap_core.c 				&chan->sdu_last_frag);
chan             5964 net/bluetooth/l2cap_core.c 		if (chan->sdu->len != chan->sdu_len)
chan             5967 net/bluetooth/l2cap_core.c 		err = chan->ops->recv(chan, chan->sdu);
chan             5971 net/bluetooth/l2cap_core.c 			chan->sdu = NULL;
chan             5972 net/bluetooth/l2cap_core.c 			chan->sdu_last_frag = NULL;
chan             5973 net/bluetooth/l2cap_core.c 			chan->sdu_len = 0;
chan             5980 net/bluetooth/l2cap_core.c 		kfree_skb(chan->sdu);
chan             5981 net/bluetooth/l2cap_core.c 		chan->sdu = NULL;
chan             5982 net/bluetooth/l2cap_core.c 		chan->sdu_last_frag = NULL;
chan             5983 net/bluetooth/l2cap_core.c 		chan->sdu_len = 0;
chan             5989 net/bluetooth/l2cap_core.c static int l2cap_resegment(struct l2cap_chan *chan)
chan             5995 net/bluetooth/l2cap_core.c void l2cap_chan_busy(struct l2cap_chan *chan, int busy)
chan             5999 net/bluetooth/l2cap_core.c 	if (chan->mode != L2CAP_MODE_ERTM)
chan             6003 net/bluetooth/l2cap_core.c 	l2cap_tx(chan, NULL, NULL, event);
chan             6006 net/bluetooth/l2cap_core.c static int l2cap_rx_queued_iframes(struct l2cap_chan *chan)
chan             6013 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             6015 net/bluetooth/l2cap_core.c 	while (!test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             6018 net/bluetooth/l2cap_core.c 		       chan->buffer_seq, skb_queue_len(&chan->srej_q));
chan             6020 net/bluetooth/l2cap_core.c 		skb = l2cap_ertm_seq_in_queue(&chan->srej_q, chan->buffer_seq);
chan             6025 net/bluetooth/l2cap_core.c 		skb_unlink(skb, &chan->srej_q);
chan             6026 net/bluetooth/l2cap_core.c 		chan->buffer_seq = __next_seq(chan, chan->buffer_seq);
chan             6027 net/bluetooth/l2cap_core.c 		err = l2cap_reassemble_sdu(chan, skb, &bt_cb(skb)->l2cap);
chan             6032 net/bluetooth/l2cap_core.c 	if (skb_queue_empty(&chan->srej_q)) {
chan             6033 net/bluetooth/l2cap_core.c 		chan->rx_state = L2CAP_RX_STATE_RECV;
chan             6034 net/bluetooth/l2cap_core.c 		l2cap_send_ack(chan);
chan             6040 net/bluetooth/l2cap_core.c static void l2cap_handle_srej(struct l2cap_chan *chan,
chan             6045 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             6047 net/bluetooth/l2cap_core.c 	if (control->reqseq == chan->next_tx_seq) {
chan             6049 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6053 net/bluetooth/l2cap_core.c 	skb = l2cap_ertm_seq_in_queue(&chan->tx_q, control->reqseq);
chan             6061 net/bluetooth/l2cap_core.c 	if (chan->max_tx != 0 && bt_cb(skb)->l2cap.retries >= chan->max_tx) {
chan             6062 net/bluetooth/l2cap_core.c 		BT_DBG("Retry limit exceeded (%d)", chan->max_tx);
chan             6063 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6067 net/bluetooth/l2cap_core.c 	clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6070 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6072 net/bluetooth/l2cap_core.c 		set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             6073 net/bluetooth/l2cap_core.c 		l2cap_retransmit(chan, control);
chan             6074 net/bluetooth/l2cap_core.c 		l2cap_ertm_send(chan);
chan             6076 net/bluetooth/l2cap_core.c 		if (chan->tx_state == L2CAP_TX_STATE_WAIT_F) {
chan             6077 net/bluetooth/l2cap_core.c 			set_bit(CONN_SREJ_ACT, &chan->conn_state);
chan             6078 net/bluetooth/l2cap_core.c 			chan->srej_save_reqseq = control->reqseq;
chan             6081 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx_fbit(chan, control);
chan             6084 net/bluetooth/l2cap_core.c 			if (chan->srej_save_reqseq != control->reqseq ||
chan             6086 net/bluetooth/l2cap_core.c 						&chan->conn_state))
chan             6087 net/bluetooth/l2cap_core.c 				l2cap_retransmit(chan, control);
chan             6089 net/bluetooth/l2cap_core.c 			l2cap_retransmit(chan, control);
chan             6090 net/bluetooth/l2cap_core.c 			if (chan->tx_state == L2CAP_TX_STATE_WAIT_F) {
chan             6091 net/bluetooth/l2cap_core.c 				set_bit(CONN_SREJ_ACT, &chan->conn_state);
chan             6092 net/bluetooth/l2cap_core.c 				chan->srej_save_reqseq = control->reqseq;
chan             6098 net/bluetooth/l2cap_core.c static void l2cap_handle_rej(struct l2cap_chan *chan,
chan             6103 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p", chan, control);
chan             6105 net/bluetooth/l2cap_core.c 	if (control->reqseq == chan->next_tx_seq) {
chan             6107 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6111 net/bluetooth/l2cap_core.c 	skb = l2cap_ertm_seq_in_queue(&chan->tx_q, control->reqseq);
chan             6113 net/bluetooth/l2cap_core.c 	if (chan->max_tx && skb &&
chan             6114 net/bluetooth/l2cap_core.c 	    bt_cb(skb)->l2cap.retries >= chan->max_tx) {
chan             6115 net/bluetooth/l2cap_core.c 		BT_DBG("Retry limit exceeded (%d)", chan->max_tx);
chan             6116 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6120 net/bluetooth/l2cap_core.c 	clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6122 net/bluetooth/l2cap_core.c 	l2cap_pass_to_tx(chan, control);
chan             6125 net/bluetooth/l2cap_core.c 		if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state))
chan             6126 net/bluetooth/l2cap_core.c 			l2cap_retransmit_all(chan, control);
chan             6128 net/bluetooth/l2cap_core.c 		l2cap_retransmit_all(chan, control);
chan             6129 net/bluetooth/l2cap_core.c 		l2cap_ertm_send(chan);
chan             6130 net/bluetooth/l2cap_core.c 		if (chan->tx_state == L2CAP_TX_STATE_WAIT_F)
chan             6131 net/bluetooth/l2cap_core.c 			set_bit(CONN_REJ_ACT, &chan->conn_state);
chan             6135 net/bluetooth/l2cap_core.c static u8 l2cap_classify_txseq(struct l2cap_chan *chan, u16 txseq)
chan             6137 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, txseq %d", chan, txseq);
chan             6139 net/bluetooth/l2cap_core.c 	BT_DBG("last_acked_seq %d, expected_tx_seq %d", chan->last_acked_seq,
chan             6140 net/bluetooth/l2cap_core.c 	       chan->expected_tx_seq);
chan             6142 net/bluetooth/l2cap_core.c 	if (chan->rx_state == L2CAP_RX_STATE_SREJ_SENT) {
chan             6143 net/bluetooth/l2cap_core.c 		if (__seq_offset(chan, txseq, chan->last_acked_seq) >=
chan             6144 net/bluetooth/l2cap_core.c 		    chan->tx_win) {
chan             6148 net/bluetooth/l2cap_core.c 			if (chan->tx_win <= ((chan->tx_win_max + 1) >> 1)) {
chan             6157 net/bluetooth/l2cap_core.c 		if (chan->srej_list.head == txseq) {
chan             6162 net/bluetooth/l2cap_core.c 		if (l2cap_ertm_seq_in_queue(&chan->srej_q, txseq)) {
chan             6167 net/bluetooth/l2cap_core.c 		if (l2cap_seq_list_contains(&chan->srej_list, txseq)) {
chan             6173 net/bluetooth/l2cap_core.c 	if (chan->expected_tx_seq == txseq) {
chan             6174 net/bluetooth/l2cap_core.c 		if (__seq_offset(chan, txseq, chan->last_acked_seq) >=
chan             6175 net/bluetooth/l2cap_core.c 		    chan->tx_win) {
chan             6184 net/bluetooth/l2cap_core.c 	if (__seq_offset(chan, txseq, chan->last_acked_seq) <
chan             6185 net/bluetooth/l2cap_core.c 	    __seq_offset(chan, chan->expected_tx_seq, chan->last_acked_seq)) {
chan             6190 net/bluetooth/l2cap_core.c 	if (__seq_offset(chan, txseq, chan->last_acked_seq) >= chan->tx_win) {
chan             6208 net/bluetooth/l2cap_core.c 		if (chan->tx_win <= ((chan->tx_win_max + 1) >> 1)) {
chan             6221 net/bluetooth/l2cap_core.c static int l2cap_rx_state_recv(struct l2cap_chan *chan,
chan             6228 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
chan             6233 net/bluetooth/l2cap_core.c 		switch (l2cap_classify_txseq(chan, control->txseq)) {
chan             6235 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6237 net/bluetooth/l2cap_core.c 			if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             6243 net/bluetooth/l2cap_core.c 			chan->expected_tx_seq = __next_seq(chan,
chan             6246 net/bluetooth/l2cap_core.c 			chan->buffer_seq = chan->expected_tx_seq;
chan             6249 net/bluetooth/l2cap_core.c 			err = l2cap_reassemble_sdu(chan, skb, control);
chan             6255 net/bluetooth/l2cap_core.c 							&chan->conn_state)) {
chan             6257 net/bluetooth/l2cap_core.c 					l2cap_retransmit_all(chan, control);
chan             6258 net/bluetooth/l2cap_core.c 					l2cap_ertm_send(chan);
chan             6262 net/bluetooth/l2cap_core.c 			if (!test_bit(CONN_LOCAL_BUSY, &chan->conn_state))
chan             6263 net/bluetooth/l2cap_core.c 				l2cap_send_ack(chan);
chan             6266 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6272 net/bluetooth/l2cap_core.c 			if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
chan             6282 net/bluetooth/l2cap_core.c 			skb_queue_tail(&chan->srej_q, skb);
chan             6285 net/bluetooth/l2cap_core.c 			       skb_queue_len(&chan->srej_q));
chan             6287 net/bluetooth/l2cap_core.c 			clear_bit(CONN_SREJ_ACT, &chan->conn_state);
chan             6288 net/bluetooth/l2cap_core.c 			l2cap_seq_list_clear(&chan->srej_list);
chan             6289 net/bluetooth/l2cap_core.c 			l2cap_send_srej(chan, control->txseq);
chan             6291 net/bluetooth/l2cap_core.c 			chan->rx_state = L2CAP_RX_STATE_SREJ_SENT;
chan             6294 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6300 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             6305 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6307 net/bluetooth/l2cap_core.c 			clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6309 net/bluetooth/l2cap_core.c 			if (!test_and_clear_bit(CONN_REJ_ACT, &chan->conn_state) &&
chan             6310 net/bluetooth/l2cap_core.c 			    !__chan_is_moving(chan)) {
chan             6312 net/bluetooth/l2cap_core.c 				l2cap_retransmit_all(chan, control);
chan             6315 net/bluetooth/l2cap_core.c 			l2cap_ertm_send(chan);
chan             6317 net/bluetooth/l2cap_core.c 			l2cap_send_i_or_rr_or_rnr(chan);
chan             6320 net/bluetooth/l2cap_core.c 					       &chan->conn_state) &&
chan             6321 net/bluetooth/l2cap_core.c 			    chan->unacked_frames)
chan             6322 net/bluetooth/l2cap_core.c 				__set_retrans_timer(chan);
chan             6324 net/bluetooth/l2cap_core.c 			l2cap_ertm_send(chan);
chan             6328 net/bluetooth/l2cap_core.c 		set_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6329 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6331 net/bluetooth/l2cap_core.c 			set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             6332 net/bluetooth/l2cap_core.c 			l2cap_send_rr_or_rnr(chan, 0);
chan             6334 net/bluetooth/l2cap_core.c 		__clear_retrans_timer(chan);
chan             6335 net/bluetooth/l2cap_core.c 		l2cap_seq_list_clear(&chan->retrans_list);
chan             6338 net/bluetooth/l2cap_core.c 		l2cap_handle_rej(chan, control);
chan             6341 net/bluetooth/l2cap_core.c 		l2cap_handle_srej(chan, control);
chan             6355 net/bluetooth/l2cap_core.c static int l2cap_rx_state_srej_sent(struct l2cap_chan *chan,
chan             6363 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
chan             6368 net/bluetooth/l2cap_core.c 		switch (l2cap_classify_txseq(chan, txseq)) {
chan             6371 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6372 net/bluetooth/l2cap_core.c 			skb_queue_tail(&chan->srej_q, skb);
chan             6375 net/bluetooth/l2cap_core.c 			       skb_queue_len(&chan->srej_q));
chan             6377 net/bluetooth/l2cap_core.c 			chan->expected_tx_seq = __next_seq(chan, txseq);
chan             6380 net/bluetooth/l2cap_core.c 			l2cap_seq_list_pop(&chan->srej_list);
chan             6382 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6383 net/bluetooth/l2cap_core.c 			skb_queue_tail(&chan->srej_q, skb);
chan             6386 net/bluetooth/l2cap_core.c 			       skb_queue_len(&chan->srej_q));
chan             6388 net/bluetooth/l2cap_core.c 			err = l2cap_rx_queued_iframes(chan);
chan             6398 net/bluetooth/l2cap_core.c 			skb_queue_tail(&chan->srej_q, skb);
chan             6401 net/bluetooth/l2cap_core.c 			       skb_queue_len(&chan->srej_q));
chan             6403 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6404 net/bluetooth/l2cap_core.c 			l2cap_send_srej(chan, control->txseq);
chan             6412 net/bluetooth/l2cap_core.c 			skb_queue_tail(&chan->srej_q, skb);
chan             6415 net/bluetooth/l2cap_core.c 			       skb_queue_len(&chan->srej_q));
chan             6417 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6418 net/bluetooth/l2cap_core.c 			l2cap_send_srej_list(chan, control->txseq);
chan             6422 net/bluetooth/l2cap_core.c 			l2cap_pass_to_tx(chan, control);
chan             6433 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             6438 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6440 net/bluetooth/l2cap_core.c 			clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6443 net/bluetooth/l2cap_core.c 						&chan->conn_state)) {
chan             6445 net/bluetooth/l2cap_core.c 				l2cap_retransmit_all(chan, control);
chan             6448 net/bluetooth/l2cap_core.c 			l2cap_ertm_send(chan);
chan             6451 net/bluetooth/l2cap_core.c 					       &chan->conn_state) &&
chan             6452 net/bluetooth/l2cap_core.c 			    chan->unacked_frames) {
chan             6453 net/bluetooth/l2cap_core.c 				__set_retrans_timer(chan);
chan             6456 net/bluetooth/l2cap_core.c 			set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             6457 net/bluetooth/l2cap_core.c 			l2cap_send_srej_tail(chan);
chan             6460 net/bluetooth/l2cap_core.c 					       &chan->conn_state) &&
chan             6461 net/bluetooth/l2cap_core.c 			    chan->unacked_frames)
chan             6462 net/bluetooth/l2cap_core.c 				__set_retrans_timer(chan);
chan             6464 net/bluetooth/l2cap_core.c 			l2cap_send_ack(chan);
chan             6468 net/bluetooth/l2cap_core.c 		set_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6469 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6471 net/bluetooth/l2cap_core.c 			l2cap_send_srej_tail(chan);
chan             6477 net/bluetooth/l2cap_core.c 			rr_control.reqseq = chan->buffer_seq;
chan             6478 net/bluetooth/l2cap_core.c 			l2cap_send_sframe(chan, &rr_control);
chan             6483 net/bluetooth/l2cap_core.c 		l2cap_handle_rej(chan, control);
chan             6486 net/bluetooth/l2cap_core.c 		l2cap_handle_srej(chan, control);
chan             6498 net/bluetooth/l2cap_core.c static int l2cap_finish_move(struct l2cap_chan *chan)
chan             6500 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p", chan);
chan             6502 net/bluetooth/l2cap_core.c 	chan->rx_state = L2CAP_RX_STATE_RECV;
chan             6504 net/bluetooth/l2cap_core.c 	if (chan->hs_hcon)
chan             6505 net/bluetooth/l2cap_core.c 		chan->conn->mtu = chan->hs_hcon->hdev->block_mtu;
chan             6507 net/bluetooth/l2cap_core.c 		chan->conn->mtu = chan->conn->hcon->hdev->acl_mtu;
chan             6509 net/bluetooth/l2cap_core.c 	return l2cap_resegment(chan);
chan             6512 net/bluetooth/l2cap_core.c static int l2cap_rx_state_wait_p(struct l2cap_chan *chan,
chan             6518 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb,
chan             6524 net/bluetooth/l2cap_core.c 	l2cap_process_reqseq(chan, control->reqseq);
chan             6526 net/bluetooth/l2cap_core.c 	if (!skb_queue_empty(&chan->tx_q))
chan             6527 net/bluetooth/l2cap_core.c 		chan->tx_send_head = skb_peek(&chan->tx_q);
chan             6529 net/bluetooth/l2cap_core.c 		chan->tx_send_head = NULL;
chan             6534 net/bluetooth/l2cap_core.c 	chan->next_tx_seq = control->reqseq;
chan             6535 net/bluetooth/l2cap_core.c 	chan->unacked_frames = 0;
chan             6537 net/bluetooth/l2cap_core.c 	err = l2cap_finish_move(chan);
chan             6541 net/bluetooth/l2cap_core.c 	set_bit(CONN_SEND_FBIT, &chan->conn_state);
chan             6542 net/bluetooth/l2cap_core.c 	l2cap_send_i_or_rr_or_rnr(chan);
chan             6547 net/bluetooth/l2cap_core.c 	return l2cap_rx_state_recv(chan, control, NULL, event);
chan             6550 net/bluetooth/l2cap_core.c static int l2cap_rx_state_wait_f(struct l2cap_chan *chan,
chan             6559 net/bluetooth/l2cap_core.c 	clear_bit(CONN_REMOTE_BUSY, &chan->conn_state);
chan             6561 net/bluetooth/l2cap_core.c 	chan->rx_state = L2CAP_RX_STATE_RECV;
chan             6562 net/bluetooth/l2cap_core.c 	l2cap_process_reqseq(chan, control->reqseq);
chan             6564 net/bluetooth/l2cap_core.c 	if (!skb_queue_empty(&chan->tx_q))
chan             6565 net/bluetooth/l2cap_core.c 		chan->tx_send_head = skb_peek(&chan->tx_q);
chan             6567 net/bluetooth/l2cap_core.c 		chan->tx_send_head = NULL;
chan             6572 net/bluetooth/l2cap_core.c 	chan->next_tx_seq = control->reqseq;
chan             6573 net/bluetooth/l2cap_core.c 	chan->unacked_frames = 0;
chan             6575 net/bluetooth/l2cap_core.c 	if (chan->hs_hcon)
chan             6576 net/bluetooth/l2cap_core.c 		chan->conn->mtu = chan->hs_hcon->hdev->block_mtu;
chan             6578 net/bluetooth/l2cap_core.c 		chan->conn->mtu = chan->conn->hcon->hdev->acl_mtu;
chan             6580 net/bluetooth/l2cap_core.c 	err = l2cap_resegment(chan);
chan             6583 net/bluetooth/l2cap_core.c 		err = l2cap_rx_state_recv(chan, control, skb, event);
chan             6588 net/bluetooth/l2cap_core.c static bool __valid_reqseq(struct l2cap_chan *chan, u16 reqseq)
chan             6593 net/bluetooth/l2cap_core.c 	unacked = __seq_offset(chan, chan->next_tx_seq, chan->expected_ack_seq);
chan             6594 net/bluetooth/l2cap_core.c 	return __seq_offset(chan, chan->next_tx_seq, reqseq) <= unacked;
chan             6597 net/bluetooth/l2cap_core.c static int l2cap_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
chan             6602 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skb %p, event %d, state %d", chan,
chan             6603 net/bluetooth/l2cap_core.c 	       control, skb, event, chan->rx_state);
chan             6605 net/bluetooth/l2cap_core.c 	if (__valid_reqseq(chan, control->reqseq)) {
chan             6606 net/bluetooth/l2cap_core.c 		switch (chan->rx_state) {
chan             6608 net/bluetooth/l2cap_core.c 			err = l2cap_rx_state_recv(chan, control, skb, event);
chan             6611 net/bluetooth/l2cap_core.c 			err = l2cap_rx_state_srej_sent(chan, control, skb,
chan             6615 net/bluetooth/l2cap_core.c 			err = l2cap_rx_state_wait_p(chan, control, skb, event);
chan             6618 net/bluetooth/l2cap_core.c 			err = l2cap_rx_state_wait_f(chan, control, skb, event);
chan             6626 net/bluetooth/l2cap_core.c 		       control->reqseq, chan->next_tx_seq,
chan             6627 net/bluetooth/l2cap_core.c 		       chan->expected_ack_seq);
chan             6628 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6634 net/bluetooth/l2cap_core.c static int l2cap_stream_rx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
chan             6637 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, control %p, skb %p, state %d", chan, control, skb,
chan             6638 net/bluetooth/l2cap_core.c 	       chan->rx_state);
chan             6640 net/bluetooth/l2cap_core.c 	if (l2cap_classify_txseq(chan, control->txseq) ==
chan             6642 net/bluetooth/l2cap_core.c 		l2cap_pass_to_tx(chan, control);
chan             6644 net/bluetooth/l2cap_core.c 		BT_DBG("buffer_seq %d->%d", chan->buffer_seq,
chan             6645 net/bluetooth/l2cap_core.c 		       __next_seq(chan, chan->buffer_seq));
chan             6647 net/bluetooth/l2cap_core.c 		chan->buffer_seq = __next_seq(chan, chan->buffer_seq);
chan             6649 net/bluetooth/l2cap_core.c 		l2cap_reassemble_sdu(chan, skb, control);
chan             6651 net/bluetooth/l2cap_core.c 		if (chan->sdu) {
chan             6652 net/bluetooth/l2cap_core.c 			kfree_skb(chan->sdu);
chan             6653 net/bluetooth/l2cap_core.c 			chan->sdu = NULL;
chan             6655 net/bluetooth/l2cap_core.c 		chan->sdu_last_frag = NULL;
chan             6656 net/bluetooth/l2cap_core.c 		chan->sdu_len = 0;
chan             6664 net/bluetooth/l2cap_core.c 	chan->last_acked_seq = control->txseq;
chan             6665 net/bluetooth/l2cap_core.c 	chan->expected_tx_seq = __next_seq(chan, control->txseq);
chan             6670 net/bluetooth/l2cap_core.c static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
chan             6676 net/bluetooth/l2cap_core.c 	__unpack_control(chan, skb);
chan             6685 net/bluetooth/l2cap_core.c 	if (l2cap_check_fcs(chan, skb))
chan             6691 net/bluetooth/l2cap_core.c 	if (chan->fcs == L2CAP_FCS_CRC16)
chan             6694 net/bluetooth/l2cap_core.c 	if (len > chan->mps) {
chan             6695 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6699 net/bluetooth/l2cap_core.c 	if ((chan->mode == L2CAP_MODE_ERTM ||
chan             6700 net/bluetooth/l2cap_core.c 	     chan->mode == L2CAP_MODE_STREAMING) && sk_filter(chan->data, skb))
chan             6713 net/bluetooth/l2cap_core.c 		if (control->final && chan->tx_state != L2CAP_TX_STATE_WAIT_F)
chan             6716 net/bluetooth/l2cap_core.c 		if (chan->mode != L2CAP_MODE_STREAMING) {
chan             6718 net/bluetooth/l2cap_core.c 			err = l2cap_rx(chan, control, skb, event);
chan             6720 net/bluetooth/l2cap_core.c 			err = l2cap_stream_rx(chan, control, skb);
chan             6724 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             6732 net/bluetooth/l2cap_core.c 		if (chan->mode == L2CAP_MODE_STREAMING)
chan             6741 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             6747 net/bluetooth/l2cap_core.c 				       chan->tx_state != L2CAP_TX_STATE_WAIT_F))
chan             6751 net/bluetooth/l2cap_core.c 		if (l2cap_rx(chan, control, skb, event))
chan             6752 net/bluetooth/l2cap_core.c 			l2cap_send_disconn_req(chan, ECONNRESET);
chan             6762 net/bluetooth/l2cap_core.c static void l2cap_chan_le_send_credits(struct l2cap_chan *chan)
chan             6764 net/bluetooth/l2cap_core.c 	struct l2cap_conn *conn = chan->conn;
chan             6768 net/bluetooth/l2cap_core.c 	return_credits = ((chan->imtu / chan->mps) + 1) - chan->rx_credits;
chan             6773 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p returning %u credits to sender", chan, return_credits);
chan             6775 net/bluetooth/l2cap_core.c 	chan->rx_credits += return_credits;
chan             6777 net/bluetooth/l2cap_core.c 	pkt.cid     = cpu_to_le16(chan->scid);
chan             6780 net/bluetooth/l2cap_core.c 	chan->ident = l2cap_get_ident(conn);
chan             6782 net/bluetooth/l2cap_core.c 	l2cap_send_cmd(conn, chan->ident, L2CAP_LE_CREDITS, sizeof(pkt), &pkt);
chan             6785 net/bluetooth/l2cap_core.c static int l2cap_le_recv(struct l2cap_chan *chan, struct sk_buff *skb)
chan             6789 net/bluetooth/l2cap_core.c 	BT_DBG("SDU reassemble complete: chan %p skb->len %u", chan, skb->len);
chan             6792 net/bluetooth/l2cap_core.c 	err = chan->ops->recv(chan, skb);
chan             6795 net/bluetooth/l2cap_core.c 	l2cap_chan_le_send_credits(chan);
chan             6800 net/bluetooth/l2cap_core.c static int l2cap_le_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
chan             6804 net/bluetooth/l2cap_core.c 	if (!chan->rx_credits) {
chan             6806 net/bluetooth/l2cap_core.c 		l2cap_send_disconn_req(chan, ECONNRESET);
chan             6810 net/bluetooth/l2cap_core.c 	if (chan->imtu < skb->len) {
chan             6815 net/bluetooth/l2cap_core.c 	chan->rx_credits--;
chan             6816 net/bluetooth/l2cap_core.c 	BT_DBG("rx_credits %u -> %u", chan->rx_credits + 1, chan->rx_credits);
chan             6821 net/bluetooth/l2cap_core.c 	if (!chan->rx_credits)
chan             6822 net/bluetooth/l2cap_core.c 		l2cap_chan_le_send_credits(chan);
chan             6826 net/bluetooth/l2cap_core.c 	if (!chan->sdu) {
chan             6833 net/bluetooth/l2cap_core.c 		       sdu_len, skb->len, chan->imtu);
chan             6835 net/bluetooth/l2cap_core.c 		if (sdu_len > chan->imtu) {
chan             6848 net/bluetooth/l2cap_core.c 			return l2cap_le_recv(chan, skb);
chan             6850 net/bluetooth/l2cap_core.c 		chan->sdu = skb;
chan             6851 net/bluetooth/l2cap_core.c 		chan->sdu_len = sdu_len;
chan             6852 net/bluetooth/l2cap_core.c 		chan->sdu_last_frag = skb;
chan             6855 net/bluetooth/l2cap_core.c 		if (skb->len + L2CAP_SDULEN_SIZE < chan->mps) {
chan             6859 net/bluetooth/l2cap_core.c 			BT_DBG("chan->mps %u -> %u", chan->mps, mps_len);
chan             6860 net/bluetooth/l2cap_core.c 			chan->mps = mps_len;
chan             6861 net/bluetooth/l2cap_core.c 			l2cap_chan_le_send_credits(chan);
chan             6868 net/bluetooth/l2cap_core.c 	       chan->sdu->len, skb->len, chan->sdu_len);
chan             6870 net/bluetooth/l2cap_core.c 	if (chan->sdu->len + skb->len > chan->sdu_len) {
chan             6876 net/bluetooth/l2cap_core.c 	append_skb_frag(chan->sdu, skb, &chan->sdu_last_frag);
chan             6879 net/bluetooth/l2cap_core.c 	if (chan->sdu->len == chan->sdu_len) {
chan             6880 net/bluetooth/l2cap_core.c 		err = l2cap_le_recv(chan, chan->sdu);
chan             6882 net/bluetooth/l2cap_core.c 			chan->sdu = NULL;
chan             6883 net/bluetooth/l2cap_core.c 			chan->sdu_last_frag = NULL;
chan             6884 net/bluetooth/l2cap_core.c 			chan->sdu_len = 0;
chan             6891 net/bluetooth/l2cap_core.c 		kfree_skb(chan->sdu);
chan             6892 net/bluetooth/l2cap_core.c 		chan->sdu = NULL;
chan             6893 net/bluetooth/l2cap_core.c 		chan->sdu_last_frag = NULL;
chan             6894 net/bluetooth/l2cap_core.c 		chan->sdu_len = 0;
chan             6907 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             6909 net/bluetooth/l2cap_core.c 	chan = l2cap_get_chan_by_scid(conn, cid);
chan             6910 net/bluetooth/l2cap_core.c 	if (!chan) {
chan             6912 net/bluetooth/l2cap_core.c 			chan = a2mp_channel_create(conn, skb);
chan             6913 net/bluetooth/l2cap_core.c 			if (!chan) {
chan             6918 net/bluetooth/l2cap_core.c 			l2cap_chan_lock(chan);
chan             6927 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, len %d", chan, skb->len);
chan             6933 net/bluetooth/l2cap_core.c 	if (chan->chan_type == L2CAP_CHAN_FIXED)
chan             6934 net/bluetooth/l2cap_core.c 		l2cap_chan_ready(chan);
chan             6936 net/bluetooth/l2cap_core.c 	if (chan->state != BT_CONNECTED)
chan             6939 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             6941 net/bluetooth/l2cap_core.c 		if (l2cap_le_data_rcv(chan, skb) < 0)
chan             6952 net/bluetooth/l2cap_core.c 		if (chan->imtu < skb->len) {
chan             6957 net/bluetooth/l2cap_core.c 		if (!chan->ops->recv(chan, skb))
chan             6963 net/bluetooth/l2cap_core.c 		l2cap_data_rcv(chan, skb);
chan             6967 net/bluetooth/l2cap_core.c 		BT_DBG("chan %p: bad mode 0x%2.2x", chan, chan->mode);
chan             6975 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             6982 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             6987 net/bluetooth/l2cap_core.c 	chan = l2cap_global_chan_by_psm(0, psm, &hcon->src, &hcon->dst,
chan             6989 net/bluetooth/l2cap_core.c 	if (!chan)
chan             6992 net/bluetooth/l2cap_core.c 	BT_DBG("chan %p, len %d", chan, skb->len);
chan             6994 net/bluetooth/l2cap_core.c 	if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
chan             6997 net/bluetooth/l2cap_core.c 	if (chan->imtu < skb->len)
chan             7004 net/bluetooth/l2cap_core.c 	if (!chan->ops->recv(chan, skb)) {
chan             7005 net/bluetooth/l2cap_core.c 		l2cap_chan_put(chan);
chan             7010 net/bluetooth/l2cap_core.c 	l2cap_chan_put(chan);
chan             7160 net/bluetooth/l2cap_core.c int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
chan             7168 net/bluetooth/l2cap_core.c 	BT_DBG("%pMR -> %pMR (type %u) psm 0x%2.2x", &chan->src, dst,
chan             7171 net/bluetooth/l2cap_core.c 	hdev = hci_get_route(dst, &chan->src, chan->src_type);
chan             7178 net/bluetooth/l2cap_core.c 	    chan->chan_type != L2CAP_CHAN_RAW) {
chan             7183 net/bluetooth/l2cap_core.c 	if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && !psm) {
chan             7188 net/bluetooth/l2cap_core.c 	if (chan->chan_type == L2CAP_CHAN_FIXED && !cid) {
chan             7193 net/bluetooth/l2cap_core.c 	switch (chan->mode) {
chan             7208 net/bluetooth/l2cap_core.c 	switch (chan->state) {
chan             7232 net/bluetooth/l2cap_core.c 	bacpy(&chan->dst, dst);
chan             7233 net/bluetooth/l2cap_core.c 	chan->dst_type = dst_type;
chan             7235 net/bluetooth/l2cap_core.c 	chan->psm = psm;
chan             7236 net/bluetooth/l2cap_core.c 	chan->dcid = cid;
chan             7248 net/bluetooth/l2cap_core.c 					      chan->sec_level,
chan             7253 net/bluetooth/l2cap_core.c 						   chan->sec_level,
chan             7257 net/bluetooth/l2cap_core.c 		u8 auth_type = l2cap_get_auth_type(chan);
chan             7258 net/bluetooth/l2cap_core.c 		hcon = hci_connect_acl(hdev, dst, chan->sec_level, auth_type);
chan             7274 net/bluetooth/l2cap_core.c 	l2cap_chan_lock(chan);
chan             7283 net/bluetooth/l2cap_core.c 	bacpy(&chan->src, &hcon->src);
chan             7284 net/bluetooth/l2cap_core.c 	chan->src_type = bdaddr_src_type(hcon);
chan             7286 net/bluetooth/l2cap_core.c 	__l2cap_chan_add(conn, chan);
chan             7291 net/bluetooth/l2cap_core.c 	l2cap_state_change(chan, BT_CONNECT);
chan             7292 net/bluetooth/l2cap_core.c 	__set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
chan             7298 net/bluetooth/l2cap_core.c 	chan->sport = 0;
chan             7302 net/bluetooth/l2cap_core.c 		if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
chan             7303 net/bluetooth/l2cap_core.c 			__clear_chan_timer(chan);
chan             7304 net/bluetooth/l2cap_core.c 			if (l2cap_chan_check_security(chan, true))
chan             7305 net/bluetooth/l2cap_core.c 				l2cap_state_change(chan, BT_CONNECTED);
chan             7307 net/bluetooth/l2cap_core.c 			l2cap_do_start(chan);
chan             7313 net/bluetooth/l2cap_core.c 	l2cap_chan_unlock(chan);
chan             7423 net/bluetooth/l2cap_core.c 		struct l2cap_chan *chan, *next;
chan             7430 net/bluetooth/l2cap_core.c 		chan = pchan->ops->new_connection(pchan);
chan             7431 net/bluetooth/l2cap_core.c 		if (chan) {
chan             7432 net/bluetooth/l2cap_core.c 			bacpy(&chan->src, &hcon->src);
chan             7433 net/bluetooth/l2cap_core.c 			bacpy(&chan->dst, &hcon->dst);
chan             7434 net/bluetooth/l2cap_core.c 			chan->src_type = bdaddr_src_type(hcon);
chan             7435 net/bluetooth/l2cap_core.c 			chan->dst_type = dst_type;
chan             7437 net/bluetooth/l2cap_core.c 			__l2cap_chan_add(conn, chan);
chan             7471 net/bluetooth/l2cap_core.c static inline void l2cap_check_encryption(struct l2cap_chan *chan, u8 encrypt)
chan             7473 net/bluetooth/l2cap_core.c 	if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED)
chan             7477 net/bluetooth/l2cap_core.c 		if (chan->sec_level == BT_SECURITY_MEDIUM) {
chan             7478 net/bluetooth/l2cap_core.c 			__set_chan_timer(chan, L2CAP_ENC_TIMEOUT);
chan             7479 net/bluetooth/l2cap_core.c 		} else if (chan->sec_level == BT_SECURITY_HIGH ||
chan             7480 net/bluetooth/l2cap_core.c 			   chan->sec_level == BT_SECURITY_FIPS)
chan             7481 net/bluetooth/l2cap_core.c 			l2cap_chan_close(chan, ECONNREFUSED);
chan             7483 net/bluetooth/l2cap_core.c 		if (chan->sec_level == BT_SECURITY_MEDIUM)
chan             7484 net/bluetooth/l2cap_core.c 			__clear_chan_timer(chan);
chan             7491 net/bluetooth/l2cap_core.c 	struct l2cap_chan *chan;
chan             7500 net/bluetooth/l2cap_core.c 	list_for_each_entry(chan, &conn->chan_l, list) {
chan             7501 net/bluetooth/l2cap_core.c 		l2cap_chan_lock(chan);
chan             7503 net/bluetooth/l2cap_core.c 		BT_DBG("chan %p scid 0x%4.4x state %s", chan, chan->scid,
chan             7504 net/bluetooth/l2cap_core.c 		       state_to_string(chan->state));
chan             7506 net/bluetooth/l2cap_core.c 		if (chan->scid == L2CAP_CID_A2MP) {
chan             7507 net/bluetooth/l2cap_core.c 			l2cap_chan_unlock(chan);
chan             7512 net/bluetooth/l2cap_core.c 			chan->sec_level = hcon->sec_level;
chan             7514 net/bluetooth/l2cap_core.c 		if (!__l2cap_no_conn_pending(chan)) {
chan             7515 net/bluetooth/l2cap_core.c 			l2cap_chan_unlock(chan);
chan             7519 net/bluetooth/l2cap_core.c 		if (!status && (chan->state == BT_CONNECTED ||
chan             7520 net/bluetooth/l2cap_core.c 				chan->state == BT_CONFIG)) {
chan             7521 net/bluetooth/l2cap_core.c 			chan->ops->resume(chan);
chan             7522 net/bluetooth/l2cap_core.c 			l2cap_check_encryption(chan, encrypt);
chan             7523 net/bluetooth/l2cap_core.c 			l2cap_chan_unlock(chan);
chan             7527 net/bluetooth/l2cap_core.c 		if (chan->state == BT_CONNECT) {
chan             7529 net/bluetooth/l2cap_core.c 				l2cap_start_connection(chan);
chan             7531 net/bluetooth/l2cap_core.c 				__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
chan             7532 net/bluetooth/l2cap_core.c 		} else if (chan->state == BT_CONNECT2 &&
chan             7533 net/bluetooth/l2cap_core.c 			   chan->mode != L2CAP_MODE_LE_FLOWCTL) {
chan             7538 net/bluetooth/l2cap_core.c 				if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
chan             7541 net/bluetooth/l2cap_core.c 					chan->ops->defer(chan);
chan             7543 net/bluetooth/l2cap_core.c 					l2cap_state_change(chan, BT_CONFIG);
chan             7548 net/bluetooth/l2cap_core.c 				l2cap_state_change(chan, BT_DISCONN);
chan             7549 net/bluetooth/l2cap_core.c 				__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
chan             7554 net/bluetooth/l2cap_core.c 			rsp.scid   = cpu_to_le16(chan->dcid);
chan             7555 net/bluetooth/l2cap_core.c 			rsp.dcid   = cpu_to_le16(chan->scid);
chan             7558 net/bluetooth/l2cap_core.c 			l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_RSP,
chan             7561 net/bluetooth/l2cap_core.c 			if (!test_bit(CONF_REQ_SENT, &chan->conf_state) &&
chan             7564 net/bluetooth/l2cap_core.c 				set_bit(CONF_REQ_SENT, &chan->conf_state);
chan             7567 net/bluetooth/l2cap_core.c 					       l2cap_build_conf_req(chan, buf, sizeof(buf)),
chan             7569 net/bluetooth/l2cap_core.c 				chan->num_conf_req++;
chan             7573 net/bluetooth/l2cap_core.c 		l2cap_chan_unlock(chan);
chan               84 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              130 net/bluetooth/l2cap_sock.c 	bacpy(&chan->src, &la.l2_bdaddr);
chan              131 net/bluetooth/l2cap_sock.c 	chan->src_type = la.l2_bdaddr_type;
chan              134 net/bluetooth/l2cap_sock.c 		err = l2cap_add_scid(chan, __le16_to_cpu(la.l2_cid));
chan              136 net/bluetooth/l2cap_sock.c 		err = l2cap_add_psm(chan, &la.l2_bdaddr, la.l2_psm);
chan              141 net/bluetooth/l2cap_sock.c 	switch (chan->chan_type) {
chan              144 net/bluetooth/l2cap_sock.c 			chan->sec_level = BT_SECURITY_SDP;
chan              149 net/bluetooth/l2cap_sock.c 			chan->sec_level = BT_SECURITY_SDP;
chan              152 net/bluetooth/l2cap_sock.c 		chan->sec_level = BT_SECURITY_SDP;
chan              160 net/bluetooth/l2cap_sock.c 		set_bit(FLAG_HOLD_HCI_CONN, &chan->flags);
chan              164 net/bluetooth/l2cap_sock.c 	if (chan->psm && bdaddr_type_is_le(chan->src_type))
chan              165 net/bluetooth/l2cap_sock.c 		chan->mode = L2CAP_MODE_LE_FLOWCTL;
chan              167 net/bluetooth/l2cap_sock.c 	chan->state = BT_BOUND;
chan              179 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              204 net/bluetooth/l2cap_sock.c 	if (chan->src_type == BDADDR_BREDR && bacmp(&chan->src, BDADDR_ANY) &&
chan              212 net/bluetooth/l2cap_sock.c 		if (chan->scid != L2CAP_CID_ATT ||
chan              222 net/bluetooth/l2cap_sock.c 		chan->src_type = BDADDR_LE_PUBLIC;
chan              225 net/bluetooth/l2cap_sock.c 	if (chan->src_type != BDADDR_BREDR && la.l2_bdaddr_type == BDADDR_BREDR)
chan              235 net/bluetooth/l2cap_sock.c 	if (chan->psm && bdaddr_type_is_le(chan->src_type))
chan              236 net/bluetooth/l2cap_sock.c 		chan->mode = L2CAP_MODE_LE_FLOWCTL;
chan              238 net/bluetooth/l2cap_sock.c 	err = l2cap_chan_connect(chan, la.l2_psm, __le16_to_cpu(la.l2_cid),
chan              256 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              273 net/bluetooth/l2cap_sock.c 	switch (chan->mode) {
chan              294 net/bluetooth/l2cap_sock.c 	atomic_set(&chan->nesting, L2CAP_NESTING_PARENT);
chan              296 net/bluetooth/l2cap_sock.c 	chan->state = BT_LISTEN;
chan              365 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              377 net/bluetooth/l2cap_sock.c 	la->l2_psm = chan->psm;
chan              380 net/bluetooth/l2cap_sock.c 		bacpy(&la->l2_bdaddr, &chan->dst);
chan              381 net/bluetooth/l2cap_sock.c 		la->l2_cid = cpu_to_le16(chan->dcid);
chan              382 net/bluetooth/l2cap_sock.c 		la->l2_bdaddr_type = chan->dst_type;
chan              384 net/bluetooth/l2cap_sock.c 		bacpy(&la->l2_bdaddr, &chan->src);
chan              385 net/bluetooth/l2cap_sock.c 		la->l2_cid = cpu_to_le16(chan->scid);
chan              386 net/bluetooth/l2cap_sock.c 		la->l2_bdaddr_type = chan->src_type;
chan              396 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              415 net/bluetooth/l2cap_sock.c 		if (bdaddr_type_is_le(chan->src_type) &&
chan              416 net/bluetooth/l2cap_sock.c 		    chan->scid != L2CAP_CID_ATT) {
chan              422 net/bluetooth/l2cap_sock.c 		opts.imtu     = chan->imtu;
chan              423 net/bluetooth/l2cap_sock.c 		opts.omtu     = chan->omtu;
chan              424 net/bluetooth/l2cap_sock.c 		opts.flush_to = chan->flush_to;
chan              425 net/bluetooth/l2cap_sock.c 		opts.mode     = chan->mode;
chan              426 net/bluetooth/l2cap_sock.c 		opts.fcs      = chan->fcs;
chan              427 net/bluetooth/l2cap_sock.c 		opts.max_tx   = chan->max_tx;
chan              428 net/bluetooth/l2cap_sock.c 		opts.txwin_size = chan->tx_win;
chan              437 net/bluetooth/l2cap_sock.c 		switch (chan->sec_level) {
chan              457 net/bluetooth/l2cap_sock.c 		if (test_bit(FLAG_ROLE_SWITCH, &chan->flags))
chan              460 net/bluetooth/l2cap_sock.c 		if (test_bit(FLAG_FORCE_RELIABLE, &chan->flags))
chan              477 net/bluetooth/l2cap_sock.c 		cinfo.hci_handle = chan->conn->hcon->handle;
chan              478 net/bluetooth/l2cap_sock.c 		memcpy(cinfo.dev_class, chan->conn->hcon->dev_class, 3);
chan              499 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              519 net/bluetooth/l2cap_sock.c 		if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED &&
chan              520 net/bluetooth/l2cap_sock.c 		    chan->chan_type != L2CAP_CHAN_FIXED &&
chan              521 net/bluetooth/l2cap_sock.c 		    chan->chan_type != L2CAP_CHAN_RAW) {
chan              527 net/bluetooth/l2cap_sock.c 		if (chan->conn) {
chan              528 net/bluetooth/l2cap_sock.c 			sec.level = chan->conn->hcon->sec_level;
chan              531 net/bluetooth/l2cap_sock.c 				sec.key_size = chan->conn->hcon->enc_key_size;
chan              533 net/bluetooth/l2cap_sock.c 			sec.level = chan->sec_level;
chan              555 net/bluetooth/l2cap_sock.c 		if (put_user(test_bit(FLAG_FLUSHABLE, &chan->flags),
chan              568 net/bluetooth/l2cap_sock.c 		pwr.force_active = test_bit(FLAG_FORCE_ACTIVE, &chan->flags);
chan              577 net/bluetooth/l2cap_sock.c 		if (put_user(chan->chan_policy, (u32 __user *) optval))
chan              582 net/bluetooth/l2cap_sock.c 		if (!bdaddr_type_is_le(chan->src_type)) {
chan              592 net/bluetooth/l2cap_sock.c 		if (put_user(chan->omtu, (u16 __user *) optval))
chan              597 net/bluetooth/l2cap_sock.c 		if (!bdaddr_type_is_le(chan->src_type)) {
chan              602 net/bluetooth/l2cap_sock.c 		if (put_user(chan->imtu, (u16 __user *) optval))
chan              615 net/bluetooth/l2cap_sock.c static bool l2cap_valid_mtu(struct l2cap_chan *chan, u16 mtu)
chan              617 net/bluetooth/l2cap_sock.c 	switch (chan->scid) {
chan              635 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              646 net/bluetooth/l2cap_sock.c 		if (bdaddr_type_is_le(chan->src_type)) {
chan              656 net/bluetooth/l2cap_sock.c 		opts.imtu     = chan->imtu;
chan              657 net/bluetooth/l2cap_sock.c 		opts.omtu     = chan->omtu;
chan              658 net/bluetooth/l2cap_sock.c 		opts.flush_to = chan->flush_to;
chan              659 net/bluetooth/l2cap_sock.c 		opts.mode     = chan->mode;
chan              660 net/bluetooth/l2cap_sock.c 		opts.fcs      = chan->fcs;
chan              661 net/bluetooth/l2cap_sock.c 		opts.max_tx   = chan->max_tx;
chan              662 net/bluetooth/l2cap_sock.c 		opts.txwin_size = chan->tx_win;
chan              675 net/bluetooth/l2cap_sock.c 		if (!l2cap_valid_mtu(chan, opts.imtu)) {
chan              680 net/bluetooth/l2cap_sock.c 		chan->mode = opts.mode;
chan              681 net/bluetooth/l2cap_sock.c 		switch (chan->mode) {
chan              685 net/bluetooth/l2cap_sock.c 			clear_bit(CONF_STATE2_DEVICE, &chan->conf_state);
chan              697 net/bluetooth/l2cap_sock.c 		chan->imtu = opts.imtu;
chan              698 net/bluetooth/l2cap_sock.c 		chan->omtu = opts.omtu;
chan              699 net/bluetooth/l2cap_sock.c 		chan->fcs  = opts.fcs;
chan              700 net/bluetooth/l2cap_sock.c 		chan->max_tx = opts.max_tx;
chan              701 net/bluetooth/l2cap_sock.c 		chan->tx_win = opts.txwin_size;
chan              702 net/bluetooth/l2cap_sock.c 		chan->flush_to = opts.flush_to;
chan              717 net/bluetooth/l2cap_sock.c 			chan->sec_level = BT_SECURITY_LOW;
chan              719 net/bluetooth/l2cap_sock.c 			chan->sec_level = BT_SECURITY_MEDIUM;
chan              721 net/bluetooth/l2cap_sock.c 			chan->sec_level = BT_SECURITY_HIGH;
chan              724 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_ROLE_SWITCH, &chan->flags);
chan              726 net/bluetooth/l2cap_sock.c 			clear_bit(FLAG_ROLE_SWITCH, &chan->flags);
chan              729 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_FORCE_RELIABLE, &chan->flags);
chan              731 net/bluetooth/l2cap_sock.c 			clear_bit(FLAG_FORCE_RELIABLE, &chan->flags);
chan              747 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              766 net/bluetooth/l2cap_sock.c 		if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED &&
chan              767 net/bluetooth/l2cap_sock.c 		    chan->chan_type != L2CAP_CHAN_FIXED &&
chan              768 net/bluetooth/l2cap_sock.c 		    chan->chan_type != L2CAP_CHAN_RAW) {
chan              787 net/bluetooth/l2cap_sock.c 		chan->sec_level = sec.level;
chan              789 net/bluetooth/l2cap_sock.c 		if (!chan->conn)
chan              792 net/bluetooth/l2cap_sock.c 		conn = chan->conn;
chan              795 net/bluetooth/l2cap_sock.c 		if (chan->scid == L2CAP_CID_ATT) {
chan              801 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_PENDING_SECURITY, &chan->flags);
chan              803 net/bluetooth/l2cap_sock.c 			chan->state = BT_CONFIG;
chan              809 net/bluetooth/l2cap_sock.c 			if (!l2cap_chan_check_security(chan, true))
chan              831 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_DEFER_SETUP, &chan->flags);
chan              834 net/bluetooth/l2cap_sock.c 			clear_bit(FLAG_DEFER_SETUP, &chan->flags);
chan              850 net/bluetooth/l2cap_sock.c 			conn = chan->conn;
chan              860 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_FLUSHABLE, &chan->flags);
chan              862 net/bluetooth/l2cap_sock.c 			clear_bit(FLAG_FLUSHABLE, &chan->flags);
chan              866 net/bluetooth/l2cap_sock.c 		if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED &&
chan              867 net/bluetooth/l2cap_sock.c 		    chan->chan_type != L2CAP_CHAN_RAW) {
chan              881 net/bluetooth/l2cap_sock.c 			set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
chan              883 net/bluetooth/l2cap_sock.c 			clear_bit(FLAG_FORCE_ACTIVE, &chan->flags);
chan              897 net/bluetooth/l2cap_sock.c 		if (chan->mode != L2CAP_MODE_ERTM &&
chan              898 net/bluetooth/l2cap_sock.c 		    chan->mode != L2CAP_MODE_STREAMING) {
chan              903 net/bluetooth/l2cap_sock.c 		chan->chan_policy = (u8) opt;
chan              906 net/bluetooth/l2cap_sock.c 		    chan->move_role == L2CAP_MOVE_ROLE_NONE)
chan              907 net/bluetooth/l2cap_sock.c 			l2cap_move_start(chan);
chan              912 net/bluetooth/l2cap_sock.c 		if (!bdaddr_type_is_le(chan->src_type)) {
chan              924 net/bluetooth/l2cap_sock.c 		if (!bdaddr_type_is_le(chan->src_type)) {
chan              939 net/bluetooth/l2cap_sock.c 		chan->imtu = opt;
chan              955 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan              976 net/bluetooth/l2cap_sock.c 	l2cap_chan_lock(chan);
chan              977 net/bluetooth/l2cap_sock.c 	err = l2cap_chan_send(chan, msg, len);
chan              978 net/bluetooth/l2cap_sock.c 	l2cap_chan_unlock(chan);
chan              994 net/bluetooth/l2cap_sock.c 		if (bdaddr_type_is_le(pi->chan->src_type)) {
chan              996 net/bluetooth/l2cap_sock.c 			pi->chan->state = BT_CONNECTED;
chan              997 net/bluetooth/l2cap_sock.c 			__l2cap_le_connect_rsp_defer(pi->chan);
chan             1000 net/bluetooth/l2cap_sock.c 			pi->chan->state = BT_CONFIG;
chan             1001 net/bluetooth/l2cap_sock.c 			__l2cap_connect_rsp_defer(pi->chan);
chan             1015 net/bluetooth/l2cap_sock.c 	if (pi->chan->mode != L2CAP_MODE_ERTM)
chan             1022 net/bluetooth/l2cap_sock.c 	if (!test_bit(CONN_LOCAL_BUSY, &pi->chan->conn_state))
chan             1037 net/bluetooth/l2cap_sock.c 		l2cap_chan_busy(pi->chan, 0);
chan             1056 net/bluetooth/l2cap_sock.c 	l2cap_chan_put(l2cap_pi(sk)->chan);
chan             1061 net/bluetooth/l2cap_sock.c static int __l2cap_wait_ack(struct sock *sk, struct l2cap_chan *chan)
chan             1073 net/bluetooth/l2cap_sock.c 		       chan->unacked_frames, time_after(jiffies, timeout) ? 0 :
chan             1098 net/bluetooth/l2cap_sock.c 	} while (chan->unacked_frames > 0 &&
chan             1099 net/bluetooth/l2cap_sock.c 		 chan->state == BT_CONNECTED);
chan             1109 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan;
chan             1128 net/bluetooth/l2cap_sock.c 	chan = l2cap_pi(sk)->chan;
chan             1130 net/bluetooth/l2cap_sock.c 	l2cap_chan_hold(chan);
chan             1132 net/bluetooth/l2cap_sock.c 	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
chan             1134 net/bluetooth/l2cap_sock.c 	if (chan->mode == L2CAP_MODE_ERTM &&
chan             1135 net/bluetooth/l2cap_sock.c 	    chan->unacked_frames > 0 &&
chan             1136 net/bluetooth/l2cap_sock.c 	    chan->state == BT_CONNECTED) {
chan             1137 net/bluetooth/l2cap_sock.c 		err = __l2cap_wait_ack(sk, chan);
chan             1150 net/bluetooth/l2cap_sock.c 	l2cap_chan_lock(chan);
chan             1151 net/bluetooth/l2cap_sock.c 	conn = chan->conn;
chan             1155 net/bluetooth/l2cap_sock.c 	l2cap_chan_unlock(chan);
chan             1161 net/bluetooth/l2cap_sock.c 	l2cap_chan_lock(chan);
chan             1162 net/bluetooth/l2cap_sock.c 	l2cap_chan_close(chan, 0);
chan             1163 net/bluetooth/l2cap_sock.c 	l2cap_chan_unlock(chan);
chan             1178 net/bluetooth/l2cap_sock.c 	l2cap_chan_put(chan);
chan             1220 net/bluetooth/l2cap_sock.c 		struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan             1222 net/bluetooth/l2cap_sock.c 		BT_DBG("child chan %p state %s", chan,
chan             1223 net/bluetooth/l2cap_sock.c 		       state_to_string(chan->state));
chan             1225 net/bluetooth/l2cap_sock.c 		l2cap_chan_lock(chan);
chan             1226 net/bluetooth/l2cap_sock.c 		__clear_chan_timer(chan);
chan             1227 net/bluetooth/l2cap_sock.c 		l2cap_chan_close(chan, ECONNRESET);
chan             1228 net/bluetooth/l2cap_sock.c 		l2cap_chan_unlock(chan);
chan             1234 net/bluetooth/l2cap_sock.c static struct l2cap_chan *l2cap_sock_new_connection_cb(struct l2cap_chan *chan)
chan             1236 net/bluetooth/l2cap_sock.c 	struct sock *sk, *parent = chan->data;
chan             1262 net/bluetooth/l2cap_sock.c 	return l2cap_pi(sk)->chan;
chan             1265 net/bluetooth/l2cap_sock.c static int l2cap_sock_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
chan             1267 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1277 net/bluetooth/l2cap_sock.c 	if (chan->mode != L2CAP_MODE_ERTM &&
chan             1278 net/bluetooth/l2cap_sock.c 	    chan->mode != L2CAP_MODE_STREAMING) {
chan             1298 net/bluetooth/l2cap_sock.c 	if (err < 0 && chan->mode == L2CAP_MODE_ERTM) {
chan             1300 net/bluetooth/l2cap_sock.c 		l2cap_chan_busy(chan, 1);
chan             1310 net/bluetooth/l2cap_sock.c static void l2cap_sock_close_cb(struct l2cap_chan *chan)
chan             1312 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1317 net/bluetooth/l2cap_sock.c static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err)
chan             1319 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1322 net/bluetooth/l2cap_sock.c 	BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
chan             1331 net/bluetooth/l2cap_sock.c 	lock_sock_nested(sk, atomic_read(&chan->nesting));
chan             1337 net/bluetooth/l2cap_sock.c 	switch (chan->state) {
chan             1345 net/bluetooth/l2cap_sock.c 		chan->state = BT_CLOSED;
chan             1350 net/bluetooth/l2cap_sock.c 		chan->state = BT_CLOSED;
chan             1367 net/bluetooth/l2cap_sock.c static void l2cap_sock_state_change_cb(struct l2cap_chan *chan, int state,
chan             1370 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1378 net/bluetooth/l2cap_sock.c static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
chan             1382 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1386 net/bluetooth/l2cap_sock.c 	l2cap_chan_unlock(chan);
chan             1388 net/bluetooth/l2cap_sock.c 	l2cap_chan_lock(chan);
chan             1395 net/bluetooth/l2cap_sock.c 	bt_cb(skb)->l2cap.chan = chan;
chan             1400 net/bluetooth/l2cap_sock.c static void l2cap_sock_ready_cb(struct l2cap_chan *chan)
chan             1402 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1420 net/bluetooth/l2cap_sock.c static void l2cap_sock_defer_cb(struct l2cap_chan *chan)
chan             1422 net/bluetooth/l2cap_sock.c 	struct sock *parent, *sk = chan->data;
chan             1433 net/bluetooth/l2cap_sock.c static void l2cap_sock_resume_cb(struct l2cap_chan *chan)
chan             1435 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1437 net/bluetooth/l2cap_sock.c 	if (test_and_clear_bit(FLAG_PENDING_SECURITY, &chan->flags)) {
chan             1439 net/bluetooth/l2cap_sock.c 		chan->state = BT_CONNECTED;
chan             1446 net/bluetooth/l2cap_sock.c static void l2cap_sock_set_shutdown_cb(struct l2cap_chan *chan)
chan             1448 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1455 net/bluetooth/l2cap_sock.c static long l2cap_sock_get_sndtimeo_cb(struct l2cap_chan *chan)
chan             1457 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1462 net/bluetooth/l2cap_sock.c static void l2cap_sock_suspend_cb(struct l2cap_chan *chan)
chan             1464 net/bluetooth/l2cap_sock.c 	struct sock *sk = chan->data;
chan             1490 net/bluetooth/l2cap_sock.c 	if (l2cap_pi(sk)->chan)
chan             1491 net/bluetooth/l2cap_sock.c 		l2cap_chan_put(l2cap_pi(sk)->chan);
chan             1517 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan = l2cap_pi(sk)->chan;
chan             1522 net/bluetooth/l2cap_sock.c 		struct l2cap_chan *pchan = l2cap_pi(parent)->chan;
chan             1527 net/bluetooth/l2cap_sock.c 		chan->chan_type = pchan->chan_type;
chan             1528 net/bluetooth/l2cap_sock.c 		chan->imtu = pchan->imtu;
chan             1529 net/bluetooth/l2cap_sock.c 		chan->omtu = pchan->omtu;
chan             1530 net/bluetooth/l2cap_sock.c 		chan->conf_state = pchan->conf_state;
chan             1531 net/bluetooth/l2cap_sock.c 		chan->mode = pchan->mode;
chan             1532 net/bluetooth/l2cap_sock.c 		chan->fcs  = pchan->fcs;
chan             1533 net/bluetooth/l2cap_sock.c 		chan->max_tx = pchan->max_tx;
chan             1534 net/bluetooth/l2cap_sock.c 		chan->tx_win = pchan->tx_win;
chan             1535 net/bluetooth/l2cap_sock.c 		chan->tx_win_max = pchan->tx_win_max;
chan             1536 net/bluetooth/l2cap_sock.c 		chan->sec_level = pchan->sec_level;
chan             1537 net/bluetooth/l2cap_sock.c 		chan->flags = pchan->flags;
chan             1538 net/bluetooth/l2cap_sock.c 		chan->tx_credits = pchan->tx_credits;
chan             1539 net/bluetooth/l2cap_sock.c 		chan->rx_credits = pchan->rx_credits;
chan             1541 net/bluetooth/l2cap_sock.c 		if (chan->chan_type == L2CAP_CHAN_FIXED) {
chan             1542 net/bluetooth/l2cap_sock.c 			chan->scid = pchan->scid;
chan             1543 net/bluetooth/l2cap_sock.c 			chan->dcid = pchan->scid;
chan             1550 net/bluetooth/l2cap_sock.c 			chan->chan_type = L2CAP_CHAN_RAW;
chan             1553 net/bluetooth/l2cap_sock.c 			chan->chan_type = L2CAP_CHAN_CONN_LESS;
chan             1558 net/bluetooth/l2cap_sock.c 			chan->chan_type = L2CAP_CHAN_CONN_ORIENTED;
chan             1562 net/bluetooth/l2cap_sock.c 		chan->imtu = L2CAP_DEFAULT_MTU;
chan             1563 net/bluetooth/l2cap_sock.c 		chan->omtu = 0;
chan             1565 net/bluetooth/l2cap_sock.c 			chan->mode = L2CAP_MODE_ERTM;
chan             1566 net/bluetooth/l2cap_sock.c 			set_bit(CONF_STATE2_DEVICE, &chan->conf_state);
chan             1568 net/bluetooth/l2cap_sock.c 			chan->mode = L2CAP_MODE_BASIC;
chan             1571 net/bluetooth/l2cap_sock.c 		l2cap_chan_set_defaults(chan);
chan             1575 net/bluetooth/l2cap_sock.c 	chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
chan             1577 net/bluetooth/l2cap_sock.c 	chan->data = sk;
chan             1578 net/bluetooth/l2cap_sock.c 	chan->ops = &l2cap_chan_ops;
chan             1591 net/bluetooth/l2cap_sock.c 	struct l2cap_chan *chan;
chan             1608 net/bluetooth/l2cap_sock.c 	chan = l2cap_chan_create();
chan             1609 net/bluetooth/l2cap_sock.c 	if (!chan) {
chan             1614 net/bluetooth/l2cap_sock.c 	l2cap_chan_hold(chan);
chan             1616 net/bluetooth/l2cap_sock.c 	l2cap_pi(sk)->chan = chan;
chan             7939 net/bluetooth/mgmt.c static struct hci_mgmt_chan chan = {
chan             7948 net/bluetooth/mgmt.c 	return hci_mgmt_chan_register(&chan);
chan             7953 net/bluetooth/mgmt.c 	hci_mgmt_chan_unregister(&chan);
chan              215 net/bluetooth/rfcomm/core.c 	struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
chan              697 net/bluetooth/rfcomm/core.c 	struct l2cap_chan *chan;
chan              699 net/bluetooth/rfcomm/core.c 		chan = l2cap_pi(s->sock->sk)->chan;
chan              701 net/bluetooth/rfcomm/core.c 		if ((!bacmp(src, BDADDR_ANY) || !bacmp(&chan->src, src)) &&
chan              702 net/bluetooth/rfcomm/core.c 		    !bacmp(&chan->dst, dst))
chan              755 net/bluetooth/rfcomm/core.c 	l2cap_pi(sk)->chan->imtu = l2cap_mtu;
chan              756 net/bluetooth/rfcomm/core.c 	l2cap_pi(sk)->chan->sec_level = sec_level;
chan              758 net/bluetooth/rfcomm/core.c 		l2cap_pi(sk)->chan->mode = L2CAP_MODE_ERTM;
chan              787 net/bluetooth/rfcomm/core.c 	struct l2cap_chan *chan = l2cap_pi(s->sock->sk)->chan;
chan              789 net/bluetooth/rfcomm/core.c 		bacpy(src, &chan->src);
chan              791 net/bluetooth/rfcomm/core.c 		bacpy(dst, &chan->dst);
chan             1286 net/bluetooth/rfcomm/core.c 	struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
chan             1946 net/bluetooth/rfcomm/core.c 		s->mtu = min(l2cap_pi(nsock->sk)->chan->omtu,
chan             1947 net/bluetooth/rfcomm/core.c 				l2cap_pi(nsock->sk)->chan->imtu) - 5;
chan             1966 net/bluetooth/rfcomm/core.c 		s->mtu = min(l2cap_pi(sk)->chan->omtu, l2cap_pi(sk)->chan->imtu) - 5;
chan             2042 net/bluetooth/rfcomm/core.c 	l2cap_pi(sk)->chan->imtu = l2cap_mtu;
chan             2155 net/bluetooth/rfcomm/core.c 		struct l2cap_chan *chan = l2cap_pi(s->sock->sk)->chan;
chan             2159 net/bluetooth/rfcomm/core.c 				   &chan->src, &chan->dst,
chan              813 net/bluetooth/rfcomm/sock.c 		conn = l2cap_pi(l2cap_sk)->chan->conn;
chan              504 net/bluetooth/smp.c 	struct l2cap_chan *chan = hdev->smp_data;
chan              509 net/bluetooth/smp.c 	if (!chan || !chan->data)
chan              512 net/bluetooth/smp.c 	smp = chan->data;
chan              525 net/bluetooth/smp.c 	struct l2cap_chan *chan = hdev->smp_data;
chan              529 net/bluetooth/smp.c 	if (!chan || !chan->data)
chan              532 net/bluetooth/smp.c 	smp = chan->data;
chan              550 net/bluetooth/smp.c 	struct l2cap_chan *chan = hdev->smp_data;
chan              554 net/bluetooth/smp.c 	if (!chan || !chan->data)
chan              557 net/bluetooth/smp.c 	smp = chan->data;
chan              601 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              606 net/bluetooth/smp.c 	if (!chan)
chan              621 net/bluetooth/smp.c 	l2cap_chan_send(chan, &msg, 1 + len);
chan              623 net/bluetooth/smp.c 	if (!chan->data)
chan              626 net/bluetooth/smp.c 	smp = chan->data;
chan              661 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              662 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan              735 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              737 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan              750 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              751 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan              797 net/bluetooth/smp.c 	chan->data = NULL;
chan              805 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              813 net/bluetooth/smp.c 	if (chan->data)
chan              860 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan              861 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             1035 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             1036 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             1376 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             1396 net/bluetooth/smp.c 	chan->data = smp;
chan             1623 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             1633 net/bluetooth/smp.c 	chan = conn->smp;
chan             1634 net/bluetooth/smp.c 	if (!chan)
chan             1637 net/bluetooth/smp.c 	l2cap_chan_lock(chan);
chan             1638 net/bluetooth/smp.c 	if (!chan->data) {
chan             1643 net/bluetooth/smp.c 	smp = chan->data;
chan             1681 net/bluetooth/smp.c 	l2cap_chan_unlock(chan);
chan             1730 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             1744 net/bluetooth/smp.c 	if (!chan->data)
chan             1747 net/bluetooth/smp.c 		smp = chan->data;
chan             1872 net/bluetooth/smp.c 		struct l2cap_chan *chan = hdev->smp_data;
chan             1875 net/bluetooth/smp.c 		if (!chan || !chan->data)
chan             1878 net/bluetooth/smp.c 		smp_dev = chan->data;
chan             1921 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             1922 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2079 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2080 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2121 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2122 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2321 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             2345 net/bluetooth/smp.c 	chan = conn->smp;
chan             2346 net/bluetooth/smp.c 	if (!chan) {
chan             2351 net/bluetooth/smp.c 	l2cap_chan_lock(chan);
chan             2354 net/bluetooth/smp.c 	if (chan->data) {
chan             2400 net/bluetooth/smp.c 	l2cap_chan_unlock(chan);
chan             2409 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             2424 net/bluetooth/smp.c 	chan = conn->smp;
chan             2425 net/bluetooth/smp.c 	if (!chan)
chan             2428 net/bluetooth/smp.c 	l2cap_chan_lock(chan);
chan             2430 net/bluetooth/smp.c 	smp = chan->data;
chan             2445 net/bluetooth/smp.c 	l2cap_chan_unlock(chan);
chan             2454 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2455 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2474 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2475 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2510 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2511 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2531 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2532 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2599 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2600 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2676 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2677 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2806 net/bluetooth/smp.c 	struct l2cap_chan *chan = conn->smp;
chan             2808 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             2878 net/bluetooth/smp.c static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
chan             2880 net/bluetooth/smp.c 	struct l2cap_conn *conn = chan->conn;
chan             2897 net/bluetooth/smp.c 	smp = chan->data;
chan             2991 net/bluetooth/smp.c static void smp_teardown_cb(struct l2cap_chan *chan, int err)
chan             2993 net/bluetooth/smp.c 	struct l2cap_conn *conn = chan->conn;
chan             2995 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             2997 net/bluetooth/smp.c 	if (chan->data)
chan             3001 net/bluetooth/smp.c 	l2cap_chan_put(chan);
chan             3004 net/bluetooth/smp.c static void bredr_pairing(struct l2cap_chan *chan)
chan             3006 net/bluetooth/smp.c 	struct l2cap_conn *conn = chan->conn;
chan             3012 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             3048 net/bluetooth/smp.c 	if (chan->data)
chan             3071 net/bluetooth/smp.c static void smp_resume_cb(struct l2cap_chan *chan)
chan             3073 net/bluetooth/smp.c 	struct smp_chan *smp = chan->data;
chan             3074 net/bluetooth/smp.c 	struct l2cap_conn *conn = chan->conn;
chan             3077 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             3080 net/bluetooth/smp.c 		bredr_pairing(chan);
chan             3095 net/bluetooth/smp.c static void smp_ready_cb(struct l2cap_chan *chan)
chan             3097 net/bluetooth/smp.c 	struct l2cap_conn *conn = chan->conn;
chan             3100 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             3108 net/bluetooth/smp.c 	conn->smp = chan;
chan             3111 net/bluetooth/smp.c 		bredr_pairing(chan);
chan             3114 net/bluetooth/smp.c static int smp_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb)
chan             3118 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             3120 net/bluetooth/smp.c 	err = smp_sig_channel(chan, skb);
chan             3122 net/bluetooth/smp.c 		struct smp_chan *smp = chan->data;
chan             3127 net/bluetooth/smp.c 		hci_disconnect(chan->conn->hcon, HCI_ERROR_AUTH_FAILURE);
chan             3133 net/bluetooth/smp.c static struct sk_buff *smp_alloc_skb_cb(struct l2cap_chan *chan,
chan             3144 net/bluetooth/smp.c 	bt_cb(skb)->l2cap.chan = chan;
chan             3168 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             3172 net/bluetooth/smp.c 	chan = l2cap_chan_create();
chan             3173 net/bluetooth/smp.c 	if (!chan)
chan             3176 net/bluetooth/smp.c 	chan->chan_type	= pchan->chan_type;
chan             3177 net/bluetooth/smp.c 	chan->ops	= &smp_chan_ops;
chan             3178 net/bluetooth/smp.c 	chan->scid	= pchan->scid;
chan             3179 net/bluetooth/smp.c 	chan->dcid	= chan->scid;
chan             3180 net/bluetooth/smp.c 	chan->imtu	= pchan->imtu;
chan             3181 net/bluetooth/smp.c 	chan->omtu	= pchan->omtu;
chan             3182 net/bluetooth/smp.c 	chan->mode	= pchan->mode;
chan             3189 net/bluetooth/smp.c 	atomic_set(&chan->nesting, L2CAP_NESTING_SMP);
chan             3191 net/bluetooth/smp.c 	BT_DBG("created chan %p", chan);
chan             3193 net/bluetooth/smp.c 	return chan;
chan             3216 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             3250 net/bluetooth/smp.c 	chan = l2cap_chan_create();
chan             3251 net/bluetooth/smp.c 	if (!chan) {
chan             3260 net/bluetooth/smp.c 	chan->data = smp;
chan             3262 net/bluetooth/smp.c 	l2cap_add_scid(chan, cid);
chan             3264 net/bluetooth/smp.c 	l2cap_chan_set_defaults(chan);
chan             3269 net/bluetooth/smp.c 		hci_copy_identity_address(hdev, &chan->src, &bdaddr_type);
chan             3272 net/bluetooth/smp.c 			chan->src_type = BDADDR_LE_PUBLIC;
chan             3274 net/bluetooth/smp.c 			chan->src_type = BDADDR_LE_RANDOM;
chan             3276 net/bluetooth/smp.c 		bacpy(&chan->src, &hdev->bdaddr);
chan             3277 net/bluetooth/smp.c 		chan->src_type = BDADDR_BREDR;
chan             3280 net/bluetooth/smp.c 	chan->state = BT_LISTEN;
chan             3281 net/bluetooth/smp.c 	chan->mode = L2CAP_MODE_BASIC;
chan             3282 net/bluetooth/smp.c 	chan->imtu = L2CAP_DEFAULT_MTU;
chan             3283 net/bluetooth/smp.c 	chan->ops = &smp_root_chan_ops;
chan             3286 net/bluetooth/smp.c 	atomic_set(&chan->nesting, L2CAP_NESTING_PARENT);
chan             3288 net/bluetooth/smp.c 	return chan;
chan             3291 net/bluetooth/smp.c static void smp_del_chan(struct l2cap_chan *chan)
chan             3295 net/bluetooth/smp.c 	BT_DBG("chan %p", chan);
chan             3297 net/bluetooth/smp.c 	smp = chan->data;
chan             3299 net/bluetooth/smp.c 		chan->data = NULL;
chan             3305 net/bluetooth/smp.c 	l2cap_chan_put(chan);
chan             3337 net/bluetooth/smp.c 		struct l2cap_chan *chan;
chan             3339 net/bluetooth/smp.c 		chan = smp_add_cid(hdev, L2CAP_CID_SMP_BREDR);
chan             3340 net/bluetooth/smp.c 		if (IS_ERR(chan))
chan             3341 net/bluetooth/smp.c 			return PTR_ERR(chan);
chan             3343 net/bluetooth/smp.c 		hdev->smp_bredr_data = chan;
chan             3345 net/bluetooth/smp.c 		struct l2cap_chan *chan;
chan             3347 net/bluetooth/smp.c 		chan = hdev->smp_bredr_data;
chan             3349 net/bluetooth/smp.c 		smp_del_chan(chan);
chan             3454 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             3465 net/bluetooth/smp.c 		chan = hdev->smp_data;
chan             3467 net/bluetooth/smp.c 		smp_del_chan(chan);
chan             3470 net/bluetooth/smp.c 	chan = smp_add_cid(hdev, L2CAP_CID_SMP);
chan             3471 net/bluetooth/smp.c 	if (IS_ERR(chan))
chan             3472 net/bluetooth/smp.c 		return PTR_ERR(chan);
chan             3474 net/bluetooth/smp.c 	hdev->smp_data = chan;
chan             3498 net/bluetooth/smp.c 		chan = hdev->smp_bredr_data;
chan             3500 net/bluetooth/smp.c 		smp_del_chan(chan);
chan             3503 net/bluetooth/smp.c 	chan = smp_add_cid(hdev, L2CAP_CID_SMP_BREDR);
chan             3504 net/bluetooth/smp.c 	if (IS_ERR(chan)) {
chan             3505 net/bluetooth/smp.c 		int err = PTR_ERR(chan);
chan             3506 net/bluetooth/smp.c 		chan = hdev->smp_data;
chan             3508 net/bluetooth/smp.c 		smp_del_chan(chan);
chan             3512 net/bluetooth/smp.c 	hdev->smp_bredr_data = chan;
chan             3519 net/bluetooth/smp.c 	struct l2cap_chan *chan;
chan             3522 net/bluetooth/smp.c 		chan = hdev->smp_bredr_data;
chan             3524 net/bluetooth/smp.c 		smp_del_chan(chan);
chan             3528 net/bluetooth/smp.c 		chan = hdev->smp_data;
chan             3530 net/bluetooth/smp.c 		smp_del_chan(chan);
chan              126 net/l2tp/l2tp_ppp.c static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb);
chan              243 net/l2tp/l2tp_ppp.c 		ppp_input(&po->chan, skb);
chan              352 net/l2tp/l2tp_ppp.c static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
chan              354 net/l2tp/l2tp_ppp.c 	struct sock *sk = (struct sock *) chan->private;
chan              541 net/l2tp/l2tp_ppp.c 		seq_printf(m, "   interface %s\n", ppp_dev_name(&po->chan));
chan              816 net/l2tp/l2tp_ppp.c 	po->chan.hdrlen = PPPOL2TP_L2TP_HDR_SIZE_NOSEQ;
chan              818 net/l2tp/l2tp_ppp.c 	po->chan.private = sk;
chan              819 net/l2tp/l2tp_ppp.c 	po->chan.ops	 = &pppol2tp_chan_ops;
chan              820 net/l2tp/l2tp_ppp.c 	po->chan.mtu	 = pppol2tp_tunnel_mtu(tunnel);
chan              822 net/l2tp/l2tp_ppp.c 	error = ppp_register_net_channel(sock_net(sk), &po->chan);
chan             1200 net/l2tp/l2tp_ppp.c 			po->chan.hdrlen = val ? PPPOL2TP_L2TP_HDR_SIZE_SEQ :
chan             1593 net/l2tp/l2tp_ppp.c 		seq_printf(m, "   interface %s\n", ppp_dev_name(&po->chan));
chan             2876 net/mac80211/cfg.c 	    sdata->vif.bss_conf.chandef.chan) {
chan             2878 net/mac80211/cfg.c 		enum nl80211_band band = sdata->vif.bss_conf.chandef.chan->band;
chan             3263 net/mac80211/cfg.c 		if (sdata->u.ibss.chandef.chan->band !=
chan             3264 net/mac80211/cfg.c 		    params->chandef.chan->band)
chan             3286 net/mac80211/cfg.c 		if (sdata->vif.bss_conf.chandef.chan->band !=
chan             3287 net/mac80211/cfg.c 		    params->chandef.chan->band)
chan             3563 net/mac80211/cfg.c 	band = chanctx_conf->def.chan->band;
chan              535 net/mac80211/chan.c 		chandef->center_freq1 = chandef->chan->center_freq;
chan              600 net/mac80211/chan.c 		    !sta->tdls_chandef.chan)
chan              679 net/mac80211/driver-ops.h 					struct ieee80211_channel *chan,
chan              687 net/mac80211/driver-ops.h 	trace_drv_remain_on_channel(local, sdata, chan, duration, type);
chan              689 net/mac80211/driver-ops.h 					    chan, duration, type);
chan              151 net/mac80211/ethtool.c 		channel = chanctx_conf->def.chan;
chan               93 net/mac80211/ibss.c 	sband = local->hw.wiphy->bands[chandef->chan->band];
chan              133 net/mac80211/ibss.c 				chandef->chan->center_freq);
chan              147 net/mac80211/ibss.c 				csa_settings->chandef.chan->center_freq);
chan              231 net/mac80211/ibss.c 	struct ieee80211_channel *chan;
chan              266 net/mac80211/ibss.c 	chan = chandef.chan;
chan              278 net/mac80211/ibss.c 		chandef.center_freq1 = chan->center_freq;
chan              351 net/mac80211/ibss.c 	sdata->vif.bss_conf.use_short_slot = chan->band == NL80211_BAND_5GHZ;
chan              355 net/mac80211/ibss.c 	if (chan->band == NL80211_BAND_2GHZ && have_higher_than_11mbit)
chan              387 net/mac80211/ibss.c 	bss_meta.chan = chan;
chan              394 net/mac80211/ibss.c 	cfg80211_ibss_joined(sdata->dev, ifibss->bssid, chan, GFP_KERNEL);
chan              435 net/mac80211/ibss.c 		chandef.chan = cbss->channel;
chan              499 net/mac80211/ibss.c 	cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan,
chan              548 net/mac80211/ibss.c 					ifibss->chandef.chan,
chan              555 net/mac80211/ibss.c 			cbss->channel = sdata->csa_chandef.chan;
chan              642 net/mac80211/ibss.c 	band = chanctx_conf->def.chan->band;
chan              695 net/mac80211/ibss.c 		cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->chandef.chan,
chan              810 net/mac80211/ibss.c 					   ifibss->chandef.chan->band,
chan              837 net/mac80211/ibss.c 		cfg80211_chandef_create(&params.chandef, params.chandef.chan,
chan              846 net/mac80211/ibss.c 				   params.chandef.chan->center_freq,
chan              864 net/mac80211/ibss.c 			   params.chandef.chan->center_freq,
chan              893 net/mac80211/ibss.c 		 params.chandef.chan->center_freq);
chan             1142 net/mac80211/ibss.c 	    sdata->u.ibss.chandef.chan != cbss->channel)
chan             1234 net/mac80211/ibss.c 	band = chanctx_conf->def.chan->band;
chan             1363 net/mac80211/ibss.c 	struct ieee80211_channel *chan = NULL;
chan             1376 net/mac80211/ibss.c 		chan = ieee80211_get_channel(wiphy, freq);
chan             1377 net/mac80211/ibss.c 		if (!chan)
chan             1382 net/mac80211/ibss.c 		channels[n_chan] = chan;
chan             1437 net/mac80211/ibss.c 	struct ieee80211_channel *chan = NULL;
chan             1453 net/mac80211/ibss.c 		chan = ifibss->chandef.chan;
chan             1456 net/mac80211/ibss.c 	cbss = cfg80211_get_bss(local->hw.wiphy, chan, bssid,
chan             1804 net/mac80211/ibss.c 	sband = local->hw.wiphy->bands[params->chandef.chan->band];
chan              337 net/mac80211/ieee80211_i.h 	struct ieee80211_channel *chan;
chan             1440 net/mac80211/ieee80211_i.h 	band = chanctx_conf->def.chan->band;
chan             1711 net/mac80211/ieee80211_i.h 				struct ieee80211_channel *chan,
chan             1971 net/mac80211/ieee80211_i.h 				    chanctx_conf->def.chan->band, 0);
chan             2122 net/mac80211/ieee80211_i.h 					  struct ieee80211_channel *chan,
chan              101 net/mac80211/main.c 	if (local->scan_chandef.chan) {
chan              104 net/mac80211/main.c 		chandef.chan = local->tmp_channel;
chan              106 net/mac80211/main.c 		chandef.center_freq1 = chandef.chan->center_freq;
chan              112 net/mac80211/main.c 	     chandef.chan->center_freq, chandef.width,
chan              956 net/mac80211/main.c 		if (!dflt_chandef.chan) {
chan              961 net/mac80211/main.c 			if (!local->use_chanctx && !local->_oper_chandef.chan) {
chan               96 net/mac80211/mesh.c 	cfg80211_chandef_create(&sta_chan_def, sdata->vif.bss_conf.chandef.chan,
chan              385 net/mac80211/mesh.c 	struct ieee80211_channel *chan;
chan              397 net/mac80211/mesh.c 	chan = chanctx_conf->def.chan;
chan              403 net/mac80211/mesh.c 	*pos++ = ieee80211_frequency_to_channel(chan->center_freq);
chan              449 net/mac80211/mesh.c 	channel = chanctx_conf->def.chan;
chan              513 net/mac80211/mesh.c 	channel = chanctx_conf->def.chan;
chan              743 net/mac80211/mesh.c 	band = chanctx_conf->def.chan->band;
chan              814 net/mac80211/mesh.c 				csa->settings.chandef.chan->center_freq);
chan             1095 net/mac80211/mesh.c 			   params.chandef.chan->center_freq,
chan             1111 net/mac80211/mesh.c 			   params.chandef.chan->center_freq,
chan             1129 net/mac80211/mesh.c 		 params.chandef.chan->center_freq);
chan             1295 net/mac80211/mesh.c 		 sdata->vif.bss_conf.chandef.chan->center_freq);
chan              162 net/mac80211/mlme.c 	chandef->chan = channel;
chan              329 net/mac80211/mlme.c 	struct ieee80211_channel *chan = sdata->vif.bss_conf.chandef.chan;
chan              331 net/mac80211/mlme.c 		local->hw.wiphy->bands[chan->band];
chan              365 net/mac80211/mlme.c 	flags = ieee80211_determine_chantype(sdata, sband, chan,
chan              391 net/mac80211/mlme.c 		   ifmgd->bssid, chandef.chan->center_freq, chandef.width,
chan              651 net/mac80211/mlme.c 	struct ieee80211_channel *chan;
chan              662 net/mac80211/mlme.c 	chan = chanctx_conf->def.chan;
chan              664 net/mac80211/mlme.c 	sband = local->hw.wiphy->bands[chan->band];
chan              877 net/mac80211/mlme.c 				    sband, chan, sdata->smps_mode);
chan             1150 net/mac80211/mlme.c 				local->hw.wiphy->bands[sdata->csa_chandef.chan->band];
chan             1342 net/mac80211/mlme.c 			   csa_ie.chandef.chan->center_freq,
chan             1456 net/mac80211/mlme.c 	int chan = ieee80211_frequency_to_channel(channel->center_freq);
chan             1488 net/mac80211/mlme.c 			if (first_channel + i * chan_increment == chan) {
chan             3813 net/mac80211/mlme.c 	struct ieee80211_channel *chan;
chan             3836 net/mac80211/mlme.c 	if (rx_status->freq != chanctx_conf->def.chan->center_freq) {
chan             3840 net/mac80211/mlme.c 	chan = chanctx_conf->def.chan;
chan             4051 net/mac80211/mlme.c 	changed |= ieee80211_handle_pwr_constr(sdata, chan, mgmt,
chan               67 net/mac80211/ocb.c 	band = chanctx_conf->def.chan->band;
chan              201 net/mac80211/offchannel.c 						   roc->cookie, roc->chan,
chan              206 net/mac80211/offchannel.c 					 roc->chan, GFP_KERNEL);
chan              267 net/mac80211/offchannel.c 						  roc->chan->band, 0);
chan              272 net/mac80211/offchannel.c 					  roc->chan, roc->req_duration,
chan              334 net/mac80211/offchannel.c 		if (tmp->sdata != roc->sdata || tmp->chan != roc->chan)
chan              342 net/mac80211/offchannel.c 		int ret = drv_remain_on_channel(local, roc->sdata, roc->chan,
chan              354 net/mac80211/offchannel.c 				    tmp->chan != roc->chan)
chan              365 net/mac80211/offchannel.c 			if (tmp->sdata != roc->sdata || tmp->chan != roc->chan)
chan              375 net/mac80211/offchannel.c 		roc->on_channel = roc->chan == local->_oper_chandef.chan &&
chan              385 net/mac80211/offchannel.c 			local->tmp_channel = roc->chan;
chan              394 net/mac80211/offchannel.c 			if (tmp->sdata != roc->sdata || tmp->chan != roc->chan)
chan              579 net/mac80211/offchannel.c 	roc->chan = channel;
chan              625 net/mac80211/offchannel.c 		if (tmp->chan != channel || tmp->sdata != sdata)
chan              687 net/mac80211/offchannel.c 				struct ieee80211_channel *chan,
chan              695 net/mac80211/offchannel.c 	ret = ieee80211_start_roc_work(local, sdata, chan,
chan              854 net/mac80211/offchannel.c 	if (need_offchan && !params->chan)
chan              867 net/mac80211/offchannel.c 			need_offchan = params->chan &&
chan              868 net/mac80211/offchannel.c 				       (params->chan !=
chan              869 net/mac80211/offchannel.c 					chanctx_conf->def.chan);
chan              870 net/mac80211/offchannel.c 		} else if (!params->chan) {
chan              955 net/mac80211/offchannel.c 	ret = ieee80211_start_roc_work(local, sdata, params->chan,
chan               52 net/mac80211/rate.c 	sband = local->hw.wiphy->bands[chanctx_conf->def.chan->band];
chan              266 net/mac80211/rate.c 	if (WARN_ON(!sdata->vif.bss_conf.chandef.chan))
chan              272 net/mac80211/rate.c 	band = sdata->vif.bss_conf.chandef.chan->band;
chan              168 net/mac80211/scan.c 	bss_meta.chan = channel;
chan              435 net/mac80211/scan.c 	local->scan_chandef.chan = NULL;
chan              614 net/mac80211/scan.c 	enum nl80211_band band = local->hw.conf.chandef.chan->band;
chan              637 net/mac80211/scan.c 			tx_flags, local->hw.conf.chandef.chan);
chan              732 net/mac80211/scan.c 		   (req->channels[0] == local->_oper_chandef.chan)) {
chan              806 net/mac80211/scan.c ieee80211_scan_get_channel_time(struct ieee80211_channel *chan)
chan              812 net/mac80211/scan.c 	if (chan->flags & (IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_RADAR))
chan              888 net/mac80211/scan.c 	struct ieee80211_channel *chan;
chan              896 net/mac80211/scan.c 	chan = scan_req->channels[local->scan_channel_idx];
chan              898 net/mac80211/scan.c 	local->scan_chandef.chan = chan;
chan              899 net/mac80211/scan.c 	local->scan_chandef.center_freq1 = chan->center_freq;
chan              914 net/mac80211/scan.c 		if (chan == local->_oper_chandef.chan &&
chan              944 net/mac80211/scan.c 	if ((chan->flags & (IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_RADAR)) ||
chan              960 net/mac80211/scan.c 	local->scan_chandef.chan = NULL;
chan              155 net/mac80211/spectmgmt.c 			new_vht_chandef.chan = NULL;
chan              166 net/mac80211/spectmgmt.c 	if (new_vht_chandef.chan) {
chan             1454 net/mac80211/sta_info.c 	info->band = chanctx_conf->def.chan->band;
chan              332 net/mac80211/tdls.c 		if (abs(uc.chan->center_freq - centers_80mhz[i]) <= 30) {
chan              659 net/mac80211/tdls.c 		ieee80211_frequency_to_channel(chandef->chan->center_freq);
chan             1262 net/mac80211/tdls.c 		sband = local->hw.wiphy->bands[conf->def.chan->band];
chan             1554 net/mac80211/tdls.c 		 sta->sta.addr, chandef->chan->center_freq, chandef->width);
chan             1773 net/mac80211/tdls.c 	struct ieee80211_channel *chan;
chan             1823 net/mac80211/tdls.c 	chan = ieee80211_get_channel(sdata->local->hw.wiphy, freq);
chan             1824 net/mac80211/tdls.c 	if (!chan) {
chan             1859 net/mac80211/tdls.c 	cfg80211_chandef_create(&chandef, chan, chan_type);
chan             1912 net/mac80211/tdls.c 		 tf->sa, params.chandef->chan->center_freq,
chan               44 net/mac80211/trace.h 			__entry->control_freq = (c) ? ((c)->chan ? (c)->chan->center_freq : 0) : 0;	\
chan               59 net/mac80211/trace.h 			__entry->min_control_freq = (c)->chan ? (c)->chan->center_freq : 0;	\
chan             1216 net/mac80211/trace.h 		 struct ieee80211_channel *chan,
chan             1220 net/mac80211/trace.h 	TP_ARGS(local, sdata, chan, duration, type),
chan             1233 net/mac80211/trace.h 		__entry->center_freq = chan->center_freq;
chan             1599 net/mac80211/trace.h 						old_ctx->def.chan->center_freq);
chan             1607 net/mac80211/trace.h 						new_ctx->def.chan->center_freq);
chan             2346 net/mac80211/tx.c 	info->band = chandef->chan->band;
chan             2517 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2534 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2548 net/mac80211/tx.c 		band = local->hw.conf.chandef.chan->band;
chan             2621 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2664 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2677 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2690 net/mac80211/tx.c 		band = chanctx_conf->def.chan->band;
chan             2929 net/mac80211/tx.c 	build.band = chanctx_conf->def.chan->band;
chan             4141 net/mac80211/tx.c 		info->band = chanctx_conf->def.chan->band;
chan             4615 net/mac80211/tx.c 	band = chanctx_conf->def.chan->band;
chan             4955 net/mac80211/tx.c 	info->band = chanctx_conf->def.chan->band;
chan             1416 net/mac80211/util.c 		center_freq = chanctx_conf->def.chan->center_freq;
chan             1463 net/mac80211/util.c 		   chanctx_conf->def.chan->band == NL80211_BAND_2GHZ) &&
chan             1711 net/mac80211/util.c 	if (chandef->chan && sband->band == NL80211_BAND_2GHZ) {
chan             1717 net/mac80211/util.c 				chandef->chan->center_freq);
chan             1879 net/mac80211/util.c 					  struct ieee80211_channel *chan,
chan             1899 net/mac80211/util.c 		chandef.chan = NULL;
chan             1901 net/mac80211/util.c 		chandef.chan = chan;
chan             1908 net/mac80211/util.c 	rate_masks[chan->band] = ratemask;
chan             1911 net/mac80211/util.c 					   ie, ie_len, BIT(chan->band),
chan             2819 net/mac80211/util.c 					chandef->chan->center_freq);
chan             2825 net/mac80211/util.c 		if (chandef->center_freq1 > chandef->chan->center_freq)
chan             2906 net/mac80211/util.c 		if (chandef->chan->center_freq < chandef->center_freq1)
chan             2983 net/mac80211/util.c 	cfg80211_chandef_create(chandef, chandef->chan, channel_type);
chan             3003 net/mac80211/util.c 	vht_cap = hw->wiphy->bands[chandef->chan->band]->vht_cap.cap;
chan             3024 net/mac80211/util.c 	cf0 = ieee80211_channel_to_frequency(ccf0, chandef->chan->band);
chan             3025 net/mac80211/util.c 	cf1 = ieee80211_channel_to_frequency(ccf1, chandef->chan->band);
chan             3395 net/mac80211/util.c 		c->center_freq1 = c->chan->center_freq;
chan             3400 net/mac80211/util.c 		tmp = (30 + c->chan->center_freq - c->center_freq1)/20;
chan             3416 net/mac80211/util.c 		tmp = (70 + c->chan->center_freq - c->center_freq1)/20;
chan             3510 net/mac80211/util.c 	freq = csa_settings->chandef.chan->center_freq;
chan             3860 net/mac80211/util.c 		    !chandef->chan))
chan              132 net/mac802154/ieee802154_i.h void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan);
chan               21 net/mac802154/mib.c void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan)
chan               31 net/mac802154/mib.c 	res = drv_set_channel(local, page, chan);
chan               35 net/mac802154/mib.c 		local->phy->current_channel = chan;
chan              335 net/rxrpc/call_object.c 	u32 chan;
chan              354 net/rxrpc/call_object.c 	chan = sp->hdr.cid & RXRPC_CHANNELMASK;
chan              355 net/rxrpc/call_object.c 	conn->channels[chan].call_counter = call->call_id;
chan              356 net/rxrpc/call_object.c 	conn->channels[chan].call_id = call->call_id;
chan              357 net/rxrpc/call_object.c 	rcu_assign_pointer(conn->channels[chan].call, call);
chan              537 net/rxrpc/conn_client.c 	struct rxrpc_channel *chan = &conn->channels[channel];
chan              539 net/rxrpc/conn_client.c 	rcu_assign_pointer(chan->call, NULL);
chan              551 net/rxrpc/conn_client.c 	struct rxrpc_channel *chan = &conn->channels[channel];
chan              554 net/rxrpc/conn_client.c 	u32 call_id = chan->call_counter + 1;
chan              589 net/rxrpc/conn_client.c 	chan->call_id	= call_id;
chan              590 net/rxrpc/conn_client.c 	chan->call_debug_id = call->debug_id;
chan              591 net/rxrpc/conn_client.c 	rcu_assign_pointer(chan->call, call);
chan              756 net/rxrpc/conn_client.c 	struct rxrpc_channel *chan = &conn->channels[channel];
chan              764 net/rxrpc/conn_client.c 		chan->call_counter++;
chan              765 net/rxrpc/conn_client.c 		if (chan->call_counter >= INT_MAX)
chan              789 net/rxrpc/conn_client.c 	struct rxrpc_channel *chan = NULL;
chan              800 net/rxrpc/conn_client.c 		chan = &conn->channels[channel];
chan              827 net/rxrpc/conn_client.c 	if (rcu_access_pointer(chan->call) != call) {
chan              862 net/rxrpc/conn_client.c 		WRITE_ONCE(chan->final_ack_at, final_ack_at);
chan               27 net/rxrpc/conn_event.c 	struct rxrpc_channel *chan;
chan               44 net/rxrpc/conn_event.c 	chan = &conn->channels[channel];
chan               49 net/rxrpc/conn_event.c 	call_id = READ_ONCE(chan->last_call);
chan               72 net/rxrpc/conn_event.c 	pkt.whdr.type		= chan->last_type;
chan               80 net/rxrpc/conn_event.c 	switch (chan->last_type) {
chan               82 net/rxrpc/conn_event.c 		pkt.abort_code	= htonl(chan->last_abort);
chan               93 net/rxrpc/conn_event.c 		pkt.ack.firstPacket	= htonl(chan->last_seq + 1);
chan               94 net/rxrpc/conn_event.c 		pkt.ack.previousPacket	= htonl(chan->last_seq);
chan              117 net/rxrpc/conn_event.c 	if (READ_ONCE(chan->last_call) != call_id)
chan              123 net/rxrpc/conn_event.c 	switch (chan->last_type) {
chan              128 net/rxrpc/conn_event.c 		trace_rxrpc_tx_ack(chan->call_debug_id, serial,
chan              139 net/rxrpc/conn_event.c 		trace_rxrpc_tx_fail(chan->call_debug_id, serial, ret,
chan              142 net/rxrpc/conn_event.c 		trace_rxrpc_tx_packet(chan->call_debug_id, &pkt.whdr,
chan              409 net/rxrpc/conn_event.c 		struct rxrpc_channel *chan = &conn->channels[channel];
chan              416 net/rxrpc/conn_event.c 		ack_at = READ_ONCE(chan->final_ack_at);
chan              169 net/rxrpc/conn_object.c 	struct rxrpc_channel *chan =
chan              174 net/rxrpc/conn_object.c 	if (rcu_access_pointer(chan->call) == call) {
chan              181 net/rxrpc/conn_object.c 			chan->last_seq = call->rx_hard_ack;
chan              182 net/rxrpc/conn_object.c 			chan->last_type = RXRPC_PACKET_TYPE_ACK;
chan              185 net/rxrpc/conn_object.c 			chan->last_abort = call->abort_code;
chan              186 net/rxrpc/conn_object.c 			chan->last_type = RXRPC_PACKET_TYPE_ABORT;
chan              189 net/rxrpc/conn_object.c 			chan->last_abort = RX_USER_ABORT;
chan              190 net/rxrpc/conn_object.c 			chan->last_type = RXRPC_PACKET_TYPE_ABORT;
chan              196 net/rxrpc/conn_object.c 		chan->last_call = chan->call_id;
chan              197 net/rxrpc/conn_object.c 		chan->call_id = chan->call_counter;
chan              199 net/rxrpc/conn_object.c 		rcu_assign_pointer(chan->call, NULL);
chan             1198 net/rxrpc/input.c 	struct rxrpc_channel *chan;
chan             1353 net/rxrpc/input.c 		chan = &conn->channels[channel];
chan             1356 net/rxrpc/input.c 		if (sp->hdr.callNumber < chan->last_call)
chan             1359 net/rxrpc/input.c 		if (sp->hdr.callNumber == chan->last_call) {
chan             1360 net/rxrpc/input.c 			if (chan->call ||
chan             1368 net/rxrpc/input.c 			    chan->last_type == RXRPC_PACKET_TYPE_ACK)
chan             1375 net/rxrpc/input.c 				trace_rxrpc_rx_data(chan->call_debug_id,
chan             1383 net/rxrpc/input.c 		call = rcu_dereference(chan->call);
chan             1385 net/rxrpc/input.c 		if (sp->hdr.callNumber > chan->call_id) {
chan               95 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan;
chan              170 net/vmw_vsock/hyperv_transport.c static void hvs_set_channel_pending_send_size(struct vmbus_channel *chan)
chan              172 net/vmw_vsock/hyperv_transport.c 	set_channel_pending_send_size(chan,
chan              178 net/vmw_vsock/hyperv_transport.c static bool hvs_channel_readable(struct vmbus_channel *chan)
chan              180 net/vmw_vsock/hyperv_transport.c 	u32 readable = hv_get_bytes_to_read(&chan->inbound);
chan              186 net/vmw_vsock/hyperv_transport.c static int hvs_channel_readable_payload(struct vmbus_channel *chan)
chan              188 net/vmw_vsock/hyperv_transport.c 	u32 readable = hv_get_bytes_to_read(&chan->inbound);
chan              207 net/vmw_vsock/hyperv_transport.c static size_t hvs_channel_writable_bytes(struct vmbus_channel *chan)
chan              209 net/vmw_vsock/hyperv_transport.c 	u32 writeable = hv_get_bytes_to_write(&chan->outbound);
chan              224 net/vmw_vsock/hyperv_transport.c static int hvs_send_data(struct vmbus_channel *chan,
chan              229 net/vmw_vsock/hyperv_transport.c 	return vmbus_sendpacket(chan, &send_buf->hdr,
chan              239 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan = hvs->chan;
chan              241 net/vmw_vsock/hyperv_transport.c 	if (hvs_channel_readable(chan))
chan              244 net/vmw_vsock/hyperv_transport.c 	if (hv_get_bytes_to_write(&chan->outbound) > 0)
chan              268 net/vmw_vsock/hyperv_transport.c static void hvs_close_connection(struct vmbus_channel *chan)
chan              270 net/vmw_vsock/hyperv_transport.c 	struct sock *sk = get_per_channel_state(chan);
chan              282 net/vmw_vsock/hyperv_transport.c static void hvs_open_connection(struct vmbus_channel *chan)
chan              296 net/vmw_vsock/hyperv_transport.c 	if_type = &chan->offermsg.offer.if_type;
chan              297 net/vmw_vsock/hyperv_transport.c 	if_instance = &chan->offermsg.offer.if_instance;
chan              298 net/vmw_vsock/hyperv_transport.c 	conn_from_host = chan->offermsg.offer.u.pipe.user_def[0];
chan              331 net/vmw_vsock/hyperv_transport.c 		hvs_new->chan = chan;
chan              334 net/vmw_vsock/hyperv_transport.c 		hvs->chan = chan;
chan              337 net/vmw_vsock/hyperv_transport.c 	set_channel_read_mode(chan, HV_CALL_DIRECT);
chan              364 net/vmw_vsock/hyperv_transport.c 	ret = vmbus_open(chan, sndbuf, rcvbuf, NULL, 0, hvs_channel_cb,
chan              368 net/vmw_vsock/hyperv_transport.c 			hvs_new->chan = NULL;
chan              371 net/vmw_vsock/hyperv_transport.c 			hvs->chan = NULL;
chan              376 net/vmw_vsock/hyperv_transport.c 	set_per_channel_state(chan, conn_from_host ? new : sk);
chan              380 net/vmw_vsock/hyperv_transport.c 	vmbus_set_chn_rescind_callback(chan, hvs_close_connection);
chan              387 net/vmw_vsock/hyperv_transport.c 	hvs_set_channel_pending_send_size(chan);
chan              457 net/vmw_vsock/hyperv_transport.c 	if (hvs->fin_sent || !hvs->chan)
chan              461 net/vmw_vsock/hyperv_transport.c 	(void)hvs_send_data(hvs->chan, (struct hvs_send_buf *)&hdr, 0);
chan              532 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan = hvs->chan;
chan              534 net/vmw_vsock/hyperv_transport.c 	if (chan)
chan              535 net/vmw_vsock/hyperv_transport.c 		vmbus_hvsock_device_unregister(chan);
chan              596 net/vmw_vsock/hyperv_transport.c 		hvs->recv_desc = hv_pkt_iter_first(hvs->chan);
chan              610 net/vmw_vsock/hyperv_transport.c 		hvs->recv_desc = hv_pkt_iter_next(hvs->chan, hvs->recv_desc);
chan              627 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan = hvs->chan;
chan              644 net/vmw_vsock/hyperv_transport.c 		max_writable = hvs_channel_writable_bytes(chan);
chan              656 net/vmw_vsock/hyperv_transport.c 		ret = hvs_send_data(hvs->chan, send_buf, to_write);
chan              679 net/vmw_vsock/hyperv_transport.c 	switch (hvs_channel_readable_payload(hvs->chan)) {
chan              699 net/vmw_vsock/hyperv_transport.c 	return hvs_channel_writable_bytes(hvs->chan);
chan              711 net/vmw_vsock/hyperv_transport.c 	return hvs->chan != NULL;
chan              727 net/vmw_vsock/hyperv_transport.c 	*readable = hvs_channel_readable(hvs->chan);
chan              870 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan = hdev->channel;
chan              872 net/vmw_vsock/hyperv_transport.c 	hvs_open_connection(chan);
chan              884 net/vmw_vsock/hyperv_transport.c 	struct vmbus_channel *chan = hdev->channel;
chan              886 net/vmw_vsock/hyperv_transport.c 	vmbus_close(chan);
chan               23 net/wireless/chan.c 			     struct ieee80211_channel *chan,
chan               26 net/wireless/chan.c 	if (WARN_ON(!chan))
chan               29 net/wireless/chan.c 	chandef->chan = chan;
chan               37 net/wireless/chan.c 		chandef->center_freq1 = chan->center_freq;
chan               41 net/wireless/chan.c 		chandef->center_freq1 = chan->center_freq;
chan               45 net/wireless/chan.c 		chandef->center_freq1 = chan->center_freq + 10;
chan               49 net/wireless/chan.c 		chandef->center_freq1 = chan->center_freq - 10;
chan               67 net/wireless/chan.c 	if (!cfg80211_valid_60g_freq(chandef->chan->center_freq))
chan              146 net/wireless/chan.c 	if (!chandef->chan)
chan              149 net/wireless/chan.c 	control_freq = chandef->chan->center_freq;
chan              234 net/wireless/chan.c 		tmp = (30 + c->chan->center_freq - c->center_freq1)/20;
chan              242 net/wireless/chan.c 		tmp = (70 + c->chan->center_freq - c->center_freq1)/20;
chan              299 net/wireless/chan.c 	if (c1->chan != c2->chan)
chan              567 net/wireless/chan.c 			  struct ieee80211_channel *chan)
chan              572 net/wireless/chan.c 	if (chandef->chan->center_freq == chan->center_freq)
chan              581 net/wireless/chan.c 		if (chan->center_freq == freq)
chan              590 net/wireless/chan.c 		if (chan->center_freq == freq)
chan              603 net/wireless/chan.c 	if (!wdev->chandef.chan)
chan              636 net/wireless/chan.c 					struct ieee80211_channel *chan)
chan              647 net/wireless/chan.c 		if (cfg80211_is_sub_chan(&wdev->chandef, chan)) {
chan              658 net/wireless/chan.c 				  struct ieee80211_channel *chan)
chan              664 net/wireless/chan.c 	if (!(chan->flags & IEEE80211_CHAN_RADAR))
chan              671 net/wireless/chan.c 		if (cfg80211_is_wiphy_oper_chan(&rdev->wiphy, chan))
chan              831 net/wireless/chan.c 	struct ieee80211_channel *chan;
chan              857 net/wireless/chan.c 		chan = ieee80211_get_channel(wiphy, freq);
chan              858 net/wireless/chan.c 		if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
chan              890 net/wireless/chan.c 	ht_cap = &wiphy->bands[chandef->chan->band]->ht_cap;
chan              891 net/wireless/chan.c 	vht_cap = &wiphy->bands[chandef->chan->band]->vht_cap;
chan              892 net/wireless/chan.c 	edmg_cap = &wiphy->bands[chandef->chan->band]->edmg_cap;
chan              898 net/wireless/chan.c 				  chandef->chan->hw_value,
chan              902 net/wireless/chan.c 	control_freq = chandef->chan->center_freq;
chan              928 net/wireless/chan.c 		    chandef->chan->flags & IEEE80211_CHAN_NO_HT40MINUS)
chan              931 net/wireless/chan.c 		    chandef->chan->flags & IEEE80211_CHAN_NO_HT40PLUS)
chan             1001 net/wireless/chan.c 					struct ieee80211_channel *chan)
chan             1019 net/wireless/chan.c 	    (chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
chan             1022 net/wireless/chan.c 	if (!(chan->flags & IEEE80211_CHAN_IR_CONCURRENT))
chan             1051 net/wireless/chan.c 		    !(chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
chan             1052 net/wireless/chan.c 			other_chan = wdev->chandef.chan;
chan             1058 net/wireless/chan.c 		if (chan == other_chan)
chan             1061 net/wireless/chan.c 		if (chan->band != NL80211_BAND_5GHZ &&
chan             1062 net/wireless/chan.c 		    chan->band != NL80211_BAND_6GHZ)
chan             1065 net/wireless/chan.c 		r1 = cfg80211_get_unii(chan->center_freq);
chan             1081 net/wireless/chan.c 			if (chan->center_freq == 5825 &&
chan             1140 net/wireless/chan.c 						   chandef->chan);
chan             1159 net/wireless/chan.c 		        struct ieee80211_channel **chan,
chan             1165 net/wireless/chan.c 	*chan = NULL;
chan             1176 net/wireless/chan.c 			*chan = wdev->current_bss->pub.channel;
chan             1192 net/wireless/chan.c 			*chan = wdev->current_bss->pub.channel;
chan             1200 net/wireless/chan.c 			*chan = wdev->chandef.chan;
chan             1204 net/wireless/chan.c 			*chan = wdev->chandef.chan;
chan             1217 net/wireless/chan.c 			*chan = wdev->chandef.chan;
chan             1229 net/wireless/chan.c 		if (wdev->chandef.chan) {
chan             1230 net/wireless/chan.c 			*chan = wdev->chandef.chan;
chan              363 net/wireless/core.h 		       struct ieee80211_channel *chan,
chan              372 net/wireless/core.h 			struct ieee80211_channel *chan,
chan              489 net/wireless/core.h 				  struct ieee80211_channel *chan);
chan              494 net/wireless/core.h 			  struct ieee80211_channel *chan);
chan              508 net/wireless/core.h 		        struct ieee80211_channel **chan,
chan               40 net/wireless/debugfs.c static int ht_print_chan(struct ieee80211_channel *chan,
chan               46 net/wireless/debugfs.c 	if (chan->flags & IEEE80211_CHAN_DISABLED)
chan               50 net/wireless/debugfs.c 				 chan->center_freq);
chan               55 net/wireless/debugfs.c 			 chan->center_freq,
chan               56 net/wireless/debugfs.c 			 (chan->flags & IEEE80211_CHAN_NO_HT40MINUS) ?
chan               58 net/wireless/debugfs.c 			 (chan->flags & IEEE80211_CHAN_NO_HT40PLUS) ?
chan              112 net/wireless/ibss.c 		band = params->chandef.chan->band;
chan              250 net/wireless/ibss.c 	if (!wdev->wext.ibss.chandef.chan) {
chan              255 net/wireless/ibss.c 			struct ieee80211_channel *chan;
chan              262 net/wireless/ibss.c 				chan = &sband->channels[i];
chan              263 net/wireless/ibss.c 				if (chan->flags & IEEE80211_CHAN_NO_IR)
chan              265 net/wireless/ibss.c 				if (chan->flags & IEEE80211_CHAN_DISABLED)
chan              267 net/wireless/ibss.c 				new_chan = chan;
chan              315 net/wireless/ibss.c 	struct ieee80211_channel *chan = NULL;
chan              330 net/wireless/ibss.c 		chan = ieee80211_get_channel(wdev->wiphy, freq);
chan              331 net/wireless/ibss.c 		if (!chan)
chan              333 net/wireless/ibss.c 		if (chan->flags & IEEE80211_CHAN_NO_IR ||
chan              334 net/wireless/ibss.c 		    chan->flags & IEEE80211_CHAN_DISABLED)
chan              338 net/wireless/ibss.c 	if (wdev->wext.ibss.chandef.chan == chan)
chan              350 net/wireless/ibss.c 	if (chan) {
chan              351 net/wireless/ibss.c 		cfg80211_chandef_create(&wdev->wext.ibss.chandef, chan,
chan              371 net/wireless/ibss.c 	struct ieee80211_channel *chan = NULL;
chan              379 net/wireless/ibss.c 		chan = wdev->current_bss->pub.channel;
chan              380 net/wireless/ibss.c 	else if (wdev->wext.ibss.chandef.chan)
chan              381 net/wireless/ibss.c 		chan = wdev->wext.ibss.chandef.chan;
chan              384 net/wireless/ibss.c 	if (chan) {
chan              385 net/wireless/ibss.c 		freq->m = chan->center_freq;
chan              125 net/wireless/mesh.c 	if (!setup->chandef.chan) {
chan              130 net/wireless/mesh.c 	if (!setup->chandef.chan) {
chan              136 net/wireless/mesh.c 			struct ieee80211_channel *chan;
chan              144 net/wireless/mesh.c 				chan = &sband->channels[i];
chan              145 net/wireless/mesh.c 				if (chan->flags & (IEEE80211_CHAN_NO_IR |
chan              149 net/wireless/mesh.c 				setup->chandef.chan = chan;
chan              153 net/wireless/mesh.c 			if (setup->chandef.chan)
chan              158 net/wireless/mesh.c 		if (!setup->chandef.chan)
chan              162 net/wireless/mesh.c 		setup->chandef.center_freq1 = setup->chandef.chan->center_freq;
chan              172 net/wireless/mesh.c 				rdev->wiphy.bands[setup->chandef.chan->band];
chan              174 net/wireless/mesh.c 		if (setup->chandef.chan->band == NL80211_BAND_2GHZ) {
chan              241 net/wireless/mesh.c 						     chandef->chan);
chan              223 net/wireless/mlme.c 		       struct ieee80211_channel *chan,
chan              254 net/wireless/mlme.c 	req.bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len,
chan              302 net/wireless/mlme.c 			struct ieee80211_channel *chan,
chan              322 net/wireless/mlme.c 	req->bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid, ssid, ssid_len,
chan              882 net/wireless/mlme.c 	if (WARN_ON(!wdev->chandef.chan))
chan              901 net/wireless/nl80211.c 				   struct ieee80211_channel *chan,
chan              907 net/wireless/nl80211.c 	if (!large && chan->flags &
chan              912 net/wireless/nl80211.c 			chan->center_freq))
chan              915 net/wireless/nl80211.c 	if ((chan->flags & IEEE80211_CHAN_DISABLED) &&
chan              918 net/wireless/nl80211.c 	if (chan->flags & IEEE80211_CHAN_NO_IR) {
chan              924 net/wireless/nl80211.c 	if (chan->flags & IEEE80211_CHAN_RADAR) {
chan              930 net/wireless/nl80211.c 			time = elapsed_jiffies_msecs(chan->dfs_state_entered);
chan              933 net/wireless/nl80211.c 					chan->dfs_state))
chan              940 net/wireless/nl80211.c 					chan->dfs_cac_ms))
chan              946 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_HT40MINUS) &&
chan              949 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_HT40PLUS) &&
chan              952 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_80MHZ) &&
chan              955 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
chan              958 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_INDOOR_ONLY) &&
chan              961 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_IR_CONCURRENT) &&
chan              964 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_20MHZ) &&
chan              967 net/wireless/nl80211.c 		if ((chan->flags & IEEE80211_CHAN_NO_10MHZ) &&
chan              973 net/wireless/nl80211.c 			DBM_TO_MBM(chan->max_power)))
chan              978 net/wireless/nl80211.c 			freq_reg_info(wiphy, MHZ_TO_KHZ(chan->center_freq));
chan             1309 net/wireless/nl80211.c 	struct ieee80211_channel *chan;
chan             1313 net/wireless/nl80211.c 	chan = ieee80211_get_channel(wiphy, nla_get_u32(tb));
chan             1314 net/wireless/nl80211.c 	if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
chan             1316 net/wireless/nl80211.c 	return chan;
chan             1908 net/wireless/nl80211.c 	struct ieee80211_channel *chan;
chan             2080 net/wireless/nl80211.c 					chan = &sband->channels[i];
chan             2083 net/wireless/nl80211.c 							msg, &rdev->wiphy, chan,
chan             2678 net/wireless/nl80211.c 	chandef->chan = ieee80211_get_channel(&rdev->wiphy, control_freq);
chan             2684 net/wireless/nl80211.c 	if (!chandef->chan || chandef->chan->flags & IEEE80211_CHAN_DISABLED) {
chan             2700 net/wireless/nl80211.c 			cfg80211_chandef_create(chandef, chandef->chan,
chan             2806 net/wireless/nl80211.c 			if (chandef.chan != wdev->preset_chandef.chan) {
chan             3161 net/wireless/nl80211.c 			chandef->chan->center_freq))
chan             4570 net/wireless/nl80211.c 		if (!wdev->preset_chandef.chan)
chan             4741 net/wireless/nl80211.c 	} else if (wdev->preset_chandef.chan) {
chan             4755 net/wireless/nl80211.c 		err = validate_beacon_tx_rate(rdev, params.chandef.chan->band,
chan             7407 net/wireless/nl80211.c 	if (!(wdev->chandef.chan->flags & IEEE80211_CHAN_RADAR))
chan             7577 net/wireless/nl80211.c 			struct ieee80211_channel *chan;
chan             7579 net/wireless/nl80211.c 			chan = ieee80211_get_channel(wiphy, nla_get_u32(attr));
chan             7581 net/wireless/nl80211.c 			if (!chan) {
chan             7587 net/wireless/nl80211.c 			if (chan->flags & IEEE80211_CHAN_DISABLED)
chan             7590 net/wireless/nl80211.c 			request->channels[i] = chan;
chan             7603 net/wireless/nl80211.c 				struct ieee80211_channel *chan;
chan             7605 net/wireless/nl80211.c 				chan = &wiphy->bands[band]->channels[j];
chan             7607 net/wireless/nl80211.c 				if (chan->flags & IEEE80211_CHAN_DISABLED)
chan             7610 net/wireless/nl80211.c 				request->channels[i] = chan;
chan             7625 net/wireless/nl80211.c 		struct ieee80211_channel *chan;
chan             7633 net/wireless/nl80211.c 		chan = request->channels[0];
chan             7634 net/wireless/nl80211.c 		if (chan->center_freq != wdev->chandef.chan->center_freq) {
chan             8055 net/wireless/nl80211.c 			struct ieee80211_channel *chan;
chan             8057 net/wireless/nl80211.c 			chan = ieee80211_get_channel(wiphy, nla_get_u32(attr));
chan             8059 net/wireless/nl80211.c 			if (!chan) {
chan             8065 net/wireless/nl80211.c 			if (chan->flags & IEEE80211_CHAN_DISABLED)
chan             8068 net/wireless/nl80211.c 			request->channels[i] = chan;
chan             8079 net/wireless/nl80211.c 				struct ieee80211_channel *chan;
chan             8081 net/wireless/nl80211.c 				chan = &wiphy->bands[band]->channels[j];
chan             8083 net/wireless/nl80211.c 				if (chan->flags & IEEE80211_CHAN_DISABLED)
chan             8086 net/wireless/nl80211.c 				request->channels[i] = chan;
chan             8420 net/wireless/nl80211.c 	if (chandef.chan->dfs_state == NL80211_DFS_UNAVAILABLE)
chan             8940 net/wireless/nl80211.c 	struct ieee80211_channel *chan;
chan             9002 net/wireless/nl80211.c 	chan = nl80211_get_valid_chan(&rdev->wiphy,
chan             9004 net/wireless/nl80211.c 	if (!chan)
chan             9049 net/wireless/nl80211.c 	err = cfg80211_mlme_auth(rdev, dev, chan, auth_type, bssid,
chan             9186 net/wireless/nl80211.c 	struct ieee80211_channel *chan;
chan             9209 net/wireless/nl80211.c 	chan = nl80211_get_valid_chan(&rdev->wiphy,
chan             9211 net/wireless/nl80211.c 	if (!chan)
chan             9289 net/wireless/nl80211.c 		err = cfg80211_mlme_assoc(rdev, dev, chan, bssid,
chan             9517 net/wireless/nl80211.c 			wiphy->bands[ibss.chandef.chan->band];
chan             10447 net/wireless/nl80211.c 	err = rdev_remain_on_channel(rdev, wdev, chandef.chan,
chan             10601 net/wireless/nl80211.c 	chandef.chan = NULL;
chan             10608 net/wireless/nl80211.c 	if (!chandef.chan && params.offchan)
chan             10652 net/wireless/nl80211.c 	params.chan = chandef.chan;
chan             11072 net/wireless/nl80211.c 		setup.chandef.chan = NULL;
chan             11081 net/wireless/nl80211.c 		if (!setup.chandef.chan)
chan             11084 net/wireless/nl80211.c 		sband = rdev->wiphy.bands[setup.chandef.chan->band];
chan             11097 net/wireless/nl80211.c 		if (!setup.chandef.chan)
chan             11100 net/wireless/nl80211.c 		err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band,
chan             13393 net/wireless/nl80211.c 	if (chandef.chan->band == NL80211_BAND_2GHZ &&
chan             15571 net/wireless/nl80211.c 	struct ieee80211_channel *chan,
chan             15592 net/wireless/nl80211.c 	    nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, chan->center_freq) ||
chan             15614 net/wireless/nl80211.c 			       struct ieee80211_channel *chan,
chan             15620 net/wireless/nl80211.c 	trace_cfg80211_ready_on_channel(wdev, cookie, chan, duration);
chan             15622 net/wireless/nl80211.c 					  rdev, wdev, cookie, chan,
chan             15628 net/wireless/nl80211.c 					struct ieee80211_channel *chan,
chan             15634 net/wireless/nl80211.c 	trace_cfg80211_ready_on_channel_expired(wdev, cookie, chan);
chan             15636 net/wireless/nl80211.c 					  rdev, wdev, cookie, chan, 0, gfp);
chan             15641 net/wireless/nl80211.c 					struct ieee80211_channel *chan,
chan             15647 net/wireless/nl80211.c 	trace_cfg80211_tx_mgmt_expired(wdev, cookie, chan);
chan             15649 net/wireless/nl80211.c 					  rdev, wdev, cookie, chan, 0, gfp);
chan             16300 net/wireless/nl80211.c 		cfg80211_update_assoc_bss_entry(wdev, chandef->chan);
chan               32 net/wireless/ocb.c 	if (WARN_ON(!setup->chandef.chan))
chan               24 net/wireless/of.c 					 struct ieee80211_channel *chan)
chan               33 net/wireless/of.c 					       MHZ_TO_KHZ(chan->center_freq),
chan               58 net/wireless/of.c 			struct ieee80211_channel *chan = &sband->channels[i];
chan               60 net/wireless/of.c 			if (chan->flags & IEEE80211_CHAN_DISABLED)
chan               65 net/wireless/of.c 							  chan)) {
chan               67 net/wireless/of.c 					 chan->center_freq);
chan               68 net/wireless/of.c 				chan->flags |= IEEE80211_CHAN_DISABLED;
chan               37 net/wireless/pmsr.c 	switch (out->chandef.chan->band) {
chan              401 net/wireless/rdev-ops.h 			       struct ieee80211_channel *chan)
chan              404 net/wireless/rdev-ops.h 	trace_rdev_libertas_set_mesh_channel(&rdev->wiphy, dev, chan);
chan              405 net/wireless/rdev-ops.h 	ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan);
chan              700 net/wireless/rdev-ops.h 		       struct ieee80211_channel *chan,
chan              704 net/wireless/rdev-ops.h 	trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration);
chan              705 net/wireless/rdev-ops.h 	ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan,
chan              212 net/wireless/reg.c 	struct ieee80211_channel chan;
chan             1656 net/wireless/reg.c 					  const struct ieee80211_channel *chan)
chan             1670 net/wireless/reg.c 					MHZ_TO_KHZ(chan->center_freq),
chan             1674 net/wireless/reg.c 					MHZ_TO_KHZ(chan->center_freq),
chan             1698 net/wireless/reg.c 			   struct ieee80211_channel *chan)
chan             1709 net/wireless/reg.c 	flags = chan->orig_flags;
chan             1711 net/wireless/reg.c 	reg_rule = freq_reg_info(wiphy, MHZ_TO_KHZ(chan->center_freq));
chan             1731 net/wireless/reg.c 				 chan->center_freq);
chan             1732 net/wireless/reg.c 			chan->orig_flags |= IEEE80211_CHAN_DISABLED;
chan             1733 net/wireless/reg.c 			chan->flags = chan->orig_flags;
chan             1736 net/wireless/reg.c 				 chan->center_freq);
chan             1737 net/wireless/reg.c 			chan->flags |= IEEE80211_CHAN_DISABLED;
chan             1745 net/wireless/reg.c 	bw_flags = reg_rule_to_chan_bw_flags(regd, reg_rule, chan);
chan             1755 net/wireless/reg.c 		chan->flags = chan->orig_flags =
chan             1757 net/wireless/reg.c 		chan->max_antenna_gain = chan->orig_mag =
chan             1759 net/wireless/reg.c 		chan->max_reg_power = chan->max_power = chan->orig_mpwr =
chan             1762 net/wireless/reg.c 		if (chan->flags & IEEE80211_CHAN_RADAR) {
chan             1763 net/wireless/reg.c 			chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
chan             1765 net/wireless/reg.c 				chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
chan             1771 net/wireless/reg.c 	chan->dfs_state = NL80211_DFS_USABLE;
chan             1772 net/wireless/reg.c 	chan->dfs_state_entered = jiffies;
chan             1774 net/wireless/reg.c 	chan->beacon_found = false;
chan             1775 net/wireless/reg.c 	chan->flags = flags | bw_flags | map_regdom_flags(reg_rule->flags);
chan             1776 net/wireless/reg.c 	chan->max_antenna_gain =
chan             1777 net/wireless/reg.c 		min_t(int, chan->orig_mag,
chan             1779 net/wireless/reg.c 	chan->max_reg_power = (int) MBM_TO_DBM(power_rule->max_eirp);
chan             1781 net/wireless/reg.c 	if (chan->flags & IEEE80211_CHAN_RADAR) {
chan             1783 net/wireless/reg.c 			chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
chan             1785 net/wireless/reg.c 			chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
chan             1788 net/wireless/reg.c 	if (chan->orig_mpwr) {
chan             1795 net/wireless/reg.c 			chan->max_power = chan->max_reg_power;
chan             1797 net/wireless/reg.c 			chan->max_power = min(chan->orig_mpwr,
chan             1798 net/wireless/reg.c 					      chan->max_reg_power);
chan             1800 net/wireless/reg.c 		chan->max_power = chan->max_reg_power;
chan             1930 net/wireless/reg.c 	struct ieee80211_channel *chan;
chan             1934 net/wireless/reg.c 	sband = wiphy->bands[reg_beacon->chan.band];
chan             1935 net/wireless/reg.c 	chan = &sband->channels[chan_idx];
chan             1937 net/wireless/reg.c 	if (likely(chan->center_freq != reg_beacon->chan.center_freq))
chan             1940 net/wireless/reg.c 	if (chan->beacon_found)
chan             1943 net/wireless/reg.c 	chan->beacon_found = true;
chan             1951 net/wireless/reg.c 	chan_before = *chan;
chan             1953 net/wireless/reg.c 	if (chan->flags & IEEE80211_CHAN_NO_IR) {
chan             1954 net/wireless/reg.c 		chan->flags &= ~IEEE80211_CHAN_NO_IR;
chan             1959 net/wireless/reg.c 		nl80211_send_beacon_hint_event(wiphy, &chan_before, chan);
chan             1972 net/wireless/reg.c 	if (!wiphy->bands[reg_beacon->chan.band])
chan             1975 net/wireless/reg.c 	sband = wiphy->bands[reg_beacon->chan.band];
chan             1991 net/wireless/reg.c 		if (!wiphy->bands[reg_beacon->chan.band])
chan             1993 net/wireless/reg.c 		sband = wiphy->bands[reg_beacon->chan.band];
chan             2011 net/wireless/reg.c static bool is_ht40_allowed(struct ieee80211_channel *chan)
chan             2013 net/wireless/reg.c 	if (!chan)
chan             2015 net/wireless/reg.c 	if (chan->flags & IEEE80211_CHAN_DISABLED)
chan             2018 net/wireless/reg.c 	if ((chan->flags & IEEE80211_CHAN_NO_HT40) == IEEE80211_CHAN_NO_HT40)
chan             2263 net/wireless/reg.c 				  struct ieee80211_channel *chan,
chan             2273 net/wireless/reg.c 		reg_rule = freq_reg_info_regd(MHZ_TO_KHZ(chan->center_freq),
chan             2281 net/wireless/reg.c 			 chan->center_freq);
chan             2283 net/wireless/reg.c 			chan->flags |= IEEE80211_CHAN_DISABLED;
chan             2285 net/wireless/reg.c 			chan->orig_flags |= IEEE80211_CHAN_DISABLED;
chan             2286 net/wireless/reg.c 			chan->flags = chan->orig_flags;
chan             2292 net/wireless/reg.c 	bw_flags = reg_rule_to_chan_bw_flags(regd, reg_rule, chan);
chan             2294 net/wireless/reg.c 	chan->dfs_state_entered = jiffies;
chan             2295 net/wireless/reg.c 	chan->dfs_state = NL80211_DFS_USABLE;
chan             2297 net/wireless/reg.c 	chan->beacon_found = false;
chan             2300 net/wireless/reg.c 		chan->flags = chan->orig_flags | bw_flags |
chan             2303 net/wireless/reg.c 		chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
chan             2305 net/wireless/reg.c 	chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
chan             2306 net/wireless/reg.c 	chan->max_reg_power = chan->max_power =
chan             2309 net/wireless/reg.c 	if (chan->flags & IEEE80211_CHAN_RADAR) {
chan             2311 net/wireless/reg.c 			chan->dfs_cac_ms = reg_rule->dfs_cac_ms;
chan             2313 net/wireless/reg.c 			chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
chan             2316 net/wireless/reg.c 	chan->max_power = chan->max_reg_power;
chan             3136 net/wireless/reg.c 	struct ieee80211_channel *chan;
chan             3144 net/wireless/reg.c 			chan = &sband->channels[i];
chan             3145 net/wireless/reg.c 			chan->flags = chan->orig_flags;
chan             3146 net/wireless/reg.c 			chan->max_antenna_gain = chan->orig_mag;
chan             3147 net/wireless/reg.c 			chan->max_power = chan->orig_mpwr;
chan             3148 net/wireless/reg.c 			chan->beacon_found = false;
chan             3339 net/wireless/reg.c 		    pending_beacon->chan.center_freq)
chan             3373 net/wireless/reg.c 	memcpy(&reg_beacon->chan, beacon_chan,
chan             3934 net/wireless/reg.c 					   chandef->chan->center_freq))
chan             1387 net/wireless/scan.c 	channel = cfg80211_get_bss_channel(wiphy, ie, ielen, data->chan,
chan             1437 net/wireless/scan.c 	signal_valid = abs(data->chan->center_freq - channel->center_freq) <=
chan             1825 net/wireless/scan.c 					   ielen, data->chan, data->scan_width);
chan             1855 net/wireless/scan.c 	signal_valid = abs(data->chan->center_freq - channel->center_freq) <=
chan             2013 net/wireless/scan.c 				     struct ieee80211_channel *chan)
chan             2029 net/wireless/scan.c 	if (cbss->pub.channel == chan)
chan             2038 net/wireless/scan.c 	cbss->pub.channel = chan;
chan             2085 net/wireless/scan.c 		bss->pub.channel = chan;
chan              116 net/wireless/trace.h #define CHAN_ASSIGN(chan)					  \
chan              118 net/wireless/trace.h 		if (chan) {					  \
chan              119 net/wireless/trace.h 			__entry->band = chan->band;		  \
chan              120 net/wireless/trace.h 			__entry->center_freq = chan->center_freq; \
chan              136 net/wireless/trace.h 		if ((chandef) && (chandef)->chan) {			\
chan              137 net/wireless/trace.h 			__entry->band = (chandef)->chan->band;		\
chan              139 net/wireless/trace.h 				(chandef)->chan->center_freq;		\
chan             1115 net/wireless/trace.h 		 struct ieee80211_channel *chan),
chan             1116 net/wireless/trace.h 	TP_ARGS(wiphy, netdev, chan),
chan             1125 net/wireless/trace.h 		CHAN_ASSIGN(chan);
chan             1846 net/wireless/trace.h 		 struct ieee80211_channel *chan,
chan             1848 net/wireless/trace.h 	TP_ARGS(wiphy, wdev, chan, duration),
chan             1858 net/wireless/trace.h 		CHAN_ASSIGN(chan);
chan             1915 net/wireless/trace.h 		CHAN_ASSIGN(params->chan);
chan             2723 net/wireless/trace.h 		 struct ieee80211_channel *chan,
chan             2725 net/wireless/trace.h 	TP_ARGS(wdev, cookie, chan, duration),
chan             2735 net/wireless/trace.h 		CHAN_ASSIGN(chan);
chan             2745 net/wireless/trace.h 		 struct ieee80211_channel *chan),
chan             2746 net/wireless/trace.h 	TP_ARGS(wdev, cookie, chan),
chan             2755 net/wireless/trace.h 		CHAN_ASSIGN(chan);
chan             2763 net/wireless/trace.h 		 struct ieee80211_channel *chan),
chan             2764 net/wireless/trace.h 	TP_ARGS(wdev, cookie, chan),
chan             2773 net/wireless/trace.h 		CHAN_ASSIGN(chan);
chan             3232 net/wireless/trace.h 		CHAN_ASSIGN(data->chan);
chan               75 net/wireless/util.c int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
chan               79 net/wireless/util.c 	if (chan <= 0)
chan               83 net/wireless/util.c 		if (chan == 14)
chan               85 net/wireless/util.c 		else if (chan < 14)
chan               86 net/wireless/util.c 			return 2407 + chan * 5;
chan               89 net/wireless/util.c 		if (chan >= 182 && chan <= 196)
chan               90 net/wireless/util.c 			return 4000 + chan * 5;
chan               92 net/wireless/util.c 			return 5000 + chan * 5;
chan               96 net/wireless/util.c 		if (chan <= 253)
chan               97 net/wireless/util.c 			return 5940 + chan * 5;
chan              100 net/wireless/util.c 		if (chan < 7)
chan              101 net/wireless/util.c 			return 56160 + chan * 2160;
chan             1550 net/wireless/util.c 			if (freq > chandef->chan->center_freq)
chan             1593 net/wireless/util.c 			if (freq > chandef->chan->center_freq)
chan             1609 net/wireless/util.c 			if (freq > chandef->chan->center_freq)
chan             1625 net/wireless/util.c 			if (freq > chandef->chan->center_freq)
chan             1641 net/wireless/util.c 			if (freq > chandef->chan->center_freq)
chan              194 net/wireless/wext-compat.c 			struct ieee80211_channel *chan = &sband->channels[i];
chan              196 net/wireless/wext-compat.c 			if (!(chan->flags & IEEE80211_CHAN_DISABLED)) {
chan              199 net/wireless/wext-compat.c 						chan->center_freq);
chan              200 net/wireless/wext-compat.c 				range->freq[c].m = chan->center_freq;
chan              775 net/wireless/wext-compat.c 		chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq);
chan              776 net/wireless/wext-compat.c 		if (!chandef.chan)
chan              786 net/wireless/wext-compat.c 		chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq);
chan              787 net/wireless/wext-compat.c 		if (!chandef.chan)
chan              816 net/wireless/wext-compat.c 		freq->m = chandef.chan->center_freq;
chan               71 net/wireless/wext-sme.c 	struct ieee80211_channel *chan = NULL;
chan               83 net/wireless/wext-sme.c 		chan = ieee80211_get_channel(wdev->wiphy, freq);
chan               84 net/wireless/wext-sme.c 		if (!chan)
chan               86 net/wireless/wext-sme.c 		if (chan->flags & IEEE80211_CHAN_DISABLED)
chan               95 net/wireless/wext-sme.c 		if (wdev->wext.connect.channel == chan) {
chan              109 net/wireless/wext-sme.c 	wdev->wext.connect.channel = chan;
chan              121 net/wireless/wext-sme.c 	struct ieee80211_channel *chan = NULL;
chan              129 net/wireless/wext-sme.c 		chan = wdev->current_bss->pub.channel;
chan              131 net/wireless/wext-sme.c 		chan = wdev->wext.connect.channel;
chan              134 net/wireless/wext-sme.c 	if (chan) {
chan              135 net/wireless/wext-sme.c 		freq->m = chan->center_freq;
chan               35 sound/arm/pxa2xx-pcm-lib.c 	struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream);
chan               53 sound/arm/pxa2xx-pcm-lib.c 	ret = dmaengine_slave_config(chan, &config);
chan              146 sound/core/pcm_dmaengine.c 	struct dma_chan *chan = prtd->dma_chan;
chan              157 sound/core/pcm_dmaengine.c 	desc = dmaengine_prep_dma_cyclic(chan,
chan              293 sound/core/pcm_dmaengine.c 	struct dma_chan *chan)
chan              298 sound/core/pcm_dmaengine.c 	if (!chan)
chan              310 sound/core/pcm_dmaengine.c 	prtd->dma_chan = chan;
chan               34 sound/core/seq/seq_midi_emul.c 		     struct snd_midi_channel *chan,
chan               38 sound/core/seq/seq_midi_emul.c 		       struct snd_midi_channel *chan,
chan               40 sound/core/seq/seq_midi_emul.c static void rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
chan               42 sound/core/seq/seq_midi_emul.c static void nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
chan               47 sound/core/seq/seq_midi_emul.c 			   struct snd_midi_channel *chan);
chan               49 sound/core/seq/seq_midi_emul.c 			  struct snd_midi_channel *chan);
chan               50 sound/core/seq/seq_midi_emul.c static void snd_midi_reset_controllers(struct snd_midi_channel *chan);
chan               73 sound/core/seq/seq_midi_emul.c 	struct snd_midi_channel *chan;
chan               93 sound/core/seq/seq_midi_emul.c 	chan = chanset->channels + dest_channel;
chan              115 sound/core/seq/seq_midi_emul.c 		if (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON) {
chan              117 sound/core/seq/seq_midi_emul.c 				ops->note_off(drv, ev->data.note.note, 0, chan);
chan              119 sound/core/seq/seq_midi_emul.c 		chan->note[ev->data.note.note] = SNDRV_MIDI_NOTE_ON;
chan              121 sound/core/seq/seq_midi_emul.c 			ops->note_on(drv, ev->data.note.note, ev->data.note.velocity, chan);
chan              124 sound/core/seq/seq_midi_emul.c 		if (! (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON))
chan              127 sound/core/seq/seq_midi_emul.c 			note_off(ops, drv, chan, ev->data.note.note, ev->data.note.velocity);
chan              131 sound/core/seq/seq_midi_emul.c 			ops->key_press(drv, ev->data.note.note, ev->data.note.velocity, chan);
chan              134 sound/core/seq/seq_midi_emul.c 		do_control(ops, drv, chanset, chan,
chan              138 sound/core/seq/seq_midi_emul.c 		chan->midi_program = ev->data.control.value;
chan              141 sound/core/seq/seq_midi_emul.c 		chan->midi_pitchbend = ev->data.control.value;
chan              143 sound/core/seq/seq_midi_emul.c 			ops->control(drv, MIDI_CTL_PITCHBEND, chan);
chan              146 sound/core/seq/seq_midi_emul.c 		chan->midi_pressure = ev->data.control.value;
chan              148 sound/core/seq/seq_midi_emul.c 			ops->control(drv, MIDI_CTL_CHAN_PRESSURE, chan);
chan              154 sound/core/seq/seq_midi_emul.c 			chan->control[ev->data.control.param + 32] =
chan              156 sound/core/seq/seq_midi_emul.c 			do_control(ops, drv, chanset, chan,
chan              160 sound/core/seq/seq_midi_emul.c 			do_control(ops, drv, chanset, chan,
chan              166 sound/core/seq/seq_midi_emul.c 		chan->param_type = SNDRV_MIDI_PARAM_TYPE_NONREGISTERED;
chan              167 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_MSB_DATA_ENTRY]
chan              169 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_LSB_DATA_ENTRY]
chan              171 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB]
chan              173 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB]
chan              175 sound/core/seq/seq_midi_emul.c 		nrpn(ops, drv, chan, chanset);
chan              179 sound/core/seq/seq_midi_emul.c 		chan->param_type = SNDRV_MIDI_PARAM_TYPE_REGISTERED;
chan              180 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_MSB_DATA_ENTRY]
chan              182 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_LSB_DATA_ENTRY]
chan              184 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_REGIST_PARM_NUM_MSB]
chan              186 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_REGIST_PARM_NUM_LSB]
chan              188 sound/core/seq/seq_midi_emul.c 		rpn(ops, drv, chan, chanset);
chan              232 sound/core/seq/seq_midi_emul.c note_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
chan              235 sound/core/seq/seq_midi_emul.c 	if (chan->gm_hold) {
chan              237 sound/core/seq/seq_midi_emul.c 		chan->note[note] |= SNDRV_MIDI_NOTE_RELEASED;
chan              238 sound/core/seq/seq_midi_emul.c 	} else if (chan->note[note] & SNDRV_MIDI_NOTE_SOSTENUTO) {
chan              241 sound/core/seq/seq_midi_emul.c 		chan->note[note] |= SNDRV_MIDI_NOTE_RELEASED;
chan              243 sound/core/seq/seq_midi_emul.c 		chan->note[note] = 0;
chan              245 sound/core/seq/seq_midi_emul.c 			ops->note_off(drv, note, vel, chan);
chan              255 sound/core/seq/seq_midi_emul.c 	   struct snd_midi_channel *chan, int control, int value)
chan              259 sound/core/seq/seq_midi_emul.c 	if (control >= ARRAY_SIZE(chan->control))
chan              267 sound/core/seq/seq_midi_emul.c 	chan->control[control] = value;
chan              274 sound/core/seq/seq_midi_emul.c 				if (chan->note[i] & SNDRV_MIDI_NOTE_RELEASED) {
chan              275 sound/core/seq/seq_midi_emul.c 					chan->note[i] = SNDRV_MIDI_NOTE_OFF;
chan              277 sound/core/seq/seq_midi_emul.c 						ops->note_off(drv, i, 0, chan);
chan              288 sound/core/seq/seq_midi_emul.c 				if (chan->note[i] & SNDRV_MIDI_NOTE_ON)
chan              289 sound/core/seq/seq_midi_emul.c 					chan->note[i] |= SNDRV_MIDI_NOTE_SOSTENUTO;
chan              294 sound/core/seq/seq_midi_emul.c 				if (chan->note[i] & SNDRV_MIDI_NOTE_SOSTENUTO) {
chan              295 sound/core/seq/seq_midi_emul.c 					chan->note[i] &= ~SNDRV_MIDI_NOTE_SOSTENUTO;
chan              296 sound/core/seq/seq_midi_emul.c 					if (chan->note[i] & SNDRV_MIDI_NOTE_RELEASED) {
chan              297 sound/core/seq/seq_midi_emul.c 						chan->note[i] = SNDRV_MIDI_NOTE_OFF;
chan              299 sound/core/seq/seq_midi_emul.c 							ops->note_off(drv, i, 0, chan);
chan              306 sound/core/seq/seq_midi_emul.c 		chan->control[MIDI_CTL_LSB_DATA_ENTRY] = 0;
chan              309 sound/core/seq/seq_midi_emul.c 		if (chan->param_type == SNDRV_MIDI_PARAM_TYPE_REGISTERED)
chan              310 sound/core/seq/seq_midi_emul.c 			rpn(ops, drv, chan, chset);
chan              312 sound/core/seq/seq_midi_emul.c 			nrpn(ops, drv, chan, chset);
chan              316 sound/core/seq/seq_midi_emul.c 		chan->param_type = SNDRV_MIDI_PARAM_TYPE_REGISTERED;
chan              320 sound/core/seq/seq_midi_emul.c 		chan->param_type = SNDRV_MIDI_PARAM_TYPE_NONREGISTERED;
chan              324 sound/core/seq/seq_midi_emul.c 		all_sounds_off(ops, drv, chan);
chan              328 sound/core/seq/seq_midi_emul.c 		all_notes_off(ops, drv, chan);
chan              334 sound/core/seq/seq_midi_emul.c 				chan->drum_channel = 1;
chan              336 sound/core/seq/seq_midi_emul.c 				chan->drum_channel = 0;
chan              343 sound/core/seq/seq_midi_emul.c 		snd_midi_reset_controllers(chan);
chan              363 sound/core/seq/seq_midi_emul.c 			ops->control(drv, control, chan);
chan              381 sound/core/seq/seq_midi_emul.c 		struct snd_midi_channel *chan = chset->channels + i;
chan              382 sound/core/seq/seq_midi_emul.c 		memset(chan->note, 0, sizeof(chan->note));
chan              384 sound/core/seq/seq_midi_emul.c 		chan->midi_aftertouch = 0;
chan              385 sound/core/seq/seq_midi_emul.c 		chan->midi_pressure = 0;
chan              386 sound/core/seq/seq_midi_emul.c 		chan->midi_program = 0;
chan              387 sound/core/seq/seq_midi_emul.c 		chan->midi_pitchbend = 0;
chan              388 sound/core/seq/seq_midi_emul.c 		snd_midi_reset_controllers(chan);
chan              389 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_pitch_bend_range = 256; /* 2 semitones */
chan              390 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_fine_tuning = 0;
chan              391 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_coarse_tuning = 0;
chan              394 sound/core/seq/seq_midi_emul.c 			chan->drum_channel = 1;
chan              396 sound/core/seq/seq_midi_emul.c 			chan->drum_channel = 0;
chan              405 sound/core/seq/seq_midi_emul.c rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
chan              412 sound/core/seq/seq_midi_emul.c 		type = (chan->control[MIDI_CTL_REGIST_PARM_NUM_MSB] << 8) |
chan              413 sound/core/seq/seq_midi_emul.c 			chan->control[MIDI_CTL_REGIST_PARM_NUM_LSB];
chan              414 sound/core/seq/seq_midi_emul.c 		val = (chan->control[MIDI_CTL_MSB_DATA_ENTRY] << 7) |
chan              415 sound/core/seq/seq_midi_emul.c 			chan->control[MIDI_CTL_LSB_DATA_ENTRY];
chan              420 sound/core/seq/seq_midi_emul.c 			chan->gm_rpn_pitch_bend_range = val;
chan              425 sound/core/seq/seq_midi_emul.c 			chan->gm_rpn_fine_tuning = val - 8192;
chan              430 sound/core/seq/seq_midi_emul.c 			chan->gm_rpn_coarse_tuning = val - 8192;
chan              445 sound/core/seq/seq_midi_emul.c nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
chan              450 sound/core/seq/seq_midi_emul.c 		ops->nrpn(drv, chan, chset);
chan              587 sound/core/seq/seq_midi_emul.c all_sounds_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
chan              594 sound/core/seq/seq_midi_emul.c 		if (chan->note[n]) {
chan              595 sound/core/seq/seq_midi_emul.c 			ops->note_terminate(drv, n, chan);
chan              596 sound/core/seq/seq_midi_emul.c 			chan->note[n] = 0;
chan              605 sound/core/seq/seq_midi_emul.c all_notes_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan)
chan              612 sound/core/seq/seq_midi_emul.c 		if (chan->note[n] == SNDRV_MIDI_NOTE_ON)
chan              613 sound/core/seq/seq_midi_emul.c 			note_off(ops, drv, chan, n, 0);
chan              643 sound/core/seq/seq_midi_emul.c 	struct snd_midi_channel *chan;
chan              646 sound/core/seq/seq_midi_emul.c 	chan = kmalloc_array(n, sizeof(struct snd_midi_channel), GFP_KERNEL);
chan              647 sound/core/seq/seq_midi_emul.c 	if (chan) {
chan              649 sound/core/seq/seq_midi_emul.c 			snd_midi_channel_init(chan+i, i);
chan              652 sound/core/seq/seq_midi_emul.c 	return chan;
chan              663 sound/core/seq/seq_midi_emul.c 		struct snd_midi_channel *chan = chset->channels + ch;
chan              664 sound/core/seq/seq_midi_emul.c 		snd_midi_reset_controllers(chan);
chan              665 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_pitch_bend_range = 256; /* 2 semitones */
chan              666 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_fine_tuning = 0;
chan              667 sound/core/seq/seq_midi_emul.c 		chan->gm_rpn_coarse_tuning = 0;
chan              670 sound/core/seq/seq_midi_emul.c 			chan->drum_channel = 1;
chan              672 sound/core/seq/seq_midi_emul.c 			chan->drum_channel = 0;
chan              697 sound/core/seq/seq_midi_emul.c static void snd_midi_reset_controllers(struct snd_midi_channel *chan)
chan              699 sound/core/seq/seq_midi_emul.c 	memset(chan->control, 0, sizeof(chan->control));
chan              700 sound/core/seq/seq_midi_emul.c 	chan->gm_volume = 127;
chan              701 sound/core/seq/seq_midi_emul.c 	chan->gm_expression = 127;
chan              702 sound/core/seq/seq_midi_emul.c 	chan->gm_pan = 64;
chan              122 sound/drivers/opl3/opl3_drums.c 				  int vel, struct snd_midi_channel *chan)
chan              131 sound/drivers/opl3/opl3_drums.c 	snd_opl3_calc_volume(&reg_val, vel, chan);
chan              138 sound/drivers/opl3/opl3_drums.c 	if (chan->gm_pan < 43)
chan              140 sound/drivers/opl3/opl3_drums.c 	if (chan->gm_pan > 85)
chan              170 sound/drivers/opl3/opl3_drums.c 			  struct snd_midi_channel *chan)
chan              203 sound/drivers/opl3/opl3_drums.c 		snd_opl3_drum_vol_set(opl3, drum_voice, vel, chan);
chan               15 sound/drivers/opl3/opl3_midi.c 				     struct snd_midi_channel *chan);
chan               47 sound/drivers/opl3/opl3_midi.c 			  struct snd_midi_channel *chan)
chan               52 sound/drivers/opl3/opl3_midi.c 	volume = (vel * chan->gm_volume * chan->gm_expression) / (127*127);
chan               80 sound/drivers/opl3/opl3_midi.c 				int note, struct snd_midi_channel *chan)
chan               86 sound/drivers/opl3/opl3_midi.c 	if (chan->midi_pitchbend) {
chan               87 sound/drivers/opl3/opl3_midi.c 		int pitchbend = chan->midi_pitchbend;
chan              125 sound/drivers/opl3/opl3_midi.c 			  struct snd_midi_channel *chan) {
chan              237 sound/drivers/opl3/opl3_midi.c 							 vp->chan);
chan              276 sound/drivers/opl3/opl3_midi.c void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
chan              308 sound/drivers/opl3/opl3_midi.c 		   chan->number, chan->midi_program, note, vel);
chan              314 sound/drivers/opl3/opl3_midi.c 		if (chan->drum_channel) {
chan              319 sound/drivers/opl3/opl3_midi.c 			bank = chan->gm_bank_select;
chan              320 sound/drivers/opl3/opl3_midi.c 			prg = chan->midi_program;
chan              324 sound/drivers/opl3/opl3_midi.c 		if (chan->number >= MAX_OPL3_VOICES)
chan              329 sound/drivers/opl3/opl3_midi.c 		prg = chan->midi_program;
chan              335 sound/drivers/opl3/opl3_midi.c 		snd_opl3_drum_switch(opl3, note, vel, 1, chan);
chan              369 sound/drivers/opl3/opl3_midi.c 		voice = opl3_get_voice(opl3, instr_4op, chan);
chan              372 sound/drivers/opl3/opl3_midi.c 		voice = snd_opl3_oss_map[chan->number];		
chan              442 sound/drivers/opl3/opl3_midi.c 		snd_opl3_calc_volume(&vol_op[3], vel, chan);
chan              445 sound/drivers/opl3/opl3_midi.c 			snd_opl3_calc_volume(&vol_op[2], vel, chan);
chan              448 sound/drivers/opl3/opl3_midi.c 			snd_opl3_calc_volume(&vol_op[0], vel, chan);
chan              451 sound/drivers/opl3/opl3_midi.c 			snd_opl3_calc_volume(&vol_op[1], vel, chan);
chan              454 sound/drivers/opl3/opl3_midi.c 		snd_opl3_calc_volume(&vol_op[1], vel, chan);
chan              456 sound/drivers/opl3/opl3_midi.c 			snd_opl3_calc_volume(&vol_op[0], vel, chan);
chan              496 sound/drivers/opl3/opl3_midi.c 	if (chan->gm_pan < 43)
chan              498 sound/drivers/opl3/opl3_midi.c 	if (chan->gm_pan > 85)
chan              508 sound/drivers/opl3/opl3_midi.c 		if (chan->gm_pan < 43)
chan              510 sound/drivers/opl3/opl3_midi.c 		if (chan->gm_pan > 85)
chan              530 sound/drivers/opl3/opl3_midi.c 	snd_opl3_calc_pitch(&fnum, &blocknum, note, chan);
chan              563 sound/drivers/opl3/opl3_midi.c 	vp->chan = chan;
chan              571 sound/drivers/opl3/opl3_midi.c 		vp2->chan = chan;
chan              655 sound/drivers/opl3/opl3_midi.c 				     struct snd_midi_channel *chan)
chan              666 sound/drivers/opl3/opl3_midi.c 		   chan->number, chan->midi_program, note);
chan              670 sound/drivers/opl3/opl3_midi.c 		if (chan->drum_channel && use_internal_drums) {
chan              671 sound/drivers/opl3/opl3_midi.c 			snd_opl3_drum_switch(opl3, note, vel, 0, chan);
chan              678 sound/drivers/opl3/opl3_midi.c 			if (vp->state > 0 && vp->chan == chan && vp->note == note) {
chan              684 sound/drivers/opl3/opl3_midi.c 		if (chan->number < MAX_OPL3_VOICES) {
chan              685 sound/drivers/opl3/opl3_midi.c 			voice = snd_opl3_oss_map[chan->number];		
chan              692 sound/drivers/opl3/opl3_midi.c 		       struct snd_midi_channel *chan)
chan              698 sound/drivers/opl3/opl3_midi.c 	snd_opl3_note_off_unsafe(p, note, vel, chan);
chan              705 sound/drivers/opl3/opl3_midi.c void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
chan              709 sound/drivers/opl3/opl3_midi.c 		   chan->number, chan->midi_program);
chan              716 sound/drivers/opl3/opl3_midi.c void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan)
chan              720 sound/drivers/opl3/opl3_midi.c 		   chan->number, chan->midi_program);
chan              738 sound/drivers/opl3/opl3_midi.c 	if (vp->chan == NULL)
chan              751 sound/drivers/opl3/opl3_midi.c 	snd_opl3_calc_pitch(&fnum, &blocknum, vp->note, vp->chan);
chan              772 sound/drivers/opl3/opl3_midi.c static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
chan              784 sound/drivers/opl3/opl3_midi.c 			if (vp->state > 0 && vp->chan == chan) {
chan              790 sound/drivers/opl3/opl3_midi.c 		if (chan->number < MAX_OPL3_VOICES) {
chan              791 sound/drivers/opl3/opl3_midi.c 			voice = snd_opl3_oss_map[chan->number];		
chan              802 sound/drivers/opl3/opl3_midi.c void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan)
chan              809 sound/drivers/opl3/opl3_midi.c 		   type, chan->number, chan->midi_program);
chan              814 sound/drivers/opl3/opl3_midi.c 		if (chan->control[MIDI_CTL_MSB_MODWHEEL] > 63)
chan              822 sound/drivers/opl3/opl3_midi.c 		if (chan->control[MIDI_CTL_E2_TREMOLO_DEPTH] > 63)
chan              830 sound/drivers/opl3/opl3_midi.c 		snd_opl3_pitch_ctrl(opl3, chan);
chan              838 sound/drivers/opl3/opl3_midi.c void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan,
chan              843 sound/drivers/opl3/opl3_midi.c 		   chan->number, chan->midi_program);
chan               18 sound/drivers/opl3/opl3_voice.h void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               19 sound/drivers/opl3/opl3_voice.h void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               20 sound/drivers/opl3/opl3_voice.h void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               21 sound/drivers/opl3/opl3_voice.h void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
chan               22 sound/drivers/opl3/opl3_voice.h void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
chan               23 sound/drivers/opl3/opl3_voice.h void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
chan               26 sound/drivers/opl3/opl3_voice.h void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
chan               31 sound/drivers/opl3/opl3_voice.h void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
chan              162 sound/drivers/opl4/opl4_local.h 	struct snd_midi_channel *chan;
chan              225 sound/drivers/opl4/opl4_local.h void snd_opl4_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
chan              226 sound/drivers/opl4/opl4_local.h void snd_opl4_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
chan              227 sound/drivers/opl4/opl4_local.h void snd_opl4_terminate_note(void *p, int note, struct snd_midi_channel *chan);
chan              228 sound/drivers/opl4/opl4_local.h void snd_opl4_control(void *p, int type, struct snd_midi_channel *chan);
chan              312 sound/drivers/opl4/opl4_synth.c static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan,
chan              322 sound/drivers/opl4/opl4_synth.c 		if (voice->chan == chan && voice->note == note) {
chan              333 sound/drivers/opl4/opl4_synth.c 				    struct snd_midi_channel *chan,
chan              343 sound/drivers/opl4/opl4_synth.c 		if (voice->chan == chan) {
chan              363 sound/drivers/opl4/opl4_synth.c 		if (voice->chan)
chan              375 sound/drivers/opl4/opl4_synth.c 	att += snd_opl4_volume_table[voice->chan->gm_volume & 0x7f];
chan              376 sound/drivers/opl4/opl4_synth.c 	att += snd_opl4_volume_table[voice->chan->gm_expression & 0x7f];
chan              392 sound/drivers/opl4/opl4_synth.c 	if (!voice->chan->drum_channel)
chan              393 sound/drivers/opl4/opl4_synth.c 		pan += (voice->chan->control[MIDI_CTL_MSB_PAN] - 0x40) >> 3;
chan              408 sound/drivers/opl4/opl4_synth.c 	if (voice->chan->drum_channel)
chan              411 sound/drivers/opl4/opl4_synth.c 		* (voice->chan->control[MIDI_CTL_VIBRATO_DEPTH] & 0x7f);
chan              422 sound/drivers/opl4/opl4_synth.c 	struct snd_midi_channel *chan = voice->chan;
chan              425 sound/drivers/opl4/opl4_synth.c 	note = chan->drum_channel ? 60 : voice->note;
chan              432 sound/drivers/opl4/opl4_synth.c 	if (!chan->drum_channel)
chan              433 sound/drivers/opl4/opl4_synth.c 		pitch += chan->gm_rpn_coarse_tuning;
chan              434 sound/drivers/opl4/opl4_synth.c 	pitch += chan->gm_rpn_fine_tuning >> 7;
chan              435 sound/drivers/opl4/opl4_synth.c 	pitch += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 0x2000;
chan              482 sound/drivers/opl4/opl4_synth.c void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_channel *chan)
chan              492 sound/drivers/opl4/opl4_synth.c 	i = chan->drum_channel ? 0x80 : (chan->midi_program & 0x7f);
chan              508 sound/drivers/opl4/opl4_synth.c 		voice[i]->chan = chan;
chan              563 sound/drivers/opl4/opl4_synth.c void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_channel *chan)
chan              567 sound/drivers/opl4/opl4_synth.c 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_voice_off);
chan              578 sound/drivers/opl4/opl4_synth.c void snd_opl4_terminate_note(void *private_data, int note, struct snd_midi_channel *chan)
chan              582 sound/drivers/opl4/opl4_synth.c 	snd_opl4_do_for_note(opl4, note, chan, snd_opl4_terminate_voice);
chan              585 sound/drivers/opl4/opl4_synth.c void snd_opl4_control(void *private_data, int type, struct snd_midi_channel *chan)
chan              591 sound/drivers/opl4/opl4_synth.c 		chan->control[MIDI_CTL_VIBRATO_DEPTH] = chan->control[MIDI_CTL_MSB_MODWHEEL];
chan              592 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
chan              595 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
chan              598 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pan);
chan              601 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
chan              607 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
chan              619 sound/drivers/opl4/opl4_synth.c 		snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pitch);
chan              226 sound/isa/sb/emu8000_callback.c 	struct snd_midi_channel *chan;
chan              231 sound/isa/sb/emu8000_callback.c 	chan = vp->chan;
chan              274 sound/isa/sb/emu8000_callback.c 	temp += (int)chan->control[MIDI_CTL_E3_CHORUS_DEPTH] * 9 / 10;
chan              311 sound/isa/sb/emu8000_callback.c 	temp += (int)vp->chan->control[MIDI_CTL_E1_REVERB_DEPTH] * 9 / 10;
chan              379 sound/isa/sb/emu8000_callback.c 	modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
chan              404 sound/isa/sb/emu8000_callback.c 	modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
chan              360 sound/mips/sgio2audio.c 	src_pos = readq(&mace->perif.audio.chan[ch].read_ptr);
chan              383 sound/mips/sgio2audio.c 	writeq(src_pos, &mace->perif.audio.chan[ch].read_ptr); /* in bytes */
chan              408 sound/mips/sgio2audio.c 	dst_pos = readq(&mace->perif.audio.chan[ch].write_ptr);
chan              433 sound/mips/sgio2audio.c 	writeq(dst_pos, &mace->perif.audio.chan[ch].write_ptr); /* in bytes */
chan              443 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = substream->runtime->private_data;
chan              444 sound/mips/sgio2audio.c 	int ch = chan->idx;
chan              447 sound/mips/sgio2audio.c 	writeq(CHANNEL_CONTROL_RESET, &mace->perif.audio.chan[ch].control);
chan              449 sound/mips/sgio2audio.c 	writeq(0, &mace->perif.audio.chan[ch].control);
chan              457 sound/mips/sgio2audio.c 	       &mace->perif.audio.chan[ch].control);
chan              463 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = substream->runtime->private_data;
chan              465 sound/mips/sgio2audio.c 	writeq(0, &mace->perif.audio.chan[chan->idx].control);
chan              471 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = dev_id;
chan              476 sound/mips/sgio2audio.c 	substream = chan->substream;
chan              478 sound/mips/sgio2audio.c 	ch = chan->idx;
chan              482 sound/mips/sgio2audio.c 		readq(&mace->perif.audio.chan[ch].depth) - 32;
chan              491 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = dev_id;
chan              496 sound/mips/sgio2audio.c 	substream = chan->substream;
chan              498 sound/mips/sgio2audio.c 	ch = chan->idx;
chan              501 sound/mips/sgio2audio.c 		readq(&mace->perif.audio.chan[ch].depth) - 32;
chan              510 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = dev_id;
chan              513 sound/mips/sgio2audio.c 	substream = chan->substream;
chan              600 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = substream->runtime->private_data;
chan              601 sound/mips/sgio2audio.c 	int ch = chan->idx;
chan              656 sound/mips/sgio2audio.c 	struct snd_sgio2audio_chan *chan = substream->runtime->private_data;
chan              660 sound/mips/sgio2audio.c 			       chip->channel[chan->idx].pos);
chan              312 sound/pci/emu10k1/emu10k1_callback.c 	struct snd_midi_channel *chan;
chan              320 sound/pci/emu10k1/emu10k1_callback.c 	chan = vp->chan;
chan              387 sound/pci/emu10k1/emu10k1_callback.c 	temp += (int)vp->chan->control[MIDI_CTL_E1_REVERB_DEPTH] * 9 / 10;
chan              395 sound/pci/emu10k1/emu10k1_callback.c 	temp += (int)chan->control[MIDI_CTL_E3_CHORUS_DEPTH] * 9 / 10;
chan              504 sound/pci/emu10k1/emu10k1_callback.c 	modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
chan              522 sound/pci/emu10k1/emu10k1_callback.c 	modulation = vp->chan->gm_modulation + vp->chan->midi_pressure;
chan             1467 sound/pci/es1968.c 	struct esschan *chan = runtime->private_data;
chan             1470 sound/pci/es1968.c 	if (chan->memory) {
chan             1471 sound/pci/es1968.c 		if (chan->memory->buf.bytes >= size) {
chan             1475 sound/pci/es1968.c 		snd_es1968_free_memory(chip, chan->memory);
chan             1477 sound/pci/es1968.c 	chan->memory = snd_es1968_new_memory(chip, size);
chan             1478 sound/pci/es1968.c 	if (chan->memory == NULL) {
chan             1483 sound/pci/es1968.c 	snd_pcm_set_runtime_buffer(substream, &chan->memory->buf);
chan             1492 sound/pci/es1968.c 	struct esschan *chan;
chan             1496 sound/pci/es1968.c 	chan = runtime->private_data;
chan             1497 sound/pci/es1968.c 	if (chan->memory) {
chan             1498 sound/pci/es1968.c 		snd_es1968_free_memory(chip, chan->memory);
chan             1499 sound/pci/es1968.c 		chan->memory = NULL;
chan             3203 sound/pci/hda/patch_hdmi.c 	int chan = channels ? (channels - 1) : 1;
chan             3229 sound/pci/hda/patch_hdmi.c 			(0x71 - chan - chanmask));
chan             3897 sound/pci/hda/patch_hdmi.c 		int chan = 7 - atihdmi_paired_swap_fc_lfe(7 - c);
chan             3898 sound/pci/hda/patch_hdmi.c 		int spk = cap->speakers[chan];
chan             3901 sound/pci/hda/patch_hdmi.c 			if (cap->speakers[chan + (chan % 2 ? -1 : 1)])
chan             1146 sound/pci/rme9652/hdspm.c static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan,
chan             1149 sound/pci/rme9652/hdspm.c 	if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS)
chan             1152 sound/pci/rme9652/hdspm.c 	return hdspm->mixer->ch[chan].in[in];
chan             1155 sound/pci/rme9652/hdspm.c static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan,
chan             1158 sound/pci/rme9652/hdspm.c 	if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS)
chan             1160 sound/pci/rme9652/hdspm.c 	return hdspm->mixer->ch[chan].pb[pb];
chan             1163 sound/pci/rme9652/hdspm.c static int hdspm_write_in_gain(struct hdspm *hdspm, unsigned int chan,
chan             1166 sound/pci/rme9652/hdspm.c 	if (chan >= HDSPM_MIXER_CHANNELS || in >= HDSPM_MIXER_CHANNELS)
chan             1171 sound/pci/rme9652/hdspm.c 		    ((in + 128 * chan) * sizeof(u32)),
chan             1172 sound/pci/rme9652/hdspm.c 		    (hdspm->mixer->ch[chan].in[in] = data & 0xFFFF));
chan             1176 sound/pci/rme9652/hdspm.c static int hdspm_write_pb_gain(struct hdspm *hdspm, unsigned int chan,
chan             1179 sound/pci/rme9652/hdspm.c 	if (chan >= HDSPM_MIXER_CHANNELS || pb >= HDSPM_MIXER_CHANNELS)
chan             1184 sound/pci/rme9652/hdspm.c 		    ((64 + pb + 128 * chan) * sizeof(u32)),
chan             1185 sound/pci/rme9652/hdspm.c 		    (hdspm->mixer->ch[chan].pb[pb] = data & 0xFFFF));
chan              214 sound/pci/via82xx.c #define VIA8233_INTR_MASK(chan) ((VIA8233_REG_SGD_STAT_FLAG|VIA8233_REG_SGD_STAT_EOL) << ((chan) * 4))
chan               38 sound/soc/cirrus/ep93xx-pcm.c static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param)
chan               42 sound/soc/cirrus/ep93xx-pcm.c 	if (data->direction == ep93xx_dma_chan_direction(chan)) {
chan               43 sound/soc/cirrus/ep93xx-pcm.c 		chan->private = data;
chan               34 sound/soc/fsl/fsl_asrc_dma.c static bool filter(struct dma_chan *chan, void *param)
chan               36 sound/soc/fsl/fsl_asrc_dma.c 	if (!imx_dma_is_general_purpose(chan))
chan               39 sound/soc/fsl/fsl_asrc_dma.c 	chan->private = param;
chan               22 sound/soc/fsl/imx-pcm-dma.c static bool filter(struct dma_chan *chan, void *param)
chan               24 sound/soc/fsl/imx-pcm-dma.c 	if (!imx_dma_is_general_purpose(chan))
chan               27 sound/soc/fsl/imx-pcm-dma.c 	chan->private = param;
chan               98 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_writel(struct img_i2s_in *i2s, u32 chan,
chan              101 sound/soc/img/img-i2s-in.c 	writel(val, i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg);
chan              104 sound/soc/img/img-i2s-in.c static inline u32 img_i2s_in_ch_readl(struct img_i2s_in *i2s, u32 chan,
chan              107 sound/soc/img/img-i2s-in.c 	return readl(i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg);
chan              110 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_disable(struct img_i2s_in *i2s, u32 chan)
chan              114 sound/soc/img/img-i2s-in.c 	reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL);
chan              116 sound/soc/img/img-i2s-in.c 	img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL);
chan              119 sound/soc/img/img-i2s-in.c static inline void img_i2s_in_ch_enable(struct img_i2s_in *i2s, u32 chan)
chan              123 sound/soc/img/img-i2s-in.c 	reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL);
chan              125 sound/soc/img/img-i2s-in.c 	img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL);
chan              110 sound/soc/img/img-i2s-out.c 					u32 chan, u32 val, u32 reg)
chan              112 sound/soc/img/img-i2s-out.c 	writel(val, i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg);
chan              115 sound/soc/img/img-i2s-out.c static inline u32 img_i2s_out_ch_readl(struct img_i2s_out *i2s, u32 chan,
chan              118 sound/soc/img/img-i2s-out.c 	return readl(i2s->channel_base + (chan * IMG_I2S_OUT_CH_STRIDE) + reg);
chan              121 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_ch_disable(struct img_i2s_out *i2s, u32 chan)
chan              125 sound/soc/img/img-i2s-out.c 	reg = img_i2s_out_ch_readl(i2s, chan, IMG_I2S_OUT_CH_CTL);
chan              127 sound/soc/img/img-i2s-out.c 	img_i2s_out_ch_writel(i2s, chan, reg, IMG_I2S_OUT_CH_CTL);
chan              130 sound/soc/img/img-i2s-out.c static inline void img_i2s_out_ch_enable(struct img_i2s_out *i2s, u32 chan)
chan              134 sound/soc/img/img-i2s-out.c 	reg = img_i2s_out_ch_readl(i2s, chan, IMG_I2S_OUT_CH_CTL);
chan              136 sound/soc/img/img-i2s-out.c 	img_i2s_out_ch_writel(i2s, chan, reg, IMG_I2S_OUT_CH_CTL);
chan              210 sound/soc/intel/common/sst-firmware.c static bool dma_chan_filter(struct dma_chan *chan, void *param)
chan              214 sound/soc/intel/common/sst-firmware.c 	return chan->device->dev == dsp->dma_dev;
chan               61 sound/soc/pxa/mmp-pcm.c 	struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream);
chan               71 sound/soc/pxa/mmp-pcm.c 	ret = dmaengine_slave_config(chan, &slave_config);
chan               80 sound/soc/pxa/mmp-pcm.c static bool filter(struct dma_chan *chan, void *param)
chan               88 sound/soc/pxa/mmp-pcm.c 	if ((strcmp(dev_name(chan->device->dev), devname) == 0) &&
chan               89 sound/soc/pxa/mmp-pcm.c 		(chan->chan_id == dma_data->dma_res->start)) {
chan              131 sound/soc/qcom/lpass-apq8016.c 	int chan = 0;
chan              134 sound/soc/qcom/lpass-apq8016.c 		chan = find_first_zero_bit(&drvdata->dma_ch_bit_map,
chan              137 sound/soc/qcom/lpass-apq8016.c 		if (chan >= v->rdma_channels)
chan              140 sound/soc/qcom/lpass-apq8016.c 		chan = find_next_zero_bit(&drvdata->dma_ch_bit_map,
chan              145 sound/soc/qcom/lpass-apq8016.c 		if (chan >=  v->wrdma_channel_start + v->wrdma_channels)
chan              149 sound/soc/qcom/lpass-apq8016.c 	set_bit(chan, &drvdata->dma_ch_bit_map);
chan              151 sound/soc/qcom/lpass-apq8016.c 	return chan;
chan              154 sound/soc/qcom/lpass-apq8016.c static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int chan)
chan              156 sound/soc/qcom/lpass-apq8016.c 	clear_bit(chan, &drvdata->dma_ch_bit_map);
chan               66 sound/soc/qcom/lpass-ipq806x.c static int ipq806x_lpass_free_dma_channel(struct lpass_data *drvdata, int chan)
chan               87 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_IRQ_PER(chan)		(1 << (LPAIF_IRQ_BITSTRIDE * (chan)))
chan               88 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_IRQ_XRUN(chan)		(2 << (LPAIF_IRQ_BITSTRIDE * (chan)))
chan               89 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_IRQ_ERR(chan)		(4 << (LPAIF_IRQ_BITSTRIDE * (chan)))
chan               91 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_IRQ_ALL(chan)		(7 << (LPAIF_IRQ_BITSTRIDE * (chan)))
chan               95 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_RDMA_REG_ADDR(v, addr, chan) \
chan               96 sound/soc/qcom/lpass-lpaif-reg.h 	(v->rdma_reg_base + (addr) + v->rdma_reg_stride * (chan))
chan              100 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_RDMACTL_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x00, (chan))
chan              101 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_RDMABASE_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x04, (chan))
chan              102 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_RDMABUFF_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x08, (chan))
chan              103 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_RDMACURR_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x0C, (chan))
chan              104 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_RDMAPER_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x10, (chan))
chan              105 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_RDMAPERCNT_REG(v, chan)	LPAIF_RDMA_REG_ADDR(v, 0x14, (chan))
chan              107 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_WRDMA_REG_ADDR(v, addr, chan) \
chan              109 sound/soc/qcom/lpass-lpaif-reg.h 	 v->wrdma_reg_stride * (chan - v->wrdma_channel_start))
chan              111 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_WRDMACTL_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x00, (chan))
chan              112 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_WRDMABASE_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x04, (chan))
chan              113 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_WRDMABUFF_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x08, (chan))
chan              114 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_WRDMACURR_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x0C, (chan))
chan              115 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_WRDMAPER_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x10, (chan))
chan              116 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_WRDMAPERCNT_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x14, (chan))
chan              118 sound/soc/qcom/lpass-lpaif-reg.h #define __LPAIF_DMA_REG(v, chan, dir, reg)  \
chan              120 sound/soc/qcom/lpass-lpaif-reg.h 		LPAIF_RDMA##reg##_REG(v, chan) : \
chan              121 sound/soc/qcom/lpass-lpaif-reg.h 		LPAIF_WRDMA##reg##_REG(v, chan)
chan              123 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_DMACTL_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, CTL)
chan              124 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_DMABASE_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, BASE)
chan              125 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_DMABUFF_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, BUFF)
chan              126 sound/soc/qcom/lpass-lpaif-reg.h #define LPAIF_DMACURR_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, CURR)
chan              127 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_DMAPER_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, PER)
chan              128 sound/soc/qcom/lpass-lpaif-reg.h #define	LPAIF_DMAPERCNT_REG(v, chan, dir) __LPAIF_DMA_REG(v, chan, dir, PERCNT)
chan              423 sound/soc/qcom/lpass-platform.c 			int chan, u32 interrupts)
chan              430 sound/soc/qcom/lpass-platform.c 	if (interrupts & LPAIF_IRQ_PER(chan)) {
chan              433 sound/soc/qcom/lpass-platform.c 				LPAIF_IRQ_PER(chan));
chan              443 sound/soc/qcom/lpass-platform.c 	if (interrupts & LPAIF_IRQ_XRUN(chan)) {
chan              446 sound/soc/qcom/lpass-platform.c 				LPAIF_IRQ_XRUN(chan));
chan              457 sound/soc/qcom/lpass-platform.c 	if (interrupts & LPAIF_IRQ_ERR(chan)) {
chan              460 sound/soc/qcom/lpass-platform.c 				LPAIF_IRQ_ERR(chan));
chan              479 sound/soc/qcom/lpass-platform.c 	int rv, chan;
chan              489 sound/soc/qcom/lpass-platform.c 	for (chan = 0; chan < LPASS_MAX_DMA_CHANNELS; chan++) {
chan              490 sound/soc/qcom/lpass-platform.c 		if (irqs & LPAIF_IRQ_ALL(chan) && drvdata->substream[chan]) {
chan              492 sound/soc/qcom/lpass-platform.c 						drvdata->substream[chan],
chan              493 sound/soc/qcom/lpass-platform.c 						drvdata, chan, irqs);
chan              230 sound/soc/sh/fsi.c 	struct dma_chan		*chan;
chan             1298 sound/soc/sh/fsi.c 	desc = dmaengine_prep_dma_cyclic(io->chan,
chan             1317 sound/soc/sh/fsi.c 	dma_async_issue_pending(io->chan);
chan             1350 sound/soc/sh/fsi.c 	dmaengine_terminate_all(io->chan);
chan             1367 sound/soc/sh/fsi.c 	io->chan = dma_request_channel(mask, shdma_chan_filter,
chan             1370 sound/soc/sh/fsi.c 	io->chan = dma_request_slave_channel(dev, is_play ? "tx" : "rx");
chan             1372 sound/soc/sh/fsi.c 	if (io->chan) {
chan             1386 sound/soc/sh/fsi.c 		ret = dmaengine_slave_config(io->chan, &cfg);
chan             1388 sound/soc/sh/fsi.c 			dma_release_channel(io->chan);
chan             1389 sound/soc/sh/fsi.c 			io->chan = NULL;
chan             1393 sound/soc/sh/fsi.c 	if (!io->chan) {
chan             1414 sound/soc/sh/fsi.c 	if (io->chan)
chan             1415 sound/soc/sh/fsi.c 		dma_release_channel(io->chan);
chan             1417 sound/soc/sh/fsi.c 	io->chan = NULL;
chan              277 sound/soc/sh/rcar/core.c 	int chan = rsnd_runtime_channel_original_with_params(io, params);
chan              300 sound/soc/sh/rcar/core.c 	return chan;
chan              303 sound/soc/sh/rcar/core.c int rsnd_channel_normalization(int chan)
chan              305 sound/soc/sh/rcar/core.c 	if ((chan > 8) || (chan < 0))
chan              309 sound/soc/sh/rcar/core.c 	if (chan == 6)
chan              310 sound/soc/sh/rcar/core.c 		chan = 8;
chan              312 sound/soc/sh/rcar/core.c 	return chan;
chan              319 sound/soc/sh/rcar/core.c 	int chan = rsnd_io_is_play(io) ?
chan              325 sound/soc/sh/rcar/core.c 		chan /= rsnd_rdai_ssi_lane_get(rdai);
chan              327 sound/soc/sh/rcar/core.c 	return rsnd_channel_normalization(chan);
chan              334 sound/soc/sh/rcar/core.c 	int chan = rsnd_io_is_play(io) ?
chan              338 sound/soc/sh/rcar/core.c 	return (chan > 2) && (lane > 1);
chan               24 sound/soc/sh/rcar/dma.c 	struct dma_chan		*chan;
chan              103 sound/soc/sh/rcar/dma.c 	if (dmaen->chan)
chan              104 sound/soc/sh/rcar/dma.c 		dmaengine_terminate_all(dmaen->chan);
chan              121 sound/soc/sh/rcar/dma.c 	if (dmaen->chan)
chan              122 sound/soc/sh/rcar/dma.c 		dma_release_channel(dmaen->chan);
chan              124 sound/soc/sh/rcar/dma.c 	dmaen->chan = NULL;
chan              138 sound/soc/sh/rcar/dma.c 	if (dmaen->chan)
chan              146 sound/soc/sh/rcar/dma.c 	dmaen->chan = rsnd_dmaen_request_channel(io,
chan              149 sound/soc/sh/rcar/dma.c 	if (IS_ERR_OR_NULL(dmaen->chan)) {
chan              150 sound/soc/sh/rcar/dma.c 		dmaen->chan = NULL;
chan              181 sound/soc/sh/rcar/dma.c 	ret = dmaengine_slave_config(dmaen->chan, &cfg);
chan              185 sound/soc/sh/rcar/dma.c 	desc = dmaengine_prep_dma_cyclic(dmaen->chan,
chan              208 sound/soc/sh/rcar/dma.c 	dma_async_issue_pending(dmaen->chan);
chan              216 sound/soc/sh/rcar/dma.c 	struct dma_chan *chan = NULL;
chan              221 sound/soc/sh/rcar/dma.c 		if (i == rsnd_mod_id_raw(mod) && (!chan))
chan              222 sound/soc/sh/rcar/dma.c 			chan = of_dma_request_slave_channel(np, name);
chan              229 sound/soc/sh/rcar/dma.c 	return chan;
chan              238 sound/soc/sh/rcar/dma.c 	struct dma_chan *chan;
chan              241 sound/soc/sh/rcar/dma.c 	chan = rsnd_dmaen_request_channel(io, mod_from, mod_to);
chan              242 sound/soc/sh/rcar/dma.c 	if (IS_ERR_OR_NULL(chan)) {
chan              244 sound/soc/sh/rcar/dma.c 		if (PTR_ERR(chan) == -EPROBE_DEFER)
chan              245 sound/soc/sh/rcar/dma.c 			return PTR_ERR(chan);
chan              261 sound/soc/sh/rcar/dma.c 	io->dmac_dev = chan->device->dev;
chan              263 sound/soc/sh/rcar/dma.c 	dma_release_channel(chan);
chan              281 sound/soc/sh/rcar/dma.c 	status = dmaengine_tx_status(dmaen->chan, dmaen->cookie, &state);
chan              455 sound/soc/sh/rcar/rsnd.h int rsnd_channel_normalization(int chan);
chan              206 sound/soc/sh/rcar/src.c 	int chan;
chan              215 sound/soc/sh/rcar/src.c 	chan = rsnd_runtime_channel_original(io);
chan              235 sound/soc/sh/rcar/src.c 	adinr = rsnd_get_adinr_bit(mod, io) | chan;
chan              311 sound/soc/sh/rcar/src.c 		if (chptn[idx] & (1 << chan))
chan              314 sound/soc/sh/rcar/src.c 	if (chan > 8 ||
chan               88 sound/soc/sh/rcar/ssi.c 	int chan;
chan              273 sound/soc/sh/rcar/ssi.c 	int chan = rsnd_runtime_channel_for_ssi(io);
chan              290 sound/soc/sh/rcar/ssi.c 		chan = rsnd_io_converted_chan(io);
chan              292 sound/soc/sh/rcar/ssi.c 	chan = rsnd_channel_normalization(chan);
chan              300 sound/soc/sh/rcar/ssi.c 		if (ssi->chan != chan) {
chan              308 sound/soc/sh/rcar/ssi.c 	main_rate = rsnd_ssi_clk_query(rdai, rate, chan, &idx);
chan              332 sound/soc/sh/rcar/ssi.c 	ssi->chan = chan;
chan              335 sound/soc/sh/rcar/ssi.c 		rsnd_mod_name(mod), chan, rate);
chan              357 sound/soc/sh/rcar/ssi.c 	ssi->chan	= 0;
chan              109 sound/soc/sh/siu.h 	struct dma_chan			*chan;		/* DMA channel */
chan              121 sound/soc/sh/siu_pcm.c 	desc = dmaengine_prep_slave_sg(siu_stream->chan,
chan              139 sound/soc/sh/siu_pcm.c 	dma_async_issue_pending(siu_stream->chan);
chan              171 sound/soc/sh/siu_pcm.c 	desc = dmaengine_prep_slave_sg(siu_stream->chan,
chan              189 sound/soc/sh/siu_pcm.c 	dma_async_issue_pending(siu_stream->chan);
chan              317 sound/soc/sh/siu_pcm.c static bool filter(struct dma_chan *chan, void *slave)
chan              323 sound/soc/sh/siu_pcm.c 	chan->private = &param->shdma_slave;
chan              359 sound/soc/sh/siu_pcm.c 	siu_stream->chan = dma_request_channel(mask, filter, param);
chan              360 sound/soc/sh/siu_pcm.c 	if (!siu_stream->chan) {
chan              384 sound/soc/sh/siu_pcm.c 	dma_release_channel(siu_stream->chan);
chan              385 sound/soc/sh/siu_pcm.c 	siu_stream->chan = NULL;
chan               25 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan[SNDRV_PCM_STREAM_LAST + 1];
chan               39 sound/soc/soc-generic-dmaengine-pcm.c 	if (!pcm->chan[substream->stream])
chan               42 sound/soc/soc-generic-dmaengine-pcm.c 	return pcm->chan[substream->stream]->device->dev;
chan               85 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream);
chan              104 sound/soc/soc-generic-dmaengine-pcm.c 		ret = dmaengine_slave_config(chan, &slave_config);
chan              119 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan = pcm->chan[substream->stream];
chan              148 sound/soc/soc-generic-dmaengine-pcm.c 	ret = dma_get_slave_caps(chan, &dma_caps);
chan              208 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan = pcm->chan[substream->stream];
chan              215 sound/soc/soc-generic-dmaengine-pcm.c 	return snd_dmaengine_pcm_open(substream, chan);
chan              230 sound/soc/soc-generic-dmaengine-pcm.c 	if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0])
chan              231 sound/soc/soc-generic-dmaengine-pcm.c 		return pcm->chan[0];
chan              243 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan)
chan              248 sound/soc/soc-generic-dmaengine-pcm.c 	ret = dma_get_slave_caps(chan, &dma_caps);
chan              286 sound/soc/soc-generic-dmaengine-pcm.c 		if (!pcm->chan[i] && config && config->chan_names[i])
chan              287 sound/soc/soc-generic-dmaengine-pcm.c 			pcm->chan[i] = dma_request_slave_channel(dev,
chan              290 sound/soc/soc-generic-dmaengine-pcm.c 		if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
chan              291 sound/soc/soc-generic-dmaengine-pcm.c 			pcm->chan[i] = dmaengine_pcm_compat_request_channel(rtd,
chan              295 sound/soc/soc-generic-dmaengine-pcm.c 		if (!pcm->chan[i]) {
chan              307 sound/soc/soc-generic-dmaengine-pcm.c 		if (!dmaengine_pcm_can_report_residue(dev, pcm->chan[i]))
chan              413 sound/soc/soc-generic-dmaengine-pcm.c 	struct dma_chan *chan;
chan              439 sound/soc/soc-generic-dmaengine-pcm.c 		chan = dma_request_slave_channel_reason(dev, name);
chan              440 sound/soc/soc-generic-dmaengine-pcm.c 		if (IS_ERR(chan)) {
chan              441 sound/soc/soc-generic-dmaengine-pcm.c 			if (PTR_ERR(chan) == -EPROBE_DEFER)
chan              443 sound/soc/soc-generic-dmaengine-pcm.c 			pcm->chan[i] = NULL;
chan              445 sound/soc/soc-generic-dmaengine-pcm.c 			pcm->chan[i] = chan;
chan              452 sound/soc/soc-generic-dmaengine-pcm.c 		pcm->chan[1] = pcm->chan[0];
chan              463 sound/soc/soc-generic-dmaengine-pcm.c 		if (!pcm->chan[i])
chan              465 sound/soc/soc-generic-dmaengine-pcm.c 		dma_release_channel(pcm->chan[i]);
chan              193 sound/soc/soc-topology.c 	struct snd_soc_tplg_channel *chan, int map)
chan              198 sound/soc/soc-topology.c 		if (le32_to_cpu(chan[i].id) == map)
chan              199 sound/soc/soc-topology.c 			return le32_to_cpu(chan[i].reg);
chan              206 sound/soc/soc-topology.c 	struct snd_soc_tplg_channel *chan, int map)
chan              211 sound/soc/soc-topology.c 		if (le32_to_cpu(chan[i].id) == map)
chan              212 sound/soc/soc-topology.c 			return le32_to_cpu(chan[i].shift);
chan               42 sound/soc/spear/spear_pcm.c 			bool (*filter)(struct dma_chan *chan, void *slave))
chan               11 sound/soc/spear/spear_pcm.h 			bool (*filter)(struct dma_chan *chan, void *slave));
chan              112 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_chan chan[MCDT_CHANNEL_NUM];
chan              531 sound/soc/sprd/sprd-mcdt.c 			struct sprd_mcdt_chan *chan = &mcdt->chan[i];
chan              534 sound/soc/sprd/sprd-mcdt.c 			if (chan->cb)
chan              535 sound/soc/sprd/sprd-mcdt.c 				chan->cb->notify(chan->cb->data);
chan              541 sound/soc/sprd/sprd-mcdt.c 			struct sprd_mcdt_chan *chan =
chan              542 sound/soc/sprd/sprd-mcdt.c 				&mcdt->chan[i + MCDT_ADC_CHANNEL_NUM];
chan              545 sound/soc/sprd/sprd-mcdt.c 			if (chan->cb)
chan              546 sound/soc/sprd/sprd-mcdt.c 				chan->cb->notify(chan->cb->data);
chan              569 sound/soc/sprd/sprd-mcdt.c int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size)
chan              571 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              578 sound/soc/sprd/sprd-mcdt.c 	if (chan->dma_enable) {
chan              585 sound/soc/sprd/sprd-mcdt.c 	if (sprd_mcdt_chan_fifo_sts(mcdt, chan->id, MCDT_DAC_FIFO_REAL_FULL)) {
chan              591 sound/soc/sprd/sprd-mcdt.c 	avail = sprd_mcdt_dac_fifo_avail(mcdt, chan->id);
chan              600 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_write_fifo(mcdt, chan->id, *buf++);
chan              620 sound/soc/sprd/sprd-mcdt.c int sprd_mcdt_chan_read(struct sprd_mcdt_chan *chan, char *rx_buf, u32 size)
chan              622 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              629 sound/soc/sprd/sprd-mcdt.c 	if (chan->dma_enable) {
chan              635 sound/soc/sprd/sprd-mcdt.c 	if (sprd_mcdt_chan_fifo_sts(mcdt, chan->id, MCDT_ADC_FIFO_REAL_EMPTY)) {
chan              641 sound/soc/sprd/sprd-mcdt.c 	avail = sprd_mcdt_adc_fifo_avail(mcdt, chan->id);
chan              646 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_read_fifo(mcdt, chan->id, buf++);
chan              671 sound/soc/sprd/sprd-mcdt.c int sprd_mcdt_chan_int_enable(struct sprd_mcdt_chan *chan, u32 water_mark,
chan              674 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              680 sound/soc/sprd/sprd-mcdt.c 	if (chan->dma_enable || chan->int_enable) {
chan              686 sound/soc/sprd/sprd-mcdt.c 	switch (chan->type) {
chan              688 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_fifo_clear(mcdt, chan->id);
chan              689 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_set_watermark(mcdt, chan->id, water_mark,
chan              691 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_en(mcdt, chan->id,
chan              693 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_ap_int_enable(mcdt, chan->id, true);
chan              697 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_fifo_clear(mcdt, chan->id);
chan              698 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_set_watermark(mcdt, chan->id,
chan              700 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_en(mcdt, chan->id,
chan              702 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_ap_int_enable(mcdt, chan->id, true);
chan              711 sound/soc/sprd/sprd-mcdt.c 		chan->cb = cb;
chan              712 sound/soc/sprd/sprd-mcdt.c 		chan->int_enable = true;
chan              725 sound/soc/sprd/sprd-mcdt.c void sprd_mcdt_chan_int_disable(struct sprd_mcdt_chan *chan)
chan              727 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              732 sound/soc/sprd/sprd-mcdt.c 	if (!chan->int_enable) {
chan              737 sound/soc/sprd/sprd-mcdt.c 	switch (chan->type) {
chan              739 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_en(mcdt, chan->id,
chan              741 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_clear(mcdt, chan->id, MCDT_ADC_FIFO_AF_INT);
chan              742 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_ap_int_enable(mcdt, chan->id, false);
chan              746 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_en(mcdt, chan->id,
chan              748 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_chan_int_clear(mcdt, chan->id, MCDT_DAC_FIFO_AE_INT);
chan              749 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_ap_int_enable(mcdt, chan->id, false);
chan              756 sound/soc/sprd/sprd-mcdt.c 	chan->int_enable = false;
chan              773 sound/soc/sprd/sprd-mcdt.c int sprd_mcdt_chan_dma_enable(struct sprd_mcdt_chan *chan,
chan              777 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              783 sound/soc/sprd/sprd-mcdt.c 	if (chan->dma_enable || chan->int_enable ||
chan              790 sound/soc/sprd/sprd-mcdt.c 	switch (chan->type) {
chan              792 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_fifo_clear(mcdt, chan->id);
chan              793 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_set_watermark(mcdt, chan->id,
chan              795 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_dma_enable(mcdt, chan->id, true);
chan              796 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_dma_chn_select(mcdt, chan->id, dma_chan);
chan              797 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_dma_ack_select(mcdt, chan->id, dma_chan);
chan              801 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_fifo_clear(mcdt, chan->id);
chan              802 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_set_watermark(mcdt, chan->id,
chan              804 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_dma_enable(mcdt, chan->id, true);
chan              805 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_dma_chn_select(mcdt, chan->id, dma_chan);
chan              806 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_dma_ack_select(mcdt, chan->id, dma_chan);
chan              815 sound/soc/sprd/sprd-mcdt.c 		chan->dma_enable = true;
chan              827 sound/soc/sprd/sprd-mcdt.c void sprd_mcdt_chan_dma_disable(struct sprd_mcdt_chan *chan)
chan              829 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_dev *mcdt = chan->mcdt;
chan              834 sound/soc/sprd/sprd-mcdt.c 	if (!chan->dma_enable) {
chan              839 sound/soc/sprd/sprd-mcdt.c 	switch (chan->type) {
chan              841 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_dma_enable(mcdt, chan->id, false);
chan              842 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_adc_fifo_clear(mcdt, chan->id);
chan              846 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_dma_enable(mcdt, chan->id, false);
chan              847 sound/soc/sprd/sprd-mcdt.c 		sprd_mcdt_dac_fifo_clear(mcdt, chan->id);
chan              854 sound/soc/sprd/sprd-mcdt.c 	chan->dma_enable = false;
chan              869 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_chan *temp, *chan = NULL;
chan              875 sound/soc/sprd/sprd-mcdt.c 			chan = temp;
chan              880 sound/soc/sprd/sprd-mcdt.c 	if (chan)
chan              881 sound/soc/sprd/sprd-mcdt.c 		list_del(&chan->list);
chan              885 sound/soc/sprd/sprd-mcdt.c 	return chan;
chan              893 sound/soc/sprd/sprd-mcdt.c void sprd_mcdt_free_chan(struct sprd_mcdt_chan *chan)
chan              897 sound/soc/sprd/sprd-mcdt.c 	sprd_mcdt_chan_dma_disable(chan);
chan              898 sound/soc/sprd/sprd-mcdt.c 	sprd_mcdt_chan_int_disable(chan);
chan              903 sound/soc/sprd/sprd-mcdt.c 		if (temp == chan) {
chan              909 sound/soc/sprd/sprd-mcdt.c 	list_add_tail(&chan->list, &sprd_mcdt_chan_list);
chan              920 sound/soc/sprd/sprd-mcdt.c 		struct sprd_mcdt_chan *chan = &mcdt->chan[i];
chan              923 sound/soc/sprd/sprd-mcdt.c 			chan->id = i;
chan              924 sound/soc/sprd/sprd-mcdt.c 			chan->type = SPRD_MCDT_ADC_CHAN;
chan              925 sound/soc/sprd/sprd-mcdt.c 			chan->fifo_phys = res->start + MCDT_CH0_RXD + i * 4;
chan              927 sound/soc/sprd/sprd-mcdt.c 			chan->id = i - MCDT_ADC_CHANNEL_NUM;
chan              928 sound/soc/sprd/sprd-mcdt.c 			chan->type = SPRD_MCDT_DAC_CHAN;
chan              929 sound/soc/sprd/sprd-mcdt.c 			chan->fifo_phys = res->start + MCDT_CH0_TXD +
chan              933 sound/soc/sprd/sprd-mcdt.c 		chan->mcdt = mcdt;
chan              934 sound/soc/sprd/sprd-mcdt.c 		INIT_LIST_HEAD(&chan->list);
chan              937 sound/soc/sprd/sprd-mcdt.c 		list_add_tail(&chan->list, &sprd_mcdt_chan_list);
chan              979 sound/soc/sprd/sprd-mcdt.c 	struct sprd_mcdt_chan *chan, *temp;
chan              983 sound/soc/sprd/sprd-mcdt.c 	list_for_each_entry_safe(chan, temp, &sprd_mcdt_chan_list, list)
chan              984 sound/soc/sprd/sprd-mcdt.c 		list_del(&chan->list);
chan               54 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_free_chan(struct sprd_mcdt_chan *chan);
chan               56 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size);
chan               57 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_read(struct sprd_mcdt_chan *chan, char *rx_buf, u32 size);
chan               58 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_int_enable(struct sprd_mcdt_chan *chan, u32 water_mark,
chan               60 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_chan_int_disable(struct sprd_mcdt_chan *chan);
chan               62 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_dma_enable(struct sprd_mcdt_chan *chan,
chan               64 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_chan_dma_disable(struct sprd_mcdt_chan *chan);
chan               74 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_free_chan(struct sprd_mcdt_chan *chan)
chan               77 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size)
chan               82 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_read(struct sprd_mcdt_chan *chan, char *rx_buf, u32 size)
chan               87 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_int_enable(struct sprd_mcdt_chan *chan, u32 water_mark,
chan               93 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_chan_int_disable(struct sprd_mcdt_chan *chan)
chan               96 sound/soc/sprd/sprd-mcdt.h int sprd_mcdt_chan_dma_enable(struct sprd_mcdt_chan *chan,
chan              102 sound/soc/sprd/sprd-mcdt.h void sprd_mcdt_chan_dma_disable(struct sprd_mcdt_chan *chan)
chan               43 sound/soc/sprd/sprd-pcm-compress.c 	struct dma_chan *chan;
chan              156 sound/soc/sprd/sprd-pcm-compress.c 	dma->chan = dma_request_slave_channel(dev,
chan              158 sound/soc/sprd/sprd-pcm-compress.c 	if (!dma->chan) {
chan              227 sound/soc/sprd/sprd-pcm-compress.c 	ret = dmaengine_slave_config(dma->chan, &config);
chan              238 sound/soc/sprd/sprd-pcm-compress.c 	dma->desc = dma->chan->device->device_prep_slave_sg(dma->chan, sg,
chan              260 sound/soc/sprd/sprd-pcm-compress.c 	dma_release_channel(dma->chan);
chan              311 sound/soc/sprd/sprd-pcm-compress.c 	dma_release_channel(stream->dma[0].chan);
chan              313 sound/soc/sprd/sprd-pcm-compress.c 	dma_release_channel(stream->dma[1].chan);
chan              408 sound/soc/sprd/sprd-pcm-compress.c 		if (dma->chan) {
chan              409 sound/soc/sprd/sprd-pcm-compress.c 			dma_release_channel(dma->chan);
chan              410 sound/soc/sprd/sprd-pcm-compress.c 			dma->chan = NULL;
chan              460 sound/soc/sprd/sprd-pcm-compress.c 			if (dma->chan)
chan              461 sound/soc/sprd/sprd-pcm-compress.c 				dma_async_issue_pending(dma->chan);
chan              471 sound/soc/sprd/sprd-pcm-compress.c 			if (dma->chan)
chan              472 sound/soc/sprd/sprd-pcm-compress.c 				dmaengine_terminate_async(dma->chan);
chan              489 sound/soc/sprd/sprd-pcm-compress.c 			if (dma->chan)
chan              490 sound/soc/sprd/sprd-pcm-compress.c 				dmaengine_pause(dma->chan);
chan              501 sound/soc/sprd/sprd-pcm-compress.c 			if (dma->chan)
chan              502 sound/soc/sprd/sprd-pcm-compress.c 				dmaengine_resume(dma->chan);
chan               21 sound/soc/sprd/sprd-pcm-dma.c 	struct dma_chan *chan;
chan              153 sound/soc/sprd/sprd-pcm-dma.c 		if (data->chan) {
chan              154 sound/soc/sprd/sprd-pcm-dma.c 			dma_release_channel(data->chan);
chan              155 sound/soc/sprd/sprd-pcm-dma.c 			data->chan = NULL;
chan              180 sound/soc/sprd/sprd-pcm-dma.c 		data->chan = dma_request_slave_channel(dev,
chan              182 sound/soc/sprd/sprd-pcm-dma.c 		if (!data->chan) {
chan              240 sound/soc/sprd/sprd-pcm-dma.c 		struct dma_chan *chan = data->chan;
chan              277 sound/soc/sprd/sprd-pcm-dma.c 		ret = dmaengine_slave_config(chan, &config);
chan              290 sound/soc/sprd/sprd-pcm-dma.c 		data->desc = chan->device->device_prep_slave_sg(chan, sg,
chan              350 sound/soc/sprd/sprd-pcm-dma.c 			dma_async_issue_pending(data->chan);
chan              359 sound/soc/sprd/sprd-pcm-dma.c 			if (data->chan)
chan              360 sound/soc/sprd/sprd-pcm-dma.c 				dmaengine_resume(data->chan);
chan              368 sound/soc/sprd/sprd-pcm-dma.c 			if (data->chan)
chan              369 sound/soc/sprd/sprd-pcm-dma.c 				dmaengine_terminate_async(data->chan);
chan              378 sound/soc/sprd/sprd-pcm-dma.c 			if (data->chan)
chan              379 sound/soc/sprd/sprd-pcm-dma.c 				dmaengine_pause(data->chan);
chan              406 sound/soc/sprd/sprd-pcm-dma.c 		if (!data->chan)
chan              409 sound/soc/sprd/sprd-pcm-dma.c 		status = dmaengine_tx_status(data->chan, data->cookie, &state);
chan               85 sound/soc/sunxi/sun4i-i2s.c #define SUN4I_I2S_TX_CHAN_MAP(chan, sample)	((sample) << (chan << 2))
chan              113 sound/soc/sunxi/sun4i-i2s.c #define SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM(chan)	((chan - 1) << 4)
chan              115 sound/soc/sunxi/sun4i-i2s.c #define SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(chan)	(chan - 1)
chan             1862 sound/soc/ti/davinci-mcasp.c 	struct dma_chan *chan;
chan             1870 sound/soc/ti/davinci-mcasp.c 	chan = dma_request_slave_channel_reason(mcasp->dev, tmp);
chan             1871 sound/soc/ti/davinci-mcasp.c 	if (IS_ERR(chan)) {
chan             1872 sound/soc/ti/davinci-mcasp.c 		if (PTR_ERR(chan) != -EPROBE_DEFER)
chan             1875 sound/soc/ti/davinci-mcasp.c 				PTR_ERR(chan));
chan             1876 sound/soc/ti/davinci-mcasp.c 		return PTR_ERR(chan);
chan             1878 sound/soc/ti/davinci-mcasp.c 	if (WARN_ON(!chan->device || !chan->device->dev))
chan             1881 sound/soc/ti/davinci-mcasp.c 	if (chan->device->dev->of_node)
chan             1882 sound/soc/ti/davinci-mcasp.c 		ret = of_property_read_string(chan->device->dev->of_node,
chan             1887 sound/soc/ti/davinci-mcasp.c 	dma_release_channel(chan);
chan              123 sound/soc/txx9/txx9aclc.c 	struct dma_chan *chan = dmadata->dma_chan;
chan              131 sound/soc/txx9/txx9aclc.c 	desc = dmaengine_prep_slave_sg(chan, &sg, 1,
chan              136 sound/soc/txx9/txx9aclc.c 		dev_err(&chan->dev->device, "cannot prepare slave dma\n");
chan              150 sound/soc/txx9/txx9aclc.c 	struct dma_chan *chan = dmadata->dma_chan;
chan              164 sound/soc/txx9/txx9aclc.c 		dmaengine_terminate_all(chan);
chan              173 sound/soc/txx9/txx9aclc.c 		dma_async_issue_pending(chan);
chan              192 sound/soc/txx9/txx9aclc.c 		dma_async_issue_pending(chan);
chan              267 sound/soc/txx9/txx9aclc.c 	struct dma_chan *chan = dmadata->dma_chan;
chan              270 sound/soc/txx9/txx9aclc.c 	dmaengine_terminate_all(chan);
chan              327 sound/soc/txx9/txx9aclc.c static bool filter(struct dma_chan *chan, void *param)
chan              335 sound/soc/txx9/txx9aclc.c 	if (strcmp(dev_name(chan->device->dev), devname) == 0) {
chan              336 sound/soc/txx9/txx9aclc.c 		chan->private = &dmadata->dma_slave;
chan              397 sound/soc/txx9/txx9aclc.c 		struct dma_chan *chan = dmadata->dma_chan;
chan              399 sound/soc/txx9/txx9aclc.c 		if (chan) {
chan              401 sound/soc/txx9/txx9aclc.c 			dmaengine_terminate_all(chan);
chan              402 sound/soc/txx9/txx9aclc.c 			dma_release_channel(chan);
chan               86 sound/synth/emux/emux_effect.c effect_set_byte(unsigned char *valp, struct snd_midi_channel *chan, int type)
chan               89 sound/synth/emux/emux_effect.c 	struct snd_emux_effect_table *fx = chan->private;
chan              107 sound/synth/emux/emux_effect.c effect_set_word(unsigned short *valp, struct snd_midi_channel *chan, int type)
chan              110 sound/synth/emux/emux_effect.c 	struct snd_emux_effect_table *fx = chan->private;
chan              124 sound/synth/emux/emux_effect.c effect_get_offset(struct snd_midi_channel *chan, int lo, int hi, int mode)
chan              127 sound/synth/emux/emux_effect.c 	struct snd_emux_effect_table *fx = chan->private;
chan              143 sound/synth/emux/emux_effect.c 			 struct snd_midi_channel *chan, int type, int val)
chan              155 sound/synth/emux/emux_effect.c 	snd_emux_send_effect(port, chan, type, val, mode);
chan              163 sound/synth/emux/emux_effect.c snd_emux_send_effect(struct snd_emux_port *port, struct snd_midi_channel *chan,
chan              174 sound/synth/emux/emux_effect.c 	fx = chan->private;
chan              198 sound/synth/emux/emux_effect.c 		if (!STATE_IS_PLAYING(vp->state) || vp->chan != chan)
chan              204 sound/synth/emux/emux_effect.c 			effect_set_byte(srcp, chan, type);
chan              207 sound/synth/emux/emux_effect.c 			effect_set_word((unsigned short*)srcp, chan, type);
chan              213 sound/synth/emux/emux_effect.c 	snd_emux_update_channel(port, chan, parm_defs[type].update);
chan              221 sound/synth/emux/emux_effect.c 	struct snd_midi_channel *chan = vp->chan;
chan              226 sound/synth/emux/emux_effect.c 	if (! (fx = chan->private))
chan              243 sound/synth/emux/emux_effect.c 			effect_set_byte(srcp, chan, i);
chan              245 sound/synth/emux/emux_effect.c 			effect_set_word((unsigned short*)srcp, chan, i);
chan              249 sound/synth/emux/emux_effect.c 	vp->reg.start += effect_get_offset(chan, EMUX_FX_SAMPLE_START,
chan              253 sound/synth/emux/emux_effect.c 	vp->reg.loopstart += effect_get_offset(chan, EMUX_FX_LOOP_START,
chan              257 sound/synth/emux/emux_effect.c 	vp->reg.loopend += effect_get_offset(chan, EMUX_FX_LOOP_END,
chan               40 sound/synth/emux/emux_nrpn.c 				 struct snd_midi_channel *chan,
chan               47 sound/synth/emux/emux_nrpn.c 			snd_emux_send_effect(port, chan, table[i].effect,
chan              273 sound/synth/emux/emux_nrpn.c snd_emux_nrpn(void *p, struct snd_midi_channel *chan,
chan              279 sound/synth/emux/emux_nrpn.c 	if (snd_BUG_ON(!port || !chan))
chan              282 sound/synth/emux/emux_nrpn.c 	if (chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 127 &&
chan              283 sound/synth/emux/emux_nrpn.c 	    chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB] <= 26) {
chan              287 sound/synth/emux/emux_nrpn.c 		val = (chan->control[MIDI_CTL_MSB_DATA_ENTRY] << 7) |
chan              288 sound/synth/emux/emux_nrpn.c 			chan->control[MIDI_CTL_LSB_DATA_ENTRY]; 
chan              292 sound/synth/emux/emux_nrpn.c 			 port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB],
chan              298 sound/synth/emux/emux_nrpn.c 	    chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 1) {
chan              302 sound/synth/emux/emux_nrpn.c 		val = chan->control[MIDI_CTL_MSB_DATA_ENTRY];
chan              305 sound/synth/emux/emux_nrpn.c 			 port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB],
chan              349 sound/synth/emux/emux_nrpn.c snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
chan              353 sound/synth/emux/emux_nrpn.c 				     port, chan, param,
chan              354 sound/synth/emux/emux_nrpn.c 				     chan->control[param],
chan              327 sound/synth/emux/emux_oss.c 	struct snd_midi_channel *chan;
chan              331 sound/synth/emux/emux_oss.c 		chan = NULL;
chan              333 sound/synth/emux/emux_oss.c 		chan = &port->chset.channels[voice];
chan              345 sound/synth/emux/emux_oss.c 		if (chan)
chan              346 sound/synth/emux/emux_oss.c 			snd_emux_send_effect_oss(port, chan, p1, p2);
chan              375 sound/synth/emux/emux_oss.c 		if (chan) {
chan              376 sound/synth/emux/emux_oss.c 			chan->midi_pressure = p1;
chan              377 sound/synth/emux/emux_oss.c 			snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_FMMOD|SNDRV_EMUX_UPDATE_FM2FRQ2);
chan              389 sound/synth/emux/emux_oss.c 			chan = &port->chset.channels[i];
chan              390 sound/synth/emux/emux_oss.c 			chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0;
chan              421 sound/synth/emux/emux_oss.c 	struct snd_midi_channel *chan;
chan              431 sound/synth/emux/emux_oss.c 	chan = &port->chset.channels[voice];
chan              438 sound/synth/emux/emux_oss.c 		chan->midi_program = p1;
chan              443 sound/synth/emux/emux_oss.c 		chan->control[MIDI_CTL_MSB_PAN] = (int)p1 << 3;
chan              444 sound/synth/emux/emux_oss.c 		snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PAN);
chan              465 sound/synth/emux/emux_oss.c 		snd_emux_send_effect(port, chan, EMUX_FX_SAMPLE_START,
chan              468 sound/synth/emux/emux_oss.c 		snd_emux_send_effect(port, chan, EMUX_FX_COARSE_SAMPLE_START,
chan              229 sound/synth/emux/emux_seq.c 		struct snd_midi_channel *chan = port->chset.channels + i;
chan              230 sound/synth/emux/emux_seq.c 		chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0;
chan               27 sound/synth/emux/emux_synth.c 		    int *notep, int vel, struct snd_midi_channel *chan,
chan               29 sound/synth/emux/emux_synth.c static int get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan);
chan               31 sound/synth/emux/emux_synth.c 			    struct snd_midi_channel *chan, int free);
chan               46 sound/synth/emux/emux_synth.c snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
chan               56 sound/synth/emux/emux_synth.c 	if (snd_BUG_ON(!port || !chan))
chan               64 sound/synth/emux/emux_synth.c 	nvoices = get_zone(emu, port, &note, vel, chan, table);
chan               77 sound/synth/emux/emux_synth.c 	terminate_note1(emu, key, chan, 0);
chan               96 sound/synth/emux/emux_synth.c 		vp->chan = chan;
chan              121 sound/synth/emux/emux_synth.c 		    vp->chan == chan) {
chan              132 sound/synth/emux/emux_synth.c 		struct snd_emux_effect_table *fx = chan->private;
chan              145 sound/synth/emux/emux_synth.c snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
chan              154 sound/synth/emux/emux_synth.c 	if (snd_BUG_ON(!port || !chan))
chan              165 sound/synth/emux/emux_synth.c 		    vp->chan == chan && vp->key == note) {
chan              222 sound/synth/emux/emux_synth.c snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
chan              231 sound/synth/emux/emux_synth.c 	if (snd_BUG_ON(!port || !chan))
chan              242 sound/synth/emux/emux_synth.c 		    vp->chan == chan && vp->key == note) {
chan              255 sound/synth/emux/emux_synth.c snd_emux_update_channel(struct snd_emux_port *port, struct snd_midi_channel *chan, int update)
chan              272 sound/synth/emux/emux_synth.c 		if (vp->chan == chan)
chan              311 sound/synth/emux/emux_synth.c snd_emux_control(void *p, int type, struct snd_midi_channel *chan)
chan              316 sound/synth/emux/emux_synth.c 	if (snd_BUG_ON(!port || !chan))
chan              322 sound/synth/emux/emux_synth.c 		snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_VOLUME);
chan              326 sound/synth/emux/emux_synth.c 		snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PAN);
chan              332 sound/synth/emux/emux_synth.c 		if (chan->control[type] >= 64)
chan              333 sound/synth/emux/emux_synth.c 			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, -160,
chan              336 sound/synth/emux/emux_synth.c 			snd_emux_send_effect(port, chan, EMUX_FX_CUTOFF, 0,
chan              342 sound/synth/emux/emux_synth.c 		snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_PITCH);
chan              347 sound/synth/emux/emux_synth.c 		snd_emux_update_channel(port, chan,
chan              355 sound/synth/emux/emux_synth.c 		snd_emux_xg_control(port, chan, type);
chan              364 sound/synth/emux/emux_synth.c terminate_note1(struct snd_emux *emu, int note, struct snd_midi_channel *chan, int free)
chan              373 sound/synth/emux/emux_synth.c 		if (STATE_IS_PLAYING(vp->state) && vp->chan == chan &&
chan              385 sound/synth/emux/emux_synth.c snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan)
chan              391 sound/synth/emux/emux_synth.c 	if (snd_BUG_ON(!port || !chan))
chan              398 sound/synth/emux/emux_synth.c 	terminate_note1(emu, note, chan, 1);
chan              497 sound/synth/emux/emux_synth.c 	vp->chan = NULL;
chan              516 sound/synth/emux/emux_synth.c 	if (vp->chan == NULL || vp->port == NULL)
chan              641 sound/synth/emux/emux_synth.c 	struct snd_midi_channel *chan = vp->chan;
chan              648 sound/synth/emux/emux_synth.c 		pan = chan->control[MIDI_CTL_MSB_PAN] - 64;
chan              744 sound/synth/emux/emux_synth.c 	struct snd_midi_channel *chan = vp->chan;
chan              747 sound/synth/emux/emux_synth.c 	expression_vol = chan->control[MIDI_CTL_MSB_EXPRESSION];
chan              752 sound/synth/emux/emux_synth.c 		main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME];
chan              762 sound/synth/emux/emux_synth.c 		main_vol = chan->control[MIDI_CTL_MSB_MAIN_VOLUME] * vp->reg.amplitude / 127;
chan              777 sound/synth/emux/emux_synth.c 	if (chan->private) {
chan              778 sound/synth/emux/emux_synth.c 		struct snd_emux_effect_table *fx = chan->private;
chan              788 sound/synth/emux/emux_synth.c 	if (!SF_IS_DRUM_BANK(get_bank(port, chan))
chan              813 sound/synth/emux/emux_synth.c 	struct snd_midi_channel *chan = vp->chan;
chan              824 sound/synth/emux/emux_synth.c 	if (chan->midi_pitchbend != 0) {
chan              826 sound/synth/emux/emux_synth.c 		offset += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 3072;
chan              834 sound/synth/emux/emux_synth.c 	offset += chan->gm_rpn_coarse_tuning * 4096 / (12 * 128);
chan              835 sound/synth/emux/emux_synth.c 	offset += chan->gm_rpn_fine_tuning / 24;
chan              839 sound/synth/emux/emux_synth.c 	if (chan->private) {
chan              840 sound/synth/emux/emux_synth.c 		struct snd_emux_effect_table *fx = chan->private;
chan              860 sound/synth/emux/emux_synth.c get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan)
chan              866 sound/synth/emux/emux_synth.c 		val = chan->control[MIDI_CTL_MSB_BANK];
chan              869 sound/synth/emux/emux_synth.c 		return chan->control[MIDI_CTL_LSB_BANK];
chan              872 sound/synth/emux/emux_synth.c 		if (chan->drum_channel)
chan              875 sound/synth/emux/emux_synth.c 		return chan->control[MIDI_CTL_MSB_BANK];
chan              878 sound/synth/emux/emux_synth.c 		if (chan->drum_channel)
chan              880 sound/synth/emux/emux_synth.c 		return chan->control[MIDI_CTL_MSB_BANK];
chan              890 sound/synth/emux/emux_synth.c 	 int *notep, int vel, struct snd_midi_channel *chan,
chan              895 sound/synth/emux/emux_synth.c 	bank = get_bank(port, chan);
chan              896 sound/synth/emux/emux_synth.c 	preset = chan->midi_program;
chan              925 sound/synth/emux/emux_synth.c 		vp->chan = NULL;
chan               34 sound/synth/emux/emux_voice.h void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               35 sound/synth/emux/emux_voice.h void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               36 sound/synth/emux/emux_voice.h void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
chan               37 sound/synth/emux/emux_voice.h void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
chan               38 sound/synth/emux/emux_voice.h void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
chan               42 sound/synth/emux/emux_voice.h 			     struct snd_midi_channel *chan, int update);
chan               54 sound/synth/emux/emux_voice.h 			      struct snd_midi_channel *chan, int type, int val);
chan               56 sound/synth/emux/emux_voice.h 			  struct snd_midi_channel *chan, int type, int val, int mode);
chan               63 sound/synth/emux/emux_voice.h 			struct snd_midi_channel *chan, int param);
chan               64 sound/synth/emux/emux_voice.h void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
chan             1179 sound/usb/mixer_quirks.c 	int out, chan, err;
chan             1198 sound/usb/mixer_quirks.c 	for (chan = 0; chan < num_outs + num_ins; chan++) {
chan             1200 sound/usb/mixer_quirks.c 			if (chan < num_outs) {
chan             1203 sound/usb/mixer_quirks.c 					chan + 1, out + 1);
chan             1207 sound/usb/mixer_quirks.c 					chan - num_outs + 1, out + 1);
chan             1211 sound/usb/mixer_quirks.c 			offset = chan * num_outs;
chan             1266 sound/usb/mixer_quirks.c 	int chan, err;
chan             1285 sound/usb/mixer_quirks.c 	for (chan = 0; chan < num_outs + num_ins; chan++) {
chan             1286 sound/usb/mixer_quirks.c 		if (chan < num_outs) {
chan             1289 sound/usb/mixer_quirks.c 				chan + 1);
chan             1293 sound/usb/mixer_quirks.c 				chan - num_outs + 1);
chan             1296 sound/usb/mixer_quirks.c 		cmask = (chan == 0) ? 0 : 1 << (chan - 1);
chan             1311 sound/usb/mixer_quirks.c 	int chan, err;
chan             1332 sound/usb/mixer_quirks.c 	for (chan = 0; chan < num_outs; chan++) {
chan             1335 sound/usb/mixer_quirks.c 			chan + 1);
chan             1337 sound/usb/mixer_quirks.c 		cmask = (chan == 0) ? 0 :
chan             1338 sound/usb/mixer_quirks.c 			1 << (chan + (chan % 2) * num_outs - 1);
chan              250 tools/iio/iio_event_monitor.c 	int chan = IIO_EVENT_CODE_EXTRACT_CHAN(event->id);
chan              267 tools/iio/iio_event_monitor.c 	if (chan >= 0) {
chan              268 tools/iio/iio_event_monitor.c 		printf(", channel: %d", chan);
chan              122 tools/testing/nvdimm/test/nfit.c #define NFIT_DIMM_HANDLE(node, socket, imc, chan, dimm) \
chan              124 tools/testing/nvdimm/test/nfit.c 	 | ((imc & 0xf) << 8) | ((chan & 0xf) << 4) | (dimm & 0xf))
chan              388 tools/testing/selftests/ptp/testptp.c 			       desc.name, desc.index, desc.func, desc.chan);
chan              414 tools/testing/selftests/ptp/testptp.c 		desc.chan = index;